@astropay/payments-lib 2.0.22 → 2.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/astropay-payments-lib.es.js +6 -5
- package/dist/astropay-payments-lib.umd.js +29 -9
- package/dist/{main-DChoo5ch.js → main-D6KiGA5-.js} +178 -9
- package/dist/main.d.ts +2 -1
- package/dist/{profiler-DD6Lx2mk.js → profiler-BftqmTdG.js} +1 -1
- package/dist/public/AstroPaySinglePaymentMethod/index.d.ts +61 -0
- package/dist/{startRecording-Cbikqz3n.js → startRecording-CKEF3p21.js} +1 -1
- package/dist/types/index.d.ts +8 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(ii,Jr){typeof exports=="object"&&typeof module<"u"?Jr(exports):typeof define=="function"&&define.amd?define(["exports"],Jr):(ii=typeof globalThis<"u"?globalThis:ii||self,Jr(ii.AstroPay={}))})(this,(function(exports){"use strict";var Ua=Object.defineProperty;var Fa=(ii,Jr,Ri)=>Jr in ii?Ua(ii,Jr,{enumerable:!0,configurable:!0,writable:!0,value:Ri}):ii[Jr]=Ri;var Ie=(ii,Jr,Ri)=>Fa(ii,typeof Jr!="symbol"?Jr+"":Jr,Ri);const FONT_SIZES={xxsm:10,xsm:12,sm:14,base:16,md:20,lg:26,xl:32,xxl:40},FONT_SIZE_MAP={sm:{xSmall:FONT_SIZES.xxsm,small:FONT_SIZES.xsm,medium:FONT_SIZES.sm,base:FONT_SIZES.base,large:FONT_SIZES.md,xLarge:FONT_SIZES.lg},md:{xSmall:FONT_SIZES.xsm,small:FONT_SIZES.sm,medium:FONT_SIZES.base,base:FONT_SIZES.md,large:FONT_SIZES.lg,xLarge:FONT_SIZES.xl},lg:{xSmall:FONT_SIZES.sm,small:FONT_SIZES.base,medium:FONT_SIZES.md,base:FONT_SIZES.lg,large:FONT_SIZES.xl,xLarge:FONT_SIZES.xxl}},DEFAULT_COLORS={transparent:"transparent",surface_dark:"#041311",surface_light:"#FFFFFF",neutral_lightest:"#FFFFFF",neutral_light:"#F3F6F6",neutral_lighter:"#ECF1F0",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_darker:"#D61D00",error_dark:"#A31600",error_darkest:"#700F00",success_lightest:"#F0FAEB",success_light:"#D3EFC2",success_base:"#7CD049",success_darker:"#62B52F",success_dark:"#4D8E25",success_darkest:"#37651A"},DEFAULT_FONTS={poppins:"Poppins"},loadFonts=async()=>{try{const ee=document.createElement("link");ee.href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap",ee.rel="stylesheet",document.head.appendChild(ee),await document.fonts.ready}catch(ee){console.error("Font loading failed:",ee)}},DARK_THEME={backgroundColor:DEFAULT_COLORS.surface_dark,fontFamily:DEFAULT_FONTS.poppins,textColor:DEFAULT_COLORS.neutral_light,fontScale:FONT_SIZE_MAP.md,primaryColor:DEFAULT_COLORS.primary_base,secondaryColor:DEFAULT_COLORS.primary_darkest,textPrimaryColor:DEFAULT_COLORS.neutral_lightest,textSecondaryColor:DEFAULT_COLORS.neutral_base,width:"100%",paddingWrapper:"12px",borderRadiusWrapper:"4px",messages:{success:{textColor:DEFAULT_COLORS.success_base},error:{textColor:DEFAULT_COLORS.error_lighter}},input:{normal:{textColor:DEFAULT_COLORS.neutral_lightest,backgroundColor:DEFAULT_COLORS.neutral_darkest,hintTextColor:DEFAULT_COLORS.neutral_darker,placeholderTextColor:DEFAULT_COLORS.neutral_dark,borderColor:DEFAULT_COLORS.transparent,borderRadius:8,borderWidth:3},focus:{textColor:DEFAULT_COLORS.neutral_lightest,backgroundColor:DEFAULT_COLORS.neutral_darkest,hintTextColor:DEFAULT_COLORS.neutral_darker,placeholderTextColor:DEFAULT_COLORS.neutral_darker,borderColor:DEFAULT_COLORS.primary_base,borderRadius:8,borderWidth:3},disabled:{textColor:DEFAULT_COLORS.neutral_darker,backgroundColor:DEFAULT_COLORS.neutral_dark,hintTextColor:DEFAULT_COLORS.neutral_darker,placeholderTextColor:DEFAULT_COLORS.neutral_base,borderColor:DEFAULT_COLORS.neutral_dark,borderRadius:8,borderWidth:3},error:{textColor:DEFAULT_COLORS.neutral_lightest,backgroundColor:DEFAULT_COLORS.neutral_darkest,hintTextColor:DEFAULT_COLORS.error_base,placeholderTextColor:DEFAULT_COLORS.neutral_darker,borderColor:DEFAULT_COLORS.error_base,borderRadius:8,borderWidth:3}},button:{small:{borderRadius:4},medium:{borderRadius:8},large:{borderRadius:8},primary:{textColor:DEFAULT_COLORS.neutral_lightest,backgroundColor:DEFAULT_COLORS.primary_base,borderColor:DEFAULT_COLORS.transparent,borderWidth:0},secondary:{textColor:DEFAULT_COLORS.primary_lightest,backgroundColor:DEFAULT_COLORS.primary_darkest,borderColor:DEFAULT_COLORS.transparent,borderWidth:0},text:{textColor:DEFAULT_COLORS.primary_base,backgroundColor:"unset",borderColor:DEFAULT_COLORS.primary_base,borderWidth:1},disabled:{textColor:DEFAULT_COLORS.neutral_dark,backgroundColor:DEFAULT_COLORS.neutral_base,borderColor:DEFAULT_COLORS.transparent,borderWidth:0}},divider:{color:DEFAULT_COLORS.neutral_darker,variant:"dashed",size:1},card:{padding:12,backgroundColor:DEFAULT_COLORS.neutral_darkest,borderWidth:0,borderStyle:"none",borderColor:DEFAULT_COLORS.transparent,borderRadius:16},qrCode:{padding:16,backgroundColor:DEFAULT_COLORS.neutral_darkest,borderWidth:1,borderStyle:"solid",borderColor:DEFAULT_COLORS.primary_base,borderRadius:16},badge:{default:{padding:"2px 6px",textColor:DEFAULT_COLORS.neutral_light,backgroundColor:DEFAULT_COLORS.neutral_dark,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},highlight:{padding:"2px 6px",textColor:DEFAULT_COLORS.primary_light,backgroundColor:DEFAULT_COLORS.primary_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},error:{padding:"2px 6px",textColor:DEFAULT_COLORS.error_light,backgroundColor:DEFAULT_COLORS.error_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},success:{padding:"2px 6px",textColor:DEFAULT_COLORS.success_light,backgroundColor:DEFAULT_COLORS.success_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},warning:{padding:"2px 6px",textColor:DEFAULT_COLORS.warning_light,backgroundColor:DEFAULT_COLORS.warning_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4}},timer:{padding:"4px 8px",textColor:DEFAULT_COLORS.error_lightest,backgroundColor:DEFAULT_COLORS.warning_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:12},cardTabs:{activeTextColor:DEFAULT_COLORS.neutral_lightest,inactiveTextColor:DEFAULT_COLORS.neutral_base,indicatorColor:DEFAULT_COLORS.neutral_lightest,borderColor:DEFAULT_COLORS.neutral_darker},cardTabsSegmented:{trackBackgroundColor:DEFAULT_COLORS.neutral_base,trackBorderRadius:12,activeBackgroundColor:DEFAULT_COLORS.surface_dark,activeTextColor:DEFAULT_COLORS.neutral_lightest,inactiveTextColor:DEFAULT_COLORS.neutral_dark,itemBorderRadius:10},savedCardSelector:{row:{borderColor:DEFAULT_COLORS.neutral_darker,borderWidth:1,borderRadius:12},radio:{color:DEFAULT_COLORS.neutral_darker,activeColor:DEFAULT_COLORS.neutral_light},cardNumber:{textColor:DEFAULT_COLORS.neutral_light},cardMeta:{textColor:DEFAULT_COLORS.neutral_base},deleteButton:{color:DEFAULT_COLORS.neutral_base,hoverColor:DEFAULT_COLORS.error_light,hoverBackgroundColor:DEFAULT_COLORS.error_darkest,confirmBackground:DEFAULT_COLORS.error_dark,confirmTextColor:DEFAULT_COLORS.neutral_lightest,confirmActionBackground:DEFAULT_COLORS.neutral_lightest,confirmActionColor:DEFAULT_COLORS.error_dark,confirmCancelColor:DEFAULT_COLORS.neutral_lightest,confirmCancelHoverBackground:DEFAULT_COLORS.error_darkest,confirmCancelHoverColor:DEFAULT_COLORS.neutral_lightest},panel:{borderColor:DEFAULT_COLORS.transparent}},checkbox:{box:{borderColor:DEFAULT_COLORS.neutral_darker,size:22,borderRadius:7},check:{iconColor:DEFAULT_COLORS.neutral_lightest}},apFontFamily:DEFAULT_FONTS.poppins,apPrimaryColor:DEFAULT_COLORS.primary_base,apButtonPrimaryBgColor:DEFAULT_COLORS.primary_base,apButtonPrimaryTxtColor:DEFAULT_COLORS.neutral_darkest,apButtonSecondaryBgColor:DEFAULT_COLORS.primary_darkest,apButtonSecondaryTxtColor:DEFAULT_COLORS.primary_base,apButtonTextTxtColor:DEFAULT_COLORS.primary_base,apButtonDisableBgColor:DEFAULT_COLORS.neutral_base,apButtonDisableTextColor:DEFAULT_COLORS.neutral_dark},LIGHT_THEME={backgroundColor:DEFAULT_COLORS.surface_light,fontFamily:DEFAULT_FONTS.poppins,textColor:DEFAULT_COLORS.neutral_darkest,fontScale:FONT_SIZE_MAP.md,primaryColor:DEFAULT_COLORS.primary_base,secondaryColor:DEFAULT_COLORS.primary_lightest,textPrimaryColor:DEFAULT_COLORS.neutral_darkest,textSecondaryColor:DEFAULT_COLORS.neutral_dark,width:"100%",paddingWrapper:"12px",borderRadiusWrapper:"4px",messages:{success:{textColor:DEFAULT_COLORS.success_darker},error:{textColor:DEFAULT_COLORS.error_dark}},input:{normal:{textColor:DEFAULT_COLORS.neutral_darkest,backgroundColor:DEFAULT_COLORS.neutral_lighter,hintTextColor:DEFAULT_COLORS.neutral_dark,placeholderTextColor:DEFAULT_COLORS.neutral_dark,borderColor:DEFAULT_COLORS.transparent,borderRadius:8,borderWidth:3},focus:{textColor:DEFAULT_COLORS.neutral_darkest,backgroundColor:DEFAULT_COLORS.neutral_lighter,hintTextColor:DEFAULT_COLORS.neutral_dark,placeholderTextColor:DEFAULT_COLORS.neutral_dark,borderColor:DEFAULT_COLORS.primary_base,borderRadius:8,borderWidth:3},disabled:{textColor:DEFAULT_COLORS.neutral_dark,backgroundColor:DEFAULT_COLORS.neutral_base,hintTextColor:DEFAULT_COLORS.neutral_dark,placeholderTextColor:DEFAULT_COLORS.neutral_darker,borderColor:DEFAULT_COLORS.neutral_base,borderRadius:8,borderWidth:3},error:{textColor:DEFAULT_COLORS.neutral_darkest,backgroundColor:DEFAULT_COLORS.neutral_lighter,hintTextColor:DEFAULT_COLORS.error_dark,placeholderTextColor:DEFAULT_COLORS.neutral_dark,borderColor:DEFAULT_COLORS.error_dark,borderRadius:8,borderWidth:3}},button:{small:{borderRadius:4},medium:{borderRadius:8},large:{borderRadius:8},primary:{textColor:DEFAULT_COLORS.neutral_darkest,backgroundColor:DEFAULT_COLORS.primary_base,borderColor:DEFAULT_COLORS.transparent,borderWidth:0},secondary:{textColor:DEFAULT_COLORS.primary_darker,backgroundColor:DEFAULT_COLORS.primary_lightest,borderColor:DEFAULT_COLORS.transparent,borderWidth:0},text:{textColor:DEFAULT_COLORS.primary_base,backgroundColor:"unset",borderColor:DEFAULT_COLORS.primary_base,borderWidth:1},disabled:{textColor:DEFAULT_COLORS.neutral_dark,backgroundColor:DEFAULT_COLORS.neutral_base,borderColor:DEFAULT_COLORS.transparent,borderWidth:0}},divider:{color:DEFAULT_COLORS.neutral_base,variant:"dashed",size:1},card:{padding:12,backgroundColor:DEFAULT_COLORS.neutral_light,borderWidth:0,borderStyle:"none",borderColor:DEFAULT_COLORS.transparent,borderRadius:16},qrCode:{padding:16,backgroundColor:DEFAULT_COLORS.neutral_lightest,borderWidth:1,borderStyle:"solid",borderColor:DEFAULT_COLORS.primary_base,borderRadius:16},badge:{default:{padding:"2px 6px",textColor:DEFAULT_COLORS.neutral_dark,backgroundColor:DEFAULT_COLORS.neutral_light,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},highlight:{padding:"2px 6px",textColor:DEFAULT_COLORS.primary_dark,backgroundColor:DEFAULT_COLORS.primary_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},error:{padding:"2px 6px",textColor:DEFAULT_COLORS.error_dark,backgroundColor:DEFAULT_COLORS.error_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},success:{padding:"2px 6px",textColor:DEFAULT_COLORS.success_dark,backgroundColor:DEFAULT_COLORS.success_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},warning:{padding:"2px 6px",textColor:DEFAULT_COLORS.warning_darker,backgroundColor:DEFAULT_COLORS.warning_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4}},timer:{padding:"4px 8px",textColor:DEFAULT_COLORS.error_dark,backgroundColor:DEFAULT_COLORS.warning_light,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:12},cardTabs:{activeTextColor:DEFAULT_COLORS.neutral_darkest,inactiveTextColor:DEFAULT_COLORS.neutral_dark,indicatorColor:DEFAULT_COLORS.neutral_darkest,borderColor:DEFAULT_COLORS.neutral_base},cardTabsSegmented:{trackBackgroundColor:DEFAULT_COLORS.neutral_base,trackBorderRadius:12,activeBackgroundColor:DEFAULT_COLORS.surface_light,activeTextColor:DEFAULT_COLORS.neutral_darkest,inactiveTextColor:DEFAULT_COLORS.neutral_dark,itemBorderRadius:10},savedCardSelector:{row:{borderColor:DEFAULT_COLORS.neutral_base,borderWidth:1,borderRadius:12},radio:{color:DEFAULT_COLORS.neutral_base,activeColor:DEFAULT_COLORS.neutral_darkest},cardNumber:{textColor:DEFAULT_COLORS.neutral_darkest},cardMeta:{textColor:DEFAULT_COLORS.neutral_dark},deleteButton:{color:DEFAULT_COLORS.neutral_dark,hoverColor:DEFAULT_COLORS.error_dark,hoverBackgroundColor:DEFAULT_COLORS.error_lightest,confirmBackground:DEFAULT_COLORS.error_darker,confirmTextColor:DEFAULT_COLORS.neutral_lightest,confirmActionBackground:DEFAULT_COLORS.neutral_lightest,confirmActionColor:DEFAULT_COLORS.error_darker,confirmCancelColor:DEFAULT_COLORS.neutral_lightest,confirmCancelHoverBackground:DEFAULT_COLORS.error_dark,confirmCancelHoverColor:DEFAULT_COLORS.neutral_lightest},panel:{borderColor:DEFAULT_COLORS.transparent}},checkbox:{box:{borderColor:DEFAULT_COLORS.neutral_base,size:22,borderRadius:7},check:{iconColor:DEFAULT_COLORS.neutral_lightest}},apFontFamily:DEFAULT_FONTS.poppins,apPrimaryColor:DEFAULT_COLORS.primary_base,apButtonPrimaryBgColor:DEFAULT_COLORS.primary_base,apButtonPrimaryTxtColor:DEFAULT_COLORS.neutral_darkest,apButtonSecondaryBgColor:DEFAULT_COLORS.primary_lightest,apButtonSecondaryTxtColor:DEFAULT_COLORS.primary_dark,apButtonTextTxtColor:DEFAULT_COLORS.primary_dark,apButtonDisableBgColor:DEFAULT_COLORS.neutral_base,apButtonDisableTextColor:DEFAULT_COLORS.neutral_dark},CONFIG_ENVIRONMENT_VALUES=["production","sandbox"],CONFIG_THEME_VALUES=["light","dark"],CONFIG_LANGUAGE_VALUES=["en","pt","es"],CONFIG_CURRENCY_MODE_VALUES=["iso","symbol"],CONFIG_FONT_SCALE_VALUES=["sm","md","lg"],copyToClipboard=async ee=>navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(ee).catch(re=>{console.error("Error to copy:",re)}):new Promise((re,te)=>{const ne=document.createElement("textarea");ne.value=ee,ne.style.position="fixed",document.body.appendChild(ne),ne.focus(),ne.select();try{document.execCommand("copy")?re():te(new Error("Failed to copy text using execCommand"))}catch(ie){te(ie)}finally{document.body.removeChild(ne)}}),shareInfo=async(ee,re,te)=>{if(navigator.share)try{const ne={title:ee,text:re,...te&&{url:te}};await navigator.share(ne)}catch(ne){console.error("Failed to share information:",ne)}else{console.warn("Web Share API not supported");const ne=`${ee}
|
|
1
|
+
(function(ii,Zr){typeof exports=="object"&&typeof module<"u"?Zr(exports):typeof define=="function"&&define.amd?define(["exports"],Zr):(ii=typeof globalThis<"u"?globalThis:ii||self,Zr(ii.AstroPay={}))})(this,(function(exports){"use strict";var Ua=Object.defineProperty;var Fa=(ii,Zr,Ri)=>Zr in ii?Ua(ii,Zr,{enumerable:!0,configurable:!0,writable:!0,value:Ri}):ii[Zr]=Ri;var Ie=(ii,Zr,Ri)=>Fa(ii,typeof Zr!="symbol"?Zr+"":Zr,Ri);const FONT_SIZES={xxsm:10,xsm:12,sm:14,base:16,md:20,lg:26,xl:32,xxl:40},FONT_SIZE_MAP={sm:{xSmall:FONT_SIZES.xxsm,small:FONT_SIZES.xsm,medium:FONT_SIZES.sm,base:FONT_SIZES.base,large:FONT_SIZES.md,xLarge:FONT_SIZES.lg},md:{xSmall:FONT_SIZES.xsm,small:FONT_SIZES.sm,medium:FONT_SIZES.base,base:FONT_SIZES.md,large:FONT_SIZES.lg,xLarge:FONT_SIZES.xl},lg:{xSmall:FONT_SIZES.sm,small:FONT_SIZES.base,medium:FONT_SIZES.md,base:FONT_SIZES.lg,large:FONT_SIZES.xl,xLarge:FONT_SIZES.xxl}},DEFAULT_COLORS={transparent:"transparent",surface_dark:"#041311",surface_light:"#FFFFFF",neutral_lightest:"#FFFFFF",neutral_light:"#F3F6F6",neutral_lighter:"#ECF1F0",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_darker:"#D61D00",error_dark:"#A31600",error_darkest:"#700F00",success_lightest:"#F0FAEB",success_light:"#D3EFC2",success_base:"#7CD049",success_darker:"#62B52F",success_dark:"#4D8E25",success_darkest:"#37651A"},DEFAULT_FONTS={poppins:"Poppins"},loadFonts=async()=>{try{const ee=document.createElement("link");ee.href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap",ee.rel="stylesheet",document.head.appendChild(ee),await document.fonts.ready}catch(ee){console.error("Font loading failed:",ee)}},DARK_THEME={backgroundColor:DEFAULT_COLORS.surface_dark,fontFamily:DEFAULT_FONTS.poppins,textColor:DEFAULT_COLORS.neutral_light,fontScale:FONT_SIZE_MAP.md,primaryColor:DEFAULT_COLORS.primary_base,secondaryColor:DEFAULT_COLORS.primary_darkest,textPrimaryColor:DEFAULT_COLORS.neutral_lightest,textSecondaryColor:DEFAULT_COLORS.neutral_base,width:"100%",paddingWrapper:"12px",borderRadiusWrapper:"4px",messages:{success:{textColor:DEFAULT_COLORS.success_base},error:{textColor:DEFAULT_COLORS.error_lighter}},input:{normal:{textColor:DEFAULT_COLORS.neutral_lightest,backgroundColor:DEFAULT_COLORS.neutral_darkest,hintTextColor:DEFAULT_COLORS.neutral_darker,placeholderTextColor:DEFAULT_COLORS.neutral_dark,borderColor:DEFAULT_COLORS.transparent,borderRadius:8,borderWidth:3},focus:{textColor:DEFAULT_COLORS.neutral_lightest,backgroundColor:DEFAULT_COLORS.neutral_darkest,hintTextColor:DEFAULT_COLORS.neutral_darker,placeholderTextColor:DEFAULT_COLORS.neutral_darker,borderColor:DEFAULT_COLORS.primary_base,borderRadius:8,borderWidth:3},disabled:{textColor:DEFAULT_COLORS.neutral_darker,backgroundColor:DEFAULT_COLORS.neutral_dark,hintTextColor:DEFAULT_COLORS.neutral_darker,placeholderTextColor:DEFAULT_COLORS.neutral_base,borderColor:DEFAULT_COLORS.neutral_dark,borderRadius:8,borderWidth:3},error:{textColor:DEFAULT_COLORS.neutral_lightest,backgroundColor:DEFAULT_COLORS.neutral_darkest,hintTextColor:DEFAULT_COLORS.error_base,placeholderTextColor:DEFAULT_COLORS.neutral_darker,borderColor:DEFAULT_COLORS.error_base,borderRadius:8,borderWidth:3}},button:{small:{borderRadius:4},medium:{borderRadius:8},large:{borderRadius:8},primary:{textColor:DEFAULT_COLORS.neutral_lightest,backgroundColor:DEFAULT_COLORS.primary_base,borderColor:DEFAULT_COLORS.transparent,borderWidth:0},secondary:{textColor:DEFAULT_COLORS.primary_lightest,backgroundColor:DEFAULT_COLORS.primary_darkest,borderColor:DEFAULT_COLORS.transparent,borderWidth:0},text:{textColor:DEFAULT_COLORS.primary_base,backgroundColor:"unset",borderColor:DEFAULT_COLORS.primary_base,borderWidth:1},disabled:{textColor:DEFAULT_COLORS.neutral_dark,backgroundColor:DEFAULT_COLORS.neutral_base,borderColor:DEFAULT_COLORS.transparent,borderWidth:0}},divider:{color:DEFAULT_COLORS.neutral_darker,variant:"dashed",size:1},card:{padding:12,backgroundColor:DEFAULT_COLORS.neutral_darkest,borderWidth:0,borderStyle:"none",borderColor:DEFAULT_COLORS.transparent,borderRadius:16},qrCode:{padding:16,backgroundColor:DEFAULT_COLORS.neutral_darkest,borderWidth:1,borderStyle:"solid",borderColor:DEFAULT_COLORS.primary_base,borderRadius:16},badge:{default:{padding:"2px 6px",textColor:DEFAULT_COLORS.neutral_light,backgroundColor:DEFAULT_COLORS.neutral_dark,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},highlight:{padding:"2px 6px",textColor:DEFAULT_COLORS.primary_light,backgroundColor:DEFAULT_COLORS.primary_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},error:{padding:"2px 6px",textColor:DEFAULT_COLORS.error_light,backgroundColor:DEFAULT_COLORS.error_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},success:{padding:"2px 6px",textColor:DEFAULT_COLORS.success_light,backgroundColor:DEFAULT_COLORS.success_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},warning:{padding:"2px 6px",textColor:DEFAULT_COLORS.warning_light,backgroundColor:DEFAULT_COLORS.warning_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4}},timer:{padding:"4px 8px",textColor:DEFAULT_COLORS.error_lightest,backgroundColor:DEFAULT_COLORS.warning_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:12},cardTabs:{activeTextColor:DEFAULT_COLORS.neutral_lightest,inactiveTextColor:DEFAULT_COLORS.neutral_base,indicatorColor:DEFAULT_COLORS.neutral_lightest,borderColor:DEFAULT_COLORS.neutral_darker},cardTabsSegmented:{trackBackgroundColor:DEFAULT_COLORS.neutral_base,trackBorderRadius:12,activeBackgroundColor:DEFAULT_COLORS.surface_dark,activeTextColor:DEFAULT_COLORS.neutral_lightest,inactiveTextColor:DEFAULT_COLORS.neutral_dark,itemBorderRadius:10},savedCardSelector:{row:{borderColor:DEFAULT_COLORS.neutral_darker,borderWidth:1,borderRadius:12},radio:{color:DEFAULT_COLORS.neutral_darker,activeColor:DEFAULT_COLORS.neutral_light},cardNumber:{textColor:DEFAULT_COLORS.neutral_light},cardMeta:{textColor:DEFAULT_COLORS.neutral_base},deleteButton:{color:DEFAULT_COLORS.neutral_base,hoverColor:DEFAULT_COLORS.error_light,hoverBackgroundColor:DEFAULT_COLORS.error_darkest,confirmBackground:DEFAULT_COLORS.error_dark,confirmTextColor:DEFAULT_COLORS.neutral_lightest,confirmActionBackground:DEFAULT_COLORS.neutral_lightest,confirmActionColor:DEFAULT_COLORS.error_dark,confirmCancelColor:DEFAULT_COLORS.neutral_lightest,confirmCancelHoverBackground:DEFAULT_COLORS.error_darkest,confirmCancelHoverColor:DEFAULT_COLORS.neutral_lightest},panel:{borderColor:DEFAULT_COLORS.transparent}},checkbox:{box:{borderColor:DEFAULT_COLORS.neutral_darker,size:22,borderRadius:7},check:{iconColor:DEFAULT_COLORS.neutral_lightest}},apFontFamily:DEFAULT_FONTS.poppins,apPrimaryColor:DEFAULT_COLORS.primary_base,apButtonPrimaryBgColor:DEFAULT_COLORS.primary_base,apButtonPrimaryTxtColor:DEFAULT_COLORS.neutral_darkest,apButtonSecondaryBgColor:DEFAULT_COLORS.primary_darkest,apButtonSecondaryTxtColor:DEFAULT_COLORS.primary_base,apButtonTextTxtColor:DEFAULT_COLORS.primary_base,apButtonDisableBgColor:DEFAULT_COLORS.neutral_base,apButtonDisableTextColor:DEFAULT_COLORS.neutral_dark},LIGHT_THEME={backgroundColor:DEFAULT_COLORS.surface_light,fontFamily:DEFAULT_FONTS.poppins,textColor:DEFAULT_COLORS.neutral_darkest,fontScale:FONT_SIZE_MAP.md,primaryColor:DEFAULT_COLORS.primary_base,secondaryColor:DEFAULT_COLORS.primary_lightest,textPrimaryColor:DEFAULT_COLORS.neutral_darkest,textSecondaryColor:DEFAULT_COLORS.neutral_dark,width:"100%",paddingWrapper:"12px",borderRadiusWrapper:"4px",messages:{success:{textColor:DEFAULT_COLORS.success_darker},error:{textColor:DEFAULT_COLORS.error_dark}},input:{normal:{textColor:DEFAULT_COLORS.neutral_darkest,backgroundColor:DEFAULT_COLORS.neutral_lighter,hintTextColor:DEFAULT_COLORS.neutral_dark,placeholderTextColor:DEFAULT_COLORS.neutral_dark,borderColor:DEFAULT_COLORS.transparent,borderRadius:8,borderWidth:3},focus:{textColor:DEFAULT_COLORS.neutral_darkest,backgroundColor:DEFAULT_COLORS.neutral_lighter,hintTextColor:DEFAULT_COLORS.neutral_dark,placeholderTextColor:DEFAULT_COLORS.neutral_dark,borderColor:DEFAULT_COLORS.primary_base,borderRadius:8,borderWidth:3},disabled:{textColor:DEFAULT_COLORS.neutral_dark,backgroundColor:DEFAULT_COLORS.neutral_base,hintTextColor:DEFAULT_COLORS.neutral_dark,placeholderTextColor:DEFAULT_COLORS.neutral_darker,borderColor:DEFAULT_COLORS.neutral_base,borderRadius:8,borderWidth:3},error:{textColor:DEFAULT_COLORS.neutral_darkest,backgroundColor:DEFAULT_COLORS.neutral_lighter,hintTextColor:DEFAULT_COLORS.error_dark,placeholderTextColor:DEFAULT_COLORS.neutral_dark,borderColor:DEFAULT_COLORS.error_dark,borderRadius:8,borderWidth:3}},button:{small:{borderRadius:4},medium:{borderRadius:8},large:{borderRadius:8},primary:{textColor:DEFAULT_COLORS.neutral_darkest,backgroundColor:DEFAULT_COLORS.primary_base,borderColor:DEFAULT_COLORS.transparent,borderWidth:0},secondary:{textColor:DEFAULT_COLORS.primary_darker,backgroundColor:DEFAULT_COLORS.primary_lightest,borderColor:DEFAULT_COLORS.transparent,borderWidth:0},text:{textColor:DEFAULT_COLORS.primary_base,backgroundColor:"unset",borderColor:DEFAULT_COLORS.primary_base,borderWidth:1},disabled:{textColor:DEFAULT_COLORS.neutral_dark,backgroundColor:DEFAULT_COLORS.neutral_base,borderColor:DEFAULT_COLORS.transparent,borderWidth:0}},divider:{color:DEFAULT_COLORS.neutral_base,variant:"dashed",size:1},card:{padding:12,backgroundColor:DEFAULT_COLORS.neutral_light,borderWidth:0,borderStyle:"none",borderColor:DEFAULT_COLORS.transparent,borderRadius:16},qrCode:{padding:16,backgroundColor:DEFAULT_COLORS.neutral_lightest,borderWidth:1,borderStyle:"solid",borderColor:DEFAULT_COLORS.primary_base,borderRadius:16},badge:{default:{padding:"2px 6px",textColor:DEFAULT_COLORS.neutral_dark,backgroundColor:DEFAULT_COLORS.neutral_light,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},highlight:{padding:"2px 6px",textColor:DEFAULT_COLORS.primary_dark,backgroundColor:DEFAULT_COLORS.primary_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},error:{padding:"2px 6px",textColor:DEFAULT_COLORS.error_dark,backgroundColor:DEFAULT_COLORS.error_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},success:{padding:"2px 6px",textColor:DEFAULT_COLORS.success_dark,backgroundColor:DEFAULT_COLORS.success_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},warning:{padding:"2px 6px",textColor:DEFAULT_COLORS.warning_darker,backgroundColor:DEFAULT_COLORS.warning_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4}},timer:{padding:"4px 8px",textColor:DEFAULT_COLORS.error_dark,backgroundColor:DEFAULT_COLORS.warning_light,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:12},cardTabs:{activeTextColor:DEFAULT_COLORS.neutral_darkest,inactiveTextColor:DEFAULT_COLORS.neutral_dark,indicatorColor:DEFAULT_COLORS.neutral_darkest,borderColor:DEFAULT_COLORS.neutral_base},cardTabsSegmented:{trackBackgroundColor:DEFAULT_COLORS.neutral_base,trackBorderRadius:12,activeBackgroundColor:DEFAULT_COLORS.surface_light,activeTextColor:DEFAULT_COLORS.neutral_darkest,inactiveTextColor:DEFAULT_COLORS.neutral_dark,itemBorderRadius:10},savedCardSelector:{row:{borderColor:DEFAULT_COLORS.neutral_base,borderWidth:1,borderRadius:12},radio:{color:DEFAULT_COLORS.neutral_base,activeColor:DEFAULT_COLORS.neutral_darkest},cardNumber:{textColor:DEFAULT_COLORS.neutral_darkest},cardMeta:{textColor:DEFAULT_COLORS.neutral_dark},deleteButton:{color:DEFAULT_COLORS.neutral_dark,hoverColor:DEFAULT_COLORS.error_dark,hoverBackgroundColor:DEFAULT_COLORS.error_lightest,confirmBackground:DEFAULT_COLORS.error_darker,confirmTextColor:DEFAULT_COLORS.neutral_lightest,confirmActionBackground:DEFAULT_COLORS.neutral_lightest,confirmActionColor:DEFAULT_COLORS.error_darker,confirmCancelColor:DEFAULT_COLORS.neutral_lightest,confirmCancelHoverBackground:DEFAULT_COLORS.error_dark,confirmCancelHoverColor:DEFAULT_COLORS.neutral_lightest},panel:{borderColor:DEFAULT_COLORS.transparent}},checkbox:{box:{borderColor:DEFAULT_COLORS.neutral_base,size:22,borderRadius:7},check:{iconColor:DEFAULT_COLORS.neutral_lightest}},apFontFamily:DEFAULT_FONTS.poppins,apPrimaryColor:DEFAULT_COLORS.primary_base,apButtonPrimaryBgColor:DEFAULT_COLORS.primary_base,apButtonPrimaryTxtColor:DEFAULT_COLORS.neutral_darkest,apButtonSecondaryBgColor:DEFAULT_COLORS.primary_lightest,apButtonSecondaryTxtColor:DEFAULT_COLORS.primary_dark,apButtonTextTxtColor:DEFAULT_COLORS.primary_dark,apButtonDisableBgColor:DEFAULT_COLORS.neutral_base,apButtonDisableTextColor:DEFAULT_COLORS.neutral_dark},CONFIG_ENVIRONMENT_VALUES=["production","sandbox"],CONFIG_THEME_VALUES=["light","dark"],CONFIG_LANGUAGE_VALUES=["en","pt","es"],CONFIG_CURRENCY_MODE_VALUES=["iso","symbol"],CONFIG_FONT_SCALE_VALUES=["sm","md","lg"],copyToClipboard=async ee=>navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(ee).catch(re=>{console.error("Error to copy:",re)}):new Promise((re,te)=>{const ne=document.createElement("textarea");ne.value=ee,ne.style.position="fixed",document.body.appendChild(ne),ne.focus(),ne.select();try{document.execCommand("copy")?re():te(new Error("Failed to copy text using execCommand"))}catch(ie){te(ie)}finally{document.body.removeChild(ne)}}),shareInfo=async(ee,re,te)=>{if(navigator.share)try{const ne={title:ee,text:re,...te&&{url:te}};await navigator.share(ne)}catch(ne){console.error("Failed to share information:",ne)}else{console.warn("Web Share API not supported");const ne=`${ee}
|
|
2
2
|
${re}${te?`
|
|
3
3
|
${te}`:""}`;await copyToClipboard(ne)}};function validateValue(ee,re,te){return re.includes(ee)?ee:te}function debounce(ee,re){let te=null;const ne=((...ie)=>{te!==null&&clearTimeout(te),te=setTimeout(()=>{te=null,ee(...ie)},re)});return ne.cancel=()=>{te!==null&&(clearTimeout(te),te=null)},ne}const NON_BREAKING_SPACE=" ",toCamelCase$1=ee=>ee.toLowerCase().replace(/(?:^|[^a-zA-Z0-9]+)([a-zA-Z0-9])/g,(re,te,ne)=>ne===0?te.toLowerCase():te.toUpperCase()),toSnakeCase=ee=>ee.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9]+/g,"_").toLowerCase(),encodeData=ee=>{const re=JSON.stringify(ee);return btoa(re)},applyMask=(ee,re)=>{if(!re)return ee;const te=re.split(""),ne=ee.replace(/[^A-Za-z0-9]/g,"");let ie="",oe=0,se=!1;for(const ae of te){if(se){ie+=ae,se=!1;continue}if(ae==="\\"){se=!0;continue}if(oe>=ne.length)break;switch(ae){case"#":if(/\d/.test(ne[oe]))ie+=ne[oe++];else{oe++;continue}break;case"A":if(/[A-Za-z]/.test(ne[oe]))ie+=ne[oe++];else{oe++;continue}break;case"*":if(/[A-Za-z0-9]/.test(ne[oe]))ie+=ne[oe++];else{oe++;continue}break;default:ie+=ae,ne[oe]===ae&&oe++;break}}return ie},removeMask=(ee,re)=>{if(!re)return ee;const te=re.split(""),ne=ee.split("");let ie="",oe=!1,se=0;for(const ae of te){if(oe){oe=!1,ne[se]===ae&&se++;continue}if(ae==="\\"){oe=!0;continue}if(se>=ne.length)break;switch(ae){case"#":/\d/.test(ne[se])&&(ie+=ne[se]),se++;break;case"A":/[A-Za-z]/.test(ne[se])&&(ie+=ne[se]),se++;break;case"*":/[A-Za-z0-9]/.test(ne[se])&&(ie+=ne[se]),se++;break;default:ne[se]===ae&&se++;break}}return ie},uuid=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,ee=>{const re=Math.random()*16|0;return(ee==="x"?re:re&3||8).toString(16)}),formatPhoneNumber=ee=>ee?ee.startsWith("+")?ee:`+${ee}`:"",isArray$3=Array.isArray,isObject$1=ee=>ee!==null&&typeof ee=="object"&&!isArray$3(ee),snakeCaseToCamelCaseObject=ee=>Object.entries(ee).reduce((re,[te,ne])=>({...re,[toCamelCase$1(te)]:isObject$1(ne)?snakeCaseToCamelCaseObject(ne):isArray$3(ne)?ne.map(ie=>isObject$1(ie)?snakeCaseToCamelCaseObject(ie):ie):ne}),{}),snakeCaseToCamelCaseArray=ee=>{if(isArray$3(ee))return ee.map(re=>isObject$1(re)?snakeCaseToCamelCaseObject(re):re);throw new Error("Input is not an array")},camelCaseToSnakeCaseObject=ee=>Object.entries(ee).reduce((re,[te,ne])=>({...re,[toSnakeCase(te)]:isObject$1(ne)?camelCaseToSnakeCaseObject(ne):isArray$3(ne)?ne.map(ie=>isObject$1(ie)?camelCaseToSnakeCaseObject(ie):ie):ne}),{}),camelCaseToSnakeCaseArray=ee=>{if(isArray$3(ee))return ee.map(re=>isObject$1(re)?camelCaseToSnakeCaseObject(re):re);throw new Error("Input is not an array")},convertData=(ee,re)=>isArray$3(ee)?re==="snake_case-to-camelCase"?snakeCaseToCamelCaseArray(ee):camelCaseToSnakeCaseArray(ee):isObject$1(ee)?re==="snake_case-to-camelCase"?snakeCaseToCamelCaseObject(ee):camelCaseToSnakeCaseObject(ee):ee,deepMerge=(ee,re)=>{if(!re)return ee;const te={...ee};for(const ne in re)if(Object.prototype.hasOwnProperty.call(re,ne)){const ie=re[ne],oe=ee[ne];isObject$1(ie)&&isObject$1(oe)?te[ne]=deepMerge(oe,ie):ie!==void 0&&(te[ne]=ie)}return te},defaultThemes={light:LIGHT_THEME,dark:DARK_THEME},ii=class ii{static init(re){const te=validateValue(re==null?void 0:re.theme,CONFIG_THEME_VALUES,"light");ii.currentTheme=te;const ne=ii.processStyles(re==null?void 0:re.styles);ii.styles=deepMerge(defaultThemes[te],ne)}static getStyles(){return ii.styles}static getTheme(){return ii.currentTheme}static getFontScale(){return this.getStyles().fontScale}static processStyles(re){if(!re)return;const te={...re};return typeof re.fontScale=="string"&&CONFIG_FONT_SCALE_VALUES.includes(re.fontScale)&&(te.fontScale=FONT_SIZE_MAP[re.fontScale]),te}};Ie(ii,"currentTheme","light"),Ie(ii,"styles",LIGHT_THEME);let ThemeManager=ii;class Component{constructor({tag:re,elementId:te,styles:ne}){Ie(this,"element");if(this.element=document.createElement(re),te&&this.element.setAttribute("id",te),ne){const ie=ThemeManager.getStyles(),oe=ne(ie);this.element.className=oe}}addStyleClass(re){this.element.classList.add(re)}render(re){re instanceof Component?re.element.appendChild(this.element):re.appendChild(this.element)}destroy(){this.element.parentElement&&this.element.parentElement.removeChild(this.element)}}function sheetForTag(ee){if(ee.sheet)return ee.sheet;for(var re=0;re<document.styleSheets.length;re++)if(document.styleSheets[re].ownerNode===ee)return document.styleSheets[re]}function createStyleElement(ee){var re=document.createElement("style");return re.setAttribute("data-emotion",ee.key),ee.nonce!==void 0&&re.setAttribute("nonce",ee.nonce),re.appendChild(document.createTextNode("")),re.setAttribute("data-s",""),re}var StyleSheet=(function(){function ee(te){var ne=this;this._insertTag=function(ie){var oe;ne.tags.length===0?ne.insertionPoint?oe=ne.insertionPoint.nextSibling:ne.prepend?oe=ne.container.firstChild:oe=ne.before:oe=ne.tags[ne.tags.length-1].nextSibling,ne.container.insertBefore(ie,oe),ne.tags.push(ie)},this.isSpeedy=te.speedy===void 0?!0:te.speedy,this.tags=[],this.ctr=0,this.nonce=te.nonce,this.key=te.key,this.container=te.container,this.prepend=te.prepend,this.insertionPoint=te.insertionPoint,this.before=null}var re=ee.prototype;return re.hydrate=function(ne){ne.forEach(this._insertTag)},re.insert=function(ne){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(createStyleElement(this));var ie=this.tags[this.tags.length-1];if(this.isSpeedy){var oe=sheetForTag(ie);try{oe.insertRule(ne,oe.cssRules.length)}catch{}}else ie.appendChild(document.createTextNode(ne));this.ctr++},re.flush=function(){this.tags.forEach(function(ne){var ie;return(ie=ne.parentNode)==null?void 0:ie.removeChild(ne)}),this.tags=[],this.ctr=0},ee})(),MS="-ms-",MOZ="-moz-",WEBKIT="-webkit-",COMMENT="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs=Math.abs,from$1=String.fromCharCode,assign=Object.assign;function hash(ee,re){return charat(ee,0)^45?(((re<<2^charat(ee,0))<<2^charat(ee,1))<<2^charat(ee,2))<<2^charat(ee,3):0}function trim$1(ee){return ee.trim()}function match(ee,re){return(ee=re.exec(ee))?ee[0]:ee}function replace(ee,re,te){return ee.replace(re,te)}function indexof(ee,re){return ee.indexOf(re)}function charat(ee,re){return ee.charCodeAt(re)|0}function substr(ee,re,te){return ee.slice(re,te)}function strlen(ee){return ee.length}function sizeof(ee){return ee.length}function append(ee,re){return re.push(ee),ee}function combine$1(ee,re){return ee.map(re).join("")}var line=1,column=1,length=0,position=0,character=0,characters="";function node(ee,re,te,ne,ie,oe,se){return{value:ee,root:re,parent:te,type:ne,props:ie,children:oe,line,column,length:se,return:""}}function copy$1(ee,re){return assign(node("",null,null,"",null,null,0),ee,{length:-ee.length},re)}function char(){return character}function prev(){return character=position>0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next$1(){return character=position<length?charat(characters,position++):0,column++,character===10&&(column=1,line++),character}function peek(){return charat(characters,position)}function caret(){return position}function slice(ee,re){return substr(characters,ee,re)}function token(ee){switch(ee){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 alloc(ee){return line=column=1,length=strlen(characters=ee),position=0,[]}function dealloc(ee){return characters="",ee}function delimit(ee){return trim$1(slice(position-1,delimiter(ee===91?ee+2:ee===40?ee+1:ee)))}function whitespace(ee){for(;(character=peek())&&character<33;)next$1();return token(ee)>2||token(character)>3?"":" "}function escaping(ee,re){for(;--re&&next$1()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(ee,caret()+(re<6&&peek()==32&&next$1()==32))}function delimiter(ee){for(;next$1();)switch(character){case ee:return position;case 34:case 39:ee!==34&&ee!==39&&delimiter(character);break;case 40:ee===41&&delimiter(ee);break;case 92:next$1();break}return position}function commenter(ee,re){for(;next$1()&&ee+character!==57;)if(ee+character===84&&peek()===47)break;return"/*"+slice(re,position-1)+"*"+from$1(ee===47?ee:next$1())}function identifier(ee){for(;!token(peek());)next$1();return slice(ee,position)}function compile(ee){return dealloc(parse("",null,null,null,[""],ee=alloc(ee),0,[0],ee))}function parse(ee,re,te,ne,ie,oe,se,ae,ce){for(var ue=0,le=0,de=se,fe=0,he=0,pe=0,ge=1,me=1,ye=1,ve=0,be="",_e=ie,Ce=oe,Te=ne,Se=be;me;)switch(pe=ve,ve=next$1()){case 40:if(pe!=108&&charat(Se,de-1)==58){indexof(Se+=replace(delimit(ve),"&","&\f"),"&\f")!=-1&&(ye=-1);break}case 34:case 39:case 91:Se+=delimit(ve);break;case 9:case 10:case 13:case 32:Se+=whitespace(pe);break;case 92:Se+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next$1(),caret()),re,te),ce);break;default:Se+="/"}break;case 123*ge:ae[ue++]=strlen(Se)*ye;case 125*ge:case 59:case 0:switch(ve){case 0:case 125:me=0;case 59+le:ye==-1&&(Se=replace(Se,/\f/g,"")),he>0&&strlen(Se)-de&&append(he>32?declaration(Se+";",ne,te,de-1):declaration(replace(Se," ","")+";",ne,te,de-2),ce);break;case 59:Se+=";";default:if(append(Te=ruleset(Se,re,te,ue,le,ie,ae,be,_e=[],Ce=[],de),oe),ve===123)if(le===0)parse(Se,re,Te,Te,_e,oe,de,ae,Ce);else switch(fe===99&&charat(Se,3)===110?100:fe){case 100:case 108:case 109:case 115:parse(ee,Te,Te,ne&&append(ruleset(ee,Te,Te,0,0,ie,ae,be,ie,_e=[],de),Ce),ie,Ce,de,ae,ne?_e:Ce);break;default:parse(Se,Te,Te,Te,[""],Ce,0,ae,Ce)}}ue=le=he=0,ge=ye=1,be=Se="",de=se;break;case 58:de=1+strlen(Se),he=pe;default:if(ge<1){if(ve==123)--ge;else if(ve==125&&ge++==0&&prev()==125)continue}switch(Se+=from$1(ve),ve*ge){case 38:ye=le>0?1:(Se+="\f",-1);break;case 44:ae[ue++]=(strlen(Se)-1)*ye,ye=1;break;case 64:peek()===45&&(Se+=delimit(next$1())),fe=peek(),le=de=strlen(be=Se+=identifier(caret())),ve++;break;case 45:pe===45&&strlen(Se)==2&&(ge=0)}}return oe}function ruleset(ee,re,te,ne,ie,oe,se,ae,ce,ue,le){for(var de=ie-1,fe=ie===0?oe:[""],he=sizeof(fe),pe=0,ge=0,me=0;pe<ne;++pe)for(var ye=0,ve=substr(ee,de+1,de=abs(ge=se[pe])),be=ee;ye<he;++ye)(be=trim$1(ge>0?fe[ye]+" "+ve:replace(ve,/&\f/g,fe[ye])))&&(ce[me++]=be);return node(ee,re,te,ie===0?RULESET:ae,ce,ue,le)}function comment(ee,re,te){return node(ee,re,te,COMMENT,from$1(char()),substr(ee,2,-2),0)}function declaration(ee,re,te,ne){return node(ee,re,te,DECLARATION,substr(ee,0,ne),substr(ee,ne+1,-1),ne)}function serialize(ee,re){for(var te="",ne=sizeof(ee),ie=0;ie<ne;ie++)te+=re(ee[ie],ie,ee,re)||"";return te}function stringify(ee,re,te,ne){switch(ee.type){case LAYER:if(ee.children.length)break;case IMPORT:case DECLARATION:return ee.return=ee.return||ee.value;case COMMENT:return"";case KEYFRAMES:return ee.return=ee.value+"{"+serialize(ee.children,ne)+"}";case RULESET:ee.value=ee.props.join(",")}return strlen(te=serialize(ee.children,ne))?ee.return=ee.value+"{"+te+"}":""}function middleware(ee){var re=sizeof(ee);return function(te,ne,ie,oe){for(var se="",ae=0;ae<re;ae++)se+=ee[ae](te,ne,ie,oe)||"";return se}}function rulesheet(ee){return function(re){re.root||(re=re.return)&&ee(re)}}function memoize(ee){var re=Object.create(null);return function(te){return re[te]===void 0&&(re[te]=ee(te)),re[te]}}var identifierWithPointTracking=function(re,te,ne){for(var ie=0,oe=0;ie=oe,oe=peek(),ie===38&&oe===12&&(te[ne]=1),!token(oe);)next$1();return slice(re,position)},toRules=function(re,te){var ne=-1,ie=44;do switch(token(ie)){case 0:ie===38&&peek()===12&&(te[ne]=1),re[ne]+=identifierWithPointTracking(position-1,te,ne);break;case 2:re[ne]+=delimit(ie);break;case 4:if(ie===44){re[++ne]=peek()===58?"&\f":"",te[ne]=re[ne].length;break}default:re[ne]+=from$1(ie)}while(ie=next$1());return re},getRules=function(re,te){return dealloc(toRules(alloc(re),te))},fixedElements=new WeakMap,compat=function(re){if(!(re.type!=="rule"||!re.parent||re.length<1)){for(var te=re.value,ne=re.parent,ie=re.column===ne.column&&re.line===ne.line;ne.type!=="rule";)if(ne=ne.parent,!ne)return;if(!(re.props.length===1&&te.charCodeAt(0)!==58&&!fixedElements.get(ne))&&!ie){fixedElements.set(re,!0);for(var oe=[],se=getRules(te,oe),ae=ne.props,ce=0,ue=0;ce<se.length;ce++)for(var le=0;le<ae.length;le++,ue++)re.props[ue]=oe[ce]?se[ce].replace(/&\f/g,ae[le]):ae[le]+" "+se[ce]}}},removeLabel=function(re){if(re.type==="decl"){var te=re.value;te.charCodeAt(0)===108&&te.charCodeAt(2)===98&&(re.return="",re.value="")}};function prefix(ee,re){switch(hash(ee,re)){case 5103:return WEBKIT+"print-"+ee+ee;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 WEBKIT+ee+ee;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+ee+MOZ+ee+MS+ee+ee;case 6828:case 4268:return WEBKIT+ee+MS+ee+ee;case 6165:return WEBKIT+ee+MS+"flex-"+ee+ee;case 5187:return WEBKIT+ee+replace(ee,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+ee;case 5443:return WEBKIT+ee+MS+"flex-item-"+replace(ee,/flex-|-self/,"")+ee;case 4675:return WEBKIT+ee+MS+"flex-line-pack"+replace(ee,/align-content|flex-|-self/,"")+ee;case 5548:return WEBKIT+ee+MS+replace(ee,"shrink","negative")+ee;case 5292:return WEBKIT+ee+MS+replace(ee,"basis","preferred-size")+ee;case 6060:return WEBKIT+"box-"+replace(ee,"-grow","")+WEBKIT+ee+MS+replace(ee,"grow","positive")+ee;case 4554:return WEBKIT+replace(ee,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+ee;case 6187:return replace(replace(replace(ee,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),ee,"")+ee;case 5495:case 3959:return replace(ee,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace(replace(ee,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+ee+ee;case 4095:case 3583:case 4068:case 2532:return replace(ee,/(.+)-inline(.+)/,WEBKIT+"$1$2")+ee;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(strlen(ee)-1-re>6)switch(charat(ee,re+1)){case 109:if(charat(ee,re+4)!==45)break;case 102:return replace(ee,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(ee,re+3)==108?"$3":"$2-$3"))+ee;case 115:return~indexof(ee,"stretch")?prefix(replace(ee,"stretch","fill-available"),re)+ee:ee}break;case 4949:if(charat(ee,re+1)!==115)break;case 6444:switch(charat(ee,strlen(ee)-3-(~indexof(ee,"!important")&&10))){case 107:return replace(ee,":",":"+WEBKIT)+ee;case 101:return replace(ee,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(ee,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+ee}break;case 5936:switch(charat(ee,re+11)){case 114:return WEBKIT+ee+MS+replace(ee,/[svh]\w+-[tblr]{2}/,"tb")+ee;case 108:return WEBKIT+ee+MS+replace(ee,/[svh]\w+-[tblr]{2}/,"tb-rl")+ee;case 45:return WEBKIT+ee+MS+replace(ee,/[svh]\w+-[tblr]{2}/,"lr")+ee}return WEBKIT+ee+MS+ee+ee}return ee}var prefixer=function(re,te,ne,ie){if(re.length>-1&&!re.return)switch(re.type){case DECLARATION:re.return=prefix(re.value,re.length);break;case KEYFRAMES:return serialize([copy$1(re,{value:replace(re.value,"@","@"+WEBKIT)})],ie);case RULESET:if(re.length)return combine$1(re.props,function(oe){switch(match(oe,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy$1(re,{props:[replace(oe,/:(read-\w+)/,":"+MOZ+"$1")]})],ie);case"::placeholder":return serialize([copy$1(re,{props:[replace(oe,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy$1(re,{props:[replace(oe,/:(plac\w+)/,":"+MOZ+"$1")]}),copy$1(re,{props:[replace(oe,/:(plac\w+)/,MS+"input-$1")]})],ie)}return""})}},defaultStylisPlugins=[prefixer],createCache=function(re){var te=re.key;if(te==="css"){var ne=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(ne,function(ge){var me=ge.getAttribute("data-emotion");me.indexOf(" ")!==-1&&(document.head.appendChild(ge),ge.setAttribute("data-s",""))})}var ie=re.stylisPlugins||defaultStylisPlugins,oe={},se,ae=[];se=re.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+te+' "]'),function(ge){for(var me=ge.getAttribute("data-emotion").split(" "),ye=1;ye<me.length;ye++)oe[me[ye]]=!0;ae.push(ge)});var ce,ue=[compat,removeLabel];{var le,de=[stringify,rulesheet(function(ge){le.insert(ge)})],fe=middleware(ue.concat(ie,de)),he=function(me){return serialize(compile(me),fe)};ce=function(me,ye,ve,be){le=ve,he(me?me+"{"+ye.styles+"}":ye.styles),be&&(pe.inserted[ye.name]=!0)}}var pe={key:te,sheet:new StyleSheet({key:te,container:se,nonce:re.nonce,speedy:re.speedy,prepend:re.prepend,insertionPoint:re.insertionPoint}),nonce:re.nonce,inserted:oe,registered:{},insert:ce};return pe.sheet.hydrate(ae),pe};function murmur2(ee){for(var re=0,te,ne=0,ie=ee.length;ie>=4;++ne,ie-=4)te=ee.charCodeAt(ne)&255|(ee.charCodeAt(++ne)&255)<<8|(ee.charCodeAt(++ne)&255)<<16|(ee.charCodeAt(++ne)&255)<<24,te=(te&65535)*1540483477+((te>>>16)*59797<<16),te^=te>>>24,re=(te&65535)*1540483477+((te>>>16)*59797<<16)^(re&65535)*1540483477+((re>>>16)*59797<<16);switch(ie){case 3:re^=(ee.charCodeAt(ne+2)&255)<<16;case 2:re^=(ee.charCodeAt(ne+1)&255)<<8;case 1:re^=ee.charCodeAt(ne)&255,re=(re&65535)*1540483477+((re>>>16)*59797<<16)}return re^=re>>>13,re=(re&65535)*1540483477+((re>>>16)*59797<<16),((re^re>>>15)>>>0).toString(36)}var unitlessKeys={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},hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(re){return re.charCodeAt(1)===45},isProcessableValue=function(re){return re!=null&&typeof re!="boolean"},processStyleName=memoize(function(ee){return isCustomProperty(ee)?ee:ee.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(re,te){switch(re){case"animation":case"animationName":if(typeof te=="string")return te.replace(animationRegex,function(ne,ie,oe){return cursor={name:ie,styles:oe,next:cursor},ie})}return unitlessKeys[re]!==1&&!isCustomProperty(re)&&typeof te=="number"&&te!==0?te+"px":te};function handleInterpolation(ee,re,te){if(te==null)return"";var ne=te;if(ne.__emotion_styles!==void 0)return ne;switch(typeof te){case"boolean":return"";case"object":{var ie=te;if(ie.anim===1)return cursor={name:ie.name,styles:ie.styles,next:cursor},ie.name;var oe=te;if(oe.styles!==void 0){var se=oe.next;if(se!==void 0)for(;se!==void 0;)cursor={name:se.name,styles:se.styles,next:cursor},se=se.next;var ae=oe.styles+";";return ae}return createStringFromObject(ee,re,te)}}var ce=te;if(re==null)return ce;var ue=re[ce];return ue!==void 0?ue:ce}function createStringFromObject(ee,re,te){var ne="";if(Array.isArray(te))for(var ie=0;ie<te.length;ie++)ne+=handleInterpolation(ee,re,te[ie])+";";else for(var oe in te){var se=te[oe];if(typeof se!="object"){var ae=se;re!=null&&re[ae]!==void 0?ne+=oe+"{"+re[ae]+"}":isProcessableValue(ae)&&(ne+=processStyleName(oe)+":"+processStyleValue(oe,ae)+";")}else if(Array.isArray(se)&&typeof se[0]=="string"&&(re==null||re[se[0]]===void 0))for(var ce=0;ce<se.length;ce++)isProcessableValue(se[ce])&&(ne+=processStyleName(oe)+":"+processStyleValue(oe,se[ce])+";");else{var ue=handleInterpolation(ee,re,se);switch(oe){case"animation":case"animationName":{ne+=processStyleName(oe)+":"+ue+";";break}default:ne+=oe+"{"+ue+"}"}}}return ne}var labelPattern=/label:\s*([^\s;{]+)\s*(;|$)/g,cursor;function serializeStyles(ee,re,te){if(ee.length===1&&typeof ee[0]=="object"&&ee[0]!==null&&ee[0].styles!==void 0)return ee[0];var ne=!0,ie="";cursor=void 0;var oe=ee[0];if(oe==null||oe.raw===void 0)ne=!1,ie+=handleInterpolation(te,re,oe);else{var se=oe;ie+=se[0]}for(var ae=1;ae<ee.length;ae++)if(ie+=handleInterpolation(te,re,ee[ae]),ne){var ce=oe;ie+=ce[ae]}labelPattern.lastIndex=0;for(var ue="",le;(le=labelPattern.exec(ie))!==null;)ue+="-"+le[1];var de=murmur2(ie)+ue;return{name:de,styles:ie,next:cursor}}function getRegisteredStyles(ee,re,te){var ne="";return te.split(" ").forEach(function(ie){ee[ie]!==void 0?re.push(ee[ie]+";"):ie&&(ne+=ie+" ")}),ne}var registerStyles=function(re,te,ne){var ie=re.key+"-"+te.name;re.registered[ie]===void 0&&(re.registered[ie]=te.styles)},insertStyles=function(re,te,ne){registerStyles(re,te);var ie=re.key+"-"+te.name;if(re.inserted[te.name]===void 0){var oe=te;do re.insert(te===oe?"."+ie:"",oe,re.sheet,!0),oe=oe.next;while(oe!==void 0)}};function insertWithoutScoping(ee,re){if(ee.inserted[re.name]===void 0)return ee.insert("",re,ee.sheet,!0)}function merge$2(ee,re,te){var ne=[],ie=getRegisteredStyles(ee,ne,te);return ne.length<2?te:ie+re(ne)}var createEmotion=function(re){var te=createCache(re);te.sheet.speedy=function(ae){this.isSpeedy=ae},te.compat=!0;var ne=function(){for(var ce=arguments.length,ue=new Array(ce),le=0;le<ce;le++)ue[le]=arguments[le];var de=serializeStyles(ue,te.registered,void 0);return insertStyles(te,de),te.key+"-"+de.name},ie=function(){for(var ce=arguments.length,ue=new Array(ce),le=0;le<ce;le++)ue[le]=arguments[le];var de=serializeStyles(ue,te.registered),fe="animation-"+de.name;return insertWithoutScoping(te,{name:de.name,styles:"@keyframes "+fe+"{"+de.styles+"}"}),fe},oe=function(){for(var ce=arguments.length,ue=new Array(ce),le=0;le<ce;le++)ue[le]=arguments[le];var de=serializeStyles(ue,te.registered);insertWithoutScoping(te,de)},se=function(){for(var ce=arguments.length,ue=new Array(ce),le=0;le<ce;le++)ue[le]=arguments[le];return merge$2(te.registered,ne,classnames(ue))};return{css:ne,cx:se,injectGlobal:oe,keyframes:ie,hydrate:function(ce){ce.forEach(function(ue){te.inserted[ue]=!0})},flush:function(){te.registered={},te.inserted={},te.sheet.flush()},sheet:te.sheet,cache:te,getRegisteredStyles:getRegisteredStyles.bind(null,te.registered),merge:merge$2.bind(null,te.registered,ne)}},classnames=function ee(re){for(var te="",ne=0;ne<re.length;ne++){var ie=re[ne];if(ie!=null){var oe=void 0;switch(typeof ie){case"boolean":break;case"object":{if(Array.isArray(ie))oe=ee(ie);else{oe="";for(var se in ie)ie[se]&&se&&(oe&&(oe+=" "),oe+=se)}break}default:oe=ie}oe&&(te&&(te+=" "),te+=oe)}}return te},_createEmotion=createEmotion({key:"css"}),cx=_createEmotion.cx,keyframes=_createEmotion.keyframes,css=_createEmotion.css;const getCardTabsStyles=ee=>css`
|
|
4
4
|
.card-tabs-header {
|
|
@@ -144,12 +144,12 @@ ${te}`:""}`;await copyToClipboard(ne)}};function validateValue(ee,re,te){return
|
|
|
144
144
|
text-align: ${re.align};
|
|
145
145
|
|
|
146
146
|
text-transform: ${re.uppercase?"uppercase":"none"};
|
|
147
|
-
`};class Typography extends Component{constructor({text:re,variant:te="span",weight:ne=500,size:ie="small",lineHeight:oe,align:se="left",color:ae,uppercase:ce=!1}){const ue={size:ie,weight:ne,lineHeight:oe,align:se,color:ae,uppercase:ce};super({tag:te,styles:le=>getTypographyStyles(le,ue)}),this.element.textContent=re}}const isString$2=ee=>typeof ee=="string",defer=()=>{let ee,re;const te=new Promise((ne,ie)=>{ee=ne,re=ie});return te.resolve=ee,te.reject=re,te},makeString=ee=>ee==null?"":""+ee,copy=(ee,re,te)=>{ee.forEach(ne=>{re[ne]&&(te[ne]=re[ne])})},lastOfPathSeparatorRegExp=/###/g,cleanKey=ee=>ee&&ee.indexOf("###")>-1?ee.replace(lastOfPathSeparatorRegExp,"."):ee,canNotTraverseDeeper=ee=>!ee||isString$2(ee),getLastOfPath=(ee,re,te)=>{const ne=isString$2(re)?re.split("."):re;let ie=0;for(;ie<ne.length-1;){if(canNotTraverseDeeper(ee))return{};const oe=cleanKey(ne[ie]);!ee[oe]&&te&&(ee[oe]=new te),Object.prototype.hasOwnProperty.call(ee,oe)?ee=ee[oe]:ee={},++ie}return canNotTraverseDeeper(ee)?{}:{obj:ee,k:cleanKey(ne[ie])}},setPath=(ee,re,te)=>{const{obj:ne,k:ie}=getLastOfPath(ee,re,Object);if(ne!==void 0||re.length===1){ne[ie]=te;return}let oe=re[re.length-1],se=re.slice(0,re.length-1),ae=getLastOfPath(ee,se,Object);for(;ae.obj===void 0&&se.length;)oe=`${se[se.length-1]}.${oe}`,se=se.slice(0,se.length-1),ae=getLastOfPath(ee,se,Object),ae!=null&&ae.obj&&typeof ae.obj[`${ae.k}.${oe}`]<"u"&&(ae.obj=void 0);ae.obj[`${ae.k}.${oe}`]=te},pushPath=(ee,re,te,ne)=>{const{obj:ie,k:oe}=getLastOfPath(ee,re,Object);ie[oe]=ie[oe]||[],ie[oe].push(te)},getPath=(ee,re)=>{const{obj:te,k:ne}=getLastOfPath(ee,re);if(te&&Object.prototype.hasOwnProperty.call(te,ne))return te[ne]},getPathWithDefaults=(ee,re,te)=>{const ne=getPath(ee,te);return ne!==void 0?ne:getPath(re,te)},deepExtend=(ee,re,te)=>{for(const ne in re)ne!=="__proto__"&&ne!=="constructor"&&(ne in ee?isString$2(ee[ne])||ee[ne]instanceof String||isString$2(re[ne])||re[ne]instanceof String?te&&(ee[ne]=re[ne]):deepExtend(ee[ne],re[ne],te):ee[ne]=re[ne]);return ee},regexEscape=ee=>ee.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const escape$1=ee=>isString$2(ee)?ee.replace(/[&<>"'\/]/g,re=>_entityMap[re]):ee;class RegExpCache{constructor(re){this.capacity=re,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(re){const te=this.regExpMap.get(re);if(te!==void 0)return te;const ne=new RegExp(re);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(re,ne),this.regExpQueue.push(re),ne}}const chars=[" ",",","?","!",";"],looksLikeObjectPathRegExpCache=new RegExpCache(20),looksLikeObjectPath=(ee,re,te)=>{re=re||"",te=te||"";const ne=chars.filter(se=>re.indexOf(se)<0&&te.indexOf(se)<0);if(ne.length===0)return!0;const ie=looksLikeObjectPathRegExpCache.getRegExp(`(${ne.map(se=>se==="?"?"\\?":se).join("|")})`);let oe=!ie.test(ee);if(!oe){const se=ee.indexOf(te);se>0&&!ie.test(ee.substring(0,se))&&(oe=!0)}return oe},deepFind=function(ee,re){let te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!ee)return;if(ee[re])return Object.prototype.hasOwnProperty.call(ee,re)?ee[re]:void 0;const ne=re.split(te);let ie=ee;for(let oe=0;oe<ne.length;){if(!ie||typeof ie!="object")return;let se,ae="";for(let ce=oe;ce<ne.length;++ce)if(ce!==oe&&(ae+=te),ae+=ne[ce],se=ie[ae],se!==void 0){if(["string","number","boolean"].indexOf(typeof se)>-1&&ce<ne.length-1)continue;oe+=ce-oe+1;break}ie=se}return ie},getCleanedCode=ee=>ee==null?void 0:ee.replace("_","-"),consoleLogger={type:"logger",log(ee){this.output("log",ee)},warn(ee){this.output("warn",ee)},error(ee){this.output("error",ee)},output(ee,re){var te,ne;(ne=(te=console==null?void 0:console[ee])==null?void 0:te.apply)==null||ne.call(te,console,re)}};let Logger$1=class go{constructor(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(re,te)}init(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=te.prefix||"i18next:",this.logger=re||consoleLogger,this.options=te,this.debug=te.debug}log(){for(var re=arguments.length,te=new Array(re),ne=0;ne<re;ne++)te[ne]=arguments[ne];return this.forward(te,"log","",!0)}warn(){for(var re=arguments.length,te=new Array(re),ne=0;ne<re;ne++)te[ne]=arguments[ne];return this.forward(te,"warn","",!0)}error(){for(var re=arguments.length,te=new Array(re),ne=0;ne<re;ne++)te[ne]=arguments[ne];return this.forward(te,"error","")}deprecate(){for(var re=arguments.length,te=new Array(re),ne=0;ne<re;ne++)te[ne]=arguments[ne];return this.forward(te,"warn","WARNING DEPRECATED: ",!0)}forward(re,te,ne,ie){return ie&&!this.debug?null:(isString$2(re[0])&&(re[0]=`${ne}${this.prefix} ${re[0]}`),this.logger[te](re))}create(re){return new go(this.logger,{prefix:`${this.prefix}:${re}:`,...this.options})}clone(re){return re=re||this.options,re.prefix=re.prefix||this.prefix,new go(this.logger,re)}};var baseLogger=new Logger$1;class EventEmitter{constructor(){this.observers={}}on(re,te){return re.split(" ").forEach(ne=>{this.observers[ne]||(this.observers[ne]=new Map);const ie=this.observers[ne].get(te)||0;this.observers[ne].set(te,ie+1)}),this}off(re,te){if(this.observers[re]){if(!te){delete this.observers[re];return}this.observers[re].delete(te)}}emit(re){for(var te=arguments.length,ne=new Array(te>1?te-1:0),ie=1;ie<te;ie++)ne[ie-1]=arguments[ie];this.observers[re]&&Array.from(this.observers[re].entries()).forEach(se=>{let[ae,ce]=se;for(let ue=0;ue<ce;ue++)ae(...ne)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(se=>{let[ae,ce]=se;for(let ue=0;ue<ce;ue++)ae.apply(ae,[re,...ne])})}}class ResourceStore extends EventEmitter{constructor(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=re||{},this.options=te,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(re){this.options.ns.indexOf(re)<0&&this.options.ns.push(re)}removeNamespaces(re){const te=this.options.ns.indexOf(re);te>-1&&this.options.ns.splice(te,1)}getResource(re,te,ne){var ue,le;let ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const oe=ie.keySeparator!==void 0?ie.keySeparator:this.options.keySeparator,se=ie.ignoreJSONStructure!==void 0?ie.ignoreJSONStructure:this.options.ignoreJSONStructure;let ae;re.indexOf(".")>-1?ae=re.split("."):(ae=[re,te],ne&&(Array.isArray(ne)?ae.push(...ne):isString$2(ne)&&oe?ae.push(...ne.split(oe)):ae.push(ne)));const ce=getPath(this.data,ae);return!ce&&!te&&!ne&&re.indexOf(".")>-1&&(re=ae[0],te=ae[1],ne=ae.slice(2).join(".")),ce||!se||!isString$2(ne)?ce:deepFind((le=(ue=this.data)==null?void 0:ue[re])==null?void 0:le[te],ne,oe)}addResource(re,te,ne,ie){let oe=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const se=oe.keySeparator!==void 0?oe.keySeparator:this.options.keySeparator;let ae=[re,te];ne&&(ae=ae.concat(se?ne.split(se):ne)),re.indexOf(".")>-1&&(ae=re.split("."),ie=te,te=ae[1]),this.addNamespaces(te),setPath(this.data,ae,ie),oe.silent||this.emit("added",re,te,ne,ie)}addResources(re,te,ne){let ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const oe in ne)(isString$2(ne[oe])||Array.isArray(ne[oe]))&&this.addResource(re,te,oe,ne[oe],{silent:!0});ie.silent||this.emit("added",re,te,ne)}addResourceBundle(re,te,ne,ie,oe){let se=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},ae=[re,te];re.indexOf(".")>-1&&(ae=re.split("."),ie=ne,ne=te,te=ae[1]),this.addNamespaces(te);let ce=getPath(this.data,ae)||{};se.skipCopy||(ne=JSON.parse(JSON.stringify(ne))),ie?deepExtend(ce,ne,oe):ce={...ce,...ne},setPath(this.data,ae,ce),se.silent||this.emit("added",re,te,ne)}removeResourceBundle(re,te){this.hasResourceBundle(re,te)&&delete this.data[re][te],this.removeNamespaces(te),this.emit("removed",re,te)}hasResourceBundle(re,te){return this.getResource(re,te)!==void 0}getResourceBundle(re,te){return te||(te=this.options.defaultNS),this.getResource(re,te)}getDataByLanguage(re){return this.data[re]}hasLanguageSomeTranslations(re){const te=this.getDataByLanguage(re);return!!(te&&Object.keys(te)||[]).find(ie=>te[ie]&&Object.keys(te[ie]).length>0)}toJSON(){return this.data}}var postProcessor={processors:{},addPostProcessor(ee){this.processors[ee.name]=ee},handle(ee,re,te,ne,ie){return ee.forEach(oe=>{var se;re=((se=this.processors[oe])==null?void 0:se.process(re,te,ne,ie))??re}),re}};const checkedLoadedFor={},shouldHandleAsObject=ee=>!isString$2(ee)&&typeof ee!="boolean"&&typeof ee!="number";class Translator extends EventEmitter{constructor(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),copy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],re,this),this.options=te,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=baseLogger.create("translator")}changeLanguage(re){re&&(this.language=re)}exists(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(re==null)return!1;const ne=this.resolve(re,te);return(ne==null?void 0:ne.res)!==void 0}extractFromKey(re,te){let ne=te.nsSeparator!==void 0?te.nsSeparator:this.options.nsSeparator;ne===void 0&&(ne=":");const ie=te.keySeparator!==void 0?te.keySeparator:this.options.keySeparator;let oe=te.ns||this.options.defaultNS||[];const se=ne&&re.indexOf(ne)>-1,ae=!this.options.userDefinedKeySeparator&&!te.keySeparator&&!this.options.userDefinedNsSeparator&&!te.nsSeparator&&!looksLikeObjectPath(re,ne,ie);if(se&&!ae){const ce=re.match(this.interpolator.nestingRegexp);if(ce&&ce.length>0)return{key:re,namespaces:isString$2(oe)?[oe]:oe};const ue=re.split(ne);(ne!==ie||ne===ie&&this.options.ns.indexOf(ue[0])>-1)&&(oe=ue.shift()),re=ue.join(ie)}return{key:re,namespaces:isString$2(oe)?[oe]:oe}}translate(re,te,ne){if(typeof te!="object"&&this.options.overloadTranslationOptionHandler&&(te=this.options.overloadTranslationOptionHandler(arguments)),typeof te=="object"&&(te={...te}),te||(te={}),re==null)return"";Array.isArray(re)||(re=[String(re)]);const ie=te.returnDetails!==void 0?te.returnDetails:this.options.returnDetails,oe=te.keySeparator!==void 0?te.keySeparator:this.options.keySeparator,{key:se,namespaces:ae}=this.extractFromKey(re[re.length-1],te),ce=ae[ae.length-1],ue=te.lng||this.language,le=te.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((ue==null?void 0:ue.toLowerCase())==="cimode"){if(le){const Oe=te.nsSeparator||this.options.nsSeparator;return ie?{res:`${ce}${Oe}${se}`,usedKey:se,exactUsedKey:se,usedLng:ue,usedNS:ce,usedParams:this.getUsedParamsDetails(te)}:`${ce}${Oe}${se}`}return ie?{res:se,usedKey:se,exactUsedKey:se,usedLng:ue,usedNS:ce,usedParams:this.getUsedParamsDetails(te)}:se}const de=this.resolve(re,te);let fe=de==null?void 0:de.res;const he=(de==null?void 0:de.usedKey)||se,pe=(de==null?void 0:de.exactUsedKey)||se,ge=["[object Number]","[object Function]","[object RegExp]"],me=te.joinArrays!==void 0?te.joinArrays:this.options.joinArrays,ye=!this.i18nFormat||this.i18nFormat.handleAsObject,ve=te.count!==void 0&&!isString$2(te.count),be=Translator.hasDefaultValue(te),_e=ve?this.pluralResolver.getSuffix(ue,te.count,te):"",Ce=te.ordinal&&ve?this.pluralResolver.getSuffix(ue,te.count,{ordinal:!1}):"",Te=ve&&!te.ordinal&&te.count===0,Se=Te&&te[`defaultValue${this.options.pluralSeparator}zero`]||te[`defaultValue${_e}`]||te[`defaultValue${Ce}`]||te.defaultValue;let Re=fe;ye&&!fe&&be&&(Re=Se);const we=shouldHandleAsObject(Re),Ae=Object.prototype.toString.apply(Re);if(ye&&Re&&we&&ge.indexOf(Ae)<0&&!(isString$2(me)&&Array.isArray(Re))){if(!te.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Oe=this.options.returnedObjectHandler?this.options.returnedObjectHandler(he,Re,{...te,ns:ae}):`key '${se} (${this.language})' returned an object instead of string.`;return ie?(de.res=Oe,de.usedParams=this.getUsedParamsDetails(te),de):Oe}if(oe){const Oe=Array.isArray(Re),Ne=Oe?[]:{},Ue=Oe?pe:he;for(const Fe in Re)if(Object.prototype.hasOwnProperty.call(Re,Fe)){const Ve=`${Ue}${oe}${Fe}`;be&&!fe?Ne[Fe]=this.translate(Ve,{...te,defaultValue:shouldHandleAsObject(Se)?Se[Fe]:void 0,joinArrays:!1,ns:ae}):Ne[Fe]=this.translate(Ve,{...te,joinArrays:!1,ns:ae}),Ne[Fe]===Ve&&(Ne[Fe]=Re[Fe])}fe=Ne}}else if(ye&&isString$2(me)&&Array.isArray(fe))fe=fe.join(me),fe&&(fe=this.extendTranslation(fe,re,te,ne));else{let Oe=!1,Ne=!1;!this.isValidLookup(fe)&&be&&(Oe=!0,fe=Se),this.isValidLookup(fe)||(Ne=!0,fe=se);const Fe=(te.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Ne?void 0:fe,Ve=be&&Se!==fe&&this.options.updateMissing;if(Ne||Oe||Ve){if(this.logger.log(Ve?"updateKey":"missingKey",ue,ce,se,Ve?Se:fe),oe){const hr=this.resolve(se,{...te,keySeparator:!1});hr&&hr.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 He=[];const ur=this.languageUtils.getFallbackCodes(this.options.fallbackLng,te.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ur&&ur[0])for(let hr=0;hr<ur.length;hr++)He.push(ur[hr]);else this.options.saveMissingTo==="all"?He=this.languageUtils.toResolveHierarchy(te.lng||this.language):He.push(te.lng||this.language);const qe=(hr,fr,dr)=>{var Bt;const Qe=be&&dr!==fe?dr:Fe;this.options.missingKeyHandler?this.options.missingKeyHandler(hr,ce,fr,Qe,Ve,te):(Bt=this.backendConnector)!=null&&Bt.saveMissing&&this.backendConnector.saveMissing(hr,ce,fr,Qe,Ve,te),this.emit("missingKey",hr,ce,fr,fe)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ve?He.forEach(hr=>{const fr=this.pluralResolver.getSuffixes(hr,te);Te&&te[`defaultValue${this.options.pluralSeparator}zero`]&&fr.indexOf(`${this.options.pluralSeparator}zero`)<0&&fr.push(`${this.options.pluralSeparator}zero`),fr.forEach(dr=>{qe([hr],se+dr,te[`defaultValue${dr}`]||Se)})}):qe(He,se,Se))}fe=this.extendTranslation(fe,re,te,de,ne),Ne&&fe===se&&this.options.appendNamespaceToMissingKey&&(fe=`${ce}:${se}`),(Ne||Oe)&&this.options.parseMissingKeyHandler&&(fe=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${ce}:${se}`:se,Oe?fe:void 0))}return ie?(de.res=fe,de.usedParams=this.getUsedParamsDetails(te),de):fe}extendTranslation(re,te,ne,ie,oe){var ue,le;var se=this;if((ue=this.i18nFormat)!=null&&ue.parse)re=this.i18nFormat.parse(re,{...this.options.interpolation.defaultVariables,...ne},ne.lng||this.language||ie.usedLng,ie.usedNS,ie.usedKey,{resolved:ie});else if(!ne.skipInterpolation){ne.interpolation&&this.interpolator.init({...ne,interpolation:{...this.options.interpolation,...ne.interpolation}});const de=isString$2(re)&&(((le=ne==null?void 0:ne.interpolation)==null?void 0:le.skipOnVariables)!==void 0?ne.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let fe;if(de){const pe=re.match(this.interpolator.nestingRegexp);fe=pe&&pe.length}let he=ne.replace&&!isString$2(ne.replace)?ne.replace:ne;if(this.options.interpolation.defaultVariables&&(he={...this.options.interpolation.defaultVariables,...he}),re=this.interpolator.interpolate(re,he,ne.lng||this.language||ie.usedLng,ne),de){const pe=re.match(this.interpolator.nestingRegexp),ge=pe&&pe.length;fe<ge&&(ne.nest=!1)}!ne.lng&&ie&&ie.res&&(ne.lng=this.language||ie.usedLng),ne.nest!==!1&&(re=this.interpolator.nest(re,function(){for(var pe=arguments.length,ge=new Array(pe),me=0;me<pe;me++)ge[me]=arguments[me];return(oe==null?void 0:oe[0])===ge[0]&&!ne.context?(se.logger.warn(`It seems you are nesting recursively key: ${ge[0]} in key: ${te[0]}`),null):se.translate(...ge,te)},ne)),ne.interpolation&&this.interpolator.reset()}const ae=ne.postProcess||this.options.postProcess,ce=isString$2(ae)?[ae]:ae;return re!=null&&(ce!=null&&ce.length)&&ne.applyPostProcessor!==!1&&(re=postProcessor.handle(ce,re,te,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...ie,usedParams:this.getUsedParamsDetails(ne)},...ne}:ne,this)),re}resolve(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne,ie,oe,se,ae;return isString$2(re)&&(re=[re]),re.forEach(ce=>{if(this.isValidLookup(ne))return;const ue=this.extractFromKey(ce,te),le=ue.key;ie=le;let de=ue.namespaces;this.options.fallbackNS&&(de=de.concat(this.options.fallbackNS));const fe=te.count!==void 0&&!isString$2(te.count),he=fe&&!te.ordinal&&te.count===0,pe=te.context!==void 0&&(isString$2(te.context)||typeof te.context=="number")&&te.context!=="",ge=te.lngs?te.lngs:this.languageUtils.toResolveHierarchy(te.lng||this.language,te.fallbackLng);de.forEach(me=>{var ye,ve;this.isValidLookup(ne)||(ae=me,!checkedLoadedFor[`${ge[0]}-${me}`]&&((ye=this.utils)!=null&&ye.hasLoadedNamespace)&&!((ve=this.utils)!=null&&ve.hasLoadedNamespace(ae))&&(checkedLoadedFor[`${ge[0]}-${me}`]=!0,this.logger.warn(`key "${ie}" for languages "${ge.join(", ")}" won't get resolved as namespace "${ae}" 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!!!")),ge.forEach(be=>{var Te;if(this.isValidLookup(ne))return;se=be;const _e=[le];if((Te=this.i18nFormat)!=null&&Te.addLookupKeys)this.i18nFormat.addLookupKeys(_e,le,be,me,te);else{let Se;fe&&(Se=this.pluralResolver.getSuffix(be,te.count,te));const Re=`${this.options.pluralSeparator}zero`,we=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(fe&&(_e.push(le+Se),te.ordinal&&Se.indexOf(we)===0&&_e.push(le+Se.replace(we,this.options.pluralSeparator)),he&&_e.push(le+Re)),pe){const Ae=`${le}${this.options.contextSeparator}${te.context}`;_e.push(Ae),fe&&(_e.push(Ae+Se),te.ordinal&&Se.indexOf(we)===0&&_e.push(Ae+Se.replace(we,this.options.pluralSeparator)),he&&_e.push(Ae+Re))}}let Ce;for(;Ce=_e.pop();)this.isValidLookup(ne)||(oe=Ce,ne=this.getResource(be,me,Ce,te))}))})}),{res:ne,usedKey:ie,exactUsedKey:oe,usedLng:se,usedNS:ae}}isValidLookup(re){return re!==void 0&&!(!this.options.returnNull&&re===null)&&!(!this.options.returnEmptyString&&re==="")}getResource(re,te,ne){var oe;let ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(oe=this.i18nFormat)!=null&&oe.getResource?this.i18nFormat.getResource(re,te,ne,ie):this.resourceStore.getResource(re,te,ne,ie)}getUsedParamsDetails(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const te=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],ne=re.replace&&!isString$2(re.replace);let ie=ne?re.replace:re;if(ne&&typeof re.count<"u"&&(ie.count=re.count),this.options.interpolation.defaultVariables&&(ie={...this.options.interpolation.defaultVariables,...ie}),!ne){ie={...ie};for(const oe of te)delete ie[oe]}return ie}static hasDefaultValue(re){const te="defaultValue";for(const ne in re)if(Object.prototype.hasOwnProperty.call(re,ne)&&te===ne.substring(0,te.length)&&re[ne]!==void 0)return!0;return!1}}class LanguageUtil{constructor(re){this.options=re,this.supportedLngs=this.options.supportedLngs||!1,this.logger=baseLogger.create("languageUtils")}getScriptPartFromCode(re){if(re=getCleanedCode(re),!re||re.indexOf("-")<0)return null;const te=re.split("-");return te.length===2||(te.pop(),te[te.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(te.join("-"))}getLanguagePartFromCode(re){if(re=getCleanedCode(re),!re||re.indexOf("-")<0)return re;const te=re.split("-");return this.formatLanguageCode(te[0])}formatLanguageCode(re){if(isString$2(re)&&re.indexOf("-")>-1){let te;try{te=Intl.getCanonicalLocales(re)[0]}catch{}return te&&this.options.lowerCaseLng&&(te=te.toLowerCase()),te||(this.options.lowerCaseLng?re.toLowerCase():re)}return this.options.cleanCode||this.options.lowerCaseLng?re.toLowerCase():re}isSupportedCode(re){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(re=this.getLanguagePartFromCode(re)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(re)>-1}getBestMatchFromCodes(re){if(!re)return null;let te;return re.forEach(ne=>{if(te)return;const ie=this.formatLanguageCode(ne);(!this.options.supportedLngs||this.isSupportedCode(ie))&&(te=ie)}),!te&&this.options.supportedLngs&&re.forEach(ne=>{if(te)return;const ie=this.getLanguagePartFromCode(ne);if(this.isSupportedCode(ie))return te=ie;te=this.options.supportedLngs.find(oe=>{if(oe===ie)return oe;if(!(oe.indexOf("-")<0&&ie.indexOf("-")<0)&&(oe.indexOf("-")>0&&ie.indexOf("-")<0&&oe.substring(0,oe.indexOf("-"))===ie||oe.indexOf(ie)===0&&ie.length>1))return oe})}),te||(te=this.getFallbackCodes(this.options.fallbackLng)[0]),te}getFallbackCodes(re,te){if(!re)return[];if(typeof re=="function"&&(re=re(te)),isString$2(re)&&(re=[re]),Array.isArray(re))return re;if(!te)return re.default||[];let ne=re[te];return ne||(ne=re[this.getScriptPartFromCode(te)]),ne||(ne=re[this.formatLanguageCode(te)]),ne||(ne=re[this.getLanguagePartFromCode(te)]),ne||(ne=re.default),ne||[]}toResolveHierarchy(re,te){const ne=this.getFallbackCodes(te||this.options.fallbackLng||[],re),ie=[],oe=se=>{se&&(this.isSupportedCode(se)?ie.push(se):this.logger.warn(`rejecting language code not found in supportedLngs: ${se}`))};return isString$2(re)&&(re.indexOf("-")>-1||re.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&oe(this.formatLanguageCode(re)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&oe(this.getScriptPartFromCode(re)),this.options.load!=="currentOnly"&&oe(this.getLanguagePartFromCode(re))):isString$2(re)&&oe(this.formatLanguageCode(re)),ne.forEach(se=>{ie.indexOf(se)<0&&oe(this.formatLanguageCode(se))}),ie}}const suffixesOrder={zero:0,one:1,two:2,few:3,many:4,other:5},dummyRule={select:ee=>ee===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=re,this.options=te,this.logger=baseLogger.create("pluralResolver"),this.pluralRulesCache={}}addRule(re,te){this.rules[re]=te}clearCache(){this.pluralRulesCache={}}getRule(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const ne=getCleanedCode(re==="dev"?"en":re),ie=te.ordinal?"ordinal":"cardinal",oe=JSON.stringify({cleanedCode:ne,type:ie});if(oe in this.pluralRulesCache)return this.pluralRulesCache[oe];let se;try{se=new Intl.PluralRules(ne,{type:ie})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),dummyRule;if(!re.match(/-|_/))return dummyRule;const ce=this.languageUtils.getLanguagePartFromCode(re);se=this.getRule(ce,te)}return this.pluralRulesCache[oe]=se,se}needsPlural(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=this.getRule(re,te);return ne||(ne=this.getRule("dev",te)),(ne==null?void 0:ne.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(re,te){let ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(re,ne).map(ie=>`${te}${ie}`)}getSuffixes(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=this.getRule(re,te);return ne||(ne=this.getRule("dev",te)),ne?ne.resolvedOptions().pluralCategories.sort((ie,oe)=>suffixesOrder[ie]-suffixesOrder[oe]).map(ie=>`${this.options.prepend}${te.ordinal?`ordinal${this.options.prepend}`:""}${ie}`):[]}getSuffix(re,te){let ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const ie=this.getRule(re,ne);return ie?`${this.options.prepend}${ne.ordinal?`ordinal${this.options.prepend}`:""}${ie.select(te)}`:(this.logger.warn(`no plural rule found for: ${re}`),this.getSuffix("dev",te,ne))}}const deepFindWithDefaults=function(ee,re,te){let ne=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",ie=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,oe=getPathWithDefaults(ee,re,te);return!oe&&ie&&isString$2(te)&&(oe=deepFind(ee,te,ne),oe===void 0&&(oe=deepFind(re,te,ne))),oe},regexSafe=ee=>ee.replace(/\$/g,"$$$$");class Interpolator{constructor(){var te;let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=baseLogger.create("interpolator"),this.options=re,this.format=((te=re==null?void 0:re.interpolation)==null?void 0:te.format)||(ne=>ne),this.init(re)}init(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};re.interpolation||(re.interpolation={escapeValue:!0});const{escape:te,escapeValue:ne,useRawValueToEscape:ie,prefix:oe,prefixEscaped:se,suffix:ae,suffixEscaped:ce,formatSeparator:ue,unescapeSuffix:le,unescapePrefix:de,nestingPrefix:fe,nestingPrefixEscaped:he,nestingSuffix:pe,nestingSuffixEscaped:ge,nestingOptionsSeparator:me,maxReplaces:ye,alwaysFormat:ve}=re.interpolation;this.escape=te!==void 0?te:escape$1,this.escapeValue=ne!==void 0?ne:!0,this.useRawValueToEscape=ie!==void 0?ie:!1,this.prefix=oe?regexEscape(oe):se||"{{",this.suffix=ae?regexEscape(ae):ce||"}}",this.formatSeparator=ue||",",this.unescapePrefix=le?"":de||"-",this.unescapeSuffix=this.unescapePrefix?"":le||"",this.nestingPrefix=fe?regexEscape(fe):he||regexEscape("$t("),this.nestingSuffix=pe?regexEscape(pe):ge||regexEscape(")"),this.nestingOptionsSeparator=me||",",this.maxReplaces=ye||1e3,this.alwaysFormat=ve!==void 0?ve:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const re=(te,ne)=>(te==null?void 0:te.source)===ne?(te.lastIndex=0,te):new RegExp(ne,"g");this.regexp=re(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=re(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=re(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(re,te,ne,ie){var he;let oe,se,ae;const ce=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},ue=pe=>{if(pe.indexOf(this.formatSeparator)<0){const ve=deepFindWithDefaults(te,ce,pe,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(ve,void 0,ne,{...ie,...te,interpolationkey:pe}):ve}const ge=pe.split(this.formatSeparator),me=ge.shift().trim(),ye=ge.join(this.formatSeparator).trim();return this.format(deepFindWithDefaults(te,ce,me,this.options.keySeparator,this.options.ignoreJSONStructure),ye,ne,{...ie,...te,interpolationkey:me})};this.resetRegExp();const le=(ie==null?void 0:ie.missingInterpolationHandler)||this.options.missingInterpolationHandler,de=((he=ie==null?void 0:ie.interpolation)==null?void 0:he.skipOnVariables)!==void 0?ie.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:pe=>regexSafe(pe)},{regex:this.regexp,safeValue:pe=>this.escapeValue?regexSafe(this.escape(pe)):regexSafe(pe)}].forEach(pe=>{for(ae=0;oe=pe.regex.exec(re);){const ge=oe[1].trim();if(se=ue(ge),se===void 0)if(typeof le=="function"){const ye=le(re,oe,ie);se=isString$2(ye)?ye:""}else if(ie&&Object.prototype.hasOwnProperty.call(ie,ge))se="";else if(de){se=oe[0];continue}else this.logger.warn(`missed to pass in variable ${ge} for interpolating ${re}`),se="";else!isString$2(se)&&!this.useRawValueToEscape&&(se=makeString(se));const me=pe.safeValue(se);if(re=re.replace(oe[0],me),de?(pe.regex.lastIndex+=se.length,pe.regex.lastIndex-=oe[0].length):pe.regex.lastIndex=0,ae++,ae>=this.maxReplaces)break}}),re}nest(re,te){let ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ie,oe,se;const ae=(ce,ue)=>{const le=this.nestingOptionsSeparator;if(ce.indexOf(le)<0)return ce;const de=ce.split(new RegExp(`${le}[ ]*{`));let fe=`{${de[1]}`;ce=de[0],fe=this.interpolate(fe,se);const he=fe.match(/'/g),pe=fe.match(/"/g);(((he==null?void 0:he.length)??0)%2===0&&!pe||pe.length%2!==0)&&(fe=fe.replace(/'/g,'"'));try{se=JSON.parse(fe),ue&&(se={...ue,...se})}catch(ge){return this.logger.warn(`failed parsing options string in nesting for key ${ce}`,ge),`${ce}${le}${fe}`}return se.defaultValue&&se.defaultValue.indexOf(this.prefix)>-1&&delete se.defaultValue,ce};for(;ie=this.nestingRegexp.exec(re);){let ce=[];se={...ne},se=se.replace&&!isString$2(se.replace)?se.replace:se,se.applyPostProcessor=!1,delete se.defaultValue;let ue=!1;if(ie[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(ie[1])){const le=ie[1].split(this.formatSeparator).map(de=>de.trim());ie[1]=le.shift(),ce=le,ue=!0}if(oe=te(ae.call(this,ie[1].trim(),se),se),oe&&ie[0]===re&&!isString$2(oe))return oe;isString$2(oe)||(oe=makeString(oe)),oe||(this.logger.warn(`missed to resolve ${ie[1]} for nesting ${re}`),oe=""),ue&&(oe=ce.reduce((le,de)=>this.format(le,de,ne.lng,{...ne,interpolationkey:ie[1].trim()}),oe.trim())),re=re.replace(ie[0],oe),this.regexp.lastIndex=0}return re}}const parseFormatStr=ee=>{let re=ee.toLowerCase().trim();const te={};if(ee.indexOf("(")>-1){const ne=ee.split("(");re=ne[0].toLowerCase().trim();const ie=ne[1].substring(0,ne[1].length-1);re==="currency"&&ie.indexOf(":")<0?te.currency||(te.currency=ie.trim()):re==="relativetime"&&ie.indexOf(":")<0?te.range||(te.range=ie.trim()):ie.split(";").forEach(se=>{if(se){const[ae,...ce]=se.split(":"),ue=ce.join(":").trim().replace(/^'+|'+$/g,""),le=ae.trim();te[le]||(te[le]=ue),ue==="false"&&(te[le]=!1),ue==="true"&&(te[le]=!0),isNaN(ue)||(te[le]=parseInt(ue,10))}})}return{formatName:re,formatOptions:te}},createCachedFormatter=ee=>{const re={};return(te,ne,ie)=>{let oe=ie;ie&&ie.interpolationkey&&ie.formatParams&&ie.formatParams[ie.interpolationkey]&&ie[ie.interpolationkey]&&(oe={...oe,[ie.interpolationkey]:void 0});const se=ne+JSON.stringify(oe);let ae=re[se];return ae||(ae=ee(getCleanedCode(ne),ie),re[se]=ae),ae(te)}};class Formatter{constructor(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=baseLogger.create("formatter"),this.options=re,this.formats={number:createCachedFormatter((te,ne)=>{const ie=new Intl.NumberFormat(te,{...ne});return oe=>ie.format(oe)}),currency:createCachedFormatter((te,ne)=>{const ie=new Intl.NumberFormat(te,{...ne,style:"currency"});return oe=>ie.format(oe)}),datetime:createCachedFormatter((te,ne)=>{const ie=new Intl.DateTimeFormat(te,{...ne});return oe=>ie.format(oe)}),relativetime:createCachedFormatter((te,ne)=>{const ie=new Intl.RelativeTimeFormat(te,{...ne});return oe=>ie.format(oe,ne.range||"day")}),list:createCachedFormatter((te,ne)=>{const ie=new Intl.ListFormat(te,{...ne});return oe=>ie.format(oe)})},this.init(re)}init(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=te.interpolation.formatSeparator||","}add(re,te){this.formats[re.toLowerCase().trim()]=te}addCached(re,te){this.formats[re.toLowerCase().trim()]=createCachedFormatter(te)}format(re,te,ne){let ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const oe=te.split(this.formatSeparator);if(oe.length>1&&oe[0].indexOf("(")>1&&oe[0].indexOf(")")<0&&oe.find(ae=>ae.indexOf(")")>-1)){const ae=oe.findIndex(ce=>ce.indexOf(")")>-1);oe[0]=[oe[0],...oe.splice(1,ae)].join(this.formatSeparator)}return oe.reduce((ae,ce)=>{var de;const{formatName:ue,formatOptions:le}=parseFormatStr(ce);if(this.formats[ue]){let fe=ae;try{const he=((de=ie==null?void 0:ie.formatParams)==null?void 0:de[ie.interpolationkey])||{},pe=he.locale||he.lng||ie.locale||ie.lng||ne;fe=this.formats[ue](ae,pe,{...le,...ie,...he})}catch(he){this.logger.warn(he)}return fe}else this.logger.warn(`there was no format function for ${ue}`);return ae},re)}}const removePending=(ee,re)=>{ee.pending[re]!==void 0&&(delete ee.pending[re],ee.pendingCount--)};class Connector extends EventEmitter{constructor(re,te,ne){var oe,se;let ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=re,this.store=te,this.services=ne,this.languageUtils=ne.languageUtils,this.options=ie,this.logger=baseLogger.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=ie.maxParallelReads||10,this.readingCalls=0,this.maxRetries=ie.maxRetries>=0?ie.maxRetries:5,this.retryTimeout=ie.retryTimeout>=1?ie.retryTimeout:350,this.state={},this.queue=[],(se=(oe=this.backend)==null?void 0:oe.init)==null||se.call(oe,ne,ie.backend,ie)}queueLoad(re,te,ne,ie){const oe={},se={},ae={},ce={};return re.forEach(ue=>{let le=!0;te.forEach(de=>{const fe=`${ue}|${de}`;!ne.reload&&this.store.hasResourceBundle(ue,de)?this.state[fe]=2:this.state[fe]<0||(this.state[fe]===1?se[fe]===void 0&&(se[fe]=!0):(this.state[fe]=1,le=!1,se[fe]===void 0&&(se[fe]=!0),oe[fe]===void 0&&(oe[fe]=!0),ce[de]===void 0&&(ce[de]=!0)))}),le||(ae[ue]=!0)}),(Object.keys(oe).length||Object.keys(se).length)&&this.queue.push({pending:se,pendingCount:Object.keys(se).length,loaded:{},errors:[],callback:ie}),{toLoad:Object.keys(oe),pending:Object.keys(se),toLoadLanguages:Object.keys(ae),toLoadNamespaces:Object.keys(ce)}}loaded(re,te,ne){const ie=re.split("|"),oe=ie[0],se=ie[1];te&&this.emit("failedLoading",oe,se,te),!te&&ne&&this.store.addResourceBundle(oe,se,ne,void 0,void 0,{skipCopy:!0}),this.state[re]=te?-1:2,te&&ne&&(this.state[re]=0);const ae={};this.queue.forEach(ce=>{pushPath(ce.loaded,[oe],se),removePending(ce,re),te&&ce.errors.push(te),ce.pendingCount===0&&!ce.done&&(Object.keys(ce.loaded).forEach(ue=>{ae[ue]||(ae[ue]={});const le=ce.loaded[ue];le.length&&le.forEach(de=>{ae[ue][de]===void 0&&(ae[ue][de]=!0)})}),ce.done=!0,ce.errors.length?ce.callback(ce.errors):ce.callback())}),this.emit("loaded",ae),this.queue=this.queue.filter(ce=>!ce.done)}read(re,te,ne){let ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,oe=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,se=arguments.length>5?arguments[5]:void 0;if(!re.length)return se(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:re,ns:te,fcName:ne,tried:ie,wait:oe,callback:se});return}this.readingCalls++;const ae=(ue,le)=>{if(this.readingCalls--,this.waitingReads.length>0){const de=this.waitingReads.shift();this.read(de.lng,de.ns,de.fcName,de.tried,de.wait,de.callback)}if(ue&&le&&ie<this.maxRetries){setTimeout(()=>{this.read.call(this,re,te,ne,ie+1,oe*2,se)},oe);return}se(ue,le)},ce=this.backend[ne].bind(this.backend);if(ce.length===2){try{const ue=ce(re,te);ue&&typeof ue.then=="function"?ue.then(le=>ae(null,le)).catch(ae):ae(null,ue)}catch(ue){ae(ue)}return}return ce(re,te,ae)}prepareLoading(re,te){let ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ie=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."),ie&&ie();isString$2(re)&&(re=this.languageUtils.toResolveHierarchy(re)),isString$2(te)&&(te=[te]);const oe=this.queueLoad(re,te,ne,ie);if(!oe.toLoad.length)return oe.pending.length||ie(),null;oe.toLoad.forEach(se=>{this.loadOne(se)})}load(re,te,ne){this.prepareLoading(re,te,{},ne)}reload(re,te,ne){this.prepareLoading(re,te,{reload:!0},ne)}loadOne(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const ne=re.split("|"),ie=ne[0],oe=ne[1];this.read(ie,oe,"read",void 0,void 0,(se,ae)=>{se&&this.logger.warn(`${te}loading namespace ${oe} for language ${ie} failed`,se),!se&&ae&&this.logger.log(`${te}loaded namespace ${oe} for language ${ie}`,ae),this.loaded(re,se,ae)})}saveMissing(re,te,ne,ie,oe){var ce,ue,le,de,fe;let se=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},ae=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((ue=(ce=this.services)==null?void 0:ce.utils)!=null&&ue.hasLoadedNamespace&&!((de=(le=this.services)==null?void 0:le.utils)!=null&&de.hasLoadedNamespace(te))){this.logger.warn(`did not save key "${ne}" as the namespace "${te}" 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(!(ne==null||ne==="")){if((fe=this.backend)!=null&&fe.create){const he={...se,isUpdate:oe},pe=this.backend.create.bind(this.backend);if(pe.length<6)try{let ge;pe.length===5?ge=pe(re,te,ne,ie,he):ge=pe(re,te,ne,ie),ge&&typeof ge.then=="function"?ge.then(me=>ae(null,me)).catch(ae):ae(null,ge)}catch(ge){ae(ge)}else pe(re,te,ne,ie,ae,he)}!re||!re[0]||this.store.addResource(re[0],te,ne,ie)}}}const get=()=>({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:ee=>{let re={};if(typeof ee[1]=="object"&&(re=ee[1]),isString$2(ee[1])&&(re.defaultValue=ee[1]),isString$2(ee[2])&&(re.tDescription=ee[2]),typeof ee[2]=="object"||typeof ee[3]=="object"){const te=ee[3]||ee[2];Object.keys(te).forEach(ne=>{re[ne]=te[ne]})}return re},interpolation:{escapeValue:!0,format:ee=>ee,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),transformOptions=ee=>{var re,te;return isString$2(ee.ns)&&(ee.ns=[ee.ns]),isString$2(ee.fallbackLng)&&(ee.fallbackLng=[ee.fallbackLng]),isString$2(ee.fallbackNS)&&(ee.fallbackNS=[ee.fallbackNS]),((te=(re=ee.supportedLngs)==null?void 0:re.indexOf)==null?void 0:te.call(re,"cimode"))<0&&(ee.supportedLngs=ee.supportedLngs.concat(["cimode"])),typeof ee.initImmediate=="boolean"&&(ee.initAsync=ee.initImmediate),ee},noop$3=()=>{},bindMemberFunctions=ee=>{Object.getOwnPropertyNames(Object.getPrototypeOf(ee)).forEach(te=>{typeof ee[te]=="function"&&(ee[te]=ee[te].bind(ee))})};class I18n extends EventEmitter{constructor(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=arguments.length>1?arguments[1]:void 0;if(super(),this.options=transformOptions(re),this.services={},this.logger=baseLogger,this.modules={external:[]},bindMemberFunctions(this),te&&!this.isInitialized&&!re.isClone){if(!this.options.initAsync)return this.init(re,te),this;setTimeout(()=>{this.init(re,te)},0)}}init(){var re=this;let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof te=="function"&&(ne=te,te={}),te.defaultNS==null&&te.ns&&(isString$2(te.ns)?te.defaultNS=te.ns:te.ns.indexOf("translation")<0&&(te.defaultNS=te.ns[0]));const ie=get();this.options={...ie,...this.options,...transformOptions(te)},this.options.interpolation={...ie.interpolation,...this.options.interpolation},te.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=te.keySeparator),te.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=te.nsSeparator);const oe=le=>le?typeof le=="function"?new le:le:null;if(!this.options.isClone){this.modules.logger?baseLogger.init(oe(this.modules.logger),this.options):baseLogger.init(null,this.options);let le;this.modules.formatter?le=this.modules.formatter:le=Formatter;const de=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const fe=this.services;fe.logger=baseLogger,fe.resourceStore=this.store,fe.languageUtils=de,fe.pluralResolver=new PluralResolver(de,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),le&&(!this.options.interpolation.format||this.options.interpolation.format===ie.interpolation.format)&&(fe.formatter=oe(le),fe.formatter.init(fe,this.options),this.options.interpolation.format=fe.formatter.format.bind(fe.formatter)),fe.interpolator=new Interpolator(this.options),fe.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},fe.backendConnector=new Connector(oe(this.modules.backend),fe.resourceStore,fe,this.options),fe.backendConnector.on("*",function(he){for(var pe=arguments.length,ge=new Array(pe>1?pe-1:0),me=1;me<pe;me++)ge[me-1]=arguments[me];re.emit(he,...ge)}),this.modules.languageDetector&&(fe.languageDetector=oe(this.modules.languageDetector),fe.languageDetector.init&&fe.languageDetector.init(fe,this.options.detection,this.options)),this.modules.i18nFormat&&(fe.i18nFormat=oe(this.modules.i18nFormat),fe.i18nFormat.init&&fe.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",function(he){for(var pe=arguments.length,ge=new Array(pe>1?pe-1:0),me=1;me<pe;me++)ge[me-1]=arguments[me];re.emit(he,...ge)}),this.modules.external.forEach(he=>{he.init&&he.init(this)})}if(this.format=this.options.interpolation.format,ne||(ne=noop$3),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const le=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);le.length>0&&le[0]!=="dev"&&(this.options.lng=le[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(le=>{this[le]=function(){return re.store[le](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(le=>{this[le]=function(){return re.store[le](...arguments),re}});const ce=defer(),ue=()=>{const le=(de,fe)=>{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),ce.resolve(fe),ne(de,fe)};if(this.languages&&!this.isInitialized)return le(null,this.t.bind(this));this.changeLanguage(this.options.lng,le)};return this.options.resources||!this.options.initAsync?ue():setTimeout(ue,0),ce}loadResources(re){var oe,se;let ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:noop$3;const ie=isString$2(re)?re:this.language;if(typeof re=="function"&&(ne=re),!this.options.resources||this.options.partialBundledLanguages){if((ie==null?void 0:ie.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return ne();const ae=[],ce=ue=>{if(!ue||ue==="cimode")return;this.services.languageUtils.toResolveHierarchy(ue).forEach(de=>{de!=="cimode"&&ae.indexOf(de)<0&&ae.push(de)})};ie?ce(ie):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(le=>ce(le)),(se=(oe=this.options.preload)==null?void 0:oe.forEach)==null||se.call(oe,ue=>ce(ue)),this.services.backendConnector.load(ae,this.options.ns,ue=>{!ue&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),ne(ue)})}else ne(null)}reloadResources(re,te,ne){const ie=defer();return typeof re=="function"&&(ne=re,re=void 0),typeof te=="function"&&(ne=te,te=void 0),re||(re=this.languages),te||(te=this.options.ns),ne||(ne=noop$3),this.services.backendConnector.reload(re,te,oe=>{ie.resolve(),ne(oe)}),ie}use(re){if(!re)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!re.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return re.type==="backend"&&(this.modules.backend=re),(re.type==="logger"||re.log&&re.warn&&re.error)&&(this.modules.logger=re),re.type==="languageDetector"&&(this.modules.languageDetector=re),re.type==="i18nFormat"&&(this.modules.i18nFormat=re),re.type==="postProcessor"&&postProcessor.addPostProcessor(re),re.type==="formatter"&&(this.modules.formatter=re),re.type==="3rdParty"&&this.modules.external.push(re),this}setResolvedLanguage(re){if(!(!re||!this.languages)&&!(["cimode","dev"].indexOf(re)>-1))for(let te=0;te<this.languages.length;te++){const ne=this.languages[te];if(!(["cimode","dev"].indexOf(ne)>-1)&&this.store.hasLanguageSomeTranslations(ne)){this.resolvedLanguage=ne;break}}}changeLanguage(re,te){var ne=this;this.isLanguageChangingTo=re;const ie=defer();this.emit("languageChanging",re);const oe=ce=>{this.language=ce,this.languages=this.services.languageUtils.toResolveHierarchy(ce),this.resolvedLanguage=void 0,this.setResolvedLanguage(ce)},se=(ce,ue)=>{ue?(oe(ue),this.translator.changeLanguage(ue),this.isLanguageChangingTo=void 0,this.emit("languageChanged",ue),this.logger.log("languageChanged",ue)):this.isLanguageChangingTo=void 0,ie.resolve(function(){return ne.t(...arguments)}),te&&te(ce,function(){return ne.t(...arguments)})},ae=ce=>{var le,de;!re&&!ce&&this.services.languageDetector&&(ce=[]);const ue=isString$2(ce)?ce:this.services.languageUtils.getBestMatchFromCodes(ce);ue&&(this.language||oe(ue),this.translator.language||this.translator.changeLanguage(ue),(de=(le=this.services.languageDetector)==null?void 0:le.cacheUserLanguage)==null||de.call(le,ue)),this.loadResources(ue,fe=>{se(fe,ue)})};return!re&&this.services.languageDetector&&!this.services.languageDetector.async?ae(this.services.languageDetector.detect()):!re&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(ae):this.services.languageDetector.detect(ae):ae(re),ie}getFixedT(re,te,ne){var ie=this;const oe=function(se,ae){let ce;if(typeof ae!="object"){for(var ue=arguments.length,le=new Array(ue>2?ue-2:0),de=2;de<ue;de++)le[de-2]=arguments[de];ce=ie.options.overloadTranslationOptionHandler([se,ae].concat(le))}else ce={...ae};ce.lng=ce.lng||oe.lng,ce.lngs=ce.lngs||oe.lngs,ce.ns=ce.ns||oe.ns,ce.keyPrefix!==""&&(ce.keyPrefix=ce.keyPrefix||ne||oe.keyPrefix);const fe=ie.options.keySeparator||".";let he;return ce.keyPrefix&&Array.isArray(se)?he=se.map(pe=>`${ce.keyPrefix}${fe}${pe}`):he=ce.keyPrefix?`${ce.keyPrefix}${fe}${se}`:se,ie.t(he,ce)};return isString$2(re)?oe.lng=re:oe.lngs=re,oe.ns=te,oe.keyPrefix=ne,oe}t(){var ie;for(var re=arguments.length,te=new Array(re),ne=0;ne<re;ne++)te[ne]=arguments[ne];return(ie=this.translator)==null?void 0:ie.translate(...te)}exists(){var ie;for(var re=arguments.length,te=new Array(re),ne=0;ne<re;ne++)te[ne]=arguments[ne];return(ie=this.translator)==null?void 0:ie.exists(...te)}setDefaultNamespace(re){this.options.defaultNS=re}hasLoadedNamespace(re){let te=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 ne=te.lng||this.resolvedLanguage||this.languages[0],ie=this.options?this.options.fallbackLng:!1,oe=this.languages[this.languages.length-1];if(ne.toLowerCase()==="cimode")return!0;const se=(ae,ce)=>{const ue=this.services.backendConnector.state[`${ae}|${ce}`];return ue===-1||ue===0||ue===2};if(te.precheck){const ae=te.precheck(this,se);if(ae!==void 0)return ae}return!!(this.hasResourceBundle(ne,re)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||se(ne,re)&&(!ie||se(oe,re)))}loadNamespaces(re,te){const ne=defer();return this.options.ns?(isString$2(re)&&(re=[re]),re.forEach(ie=>{this.options.ns.indexOf(ie)<0&&this.options.ns.push(ie)}),this.loadResources(ie=>{ne.resolve(),te&&te(ie)}),ne):(te&&te(),Promise.resolve())}loadLanguages(re,te){const ne=defer();isString$2(re)&&(re=[re]);const ie=this.options.preload||[],oe=re.filter(se=>ie.indexOf(se)<0&&this.services.languageUtils.isSupportedCode(se));return oe.length?(this.options.preload=ie.concat(oe),this.loadResources(se=>{ne.resolve(),te&&te(se)}),ne):(te&&te(),Promise.resolve())}dir(re){var ie,oe;if(re||(re=this.resolvedLanguage||(((ie=this.languages)==null?void 0:ie.length)>0?this.languages[0]:this.language)),!re)return"rtl";const te=["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"],ne=((oe=this.services)==null?void 0:oe.languageUtils)||new LanguageUtil(get());return te.indexOf(ne.getLanguagePartFromCode(re))>-1||re.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=arguments.length>1?arguments[1]:void 0;return new I18n(re,te)}cloneInstance(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:noop$3;const ne=re.forkResourceStore;ne&&delete re.forkResourceStore;const ie={...this.options,...re,isClone:!0},oe=new I18n(ie);if((re.debug!==void 0||re.prefix!==void 0)&&(oe.logger=oe.logger.clone(re)),["store","services","language"].forEach(ae=>{oe[ae]=this[ae]}),oe.services={...this.services},oe.services.utils={hasLoadedNamespace:oe.hasLoadedNamespace.bind(oe)},ne){const ae=Object.keys(this.store.data).reduce((ce,ue)=>(ce[ue]={...this.store.data[ue]},Object.keys(ce[ue]).reduce((le,de)=>(le[de]={...ce[ue][de]},le),{})),{});oe.store=new ResourceStore(ae,ie),oe.services.resourceStore=oe.store}return oe.translator=new Translator(oe.services,ie),oe.translator.on("*",function(ae){for(var ce=arguments.length,ue=new Array(ce>1?ce-1:0),le=1;le<ce;le++)ue[le-1]=arguments[le];oe.emit(ae,...ue)}),oe.init(ie,te),oe.translator.options=ie,oe.translator.backendConnector.services.utils={hasLoadedNamespace:oe.hasLoadedNamespace.bind(oe)},oe}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const instance=I18n.createInstance();instance.createInstance=I18n.createInstance,instance.createInstance,instance.dir,instance.init,instance.loadResources,instance.reloadResources,instance.use,instance.changeLanguage,instance.getFixedT,instance.t,instance.exists,instance.setDefaultNamespace,instance.hasLoadedNamespace,instance.loadNamespaces,instance.loadLanguages;const translation$2={additional_information:"Additional information",almost_done:"Almost done...",already_paid:"Already paid?",astro_express_checkout:"Express checkout",check_payment_status:"Check payment status",checkout_method:"Checkout method",or:"OR",email:"E-mail",enter_country_code:"Please enter a country or code",enter_your_email:"Enter your e-mail",enter_your_document_number:"Enter your document number",enter_your_document_type:"Select a document type",enter_your_first_name:"Enter your first name",enter_your_last_name:"Enter your last name",enter_your_phone:"Enter your phone number",continue:"Continue",copied:"Copied!",copy_payment_link:"Copy payment link",document_number:"Document number",document_type:"Document type",do_not_close_window:"Please do not close this window.",didnt_receive:"Didn't receive it?",first_name:"First name",generic_error:"An error occurred. Please try again.",hold_on:"Hold on!",invalid_field:"Invalid field",last_name:"Last name",loading_wait:"Loading, please wait...",pay_amount:"Pay {{amount}}",payment_amount:"Payment amount",push_notification_sent:"We sent a push notification to your app",qr_code:"QR code",required_field:"Required Field",scan_qr_copy_link:"Scan the QR code with your phone's camera 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 payment. Please check your details and try again.",payment_processing:"Processing your payment...",payment_still_processing:"This is taking a bit longer than usual, please hold on...",save_card_title:"Save this card",save_card_subtitle:"Pay faster next time",saved_cards_title:"Saved cards",pay_with_new_card:"Use another card",credit:"Credit",debit:"Debit",expires:"Exp.",cvv_security_hint:"We ask every time for security. It's the 3 digits on the back of your card.",delete_card_label:"Delete card",delete_card_confirm:"Remove this card?",delete_card_confirm_action:"Delete",delete_card_cancel_label:"Cancel",delete_card_error:"Could not remove card. Please try again."},en$1={translation:translation$2},translation$1={additional_information:"Información adicional",almost_done:"Casi listo...",already_paid:"Ya pagaste?",astro_express_checkout:"Pago express",check_payment_status:"Ver estado del pago",checkout_method:"Método de pago",or:"O",email:"Correo electrónico",enter_country_code:"Introduce el país o código del país",enter_your_email:"Ingrese su correo electrónico",enter_your_document_number:"Ingrese su número de documento",enter_your_document_type:"Seleccione un tipo de documento",enter_your_first_name:"Ingrese su nombre",enter_your_last_name:"Ingrese su apellido",enter_your_phone:"Introduzca su número de teléfono",continue:"Continuar",copied:"Copiado!",copy_payment_link:"Copiar enlace de pago",document_number:"Número de documento",document_type:"Tipo de documento",do_not_close_window:"Por favor, no cierres esta ventana.",didnt_receive:"No lo recibiste?",first_name:"Nombre",generic_error:"Ocurrió un error. Por favor, inténtelo de nuevo.",hold_on:"¡Un instante...!",invalid_field:"Campo inválido",last_name:"Apellido",loading_wait:"Cargando, aguantá un toque...",pay_amount:"Pagar {{amount}}",payment_amount:"Monto a pagar",push_notification_sent:"Enviamos una notificación push a tu app",qr_code:"código QR",required_field:"Campo Requerido",scan_qr_copy_link:"Escaneá el código QR con la cámara de tu teléfono o copia 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 pago con tarjeta. Verificá los datos y volvé a intentarlo.",payment_processing:"Procesando tu pago...",payment_still_processing:"Está tardando un poco más de lo habitual, estamos verificando su estado.",save_card_title:"Guardar esta tarjeta",save_card_subtitle:"Para pagar más rápido la próxima vez",saved_cards_title:"Tarjetas guardadas",pay_with_new_card:"Usar otra tarjeta",credit:"Crédito",debit:"Débito",expires:"Vence",cvv_security_hint:"Lo pedimos cada vez por seguridad. Son los 3 dígitos al dorso de tu tarjeta.",delete_card_label:"Eliminar tarjeta",delete_card_confirm:"¿Eliminar esta tarjeta?",delete_card_confirm_action:"Eliminar",delete_card_cancel_label:"Cancelar",delete_card_error:"No se pudo eliminar la tarjeta. Inténtalo de nuevo."},es={translation:translation$1},translation={additional_information:"Informações adicionais",almost_done:"Finalizando...",already_paid:"Já pagou?",astro_express_checkout:"Pagamento expresso",check_payment_status:"Verificar status do pagamento",checkout_method:"Método de pagamento",or:"OU",email:"E-mail",enter_country_code:"Informe um país ou código",enter_your_email:"Digite seu e-mail",enter_your_document_number:"Digite seu número de documento",enter_your_document_type:"Selecione um tipo de documento",enter_your_first_name:"Digite seu primeiro nome",enter_your_last_name:"Digite seu sobrenome",enter_your_phone:"Digite seu número de telefone",continue:"Continuar",copied:"Copiado!",copy_payment_link:"Copiar link de pagamento",document_number:"Número do documento",document_type:"Tipo de documento",do_not_close_window:"Por favor, não feche esta janela.",didnt_receive:"Não recebeu?",first_name:"Primeiro nome",generic_error:"Ocorreu um erro. Por favor, tente novamente.",hold_on:"Só um instante!",invalid_field:"Campo inválido",last_name:"Sobrenome",loading_wait:"Carregando, por favor aguarde...",pay_amount:"Pagar {{amount}}",payment_amount:"Valor do pagamento",push_notification_sent:"Enviamos uma notificação push para seu app",qr_code:"QR code",required_field:"Campo Obrigatório",scan_qr_copy_link:"Escaneie o QR código com a câmera do seu celular 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 seu pagamento com o cartão. Verifique os dados e tente novamente.",payment_processing:"Processando seu pagamento...",payment_still_processing:"Está demorando um pouco mais que o usual, por favor aguarde...",save_card_title:"Salvar este cartão",save_card_subtitle:"Para pagar mais rápido na próxima vez",saved_cards_title:"Cartões salvos",pay_with_new_card:"Usar outro cartão",credit:"Crédito",debit:"Débito",expires:"Vence",cvv_security_hint:"Pedimos sempre por segurança. São os 3 dígitos no verso do cartão.",delete_card_label:"Remover cartão",delete_card_confirm:"Remover este cartão?",delete_card_confirm_action:"Remover",delete_card_cancel_label:"Cancelar",delete_card_error:"Não foi possível remover o cartão. Tente novamente."},pt$1={translation},LOCAL_TRANSLATIONS={en:en$1,es,pt:pt$1};class AstroPayI18n{static init(re){const te=validateValue(re==null?void 0:re.language,CONFIG_LANGUAGE_VALUES,"en");return instance.init({lng:te,fallbackLng:"en",resources:LOCAL_TRANSLATIONS,interpolation:{escapeValue:!1}})}static getCurrent(){return instance.language}static translate(re,te){return instance.t(re,te??{})}}const getLoadingSuccessStyles=()=>css`
|
|
147
|
+
`};class Typography extends Component{constructor({text:re,variant:te="span",weight:ne=500,size:ie="small",lineHeight:oe,align:se="left",color:ae,uppercase:ce=!1}){const ue={size:ie,weight:ne,lineHeight:oe,align:se,color:ae,uppercase:ce};super({tag:te,styles:le=>getTypographyStyles(le,ue)}),this.element.textContent=re}}const isString$2=ee=>typeof ee=="string",defer=()=>{let ee,re;const te=new Promise((ne,ie)=>{ee=ne,re=ie});return te.resolve=ee,te.reject=re,te},makeString=ee=>ee==null?"":""+ee,copy=(ee,re,te)=>{ee.forEach(ne=>{re[ne]&&(te[ne]=re[ne])})},lastOfPathSeparatorRegExp=/###/g,cleanKey=ee=>ee&&ee.indexOf("###")>-1?ee.replace(lastOfPathSeparatorRegExp,"."):ee,canNotTraverseDeeper=ee=>!ee||isString$2(ee),getLastOfPath=(ee,re,te)=>{const ne=isString$2(re)?re.split("."):re;let ie=0;for(;ie<ne.length-1;){if(canNotTraverseDeeper(ee))return{};const oe=cleanKey(ne[ie]);!ee[oe]&&te&&(ee[oe]=new te),Object.prototype.hasOwnProperty.call(ee,oe)?ee=ee[oe]:ee={},++ie}return canNotTraverseDeeper(ee)?{}:{obj:ee,k:cleanKey(ne[ie])}},setPath=(ee,re,te)=>{const{obj:ne,k:ie}=getLastOfPath(ee,re,Object);if(ne!==void 0||re.length===1){ne[ie]=te;return}let oe=re[re.length-1],se=re.slice(0,re.length-1),ae=getLastOfPath(ee,se,Object);for(;ae.obj===void 0&&se.length;)oe=`${se[se.length-1]}.${oe}`,se=se.slice(0,se.length-1),ae=getLastOfPath(ee,se,Object),ae!=null&&ae.obj&&typeof ae.obj[`${ae.k}.${oe}`]<"u"&&(ae.obj=void 0);ae.obj[`${ae.k}.${oe}`]=te},pushPath=(ee,re,te,ne)=>{const{obj:ie,k:oe}=getLastOfPath(ee,re,Object);ie[oe]=ie[oe]||[],ie[oe].push(te)},getPath=(ee,re)=>{const{obj:te,k:ne}=getLastOfPath(ee,re);if(te&&Object.prototype.hasOwnProperty.call(te,ne))return te[ne]},getPathWithDefaults=(ee,re,te)=>{const ne=getPath(ee,te);return ne!==void 0?ne:getPath(re,te)},deepExtend=(ee,re,te)=>{for(const ne in re)ne!=="__proto__"&&ne!=="constructor"&&(ne in ee?isString$2(ee[ne])||ee[ne]instanceof String||isString$2(re[ne])||re[ne]instanceof String?te&&(ee[ne]=re[ne]):deepExtend(ee[ne],re[ne],te):ee[ne]=re[ne]);return ee},regexEscape=ee=>ee.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const escape$1=ee=>isString$2(ee)?ee.replace(/[&<>"'\/]/g,re=>_entityMap[re]):ee;class RegExpCache{constructor(re){this.capacity=re,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(re){const te=this.regExpMap.get(re);if(te!==void 0)return te;const ne=new RegExp(re);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(re,ne),this.regExpQueue.push(re),ne}}const chars=[" ",",","?","!",";"],looksLikeObjectPathRegExpCache=new RegExpCache(20),looksLikeObjectPath=(ee,re,te)=>{re=re||"",te=te||"";const ne=chars.filter(se=>re.indexOf(se)<0&&te.indexOf(se)<0);if(ne.length===0)return!0;const ie=looksLikeObjectPathRegExpCache.getRegExp(`(${ne.map(se=>se==="?"?"\\?":se).join("|")})`);let oe=!ie.test(ee);if(!oe){const se=ee.indexOf(te);se>0&&!ie.test(ee.substring(0,se))&&(oe=!0)}return oe},deepFind=function(ee,re){let te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!ee)return;if(ee[re])return Object.prototype.hasOwnProperty.call(ee,re)?ee[re]:void 0;const ne=re.split(te);let ie=ee;for(let oe=0;oe<ne.length;){if(!ie||typeof ie!="object")return;let se,ae="";for(let ce=oe;ce<ne.length;++ce)if(ce!==oe&&(ae+=te),ae+=ne[ce],se=ie[ae],se!==void 0){if(["string","number","boolean"].indexOf(typeof se)>-1&&ce<ne.length-1)continue;oe+=ce-oe+1;break}ie=se}return ie},getCleanedCode=ee=>ee==null?void 0:ee.replace("_","-"),consoleLogger={type:"logger",log(ee){this.output("log",ee)},warn(ee){this.output("warn",ee)},error(ee){this.output("error",ee)},output(ee,re){var te,ne;(ne=(te=console==null?void 0:console[ee])==null?void 0:te.apply)==null||ne.call(te,console,re)}};let Logger$1=class go{constructor(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(re,te)}init(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=te.prefix||"i18next:",this.logger=re||consoleLogger,this.options=te,this.debug=te.debug}log(){for(var re=arguments.length,te=new Array(re),ne=0;ne<re;ne++)te[ne]=arguments[ne];return this.forward(te,"log","",!0)}warn(){for(var re=arguments.length,te=new Array(re),ne=0;ne<re;ne++)te[ne]=arguments[ne];return this.forward(te,"warn","",!0)}error(){for(var re=arguments.length,te=new Array(re),ne=0;ne<re;ne++)te[ne]=arguments[ne];return this.forward(te,"error","")}deprecate(){for(var re=arguments.length,te=new Array(re),ne=0;ne<re;ne++)te[ne]=arguments[ne];return this.forward(te,"warn","WARNING DEPRECATED: ",!0)}forward(re,te,ne,ie){return ie&&!this.debug?null:(isString$2(re[0])&&(re[0]=`${ne}${this.prefix} ${re[0]}`),this.logger[te](re))}create(re){return new go(this.logger,{prefix:`${this.prefix}:${re}:`,...this.options})}clone(re){return re=re||this.options,re.prefix=re.prefix||this.prefix,new go(this.logger,re)}};var baseLogger=new Logger$1;class EventEmitter{constructor(){this.observers={}}on(re,te){return re.split(" ").forEach(ne=>{this.observers[ne]||(this.observers[ne]=new Map);const ie=this.observers[ne].get(te)||0;this.observers[ne].set(te,ie+1)}),this}off(re,te){if(this.observers[re]){if(!te){delete this.observers[re];return}this.observers[re].delete(te)}}emit(re){for(var te=arguments.length,ne=new Array(te>1?te-1:0),ie=1;ie<te;ie++)ne[ie-1]=arguments[ie];this.observers[re]&&Array.from(this.observers[re].entries()).forEach(se=>{let[ae,ce]=se;for(let ue=0;ue<ce;ue++)ae(...ne)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(se=>{let[ae,ce]=se;for(let ue=0;ue<ce;ue++)ae.apply(ae,[re,...ne])})}}class ResourceStore extends EventEmitter{constructor(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=re||{},this.options=te,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(re){this.options.ns.indexOf(re)<0&&this.options.ns.push(re)}removeNamespaces(re){const te=this.options.ns.indexOf(re);te>-1&&this.options.ns.splice(te,1)}getResource(re,te,ne){var ue,le;let ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const oe=ie.keySeparator!==void 0?ie.keySeparator:this.options.keySeparator,se=ie.ignoreJSONStructure!==void 0?ie.ignoreJSONStructure:this.options.ignoreJSONStructure;let ae;re.indexOf(".")>-1?ae=re.split("."):(ae=[re,te],ne&&(Array.isArray(ne)?ae.push(...ne):isString$2(ne)&&oe?ae.push(...ne.split(oe)):ae.push(ne)));const ce=getPath(this.data,ae);return!ce&&!te&&!ne&&re.indexOf(".")>-1&&(re=ae[0],te=ae[1],ne=ae.slice(2).join(".")),ce||!se||!isString$2(ne)?ce:deepFind((le=(ue=this.data)==null?void 0:ue[re])==null?void 0:le[te],ne,oe)}addResource(re,te,ne,ie){let oe=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const se=oe.keySeparator!==void 0?oe.keySeparator:this.options.keySeparator;let ae=[re,te];ne&&(ae=ae.concat(se?ne.split(se):ne)),re.indexOf(".")>-1&&(ae=re.split("."),ie=te,te=ae[1]),this.addNamespaces(te),setPath(this.data,ae,ie),oe.silent||this.emit("added",re,te,ne,ie)}addResources(re,te,ne){let ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const oe in ne)(isString$2(ne[oe])||Array.isArray(ne[oe]))&&this.addResource(re,te,oe,ne[oe],{silent:!0});ie.silent||this.emit("added",re,te,ne)}addResourceBundle(re,te,ne,ie,oe){let se=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},ae=[re,te];re.indexOf(".")>-1&&(ae=re.split("."),ie=ne,ne=te,te=ae[1]),this.addNamespaces(te);let ce=getPath(this.data,ae)||{};se.skipCopy||(ne=JSON.parse(JSON.stringify(ne))),ie?deepExtend(ce,ne,oe):ce={...ce,...ne},setPath(this.data,ae,ce),se.silent||this.emit("added",re,te,ne)}removeResourceBundle(re,te){this.hasResourceBundle(re,te)&&delete this.data[re][te],this.removeNamespaces(te),this.emit("removed",re,te)}hasResourceBundle(re,te){return this.getResource(re,te)!==void 0}getResourceBundle(re,te){return te||(te=this.options.defaultNS),this.getResource(re,te)}getDataByLanguage(re){return this.data[re]}hasLanguageSomeTranslations(re){const te=this.getDataByLanguage(re);return!!(te&&Object.keys(te)||[]).find(ie=>te[ie]&&Object.keys(te[ie]).length>0)}toJSON(){return this.data}}var postProcessor={processors:{},addPostProcessor(ee){this.processors[ee.name]=ee},handle(ee,re,te,ne,ie){return ee.forEach(oe=>{var se;re=((se=this.processors[oe])==null?void 0:se.process(re,te,ne,ie))??re}),re}};const checkedLoadedFor={},shouldHandleAsObject=ee=>!isString$2(ee)&&typeof ee!="boolean"&&typeof ee!="number";class Translator extends EventEmitter{constructor(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),copy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],re,this),this.options=te,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=baseLogger.create("translator")}changeLanguage(re){re&&(this.language=re)}exists(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(re==null)return!1;const ne=this.resolve(re,te);return(ne==null?void 0:ne.res)!==void 0}extractFromKey(re,te){let ne=te.nsSeparator!==void 0?te.nsSeparator:this.options.nsSeparator;ne===void 0&&(ne=":");const ie=te.keySeparator!==void 0?te.keySeparator:this.options.keySeparator;let oe=te.ns||this.options.defaultNS||[];const se=ne&&re.indexOf(ne)>-1,ae=!this.options.userDefinedKeySeparator&&!te.keySeparator&&!this.options.userDefinedNsSeparator&&!te.nsSeparator&&!looksLikeObjectPath(re,ne,ie);if(se&&!ae){const ce=re.match(this.interpolator.nestingRegexp);if(ce&&ce.length>0)return{key:re,namespaces:isString$2(oe)?[oe]:oe};const ue=re.split(ne);(ne!==ie||ne===ie&&this.options.ns.indexOf(ue[0])>-1)&&(oe=ue.shift()),re=ue.join(ie)}return{key:re,namespaces:isString$2(oe)?[oe]:oe}}translate(re,te,ne){if(typeof te!="object"&&this.options.overloadTranslationOptionHandler&&(te=this.options.overloadTranslationOptionHandler(arguments)),typeof te=="object"&&(te={...te}),te||(te={}),re==null)return"";Array.isArray(re)||(re=[String(re)]);const ie=te.returnDetails!==void 0?te.returnDetails:this.options.returnDetails,oe=te.keySeparator!==void 0?te.keySeparator:this.options.keySeparator,{key:se,namespaces:ae}=this.extractFromKey(re[re.length-1],te),ce=ae[ae.length-1],ue=te.lng||this.language,le=te.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((ue==null?void 0:ue.toLowerCase())==="cimode"){if(le){const Oe=te.nsSeparator||this.options.nsSeparator;return ie?{res:`${ce}${Oe}${se}`,usedKey:se,exactUsedKey:se,usedLng:ue,usedNS:ce,usedParams:this.getUsedParamsDetails(te)}:`${ce}${Oe}${se}`}return ie?{res:se,usedKey:se,exactUsedKey:se,usedLng:ue,usedNS:ce,usedParams:this.getUsedParamsDetails(te)}:se}const de=this.resolve(re,te);let fe=de==null?void 0:de.res;const he=(de==null?void 0:de.usedKey)||se,pe=(de==null?void 0:de.exactUsedKey)||se,ge=["[object Number]","[object Function]","[object RegExp]"],me=te.joinArrays!==void 0?te.joinArrays:this.options.joinArrays,ye=!this.i18nFormat||this.i18nFormat.handleAsObject,ve=te.count!==void 0&&!isString$2(te.count),be=Translator.hasDefaultValue(te),_e=ve?this.pluralResolver.getSuffix(ue,te.count,te):"",Ce=te.ordinal&&ve?this.pluralResolver.getSuffix(ue,te.count,{ordinal:!1}):"",Te=ve&&!te.ordinal&&te.count===0,Se=Te&&te[`defaultValue${this.options.pluralSeparator}zero`]||te[`defaultValue${_e}`]||te[`defaultValue${Ce}`]||te.defaultValue;let Re=fe;ye&&!fe&&be&&(Re=Se);const we=shouldHandleAsObject(Re),Ae=Object.prototype.toString.apply(Re);if(ye&&Re&&we&&ge.indexOf(Ae)<0&&!(isString$2(me)&&Array.isArray(Re))){if(!te.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Oe=this.options.returnedObjectHandler?this.options.returnedObjectHandler(he,Re,{...te,ns:ae}):`key '${se} (${this.language})' returned an object instead of string.`;return ie?(de.res=Oe,de.usedParams=this.getUsedParamsDetails(te),de):Oe}if(oe){const Oe=Array.isArray(Re),Ne=Oe?[]:{},Ue=Oe?pe:he;for(const Fe in Re)if(Object.prototype.hasOwnProperty.call(Re,Fe)){const Ve=`${Ue}${oe}${Fe}`;be&&!fe?Ne[Fe]=this.translate(Ve,{...te,defaultValue:shouldHandleAsObject(Se)?Se[Fe]:void 0,joinArrays:!1,ns:ae}):Ne[Fe]=this.translate(Ve,{...te,joinArrays:!1,ns:ae}),Ne[Fe]===Ve&&(Ne[Fe]=Re[Fe])}fe=Ne}}else if(ye&&isString$2(me)&&Array.isArray(fe))fe=fe.join(me),fe&&(fe=this.extendTranslation(fe,re,te,ne));else{let Oe=!1,Ne=!1;!this.isValidLookup(fe)&&be&&(Oe=!0,fe=Se),this.isValidLookup(fe)||(Ne=!0,fe=se);const Fe=(te.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Ne?void 0:fe,Ve=be&&Se!==fe&&this.options.updateMissing;if(Ne||Oe||Ve){if(this.logger.log(Ve?"updateKey":"missingKey",ue,ce,se,Ve?Se:fe),oe){const hr=this.resolve(se,{...te,keySeparator:!1});hr&&hr.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 He=[];const ur=this.languageUtils.getFallbackCodes(this.options.fallbackLng,te.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ur&&ur[0])for(let hr=0;hr<ur.length;hr++)He.push(ur[hr]);else this.options.saveMissingTo==="all"?He=this.languageUtils.toResolveHierarchy(te.lng||this.language):He.push(te.lng||this.language);const qe=(hr,fr,dr)=>{var Bt;const Qe=be&&dr!==fe?dr:Fe;this.options.missingKeyHandler?this.options.missingKeyHandler(hr,ce,fr,Qe,Ve,te):(Bt=this.backendConnector)!=null&&Bt.saveMissing&&this.backendConnector.saveMissing(hr,ce,fr,Qe,Ve,te),this.emit("missingKey",hr,ce,fr,fe)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ve?He.forEach(hr=>{const fr=this.pluralResolver.getSuffixes(hr,te);Te&&te[`defaultValue${this.options.pluralSeparator}zero`]&&fr.indexOf(`${this.options.pluralSeparator}zero`)<0&&fr.push(`${this.options.pluralSeparator}zero`),fr.forEach(dr=>{qe([hr],se+dr,te[`defaultValue${dr}`]||Se)})}):qe(He,se,Se))}fe=this.extendTranslation(fe,re,te,de,ne),Ne&&fe===se&&this.options.appendNamespaceToMissingKey&&(fe=`${ce}:${se}`),(Ne||Oe)&&this.options.parseMissingKeyHandler&&(fe=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${ce}:${se}`:se,Oe?fe:void 0))}return ie?(de.res=fe,de.usedParams=this.getUsedParamsDetails(te),de):fe}extendTranslation(re,te,ne,ie,oe){var ue,le;var se=this;if((ue=this.i18nFormat)!=null&&ue.parse)re=this.i18nFormat.parse(re,{...this.options.interpolation.defaultVariables,...ne},ne.lng||this.language||ie.usedLng,ie.usedNS,ie.usedKey,{resolved:ie});else if(!ne.skipInterpolation){ne.interpolation&&this.interpolator.init({...ne,interpolation:{...this.options.interpolation,...ne.interpolation}});const de=isString$2(re)&&(((le=ne==null?void 0:ne.interpolation)==null?void 0:le.skipOnVariables)!==void 0?ne.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let fe;if(de){const pe=re.match(this.interpolator.nestingRegexp);fe=pe&&pe.length}let he=ne.replace&&!isString$2(ne.replace)?ne.replace:ne;if(this.options.interpolation.defaultVariables&&(he={...this.options.interpolation.defaultVariables,...he}),re=this.interpolator.interpolate(re,he,ne.lng||this.language||ie.usedLng,ne),de){const pe=re.match(this.interpolator.nestingRegexp),ge=pe&&pe.length;fe<ge&&(ne.nest=!1)}!ne.lng&&ie&&ie.res&&(ne.lng=this.language||ie.usedLng),ne.nest!==!1&&(re=this.interpolator.nest(re,function(){for(var pe=arguments.length,ge=new Array(pe),me=0;me<pe;me++)ge[me]=arguments[me];return(oe==null?void 0:oe[0])===ge[0]&&!ne.context?(se.logger.warn(`It seems you are nesting recursively key: ${ge[0]} in key: ${te[0]}`),null):se.translate(...ge,te)},ne)),ne.interpolation&&this.interpolator.reset()}const ae=ne.postProcess||this.options.postProcess,ce=isString$2(ae)?[ae]:ae;return re!=null&&(ce!=null&&ce.length)&&ne.applyPostProcessor!==!1&&(re=postProcessor.handle(ce,re,te,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...ie,usedParams:this.getUsedParamsDetails(ne)},...ne}:ne,this)),re}resolve(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne,ie,oe,se,ae;return isString$2(re)&&(re=[re]),re.forEach(ce=>{if(this.isValidLookup(ne))return;const ue=this.extractFromKey(ce,te),le=ue.key;ie=le;let de=ue.namespaces;this.options.fallbackNS&&(de=de.concat(this.options.fallbackNS));const fe=te.count!==void 0&&!isString$2(te.count),he=fe&&!te.ordinal&&te.count===0,pe=te.context!==void 0&&(isString$2(te.context)||typeof te.context=="number")&&te.context!=="",ge=te.lngs?te.lngs:this.languageUtils.toResolveHierarchy(te.lng||this.language,te.fallbackLng);de.forEach(me=>{var ye,ve;this.isValidLookup(ne)||(ae=me,!checkedLoadedFor[`${ge[0]}-${me}`]&&((ye=this.utils)!=null&&ye.hasLoadedNamespace)&&!((ve=this.utils)!=null&&ve.hasLoadedNamespace(ae))&&(checkedLoadedFor[`${ge[0]}-${me}`]=!0,this.logger.warn(`key "${ie}" for languages "${ge.join(", ")}" won't get resolved as namespace "${ae}" 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!!!")),ge.forEach(be=>{var Te;if(this.isValidLookup(ne))return;se=be;const _e=[le];if((Te=this.i18nFormat)!=null&&Te.addLookupKeys)this.i18nFormat.addLookupKeys(_e,le,be,me,te);else{let Se;fe&&(Se=this.pluralResolver.getSuffix(be,te.count,te));const Re=`${this.options.pluralSeparator}zero`,we=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(fe&&(_e.push(le+Se),te.ordinal&&Se.indexOf(we)===0&&_e.push(le+Se.replace(we,this.options.pluralSeparator)),he&&_e.push(le+Re)),pe){const Ae=`${le}${this.options.contextSeparator}${te.context}`;_e.push(Ae),fe&&(_e.push(Ae+Se),te.ordinal&&Se.indexOf(we)===0&&_e.push(Ae+Se.replace(we,this.options.pluralSeparator)),he&&_e.push(Ae+Re))}}let Ce;for(;Ce=_e.pop();)this.isValidLookup(ne)||(oe=Ce,ne=this.getResource(be,me,Ce,te))}))})}),{res:ne,usedKey:ie,exactUsedKey:oe,usedLng:se,usedNS:ae}}isValidLookup(re){return re!==void 0&&!(!this.options.returnNull&&re===null)&&!(!this.options.returnEmptyString&&re==="")}getResource(re,te,ne){var oe;let ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(oe=this.i18nFormat)!=null&&oe.getResource?this.i18nFormat.getResource(re,te,ne,ie):this.resourceStore.getResource(re,te,ne,ie)}getUsedParamsDetails(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const te=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],ne=re.replace&&!isString$2(re.replace);let ie=ne?re.replace:re;if(ne&&typeof re.count<"u"&&(ie.count=re.count),this.options.interpolation.defaultVariables&&(ie={...this.options.interpolation.defaultVariables,...ie}),!ne){ie={...ie};for(const oe of te)delete ie[oe]}return ie}static hasDefaultValue(re){const te="defaultValue";for(const ne in re)if(Object.prototype.hasOwnProperty.call(re,ne)&&te===ne.substring(0,te.length)&&re[ne]!==void 0)return!0;return!1}}class LanguageUtil{constructor(re){this.options=re,this.supportedLngs=this.options.supportedLngs||!1,this.logger=baseLogger.create("languageUtils")}getScriptPartFromCode(re){if(re=getCleanedCode(re),!re||re.indexOf("-")<0)return null;const te=re.split("-");return te.length===2||(te.pop(),te[te.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(te.join("-"))}getLanguagePartFromCode(re){if(re=getCleanedCode(re),!re||re.indexOf("-")<0)return re;const te=re.split("-");return this.formatLanguageCode(te[0])}formatLanguageCode(re){if(isString$2(re)&&re.indexOf("-")>-1){let te;try{te=Intl.getCanonicalLocales(re)[0]}catch{}return te&&this.options.lowerCaseLng&&(te=te.toLowerCase()),te||(this.options.lowerCaseLng?re.toLowerCase():re)}return this.options.cleanCode||this.options.lowerCaseLng?re.toLowerCase():re}isSupportedCode(re){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(re=this.getLanguagePartFromCode(re)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(re)>-1}getBestMatchFromCodes(re){if(!re)return null;let te;return re.forEach(ne=>{if(te)return;const ie=this.formatLanguageCode(ne);(!this.options.supportedLngs||this.isSupportedCode(ie))&&(te=ie)}),!te&&this.options.supportedLngs&&re.forEach(ne=>{if(te)return;const ie=this.getLanguagePartFromCode(ne);if(this.isSupportedCode(ie))return te=ie;te=this.options.supportedLngs.find(oe=>{if(oe===ie)return oe;if(!(oe.indexOf("-")<0&&ie.indexOf("-")<0)&&(oe.indexOf("-")>0&&ie.indexOf("-")<0&&oe.substring(0,oe.indexOf("-"))===ie||oe.indexOf(ie)===0&&ie.length>1))return oe})}),te||(te=this.getFallbackCodes(this.options.fallbackLng)[0]),te}getFallbackCodes(re,te){if(!re)return[];if(typeof re=="function"&&(re=re(te)),isString$2(re)&&(re=[re]),Array.isArray(re))return re;if(!te)return re.default||[];let ne=re[te];return ne||(ne=re[this.getScriptPartFromCode(te)]),ne||(ne=re[this.formatLanguageCode(te)]),ne||(ne=re[this.getLanguagePartFromCode(te)]),ne||(ne=re.default),ne||[]}toResolveHierarchy(re,te){const ne=this.getFallbackCodes(te||this.options.fallbackLng||[],re),ie=[],oe=se=>{se&&(this.isSupportedCode(se)?ie.push(se):this.logger.warn(`rejecting language code not found in supportedLngs: ${se}`))};return isString$2(re)&&(re.indexOf("-")>-1||re.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&oe(this.formatLanguageCode(re)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&oe(this.getScriptPartFromCode(re)),this.options.load!=="currentOnly"&&oe(this.getLanguagePartFromCode(re))):isString$2(re)&&oe(this.formatLanguageCode(re)),ne.forEach(se=>{ie.indexOf(se)<0&&oe(this.formatLanguageCode(se))}),ie}}const suffixesOrder={zero:0,one:1,two:2,few:3,many:4,other:5},dummyRule={select:ee=>ee===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=re,this.options=te,this.logger=baseLogger.create("pluralResolver"),this.pluralRulesCache={}}addRule(re,te){this.rules[re]=te}clearCache(){this.pluralRulesCache={}}getRule(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const ne=getCleanedCode(re==="dev"?"en":re),ie=te.ordinal?"ordinal":"cardinal",oe=JSON.stringify({cleanedCode:ne,type:ie});if(oe in this.pluralRulesCache)return this.pluralRulesCache[oe];let se;try{se=new Intl.PluralRules(ne,{type:ie})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),dummyRule;if(!re.match(/-|_/))return dummyRule;const ce=this.languageUtils.getLanguagePartFromCode(re);se=this.getRule(ce,te)}return this.pluralRulesCache[oe]=se,se}needsPlural(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=this.getRule(re,te);return ne||(ne=this.getRule("dev",te)),(ne==null?void 0:ne.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(re,te){let ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(re,ne).map(ie=>`${te}${ie}`)}getSuffixes(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=this.getRule(re,te);return ne||(ne=this.getRule("dev",te)),ne?ne.resolvedOptions().pluralCategories.sort((ie,oe)=>suffixesOrder[ie]-suffixesOrder[oe]).map(ie=>`${this.options.prepend}${te.ordinal?`ordinal${this.options.prepend}`:""}${ie}`):[]}getSuffix(re,te){let ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const ie=this.getRule(re,ne);return ie?`${this.options.prepend}${ne.ordinal?`ordinal${this.options.prepend}`:""}${ie.select(te)}`:(this.logger.warn(`no plural rule found for: ${re}`),this.getSuffix("dev",te,ne))}}const deepFindWithDefaults=function(ee,re,te){let ne=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",ie=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,oe=getPathWithDefaults(ee,re,te);return!oe&&ie&&isString$2(te)&&(oe=deepFind(ee,te,ne),oe===void 0&&(oe=deepFind(re,te,ne))),oe},regexSafe=ee=>ee.replace(/\$/g,"$$$$");class Interpolator{constructor(){var te;let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=baseLogger.create("interpolator"),this.options=re,this.format=((te=re==null?void 0:re.interpolation)==null?void 0:te.format)||(ne=>ne),this.init(re)}init(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};re.interpolation||(re.interpolation={escapeValue:!0});const{escape:te,escapeValue:ne,useRawValueToEscape:ie,prefix:oe,prefixEscaped:se,suffix:ae,suffixEscaped:ce,formatSeparator:ue,unescapeSuffix:le,unescapePrefix:de,nestingPrefix:fe,nestingPrefixEscaped:he,nestingSuffix:pe,nestingSuffixEscaped:ge,nestingOptionsSeparator:me,maxReplaces:ye,alwaysFormat:ve}=re.interpolation;this.escape=te!==void 0?te:escape$1,this.escapeValue=ne!==void 0?ne:!0,this.useRawValueToEscape=ie!==void 0?ie:!1,this.prefix=oe?regexEscape(oe):se||"{{",this.suffix=ae?regexEscape(ae):ce||"}}",this.formatSeparator=ue||",",this.unescapePrefix=le?"":de||"-",this.unescapeSuffix=this.unescapePrefix?"":le||"",this.nestingPrefix=fe?regexEscape(fe):he||regexEscape("$t("),this.nestingSuffix=pe?regexEscape(pe):ge||regexEscape(")"),this.nestingOptionsSeparator=me||",",this.maxReplaces=ye||1e3,this.alwaysFormat=ve!==void 0?ve:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const re=(te,ne)=>(te==null?void 0:te.source)===ne?(te.lastIndex=0,te):new RegExp(ne,"g");this.regexp=re(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=re(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=re(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(re,te,ne,ie){var he;let oe,se,ae;const ce=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},ue=pe=>{if(pe.indexOf(this.formatSeparator)<0){const ve=deepFindWithDefaults(te,ce,pe,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(ve,void 0,ne,{...ie,...te,interpolationkey:pe}):ve}const ge=pe.split(this.formatSeparator),me=ge.shift().trim(),ye=ge.join(this.formatSeparator).trim();return this.format(deepFindWithDefaults(te,ce,me,this.options.keySeparator,this.options.ignoreJSONStructure),ye,ne,{...ie,...te,interpolationkey:me})};this.resetRegExp();const le=(ie==null?void 0:ie.missingInterpolationHandler)||this.options.missingInterpolationHandler,de=((he=ie==null?void 0:ie.interpolation)==null?void 0:he.skipOnVariables)!==void 0?ie.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:pe=>regexSafe(pe)},{regex:this.regexp,safeValue:pe=>this.escapeValue?regexSafe(this.escape(pe)):regexSafe(pe)}].forEach(pe=>{for(ae=0;oe=pe.regex.exec(re);){const ge=oe[1].trim();if(se=ue(ge),se===void 0)if(typeof le=="function"){const ye=le(re,oe,ie);se=isString$2(ye)?ye:""}else if(ie&&Object.prototype.hasOwnProperty.call(ie,ge))se="";else if(de){se=oe[0];continue}else this.logger.warn(`missed to pass in variable ${ge} for interpolating ${re}`),se="";else!isString$2(se)&&!this.useRawValueToEscape&&(se=makeString(se));const me=pe.safeValue(se);if(re=re.replace(oe[0],me),de?(pe.regex.lastIndex+=se.length,pe.regex.lastIndex-=oe[0].length):pe.regex.lastIndex=0,ae++,ae>=this.maxReplaces)break}}),re}nest(re,te){let ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ie,oe,se;const ae=(ce,ue)=>{const le=this.nestingOptionsSeparator;if(ce.indexOf(le)<0)return ce;const de=ce.split(new RegExp(`${le}[ ]*{`));let fe=`{${de[1]}`;ce=de[0],fe=this.interpolate(fe,se);const he=fe.match(/'/g),pe=fe.match(/"/g);(((he==null?void 0:he.length)??0)%2===0&&!pe||pe.length%2!==0)&&(fe=fe.replace(/'/g,'"'));try{se=JSON.parse(fe),ue&&(se={...ue,...se})}catch(ge){return this.logger.warn(`failed parsing options string in nesting for key ${ce}`,ge),`${ce}${le}${fe}`}return se.defaultValue&&se.defaultValue.indexOf(this.prefix)>-1&&delete se.defaultValue,ce};for(;ie=this.nestingRegexp.exec(re);){let ce=[];se={...ne},se=se.replace&&!isString$2(se.replace)?se.replace:se,se.applyPostProcessor=!1,delete se.defaultValue;let ue=!1;if(ie[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(ie[1])){const le=ie[1].split(this.formatSeparator).map(de=>de.trim());ie[1]=le.shift(),ce=le,ue=!0}if(oe=te(ae.call(this,ie[1].trim(),se),se),oe&&ie[0]===re&&!isString$2(oe))return oe;isString$2(oe)||(oe=makeString(oe)),oe||(this.logger.warn(`missed to resolve ${ie[1]} for nesting ${re}`),oe=""),ue&&(oe=ce.reduce((le,de)=>this.format(le,de,ne.lng,{...ne,interpolationkey:ie[1].trim()}),oe.trim())),re=re.replace(ie[0],oe),this.regexp.lastIndex=0}return re}}const parseFormatStr=ee=>{let re=ee.toLowerCase().trim();const te={};if(ee.indexOf("(")>-1){const ne=ee.split("(");re=ne[0].toLowerCase().trim();const ie=ne[1].substring(0,ne[1].length-1);re==="currency"&&ie.indexOf(":")<0?te.currency||(te.currency=ie.trim()):re==="relativetime"&&ie.indexOf(":")<0?te.range||(te.range=ie.trim()):ie.split(";").forEach(se=>{if(se){const[ae,...ce]=se.split(":"),ue=ce.join(":").trim().replace(/^'+|'+$/g,""),le=ae.trim();te[le]||(te[le]=ue),ue==="false"&&(te[le]=!1),ue==="true"&&(te[le]=!0),isNaN(ue)||(te[le]=parseInt(ue,10))}})}return{formatName:re,formatOptions:te}},createCachedFormatter=ee=>{const re={};return(te,ne,ie)=>{let oe=ie;ie&&ie.interpolationkey&&ie.formatParams&&ie.formatParams[ie.interpolationkey]&&ie[ie.interpolationkey]&&(oe={...oe,[ie.interpolationkey]:void 0});const se=ne+JSON.stringify(oe);let ae=re[se];return ae||(ae=ee(getCleanedCode(ne),ie),re[se]=ae),ae(te)}};class Formatter{constructor(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=baseLogger.create("formatter"),this.options=re,this.formats={number:createCachedFormatter((te,ne)=>{const ie=new Intl.NumberFormat(te,{...ne});return oe=>ie.format(oe)}),currency:createCachedFormatter((te,ne)=>{const ie=new Intl.NumberFormat(te,{...ne,style:"currency"});return oe=>ie.format(oe)}),datetime:createCachedFormatter((te,ne)=>{const ie=new Intl.DateTimeFormat(te,{...ne});return oe=>ie.format(oe)}),relativetime:createCachedFormatter((te,ne)=>{const ie=new Intl.RelativeTimeFormat(te,{...ne});return oe=>ie.format(oe,ne.range||"day")}),list:createCachedFormatter((te,ne)=>{const ie=new Intl.ListFormat(te,{...ne});return oe=>ie.format(oe)})},this.init(re)}init(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=te.interpolation.formatSeparator||","}add(re,te){this.formats[re.toLowerCase().trim()]=te}addCached(re,te){this.formats[re.toLowerCase().trim()]=createCachedFormatter(te)}format(re,te,ne){let ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const oe=te.split(this.formatSeparator);if(oe.length>1&&oe[0].indexOf("(")>1&&oe[0].indexOf(")")<0&&oe.find(ae=>ae.indexOf(")")>-1)){const ae=oe.findIndex(ce=>ce.indexOf(")")>-1);oe[0]=[oe[0],...oe.splice(1,ae)].join(this.formatSeparator)}return oe.reduce((ae,ce)=>{var de;const{formatName:ue,formatOptions:le}=parseFormatStr(ce);if(this.formats[ue]){let fe=ae;try{const he=((de=ie==null?void 0:ie.formatParams)==null?void 0:de[ie.interpolationkey])||{},pe=he.locale||he.lng||ie.locale||ie.lng||ne;fe=this.formats[ue](ae,pe,{...le,...ie,...he})}catch(he){this.logger.warn(he)}return fe}else this.logger.warn(`there was no format function for ${ue}`);return ae},re)}}const removePending=(ee,re)=>{ee.pending[re]!==void 0&&(delete ee.pending[re],ee.pendingCount--)};class Connector extends EventEmitter{constructor(re,te,ne){var oe,se;let ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=re,this.store=te,this.services=ne,this.languageUtils=ne.languageUtils,this.options=ie,this.logger=baseLogger.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=ie.maxParallelReads||10,this.readingCalls=0,this.maxRetries=ie.maxRetries>=0?ie.maxRetries:5,this.retryTimeout=ie.retryTimeout>=1?ie.retryTimeout:350,this.state={},this.queue=[],(se=(oe=this.backend)==null?void 0:oe.init)==null||se.call(oe,ne,ie.backend,ie)}queueLoad(re,te,ne,ie){const oe={},se={},ae={},ce={};return re.forEach(ue=>{let le=!0;te.forEach(de=>{const fe=`${ue}|${de}`;!ne.reload&&this.store.hasResourceBundle(ue,de)?this.state[fe]=2:this.state[fe]<0||(this.state[fe]===1?se[fe]===void 0&&(se[fe]=!0):(this.state[fe]=1,le=!1,se[fe]===void 0&&(se[fe]=!0),oe[fe]===void 0&&(oe[fe]=!0),ce[de]===void 0&&(ce[de]=!0)))}),le||(ae[ue]=!0)}),(Object.keys(oe).length||Object.keys(se).length)&&this.queue.push({pending:se,pendingCount:Object.keys(se).length,loaded:{},errors:[],callback:ie}),{toLoad:Object.keys(oe),pending:Object.keys(se),toLoadLanguages:Object.keys(ae),toLoadNamespaces:Object.keys(ce)}}loaded(re,te,ne){const ie=re.split("|"),oe=ie[0],se=ie[1];te&&this.emit("failedLoading",oe,se,te),!te&&ne&&this.store.addResourceBundle(oe,se,ne,void 0,void 0,{skipCopy:!0}),this.state[re]=te?-1:2,te&&ne&&(this.state[re]=0);const ae={};this.queue.forEach(ce=>{pushPath(ce.loaded,[oe],se),removePending(ce,re),te&&ce.errors.push(te),ce.pendingCount===0&&!ce.done&&(Object.keys(ce.loaded).forEach(ue=>{ae[ue]||(ae[ue]={});const le=ce.loaded[ue];le.length&&le.forEach(de=>{ae[ue][de]===void 0&&(ae[ue][de]=!0)})}),ce.done=!0,ce.errors.length?ce.callback(ce.errors):ce.callback())}),this.emit("loaded",ae),this.queue=this.queue.filter(ce=>!ce.done)}read(re,te,ne){let ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,oe=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,se=arguments.length>5?arguments[5]:void 0;if(!re.length)return se(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:re,ns:te,fcName:ne,tried:ie,wait:oe,callback:se});return}this.readingCalls++;const ae=(ue,le)=>{if(this.readingCalls--,this.waitingReads.length>0){const de=this.waitingReads.shift();this.read(de.lng,de.ns,de.fcName,de.tried,de.wait,de.callback)}if(ue&&le&&ie<this.maxRetries){setTimeout(()=>{this.read.call(this,re,te,ne,ie+1,oe*2,se)},oe);return}se(ue,le)},ce=this.backend[ne].bind(this.backend);if(ce.length===2){try{const ue=ce(re,te);ue&&typeof ue.then=="function"?ue.then(le=>ae(null,le)).catch(ae):ae(null,ue)}catch(ue){ae(ue)}return}return ce(re,te,ae)}prepareLoading(re,te){let ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ie=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."),ie&&ie();isString$2(re)&&(re=this.languageUtils.toResolveHierarchy(re)),isString$2(te)&&(te=[te]);const oe=this.queueLoad(re,te,ne,ie);if(!oe.toLoad.length)return oe.pending.length||ie(),null;oe.toLoad.forEach(se=>{this.loadOne(se)})}load(re,te,ne){this.prepareLoading(re,te,{},ne)}reload(re,te,ne){this.prepareLoading(re,te,{reload:!0},ne)}loadOne(re){let te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const ne=re.split("|"),ie=ne[0],oe=ne[1];this.read(ie,oe,"read",void 0,void 0,(se,ae)=>{se&&this.logger.warn(`${te}loading namespace ${oe} for language ${ie} failed`,se),!se&&ae&&this.logger.log(`${te}loaded namespace ${oe} for language ${ie}`,ae),this.loaded(re,se,ae)})}saveMissing(re,te,ne,ie,oe){var ce,ue,le,de,fe;let se=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},ae=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((ue=(ce=this.services)==null?void 0:ce.utils)!=null&&ue.hasLoadedNamespace&&!((de=(le=this.services)==null?void 0:le.utils)!=null&&de.hasLoadedNamespace(te))){this.logger.warn(`did not save key "${ne}" as the namespace "${te}" 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(!(ne==null||ne==="")){if((fe=this.backend)!=null&&fe.create){const he={...se,isUpdate:oe},pe=this.backend.create.bind(this.backend);if(pe.length<6)try{let ge;pe.length===5?ge=pe(re,te,ne,ie,he):ge=pe(re,te,ne,ie),ge&&typeof ge.then=="function"?ge.then(me=>ae(null,me)).catch(ae):ae(null,ge)}catch(ge){ae(ge)}else pe(re,te,ne,ie,ae,he)}!re||!re[0]||this.store.addResource(re[0],te,ne,ie)}}}const get=()=>({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:ee=>{let re={};if(typeof ee[1]=="object"&&(re=ee[1]),isString$2(ee[1])&&(re.defaultValue=ee[1]),isString$2(ee[2])&&(re.tDescription=ee[2]),typeof ee[2]=="object"||typeof ee[3]=="object"){const te=ee[3]||ee[2];Object.keys(te).forEach(ne=>{re[ne]=te[ne]})}return re},interpolation:{escapeValue:!0,format:ee=>ee,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),transformOptions=ee=>{var re,te;return isString$2(ee.ns)&&(ee.ns=[ee.ns]),isString$2(ee.fallbackLng)&&(ee.fallbackLng=[ee.fallbackLng]),isString$2(ee.fallbackNS)&&(ee.fallbackNS=[ee.fallbackNS]),((te=(re=ee.supportedLngs)==null?void 0:re.indexOf)==null?void 0:te.call(re,"cimode"))<0&&(ee.supportedLngs=ee.supportedLngs.concat(["cimode"])),typeof ee.initImmediate=="boolean"&&(ee.initAsync=ee.initImmediate),ee},noop$3=()=>{},bindMemberFunctions=ee=>{Object.getOwnPropertyNames(Object.getPrototypeOf(ee)).forEach(te=>{typeof ee[te]=="function"&&(ee[te]=ee[te].bind(ee))})};class I18n extends EventEmitter{constructor(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=arguments.length>1?arguments[1]:void 0;if(super(),this.options=transformOptions(re),this.services={},this.logger=baseLogger,this.modules={external:[]},bindMemberFunctions(this),te&&!this.isInitialized&&!re.isClone){if(!this.options.initAsync)return this.init(re,te),this;setTimeout(()=>{this.init(re,te)},0)}}init(){var re=this;let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof te=="function"&&(ne=te,te={}),te.defaultNS==null&&te.ns&&(isString$2(te.ns)?te.defaultNS=te.ns:te.ns.indexOf("translation")<0&&(te.defaultNS=te.ns[0]));const ie=get();this.options={...ie,...this.options,...transformOptions(te)},this.options.interpolation={...ie.interpolation,...this.options.interpolation},te.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=te.keySeparator),te.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=te.nsSeparator);const oe=le=>le?typeof le=="function"?new le:le:null;if(!this.options.isClone){this.modules.logger?baseLogger.init(oe(this.modules.logger),this.options):baseLogger.init(null,this.options);let le;this.modules.formatter?le=this.modules.formatter:le=Formatter;const de=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const fe=this.services;fe.logger=baseLogger,fe.resourceStore=this.store,fe.languageUtils=de,fe.pluralResolver=new PluralResolver(de,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),le&&(!this.options.interpolation.format||this.options.interpolation.format===ie.interpolation.format)&&(fe.formatter=oe(le),fe.formatter.init(fe,this.options),this.options.interpolation.format=fe.formatter.format.bind(fe.formatter)),fe.interpolator=new Interpolator(this.options),fe.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},fe.backendConnector=new Connector(oe(this.modules.backend),fe.resourceStore,fe,this.options),fe.backendConnector.on("*",function(he){for(var pe=arguments.length,ge=new Array(pe>1?pe-1:0),me=1;me<pe;me++)ge[me-1]=arguments[me];re.emit(he,...ge)}),this.modules.languageDetector&&(fe.languageDetector=oe(this.modules.languageDetector),fe.languageDetector.init&&fe.languageDetector.init(fe,this.options.detection,this.options)),this.modules.i18nFormat&&(fe.i18nFormat=oe(this.modules.i18nFormat),fe.i18nFormat.init&&fe.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",function(he){for(var pe=arguments.length,ge=new Array(pe>1?pe-1:0),me=1;me<pe;me++)ge[me-1]=arguments[me];re.emit(he,...ge)}),this.modules.external.forEach(he=>{he.init&&he.init(this)})}if(this.format=this.options.interpolation.format,ne||(ne=noop$3),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const le=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);le.length>0&&le[0]!=="dev"&&(this.options.lng=le[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(le=>{this[le]=function(){return re.store[le](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(le=>{this[le]=function(){return re.store[le](...arguments),re}});const ce=defer(),ue=()=>{const le=(de,fe)=>{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),ce.resolve(fe),ne(de,fe)};if(this.languages&&!this.isInitialized)return le(null,this.t.bind(this));this.changeLanguage(this.options.lng,le)};return this.options.resources||!this.options.initAsync?ue():setTimeout(ue,0),ce}loadResources(re){var oe,se;let ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:noop$3;const ie=isString$2(re)?re:this.language;if(typeof re=="function"&&(ne=re),!this.options.resources||this.options.partialBundledLanguages){if((ie==null?void 0:ie.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return ne();const ae=[],ce=ue=>{if(!ue||ue==="cimode")return;this.services.languageUtils.toResolveHierarchy(ue).forEach(de=>{de!=="cimode"&&ae.indexOf(de)<0&&ae.push(de)})};ie?ce(ie):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(le=>ce(le)),(se=(oe=this.options.preload)==null?void 0:oe.forEach)==null||se.call(oe,ue=>ce(ue)),this.services.backendConnector.load(ae,this.options.ns,ue=>{!ue&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),ne(ue)})}else ne(null)}reloadResources(re,te,ne){const ie=defer();return typeof re=="function"&&(ne=re,re=void 0),typeof te=="function"&&(ne=te,te=void 0),re||(re=this.languages),te||(te=this.options.ns),ne||(ne=noop$3),this.services.backendConnector.reload(re,te,oe=>{ie.resolve(),ne(oe)}),ie}use(re){if(!re)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!re.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return re.type==="backend"&&(this.modules.backend=re),(re.type==="logger"||re.log&&re.warn&&re.error)&&(this.modules.logger=re),re.type==="languageDetector"&&(this.modules.languageDetector=re),re.type==="i18nFormat"&&(this.modules.i18nFormat=re),re.type==="postProcessor"&&postProcessor.addPostProcessor(re),re.type==="formatter"&&(this.modules.formatter=re),re.type==="3rdParty"&&this.modules.external.push(re),this}setResolvedLanguage(re){if(!(!re||!this.languages)&&!(["cimode","dev"].indexOf(re)>-1))for(let te=0;te<this.languages.length;te++){const ne=this.languages[te];if(!(["cimode","dev"].indexOf(ne)>-1)&&this.store.hasLanguageSomeTranslations(ne)){this.resolvedLanguage=ne;break}}}changeLanguage(re,te){var ne=this;this.isLanguageChangingTo=re;const ie=defer();this.emit("languageChanging",re);const oe=ce=>{this.language=ce,this.languages=this.services.languageUtils.toResolveHierarchy(ce),this.resolvedLanguage=void 0,this.setResolvedLanguage(ce)},se=(ce,ue)=>{ue?(oe(ue),this.translator.changeLanguage(ue),this.isLanguageChangingTo=void 0,this.emit("languageChanged",ue),this.logger.log("languageChanged",ue)):this.isLanguageChangingTo=void 0,ie.resolve(function(){return ne.t(...arguments)}),te&&te(ce,function(){return ne.t(...arguments)})},ae=ce=>{var le,de;!re&&!ce&&this.services.languageDetector&&(ce=[]);const ue=isString$2(ce)?ce:this.services.languageUtils.getBestMatchFromCodes(ce);ue&&(this.language||oe(ue),this.translator.language||this.translator.changeLanguage(ue),(de=(le=this.services.languageDetector)==null?void 0:le.cacheUserLanguage)==null||de.call(le,ue)),this.loadResources(ue,fe=>{se(fe,ue)})};return!re&&this.services.languageDetector&&!this.services.languageDetector.async?ae(this.services.languageDetector.detect()):!re&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(ae):this.services.languageDetector.detect(ae):ae(re),ie}getFixedT(re,te,ne){var ie=this;const oe=function(se,ae){let ce;if(typeof ae!="object"){for(var ue=arguments.length,le=new Array(ue>2?ue-2:0),de=2;de<ue;de++)le[de-2]=arguments[de];ce=ie.options.overloadTranslationOptionHandler([se,ae].concat(le))}else ce={...ae};ce.lng=ce.lng||oe.lng,ce.lngs=ce.lngs||oe.lngs,ce.ns=ce.ns||oe.ns,ce.keyPrefix!==""&&(ce.keyPrefix=ce.keyPrefix||ne||oe.keyPrefix);const fe=ie.options.keySeparator||".";let he;return ce.keyPrefix&&Array.isArray(se)?he=se.map(pe=>`${ce.keyPrefix}${fe}${pe}`):he=ce.keyPrefix?`${ce.keyPrefix}${fe}${se}`:se,ie.t(he,ce)};return isString$2(re)?oe.lng=re:oe.lngs=re,oe.ns=te,oe.keyPrefix=ne,oe}t(){var ie;for(var re=arguments.length,te=new Array(re),ne=0;ne<re;ne++)te[ne]=arguments[ne];return(ie=this.translator)==null?void 0:ie.translate(...te)}exists(){var ie;for(var re=arguments.length,te=new Array(re),ne=0;ne<re;ne++)te[ne]=arguments[ne];return(ie=this.translator)==null?void 0:ie.exists(...te)}setDefaultNamespace(re){this.options.defaultNS=re}hasLoadedNamespace(re){let te=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 ne=te.lng||this.resolvedLanguage||this.languages[0],ie=this.options?this.options.fallbackLng:!1,oe=this.languages[this.languages.length-1];if(ne.toLowerCase()==="cimode")return!0;const se=(ae,ce)=>{const ue=this.services.backendConnector.state[`${ae}|${ce}`];return ue===-1||ue===0||ue===2};if(te.precheck){const ae=te.precheck(this,se);if(ae!==void 0)return ae}return!!(this.hasResourceBundle(ne,re)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||se(ne,re)&&(!ie||se(oe,re)))}loadNamespaces(re,te){const ne=defer();return this.options.ns?(isString$2(re)&&(re=[re]),re.forEach(ie=>{this.options.ns.indexOf(ie)<0&&this.options.ns.push(ie)}),this.loadResources(ie=>{ne.resolve(),te&&te(ie)}),ne):(te&&te(),Promise.resolve())}loadLanguages(re,te){const ne=defer();isString$2(re)&&(re=[re]);const ie=this.options.preload||[],oe=re.filter(se=>ie.indexOf(se)<0&&this.services.languageUtils.isSupportedCode(se));return oe.length?(this.options.preload=ie.concat(oe),this.loadResources(se=>{ne.resolve(),te&&te(se)}),ne):(te&&te(),Promise.resolve())}dir(re){var ie,oe;if(re||(re=this.resolvedLanguage||(((ie=this.languages)==null?void 0:ie.length)>0?this.languages[0]:this.language)),!re)return"rtl";const te=["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"],ne=((oe=this.services)==null?void 0:oe.languageUtils)||new LanguageUtil(get());return te.indexOf(ne.getLanguagePartFromCode(re))>-1||re.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=arguments.length>1?arguments[1]:void 0;return new I18n(re,te)}cloneInstance(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:noop$3;const ne=re.forkResourceStore;ne&&delete re.forkResourceStore;const ie={...this.options,...re,isClone:!0},oe=new I18n(ie);if((re.debug!==void 0||re.prefix!==void 0)&&(oe.logger=oe.logger.clone(re)),["store","services","language"].forEach(ae=>{oe[ae]=this[ae]}),oe.services={...this.services},oe.services.utils={hasLoadedNamespace:oe.hasLoadedNamespace.bind(oe)},ne){const ae=Object.keys(this.store.data).reduce((ce,ue)=>(ce[ue]={...this.store.data[ue]},Object.keys(ce[ue]).reduce((le,de)=>(le[de]={...ce[ue][de]},le),{})),{});oe.store=new ResourceStore(ae,ie),oe.services.resourceStore=oe.store}return oe.translator=new Translator(oe.services,ie),oe.translator.on("*",function(ae){for(var ce=arguments.length,ue=new Array(ce>1?ce-1:0),le=1;le<ce;le++)ue[le-1]=arguments[le];oe.emit(ae,...ue)}),oe.init(ie,te),oe.translator.options=ie,oe.translator.backendConnector.services.utils={hasLoadedNamespace:oe.hasLoadedNamespace.bind(oe)},oe}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const instance=I18n.createInstance();instance.createInstance=I18n.createInstance,instance.createInstance,instance.dir,instance.init,instance.loadResources,instance.reloadResources,instance.use,instance.changeLanguage,instance.getFixedT,instance.t,instance.exists,instance.setDefaultNamespace,instance.hasLoadedNamespace,instance.loadNamespaces,instance.loadLanguages;const translation$2={additional_information:"Additional information",almost_done:"Almost done...",already_paid:"Already paid?",astro_express_checkout:"Express checkout",check_payment_status:"Check payment status",checkout_method:"Checkout method",or:"OR",email:"E-mail",enter_country_code:"Please enter a country or code",enter_your_email:"Enter your e-mail",enter_your_document_number:"Enter your document number",enter_your_document_type:"Select a document type",enter_your_first_name:"Enter your first name",enter_your_last_name:"Enter your last name",enter_your_phone:"Enter your phone number",continue:"Continue",copied:"Copied!",copy_payment_link:"Copy payment link",document_number:"Document number",document_type:"Document type",do_not_close_window:"Please do not close this window.",didnt_receive:"Didn't receive it?",first_name:"First name",generic_error:"An error occurred. Please try again.",hold_on:"Hold on!",invalid_field:"Invalid field",last_name:"Last name",loading_wait:"Loading, please wait...",pay_amount:"Pay {{amount}}",payment_amount:"Payment amount",payment_method_unavailable:"Payment method not available.",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 with your phone's camera 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 payment. Please check your details and try again.",payment_processing:"Processing your payment...",payment_still_processing:"This is taking a bit longer than usual, please hold on...",save_card_title:"Save this card",save_card_subtitle:"Pay faster next time",saved_cards_title:"Saved cards",pay_with_new_card:"Use another card",credit:"Credit",debit:"Debit",expires:"Exp.",cvv_security_hint:"We ask every time for security. It's the 3 digits on the back of your card.",delete_card_label:"Delete card",delete_card_confirm:"Remove this card?",delete_card_confirm_action:"Delete",delete_card_cancel_label:"Cancel",delete_card_error:"Could not remove card. Please try again."},en$1={translation:translation$2},translation$1={additional_information:"Información adicional",almost_done:"Casi listo...",already_paid:"Ya pagaste?",astro_express_checkout:"Pago express",check_payment_status:"Ver estado del pago",checkout_method:"Método de pago",or:"O",email:"Correo electrónico",enter_country_code:"Introduce el país o código del país",enter_your_email:"Ingrese su correo electrónico",enter_your_document_number:"Ingrese su número de documento",enter_your_document_type:"Seleccione un tipo de documento",enter_your_first_name:"Ingrese su nombre",enter_your_last_name:"Ingrese su apellido",enter_your_phone:"Introduzca su número de teléfono",continue:"Continuar",copied:"Copiado!",copy_payment_link:"Copiar enlace de pago",document_number:"Número de documento",document_type:"Tipo de documento",do_not_close_window:"Por favor, no cierres esta ventana.",didnt_receive:"No lo recibiste?",first_name:"Nombre",generic_error:"Ocurrió un error. Por favor, inténtelo de nuevo.",hold_on:"¡Un instante...!",invalid_field:"Campo inválido",last_name:"Apellido",loading_wait:"Cargando, aguantá un toque...",pay_amount:"Pagar {{amount}}",payment_amount:"Monto a pagar",payment_method_unavailable:"Método de pago no disponible.",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 con la cámara de tu teléfono o copia 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 pago con tarjeta. Verificá los datos y volvé a intentarlo.",payment_processing:"Procesando tu pago...",payment_still_processing:"Está tardando un poco más de lo habitual, estamos verificando su estado.",save_card_title:"Guardar esta tarjeta",save_card_subtitle:"Para pagar más rápido la próxima vez",saved_cards_title:"Tarjetas guardadas",pay_with_new_card:"Usar otra tarjeta",credit:"Crédito",debit:"Débito",expires:"Vence",cvv_security_hint:"Lo pedimos cada vez por seguridad. Son los 3 dígitos al dorso de tu tarjeta.",delete_card_label:"Eliminar tarjeta",delete_card_confirm:"¿Eliminar esta tarjeta?",delete_card_confirm_action:"Eliminar",delete_card_cancel_label:"Cancelar",delete_card_error:"No se pudo eliminar la tarjeta. Inténtalo de nuevo."},es={translation:translation$1},translation={additional_information:"Informações adicionais",almost_done:"Finalizando...",already_paid:"Já pagou?",astro_express_checkout:"Pagamento expresso",check_payment_status:"Verificar status do pagamento",checkout_method:"Método de pagamento",or:"OU",email:"E-mail",enter_country_code:"Informe um país ou código",enter_your_email:"Digite seu e-mail",enter_your_document_number:"Digite seu número de documento",enter_your_document_type:"Selecione um tipo de documento",enter_your_first_name:"Digite seu primeiro nome",enter_your_last_name:"Digite seu sobrenome",enter_your_phone:"Digite seu número de telefone",continue:"Continuar",copied:"Copiado!",copy_payment_link:"Copiar link de pagamento",document_number:"Número do documento",document_type:"Tipo de documento",do_not_close_window:"Por favor, não feche esta janela.",didnt_receive:"Não recebeu?",first_name:"Primeiro nome",generic_error:"Ocorreu um erro. Por favor, tente novamente.",hold_on:"Só um instante!",invalid_field:"Campo inválido",last_name:"Sobrenome",loading_wait:"Carregando, por favor aguarde...",pay_amount:"Pagar {{amount}}",payment_amount:"Valor do pagamento",payment_method_unavailable:"Método de pagamento não disponível.",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 código com a câmera do seu celular 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 seu pagamento com o cartão. Verifique os dados e tente novamente.",payment_processing:"Processando seu pagamento...",payment_still_processing:"Está demorando um pouco mais que o usual, por favor aguarde...",save_card_title:"Salvar este cartão",save_card_subtitle:"Para pagar mais rápido na próxima vez",saved_cards_title:"Cartões salvos",pay_with_new_card:"Usar outro cartão",credit:"Crédito",debit:"Débito",expires:"Vence",cvv_security_hint:"Pedimos sempre por segurança. São os 3 dígitos no verso do cartão.",delete_card_label:"Remover cartão",delete_card_confirm:"Remover este cartão?",delete_card_confirm_action:"Remover",delete_card_cancel_label:"Cancelar",delete_card_error:"Não foi possível remover o cartão. Tente novamente."},pt$1={translation},LOCAL_TRANSLATIONS={en:en$1,es,pt:pt$1};class AstroPayI18n{static init(re){const te=validateValue(re==null?void 0:re.language,CONFIG_LANGUAGE_VALUES,"en");return instance.init({lng:te,fallbackLng:"en",resources:LOCAL_TRANSLATIONS,interpolation:{escapeValue:!1}})}static getCurrent(){return instance.language}static translate(re,te){return instance.t(re,te??{})}}const getLoadingSuccessStyles=()=>css`
|
|
148
148
|
display: flex;
|
|
149
149
|
align-items: center;
|
|
150
150
|
justify-content: center;
|
|
151
151
|
gap: 8px;
|
|
152
|
-
`;class LoadingSuccess extends Component{constructor({text:re,delay:te,onSuccess:ne}){super({tag:"div",styles:()=>getLoadingSuccessStyles()});const ie=new Loading({size:12,color:ThemeManager.getStyles().textPrimaryColor}).element,oe=new Typography({text:re??AstroPayI18n.translate("almost_done"),size:"xSmall"}).element;this.element.append(ie,oe),setTimeout(()=>{ne(),this.element.remove()},te??5e3)}}const RUNTIME_CONFIG={test:{NAME:"@astropay/payments-lib",VERSION:"2.0.22",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",SINGULAR_LINK_URL:"https://astropay-tst.sng.link/Eftaj/ovlnu?_smtype=3",SINGULAR_LINK_PREFIX:"apcmobiletst://"},sandbox:{NAME:"@astropay/payments-lib",VERSION:"2.0.22",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",SINGULAR_LINK_URL:"https://astropay-stg.sng.link/Ezzoz/nfnj?_smtype=3",SINGULAR_LINK_PREFIX:"apcmobilestaging://"},production:{NAME:"@astropay/payments-lib",VERSION:"2.0.22",MODE:"production",API_BASE_URL:"https://partners-api.astropay.com/api",RESOURCES_BUCKET:"https://rs.astropay.com",CHECKOUT_URL:"https://checkout.astropay.com",SINGULAR_LINK_URL:"https://astropay.sng.link/E2h2a/jqze?_smtype=3",SINGULAR_LINK_PREFIX:"apcmobile://"}};var EStorageKey=(ee=>(ee.SESSION_ID="session_id",ee))(EStorageKey||{});const Jr=class Jr{static init(re){const te=validateValue(re==null?void 0:re.environment,[...CONFIG_ENVIRONMENT_VALUES,"test"],"production"),ne=validateValue(re==null?void 0:re.currencyMode,CONFIG_CURRENCY_MODE_VALUES,"iso");Jr.environment=te,Jr.currencyMode=ne}static getRuntimeConfig(){const re=Jr.environment||"production";return RUNTIME_CONFIG[re]}static getEnvironment(){return Jr.environment}static getCurrencyMode(){return Jr.currencyMode}};Ie(Jr,"environment"),Ie(Jr,"currencyMode");let AstroPayConfig=Jr;const ConsoleApiName={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},globalConsole=console,originalConsoleMethods={};Object.keys(ConsoleApiName).forEach(ee=>{originalConsoleMethods[ee]=globalConsole[ee]});const PREFIX$1="Datadog Browser SDK:",display={debug:originalConsoleMethods.debug.bind(globalConsole,PREFIX$1),log:originalConsoleMethods.log.bind(globalConsole,PREFIX$1),info:originalConsoleMethods.info.bind(globalConsole,PREFIX$1),warn:originalConsoleMethods.warn.bind(globalConsole,PREFIX$1),error:originalConsoleMethods.error.bind(globalConsole,PREFIX$1)},DOCS_ORIGIN="https://docs.datadoghq.com",DOCS_TROUBLESHOOTING=`${DOCS_ORIGIN}/real_user_monitoring/browser/troubleshooting`,MORE_DETAILS="More details:";function catchUserErrors(ee,re){return(...te)=>{try{return ee(...te)}catch(ne){display.error(re,ne)}}}function performDraw(ee){return ee!==0&&Math.random()*100<=ee}function round(ee,re){return+ee.toFixed(re)}function isPercentage(ee){return isNumber$1(ee)&&ee>=0&&ee<=100}function isNumber$1(ee){return typeof ee=="number"}const ONE_SECOND=1e3,ONE_MINUTE=60*ONE_SECOND,ONE_HOUR=60*ONE_MINUTE,ONE_DAY=24*ONE_HOUR,ONE_YEAR=365*ONE_DAY;function relativeToClocks(ee){return{relative:ee,timeStamp:getCorrectedTimeStamp(ee)}}function timeStampToClocks(ee){return{relative:getRelativeTime(ee),timeStamp:ee}}function getCorrectedTimeStamp(ee){const re=dateNow()-performance.now();return re>getNavigationStart()?Math.round(addDuration(re,ee)):getTimeStamp(ee)}function currentDrift(){return Math.round(dateNow()-addDuration(getNavigationStart(),performance.now()))}function toServerDuration(ee){return isNumber$1(ee)?round(ee*1e6,0):ee}function dateNow(){return new Date().getTime()}function timeStampNow(){return dateNow()}function relativeNow(){return performance.now()}function clocksNow(){return{relative:relativeNow(),timeStamp:timeStampNow()}}function clocksOrigin(){return{relative:0,timeStamp:getNavigationStart()}}function elapsed(ee,re){return re-ee}function addDuration(ee,re){return ee+re}function getRelativeTime(ee){return ee-getNavigationStart()}function getTimeStamp(ee){return Math.round(addDuration(getNavigationStart(),ee))}function looksLikeRelativeTime(ee){return ee<ONE_YEAR}let navigationStart;function getNavigationStart(){return navigationStart===void 0&&(navigationStart=performance.timing.navigationStart),navigationStart}const ONE_KIBI_BYTE=1024,ONE_MEBI_BYTE=1024*ONE_KIBI_BYTE,HAS_MULTI_BYTES_CHARACTERS=/[^\u0000-\u007F]/;function computeBytesCount(ee){return HAS_MULTI_BYTES_CHARACTERS.test(ee)?window.TextEncoder!==void 0?new TextEncoder().encode(ee).length:new Blob([ee]).size:ee.length}function concatBuffers(ee){const re=ee.reduce((ie,oe)=>ie+oe.length,0),te=new Uint8Array(re);let ne=0;for(const ie of ee)te.set(ie,ne),ne+=ie.length;return te}function shallowClone(ee){return{...ee}}function objectHasValue(ee,re){return Object.keys(ee).some(te=>ee[te]===re)}function isEmptyObject$1(ee){return Object.keys(ee).length===0}function mapValues(ee,re){const te={};for(const ne of Object.keys(ee))te[ne]=re(ee[ne]);return te}function getGlobalObject(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let ee=_dd_temp_;return delete Object.prototype._dd_temp_,typeof ee!="object"&&(typeof self=="object"?ee=self:typeof window=="object"?ee=window:ee={}),ee}function getZoneJsOriginalValue(ee,re){const te=getGlobalObject();let ne;return te.Zone&&typeof te.Zone.__symbol__=="function"&&(ne=ee[te.Zone.__symbol__(re)]),ne||(ne=ee[re]),ne}let onMonitorErrorCollected,debugMode=!1;function startMonitorErrorCollection(ee){onMonitorErrorCollected=ee}function setDebugMode(ee){debugMode=ee}function monitor(ee){return function(){return callMonitored(ee,this,arguments)}}function callMonitored(ee,re,te){try{return ee.apply(re,te)}catch(ne){monitorError(ne)}}function monitorError(ee){if(displayIfDebugEnabled(ee),onMonitorErrorCollected)try{onMonitorErrorCollected(ee)}catch(re){displayIfDebugEnabled(re)}}function displayIfDebugEnabled(...ee){debugMode&&display.error("[MONITOR]",...ee)}function setTimeout$1(ee,re){return getZoneJsOriginalValue(getGlobalObject(),"setTimeout")(monitor(ee),re)}function clearTimeout$1(ee){getZoneJsOriginalValue(getGlobalObject(),"clearTimeout")(ee)}function setInterval$1(ee,re){return getZoneJsOriginalValue(getGlobalObject(),"setInterval")(monitor(ee),re)}function clearInterval$1(ee){getZoneJsOriginalValue(getGlobalObject(),"clearInterval")(ee)}let Observable$1=class{constructor(re){this.onFirstSubscribe=re,this.observers=[]}subscribe(re){return this.observers.push(re),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0),{unsubscribe:()=>{this.observers=this.observers.filter(te=>re!==te),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}}notify(re){this.observers.forEach(te=>te(re))}};function mergeObservables(...ee){return new Observable$1(re=>{const te=ee.map(ne=>ne.subscribe(ie=>re.notify(ie)));return()=>te.forEach(ne=>ne.unsubscribe())})}function throttle$2(ee,re,te){const ne=te&&te.leading!==void 0?te.leading:!0,ie=te&&te.trailing!==void 0?te.trailing:!0;let oe=!1,se,ae;return{throttled:(...ce)=>{if(oe){se=ce;return}ne?ee(...ce):se=ce,oe=!0,ae=setTimeout$1(()=>{ie&&se&&ee(...se),oe=!1,se=void 0},re)},cancel:()=>{clearTimeout$1(ae),oe=!1,se=void 0}}}function noop$2(){}function generateUUID(ee){return ee?(parseInt(ee,10)^Math.random()*16>>parseInt(ee,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,generateUUID)}const COMMA_SEPARATED_KEY_VALUE=/([\w-]+)\s*=\s*([^;]+)/g;function findCommaSeparatedValue(ee,re){for(COMMA_SEPARATED_KEY_VALUE.lastIndex=0;;){const te=COMMA_SEPARATED_KEY_VALUE.exec(ee);if(te){if(te[1]===re)return te[2]}else break}}function findCommaSeparatedValues(ee){const re=new Map;for(COMMA_SEPARATED_KEY_VALUE.lastIndex=0;;){const te=COMMA_SEPARATED_KEY_VALUE.exec(ee);if(te)re.set(te[1],te[2]);else break}return re}function safeTruncate(ee,re,te=""){const ne=ee.charCodeAt(re-1),oe=ne>=55296&&ne<=56319?re+1:re;return ee.length<=oe?ee:`${ee.slice(0,oe)}${te}`}function isChromium(){return detectBrowserCached()===0}function isSafari(){return detectBrowserCached()===1}let browserCache;function detectBrowserCached(){return browserCache??(browserCache=detectBrowser())}function detectBrowser(ee=window){var re;const te=ee.navigator.userAgent;return ee.chrome||/HeadlessChrome/.test(te)?0:((re=ee.navigator.vendor)===null||re===void 0?void 0:re.indexOf("Apple"))===0||/safari/i.test(te)&&!/chrome|android/i.test(te)?1:2}function setCookie(ee,re,te=0,ne){const ie=new Date;ie.setTime(ie.getTime()+te);const oe=`expires=${ie.toUTCString()}`,se=ne&&ne.crossSite?"none":"strict",ae=ne&&ne.domain?`;domain=${ne.domain}`:"",ce=ne&&ne.secure?";secure":"",ue=ne&&ne.partitioned?";partitioned":"";document.cookie=`${ee}=${re};${oe};path=/;samesite=${se}${ae}${ce}${ue}`}function getCookie(ee){return findCommaSeparatedValue(document.cookie,ee)}let initCookieParsed;function getInitCookie(ee){return initCookieParsed||(initCookieParsed=findCommaSeparatedValues(document.cookie)),initCookieParsed.get(ee)}function deleteCookie(ee,re){setCookie(ee,"",0,re)}function areCookiesAuthorized(ee){if(document.cookie===void 0||document.cookie===null)return!1;try{const re=`dd_cookie_test_${generateUUID()}`,te="test";setCookie(re,te,ONE_MINUTE,ee);const ne=getCookie(re)===te;return deleteCookie(re,ee),ne}catch(re){return display.error(re),!1}}let getCurrentSiteCache;function getCurrentSite(){if(getCurrentSiteCache===void 0){const ee=`dd_site_test_${generateUUID()}`,re="test",te=window.location.hostname.split(".");let ne=te.pop();for(;te.length&&!getCookie(ee);)ne=`${te.pop()}.${ne}`,setCookie(ee,re,ONE_SECOND,{domain:ne});deleteCookie(ee,{domain:ne}),getCurrentSiteCache=ne}return getCurrentSiteCache}const SESSION_STORE_KEY="_dd_s";function findLast(ee,re){for(let te=ee.length-1;te>=0;te-=1){const ne=ee[te];if(re(ne,te,ee))return ne}}function objectValues(ee){return Object.values(ee)}function objectEntries(ee){return Object.entries(ee)}const SESSION_TIME_OUT_DELAY=4*ONE_HOUR,SESSION_EXPIRATION_DELAY=15*ONE_MINUTE,SESSION_COOKIE_EXPIRATION_DELAY=ONE_YEAR,SessionPersistence={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},SESSION_ENTRY_REGEXP=/^([a-zA-Z]+)=([a-z0-9-]+)$/,SESSION_ENTRY_SEPARATOR="&";function isValidSessionString(ee){return!!ee&&(ee.indexOf(SESSION_ENTRY_SEPARATOR)!==-1||SESSION_ENTRY_REGEXP.test(ee))}const EXPIRED="1";function getExpiredSessionState(ee,re){const te={isExpired:EXPIRED};return re.trackAnonymousUser&&(ee!=null&&ee.anonymousId?te.anonymousId=ee==null?void 0:ee.anonymousId:te.anonymousId=generateUUID()),te}function isSessionInNotStartedState(ee){return isEmptyObject$1(ee)}function isSessionStarted(ee){return!isSessionInNotStartedState(ee)}function isSessionInExpiredState(ee){return ee.isExpired!==void 0||!isActiveSession(ee)}function isActiveSession(ee){return(ee.created===void 0||dateNow()-Number(ee.created)<SESSION_TIME_OUT_DELAY)&&(ee.expire===void 0||dateNow()<Number(ee.expire))}function expandSessionState(ee){ee.expire=String(dateNow()+SESSION_EXPIRATION_DELAY)}function toSessionString(ee){return objectEntries(ee).map(([re,te])=>re==="anonymousId"?`aid=${te}`:`${re}=${te}`).join(SESSION_ENTRY_SEPARATOR)}function toSessionState(ee){const re={};return isValidSessionString(ee)&&ee.split(SESSION_ENTRY_SEPARATOR).forEach(te=>{const ne=SESSION_ENTRY_REGEXP.exec(te);if(ne!==null){const[,ie,oe]=ne;ie==="aid"?re.anonymousId=oe:re[ie]=oe}}),re}const OLD_SESSION_COOKIE_NAME="_dd",OLD_RUM_COOKIE_NAME="_dd_r",OLD_LOGS_COOKIE_NAME="_dd_l",RUM_SESSION_KEY$1="rum",LOGS_SESSION_KEY="logs";function tryOldCookiesMigration(ee){if(!getInitCookie(SESSION_STORE_KEY)){const te=getInitCookie(OLD_SESSION_COOKIE_NAME),ne=getInitCookie(OLD_RUM_COOKIE_NAME),ie=getInitCookie(OLD_LOGS_COOKIE_NAME),oe={};te&&(oe.id=te),ie&&/^[01]$/.test(ie)&&(oe[LOGS_SESSION_KEY]=ie),ne&&/^[012]$/.test(ne)&&(oe[RUM_SESSION_KEY$1]=ne),isSessionStarted(oe)&&(expandSessionState(oe),ee.persistSession(oe))}}function selectCookieStrategy(ee){const re=buildCookieOptions(ee);return areCookiesAuthorized(re)?{type:SessionPersistence.COOKIE,cookieOptions:re}:void 0}function initCookieStrategy(ee,re){const te={isLockEnabled:isChromium(),persistSession:persistSessionCookie(re),retrieveSession:retrieveSessionCookie,expireSession:ne=>expireSessionCookie(re,ne,ee)};return tryOldCookiesMigration(te),te}function persistSessionCookie(ee){return re=>{setCookie(SESSION_STORE_KEY,toSessionString(re),SESSION_EXPIRATION_DELAY,ee)}}function expireSessionCookie(ee,re,te){const ne=getExpiredSessionState(re,te);setCookie(SESSION_STORE_KEY,toSessionString(ne),te.trackAnonymousUser?SESSION_COOKIE_EXPIRATION_DELAY:SESSION_TIME_OUT_DELAY,ee)}function retrieveSessionCookie(){const ee=getCookie(SESSION_STORE_KEY);return toSessionState(ee)}function buildCookieOptions(ee){const re={};return re.secure=!!ee.useSecureSessionCookie||!!ee.usePartitionedCrossSiteSessionCookie,re.crossSite=!!ee.usePartitionedCrossSiteSessionCookie,re.partitioned=!!ee.usePartitionedCrossSiteSessionCookie,ee.trackSessionAcrossSubdomains&&(re.domain=getCurrentSite()),re}const LOCAL_STORAGE_TEST_KEY="_dd_test_";function selectLocalStorageStrategy(){try{const ee=generateUUID(),re=`${LOCAL_STORAGE_TEST_KEY}${ee}`;localStorage.setItem(re,ee);const te=localStorage.getItem(re);return localStorage.removeItem(re),ee===te?{type:SessionPersistence.LOCAL_STORAGE}:void 0}catch{return}}function initLocalStorageStrategy(ee){return{isLockEnabled:!1,persistSession:persistInLocalStorage,retrieveSession:retrieveSessionFromLocalStorage,expireSession:re=>expireSessionFromLocalStorage(re,ee)}}function persistInLocalStorage(ee){localStorage.setItem(SESSION_STORE_KEY,toSessionString(ee))}function retrieveSessionFromLocalStorage(){const ee=localStorage.getItem(SESSION_STORE_KEY);return toSessionState(ee)}function expireSessionFromLocalStorage(ee,re){persistInLocalStorage(getExpiredSessionState(ee,re))}const LOCK_RETRY_DELAY=10,LOCK_MAX_TRIES=100,bufferedOperations=[];let ongoingOperations;function processSessionStoreOperations(ee,re,te=0){var ne;const{isLockEnabled:ie,persistSession:oe,expireSession:se}=re,ae=fe=>oe({...fe,lock:ue}),ce=()=>{const fe=re.retrieveSession(),he=fe.lock;return fe.lock&&delete fe.lock,{session:fe,lock:he}};if(ongoingOperations||(ongoingOperations=ee),ee!==ongoingOperations){bufferedOperations.push(ee);return}if(ie&&te>=LOCK_MAX_TRIES){next(re);return}let ue,le=ce();if(ie){if(le.lock){retryLater(ee,re,te);return}if(ue=generateUUID(),ae(le.session),le=ce(),le.lock!==ue){retryLater(ee,re,te);return}}let de=ee.process(le.session);if(ie&&(le=ce(),le.lock!==ue)){retryLater(ee,re,te);return}if(de&&(isSessionInExpiredState(de)?se(de):(expandSessionState(de),ie?ae(de):oe(de))),ie&&!(de&&isSessionInExpiredState(de))){if(le=ce(),le.lock!==ue){retryLater(ee,re,te);return}oe(le.session),de=le.session}(ne=ee.after)===null||ne===void 0||ne.call(ee,de||le.session),next(re)}function retryLater(ee,re,te){setTimeout$1(()=>{processSessionStoreOperations(ee,re,te+1)},LOCK_RETRY_DELAY)}function next(ee){ongoingOperations=void 0;const re=bufferedOperations.shift();re&&processSessionStoreOperations(re,ee)}const STORAGE_POLL_DELAY=ONE_SECOND;function selectSessionStoreStrategyType(ee){switch(ee.sessionPersistence){case SessionPersistence.COOKIE:return selectCookieStrategy(ee);case SessionPersistence.LOCAL_STORAGE:return selectLocalStorageStrategy();case void 0:{let re=selectCookieStrategy(ee);return!re&&ee.allowFallbackToLocalStorage&&(re=selectLocalStorageStrategy()),re}default:display.error(`Invalid session persistence '${String(ee.sessionPersistence)}'`)}}function startSessionStore(ee,re,te,ne){const ie=new Observable$1,oe=new Observable$1,se=new Observable$1,ae=ee.type===SessionPersistence.COOKIE?initCookieStrategy(re,ee.cookieOptions):initLocalStorageStrategy(re),{expireSession:ce}=ae,ue=setInterval$1(pe,STORAGE_POLL_DELAY);let le;me();const{throttled:de,cancel:fe}=throttle$2(()=>{processSessionStoreOperations({process:Se=>{if(isSessionInNotStartedState(Se))return;const Re=ge(Se);return ye(Re),Re},after:Se=>{isSessionStarted(Se)&&!ve()&&Ce(Se),le=Se}},ae)},STORAGE_POLL_DELAY);function he(){processSessionStoreOperations({process:Se=>ve()?ge(Se):void 0},ae)}function pe(){processSessionStoreOperations({process:Se=>isSessionInExpiredState(Se)?getExpiredSessionState(Se,re):void 0,after:ge},ae)}function ge(Se){return isSessionInExpiredState(Se)&&(Se=getExpiredSessionState(Se,re)),ve()&&(be(Se)?_e():(se.notify({previousState:le,newState:Se}),le=Se)),Se}function me(){processSessionStoreOperations({process:Se=>{if(isSessionInNotStartedState(Se))return getExpiredSessionState(Se,re)},after:Se=>{le=Se}},ae)}function ye(Se){if(isSessionInNotStartedState(Se))return!1;const{trackingType:Re,isTracked:we}=ne(Se[te]);Se[te]=Re,delete Se.isExpired,we&&!Se.id&&(Se.id=generateUUID(),Se.created=String(dateNow()))}function ve(){return le[te]!==void 0}function be(Se){return le.id!==Se.id||le[te]!==Se[te]}function _e(){le=getExpiredSessionState(le,re),oe.notify()}function Ce(Se){le=Se,ie.notify()}function Te(Se){processSessionStoreOperations({process:Re=>({...Re,...Se}),after:ge},ae)}return{expandOrRenewSession:de,expandSession:he,getSession:()=>le,renewObservable:ie,expireObservable:oe,sessionStateUpdateObservable:se,restartSession:me,expire:()=>{fe(),ce(le),ge(getExpiredSessionState(le,re))},stop:()=>{clearInterval$1(ue)},updateSessionState:Te}}const TrackingConsent={GRANTED:"granted",NOT_GRANTED:"not-granted"};function createTrackingConsentState(ee){const re=new Observable$1;return{tryToInit(te){ee||(ee=te)},update(te){ee=te,re.notify()},isGranted(){return ee===TrackingConsent.GRANTED},observable:re}}function jsonStringify(ee,re,te){if(typeof ee!="object"||ee===null)return JSON.stringify(ee);const ne=detachToJsonMethod(Object.prototype),ie=detachToJsonMethod(Array.prototype),oe=detachToJsonMethod(Object.getPrototypeOf(ee)),se=detachToJsonMethod(ee);try{return JSON.stringify(ee,re,te)}catch{return"<error: unable to serialize object>"}finally{ne(),ie(),oe(),se()}}function detachToJsonMethod(ee){const re=ee,te=re.toJSON;return te?(delete re.toJSON,()=>{re.toJSON=te}):noop$2}function normalizeUrl(ee){return buildUrl(ee,location.href).href}function isValidUrl(ee){try{return!!buildUrl(ee)}catch{return!1}}function getPathName(ee){const re=buildUrl(ee).pathname;return re[0]==="/"?re:`/${re}`}function buildUrl(ee,re){const te=getSupportedUrl();if(te)try{return re!==void 0?new te(ee,re):new te(ee)}catch(oe){throw new Error(`Failed to construct URL: ${String(oe)} ${jsonStringify({url:ee,base:re})}`)}if(re===void 0&&!/:/.test(ee))throw new Error(`Invalid URL: '${ee}'`);let ne=document;const ie=ne.createElement("a");if(re!==void 0){ne=document.implementation.createHTMLDocument("");const oe=ne.createElement("base");oe.href=re,ne.head.appendChild(oe),ne.body.appendChild(ie)}return ie.href=ee,ie}const originalURL=URL;let isURLSupported;function getSupportedUrl(){if(isURLSupported===void 0)try{isURLSupported=new originalURL("http://test/path").href==="http://test/path"}catch{isURLSupported=!1}return isURLSupported?originalURL:void 0}const INTAKE_SITE_STAGING="datad0g.com",INTAKE_SITE_FED_STAGING="dd0g-gov.com",INTAKE_SITE_US1="datadoghq.com",INTAKE_SITE_EU1="datadoghq.eu",INTAKE_SITE_US1_FED="ddog-gov.com",PCI_INTAKE_HOST_US1="pci.browser-intake-datadoghq.com",INTAKE_URL_PARAMETERS=["ddsource","ddtags"];function createEndpointBuilder(ee,re,te){const ne=createEndpointUrlWithParametersBuilder(ee,re);return{build(ie,oe){const se=buildEndpointParameters(ee,re,te,ie,oe);return ne(se)},tags:te,urlPrefix:ne(""),trackType:re}}function createEndpointUrlWithParametersBuilder(ee,re){const te=`/api/v2/${re}`,ne=ee.proxy;if(typeof ne=="string"){const oe=normalizeUrl(ne);return se=>`${oe}?ddforward=${encodeURIComponent(`${te}?${se}`)}`}if(typeof ne=="function")return oe=>ne({path:te,parameters:oe});const ie=buildEndpointHost(re,ee);return oe=>`https://${ie}${te}?${oe}`}function buildEndpointHost(ee,re){const{site:te=INTAKE_SITE_US1,internalAnalyticsSubdomain:ne}=re;if(ee==="logs"&&re.usePciIntake&&te===INTAKE_SITE_US1)return PCI_INTAKE_HOST_US1;if(ne&&te===INTAKE_SITE_US1)return`${ne}.${INTAKE_SITE_US1}`;if(te===INTAKE_SITE_FED_STAGING)return`http-intake.logs.${te}`;const ie=te.split("."),oe=ie.pop();return`browser-intake-${ie.join("-")}.${oe}`}function buildEndpointParameters({clientToken:ee,internalAnalyticsSubdomain:re},te,ne,ie,{retry:oe,encoding:se}){const ae=["sdk_version:6.6.3",`api:${ie}`].concat(ne);oe&&ae.push(`retry_count:${oe.count}`,`retry_after:${oe.lastFailureStatus}`);const ce=["ddsource=browser",`ddtags=${encodeURIComponent(ae.join(","))}`,`dd-api-key=${ee}`,`dd-evp-origin-version=${encodeURIComponent("6.6.3")}`,"dd-evp-origin=browser",`dd-request-id=${generateUUID()}`];return se&&ce.push(`dd-evp-encoding=${se}`),te==="rum"&&ce.push(`batch_time=${timeStampNow()}`),re&&ce.reverse(),ce.join("&")}const TAG_SIZE_LIMIT=200;function buildTags(ee){const{env:re,service:te,version:ne,datacenter:ie}=ee,oe=[];return re&&oe.push(buildTag("env",re)),te&&oe.push(buildTag("service",te)),ne&&oe.push(buildTag("version",ne)),ie&&oe.push(buildTag("datacenter",ie)),oe}function buildTag(ee,re){const te=TAG_SIZE_LIMIT-ee.length-1;(re.length>te||hasForbiddenCharacters(re))&&display.warn(`${ee} value doesn't meet tag requirements and will be sanitized. ${MORE_DETAILS} ${DOCS_ORIGIN}/getting_started/tagging/#defining-tags`);const ne=re.replace(/,/g,"_");return`${ee}:${ne}`}function hasForbiddenCharacters(ee){return supportUnicodePropertyEscapes()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(ee):!1}function supportUnicodePropertyEscapes(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch{return!1}}function computeTransportConfiguration(ee){const re=ee.site||INTAKE_SITE_US1,te=buildTags(ee),ne=computeEndpointBuilders(ee,te);return{replica:computeReplicaConfiguration(ee,te),site:re,...ne}}function computeEndpointBuilders(ee,re){return{logsEndpointBuilder:createEndpointBuilder(ee,"logs",re),rumEndpointBuilder:createEndpointBuilder(ee,"rum",re),profilingEndpointBuilder:createEndpointBuilder(ee,"profile",re),sessionReplayEndpointBuilder:createEndpointBuilder(ee,"replay",re)}}function computeReplicaConfiguration(ee,re){if(!ee.replica)return;const te={...ee,site:INTAKE_SITE_US1,clientToken:ee.replica.clientToken},ne={logsEndpointBuilder:createEndpointBuilder(te,"logs",re),rumEndpointBuilder:createEndpointBuilder(te,"rum",re)};return{applicationId:ee.replica.applicationId,...ne}}function isIntakeUrl(ee){return INTAKE_URL_PARAMETERS.every(re=>ee.includes(re))}const DefaultPrivacyLevel={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"},TraceContextInjection={ALL:"all",SAMPLED:"sampled"};function isString$1(ee,re){return ee!=null&&typeof ee!="string"?(display.error(`${re} must be defined as a string`),!1):!0}function isDatadogSite(ee){return ee&&typeof ee=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(ee)?(display.error(`Site should be a valid Datadog site. ${MORE_DETAILS} ${DOCS_ORIGIN}/getting_started/site/.`),!1):!0}function isSampleRate(ee,re){return ee!==void 0&&!isPercentage(ee)?(display.error(`${re} Sample Rate should be a number between 0 and 100`),!1):!0}function validateAndBuildConfiguration(ee){var re,te,ne,ie,oe,se;if(!ee||!ee.clientToken){display.error("Client Token is not configured, we will not send any data.");return}if(!(!isDatadogSite(ee.site)||!isSampleRate(ee.sessionSampleRate,"Session")||!isSampleRate(ee.telemetrySampleRate,"Telemetry")||!isSampleRate(ee.telemetryConfigurationSampleRate,"Telemetry Configuration")||!isSampleRate(ee.telemetryUsageSampleRate,"Telemetry Usage")||!isString$1(ee.version,"Version")||!isString$1(ee.env,"Env")||!isString$1(ee.service,"Service"))){if(ee.trackingConsent!==void 0&&!objectHasValue(TrackingConsent,ee.trackingConsent)){display.error('Tracking Consent should be either "granted" or "not-granted"');return}return{beforeSend:ee.beforeSend&&catchUserErrors(ee.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:selectSessionStoreStrategyType(ee),sessionSampleRate:(re=ee.sessionSampleRate)!==null&&re!==void 0?re:100,telemetrySampleRate:(te=ee.telemetrySampleRate)!==null&&te!==void 0?te:20,telemetryConfigurationSampleRate:(ne=ee.telemetryConfigurationSampleRate)!==null&&ne!==void 0?ne:5,telemetryUsageSampleRate:(ie=ee.telemetryUsageSampleRate)!==null&&ie!==void 0?ie:5,service:ee.service||void 0,silentMultipleInit:!!ee.silentMultipleInit,allowUntrustedEvents:!!ee.allowUntrustedEvents,trackingConsent:(oe=ee.trackingConsent)!==null&&oe!==void 0?oe:TrackingConsent.GRANTED,trackAnonymousUser:(se=ee.trackAnonymousUser)!==null&&se!==void 0?se:!0,storeContextsAcrossPages:!!ee.storeContextsAcrossPages,batchBytesLimit:16*ONE_KIBI_BYTE,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*ONE_SECOND,batchMessagesLimit:50,messageBytesLimit:256*ONE_KIBI_BYTE,...computeTransportConfiguration(ee)}}}function serializeConfiguration(ee){return{session_sample_rate:ee.sessionSampleRate,telemetry_sample_rate:ee.telemetrySampleRate,telemetry_configuration_sample_rate:ee.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:ee.telemetryUsageSampleRate,use_before_send:!!ee.beforeSend,use_partitioned_cross_site_session_cookie:ee.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:ee.useSecureSessionCookie,use_proxy:!!ee.proxy,silent_multiple_init:ee.silentMultipleInit,track_session_across_subdomains:ee.trackSessionAcrossSubdomains,track_anonymous_user:ee.trackAnonymousUser,session_persistence:ee.sessionPersistence,allow_fallback_to_local_storage:!!ee.allowFallbackToLocalStorage,store_contexts_across_pages:!!ee.storeContextsAcrossPages,allow_untrusted_events:!!ee.allowUntrustedEvents,tracking_consent:ee.trackingConsent}}var ExperimentalFeature;(function(ee){ee.WRITABLE_RESOURCE_GRAPHQL="writable_resource_graphql",ee.MISSING_URL_CONTEXT_TELEMETRY="missing_url_context_telemetry",ee.USER_ACCOUNT_TRACE_HEADER="user_account_trace_header",ee.PROFILING="profiling"})(ExperimentalFeature||(ExperimentalFeature={}));const enabledExperimentalFeatures=new Set;function initFeatureFlags(ee){Array.isArray(ee)&&addExperimentalFeatures(ee.filter(re=>objectHasValue(ExperimentalFeature,re)))}function addExperimentalFeatures(ee){ee.forEach(re=>{enabledExperimentalFeatures.add(re)})}function isExperimentalFeatureEnabled(ee){return enabledExperimentalFeatures.has(ee)}function getExperimentalFeatures(){return enabledExperimentalFeatures}const UNKNOWN_FUNCTION="?";function computeStackTrace(ee){const re=[];let te=tryToGetString(ee,"stack");const ne=String(ee);return te&&te.startsWith(ne)&&(te=te.slice(ne.length)),te&&te.split(`
|
|
152
|
+
`;class LoadingSuccess extends Component{constructor({text:re,delay:te,onSuccess:ne}){super({tag:"div",styles:()=>getLoadingSuccessStyles()});const ie=new Loading({size:12,color:ThemeManager.getStyles().textPrimaryColor}).element,oe=new Typography({text:re??AstroPayI18n.translate("almost_done"),size:"xSmall"}).element;this.element.append(ie,oe),setTimeout(()=>{ne(),this.element.remove()},te??5e3)}}const RUNTIME_CONFIG={test:{NAME:"@astropay/payments-lib",VERSION:"2.0.23",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",SINGULAR_LINK_URL:"https://astropay-tst.sng.link/Eftaj/ovlnu?_smtype=3",SINGULAR_LINK_PREFIX:"apcmobiletst://"},sandbox:{NAME:"@astropay/payments-lib",VERSION:"2.0.23",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",SINGULAR_LINK_URL:"https://astropay-stg.sng.link/Ezzoz/nfnj?_smtype=3",SINGULAR_LINK_PREFIX:"apcmobilestaging://"},production:{NAME:"@astropay/payments-lib",VERSION:"2.0.23",MODE:"production",API_BASE_URL:"https://partners-api.astropay.com/api",RESOURCES_BUCKET:"https://rs.astropay.com",CHECKOUT_URL:"https://checkout.astropay.com",SINGULAR_LINK_URL:"https://astropay.sng.link/E2h2a/jqze?_smtype=3",SINGULAR_LINK_PREFIX:"apcmobile://"}};var EStorageKey=(ee=>(ee.SESSION_ID="session_id",ee))(EStorageKey||{});const Zr=class Zr{static init(re){const te=validateValue(re==null?void 0:re.environment,[...CONFIG_ENVIRONMENT_VALUES,"test"],"production"),ne=validateValue(re==null?void 0:re.currencyMode,CONFIG_CURRENCY_MODE_VALUES,"iso");Zr.environment=te,Zr.currencyMode=ne}static getRuntimeConfig(){const re=Zr.environment||"production";return RUNTIME_CONFIG[re]}static getEnvironment(){return Zr.environment}static getCurrencyMode(){return Zr.currencyMode}};Ie(Zr,"environment"),Ie(Zr,"currencyMode");let AstroPayConfig=Zr;const ConsoleApiName={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},globalConsole=console,originalConsoleMethods={};Object.keys(ConsoleApiName).forEach(ee=>{originalConsoleMethods[ee]=globalConsole[ee]});const PREFIX$1="Datadog Browser SDK:",display={debug:originalConsoleMethods.debug.bind(globalConsole,PREFIX$1),log:originalConsoleMethods.log.bind(globalConsole,PREFIX$1),info:originalConsoleMethods.info.bind(globalConsole,PREFIX$1),warn:originalConsoleMethods.warn.bind(globalConsole,PREFIX$1),error:originalConsoleMethods.error.bind(globalConsole,PREFIX$1)},DOCS_ORIGIN="https://docs.datadoghq.com",DOCS_TROUBLESHOOTING=`${DOCS_ORIGIN}/real_user_monitoring/browser/troubleshooting`,MORE_DETAILS="More details:";function catchUserErrors(ee,re){return(...te)=>{try{return ee(...te)}catch(ne){display.error(re,ne)}}}function performDraw(ee){return ee!==0&&Math.random()*100<=ee}function round(ee,re){return+ee.toFixed(re)}function isPercentage(ee){return isNumber$1(ee)&&ee>=0&&ee<=100}function isNumber$1(ee){return typeof ee=="number"}const ONE_SECOND=1e3,ONE_MINUTE=60*ONE_SECOND,ONE_HOUR=60*ONE_MINUTE,ONE_DAY=24*ONE_HOUR,ONE_YEAR=365*ONE_DAY;function relativeToClocks(ee){return{relative:ee,timeStamp:getCorrectedTimeStamp(ee)}}function timeStampToClocks(ee){return{relative:getRelativeTime(ee),timeStamp:ee}}function getCorrectedTimeStamp(ee){const re=dateNow()-performance.now();return re>getNavigationStart()?Math.round(addDuration(re,ee)):getTimeStamp(ee)}function currentDrift(){return Math.round(dateNow()-addDuration(getNavigationStart(),performance.now()))}function toServerDuration(ee){return isNumber$1(ee)?round(ee*1e6,0):ee}function dateNow(){return new Date().getTime()}function timeStampNow(){return dateNow()}function relativeNow(){return performance.now()}function clocksNow(){return{relative:relativeNow(),timeStamp:timeStampNow()}}function clocksOrigin(){return{relative:0,timeStamp:getNavigationStart()}}function elapsed(ee,re){return re-ee}function addDuration(ee,re){return ee+re}function getRelativeTime(ee){return ee-getNavigationStart()}function getTimeStamp(ee){return Math.round(addDuration(getNavigationStart(),ee))}function looksLikeRelativeTime(ee){return ee<ONE_YEAR}let navigationStart;function getNavigationStart(){return navigationStart===void 0&&(navigationStart=performance.timing.navigationStart),navigationStart}const ONE_KIBI_BYTE=1024,ONE_MEBI_BYTE=1024*ONE_KIBI_BYTE,HAS_MULTI_BYTES_CHARACTERS=/[^\u0000-\u007F]/;function computeBytesCount(ee){return HAS_MULTI_BYTES_CHARACTERS.test(ee)?window.TextEncoder!==void 0?new TextEncoder().encode(ee).length:new Blob([ee]).size:ee.length}function concatBuffers(ee){const re=ee.reduce((ie,oe)=>ie+oe.length,0),te=new Uint8Array(re);let ne=0;for(const ie of ee)te.set(ie,ne),ne+=ie.length;return te}function shallowClone(ee){return{...ee}}function objectHasValue(ee,re){return Object.keys(ee).some(te=>ee[te]===re)}function isEmptyObject$1(ee){return Object.keys(ee).length===0}function mapValues(ee,re){const te={};for(const ne of Object.keys(ee))te[ne]=re(ee[ne]);return te}function getGlobalObject(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let ee=_dd_temp_;return delete Object.prototype._dd_temp_,typeof ee!="object"&&(typeof self=="object"?ee=self:typeof window=="object"?ee=window:ee={}),ee}function getZoneJsOriginalValue(ee,re){const te=getGlobalObject();let ne;return te.Zone&&typeof te.Zone.__symbol__=="function"&&(ne=ee[te.Zone.__symbol__(re)]),ne||(ne=ee[re]),ne}let onMonitorErrorCollected,debugMode=!1;function startMonitorErrorCollection(ee){onMonitorErrorCollected=ee}function setDebugMode(ee){debugMode=ee}function monitor(ee){return function(){return callMonitored(ee,this,arguments)}}function callMonitored(ee,re,te){try{return ee.apply(re,te)}catch(ne){monitorError(ne)}}function monitorError(ee){if(displayIfDebugEnabled(ee),onMonitorErrorCollected)try{onMonitorErrorCollected(ee)}catch(re){displayIfDebugEnabled(re)}}function displayIfDebugEnabled(...ee){debugMode&&display.error("[MONITOR]",...ee)}function setTimeout$1(ee,re){return getZoneJsOriginalValue(getGlobalObject(),"setTimeout")(monitor(ee),re)}function clearTimeout$1(ee){getZoneJsOriginalValue(getGlobalObject(),"clearTimeout")(ee)}function setInterval$1(ee,re){return getZoneJsOriginalValue(getGlobalObject(),"setInterval")(monitor(ee),re)}function clearInterval$1(ee){getZoneJsOriginalValue(getGlobalObject(),"clearInterval")(ee)}let Observable$1=class{constructor(re){this.onFirstSubscribe=re,this.observers=[]}subscribe(re){return this.observers.push(re),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0),{unsubscribe:()=>{this.observers=this.observers.filter(te=>re!==te),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}}notify(re){this.observers.forEach(te=>te(re))}};function mergeObservables(...ee){return new Observable$1(re=>{const te=ee.map(ne=>ne.subscribe(ie=>re.notify(ie)));return()=>te.forEach(ne=>ne.unsubscribe())})}function throttle$2(ee,re,te){const ne=te&&te.leading!==void 0?te.leading:!0,ie=te&&te.trailing!==void 0?te.trailing:!0;let oe=!1,se,ae;return{throttled:(...ce)=>{if(oe){se=ce;return}ne?ee(...ce):se=ce,oe=!0,ae=setTimeout$1(()=>{ie&&se&&ee(...se),oe=!1,se=void 0},re)},cancel:()=>{clearTimeout$1(ae),oe=!1,se=void 0}}}function noop$2(){}function generateUUID(ee){return ee?(parseInt(ee,10)^Math.random()*16>>parseInt(ee,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,generateUUID)}const COMMA_SEPARATED_KEY_VALUE=/([\w-]+)\s*=\s*([^;]+)/g;function findCommaSeparatedValue(ee,re){for(COMMA_SEPARATED_KEY_VALUE.lastIndex=0;;){const te=COMMA_SEPARATED_KEY_VALUE.exec(ee);if(te){if(te[1]===re)return te[2]}else break}}function findCommaSeparatedValues(ee){const re=new Map;for(COMMA_SEPARATED_KEY_VALUE.lastIndex=0;;){const te=COMMA_SEPARATED_KEY_VALUE.exec(ee);if(te)re.set(te[1],te[2]);else break}return re}function safeTruncate(ee,re,te=""){const ne=ee.charCodeAt(re-1),oe=ne>=55296&&ne<=56319?re+1:re;return ee.length<=oe?ee:`${ee.slice(0,oe)}${te}`}function isChromium(){return detectBrowserCached()===0}function isSafari(){return detectBrowserCached()===1}let browserCache;function detectBrowserCached(){return browserCache??(browserCache=detectBrowser())}function detectBrowser(ee=window){var re;const te=ee.navigator.userAgent;return ee.chrome||/HeadlessChrome/.test(te)?0:((re=ee.navigator.vendor)===null||re===void 0?void 0:re.indexOf("Apple"))===0||/safari/i.test(te)&&!/chrome|android/i.test(te)?1:2}function setCookie(ee,re,te=0,ne){const ie=new Date;ie.setTime(ie.getTime()+te);const oe=`expires=${ie.toUTCString()}`,se=ne&&ne.crossSite?"none":"strict",ae=ne&&ne.domain?`;domain=${ne.domain}`:"",ce=ne&&ne.secure?";secure":"",ue=ne&&ne.partitioned?";partitioned":"";document.cookie=`${ee}=${re};${oe};path=/;samesite=${se}${ae}${ce}${ue}`}function getCookie(ee){return findCommaSeparatedValue(document.cookie,ee)}let initCookieParsed;function getInitCookie(ee){return initCookieParsed||(initCookieParsed=findCommaSeparatedValues(document.cookie)),initCookieParsed.get(ee)}function deleteCookie(ee,re){setCookie(ee,"",0,re)}function areCookiesAuthorized(ee){if(document.cookie===void 0||document.cookie===null)return!1;try{const re=`dd_cookie_test_${generateUUID()}`,te="test";setCookie(re,te,ONE_MINUTE,ee);const ne=getCookie(re)===te;return deleteCookie(re,ee),ne}catch(re){return display.error(re),!1}}let getCurrentSiteCache;function getCurrentSite(){if(getCurrentSiteCache===void 0){const ee=`dd_site_test_${generateUUID()}`,re="test",te=window.location.hostname.split(".");let ne=te.pop();for(;te.length&&!getCookie(ee);)ne=`${te.pop()}.${ne}`,setCookie(ee,re,ONE_SECOND,{domain:ne});deleteCookie(ee,{domain:ne}),getCurrentSiteCache=ne}return getCurrentSiteCache}const SESSION_STORE_KEY="_dd_s";function findLast(ee,re){for(let te=ee.length-1;te>=0;te-=1){const ne=ee[te];if(re(ne,te,ee))return ne}}function objectValues(ee){return Object.values(ee)}function objectEntries(ee){return Object.entries(ee)}const SESSION_TIME_OUT_DELAY=4*ONE_HOUR,SESSION_EXPIRATION_DELAY=15*ONE_MINUTE,SESSION_COOKIE_EXPIRATION_DELAY=ONE_YEAR,SessionPersistence={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},SESSION_ENTRY_REGEXP=/^([a-zA-Z]+)=([a-z0-9-]+)$/,SESSION_ENTRY_SEPARATOR="&";function isValidSessionString(ee){return!!ee&&(ee.indexOf(SESSION_ENTRY_SEPARATOR)!==-1||SESSION_ENTRY_REGEXP.test(ee))}const EXPIRED="1";function getExpiredSessionState(ee,re){const te={isExpired:EXPIRED};return re.trackAnonymousUser&&(ee!=null&&ee.anonymousId?te.anonymousId=ee==null?void 0:ee.anonymousId:te.anonymousId=generateUUID()),te}function isSessionInNotStartedState(ee){return isEmptyObject$1(ee)}function isSessionStarted(ee){return!isSessionInNotStartedState(ee)}function isSessionInExpiredState(ee){return ee.isExpired!==void 0||!isActiveSession(ee)}function isActiveSession(ee){return(ee.created===void 0||dateNow()-Number(ee.created)<SESSION_TIME_OUT_DELAY)&&(ee.expire===void 0||dateNow()<Number(ee.expire))}function expandSessionState(ee){ee.expire=String(dateNow()+SESSION_EXPIRATION_DELAY)}function toSessionString(ee){return objectEntries(ee).map(([re,te])=>re==="anonymousId"?`aid=${te}`:`${re}=${te}`).join(SESSION_ENTRY_SEPARATOR)}function toSessionState(ee){const re={};return isValidSessionString(ee)&&ee.split(SESSION_ENTRY_SEPARATOR).forEach(te=>{const ne=SESSION_ENTRY_REGEXP.exec(te);if(ne!==null){const[,ie,oe]=ne;ie==="aid"?re.anonymousId=oe:re[ie]=oe}}),re}const OLD_SESSION_COOKIE_NAME="_dd",OLD_RUM_COOKIE_NAME="_dd_r",OLD_LOGS_COOKIE_NAME="_dd_l",RUM_SESSION_KEY$1="rum",LOGS_SESSION_KEY="logs";function tryOldCookiesMigration(ee){if(!getInitCookie(SESSION_STORE_KEY)){const te=getInitCookie(OLD_SESSION_COOKIE_NAME),ne=getInitCookie(OLD_RUM_COOKIE_NAME),ie=getInitCookie(OLD_LOGS_COOKIE_NAME),oe={};te&&(oe.id=te),ie&&/^[01]$/.test(ie)&&(oe[LOGS_SESSION_KEY]=ie),ne&&/^[012]$/.test(ne)&&(oe[RUM_SESSION_KEY$1]=ne),isSessionStarted(oe)&&(expandSessionState(oe),ee.persistSession(oe))}}function selectCookieStrategy(ee){const re=buildCookieOptions(ee);return areCookiesAuthorized(re)?{type:SessionPersistence.COOKIE,cookieOptions:re}:void 0}function initCookieStrategy(ee,re){const te={isLockEnabled:isChromium(),persistSession:persistSessionCookie(re),retrieveSession:retrieveSessionCookie,expireSession:ne=>expireSessionCookie(re,ne,ee)};return tryOldCookiesMigration(te),te}function persistSessionCookie(ee){return re=>{setCookie(SESSION_STORE_KEY,toSessionString(re),SESSION_EXPIRATION_DELAY,ee)}}function expireSessionCookie(ee,re,te){const ne=getExpiredSessionState(re,te);setCookie(SESSION_STORE_KEY,toSessionString(ne),te.trackAnonymousUser?SESSION_COOKIE_EXPIRATION_DELAY:SESSION_TIME_OUT_DELAY,ee)}function retrieveSessionCookie(){const ee=getCookie(SESSION_STORE_KEY);return toSessionState(ee)}function buildCookieOptions(ee){const re={};return re.secure=!!ee.useSecureSessionCookie||!!ee.usePartitionedCrossSiteSessionCookie,re.crossSite=!!ee.usePartitionedCrossSiteSessionCookie,re.partitioned=!!ee.usePartitionedCrossSiteSessionCookie,ee.trackSessionAcrossSubdomains&&(re.domain=getCurrentSite()),re}const LOCAL_STORAGE_TEST_KEY="_dd_test_";function selectLocalStorageStrategy(){try{const ee=generateUUID(),re=`${LOCAL_STORAGE_TEST_KEY}${ee}`;localStorage.setItem(re,ee);const te=localStorage.getItem(re);return localStorage.removeItem(re),ee===te?{type:SessionPersistence.LOCAL_STORAGE}:void 0}catch{return}}function initLocalStorageStrategy(ee){return{isLockEnabled:!1,persistSession:persistInLocalStorage,retrieveSession:retrieveSessionFromLocalStorage,expireSession:re=>expireSessionFromLocalStorage(re,ee)}}function persistInLocalStorage(ee){localStorage.setItem(SESSION_STORE_KEY,toSessionString(ee))}function retrieveSessionFromLocalStorage(){const ee=localStorage.getItem(SESSION_STORE_KEY);return toSessionState(ee)}function expireSessionFromLocalStorage(ee,re){persistInLocalStorage(getExpiredSessionState(ee,re))}const LOCK_RETRY_DELAY=10,LOCK_MAX_TRIES=100,bufferedOperations=[];let ongoingOperations;function processSessionStoreOperations(ee,re,te=0){var ne;const{isLockEnabled:ie,persistSession:oe,expireSession:se}=re,ae=fe=>oe({...fe,lock:ue}),ce=()=>{const fe=re.retrieveSession(),he=fe.lock;return fe.lock&&delete fe.lock,{session:fe,lock:he}};if(ongoingOperations||(ongoingOperations=ee),ee!==ongoingOperations){bufferedOperations.push(ee);return}if(ie&&te>=LOCK_MAX_TRIES){next(re);return}let ue,le=ce();if(ie){if(le.lock){retryLater(ee,re,te);return}if(ue=generateUUID(),ae(le.session),le=ce(),le.lock!==ue){retryLater(ee,re,te);return}}let de=ee.process(le.session);if(ie&&(le=ce(),le.lock!==ue)){retryLater(ee,re,te);return}if(de&&(isSessionInExpiredState(de)?se(de):(expandSessionState(de),ie?ae(de):oe(de))),ie&&!(de&&isSessionInExpiredState(de))){if(le=ce(),le.lock!==ue){retryLater(ee,re,te);return}oe(le.session),de=le.session}(ne=ee.after)===null||ne===void 0||ne.call(ee,de||le.session),next(re)}function retryLater(ee,re,te){setTimeout$1(()=>{processSessionStoreOperations(ee,re,te+1)},LOCK_RETRY_DELAY)}function next(ee){ongoingOperations=void 0;const re=bufferedOperations.shift();re&&processSessionStoreOperations(re,ee)}const STORAGE_POLL_DELAY=ONE_SECOND;function selectSessionStoreStrategyType(ee){switch(ee.sessionPersistence){case SessionPersistence.COOKIE:return selectCookieStrategy(ee);case SessionPersistence.LOCAL_STORAGE:return selectLocalStorageStrategy();case void 0:{let re=selectCookieStrategy(ee);return!re&&ee.allowFallbackToLocalStorage&&(re=selectLocalStorageStrategy()),re}default:display.error(`Invalid session persistence '${String(ee.sessionPersistence)}'`)}}function startSessionStore(ee,re,te,ne){const ie=new Observable$1,oe=new Observable$1,se=new Observable$1,ae=ee.type===SessionPersistence.COOKIE?initCookieStrategy(re,ee.cookieOptions):initLocalStorageStrategy(re),{expireSession:ce}=ae,ue=setInterval$1(pe,STORAGE_POLL_DELAY);let le;me();const{throttled:de,cancel:fe}=throttle$2(()=>{processSessionStoreOperations({process:Se=>{if(isSessionInNotStartedState(Se))return;const Re=ge(Se);return ye(Re),Re},after:Se=>{isSessionStarted(Se)&&!ve()&&Ce(Se),le=Se}},ae)},STORAGE_POLL_DELAY);function he(){processSessionStoreOperations({process:Se=>ve()?ge(Se):void 0},ae)}function pe(){processSessionStoreOperations({process:Se=>isSessionInExpiredState(Se)?getExpiredSessionState(Se,re):void 0,after:ge},ae)}function ge(Se){return isSessionInExpiredState(Se)&&(Se=getExpiredSessionState(Se,re)),ve()&&(be(Se)?_e():(se.notify({previousState:le,newState:Se}),le=Se)),Se}function me(){processSessionStoreOperations({process:Se=>{if(isSessionInNotStartedState(Se))return getExpiredSessionState(Se,re)},after:Se=>{le=Se}},ae)}function ye(Se){if(isSessionInNotStartedState(Se))return!1;const{trackingType:Re,isTracked:we}=ne(Se[te]);Se[te]=Re,delete Se.isExpired,we&&!Se.id&&(Se.id=generateUUID(),Se.created=String(dateNow()))}function ve(){return le[te]!==void 0}function be(Se){return le.id!==Se.id||le[te]!==Se[te]}function _e(){le=getExpiredSessionState(le,re),oe.notify()}function Ce(Se){le=Se,ie.notify()}function Te(Se){processSessionStoreOperations({process:Re=>({...Re,...Se}),after:ge},ae)}return{expandOrRenewSession:de,expandSession:he,getSession:()=>le,renewObservable:ie,expireObservable:oe,sessionStateUpdateObservable:se,restartSession:me,expire:()=>{fe(),ce(le),ge(getExpiredSessionState(le,re))},stop:()=>{clearInterval$1(ue)},updateSessionState:Te}}const TrackingConsent={GRANTED:"granted",NOT_GRANTED:"not-granted"};function createTrackingConsentState(ee){const re=new Observable$1;return{tryToInit(te){ee||(ee=te)},update(te){ee=te,re.notify()},isGranted(){return ee===TrackingConsent.GRANTED},observable:re}}function jsonStringify(ee,re,te){if(typeof ee!="object"||ee===null)return JSON.stringify(ee);const ne=detachToJsonMethod(Object.prototype),ie=detachToJsonMethod(Array.prototype),oe=detachToJsonMethod(Object.getPrototypeOf(ee)),se=detachToJsonMethod(ee);try{return JSON.stringify(ee,re,te)}catch{return"<error: unable to serialize object>"}finally{ne(),ie(),oe(),se()}}function detachToJsonMethod(ee){const re=ee,te=re.toJSON;return te?(delete re.toJSON,()=>{re.toJSON=te}):noop$2}function normalizeUrl(ee){return buildUrl(ee,location.href).href}function isValidUrl(ee){try{return!!buildUrl(ee)}catch{return!1}}function getPathName(ee){const re=buildUrl(ee).pathname;return re[0]==="/"?re:`/${re}`}function buildUrl(ee,re){const te=getSupportedUrl();if(te)try{return re!==void 0?new te(ee,re):new te(ee)}catch(oe){throw new Error(`Failed to construct URL: ${String(oe)} ${jsonStringify({url:ee,base:re})}`)}if(re===void 0&&!/:/.test(ee))throw new Error(`Invalid URL: '${ee}'`);let ne=document;const ie=ne.createElement("a");if(re!==void 0){ne=document.implementation.createHTMLDocument("");const oe=ne.createElement("base");oe.href=re,ne.head.appendChild(oe),ne.body.appendChild(ie)}return ie.href=ee,ie}const originalURL=URL;let isURLSupported;function getSupportedUrl(){if(isURLSupported===void 0)try{isURLSupported=new originalURL("http://test/path").href==="http://test/path"}catch{isURLSupported=!1}return isURLSupported?originalURL:void 0}const INTAKE_SITE_STAGING="datad0g.com",INTAKE_SITE_FED_STAGING="dd0g-gov.com",INTAKE_SITE_US1="datadoghq.com",INTAKE_SITE_EU1="datadoghq.eu",INTAKE_SITE_US1_FED="ddog-gov.com",PCI_INTAKE_HOST_US1="pci.browser-intake-datadoghq.com",INTAKE_URL_PARAMETERS=["ddsource","ddtags"];function createEndpointBuilder(ee,re,te){const ne=createEndpointUrlWithParametersBuilder(ee,re);return{build(ie,oe){const se=buildEndpointParameters(ee,re,te,ie,oe);return ne(se)},tags:te,urlPrefix:ne(""),trackType:re}}function createEndpointUrlWithParametersBuilder(ee,re){const te=`/api/v2/${re}`,ne=ee.proxy;if(typeof ne=="string"){const oe=normalizeUrl(ne);return se=>`${oe}?ddforward=${encodeURIComponent(`${te}?${se}`)}`}if(typeof ne=="function")return oe=>ne({path:te,parameters:oe});const ie=buildEndpointHost(re,ee);return oe=>`https://${ie}${te}?${oe}`}function buildEndpointHost(ee,re){const{site:te=INTAKE_SITE_US1,internalAnalyticsSubdomain:ne}=re;if(ee==="logs"&&re.usePciIntake&&te===INTAKE_SITE_US1)return PCI_INTAKE_HOST_US1;if(ne&&te===INTAKE_SITE_US1)return`${ne}.${INTAKE_SITE_US1}`;if(te===INTAKE_SITE_FED_STAGING)return`http-intake.logs.${te}`;const ie=te.split("."),oe=ie.pop();return`browser-intake-${ie.join("-")}.${oe}`}function buildEndpointParameters({clientToken:ee,internalAnalyticsSubdomain:re},te,ne,ie,{retry:oe,encoding:se}){const ae=["sdk_version:6.6.3",`api:${ie}`].concat(ne);oe&&ae.push(`retry_count:${oe.count}`,`retry_after:${oe.lastFailureStatus}`);const ce=["ddsource=browser",`ddtags=${encodeURIComponent(ae.join(","))}`,`dd-api-key=${ee}`,`dd-evp-origin-version=${encodeURIComponent("6.6.3")}`,"dd-evp-origin=browser",`dd-request-id=${generateUUID()}`];return se&&ce.push(`dd-evp-encoding=${se}`),te==="rum"&&ce.push(`batch_time=${timeStampNow()}`),re&&ce.reverse(),ce.join("&")}const TAG_SIZE_LIMIT=200;function buildTags(ee){const{env:re,service:te,version:ne,datacenter:ie}=ee,oe=[];return re&&oe.push(buildTag("env",re)),te&&oe.push(buildTag("service",te)),ne&&oe.push(buildTag("version",ne)),ie&&oe.push(buildTag("datacenter",ie)),oe}function buildTag(ee,re){const te=TAG_SIZE_LIMIT-ee.length-1;(re.length>te||hasForbiddenCharacters(re))&&display.warn(`${ee} value doesn't meet tag requirements and will be sanitized. ${MORE_DETAILS} ${DOCS_ORIGIN}/getting_started/tagging/#defining-tags`);const ne=re.replace(/,/g,"_");return`${ee}:${ne}`}function hasForbiddenCharacters(ee){return supportUnicodePropertyEscapes()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(ee):!1}function supportUnicodePropertyEscapes(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch{return!1}}function computeTransportConfiguration(ee){const re=ee.site||INTAKE_SITE_US1,te=buildTags(ee),ne=computeEndpointBuilders(ee,te);return{replica:computeReplicaConfiguration(ee,te),site:re,...ne}}function computeEndpointBuilders(ee,re){return{logsEndpointBuilder:createEndpointBuilder(ee,"logs",re),rumEndpointBuilder:createEndpointBuilder(ee,"rum",re),profilingEndpointBuilder:createEndpointBuilder(ee,"profile",re),sessionReplayEndpointBuilder:createEndpointBuilder(ee,"replay",re)}}function computeReplicaConfiguration(ee,re){if(!ee.replica)return;const te={...ee,site:INTAKE_SITE_US1,clientToken:ee.replica.clientToken},ne={logsEndpointBuilder:createEndpointBuilder(te,"logs",re),rumEndpointBuilder:createEndpointBuilder(te,"rum",re)};return{applicationId:ee.replica.applicationId,...ne}}function isIntakeUrl(ee){return INTAKE_URL_PARAMETERS.every(re=>ee.includes(re))}const DefaultPrivacyLevel={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"},TraceContextInjection={ALL:"all",SAMPLED:"sampled"};function isString$1(ee,re){return ee!=null&&typeof ee!="string"?(display.error(`${re} must be defined as a string`),!1):!0}function isDatadogSite(ee){return ee&&typeof ee=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(ee)?(display.error(`Site should be a valid Datadog site. ${MORE_DETAILS} ${DOCS_ORIGIN}/getting_started/site/.`),!1):!0}function isSampleRate(ee,re){return ee!==void 0&&!isPercentage(ee)?(display.error(`${re} Sample Rate should be a number between 0 and 100`),!1):!0}function validateAndBuildConfiguration(ee){var re,te,ne,ie,oe,se;if(!ee||!ee.clientToken){display.error("Client Token is not configured, we will not send any data.");return}if(!(!isDatadogSite(ee.site)||!isSampleRate(ee.sessionSampleRate,"Session")||!isSampleRate(ee.telemetrySampleRate,"Telemetry")||!isSampleRate(ee.telemetryConfigurationSampleRate,"Telemetry Configuration")||!isSampleRate(ee.telemetryUsageSampleRate,"Telemetry Usage")||!isString$1(ee.version,"Version")||!isString$1(ee.env,"Env")||!isString$1(ee.service,"Service"))){if(ee.trackingConsent!==void 0&&!objectHasValue(TrackingConsent,ee.trackingConsent)){display.error('Tracking Consent should be either "granted" or "not-granted"');return}return{beforeSend:ee.beforeSend&&catchUserErrors(ee.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:selectSessionStoreStrategyType(ee),sessionSampleRate:(re=ee.sessionSampleRate)!==null&&re!==void 0?re:100,telemetrySampleRate:(te=ee.telemetrySampleRate)!==null&&te!==void 0?te:20,telemetryConfigurationSampleRate:(ne=ee.telemetryConfigurationSampleRate)!==null&&ne!==void 0?ne:5,telemetryUsageSampleRate:(ie=ee.telemetryUsageSampleRate)!==null&&ie!==void 0?ie:5,service:ee.service||void 0,silentMultipleInit:!!ee.silentMultipleInit,allowUntrustedEvents:!!ee.allowUntrustedEvents,trackingConsent:(oe=ee.trackingConsent)!==null&&oe!==void 0?oe:TrackingConsent.GRANTED,trackAnonymousUser:(se=ee.trackAnonymousUser)!==null&&se!==void 0?se:!0,storeContextsAcrossPages:!!ee.storeContextsAcrossPages,batchBytesLimit:16*ONE_KIBI_BYTE,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*ONE_SECOND,batchMessagesLimit:50,messageBytesLimit:256*ONE_KIBI_BYTE,...computeTransportConfiguration(ee)}}}function serializeConfiguration(ee){return{session_sample_rate:ee.sessionSampleRate,telemetry_sample_rate:ee.telemetrySampleRate,telemetry_configuration_sample_rate:ee.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:ee.telemetryUsageSampleRate,use_before_send:!!ee.beforeSend,use_partitioned_cross_site_session_cookie:ee.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:ee.useSecureSessionCookie,use_proxy:!!ee.proxy,silent_multiple_init:ee.silentMultipleInit,track_session_across_subdomains:ee.trackSessionAcrossSubdomains,track_anonymous_user:ee.trackAnonymousUser,session_persistence:ee.sessionPersistence,allow_fallback_to_local_storage:!!ee.allowFallbackToLocalStorage,store_contexts_across_pages:!!ee.storeContextsAcrossPages,allow_untrusted_events:!!ee.allowUntrustedEvents,tracking_consent:ee.trackingConsent}}var ExperimentalFeature;(function(ee){ee.WRITABLE_RESOURCE_GRAPHQL="writable_resource_graphql",ee.MISSING_URL_CONTEXT_TELEMETRY="missing_url_context_telemetry",ee.USER_ACCOUNT_TRACE_HEADER="user_account_trace_header",ee.PROFILING="profiling"})(ExperimentalFeature||(ExperimentalFeature={}));const enabledExperimentalFeatures=new Set;function initFeatureFlags(ee){Array.isArray(ee)&&addExperimentalFeatures(ee.filter(re=>objectHasValue(ExperimentalFeature,re)))}function addExperimentalFeatures(ee){ee.forEach(re=>{enabledExperimentalFeatures.add(re)})}function isExperimentalFeatureEnabled(ee){return enabledExperimentalFeatures.has(ee)}function getExperimentalFeatures(){return enabledExperimentalFeatures}const UNKNOWN_FUNCTION="?";function computeStackTrace(ee){const re=[];let te=tryToGetString(ee,"stack");const ne=String(ee);return te&&te.startsWith(ne)&&(te=te.slice(ne.length)),te&&te.split(`
|
|
153
153
|
`).forEach(ie=>{const oe=parseChromeLine(ie)||parseChromeAnonymousLine(ie)||parseWinLine(ie)||parseGeckoLine(ie);oe&&(!oe.func&&oe.line&&(oe.func=UNKNOWN_FUNCTION),re.push(oe))}),{message:tryToGetString(ee,"message"),name:tryToGetString(ee,"name"),stack:re}}const fileUrl="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",filePosition="(?::(\\d+))",CHROME_LINE_RE=new RegExp(`^\\s*at (.*?) ?\\(${fileUrl}${filePosition}?${filePosition}?\\)?\\s*$`,"i"),CHROME_EVAL_RE=new RegExp(`\\((\\S*)${filePosition}${filePosition}\\)`);function parseChromeLine(ee){const re=CHROME_LINE_RE.exec(ee);if(!re)return;const te=re[2]&&re[2].indexOf("native")===0,ne=re[2]&&re[2].indexOf("eval")===0,ie=CHROME_EVAL_RE.exec(re[2]);return ne&&ie&&(re[2]=ie[1],re[3]=ie[2],re[4]=ie[3]),{args:te?[re[2]]:[],column:re[4]?+re[4]:void 0,func:re[1]||UNKNOWN_FUNCTION,line:re[3]?+re[3]:void 0,url:te?void 0:re[2]}}const CHROME_ANONYMOUS_FUNCTION_RE=new RegExp(`^\\s*at ?${fileUrl}${filePosition}?${filePosition}??\\s*$`,"i");function parseChromeAnonymousLine(ee){const re=CHROME_ANONYMOUS_FUNCTION_RE.exec(ee);if(re)return{args:[],column:re[3]?+re[3]:void 0,func:UNKNOWN_FUNCTION,line:re[2]?+re[2]:void 0,url:re[1]}}const WINJS_LINE_RE=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function parseWinLine(ee){const re=WINJS_LINE_RE.exec(ee);if(re)return{args:[],column:re[4]?+re[4]:void 0,func:re[1]||UNKNOWN_FUNCTION,line:+re[3],url:re[2]}}const GECKO_LINE_RE=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,GECKO_EVAL_RE=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function parseGeckoLine(ee){const re=GECKO_LINE_RE.exec(ee);if(!re)return;const te=re[3]&&re[3].indexOf(" > eval")>-1,ne=GECKO_EVAL_RE.exec(re[3]);return te&&ne&&(re[3]=ne[1],re[4]=ne[2],re[5]=void 0),{args:re[2]?re[2].split(","):[],column:re[5]?+re[5]:void 0,func:re[1]||UNKNOWN_FUNCTION,line:re[4]?+re[4]:void 0,url:re[3]}}function tryToGetString(ee,re){if(typeof ee!="object"||!ee||!(re in ee))return;const te=ee[re];return typeof te=="string"?te:void 0}function computeStackTraceFromOnErrorMessage(ee,re,te,ne){const ie=[{url:re,column:ne,line:te}],{name:oe,message:se}=tryToParseMessage(ee);return{name:oe,message:se,stack:ie}}const ERROR_TYPES_RE=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function tryToParseMessage(ee){let re,te;return{}.toString.call(ee)==="[object String]"&&([,re,te]=ERROR_TYPES_RE.exec(ee)),{name:re,message:te}}function createHandlingStack(ee){const te=new Error(ee);te.name="HandlingStack";let ne;return callMonitored(()=>{const ie=computeStackTrace(te);ie.stack=ie.stack.slice(2),ne=toStackTraceString(ie)}),ne}function toStackTraceString(ee){let re=formatErrorMessage(ee);return ee.stack.forEach(te=>{const ne=te.func==="?"?"<anonymous>":te.func,ie=te.args&&te.args.length>0?`(${te.args.join(", ")})`:"",oe=te.line?`:${te.line}`:"",se=te.line&&te.column?`:${te.column}`:"";re+=`
|
|
154
154
|
at ${ne}${ie} @ ${te.url}${oe}${se}`}),re}function formatErrorMessage(ee){return`${ee.name||"Error"}: ${ee.message}`}function instrumentMethod(ee,re,te,{computeHandlingStack:ne}={}){let ie=ee[re];if(typeof ie!="function")if(re in ee&&re.startsWith("on"))ie=noop$2;else return{stop:noop$2};let oe=!1;const se=function(){if(oe)return ie.apply(this,arguments);const ae=Array.from(arguments);let ce;callMonitored(te,null,[{target:this,parameters:ae,onPostCall:le=>{ce=le},handlingStack:ne?createHandlingStack("instrumented method"):void 0}]);const ue=ie.apply(this,ae);return ce&&callMonitored(ce,null,[ue]),ue};return ee[re]=se,{stop:()=>{oe=!0,ee[re]===se&&(ee[re]=ie)}}}function instrumentSetter(ee,re,te){const ne=Object.getOwnPropertyDescriptor(ee,re);if(!ne||!ne.set||!ne.configurable)return{stop:noop$2};const ie=noop$2;let oe=(ae,ce)=>{setTimeout$1(()=>{oe!==ie&&te(ae,ce)},0)};const se=function(ae){ne.set.call(this,ae),oe(this,ae)};return Object.defineProperty(ee,re,{set:se}),{stop:()=>{var ae;((ae=Object.getOwnPropertyDescriptor(ee,re))===null||ae===void 0?void 0:ae.set)===se&&Object.defineProperty(ee,re,ne),oe=ie}}}const SANITIZE_DEFAULT_MAX_CHARACTER_COUNT=220*ONE_KIBI_BYTE,JSON_PATH_ROOT_ELEMENT="$",KEY_DECORATION_LENGTH=3;function sanitize(ee,re=SANITIZE_DEFAULT_MAX_CHARACTER_COUNT){const te=detachToJsonMethod(Object.prototype),ne=detachToJsonMethod(Array.prototype),ie=[],oe=new WeakMap,se=sanitizeProcessor(ee,JSON_PATH_ROOT_ELEMENT,void 0,ie,oe),ae=JSON.stringify(se);let ce=ae?ae.length:0;if(ce>re){warnOverCharacterLimit(re,"discarded",ee);return}for(;ie.length>0&&ce<re;){const ue=ie.shift();let le=0;if(Array.isArray(ue.source))for(let de=0;de<ue.source.length;de++){const fe=sanitizeProcessor(ue.source[de],ue.path,de,ie,oe);if(fe!==void 0?ce+=JSON.stringify(fe).length:ce+=4,ce+=le,le=1,ce>re){warnOverCharacterLimit(re,"truncated",ee);break}ue.target[de]=fe}else for(const de in ue.source)if(Object.prototype.hasOwnProperty.call(ue.source,de)){const fe=sanitizeProcessor(ue.source[de],ue.path,de,ie,oe);if(fe!==void 0&&(ce+=JSON.stringify(fe).length+le+de.length+KEY_DECORATION_LENGTH,le=1),ce>re){warnOverCharacterLimit(re,"truncated",ee);break}ue.target[de]=fe}}return te(),ne(),se}function sanitizeProcessor(ee,re,te,ne,ie){const oe=tryToApplyToJSON(ee);if(!oe||typeof oe!="object")return sanitizePrimitivesAndFunctions(oe);const se=sanitizeObjects(oe);if(se!=="[Object]"&&se!=="[Array]"&&se!=="[Error]")return se;const ae=ee;if(ie.has(ae))return`[Reference seen at ${ie.get(ae)}]`;const ce=te!==void 0?`${re}.${te}`:re,ue=Array.isArray(oe)?[]:{};return ie.set(ae,ce),ne.push({source:oe,target:ue,path:ce}),ue}function sanitizePrimitivesAndFunctions(ee){return typeof ee=="bigint"?`[BigInt] ${ee.toString()}`:typeof ee=="function"?`[Function] ${ee.name||"unknown"}`:typeof ee=="symbol"?`[Symbol] ${ee.description||ee.toString()}`:ee}function sanitizeObjects(ee){try{if(ee instanceof Event)return sanitizeEvent(ee);if(ee instanceof RegExp)return`[RegExp] ${ee.toString()}`;const te=Object.prototype.toString.call(ee).match(/\[object (.*)\]/);if(te&&te[1])return`[${te[1]}]`}catch{}return"[Unserializable]"}function sanitizeEvent(ee){return{type:ee.type,isTrusted:ee.isTrusted,currentTarget:ee.currentTarget?sanitizeObjects(ee.currentTarget):null,target:ee.target?sanitizeObjects(ee.target):null}}function tryToApplyToJSON(ee){const re=ee;if(re&&typeof re.toJSON=="function")try{return re.toJSON()}catch{}return ee}function warnOverCharacterLimit(ee,re,te){display.warn(`The data provided has been ${re} as it is over the limit of ${ee} characters:`,te)}const NO_ERROR_STACK_PRESENT_MESSAGE="No stack, consider using an instance of Error";function computeRawError({stackTrace:ee,originalError:re,handlingStack:te,componentStack:ne,startClocks:ie,nonErrorPrefix:oe,source:se,handling:ae}){const ce=isError(re),ue=computeMessage(ee,ce,oe,re),le=hasUsableStack(ce,ee)?toStackTraceString(ee):NO_ERROR_STACK_PRESENT_MESSAGE,de=ce?flattenErrorCauses(re,se):void 0,fe=ee?ee.name:void 0,he=tryToGetFingerprint(re),pe=tryToGetErrorContext(re);return{startClocks:ie,source:se,handling:ae,handlingStack:te,componentStack:ne,originalError:re,type:fe,message:ue,stack:le,causes:de,fingerprint:he,context:pe}}function computeMessage(ee,re,te,ne){return ee!=null&&ee.message&&(ee!=null&&ee.name)?ee.message:re?"Empty message":`${te} ${jsonStringify(sanitize(ne))}`}function hasUsableStack(ee,re){return re===void 0?!1:ee?!0:re.stack.length>0&&(re.stack.length>1||re.stack[0].url!==void 0)}function tryToGetFingerprint(ee){return isError(ee)&&"dd_fingerprint"in ee?String(ee.dd_fingerprint):void 0}function tryToGetErrorContext(ee){if(ee!==null&&typeof ee=="object"&&"dd_context"in ee)return ee.dd_context}function isError(ee){return ee instanceof Error||Object.prototype.toString.call(ee)==="[object Error]"}function flattenErrorCauses(ee,re){let te=ee;const ne=[];for(;isError(te==null?void 0:te.cause)&&ne.length<10;){const ie=computeStackTrace(te.cause);ne.push({message:te.cause.message,source:re,type:ie==null?void 0:ie.name,stack:ie&&toStackTraceString(ie)}),te=te.cause}return ne.length?ne:void 0}const ErrorSource={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function trackRuntimeError(ee){const re=(ie,oe)=>{const se=computeRawError({stackTrace:ie,originalError:oe,startClocks:clocksNow(),nonErrorPrefix:"Uncaught",source:ErrorSource.SOURCE,handling:"unhandled"});ee.notify(se)},{stop:te}=instrumentOnError(re),{stop:ne}=instrumentUnhandledRejection(re);return{stop:()=>{te(),ne()}}}function instrumentOnError(ee){return instrumentMethod(window,"onerror",({parameters:[re,te,ne,ie,oe]})=>{let se;isError(oe)?se=computeStackTrace(oe):se=computeStackTraceFromOnErrorMessage(re,te,ne,ie),ee(se,oe??re)})}function instrumentUnhandledRejection(ee){return instrumentMethod(window,"onunhandledrejection",({parameters:[re]})=>{const te=re.reason||"Empty reason",ne=computeStackTrace(te);ee(ne,te)})}function makePublicApi(ee){const re={version:"6.6.3",onReady(te){te()},...ee};return Object.defineProperty(re,"_setDebug",{get(){return setDebugMode},enumerable:!1}),re}function defineGlobal(ee,re,te){const ne=ee[re];ne&&!ne.q&&ne.version&&display.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),ee[re]=te,ne&&ne.q&&ne.q.forEach(ie=>catchUserErrors(ie,"onReady callback threw an error:")())}function displayAlreadyInitializedError(ee,re){re.silentMultipleInit||display.error(`${ee} is already initialized.`)}function addEventListener$1(ee,re,te,ne,ie){return addEventListeners(ee,re,[te],ne,ie)}function addEventListeners(ee,re,te,ne,{once:ie,capture:oe,passive:se}={}){const ae=monitor(fe=>{!fe.isTrusted&&!fe.__ddIsTrusted&&!ee.allowUntrustedEvents||(ie&&de(),ne(fe))}),ce=se?{capture:oe,passive:se}:oe,ue=window.EventTarget&&re instanceof EventTarget?window.EventTarget.prototype:re,le=getZoneJsOriginalValue(ue,"addEventListener");te.forEach(fe=>le.call(re,fe,ae,ce));function de(){const fe=getZoneJsOriginalValue(ue,"removeEventListener");te.forEach(he=>fe.call(re,he,ae,ce))}return{stop:de}}const RawReportType={intervention:"intervention",cspViolation:"csp_violation"};function initReportObservable(ee,re){const te=[];re.includes(RawReportType.cspViolation)&&te.push(createCspViolationReportObservable(ee));const ne=re.filter(ie=>ie!==RawReportType.cspViolation);return ne.length&&te.push(createReportObservable(ne)),mergeObservables(...te)}function createReportObservable(ee){return new Observable$1(re=>{if(!window.ReportingObserver)return;const te=monitor((ie,oe)=>ie.forEach(se=>re.notify(buildRawReportErrorFromReport(se)))),ne=new window.ReportingObserver(te,{types:ee,buffered:!0});return ne.observe(),()=>{ne.disconnect()}})}function createCspViolationReportObservable(ee){return new Observable$1(re=>{const{stop:te}=addEventListener$1(ee,document,"securitypolicyviolation",ne=>{re.notify(buildRawReportErrorFromCspViolation(ne))});return te})}function buildRawReportErrorFromReport(ee){const{type:re,body:te}=ee;return buildRawReportError({type:te.id,message:`${re}: ${te.message}`,originalError:ee,stack:buildStack(te.id,te.message,te.sourceFile,te.lineNumber,te.columnNumber)})}function buildRawReportErrorFromCspViolation(ee){const re=`'${ee.blockedURI}' blocked by '${ee.effectiveDirective}' directive`;return buildRawReportError({type:ee.effectiveDirective,message:`${RawReportType.cspViolation}: ${re}`,originalError:ee,csp:{disposition:ee.disposition},stack:buildStack(ee.effectiveDirective,ee.originalPolicy?`${re} of the policy "${safeTruncate(ee.originalPolicy,100,"...")}"`:"no policy",ee.sourceFile,ee.lineNumber,ee.columnNumber)})}function buildRawReportError(ee){return{startClocks:clocksNow(),source:ErrorSource.REPORT,handling:"unhandled",...ee}}function buildStack(ee,re,te,ne,ie){return te?toStackTraceString({name:ee,message:re,stack:[{func:"?",url:te,line:ne??void 0,column:ie??void 0}]}):void 0}function sendToExtension(ee,re){const te=window.__ddBrowserSdkExtensionCallback;te&&te({type:ee,payload:re})}function getType(ee){return ee===null?"null":Array.isArray(ee)?"array":typeof ee}function mergeInto(ee,re,te=createCircularReferenceChecker()){if(re===void 0)return ee;if(typeof re!="object"||re===null)return re;if(re instanceof Date)return new Date(re.getTime());if(re instanceof RegExp){const ie=re.flags||[re.global?"g":"",re.ignoreCase?"i":"",re.multiline?"m":"",re.sticky?"y":"",re.unicode?"u":""].join("");return new RegExp(re.source,ie)}if(te.hasAlreadyBeenSeen(re))return;if(Array.isArray(re)){const ie=Array.isArray(ee)?ee:[];for(let oe=0;oe<re.length;++oe)ie[oe]=mergeInto(ie[oe],re[oe],te);return ie}const ne=getType(ee)==="object"?ee:{};for(const ie in re)Object.prototype.hasOwnProperty.call(re,ie)&&(ne[ie]=mergeInto(ne[ie],re[ie],te));return ne}function deepClone(ee){return mergeInto(void 0,ee)}function combine(...ee){let re;for(const te of ee)te!=null&&(re=mergeInto(re,te));return re}function createCircularReferenceChecker(){if(typeof WeakSet<"u"){const re=new WeakSet;return{hasAlreadyBeenSeen(te){const ne=re.has(te);return ne||re.add(te),ne}}}const ee=[];return{hasAlreadyBeenSeen(re){const te=ee.indexOf(re)>=0;return te||ee.push(re),te}}}function getConnectivity(){var ee;const re=window.navigator;return{status:re.onLine?"connected":"not_connected",interfaces:re.connection&&re.connection.type?[re.connection.type]:void 0,effective_type:(ee=re.connection)===null||ee===void 0?void 0:ee.effectiveType}}function removeItem(ee,re){const te=ee.indexOf(re);te>=0&&ee.splice(te,1)}const BUFFER_LIMIT=500;function createBoundedBuffer(){const ee=[];return{add:ie=>{ee.push(ie)>BUFFER_LIMIT&&ee.splice(0,1)},remove:ie=>{removeItem(ee,ie)},drain:ie=>{ee.forEach(oe=>oe(ie)),ee.length=0}}}const TelemetryType={log:"log",configuration:"configuration",usage:"usage"},ALLOWED_FRAME_URLS=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],TELEMETRY_EXCLUDED_SITES=[INTAKE_SITE_US1_FED];let preStartTelemetryBuffer=createBoundedBuffer(),onRawTelemetryEventCollected=ee=>{preStartTelemetryBuffer.add(()=>onRawTelemetryEventCollected(ee))};function startTelemetry(ee,re){let te;const ne=new Observable$1,ie=new Set,oe=!TELEMETRY_EXCLUDED_SITES.includes(re.site)&&performDraw(re.telemetrySampleRate),se={[TelemetryType.log]:oe,[TelemetryType.configuration]:oe&&performDraw(re.telemetryConfigurationSampleRate),[TelemetryType.usage]:oe&&performDraw(re.telemetryUsageSampleRate)},ae=getRuntimeEnvInfo();onRawTelemetryEventCollected=ue=>{const le=jsonStringify(ue);if(se[ue.type]&&ie.size<re.maxTelemetryEventsPerPage&&!ie.has(le)){const de=ce(ee,ue,ae);ne.notify(de),sendToExtension("telemetry",de),ie.add(le)}},startMonitorErrorCollection(addTelemetryError);function ce(ue,le,de){return combine({type:"telemetry",date:timeStampNow(),service:ue,version:"6.6.3",source:"browser",_dd:{format_version:2},telemetry:combine(le,{runtime_env:de,connectivity:getConnectivity(),sdk_setup:"npm"}),experimental_features:Array.from(getExperimentalFeatures())},te!==void 0?te():{})}return{setContextProvider:ue=>{te=ue},observable:ne,enabled:oe}}function getRuntimeEnvInfo(){return{is_local_file:window.location.protocol==="file:",is_worker:"WorkerGlobalScope"in self}}function drainPreStartTelemetry(){preStartTelemetryBuffer.drain()}function isTelemetryReplicationAllowed(ee){return ee.site===INTAKE_SITE_STAGING}function addTelemetryDebug(ee,re){displayIfDebugEnabled(ConsoleApiName.debug,ee,re),onRawTelemetryEventCollected({type:TelemetryType.log,message:ee,status:"debug",...re})}function addTelemetryError(ee,re){onRawTelemetryEventCollected({type:TelemetryType.log,status:"error",...formatError(ee),...re})}function addTelemetryConfiguration(ee){onRawTelemetryEventCollected({type:TelemetryType.configuration,configuration:ee})}function addTelemetryUsage(ee){onRawTelemetryEventCollected({type:TelemetryType.usage,usage:ee})}function formatError(ee){if(isError(ee)){const re=computeStackTrace(ee);return{error:{kind:re.name,stack:toStackTraceString(scrubCustomerFrames(re))},message:re.message}}return{error:{stack:NO_ERROR_STACK_PRESENT_MESSAGE},message:`Uncaught ${jsonStringify(ee)}`}}function scrubCustomerFrames(ee){return ee.stack=ee.stack.filter(re=>!re.url||ALLOWED_FRAME_URLS.some(te=>re.url.startsWith(te))),ee}const END_OF_TIMES=1/0,CLEAR_OLD_VALUES_INTERVAL=ONE_MINUTE;let cleanupHistoriesInterval=null;const cleanupTasks=new Set;function cleanupHistories(){cleanupTasks.forEach(ee=>ee())}function createValueHistory({expireDelay:ee,maxEntries:re}){let te=[];const ne=[];cleanupHistoriesInterval||(cleanupHistoriesInterval=setInterval$1(()=>cleanupHistories(),CLEAR_OLD_VALUES_INTERVAL));const ie=()=>{const he=relativeNow()-ee;for(;te.length>0&&te[te.length-1].endTime<he;){const pe=te.pop();pe&&ne.push(pe.startTime)}};cleanupTasks.add(ie);function oe(he,pe){const ge={value:he,startTime:pe,endTime:END_OF_TIMES,remove:()=>{removeItem(te,ge)},close:me=>{ge.endTime=me}};return re&&te.length>=re&&te.pop(),te.unshift(ge),ge}function se(he=END_OF_TIMES,pe={returnInactive:!1}){for(const ge of te)if(ge.startTime<=he){if(pe.returnInactive||he<=ge.endTime)return ge.value;break}}function ae(he){const pe=te[0];pe&&pe.endTime===END_OF_TIMES&&pe.close(he)}function ce(he=END_OF_TIMES,pe=0){const ge=addDuration(he,pe);return te.filter(me=>me.startTime<=ge&&he<=me.endTime).map(me=>me.value)}function ue(){return te.map(({startTime:he,endTime:pe,value:ge})=>({startTime:he,endTime:pe===END_OF_TIMES?"Infinity":pe,value:ge}))}function le(){return ne}function de(){te=[]}function fe(){cleanupTasks.delete(ie),cleanupTasks.size===0&&cleanupHistoriesInterval&&(clearInterval$1(cleanupHistoriesInterval),cleanupHistoriesInterval=null)}return{add:oe,find:se,closeActive:ae,findAll:ce,reset:de,stop:fe,getAllEntries:ue,getDeletedEntries:le}}const VISIBILITY_CHECK_DELAY=ONE_MINUTE,SESSION_CONTEXT_TIMEOUT_DELAY=SESSION_TIME_OUT_DELAY;function startSessionManager(ee,re,te,ne){const ie=new Observable$1,oe=new Observable$1,se=startSessionStore(ee.sessionStoreStrategyType,ee,re,te),ae=createValueHistory({expireDelay:SESSION_CONTEXT_TIMEOUT_DELAY});se.renewObservable.subscribe(()=>{ae.add(ce(),relativeNow()),ie.notify()}),se.expireObservable.subscribe(()=>{oe.notify(),ae.closeActive(relativeNow())}),se.expandOrRenewSession(),ae.add(ce(),clocksOrigin().relative),ne.observable.subscribe(()=>{ne.isGranted()?se.expandOrRenewSession():se.expire()}),trackActivity(ee,()=>{ne.isGranted()&&se.expandOrRenewSession()}),trackVisibility(ee,()=>se.expandSession()),trackResume(ee,()=>se.restartSession());function ce(){return{id:se.getSession().id,trackingType:se.getSession()[re],isReplayForced:!!se.getSession().forcedReplay,anonymousId:se.getSession().anonymousId}}return{findSession:(ue,le)=>ae.find(ue,le),renewObservable:ie,expireObservable:oe,sessionStateUpdateObservable:se.sessionStateUpdateObservable,expire:se.expire,updateSessionState:se.updateSessionState}}function trackActivity(ee,re){const{stop:te}=addEventListeners(ee,window,["click","touchstart","keydown","scroll"],re,{capture:!0,passive:!0})}function trackVisibility(ee,re){const te=()=>{document.visibilityState==="visible"&&re()},{stop:ne}=addEventListener$1(ee,document,"visibilitychange",te);setInterval$1(te,VISIBILITY_CHECK_DELAY)}function trackResume(ee,re){const{stop:te}=addEventListener$1(ee,window,"resume",re,{capture:!0})}function isServerError(ee){return ee>=500}function tryToClone(ee){try{return ee.clone()}catch{return}}const MAX_ONGOING_BYTES_COUNT=80*ONE_KIBI_BYTE,MAX_ONGOING_REQUESTS=32,MAX_QUEUE_BYTES_COUNT=3*ONE_MEBI_BYTE,MAX_BACKOFF_TIME=ONE_MINUTE,INITIAL_BACKOFF_TIME=ONE_SECOND;function sendWithRetryStrategy(ee,re,te,ne,ie){re.transportStatus===0&&re.queuedPayloads.size()===0&&re.bandwidthMonitor.canHandle(ee)?send(ee,re,te,{onSuccess:()=>retryQueuedPayloads(0,re,te,ne,ie),onFailure:()=>{re.queuedPayloads.enqueue(ee),scheduleRetry(re,te,ne,ie)}}):re.queuedPayloads.enqueue(ee)}function scheduleRetry(ee,re,te,ne){ee.transportStatus===2&&setTimeout$1(()=>{const ie=ee.queuedPayloads.first();send(ie,ee,re,{onSuccess:()=>{ee.queuedPayloads.dequeue(),ee.currentBackoffTime=INITIAL_BACKOFF_TIME,retryQueuedPayloads(1,ee,re,te,ne)},onFailure:()=>{ee.currentBackoffTime=Math.min(MAX_BACKOFF_TIME,ee.currentBackoffTime*2),scheduleRetry(ee,re,te,ne)}})},ee.currentBackoffTime)}function send(ee,re,te,{onSuccess:ne,onFailure:ie}){re.bandwidthMonitor.add(ee),te(ee,oe=>{re.bandwidthMonitor.remove(ee),shouldRetryRequest(oe)?(re.transportStatus=re.bandwidthMonitor.ongoingRequestCount>0?1:2,ee.retry={count:ee.retry?ee.retry.count+1:1,lastFailureStatus:oe.status},ie()):(re.transportStatus=0,ne())})}function retryQueuedPayloads(ee,re,te,ne,ie){ee===0&&re.queuedPayloads.isFull()&&!re.queueFullReported&&(ie({message:`Reached max ${ne} events size queued for upload: ${MAX_QUEUE_BYTES_COUNT/ONE_MEBI_BYTE}MiB`,source:ErrorSource.AGENT,startClocks:clocksNow()}),re.queueFullReported=!0);const oe=re.queuedPayloads;for(re.queuedPayloads=newPayloadQueue();oe.size()>0;)sendWithRetryStrategy(oe.dequeue(),re,te,ne,ie)}function shouldRetryRequest(ee){return ee.type!=="opaque"&&(ee.status===0&&!navigator.onLine||ee.status===408||ee.status===429||isServerError(ee.status))}function newRetryState(){return{transportStatus:0,currentBackoffTime:INITIAL_BACKOFF_TIME,bandwidthMonitor:newBandwidthMonitor(),queuedPayloads:newPayloadQueue(),queueFullReported:!1}}function newPayloadQueue(){const ee=[];return{bytesCount:0,enqueue(re){this.isFull()||(ee.push(re),this.bytesCount+=re.bytesCount)},first(){return ee[0]},dequeue(){const re=ee.shift();return re&&(this.bytesCount-=re.bytesCount),re},size(){return ee.length},isFull(){return this.bytesCount>=MAX_QUEUE_BYTES_COUNT}}}function newBandwidthMonitor(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(ee){return this.ongoingRequestCount===0||this.ongoingByteCount+ee.bytesCount<=MAX_ONGOING_BYTES_COUNT&&this.ongoingRequestCount<MAX_ONGOING_REQUESTS},add(ee){this.ongoingRequestCount+=1,this.ongoingByteCount+=ee.bytesCount},remove(ee){this.ongoingRequestCount-=1,this.ongoingByteCount-=ee.bytesCount}}}function createHttpRequest(ee,re,te){const ne=newRetryState(),ie=(oe,se)=>fetchKeepAliveStrategy(ee,re,oe,se);return{send:oe=>{sendWithRetryStrategy(oe,ne,ie,ee.trackType,te)},sendOnExit:oe=>{sendBeaconStrategy(ee,re,oe)}}}function sendBeaconStrategy(ee,re,te){if(!!navigator.sendBeacon&&te.bytesCount<re)try{const ie=ee.build("beacon",te);if(navigator.sendBeacon(ie,te.data))return}catch(ie){reportBeaconError(ie)}fetchStrategy(ee,te)}let hasReportedBeaconError=!1;function reportBeaconError(ee){hasReportedBeaconError||(hasReportedBeaconError=!0,monitorError(ee))}function fetchKeepAliveStrategy(ee,re,te,ne){if(isKeepAliveSupported()&&te.bytesCount<re){const oe=ee.build("fetch-keepalive",te);fetch(oe,{method:"POST",body:te.data,keepalive:!0,mode:"cors"}).then(monitor(se=>ne==null?void 0:ne({status:se.status,type:se.type}))).catch(monitor(()=>fetchStrategy(ee,te,ne)))}else fetchStrategy(ee,te,ne)}function fetchStrategy(ee,re,te){const ne=ee.build("fetch",re);fetch(ne,{method:"POST",body:re.data,mode:"cors"}).then(monitor(ie=>te==null?void 0:te({status:ie.status,type:ie.type}))).catch(monitor(()=>te==null?void 0:te({status:0})))}function isKeepAliveSupported(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function getEventBridge(){const ee=getEventBridgeGlobal();if(ee)return{getCapabilities(){var re;return JSON.parse(((re=ee.getCapabilities)===null||re===void 0?void 0:re.call(ee))||"[]")},getPrivacyLevel(){var re;return(re=ee.getPrivacyLevel)===null||re===void 0?void 0:re.call(ee)},getAllowedWebViewHosts(){return JSON.parse(ee.getAllowedWebViewHosts())},send(re,te,ne){const ie=ne?{id:ne}:void 0;ee.send(JSON.stringify({eventType:re,event:te,view:ie}))}}}function bridgeSupports(ee){const re=getEventBridge();return!!re&&re.getCapabilities().includes(ee)}function canUseEventBridge(ee){var re;ee===void 0&&(ee=(re=getGlobalObject().location)===null||re===void 0?void 0:re.hostname);const te=getEventBridge();return!!te&&te.getAllowedWebViewHosts().some(ne=>ee===ne||ee.endsWith(`.${ne}`))}function getEventBridgeGlobal(){return getGlobalObject().DatadogEventBridge}const PageExitReason={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function createPageMayExitObservable(ee){return new Observable$1(re=>{const{stop:te}=addEventListeners(ee,window,["visibilitychange","freeze"],ie=>{ie.type==="visibilitychange"&&document.visibilityState==="hidden"?re.notify({reason:PageExitReason.HIDDEN}):ie.type==="freeze"&&re.notify({reason:PageExitReason.FROZEN})},{capture:!0}),ne=addEventListener$1(ee,window,"beforeunload",()=>{re.notify({reason:PageExitReason.UNLOADING})}).stop;return()=>{te(),ne()}})}function isPageExitReason(ee){return objectValues(PageExitReason).includes(ee)}function createBatch({encoder:ee,request:re,flushController:te,messageBytesLimit:ne}){let ie={};const oe=te.flushObservable.subscribe(de=>le(de));function se(de,fe,he){te.notifyBeforeAddMessage(fe),he!==void 0?(ie[he]=de,te.notifyAfterAddMessage()):ee.write(ee.isEmpty?de:`
|
|
155
155
|
${de}`,pe=>{te.notifyAfterAddMessage(pe-fe)})}function ae(de){return de!==void 0&&ie[de]!==void 0}function ce(de){const fe=ie[de];delete ie[de];const he=ee.estimateEncodedBytesCount(fe);te.notifyAfterRemoveMessage(he)}function ue(de,fe){const he=jsonStringify(de),pe=ee.estimateEncodedBytesCount(he);if(pe>=ne){display.warn(`Discarded a message whose size was bigger than the maximum allowed size ${ne}KB. ${MORE_DETAILS} ${DOCS_TROUBLESHOOTING}/#technical-limitations`);return}ae(fe)&&ce(fe),se(he,pe,fe)}function le(de){const fe=objectValues(ie).join(`
|
|
@@ -874,15 +874,15 @@ amplitude.init(<YOUR_API_KEY>, {
|
|
|
874
874
|
Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`;ee.loggerProvider.warn(re),notified=!0}},networkConnectivityCheckerPlugin=function(){var ee="@amplitude/plugin-network-checker-browser",re="before",te=getGlobalScope(),ne=[],ie=function(ce,ue){te!=null&&te.addEventListener&&(te==null||te.addEventListener(ce,ue),ne.push({type:ce,handler:ue}))},oe=function(){ne.forEach(function(ce){var ue=ce.type,le=ce.handler;te==null||te.removeEventListener(ue,le)}),ne=[]},se=function(ce,ue){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(le){return typeof navigator>"u"?(ce.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),ce.offline=!1,[2]):(ce.offline=!navigator.onLine,ie("online",function(){ce.loggerProvider.debug("Network connectivity changed to online."),ce.offline=!1,setTimeout(function(){ue.flush()},ce.flushIntervalMillis)}),ie("offline",function(){ce.loggerProvider.debug("Network connectivity changed to offline."),ce.offline=!0}),[2])})})},ae=function(){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(ce){return oe(),[2]})})};return{name:ee,type:re,setup:se,teardown:ae}};function translateRemoteConfigToLocal(ee){var re,te,ne,ie,oe,se,ae,ce,ue,le,de;if(!(typeof ee!="object"||ee===null)&&!Array.isArray(ee)){var fe=Object.keys(ee);try{for(var he=__values$1(fe),pe=he.next();!pe.done;pe=he.next()){var ge=pe.value;try{var me=ee[ge];typeof(me==null?void 0:me.enabled)=="boolean"&&(me.enabled?(delete me.enabled,Object.keys(me).length===0&&(ee[ge]=!0)):ee[ge]=!1),translateRemoteConfigToLocal(me)}catch{}}}catch(Oe){re={error:Oe}}finally{try{pe&&!pe.done&&(te=he.return)&&te.call(he)}finally{if(re)throw re.error}}try{if(!((ue=(ce=(ae=ee.autocapture)===null||ae===void 0?void 0:ae.networkTracking)===null||ce===void 0?void 0:ce.captureRules)===null||ue===void 0)&&ue.length)try{for(var ye=__values$1(ee.autocapture.networkTracking.captureRules),ve=ye.next();!ve.done;ve=ye.next()){var be=ve.value;try{for(var _e=(oe=void 0,__values$1(["responseHeaders","requestHeaders"])),Ce=_e.next();!Ce.done;Ce=_e.next()){var Te=Ce.value,Se=(le=be[Te])!==null&&le!==void 0?le:{},Re=Se.captureSafeHeaders,we=Se.allowlist;if(!(!Re&&!we)){if(we!==void 0&&!Array.isArray(we)){delete be[Te];continue}be[Te]=__spreadArray(__spreadArray([],__read$1(Re?SAFE_HEADERS:[]),!1),__read$1(we??[]),!1)}}}catch(Oe){oe={error:Oe}}finally{try{Ce&&!Ce.done&&(se=_e.return)&&se.call(_e)}finally{if(oe)throw oe.error}}}}catch(Oe){ne={error:Oe}}finally{try{ve&&!ve.done&&(ie=ye.return)&&ie.call(ye)}finally{if(ne)throw ne.error}}}catch{}var Ae=(de=ee.autocapture)===null||de===void 0?void 0:de.frustrationInteractions;Ae&&(Ae.rageClick&&(Ae.rageClicks=Ae.rageClick,delete Ae.rageClick),Ae.deadClick&&(Ae.deadClicks=Ae.deadClick,delete Ae.deadClick))}}function mergeUrls(ee,re,te){var ne,ie,oe=[];try{for(var se=__values$1(re??[]),ae=se.next();!ae.done;ae=se.next()){var ce=ae.value;try{oe.push(new RegExp(ce))}catch(ue){te.loggerProvider.warn("Invalid regex pattern: ".concat(ce),ue)}}}catch(ue){ne={error:ue}}finally{try{ae&&!ae.done&&(ie=se.return)&&ie.call(se)}finally{if(ne)throw ne.error}}return ee.concat(oe)}function updateBrowserConfigWithRemoteConfig(ee,re){var te,ne,ie,oe,se,ae,ce;if(ee){translateRemoteConfigToLocal(ee);try{re.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(ee));var ue=ee;if(ue&&"autocapture"in ue){if(typeof ue.autocapture=="boolean"&&(re.autocapture=ue.autocapture),typeof ue.autocapture=="object"&&ue.autocapture!==null){var le=__assign$1({},ue.autocapture);if(re.autocapture===void 0&&(re.autocapture=ue.autocapture),typeof ue.autocapture.elementInteractions=="object"&&ue.autocapture.elementInteractions!==null&&(!((ie=ue.autocapture.elementInteractions.pageUrlAllowlistRegex)===null||ie===void 0)&&ie.length)){le.elementInteractions=__assign$1({},ue.autocapture.elementInteractions);var de=le.elementInteractions,fe=(oe=de.pageUrlAllowlist)!==null&&oe!==void 0?oe:[],he=ue.autocapture.elementInteractions.pageUrlAllowlistRegex;de.pageUrlAllowlist=mergeUrls(fe,he,re),delete de.pageUrlAllowlistRegex}if(typeof ue.autocapture.networkTracking=="object"&&ue.autocapture.networkTracking!==null&&(!((se=ue.autocapture.networkTracking.captureRules)===null||se===void 0)&&se.length)){le.networkTracking=__assign$1({},ue.autocapture.networkTracking);var pe=le.networkTracking,ge=(ae=pe.captureRules)!==null&&ae!==void 0?ae:[];try{for(var me=__values$1(ge),ye=me.next();!ye.done;ye=me.next()){var ve=ye.value;ve.urls=mergeUrls((ce=ve.urls)!==null&&ce!==void 0?ce:[],ve.urlsRegex,re),delete ve.urlsRegex}}catch(be){te={error:be}}finally{try{ye&&!ye.done&&(ne=me.return)&&ne.call(me)}finally{if(te)throw te.error}}}typeof re.autocapture=="boolean"&&(re.autocapture=__assign$1({attribution:re.autocapture,fileDownloads:re.autocapture,formInteractions:re.autocapture,pageViews:re.autocapture,sessions:re.autocapture,elementInteractions:re.autocapture,webVitals:re.autocapture,frustrationInteractions:re.autocapture},le)),typeof re.autocapture=="object"&&(re.autocapture=__assign$1(__assign$1({},re.autocapture),le))}re.defaultTracking=re.autocapture}re.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(re))}catch(be){re.loggerProvider.error("Failed to apply remote configuration because of error: ",be)}}}var PLUGIN_NAME$2="@amplitude/plugin-autocapture-browser",FRUSTRATION_PLUGIN_NAME="@amplitude/plugin-frustration-browser",AMPLITUDE_ELEMENT_CLICKED_EVENT="[Amplitude] Element Clicked",AMPLITUDE_ELEMENT_DEAD_CLICKED_EVENT="[Amplitude] Dead Click",AMPLITUDE_ELEMENT_RAGE_CLICKED_EVENT="[Amplitude] Rage Click",AMPLITUDE_ELEMENT_CHANGED_EVENT="[Amplitude] Element Changed",AMPLITUDE_EVENT_PROP_ELEMENT_ID="[Amplitude] Element ID",AMPLITUDE_EVENT_PROP_ELEMENT_CLASS="[Amplitude] Element Class",AMPLITUDE_EVENT_PROP_ELEMENT_TAG="[Amplitude] Element Tag",AMPLITUDE_EVENT_PROP_ELEMENT_TEXT="[Amplitude] Element Text",AMPLITUDE_EVENT_PROP_ELEMENT_HIERARCHY="[Amplitude] Element Hierarchy",AMPLITUDE_EVENT_PROP_ELEMENT_HREF="[Amplitude] Element Href",AMPLITUDE_EVENT_PROP_ELEMENT_POSITION_LEFT="[Amplitude] Element Position Left",AMPLITUDE_EVENT_PROP_ELEMENT_POSITION_TOP="[Amplitude] Element Position Top",AMPLITUDE_EVENT_PROP_ELEMENT_ARIA_LABEL="[Amplitude] Element Aria Label",AMPLITUDE_EVENT_PROP_ELEMENT_ATTRIBUTES="[Amplitude] Element Attributes",AMPLITUDE_EVENT_PROP_ELEMENT_PARENT_LABEL="[Amplitude] Element Parent Label",AMPLITUDE_EVENT_PROP_PAGE_URL="[Amplitude] Page URL",AMPLITUDE_EVENT_PROP_PAGE_TITLE="[Amplitude] Page Title",AMPLITUDE_EVENT_PROP_VIEWPORT_HEIGHT="[Amplitude] Viewport Height",AMPLITUDE_EVENT_PROP_VIEWPORT_WIDTH="[Amplitude] Viewport Width",AMPLITUDE_ORIGIN="https://app.amplitude.com",AMPLITUDE_ORIGIN_EU="https://app.eu.amplitude.com",AMPLITUDE_ORIGIN_STAGING="https://apps.stag2.amplitude.com",AMPLITUDE_ORIGINS_MAP={US:AMPLITUDE_ORIGIN,EU:AMPLITUDE_ORIGIN_EU,STAGING:AMPLITUDE_ORIGIN_STAGING},AMPLITUDE_VISUAL_TAGGING_SELECTOR_SCRIPT_URL="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",AMPLITUDE_VISUAL_TAGGING_HIGHLIGHT_CLASS="amp-visual-tagging-selector-highlight",DATA_AMP_MASK_ATTRIBUTES="data-amp-mask-attributes",MAX_MASK_TEXT_PATTERNS=25;function isFunction$2(ee){return typeof ee=="function"}function createErrorClass(ee){var re=function(ne){Error.call(ne),ne.stack=new Error().stack},te=ee(re);return te.prototype=Object.create(Error.prototype),te.prototype.constructor=te,te}var UnsubscriptionError=createErrorClass(function(ee){return function(te){ee(this),this.message=te?te.length+` errors occurred during unsubscription:
|
|
875
875
|
`+te.map(function(ne,ie){return ie+1+") "+ne.toString()}).join(`
|
|
876
876
|
`):"",this.name="UnsubscriptionError",this.errors=te}});function arrRemove(ee,re){if(ee){var te=ee.indexOf(re);0<=te&&ee.splice(te,1)}}var Subscription=(function(){function ee(re){this.initialTeardown=re,this.closed=!1,this._parentage=null,this._finalizers=null}return ee.prototype.unsubscribe=function(){var re,te,ne,ie,oe;if(!this.closed){this.closed=!0;var se=this._parentage;if(se)if(this._parentage=null,Array.isArray(se))try{for(var ae=__values$1(se),ce=ae.next();!ce.done;ce=ae.next()){var ue=ce.value;ue.remove(this)}}catch(ge){re={error:ge}}finally{try{ce&&!ce.done&&(te=ae.return)&&te.call(ae)}finally{if(re)throw re.error}}else se.remove(this);var le=this.initialTeardown;if(isFunction$2(le))try{le()}catch(ge){oe=ge instanceof UnsubscriptionError?ge.errors:[ge]}var de=this._finalizers;if(de){this._finalizers=null;try{for(var fe=__values$1(de),he=fe.next();!he.done;he=fe.next()){var pe=he.value;try{execFinalizer(pe)}catch(ge){oe=oe??[],ge instanceof UnsubscriptionError?oe=__spreadArray(__spreadArray([],__read$1(oe)),__read$1(ge.errors)):oe.push(ge)}}}catch(ge){ne={error:ge}}finally{try{he&&!he.done&&(ie=fe.return)&&ie.call(fe)}finally{if(ne)throw ne.error}}}if(oe)throw new UnsubscriptionError(oe)}},ee.prototype.add=function(re){var te;if(re&&re!==this)if(this.closed)execFinalizer(re);else{if(re instanceof ee){if(re.closed||re._hasParent(this))return;re._addParent(this)}(this._finalizers=(te=this._finalizers)!==null&&te!==void 0?te:[]).push(re)}},ee.prototype._hasParent=function(re){var te=this._parentage;return te===re||Array.isArray(te)&&te.includes(re)},ee.prototype._addParent=function(re){var te=this._parentage;this._parentage=Array.isArray(te)?(te.push(re),te):te?[te,re]:re},ee.prototype._removeParent=function(re){var te=this._parentage;te===re?this._parentage=null:Array.isArray(te)&&arrRemove(te,re)},ee.prototype.remove=function(re){var te=this._finalizers;te&&arrRemove(te,re),re instanceof ee&&re._removeParent(this)},ee.EMPTY=(function(){var re=new ee;return re.closed=!0,re})(),ee})(),EMPTY_SUBSCRIPTION=Subscription.EMPTY;function isSubscription(ee){return ee instanceof Subscription||ee&&"closed"in ee&&isFunction$2(ee.remove)&&isFunction$2(ee.add)&&isFunction$2(ee.unsubscribe)}function execFinalizer(ee){isFunction$2(ee)?ee():ee.unsubscribe()}var config={Promise:void 0},timeoutProvider={setTimeout:function(ee,re){for(var te=[],ne=2;ne<arguments.length;ne++)te[ne-2]=arguments[ne];return setTimeout.apply(void 0,__spreadArray([ee,re],__read$1(te)))},clearTimeout:function(ee){return clearTimeout(ee)},delegate:void 0};function reportUnhandledError(ee){timeoutProvider.setTimeout(function(){throw ee})}function noop$1(){}function errorContext(ee){ee()}var Subscriber=(function(ee){__extends(re,ee);function re(te){var ne=ee.call(this)||this;return ne.isStopped=!1,te?(ne.destination=te,isSubscription(te)&&te.add(ne)):ne.destination=EMPTY_OBSERVER,ne}return re.create=function(te,ne,ie){return new SafeSubscriber(te,ne,ie)},re.prototype.next=function(te){this.isStopped||this._next(te)},re.prototype.error=function(te){this.isStopped||(this.isStopped=!0,this._error(te))},re.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},re.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,ee.prototype.unsubscribe.call(this),this.destination=null)},re.prototype._next=function(te){this.destination.next(te)},re.prototype._error=function(te){try{this.destination.error(te)}finally{this.unsubscribe()}},re.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},re})(Subscription),ConsumerObserver=(function(){function ee(re){this.partialObserver=re}return ee.prototype.next=function(re){var te=this.partialObserver;if(te.next)try{te.next(re)}catch(ne){handleUnhandledError(ne)}},ee.prototype.error=function(re){var te=this.partialObserver;if(te.error)try{te.error(re)}catch(ne){handleUnhandledError(ne)}else handleUnhandledError(re)},ee.prototype.complete=function(){var re=this.partialObserver;if(re.complete)try{re.complete()}catch(te){handleUnhandledError(te)}},ee})(),SafeSubscriber=(function(ee){__extends(re,ee);function re(te,ne,ie){var oe=ee.call(this)||this,se;return isFunction$2(te)||!te?se={next:te??void 0,error:ne??void 0,complete:ie??void 0}:se=te,oe.destination=new ConsumerObserver(se),oe}return re})(Subscriber);function handleUnhandledError(ee){reportUnhandledError(ee)}function defaultErrorHandler(ee){throw ee}var EMPTY_OBSERVER={closed:!0,next:noop$1,error:defaultErrorHandler,complete:noop$1},observable=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function identity(ee){return ee}function pipeFromArray(ee){return ee.length===0?identity:ee.length===1?ee[0]:function(te){return ee.reduce(function(ne,ie){return ie(ne)},te)}}var Observable=(function(){function ee(re){re&&(this._subscribe=re)}return ee.prototype.lift=function(re){var te=new ee;return te.source=this,te.operator=re,te},ee.prototype.subscribe=function(re,te,ne){var ie=this,oe=isSubscriber(re)?re:new SafeSubscriber(re,te,ne);return errorContext(function(){var se=ie,ae=se.operator,ce=se.source;oe.add(ae?ae.call(oe,ce):ce?ie._subscribe(oe):ie._trySubscribe(oe))}),oe},ee.prototype._trySubscribe=function(re){try{return this._subscribe(re)}catch(te){re.error(te)}},ee.prototype.forEach=function(re,te){var ne=this;return te=getPromiseCtor(te),new te(function(ie,oe){var se=new SafeSubscriber({next:function(ae){try{re(ae)}catch(ce){oe(ce),se.unsubscribe()}},error:oe,complete:ie});ne.subscribe(se)})},ee.prototype._subscribe=function(re){var te;return(te=this.source)===null||te===void 0?void 0:te.subscribe(re)},ee.prototype[observable]=function(){return this},ee.prototype.pipe=function(){for(var re=[],te=0;te<arguments.length;te++)re[te]=arguments[te];return pipeFromArray(re)(this)},ee.prototype.toPromise=function(re){var te=this;return re=getPromiseCtor(re),new re(function(ne,ie){var oe;te.subscribe(function(se){return oe=se},function(se){return ie(se)},function(){return ne(oe)})})},ee.create=function(re){return new ee(re)},ee})();function getPromiseCtor(ee){var re;return(re=ee??config.Promise)!==null&&re!==void 0?re:Promise}function isObserver(ee){return ee&&isFunction$2(ee.next)&&isFunction$2(ee.error)&&isFunction$2(ee.complete)}function isSubscriber(ee){return ee&&ee instanceof Subscriber||isObserver(ee)&&isSubscription(ee)}function hasLift(ee){return isFunction$2(ee==null?void 0:ee.lift)}function operate(ee){return function(re){if(hasLift(re))return re.lift(function(te){try{return ee(te,this)}catch(ne){this.error(ne)}});throw new TypeError("Unable to lift unknown Observable type")}}function createOperatorSubscriber(ee,re,te,ne,ie){return new OperatorSubscriber(ee,re,te,ne,ie)}var OperatorSubscriber=(function(ee){__extends(re,ee);function re(te,ne,ie,oe,se,ae){var ce=ee.call(this,te)||this;return ce.onFinalize=se,ce.shouldUnsubscribe=ae,ce._next=ne?function(ue){try{ne(ue)}catch(le){te.error(le)}}:ee.prototype._next,ce._error=oe?function(ue){try{oe(ue)}catch(le){te.error(le)}finally{this.unsubscribe()}}:ee.prototype._error,ce._complete=ie?function(){try{ie()}catch(ue){te.error(ue)}finally{this.unsubscribe()}}:ee.prototype._complete,ce}return re.prototype.unsubscribe=function(){var te;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var ne=this.closed;ee.prototype.unsubscribe.call(this),!ne&&((te=this.onFinalize)===null||te===void 0||te.call(this))}},re})(Subscriber),ObjectUnsubscribedError=createErrorClass(function(ee){return function(){ee(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Subject=(function(ee){__extends(re,ee);function re(){var te=ee.call(this)||this;return te.closed=!1,te.currentObservers=null,te.observers=[],te.isStopped=!1,te.hasError=!1,te.thrownError=null,te}return re.prototype.lift=function(te){var ne=new AnonymousSubject(this,this);return ne.operator=te,ne},re.prototype._throwIfClosed=function(){if(this.closed)throw new ObjectUnsubscribedError},re.prototype.next=function(te){var ne=this;errorContext(function(){var ie,oe;if(ne._throwIfClosed(),!ne.isStopped){ne.currentObservers||(ne.currentObservers=Array.from(ne.observers));try{for(var se=__values$1(ne.currentObservers),ae=se.next();!ae.done;ae=se.next()){var ce=ae.value;ce.next(te)}}catch(ue){ie={error:ue}}finally{try{ae&&!ae.done&&(oe=se.return)&&oe.call(se)}finally{if(ie)throw ie.error}}}})},re.prototype.error=function(te){var ne=this;errorContext(function(){if(ne._throwIfClosed(),!ne.isStopped){ne.hasError=ne.isStopped=!0,ne.thrownError=te;for(var ie=ne.observers;ie.length;)ie.shift().error(te)}})},re.prototype.complete=function(){var te=this;errorContext(function(){if(te._throwIfClosed(),!te.isStopped){te.isStopped=!0;for(var ne=te.observers;ne.length;)ne.shift().complete()}})},re.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(re.prototype,"observed",{get:function(){var te;return((te=this.observers)===null||te===void 0?void 0:te.length)>0},enumerable:!1,configurable:!0}),re.prototype._trySubscribe=function(te){return this._throwIfClosed(),ee.prototype._trySubscribe.call(this,te)},re.prototype._subscribe=function(te){return this._throwIfClosed(),this._checkFinalizedStatuses(te),this._innerSubscribe(te)},re.prototype._innerSubscribe=function(te){var ne=this,ie=this,oe=ie.hasError,se=ie.isStopped,ae=ie.observers;return oe||se?EMPTY_SUBSCRIPTION:(this.currentObservers=null,ae.push(te),new Subscription(function(){ne.currentObservers=null,arrRemove(ae,te)}))},re.prototype._checkFinalizedStatuses=function(te){var ne=this,ie=ne.hasError,oe=ne.thrownError,se=ne.isStopped;ie?te.error(oe):se&&te.complete()},re.prototype.asObservable=function(){var te=new Observable;return te.source=this,te},re.create=function(te,ne){return new AnonymousSubject(te,ne)},re})(Observable),AnonymousSubject=(function(ee){__extends(re,ee);function re(te,ne){var ie=ee.call(this)||this;return ie.destination=te,ie.source=ne,ie}return re.prototype.next=function(te){var ne,ie;(ie=(ne=this.destination)===null||ne===void 0?void 0:ne.next)===null||ie===void 0||ie.call(ne,te)},re.prototype.error=function(te){var ne,ie;(ie=(ne=this.destination)===null||ne===void 0?void 0:ne.error)===null||ie===void 0||ie.call(ne,te)},re.prototype.complete=function(){var te,ne;(ne=(te=this.destination)===null||te===void 0?void 0:te.complete)===null||ne===void 0||ne.call(te)},re.prototype._subscribe=function(te){var ne,ie;return(ie=(ne=this.source)===null||ne===void 0?void 0:ne.subscribe(te))!==null&&ie!==void 0?ie:EMPTY_SUBSCRIPTION},re})(Subject),dateTimestampProvider={now:function(){return Date.now()}},Action=(function(ee){__extends(re,ee);function re(te,ne){return ee.call(this)||this}return re.prototype.schedule=function(te,ne){return this},re})(Subscription),intervalProvider={setInterval:function(ee,re){for(var te=[],ne=2;ne<arguments.length;ne++)te[ne-2]=arguments[ne];return setInterval.apply(void 0,__spreadArray([ee,re],__read$1(te)))},clearInterval:function(ee){return clearInterval(ee)},delegate:void 0},AsyncAction=(function(ee){__extends(re,ee);function re(te,ne){var ie=ee.call(this,te,ne)||this;return ie.scheduler=te,ie.work=ne,ie.pending=!1,ie}return re.prototype.schedule=function(te,ne){var ie;if(ne===void 0&&(ne=0),this.closed)return this;this.state=te;var oe=this.id,se=this.scheduler;return oe!=null&&(this.id=this.recycleAsyncId(se,oe,ne)),this.pending=!0,this.delay=ne,this.id=(ie=this.id)!==null&&ie!==void 0?ie:this.requestAsyncId(se,this.id,ne),this},re.prototype.requestAsyncId=function(te,ne,ie){return ie===void 0&&(ie=0),intervalProvider.setInterval(te.flush.bind(te,this),ie)},re.prototype.recycleAsyncId=function(te,ne,ie){if(ie===void 0&&(ie=0),ie!=null&&this.delay===ie&&this.pending===!1)return ne;ne!=null&&intervalProvider.clearInterval(ne)},re.prototype.execute=function(te,ne){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var ie=this._execute(te,ne);if(ie)return ie;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},re.prototype._execute=function(te,ne){var ie=!1,oe;try{this.work(te)}catch(se){ie=!0,oe=se||new Error("Scheduled action threw falsy error")}if(ie)return this.unsubscribe(),oe},re.prototype.unsubscribe=function(){if(!this.closed){var te=this,ne=te.id,ie=te.scheduler,oe=ie.actions;this.work=this.state=this.scheduler=null,this.pending=!1,arrRemove(oe,this),ne!=null&&(this.id=this.recycleAsyncId(ie,ne,null)),this.delay=null,ee.prototype.unsubscribe.call(this)}},re})(Action),Scheduler=(function(){function ee(re,te){te===void 0&&(te=ee.now),this.schedulerActionCtor=re,this.now=te}return ee.prototype.schedule=function(re,te,ne){return te===void 0&&(te=0),new this.schedulerActionCtor(this,re).schedule(ne,te)},ee.now=dateTimestampProvider.now,ee})(),AsyncScheduler=(function(ee){__extends(re,ee);function re(te,ne){ne===void 0&&(ne=Scheduler.now);var ie=ee.call(this,te,ne)||this;return ie.actions=[],ie._active=!1,ie}return re.prototype.flush=function(te){var ne=this.actions;if(this._active){ne.push(te);return}var ie;this._active=!0;do if(ie=te.execute(te.state,te.delay))break;while(te=ne.shift());if(this._active=!1,ie){for(;te=ne.shift();)te.unsubscribe();throw ie}},re})(Scheduler),asyncScheduler=new AsyncScheduler(AsyncAction),async=asyncScheduler,EMPTY=new Observable(function(ee){return ee.complete()});function isScheduler(ee){return ee&&isFunction$2(ee.schedule)}function last(ee){return ee[ee.length-1]}function popScheduler(ee){return isScheduler(last(ee))?ee.pop():void 0}function popNumber(ee,re){return typeof last(ee)=="number"?ee.pop():re}var isArrayLike=(function(ee){return ee&&typeof ee.length=="number"&&typeof ee!="function"});function isPromise(ee){return isFunction$2(ee==null?void 0:ee.then)}function isInteropObservable(ee){return isFunction$2(ee[observable])}function isAsyncIterable(ee){return Symbol.asyncIterator&&isFunction$2(ee==null?void 0:ee[Symbol.asyncIterator])}function createInvalidObservableTypeError(ee){return new TypeError("You provided "+(ee!==null&&typeof ee=="object"?"an invalid object":"'"+ee+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function getSymbolIterator(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var iterator$1=getSymbolIterator();function isIterable$1(ee){return isFunction$2(ee==null?void 0:ee[iterator$1])}function readableStreamLikeToAsyncGenerator(ee){return __asyncGenerator(this,arguments,function(){var te,ne,ie,oe;return __generator(this,function(se){switch(se.label){case 0:te=ee.getReader(),se.label=1;case 1:se.trys.push([1,,9,10]),se.label=2;case 2:return[4,__await(te.read())];case 3:return ne=se.sent(),ie=ne.value,oe=ne.done,oe?[4,__await(void 0)]:[3,5];case 4:return[2,se.sent()];case 5:return[4,__await(ie)];case 6:return[4,se.sent()];case 7:return se.sent(),[3,2];case 8:return[3,10];case 9:return te.releaseLock(),[7];case 10:return[2]}})})}function isReadableStreamLike(ee){return isFunction$2(ee==null?void 0:ee.getReader)}function innerFrom(ee){if(ee instanceof Observable)return ee;if(ee!=null){if(isInteropObservable(ee))return fromInteropObservable(ee);if(isArrayLike(ee))return fromArrayLike(ee);if(isPromise(ee))return fromPromise(ee);if(isAsyncIterable(ee))return fromAsyncIterable(ee);if(isIterable$1(ee))return fromIterable(ee);if(isReadableStreamLike(ee))return fromReadableStreamLike(ee)}throw createInvalidObservableTypeError(ee)}function fromInteropObservable(ee){return new Observable(function(re){var te=ee[observable]();if(isFunction$2(te.subscribe))return te.subscribe(re);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function fromArrayLike(ee){return new Observable(function(re){for(var te=0;te<ee.length&&!re.closed;te++)re.next(ee[te]);re.complete()})}function fromPromise(ee){return new Observable(function(re){ee.then(function(te){re.closed||(re.next(te),re.complete())},function(te){return re.error(te)}).then(null,reportUnhandledError)})}function fromIterable(ee){return new Observable(function(re){var te,ne;try{for(var ie=__values$1(ee),oe=ie.next();!oe.done;oe=ie.next()){var se=oe.value;if(re.next(se),re.closed)return}}catch(ae){te={error:ae}}finally{try{oe&&!oe.done&&(ne=ie.return)&&ne.call(ie)}finally{if(te)throw te.error}}re.complete()})}function fromAsyncIterable(ee){return new Observable(function(re){process$1(ee,re).catch(function(te){return re.error(te)})})}function fromReadableStreamLike(ee){return fromAsyncIterable(readableStreamLikeToAsyncGenerator(ee))}function process$1(ee,re){var te,ne,ie,oe;return __awaiter(this,void 0,void 0,function(){var se,ae;return __generator(this,function(ce){switch(ce.label){case 0:ce.trys.push([0,5,6,11]),te=__asyncValues(ee),ce.label=1;case 1:return[4,te.next()];case 2:if(ne=ce.sent(),!!ne.done)return[3,4];if(se=ne.value,re.next(se),re.closed)return[2];ce.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return ae=ce.sent(),ie={error:ae},[3,11];case 6:return ce.trys.push([6,,9,10]),ne&&!ne.done&&(oe=te.return)?[4,oe.call(te)]:[3,8];case 7:ce.sent(),ce.label=8;case 8:return[3,10];case 9:if(ie)throw ie.error;return[7];case 10:return[7];case 11:return re.complete(),[2]}})})}function executeSchedule(ee,re,te,ne,ie){ne===void 0&&(ne=0),ie===void 0&&(ie=!1);var oe=re.schedule(function(){te(),ie?ee.add(this.schedule(null,ne)):this.unsubscribe()},ne);if(ee.add(oe),!ie)return oe}function observeOn(ee,re){return re===void 0&&(re=0),operate(function(te,ne){te.subscribe(createOperatorSubscriber(ne,function(ie){return executeSchedule(ne,ee,function(){return ne.next(ie)},re)},function(){return executeSchedule(ne,ee,function(){return ne.complete()},re)},function(ie){return executeSchedule(ne,ee,function(){return ne.error(ie)},re)}))})}function subscribeOn(ee,re){return re===void 0&&(re=0),operate(function(te,ne){ne.add(ee.schedule(function(){return te.subscribe(ne)},re))})}function scheduleObservable(ee,re){return innerFrom(ee).pipe(subscribeOn(re),observeOn(re))}function schedulePromise(ee,re){return innerFrom(ee).pipe(subscribeOn(re),observeOn(re))}function scheduleArray(ee,re){return new Observable(function(te){var ne=0;return re.schedule(function(){ne===ee.length?te.complete():(te.next(ee[ne++]),te.closed||this.schedule())})})}function scheduleIterable(ee,re){return new Observable(function(te){var ne;return executeSchedule(te,re,function(){ne=ee[iterator$1](),executeSchedule(te,re,function(){var ie,oe,se;try{ie=ne.next(),oe=ie.value,se=ie.done}catch(ae){te.error(ae);return}se?te.complete():te.next(oe)},0,!0)}),function(){return isFunction$2(ne==null?void 0:ne.return)&&ne.return()}})}function scheduleAsyncIterable(ee,re){if(!ee)throw new Error("Iterable cannot be null");return new Observable(function(te){executeSchedule(te,re,function(){var ne=ee[Symbol.asyncIterator]();executeSchedule(te,re,function(){ne.next().then(function(ie){ie.done?te.complete():te.next(ie.value)})},0,!0)})})}function scheduleReadableStreamLike(ee,re){return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(ee),re)}function scheduled(ee,re){if(ee!=null){if(isInteropObservable(ee))return scheduleObservable(ee,re);if(isArrayLike(ee))return scheduleArray(ee,re);if(isPromise(ee))return schedulePromise(ee,re);if(isAsyncIterable(ee))return scheduleAsyncIterable(ee,re);if(isIterable$1(ee))return scheduleIterable(ee,re);if(isReadableStreamLike(ee))return scheduleReadableStreamLike(ee,re)}throw createInvalidObservableTypeError(ee)}function from(ee,re){return re?scheduled(ee,re):innerFrom(ee)}function isValidDate(ee){return ee instanceof Date&&!isNaN(ee)}var TimeoutError=createErrorClass(function(ee){return function(te){te===void 0&&(te=null),ee(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=te}});function timeout(ee,re){var te=isValidDate(ee)?{first:ee}:typeof ee=="number"?{each:ee}:ee,ne=te.first,ie=te.each,oe=te.with,se=oe===void 0?timeoutErrorFactory:oe,ae=te.scheduler,ce=ae===void 0?asyncScheduler:ae,ue=te.meta,le=ue===void 0?null:ue;if(ne==null&&ie==null)throw new TypeError("No timeout provided.");return operate(function(de,fe){var he,pe,ge=null,me=0,ye=function(ve){pe=executeSchedule(fe,ce,function(){try{he.unsubscribe(),innerFrom(se({meta:le,lastValue:ge,seen:me})).subscribe(fe)}catch(be){fe.error(be)}},ve)};he=de.subscribe(createOperatorSubscriber(fe,function(ve){pe==null||pe.unsubscribe(),me++,fe.next(ge=ve),ie>0&&ye(ie)},void 0,void 0,function(){pe!=null&&pe.closed||pe==null||pe.unsubscribe(),ge=null})),!me&&ye(ne!=null?typeof ne=="number"?ne:+ne-ce.now():ie)})}function timeoutErrorFactory(ee){throw new TimeoutError(ee)}function map(ee,re){return operate(function(te,ne){var ie=0;te.subscribe(createOperatorSubscriber(ne,function(oe){ne.next(ee.call(re,oe,ie++))}))})}var isArray$2=Array.isArray;function callOrApply(ee,re){return isArray$2(re)?ee.apply(void 0,__spreadArray([],__read$1(re))):ee(re)}function mapOneOrManyArgs(ee){return map(function(re){return callOrApply(ee,re)})}function mergeInternals(ee,re,te,ne,ie,oe,se,ae){var ce=[],ue=0,le=0,de=!1,fe=function(){de&&!ce.length&&!ue&&re.complete()},he=function(ge){return ue<ne?pe(ge):ce.push(ge)},pe=function(ge){ue++;var me=!1;innerFrom(te(ge,le++)).subscribe(createOperatorSubscriber(re,function(ye){re.next(ye)},function(){me=!0},void 0,function(){if(me)try{ue--;for(var ye=function(){var ve=ce.shift();se||pe(ve)};ce.length&&ue<ne;)ye();fe()}catch(ve){re.error(ve)}}))};return ee.subscribe(createOperatorSubscriber(re,he,function(){de=!0,fe()})),function(){}}function mergeMap(ee,re,te){return te===void 0&&(te=1/0),isFunction$2(re)?mergeMap(function(ne,ie){return map(function(oe,se){return re(ne,oe,ie,se)})(innerFrom(ee(ne,ie)))},te):(typeof re=="number"&&(te=re),operate(function(ne,ie){return mergeInternals(ne,ie,ee,te)}))}function mergeAll(ee){return ee===void 0&&(ee=1/0),mergeMap(identity,ee)}var nodeEventEmitterMethods=["addListener","removeListener"],eventTargetMethods=["addEventListener","removeEventListener"],jqueryMethods=["on","off"];function fromEvent(ee,re,te,ne){if(isFunction$2(te)&&(ne=te,te=void 0),ne)return fromEvent(ee,re,te).pipe(mapOneOrManyArgs(ne));var ie=__read$1(isEventTarget(ee)?eventTargetMethods.map(function(ae){return function(ce){return ee[ae](re,ce,te)}}):isNodeStyleEventEmitter(ee)?nodeEventEmitterMethods.map(toCommonHandlerRegistry(ee,re)):isJQueryStyleEventEmitter(ee)?jqueryMethods.map(toCommonHandlerRegistry(ee,re)):[],2),oe=ie[0],se=ie[1];if(!oe&&isArrayLike(ee))return mergeMap(function(ae){return fromEvent(ae,re,te)})(innerFrom(ee));if(!oe)throw new TypeError("Invalid event target");return new Observable(function(ae){var ce=function(){for(var ue=[],le=0;le<arguments.length;le++)ue[le]=arguments[le];return ae.next(1<ue.length?ue:ue[0])};return oe(ce),function(){return se(ce)}})}function toCommonHandlerRegistry(ee,re){return function(te){return function(ne){return ee[te](re,ne)}}}function isNodeStyleEventEmitter(ee){return isFunction$2(ee.addListener)&&isFunction$2(ee.removeListener)}function isJQueryStyleEventEmitter(ee){return isFunction$2(ee.on)&&isFunction$2(ee.off)}function isEventTarget(ee){return isFunction$2(ee.addEventListener)&&isFunction$2(ee.removeEventListener)}function timer(ee,re,te){ee===void 0&&(ee=0),te===void 0&&(te=async);var ne=-1;return re!=null&&(isScheduler(re)?te=re:ne=re),new Observable(function(ie){var oe=isValidDate(ee)?+ee-te.now():ee;oe<0&&(oe=0);var se=0;return te.schedule(function(){ie.closed||(ie.next(se++),0<=ne?this.schedule(void 0,ne):ie.complete())},oe)})}function merge$1(){for(var ee=[],re=0;re<arguments.length;re++)ee[re]=arguments[re];var te=popScheduler(ee),ne=popNumber(ee,1/0),ie=ee;return ie.length?ie.length===1?innerFrom(ie[0]):mergeAll(ne)(from(ie,te)):EMPTY}var isArray$1=Array.isArray;function argsOrArgArray(ee){return ee.length===1&&isArray$1(ee[0])?ee[0]:ee}function filter(ee,re){return operate(function(te,ne){var ie=0;te.subscribe(createOperatorSubscriber(ne,function(oe){return ee.call(re,oe,ie++)&&ne.next(oe)}))})}function race(){for(var ee=[],re=0;re<arguments.length;re++)ee[re]=arguments[re];return ee=argsOrArgArray(ee),ee.length===1?innerFrom(ee[0]):new Observable(raceInit(ee))}function raceInit(ee){return function(re){for(var te=[],ne=function(oe){te.push(innerFrom(ee[oe]).subscribe(createOperatorSubscriber(re,function(se){if(te){for(var ae=0;ae<te.length;ae++)ae!==oe&&te[ae].unsubscribe();te=null}re.next(se)})))},ie=0;te&&!re.closed&&ie<ee.length;ie++)ne(ie)}}function buffer(ee){return operate(function(re,te){var ne=[];return re.subscribe(createOperatorSubscriber(te,function(ie){return ne.push(ie)},function(){te.next(ne),te.complete()})),innerFrom(ee).subscribe(createOperatorSubscriber(te,function(){var ie=ne;ne=[],te.next(ie)},noop$1)),function(){ne=null}})}function debounceTime(ee,re){return re===void 0&&(re=asyncScheduler),operate(function(te,ne){var ie=null,oe=null,se=null,ae=function(){if(ie){ie.unsubscribe(),ie=null;var ue=oe;oe=null,ne.next(ue)}};function ce(){var ue=se+ee,le=re.now();if(le<ue){ie=this.schedule(void 0,ue-le),ne.add(ie);return}ae()}te.subscribe(createOperatorSubscriber(ne,function(ue){oe=ue,se=re.now(),ie||(ie=re.schedule(ce,ee),ne.add(ie))},function(){ae(),ne.complete()},void 0,function(){oe=ie=null}))})}function take(ee){return ee<=0?function(){return EMPTY}:operate(function(re,te){var ne=0;re.subscribe(createOperatorSubscriber(te,function(ie){++ne<=ee&&(te.next(ie),ee<=ne&&te.complete())}))})}function mapTo(ee){return map(function(){return ee})}function delayWhen(ee,re){return mergeMap(function(te,ne){return innerFrom(ee(te,ne)).pipe(take(1),mapTo(te))})}function delay(ee,re){re===void 0&&(re=asyncScheduler);var te=timer(ee,re);return delayWhen(function(){return te})}function pairwise(){return operate(function(ee,re){var te,ne=!1;ee.subscribe(createOperatorSubscriber(re,function(ie){var oe=te;te=ie,ne&&re.next([oe,ie]),ne=!0}))})}function share(ee){ee===void 0&&(ee={});var re=ee.connector,te=re===void 0?function(){return new Subject}:re,ne=ee.resetOnError,ie=ne===void 0?!0:ne,oe=ee.resetOnComplete,se=oe===void 0?!0:oe,ae=ee.resetOnRefCountZero,ce=ae===void 0?!0:ae;return function(ue){var le,de,fe,he=0,pe=!1,ge=!1,me=function(){de==null||de.unsubscribe(),de=void 0},ye=function(){me(),le=fe=void 0,pe=ge=!1},ve=function(){var be=le;ye(),be==null||be.unsubscribe()};return operate(function(be,_e){he++,!ge&&!pe&&me();var Ce=fe=fe??te();_e.add(function(){he--,he===0&&!ge&&!pe&&(de=handleReset(ve,ce))}),Ce.subscribe(_e),!le&&he>0&&(le=new SafeSubscriber({next:function(Te){return Ce.next(Te)},error:function(Te){ge=!0,me(),de=handleReset(ye,ie,Te),Ce.error(Te)},complete:function(){pe=!0,me(),de=handleReset(ye,se),Ce.complete()}}),innerFrom(be).subscribe(le))})(ue)}}function handleReset(ee,re){for(var te=[],ne=2;ne<arguments.length;ne++)te[ne-2]=arguments[ne];if(re===!0){ee();return}if(re!==!1){var ie=new SafeSubscriber({next:function(){ie.unsubscribe(),ee()}});return innerFrom(re.apply(void 0,__spreadArray([],__read$1(te)))).subscribe(ie)}}function switchMap(ee,re){return operate(function(te,ne){var ie=null,oe=0,se=!1,ae=function(){return se&&!ie&&ne.complete()};te.subscribe(createOperatorSubscriber(ne,function(ce){ie==null||ie.unsubscribe();var ue=0,le=oe++;innerFrom(ee(ce,le)).subscribe(ie=createOperatorSubscriber(ne,function(de){return ne.next(re?re(ce,de,le,ue++):de)},function(){ie=null,ae()}))},function(){se=!0,ae()}))})}function throttle$1(ee,re){return operate(function(te,ne){var ie=re??{},oe=ie.leading,se=oe===void 0?!0:oe,ae=ie.trailing,ce=ae===void 0?!1:ae,ue=!1,le=null,de=null,fe=!1,he=function(){de==null||de.unsubscribe(),de=null,ce&&(me(),fe&&ne.complete())},pe=function(){de=null,fe&&ne.complete()},ge=function(ye){return de=innerFrom(ee(ye)).subscribe(createOperatorSubscriber(ne,he,pe))},me=function(){if(ue){ue=!1;var ye=le;le=null,ne.next(ye),!fe&&ge(ye)}};te.subscribe(createOperatorSubscriber(ne,function(ye){ue=!0,le=ye,!(de&&!de.closed)&&(se?me():ge(ye))},function(){fe=!0,!(ce&&ue&&de&&!de.closed)&&ne.complete()}))})}function throttleTime(ee,re,te){re===void 0&&(re=asyncScheduler);var ne=timer(ee,re);return throttle$1(function(){return ne},te)}var SENSITIVE_TAGS=["input","select","textarea"],isElementPointerCursor=function(ee,re){var te,ne=(te=window==null?void 0:window.getComputedStyle)===null||te===void 0?void 0:te.call(window,ee);return(ne==null?void 0:ne.getPropertyValue("cursor"))==="pointer"&&re==="click"},createShouldTrackEvent=function(ee,re,te){return te===void 0&&(te=!1),function(ne,ie){var oe,se,ae=ee.pageUrlAllowlist,ce=ee.pageUrlExcludelist,ue=ee.shouldTrackEventResolver,le=(se=(oe=ie==null?void 0:ie.tagName)===null||oe===void 0?void 0:oe.toLowerCase)===null||se===void 0?void 0:se.call(oe);if(!le)return!1;if(ue)return ue(ne,ie);if(!isUrlMatchAllowlist(window.location.href,ae)||ce&&ce.length>0&&isUrlMatchAllowlist(window.location.href,ce))return!1;var de=String(ie==null?void 0:ie.getAttribute("type"))||"";if(typeof de=="string")switch(de.toLowerCase()){case"hidden":return!1;case"password":return!1}var fe=isElementPointerCursor(ie,ne);if(te&&fe)return!0;if(re){var he=re.some(function(pe){var ge;return!!(!((ge=ie==null?void 0:ie.matches)===null||ge===void 0)&&ge.call(ie,pe))});if(!he)return!1}switch(le){case"input":case"select":case"textarea":return ne==="change"||ne==="click";default:return fe?!0:ne==="click"}}},isNonSensitiveElement=function(ee){var re,te,ne,ie=(te=(re=ee==null?void 0:ee.tagName)===null||re===void 0?void 0:re.toLowerCase)===null||te===void 0?void 0:te.call(re),oe=ee instanceof HTMLElement?((ne=ee.getAttribute("contenteditable"))===null||ne===void 0?void 0:ne.toLowerCase())==="true":!1;return!SENSITIVE_TAGS.includes(ie)&&!oe},parseAttributesToMask=function(ee){return ee?ee.split(",").map(function(re){return re.trim()}).filter(function(re){return re.length>0&&re!=="id"&&re!=="class"}):[]},extractPrefixedAttributes=function(ee,re){return Object.entries(ee).reduce(function(te,ne){var ie=__read$1(ne,2),oe=ie[0],se=ie[1];if(oe.startsWith(re)){var ae=oe.replace(re,"");ae&&(te[ae]=se||"")}return te},{})},isEmpty=function(ee){return ee==null||typeof ee=="object"&&Object.keys(ee).length===0||typeof ee=="string"&&ee.trim().length===0},removeEmptyProperties=function(ee){return Object.keys(ee).reduce(function(re,te){var ne=ee[te];return isEmpty(ne)||(re[te]=ne),re},{})},getClosestElement=function(ee,re){return ee?re.some(function(te){var ne;return(ne=ee==null?void 0:ee.matches)===null||ne===void 0?void 0:ne.call(ee,te)})?ee:getClosestElement(ee==null?void 0:ee.parentElement,re):null},asyncLoadScript=function(ee){return new Promise(function(re,te){var ne;try{var ie=document.createElement("script");ie.type="text/javascript",ie.async=!0,ie.src=ee,ie.addEventListener("load",function(){re({status:!0})},{once:!0}),ie.addEventListener("error",function(){te({status:!1,message:"Failed to load the script ".concat(ee)})}),(ne=document.head)===null||ne===void 0||ne.appendChild(ie)}catch(oe){te(oe)}})};function generateUniqueId(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9))}var filterOutNonTrackableEvents=function(ee){return!(ee.event.target===null||!ee.closestTrackedAncestor)};function isElementBasedEvent(ee){return ee.type==="click"||ee.type==="change"}var VERSION$2="1.17.0",BLOCKED_ATTRIBUTES=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",DATA_AMP_MASK_ATTRIBUTES,TEXT_MASK_ATTRIBUTE]),SENSITIVE_ELEMENT_ATTRIBUTE_ALLOWLIST=["type"],SVG_TAGS=["svg","path","g"],HIGHLY_SENSITIVE_INPUT_TYPES=["password","hidden"],MAX_ATTRIBUTE_LENGTH=128;function getElementProperties(ee,re){var te,ne,ie,oe,se,ae;if(ee===null)return null;var ce=String(ee.tagName).toLowerCase(),ue={tag:ce},le=Array.from((oe=(ie=ee.parentElement)===null||ie===void 0?void 0:ie.children)!==null&&oe!==void 0?oe:[]);le.length&&(ue.index=le.indexOf(ee),ue.indexOfType=le.filter(function(Ce){return Ce.tagName===ee.tagName}).indexOf(ee));var de=(ae=(se=ee.previousElementSibling)===null||se===void 0?void 0:se.tagName)===null||ae===void 0?void 0:ae.toLowerCase();de&&(ue.prevSib=String(de));var fe=ee.getAttribute("id");fe&&(ue.id=String(fe));var he=Array.from(ee.classList);he.length&&(ue.classes=he);var pe={},ge=Array.from(ee.attributes),me=ge.filter(function(Ce){return!BLOCKED_ATTRIBUTES.has(Ce.name)}),ye=!isNonSensitiveElement(ee);if(!HIGHLY_SENSITIVE_INPUT_TYPES.includes(String(ee.getAttribute("type")))&&!SVG_TAGS.includes(ce))try{for(var ve=__values$1(me),be=ve.next();!be.done;be=ve.next()){var _e=be.value;if(!(ye&&!SENSITIVE_ELEMENT_ATTRIBUTE_ALLOWLIST.includes(_e.name))){if(re.has(_e.name)){pe[_e.name]=MASKED_TEXT_VALUE;continue}pe[_e.name]=String(_e.value).substring(0,MAX_ATTRIBUTE_LENGTH)}}}catch(Ce){te={error:Ce}}finally{try{be&&!be.done&&(ne=ve.return)&&ne.call(ve)}finally{if(te)throw te.error}}return Object.keys(pe).length&&(ue.attrs=pe),ue}function getAncestors(ee){var re=[];if(!ee)return re;re.push(ee);for(var te=ee.parentElement;te&&te.tagName!=="HTML";)re.push(te),te=te.parentElement;return re}var getDataSource=function(ee,re){try{if(ee.sourceType==="DOM_ELEMENT"){var te=document.documentElement;return ee.scope&&re&&(te=re.closest(ee.scope)),te&&ee.selector?te.querySelector(ee.selector):te}}catch{return}},executeActions=function(ee,re,te){ee.forEach(function(ne){if(typeof ne!="string"&&ne.actionType==="ATTACH_EVENT_PROPERTY"){var ie=te.extractDataFromDataSource(ne.dataSource,re.closestTrackedAncestor);re.targetElementProperties[ne.destinationKey]=ie}})},DataExtractor=(function(){function ee(re,te){var ne,ie,oe=this,se;this.replaceSensitiveString=function(fe){return replaceSensitiveString(fe,oe.additionalMaskTextPatterns)},this.getHierarchy=function(fe){var he,pe,ge,me,ye=performance.now(),ve=[];if(!fe)return[];for(var be=getAncestors(fe),_e=new Map,Ce=be.length-1;Ce>=0;Ce--){var Te=be[Ce];if(Te){var Se=parseAttributesToMask(Te.getAttribute(DATA_AMP_MASK_ATTRIBUTES)),Re=Ce===be.length-1?[]:(ge=_e.get(be[Ce+1]))!==null&&ge!==void 0?ge:new Set,we=new Set(__spreadArray(__spreadArray([],__read$1(Re),!1),__read$1(Se),!1));_e.set(Te,we)}}ve=be.map(function(Ve){var He;return getElementProperties(Ve,(He=_e.get(Ve))!==null&&He!==void 0?He:new Set)});var Ae=function(Ve){Ve!=null&&Ve.attrs&&Object.entries(Ve.attrs).forEach(function(He){var ur=__read$1(He,2),qe=ur[0],hr=ur[1];Ve.attrs&&(Ve.attrs[qe]=oe.replaceSensitiveString(hr))})};try{for(var Oe=__values$1(ve),Ne=Oe.next();!Ne.done;Ne=Oe.next()){var Ue=Ne.value;Ae(Ue)}}catch(Ve){he={error:Ve}}finally{try{Ne&&!Ne.done&&(pe=Oe.return)&&pe.call(Oe)}finally{if(he)throw he.error}}var Fe=performance.now();return(me=oe.diagnosticsClient)===null||me===void 0||me.recordHistogram("autocapturePlugin.getHierarchy",Fe-ye),ve},this.getNearestLabel=function(fe){var he=fe.parentElement;if(!he)return"";var pe;try{pe=he.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch{pe=null}return pe?oe.getText(pe):oe.getNearestLabel(he)},this.getEventProperties=function(fe,he,pe){var ge,me,ye,ve,be=(ye=(me=he==null?void 0:he.tagName)===null||me===void 0?void 0:me.toLowerCase)===null||ye===void 0?void 0:ye.call(me),_e=typeof he.getBoundingClientRect=="function"?he.getBoundingClientRect():{left:null,top:null},Ce=oe.getHierarchy(he),Te=(ve=Ce[0])===null||ve===void 0?void 0:ve.attrs,Se=oe.getNearestLabel(he),Re=extractPrefixedAttributes(Te??{},pe),we=(ge={},ge[AMPLITUDE_EVENT_PROP_ELEMENT_HIERARCHY]=Ce,ge[AMPLITUDE_EVENT_PROP_ELEMENT_TAG]=be,ge[AMPLITUDE_EVENT_PROP_ELEMENT_TEXT]=oe.getText(he),ge[AMPLITUDE_EVENT_PROP_ELEMENT_POSITION_LEFT]=_e.left==null?null:Math.round(_e.left),ge[AMPLITUDE_EVENT_PROP_ELEMENT_POSITION_TOP]=_e.top==null?null:Math.round(_e.top),ge[AMPLITUDE_EVENT_PROP_ELEMENT_ATTRIBUTES]=Re,ge[AMPLITUDE_EVENT_PROP_ELEMENT_PARENT_LABEL]=Se,ge[AMPLITUDE_EVENT_PROP_PAGE_URL]=getDecodeURI(window.location.href.split("?")[0]),ge[AMPLITUDE_EVENT_PROP_PAGE_TITLE]=getPageTitle(oe.replaceSensitiveString),ge[AMPLITUDE_EVENT_PROP_VIEWPORT_HEIGHT]=window.innerHeight,ge[AMPLITUDE_EVENT_PROP_VIEWPORT_WIDTH]=window.innerWidth,ge);return we[AMPLITUDE_EVENT_PROP_ELEMENT_ID]=he.getAttribute("id")||"",we[AMPLITUDE_EVENT_PROP_ELEMENT_CLASS]=he.getAttribute("class"),we[AMPLITUDE_EVENT_PROP_ELEMENT_ARIA_LABEL]=Te==null?void 0:Te["aria-label"],be==="a"&&fe==="click"&&he instanceof HTMLAnchorElement&&(we[AMPLITUDE_EVENT_PROP_ELEMENT_HREF]=oe.replaceSensitiveString(he.href)),removeEmptyProperties(we)},this.addAdditionalEventProperties=function(fe,he,pe,ge,me){me===void 0&&(me=!1);var ye={event:fe,timestamp:Date.now(),type:he};if(isElementBasedEvent(ye)&&ye.event.target!==null){if(me){var ve=isElementPointerCursor(ye.event.target,ye.type);if(ve)return ye.closestTrackedAncestor=ye.event.target,ye.targetElementProperties=oe.getEventProperties(ye.type,ye.closestTrackedAncestor,ge),ye}var be=getClosestElement(ye.event.target,pe);return be&&(ye.closestTrackedAncestor=be,ye.targetElementProperties=oe.getEventProperties(ye.type,be,ge)),ye}return ye},this.extractDataFromDataSource=function(fe,he){if(fe.sourceType==="DOM_ELEMENT"){var pe=getDataSource(fe,he);return pe?fe.elementExtractType==="TEXT"?oe.getText(pe):fe.elementExtractType==="ATTRIBUTE"&&fe.attribute?pe.getAttribute(fe.attribute):void 0:void 0}},this.getText=function(fe){var he=fe.closest("[".concat(TEXT_MASK_ATTRIBUTE,"]"))!==null;if(he)return MASKED_TEXT_VALUE;var pe="";if(!fe.querySelector("[".concat(TEXT_MASK_ATTRIBUTE,"], [contenteditable]")))pe=fe.innerText||"";else{var ge=fe.cloneNode(!0);ge.querySelectorAll("[".concat(TEXT_MASK_ATTRIBUTE,"], [contenteditable]")).forEach(function(me){me.innerText=MASKED_TEXT_VALUE}),pe=ge.innerText||""}return oe.replaceSensitiveString(pe.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(fe){var he,pe,ge;if(!fe)return{};var me=(ge=(pe=fe==null?void 0:fe.tagName)===null||pe===void 0?void 0:pe.toLowerCase)===null||ge===void 0?void 0:ge.call(pe),ye=(he={},he[AMPLITUDE_EVENT_PROP_ELEMENT_TAG]=me,he[AMPLITUDE_EVENT_PROP_ELEMENT_TEXT]=oe.getText(fe),he[AMPLITUDE_EVENT_PROP_PAGE_URL]=window.location.href.split("?")[0],he);return removeEmptyProperties(ye)},this.diagnosticsClient=te==null?void 0:te.diagnosticsClient;var ae=(se=re.maskTextRegex)!==null&&se!==void 0?se:[],ce=[];try{for(var ue=__values$1(ae),le=ue.next();!le.done;le=ue.next()){var de=le.value;if(ce.length>=MAX_MASK_TEXT_PATTERNS)break;if(de instanceof RegExp)ce.push(de);else if("pattern"in de&&typeof de.pattern=="string")try{ce.push(new RegExp(de.pattern,"i"))}catch{}}}catch(fe){ne={error:fe}}finally{try{le&&!le.done&&(ie=ue.return)&&ie.call(ue)}finally{if(ne)throw ne.error}}this.additionalMaskTextPatterns=ce}return ee})(),WindowMessenger=(function(){function ee(re){var te=re===void 0?{}:re,ne=te.origin,ie=ne===void 0?AMPLITUDE_ORIGIN:ne,oe=this;this.endpoint=AMPLITUDE_ORIGIN,this.requestCallbacks={},this.onSelect=function(se){oe.notify({action:"element-selected",data:se})},this.onTrack=function(se,ae){se==="selector-mode-changed"?oe.notify({action:"track-selector-mode-changed",data:ae}):se==="selector-moved"&&oe.notify({action:"track-selector-moved",data:ae})},this.endpoint=ie}return ee.prototype.notify=function(re){var te,ne,ie,oe;(ne=(te=this.logger)===null||te===void 0?void 0:te.debug)===null||ne===void 0||ne.call(te,"Message sent: ",JSON.stringify(re)),(oe=(ie=window.opener)===null||ie===void 0?void 0:ie.postMessage)===null||oe===void 0||oe.call(ie,re,this.endpoint)},ee.prototype.sendRequest=function(re,te,ne){var ie=this;ne===void 0&&(ne={timeout:15e3});var oe=generateUniqueId(),se={id:oe,action:re,args:te},ae=new Promise(function(ce,ue){ie.requestCallbacks[oe]={resolve:ce,reject:ue},ie.notify(se),(ne==null?void 0:ne.timeout)>0&&setTimeout(function(){ue(new Error("".concat(re," timed out (id: ").concat(oe,")"))),delete ie.requestCallbacks[oe]},ne.timeout)});return ae},ee.prototype.handleResponse=function(re){var te;if(!this.requestCallbacks[re.id]){(te=this.logger)===null||te===void 0||te.warn("No callback found for request id: ".concat(re.id));return}this.requestCallbacks[re.id].resolve(re.responseData),delete this.requestCallbacks[re.id]},ee.prototype.setup=function(re){var te=this,ne=re===void 0?{dataExtractor:new DataExtractor({})}:re,ie=ne.logger,oe=ne.endpoint,se=ne.isElementSelectable,ae=ne.cssSelectorAllowlist,ce=ne.actionClickAllowlist,ue=ne.dataExtractor;this.logger=ie,oe&&this.endpoint===AMPLITUDE_ORIGIN&&(this.endpoint=oe);var le=null;window.addEventListener("message",function(de){var fe,he,pe,ge,me;if((he=(fe=te.logger)===null||fe===void 0?void 0:fe.debug)===null||he===void 0||he.call(fe,"Message received: ",JSON.stringify(de)),te.endpoint===de.origin){var ye=de==null?void 0:de.data,ve=ye==null?void 0:ye.action;if(ve)if("id"in ye)(ge=(pe=te.logger)===null||pe===void 0?void 0:pe.debug)===null||ge===void 0||ge.call(pe,"Received Response to previous request: ",JSON.stringify(de)),te.handleResponse(ye);else if(ve==="ping")te.notify({action:"pong"});else if(ve==="initialize-visual-tagging-selector"){var be=ye==null?void 0:ye.data;asyncLoadScript(AMPLITUDE_VISUAL_TAGGING_SELECTOR_SCRIPT_URL).then(function(){var _e;le=(_e=window==null?void 0:window.amplitudeVisualTaggingSelector)===null||_e===void 0?void 0:_e.call(window,{getEventTagProps:ue.getEventTagProps,isElementSelectable:function(Ce){return se?se((be==null?void 0:be.actionType)||"click",Ce):!0},onTrack:te.onTrack,onSelect:te.onSelect,visualHighlightClass:AMPLITUDE_VISUAL_TAGGING_HIGHLIGHT_CLASS,messenger:te,cssSelectorAllowlist:ae,actionClickAllowlist:ce,extractDataFromDataSource:ue.extractDataFromDataSource,dataExtractor:ue,diagnostics:{autocapture:{version:VERSION$2}}}),te.notify({action:"selector-loaded"})}).catch(function(){var _e;(_e=te.logger)===null||_e===void 0||_e.warn("Failed to initialize visual tagging selector")})}else ve==="close-visual-tagging-selector"&&((me=le==null?void 0:le.close)===null||me===void 0||me.call(le))}}),this.notify({action:"page-loaded"})},ee})(),RAGE_CLICK_THRESHOLD$1=5;function trackClicks(ee){var re=ee.amplitude,te=ee.allObservables,ne=ee.options,ie=ee.shouldTrackEvent,oe=ee.evaluateTriggers,se=te.clickObservable,ae=se.pipe(pairwise(),filter(function(de){var fe=__read$1(de,2),he=fe[0],pe=fe[1],ge=he.event.target!==pe.event.target,me=Math.abs(pe.event.screenX-he.event.screenX)<=20&&Math.abs(pe.event.screenY-he.event.screenY)<=20;return ge&&!me})),ce=se.pipe(debounceTime(ne.debounceTime),map(function(){return"timeout"})),ue=merge$1(ae,ce),le=se.pipe(delay(0),filter(filterOutNonTrackableEvents),filter(function(de){return ie("click",de.closestTrackedAncestor)}),map(function(de){return oe(de)}),buffer(ue));return le.subscribe(function(de){var fe,he,pe=(de.length>=RAGE_CLICK_THRESHOLD$1,AMPLITUDE_ELEMENT_CLICKED_EVENT);try{for(var ge=__values$1(de),me=ge.next();!me.done;me=ge.next()){var ye=me.value;re==null||re.track(pe,ye.targetElementProperties)}}catch(ve){fe={error:ve}}finally{try{me&&!me.done&&(he=ge.return)&&he.call(ge)}finally{if(fe)throw fe.error}}})}function trackChange(ee){var re=ee.amplitude,te=ee.allObservables,ne=ee.getEventProperties,ie=ee.shouldTrackEvent,oe=ee.evaluateTriggers,se=te.changeObservable,ae=se.pipe(filter(filterOutNonTrackableEvents),filter(function(ce){return ie("change",ce.closestTrackedAncestor)}),map(function(ce){return oe(ce)}));return ae.subscribe(function(ce){re==null||re.track(AMPLITUDE_ELEMENT_CHANGED_EVENT,ne("change",ce.closestTrackedAncestor))})}function trackActionClick(ee){var re=ee.amplitude,te=ee.allObservables,ne=ee.options,ie=ee.getEventProperties,oe=ee.shouldTrackEvent,se=ee.shouldTrackActionClick,ae=te.clickObservable,ce=te.mutationObservable,ue=te.navigateObservable,le=ae.pipe(filter(function(pe){return!oe("click",pe.closestTrackedAncestor)}),map(function(pe){var ge=getClosestElement(pe.event.target,ne.actionClickAllowlist);return pe.closestTrackedAncestor=ge,pe.closestTrackedAncestor!==null&&(pe.targetElementProperties=ie(pe.type,pe.closestTrackedAncestor)),pe}),filter(filterOutNonTrackableEvents),filter(function(pe){return se("click",pe.closestTrackedAncestor)})),de=[ce];ue&&de.push(ue);var fe=merge$1.apply(void 0,__spreadArray([],__read$1(de),!1)),he=le.pipe(switchMap(function(pe){return fe.pipe(take(1),timeout({first:500,with:function(){return EMPTY}}),map(function(){return pe}))}));return he.subscribe(function(pe){re==null||re.track(AMPLITUDE_ELEMENT_CLICKED_EVENT,ie("click",pe.closestTrackedAncestor))})}var createMutationObservable=function(){return new Observable(function(ee){var re=new MutationObserver(function(te){ee.next(te)});return re.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return re.disconnect()}})},createClickObservable=function(ee){return ee===void 0&&(ee="click"),fromEvent(document,ee,{capture:!0})},matchEventToFilter=function(ee,re){try{if(re.subprop_key==="[Amplitude] Element Text")return re.subprop_op==="is"&&re.subprop_value.includes(ee.targetElementProperties["[Amplitude] Element Text"]);if(re.subprop_key==="[Amplitude] Element Hierarchy")return re.subprop_op==="autotrack css match"&&!!ee.closestTrackedAncestor.closest(re.subprop_value.toString())}catch(te){return console.error("Error matching event to filter",te),!1}return!1},eventTypeToBrowserEventMap={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},groupLabeledEventIdsByEventType=function(ee){var re,te,ne,ie,oe=Object.values(eventTypeToBrowserEventMap).reduce(function(he,pe){return he[pe]=new Set,he},{});if(!ee)return oe;try{for(var se=__values$1(ee),ae=se.next();!ae.done;ae=se.next()){var ce=ae.value;try{try{for(var ue=(ne=void 0,__values$1(ce.definition)),le=ue.next();!le.done;le=ue.next()){var de=le.value,fe=eventTypeToBrowserEventMap[de.event_type];fe&&oe[fe].add(ce.id)}}catch(he){ne={error:he}}finally{try{le&&!le.done&&(ie=ue.return)&&ie.call(ue)}finally{if(ne)throw ne.error}}}catch(he){console.warn("Skipping Labeled Event due to malformed definition",ce==null?void 0:ce.id,he)}}}catch(he){re={error:he}}finally{try{ae&&!ae.done&&(te=se.return)&&te.call(se)}finally{if(re)throw re.error}}return oe},createLabeledEventToTriggerMap=function(ee){var re,te,ne,ie,oe=new Map;try{for(var se=__values$1(ee),ae=se.next();!ae.done;ae=se.next()){var ce=ae.value;try{for(var ue=(ne=void 0,__values$1(ce.conditions)),le=ue.next();!le.done;le=ue.next()){var de=le.value;if(de.type==="LABELED_EVENT"){var fe=de.match.eventId,he=oe.get(fe);he||(he=[],oe.set(fe,he)),he.push(ce)}}}catch(pe){ne={error:pe}}finally{try{le&&!le.done&&(ie=ue.return)&&ie.call(ue)}finally{if(ne)throw ne.error}}}}catch(pe){re={error:pe}}finally{try{ae&&!ae.done&&(te=se.return)&&te.call(se)}finally{if(re)throw re.error}}return oe},matchEventToLabeledEvents=function(ee,re){return re.filter(function(te){return te.definition.some(function(ne){return eventTypeToBrowserEventMap[ne.event_type]===ee.type&&ne.filters.every(function(ie){return matchEventToFilter(ee,ie)})})})},matchLabeledEventsToTriggers=function(ee,re){var te,ne,ie,oe,se=new Set;try{for(var ae=__values$1(ee),ce=ae.next();!ce.done;ce=ae.next()){var ue=ce.value,le=re.get(ue.id);if(le)try{for(var de=(ie=void 0,__values$1(le)),fe=de.next();!fe.done;fe=de.next()){var he=fe.value;se.add(he)}}catch(pe){ie={error:pe}}finally{try{fe&&!fe.done&&(oe=de.return)&&oe.call(de)}finally{if(ie)throw ie.error}}}}catch(pe){te={error:pe}}finally{try{ce&&!ce.done&&(ne=ae.return)&&ne.call(ae)}finally{if(te)throw te.error}}return Array.from(se)},TriggerEvaluator=(function(){function ee(re,te,ne,ie){this.groupedLabeledEvents=re,this.labeledEventToTriggerMap=te,this.dataExtractor=ne,this.options=ie}return ee.prototype.evaluate=function(re){var te,ne,ie=this.options.pageActions;if(!ie)return re;var oe=matchEventToLabeledEvents(re,Array.from(this.groupedLabeledEvents[re.type]).map(function(le){return ie.labeledEvents[le]})),se=matchLabeledEventsToTriggers(oe,this.labeledEventToTriggerMap);try{for(var ae=__values$1(se),ce=ae.next();!ce.done;ce=ae.next()){var ue=ce.value;executeActions(ue.actions,re,this.dataExtractor)}}catch(le){te={error:le}}finally{try{ce&&!ce.done&&(ne=ae.return)&&ne.call(ae)}finally{if(te)throw te.error}}return re},ee.prototype.update=function(re,te,ne){this.groupedLabeledEvents=re,this.labeledEventToTriggerMap=te,this.options=ne},ee})(),createTriggerEvaluator=function(ee,re,te,ne){return new TriggerEvaluator(ee,re,te,ne)},ObservablesEnum$1;(function(ee){ee.ClickObservable="clickObservable",ee.ChangeObservable="changeObservable",ee.NavigateObservable="navigateObservable",ee.MutationObservable="mutationObservable"})(ObservablesEnum$1||(ObservablesEnum$1={}));var autocapturePlugin=function(ee,re){var te,ne,ie,oe,se,ae,ce,ue;ee===void 0&&(ee={}),re==null||re.diagnosticsClient.setTag("plugin.autocapture.version",VERSION$2);var le=ee.dataAttributePrefix,de=le===void 0?DEFAULT_DATA_ATTRIBUTE_PREFIX:le,fe=ee.visualTaggingOptions,he=fe===void 0?{enabled:!0,messenger:new WindowMessenger}:fe;ee.cssSelectorAllowlist=(te=ee.cssSelectorAllowlist)!==null&&te!==void 0?te:DEFAULT_CSS_SELECTOR_ALLOWLIST,ee.actionClickAllowlist=(ne=ee.actionClickAllowlist)!==null&&ne!==void 0?ne:DEFAULT_ACTION_CLICK_ALLOWLIST,ee.debounceTime=(ie=ee.debounceTime)!==null&&ie!==void 0?ie:0,ee.pageUrlExcludelist=(oe=ee.pageUrlExcludelist)===null||oe===void 0?void 0:oe.reduce(function(Ae,Oe){if(typeof Oe=="string"&&Ae.push(Oe),Oe instanceof RegExp&&Ae.push(Oe),typeof Oe=="object"&&Oe!==null&&"pattern"in Oe)try{Ae.push(new RegExp(Oe.pattern))}catch(Ne){return console.warn("Invalid regex pattern: ".concat(Oe.pattern),Ne),Ae}return Ae},[]);var pe=PLUGIN_NAME$2,ge="enrichment",me=[],ye=new DataExtractor(ee,re),ve=function(){var Ae,Oe=createClickObservable().pipe(map(function(Ve){return ye.addAdditionalEventProperties(Ve,"click",ee.cssSelectorAllowlist,de)}),share()),Ne=fromEvent(document,"change",{capture:!0}).pipe(map(function(Ve){return ye.addAdditionalEventProperties(Ve,"change",ee.cssSelectorAllowlist,de)}),share()),Ue;window.navigation&&(Ue=fromEvent(window.navigation,"navigate").pipe(map(function(Ve){return ye.addAdditionalEventProperties(Ve,"navigate",ee.cssSelectorAllowlist,de)}),share()));var Fe=createMutationObservable().pipe(map(function(Ve){return ye.addAdditionalEventProperties(Ve,"mutation",ee.cssSelectorAllowlist,de)}),share());return Ae={},Ae[ObservablesEnum$1.ClickObservable]=Oe,Ae[ObservablesEnum$1.ChangeObservable]=Ne,Ae[ObservablesEnum$1.NavigateObservable]=Ue,Ae[ObservablesEnum$1.MutationObservable]=Fe,Ae},be=groupLabeledEventIdsByEventType(Object.values((ae=(se=ee.pageActions)===null||se===void 0?void 0:se.labeledEvents)!==null&&ae!==void 0?ae:{})),_e=createLabeledEventToTriggerMap((ue=(ce=ee.pageActions)===null||ce===void 0?void 0:ce.triggers)!==null&&ue!==void 0?ue:[]),Ce=createTriggerEvaluator(be,_e,ye,ee),Te=function(Ae){var Oe,Ne;Ae&&(ee.pageActions=__assign$1(__assign$1({},ee.pageActions),Ae),be=groupLabeledEventIdsByEventType(Object.values((Oe=ee.pageActions.labeledEvents)!==null&&Oe!==void 0?Oe:{})),_e=createLabeledEventToTriggerMap((Ne=ee.pageActions.triggers)!==null&&Ne!==void 0?Ne:[]),Ce.update(be,_e,ee))},Se=function(Ae,Oe){return __awaiter(void 0,void 0,void 0,function(){var Ne,Ue,Fe,Ve,He,ur,qe,hr,fr,dr;return __generator(this,function(Qe){return typeof document>"u"?[2]:(Ae.fetchRemoteConfig&&(Ae.remoteConfigClient?Ae.remoteConfigClient.subscribe("analyticsSDK.pageActions","all",function(Bt){Te(Bt)}):Ae.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),Ne=createShouldTrackEvent(ee,ee.cssSelectorAllowlist),Ue=createShouldTrackEvent(ee,ee.actionClickAllowlist),Fe=ve(),Ve=trackClicks({allObservables:Fe,options:ee,amplitude:Oe,shouldTrackEvent:Ne,evaluateTriggers:Ce.evaluate.bind(Ce)}),me.push(Ve),He=trackChange({allObservables:Fe,getEventProperties:function(){for(var Bt=[],Cr=0;Cr<arguments.length;Cr++)Bt[Cr]=arguments[Cr];return ye.getEventProperties.apply(ye,__spreadArray(__spreadArray([],__read$1(Bt),!1),[de],!1))},amplitude:Oe,shouldTrackEvent:Ne,evaluateTriggers:Ce.evaluate.bind(Ce)}),me.push(He),ur=trackActionClick({allObservables:Fe,options:ee,getEventProperties:function(){for(var Bt=[],Cr=0;Cr<arguments.length;Cr++)Bt[Cr]=arguments[Cr];return ye.getEventProperties.apply(ye,__spreadArray(__spreadArray([],__read$1(Bt),!1),[de],!1))},amplitude:Oe,shouldTrackEvent:Ne,shouldTrackActionClick:Ue}),me.push(ur),(fr=Ae==null?void 0:Ae.loggerProvider)===null||fr===void 0||fr.log("".concat(pe," has been successfully added.")),window.opener&&he.enabled&&(qe=ee.cssSelectorAllowlist,hr=ee.actionClickAllowlist,(dr=he.messenger)===null||dr===void 0||dr.setup(__assign$1(__assign$1({dataExtractor:ye,logger:Ae==null?void 0:Ae.loggerProvider},(Ae==null?void 0:Ae.serverZone)&&{endpoint:AMPLITUDE_ORIGINS_MAP[Ae.serverZone]}),{isElementSelectable:createShouldTrackEvent(ee,__spreadArray(__spreadArray([],__read$1(qe),!1),__read$1(hr),!1)),cssSelectorAllowlist:qe,actionClickAllowlist:hr}))),[2])})})},Re=function(Ae){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(Oe){return[2,Ae]})})},we=function(){return __awaiter(void 0,void 0,void 0,function(){var Ae,Oe,Ne,Ue,Fe;return __generator(this,function(Ve){try{for(Ae=__values$1(me),Oe=Ae.next();!Oe.done;Oe=Ae.next())Ne=Oe.value,Ne.unsubscribe()}catch(He){Ue={error:He}}finally{try{Oe&&!Oe.done&&(Fe=Ae.return)&&Fe.call(Ae)}finally{if(Ue)throw Ue.error}}return[2]})})};return{name:pe,type:ge,setup:Se,execute:Re,teardown:we}},DEAD_CLICK_TIMEOUT=3e3;function trackDeadClick(ee){var re=ee.amplitude,te=ee.allObservables,ne=ee.getEventProperties,ie=ee.shouldTrackDeadClick,oe=te.clickObservable,se=te.mutationObservable,ae=te.navigateObservable,ce=oe.pipe(filter(filterOutNonTrackableEvents),filter(function(fe){return ie("click",fe.closestTrackedAncestor)}),filter(function(fe){var he=fe.event.target;return he.closest('a[target="_blank"]')===null})),ue=[se];ae&&ue.push(ae);var le=merge$1.apply(void 0,__spreadArray([],__read$1(ue),!1)),de=ce.pipe(mergeMap(function(fe){var he,pe=new Observable(function(ge){return he=setTimeout(function(){return ge.next(fe)},DEAD_CLICK_TIMEOUT),function(){clearTimeout(he)}});return race(pe,le.pipe(take(1),map(function(){return null}))).pipe(filter(function(ge){return ge!==null}))}),throttleTime(DEAD_CLICK_TIMEOUT));return de.subscribe(function(fe){var he={"[Amplitude] X":fe.event.clientX,"[Amplitude] Y":fe.event.clientY};re.track(AMPLITUDE_ELEMENT_DEAD_CLICKED_EVENT,__assign$1(__assign$1({},ne("click",fe.closestTrackedAncestor)),he),{time:fe.timestamp})})}var RAGE_CLICK_THRESHOLD=DEFAULT_RAGE_CLICK_THRESHOLD,RAGE_CLICK_WINDOW_MS=DEFAULT_RAGE_CLICK_WINDOW_MS,RAGE_CLICK_OUT_OF_BOUNDS_THRESHOLD=DEFAULT_RAGE_CLICK_OUT_OF_BOUNDS_THRESHOLD;function addCoordinates(ee,re){var te,ne,ie,oe,se=re.event,ae=se.clientX,ce=se.clientY;ee.yMin=Math.min((te=ee.yMin)!==null&&te!==void 0?te:ce,ce),ee.yMax=Math.max((ne=ee.yMax)!==null&&ne!==void 0?ne:ce,ce),ee.xMin=Math.min((ie=ee.xMin)!==null&&ie!==void 0?ie:ae,ae),ee.xMax=Math.max((oe=ee.xMax)!==null&&oe!==void 0?oe:ae,ae),ee.isOutOfBounds=ee.yMax-ee.yMin>RAGE_CLICK_OUT_OF_BOUNDS_THRESHOLD||ee.xMax-ee.xMin>RAGE_CLICK_OUT_OF_BOUNDS_THRESHOLD}function getRageClickAnalyticsEvent(ee){var re=ee[0],te=ee[ee.length-1],ne=__assign$1({"[Amplitude] Begin Time":new Date(re.timestamp).toISOString(),"[Amplitude] End Time":new Date(te.timestamp).toISOString(),"[Amplitude] Duration":te.timestamp-re.timestamp,"[Amplitude] Clicks":ee.map(function(ie){return{X:ie.event.clientX,Y:ie.event.clientY,Time:ie.timestamp}}),"[Amplitude] Click Count":ee.length},re.targetElementProperties);return{rageClickEvent:ne,time:re.timestamp}}function isClickOutsideRageClickWindow(ee,re){var te=Math.max(0,ee.length-RAGE_CLICK_THRESHOLD+1),ne=ee[te];return re.timestamp-ne.timestamp>=RAGE_CLICK_WINDOW_MS}function isNewElement(ee,re){return ee.length>0&&ee[ee.length-1].closestTrackedAncestor!==re.closestTrackedAncestor}function trackRageClicks(ee){var re=ee.amplitude,te=ee.allObservables,ne=ee.shouldTrackRageClick,ie=te.clickObservable,oe=[],se={},ae;function ce(ue){oe=[],se={},ue&&(addCoordinates(se,ue),oe.push(ue))}return ie.pipe(filter(filterOutNonTrackableEvents),filter(function(ue){return ne("click",ue.closestTrackedAncestor)}),map(function(ue){if(ae&&clearTimeout(ae),addCoordinates(se,ue),oe.length===0)return oe.push(ue),null;if(isNewElement(oe,ue)||isClickOutsideRageClickWindow(oe,ue)||se.isOutOfBounds){var le=oe.length>=RAGE_CLICK_THRESHOLD?getRageClickAnalyticsEvent(oe):null;return ce(ue),le}return oe.push(ue),oe.length>=RAGE_CLICK_THRESHOLD&&(ae=setTimeout(function(){var de=getRageClickAnalyticsEvent(oe),fe=de.rageClickEvent,he=de.time;re.track(AMPLITUDE_ELEMENT_RAGE_CLICKED_EVENT,fe,{time:he}),ce()},RAGE_CLICK_WINDOW_MS)),null}),filter(function(ue){return ue!==null})).subscribe(function(ue){ue!==null&&re.track(AMPLITUDE_ELEMENT_RAGE_CLICKED_EVENT,ue.rageClickEvent,{time:ue.time})})}var frustrationPlugin=function(ee){var re,te,ne,ie,oe;ee===void 0&&(ee={});var se=FRUSTRATION_PLUGIN_NAME,ae="enrichment",ce=[],ue=(te=(re=ee.rageClicks)===null||re===void 0?void 0:re.cssSelectorAllowlist)!==null&&te!==void 0?te:DEFAULT_RAGE_CLICK_ALLOWLIST,le=(ie=(ne=ee.deadClicks)===null||ne===void 0?void 0:ne.cssSelectorAllowlist)!==null&&ie!==void 0?ie:DEFAULT_DEAD_CLICK_ALLOWLIST,de=(oe=ee.dataAttributePrefix)!==null&&oe!==void 0?oe:DEFAULT_DATA_ATTRIBUTE_PREFIX,fe=new DataExtractor(ee),he=__spreadArray([],__read$1(new Set(__spreadArray(__spreadArray([],__read$1(ue),!1),__read$1(le),!1))),!1),pe=function(){var ve,be=createClickObservable("pointerdown").pipe(map(function(Te){return fe.addAdditionalEventProperties(Te,"click",he,de,!0)}),share()),_e;window.navigation&&(_e=fromEvent(window.navigation,"navigate").pipe(map(function(Te){return fe.addAdditionalEventProperties(Te,"navigate",he,de)}),share()));var Ce=createMutationObservable().pipe(map(function(Te){return fe.addAdditionalEventProperties(Te,"mutation",he,de)}),share());return ve={},ve[ObservablesEnum$1.ClickObservable]=be,ve[ObservablesEnum$1.ChangeObservable]=new Observable,ve[ObservablesEnum$1.NavigateObservable]=_e,ve[ObservablesEnum$1.MutationObservable]=Ce,ve},ge=function(ve,be){return __awaiter(void 0,void 0,void 0,function(){var _e,Ce,Te,Se,Re,we;return __generator(this,function(Ae){return typeof document>"u"?[2]:(_e=createShouldTrackEvent(ee,ue),Ce=createShouldTrackEvent(ee,le),Te=pe(),Se=trackRageClicks({allObservables:Te,amplitude:be,shouldTrackRageClick:_e}),ce.push(Se),Re=trackDeadClick({amplitude:be,allObservables:Te,getEventProperties:function(Oe,Ne){return fe.getEventProperties(Oe,Ne,de)},shouldTrackDeadClick:Ce}),ce.push(Re),(we=ve==null?void 0:ve.loggerProvider)===null||we===void 0||we.log("".concat(se," has been successfully added.")),[2])})})},me=function(ve){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(be){return[2,ve]})})},ye=function(){return __awaiter(void 0,void 0,void 0,function(){var ve,be,_e,Ce,Te;return __generator(this,function(Se){try{for(ve=__values$1(ce),be=ve.next();!be.done;be=ve.next())_e=be.value,_e.unsubscribe()}catch(Re){Ce={error:Re}}finally{try{be&&!be.done&&(Te=ve.return)&&Te.call(ve)}finally{if(Ce)throw Ce.error}}return[2]})})};return{name:se,type:ae,setup:ge,execute:me,teardown:ye}},PLUGIN_NAME$1="@amplitude/plugin-network-capture-browser",AMPLITUDE_NETWORK_REQUEST_EVENT="[Amplitude] Network Request",DEFAULT_STATUS_CODE_RANGE="500-599";function wildcardMatch(ee,re){var te=re.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&"),ne="^"+te.replace(/\*/g,".*")+"$",ie=new RegExp(ne);return ie.test(ee)}function isStatusCodeInRange(ee,re){var te,ne,ie=re.split(",");try{for(var oe=__values$1(ie),se=oe.next();!se.done;se=oe.next()){var ae=se.value,ce=__read$1(ae.split("-").map(Number),2),ue=ce[0],le=ce[1];if(ee===ue&&le===void 0||ee>=ue&&ee<=le)return!0}}catch(de){te={error:de}}finally{try{se&&!se.done&&(ne=oe.return)&&ne.call(oe)}finally{if(te)throw te.error}}return!1}function isCaptureRuleMatch(ee,re,te,ne,ie){if(!(ee.hosts&&!ee.hosts.find(function(se){return wildcardMatch(re,se)}))&&!(ne&&ee.urls&&!isUrlMatchAllowlist(ne,ee.urls))&&!(ie&&ee.methods&&!ee.methods.find(function(se){return ie.toLowerCase()===se.toLowerCase()||se==="*"}))){if(te||te===0){var oe=ee.statusCodeRange||DEFAULT_STATUS_CODE_RANGE;if(!isStatusCodeInRange(te,oe))return!1}return!0}}function parseUrl(ee){var re;if(ee)try{var te=(re=getGlobalScope())===null||re===void 0?void 0:re.location.href,ne=new URL(ee,te),ie=ne.searchParams.toString(),oe=ne.hash.replace("#",""),se=ne.href,ae=ne.host;ne.hash="",ne.search="";var ce=ne.href;return{query:ie,fragment:oe,href:se,hrefWithoutQueryOrHash:ce,host:ae}}catch{return}}function isAmplitudeNetworkRequestEvent(ee,re){if(ee.includes("amplitude.com"))try{var te=re.body;if(typeof te!="string")return!1;var ne=JSON.parse(te),ie=ne.events;if(ie.find(function(oe){return oe.event_type===AMPLITUDE_NETWORK_REQUEST_EVENT}))return!0}catch{}return!1}function parseHeaderCaptureRule(ee){if(typeof ee!="object"||ee===null){if(ee)return __spreadArray([],__read$1(SAFE_HEADERS),!1);if(ee===void 0){var re=void 0;return re}return}if(ee.length!==0)return ee}function isBodyCaptureRuleEmpty(ee){var re,te;return!(!((re=ee==null?void 0:ee.allowlist)===null||re===void 0)&&re.length)&&!(!((te=ee==null?void 0:ee.blocklist)===null||te===void 0)&&te.length)}function shouldTrackNetworkEvent(ee,re){var te;re===void 0&&(re={});var ne=parseUrl(ee.url);if(!ne)return!1;var ie=ne.host;if(re.ignoreAmplitudeRequests!==!1&&(wildcardMatch(ie,"*.amplitude.com")||wildcardMatch(ie,"amplitude.com"))||!((te=re.ignoreHosts)===null||te===void 0)&&te.find(function(se){return wildcardMatch(ie,se)})||!re.captureRules&&ee.status!==void 0&&!isStatusCodeInRange(ee.status,DEFAULT_STATUS_CODE_RANGE))return!1;if(re.captureRules){var oe;if(__spreadArray([],__read$1(re.captureRules),!1).reverse().find(function(se){if(oe=isCaptureRuleMatch(se,ie,ee.status,ee.url,ee.method),oe){var ae=parseHeaderCaptureRule(se.responseHeaders);if(ee.responseWrapper&&ae){var ce=ee.responseWrapper.headers(ae);ce&&(ee.responseHeaders=ce)}var ue=parseHeaderCaptureRule(se.requestHeaders);if(ee.requestWrapper&&ue){var le=ee.requestWrapper.headers(ue);le&&(ee.requestHeaders=le)}ee.responseWrapper&&se.responseBody&&!isBodyCaptureRuleEmpty(se.responseBody)&&(ee.responseBodyJson=ee.responseWrapper.json(se.responseBody.allowlist,se.responseBody.blocklist)),ee.requestWrapper&&se.requestBody&&!isBodyCaptureRuleEmpty(se.requestBody)&&(ee.requestBodyJson=ee.requestWrapper.json(se.requestBody.allowlist,se.requestBody.blocklist))}return oe!==void 0}),!oe)return!1}return!(ee.requestWrapper&&isAmplitudeNetworkRequestEvent(ie,ee.requestWrapper))}function logNetworkAnalyticsEvent(ee,re,te,ne){return __awaiter(this,void 0,void 0,function(){var ie,oe,se;return __generator(this,function(ae){switch(ae.label){case 0:return re.requestBodyJson||re.responseBodyJson?[4,Promise.all([re.requestBodyJson,re.responseBodyJson])]:[3,2];case 1:if(ie=__read$1.apply(void 0,[ae.sent(),2]),oe=ie[0],se=ie[1],oe)try{ee["[Amplitude] Request Body"]=JSON.stringify(oe)}catch(ce){ne==null||ne.debug("Failed to stringify request body",ce)}if(se)try{ee["[Amplitude] Response Body"]=JSON.stringify(se)}catch{ne==null||ne.debug("Failed to stringify response body")}ae.label=2;case 2:return te==null||te.track(AMPLITUDE_NETWORK_REQUEST_EVENT,ee),[2]}})})}function trackNetworkEvents(ee){var re=ee.allObservables,te=ee.networkTrackingOptions,ne=ee.amplitude,ie=ee.loggerProvider,oe=re.networkObservable,se=oe.pipe(filter(function(ae){return shouldTrackNetworkEvent(ae.event,te)}));return se.subscribe(function(ae){var ce,ue,le,de=ae.event,fe=parseUrl(de.url);if(fe){var he=(ue=de.responseWrapper)===null||ue===void 0?void 0:ue.bodySize,pe=(le=de.requestWrapper)===null||le===void 0?void 0:le.bodySize,ge=(ce={},ce["[Amplitude] URL"]=fe.hrefWithoutQueryOrHash,ce["[Amplitude] URL Query"]=fe.query,ce["[Amplitude] URL Fragment"]=fe.fragment,ce["[Amplitude] Request Method"]=de.method,ce["[Amplitude] Status Code"]=de.status,ce["[Amplitude] Start Time"]=de.startTime,ce["[Amplitude] Completion Time"]=de.endTime,ce["[Amplitude] Duration"]=de.duration,ce["[Amplitude] Request Body Size"]=pe,ce["[Amplitude] Response Body Size"]=he,ce["[Amplitude] Request Type"]=de.type,ce["[Amplitude] Request Headers"]=de.requestHeaders,ce["[Amplitude] Response Headers"]=de.responseHeaders,ce);logNetworkAnalyticsEvent(ge,de,ne,ie)}})}var ObservablesEnum;(function(ee){ee.NetworkObservable="networkObservable"})(ObservablesEnum||(ObservablesEnum={}));var networkCapturePlugin=function(ee){ee===void 0&&(ee={});var re=PLUGIN_NAME$1,te="enrichment",ne,ie=[],oe=function(le,de){var fe={event:le,timestamp:Date.now(),type:de};return fe},se=function(){var le,de=new Observable(function(fe){var he=new NetworkEventCallback(function(pe){var ge=oe(pe,"network");fe.next(ge)});return networkObserver.subscribe(he,ne),function(){networkObserver.unsubscribe(he)}});return le={},le[ObservablesEnum.NetworkObservable]=de,le},ae=function(le,de){return __awaiter(void 0,void 0,void 0,function(){var fe,he;return __generator(this,function(pe){return typeof document>"u"?[2]:(fe=se(),ne=le==null?void 0:le.loggerProvider,he=trackNetworkEvents({allObservables:fe,networkTrackingOptions:ee,amplitude:de,loggerProvider:ne}),ie.push(he),ne==null||ne.log("".concat(re," has been successfully added.")),[2])})})},ce=function(le){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(de){return[2,le]})})},ue=function(){return __awaiter(void 0,void 0,void 0,function(){var le,de,fe,he,pe;return __generator(this,function(ge){try{for(le=__values$1(ie),de=le.next();!de.done;de=le.next())fe=de.value,fe.unsubscribe()}catch(me){he={error:me}}finally{try{de&&!de.done&&(pe=le.return)&&pe.call(le)}finally{if(he)throw he.error}}return[2]})})};return{name:re,type:te,setup:ae,execute:ce,teardown:ue}},PLUGIN_NAME="web-vitals-browser",WEB_VITALS_EVENT_NAME="[Amplitude] Web Vitals";let e=-1;const t=ee=>{addEventListener("pageshow",(re=>{re.persisted&&(e=re.timeStamp,ee(re))}),!0)},n=(ee,re,te,ne)=>{let ie,oe;return se=>{re.value>=0&&(se||ne)&&(oe=re.value-(ie??0),(oe||ie===void 0)&&(ie=re.value,re.delta=oe,re.rating=((ae,ce)=>ae>ce[1]?"poor":ae>ce[0]?"needs-improvement":"good")(re.value,te),ee(re)))}},i=ee=>{requestAnimationFrame((()=>requestAnimationFrame((()=>ee()))))},s=()=>{const ee=performance.getEntriesByType("navigation")[0];if(ee&&ee.responseStart>0&&ee.responseStart<performance.now())return ee},o=()=>{const ee=s();return(ee==null?void 0:ee.activationStart)??0},r=(ee,re=-1)=>{const te=s();let ne="navigate";return e>=0?ne="back-forward-cache":te&&(document.prerendering||o()>0?ne="prerender":document.wasDiscarded?ne="restore":te.type&&(ne=te.type.replace(/_/g,"-"))),{name:ee,value:re,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:ne}},c=new WeakMap;function a(ee,re){return c.get(ee)||c.set(ee,new re),c.get(ee)}class d{constructor(){Ie(this,"t");Ie(this,"i",0);Ie(this,"o",[])}h(re){var ie;if(re.hadRecentInput)return;const te=this.o[0],ne=this.o.at(-1);this.i&&te&&ne&&re.startTime-ne.startTime<1e3&&re.startTime-te.startTime<5e3?(this.i+=re.value,this.o.push(re)):(this.i=re.value,this.o=[re]),(ie=this.t)==null||ie.call(this,re)}}const h=(ee,re,te={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(ee)){const ne=new PerformanceObserver((ie=>{Promise.resolve().then((()=>{re(ie.getEntries())}))}));return ne.observe({type:ee,buffered:!0,...te}),ne}}catch{}},f=ee=>{let re=!1;return()=>{re||(ee(),re=!0)}};let u=-1;const l=new Set,m=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,p=ee=>{if(document.visibilityState==="hidden"){if(ee.type==="visibilitychange")for(const re of l)re();isFinite(u)||(u=ee.type==="visibilitychange"?ee.timeStamp:0,removeEventListener("prerenderingchange",p,!0))}},v=()=>{var ee;if(u<0){const re=o();u=(document.prerendering||(ee=globalThis.performance.getEntriesByType("visibility-state").filter((ne=>ne.name==="hidden"&&ne.startTime>re))[0])==null?void 0:ee.startTime)??m(),addEventListener("visibilitychange",p,!0),addEventListener("prerenderingchange",p,!0),t((()=>{setTimeout((()=>{u=m()}))}))}return{get firstHiddenTime(){return u},onHidden(re){l.add(re)}}},g=ee=>{document.prerendering?addEventListener("prerenderingchange",(()=>ee()),!0):ee()},y=[1800,3e3],E=(ee,re={})=>{g((()=>{const te=v();let ne,ie=r("FCP");const oe=h("paint",(se=>{for(const ae of se)ae.name==="first-contentful-paint"&&(oe.disconnect(),ae.startTime<te.firstHiddenTime&&(ie.value=Math.max(ae.startTime-o(),0),ie.entries.push(ae),ne(!0)))}));oe&&(ne=n(ee,ie,y,re.reportAllChanges),t((se=>{ie=r("FCP"),ne=n(ee,ie,y,re.reportAllChanges),i((()=>{ie.value=performance.now()-se.timeStamp,ne(!0)}))})))}))},b=[.1,.25],L=(ee,re={})=>{const te=v();E(f((()=>{let ne,ie=r("CLS",0);const oe=a(re,d),se=ce=>{for(const ue of ce)oe.h(ue);oe.i>ie.value&&(ie.value=oe.i,ie.entries=oe.o,ne())},ae=h("layout-shift",se);ae&&(ne=n(ee,ie,b,re.reportAllChanges),te.onHidden((()=>{se(ae.takeRecords()),ne(!0)})),t((()=>{oe.i=0,ie=r("CLS",0),ne=n(ee,ie,b,re.reportAllChanges),i((()=>ne()))})),setTimeout(ne))})))};let P=0,T=1/0,_=0;const M=ee=>{for(const re of ee)re.interactionId&&(T=Math.min(T,re.interactionId),_=Math.max(_,re.interactionId),P=_?(_-T)/7+1:0)};let w;const C=()=>w?P:performance.interactionCount??0,I=()=>{"interactionCount"in performance||w||(w=h("event",M,{type:"event",buffered:!0,durationThreshold:0}))};let F=0;class k{constructor(){Ie(this,"u",[]);Ie(this,"l",new Map);Ie(this,"m");Ie(this,"p")}v(){F=C(),this.u.length=0,this.l.clear()}L(){const re=Math.min(this.u.length-1,Math.floor((C()-F)/50));return this.u[re]}h(re){var ie,oe;if((ie=this.m)==null||ie.call(this,re),!re.interactionId&&re.entryType!=="first-input")return;const te=this.u.at(-1);let ne=this.l.get(re.interactionId);if(ne||this.u.length<10||re.duration>te.P){if(ne?re.duration>ne.P?(ne.entries=[re],ne.P=re.duration):re.duration===ne.P&&re.startTime===ne.entries[0].startTime&&ne.entries.push(re):(ne={id:re.interactionId,entries:[re],P:re.duration},this.l.set(ne.id,ne),this.u.push(ne)),this.u.sort(((se,ae)=>ae.P-se.P)),this.u.length>10){const se=this.u.splice(10);for(const ae of se)this.l.delete(ae.id)}(oe=this.p)==null||oe.call(this,ne)}}}const A=ee=>{const re=globalThis.requestIdleCallback||setTimeout;document.visibilityState==="hidden"?ee():(ee=f(ee),addEventListener("visibilitychange",ee,{once:!0,capture:!0}),re((()=>{ee(),removeEventListener("visibilitychange",ee,{capture:!0})})))},B=[200,500],S=(ee,re={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const te=v();g((()=>{I();let ne,ie=r("INP");const oe=a(re,k),se=ce=>{A((()=>{for(const le of ce)oe.h(le);const ue=oe.L();ue&&ue.P!==ie.value&&(ie.value=ue.P,ie.entries=ue.entries,ne())}))},ae=h("event",se,{durationThreshold:re.durationThreshold??40});ne=n(ee,ie,B,re.reportAllChanges),ae&&(ae.observe({type:"first-input",buffered:!0}),te.onHidden((()=>{se(ae.takeRecords()),ne(!0)})),t((()=>{oe.v(),ie=r("INP"),ne=n(ee,ie,B,re.reportAllChanges)})))}))};class N{constructor(){Ie(this,"m")}h(re){var te;(te=this.m)==null||te.call(this,re)}}const q=[2500,4e3],x=(ee,re={})=>{g((()=>{const te=v();let ne,ie=r("LCP");const oe=a(re,N),se=ce=>{re.reportAllChanges||(ce=ce.slice(-1));for(const ue of ce)oe.h(ue),ue.startTime<te.firstHiddenTime&&(ie.value=Math.max(ue.startTime-o(),0),ie.entries=[ue],ne())},ae=h("largest-contentful-paint",se);if(ae){ne=n(ee,ie,q,re.reportAllChanges);const ce=f((()=>{se(ae.takeRecords()),ae.disconnect(),ne(!0)})),ue=le=>{le.isTrusted&&(A(ce),removeEventListener(le.type,ue,{capture:!0}))};for(const le of["keydown","click","visibilitychange"])addEventListener(le,ue,{capture:!0});t((le=>{ie=r("LCP"),ne=n(ee,ie,q,re.reportAllChanges),i((()=>{ie.value=performance.now()-le.timeStamp,ne(!0)}))}))}}))},H=[800,1800],O=ee=>{document.prerendering?g((()=>O(ee))):document.readyState!=="complete"?addEventListener("load",(()=>O(ee)),!0):setTimeout(ee)},$=(ee,re={})=>{let te=r("TTFB"),ne=n(ee,te,H,re.reportAllChanges);O((()=>{const ie=s();ie&&(te.value=Math.max(ie.responseStart-o(),0),te.entries=[ie],ne(!0),t((()=>{te=r("TTFB",0),ne=n(ee,te,H,re.reportAllChanges),ne(!0)})))}))};function getMetricStartTime(ee){var re,te=((re=ee.entries[0])===null||re===void 0?void 0:re.startTime)||0;return performance.timeOrigin+te}function processMetric(ee){return{value:ee.value,rating:ee.rating,delta:ee.delta,navigationType:ee.navigationType,id:ee.id,timestamp:Math.floor(getMetricStartTime(ee)),navigationStart:Math.floor(performance.timeOrigin)}}var webVitalsPlugin=function(){var ee=null,re=getGlobalScope(),te=re==null?void 0:re.document,ne=re==null?void 0:re.location,ie=function(ae,ce){return __awaiter(void 0,void 0,void 0,function(){var ue,le,de;return __generator(this,function(fe){return ue=function(he){var pe;if(!he)return"";var ge=he;try{ge=decodeURI(he)}catch(me){(pe=ae.loggerProvider)===null||pe===void 0||pe.error("Malformed URI sequence: ",me)}return ge},te===void 0?[2]:(le=ue(ne==null?void 0:ne.href),de={"[Amplitude] Page Domain":(ne==null?void 0:ne.hostname)||"","[Amplitude] Page Location":le,"[Amplitude] Page Path":ue(ne==null?void 0:ne.pathname),"[Amplitude] Page Title":typeof document<"u"&&document.title||"","[Amplitude] Page URL":le.split("?")[0]},x(function(he){de["[Amplitude] LCP"]=processMetric(he)}),E(function(he){de["[Amplitude] FCP"]=processMetric(he)}),S(function(he){de["[Amplitude] INP"]=processMetric(he)}),L(function(he){de["[Amplitude] CLS"]=processMetric(he)}),$(function(he){de["[Amplitude] TTFB"]=processMetric(he)}),ee=function(){te.visibilityState==="hidden"&&ee&&(ce.track(WEB_VITALS_EVENT_NAME,de),te.removeEventListener("visibilitychange",ee),ee=null)},te.addEventListener("visibilitychange",ee),[2])})})},oe=function(ae){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(ce){return[2,ae]})})},se=function(){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(ae){return ee&&(te==null||te.removeEventListener("visibilitychange",ee)),[2]})})};return{name:PLUGIN_NAME,type:"enrichment",setup:ie,execute:oe,teardown:se}},domainWithoutSubdomain=function(ee){var re=ee.split(".");return re.length<=2?ee:re.slice(re.length-2,re.length).join(".")},isDirectTraffic=function(ee){return Object.values(ee).every(function(re){return!re})},isNewCampaign=function(ee,re,te,ne,ie){ie===void 0&&(ie=!0),ee.referrer;var oe=ee.referring_domain,se=__rest(ee,["referrer","referring_domain"]),ae=re||{};ae.referrer;var ce=ae.referring_domain,ue=__rest(ae,["referrer","referring_domain"]);if(isExcludedReferrer(te.excludeReferrers,ee.referring_domain))return ne.debug("This is not a new campaign because ".concat(ee.referring_domain," is in the exclude referrer list.")),!1;if(!ie&&isDirectTraffic(ee)&&re)return ne.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var le=JSON.stringify(se)!==JSON.stringify(ue),de=domainWithoutSubdomain(oe||"")!==domainWithoutSubdomain(ce||""),fe=!re||le||de;return fe?ne.debug("This is a new campaign. An $identify event will be sent."):ne.debug("This is not a new campaign because it's the same as the previous one."),fe},isExcludedReferrer=function(ee,re){return ee===void 0&&(ee=[]),re===void 0&&(re=""),ee.some(function(te){return te instanceof RegExp?te.test(re):te===re})},createCampaignEvent=function(ee,re){var te=__assign$1(__assign$1({},BASE_CAMPAIGN),ee),ne=Object.entries(te).reduce(function(ie,oe){var se,ae=__read$1(oe,2),ce=ae[0],ue=ae[1];return ie.setOnce("initial_".concat(ce),(se=ue??re.initialEmptyValue)!==null&&se!==void 0?se:"EMPTY"),ue?ie.set(ce,ue):ie.unset(ce)},new Identify);return createIdentifyEvent(ne)},getDefaultExcludedReferrers=function(ee){var re=ee;return re?(re.startsWith(".")&&(re=re.substring(1)),[new RegExp("".concat(re.replace(".","\\."),"$"))]):[]},WebAttribution=(function(){function ee(re,te){var ne;this.shouldTrackNewCampaign=!1,this.options=__assign$1({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:getDefaultExcludedReferrers((ne=te.cookieOptions)===null||ne===void 0?void 0:ne.domain)},re),this.storage=te.cookieStorage,this.storageKey=getStorageKey(te.apiKey,"MKTG"),this.webExpStorageKey=getStorageKey(te.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=BASE_CAMPAIGN,this.sessionTimeout=te.sessionTimeout,this.lastEventTime=te.lastEventTime,this.logger=te.loggerProvider,te.loggerProvider.log("Installing web attribution tracking.")}return ee.prototype.init=function(){return __awaiter(this,void 0,void 0,function(){var re,te;return __generator(this,function(ne){switch(ne.label){case 0:return[4,this.fetchCampaign()];case 1:return te=__read$1.apply(void 0,[ne.sent(),2]),this.currentCampaign=te[0],this.previousCampaign=te[1],re=this.lastEventTime?isNewSession(this.sessionTimeout,this.lastEventTime):!0,isNewCampaign(this.currentCampaign,this.previousCampaign,this.options,this.logger,re)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:ne.sent(),ne.label=3;case 3:return[2]}})})},ee.prototype.fetchCampaign=function(){return __awaiter(this,void 0,void 0,function(){var re;return __generator(this,function(te){switch(te.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return re=te.sent(),re?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:te.sent(),te.label=3;case 3:return[4,Promise.all([re||new CampaignParser().parse(),this.storage.get(this.storageKey)])];case 4:return[2,te.sent()]}})})},ee.prototype.generateCampaignEvent=function(re){this.shouldTrackNewCampaign=!1;var te=createCampaignEvent(this.currentCampaign,this.options);return re&&(te.event_id=re),te},ee.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},ee})(),CURRENT_PAGE_STORAGE_KEY="AMP_CURRENT_PAGE",PREVIOUS_PAGE_STORAGE_KEY="AMP_PREVIOUS_PAGE",URL_INFO_STORAGE_KEY="AMP_URL_INFO",PreviousPageType;(function(ee){ee.Direct="direct",ee.Internal="internal",ee.External="external"})(PreviousPageType||(PreviousPageType={}));var EXCLUDED_DEFAULT_EVENT_TYPES=new Set([SpecialEventType.IDENTIFY,SpecialEventType.GROUP_IDENTIFY,SpecialEventType.REVENUE]),pageUrlEnrichmentPlugin=function(){var ee=getGlobalScope(),re=void 0,te=!1,ne=void 0,ie=!1,oe=!1,se=function(de){var fe;try{var he=getDecodeURI(de,ne);fe=new URL(he).hostname}catch(pe){ne==null||ne.error("Could not parse URL: ",pe)}return fe},ae=function(de){var fe=typeof location<"u"&&location.hostname||"",he=de?se(de):void 0;switch(he){case void 0:return PreviousPageType.Direct;case fe:return PreviousPageType.Internal;default:return PreviousPageType.External}},ce=function(){return __awaiter(void 0,void 0,void 0,function(){var de,fe,he,pe,ge;return __generator(this,function(me){switch(me.label){case 0:return re&&te?[4,re.get(URL_INFO_STORAGE_KEY)]:[3,3];case 1:return de=me.sent(),fe=getDecodeURI(typeof location<"u"&&location.href||""),he=(de==null?void 0:de[CURRENT_PAGE_STORAGE_KEY])||"",pe=void 0,fe===he?pe=(de==null?void 0:de[PREVIOUS_PAGE_STORAGE_KEY])||"":he?pe=he:pe=document.referrer||"",[4,re.set(URL_INFO_STORAGE_KEY,(ge={},ge[CURRENT_PAGE_STORAGE_KEY]=fe,ge[PREVIOUS_PAGE_STORAGE_KEY]=pe,ge))];case 2:me.sent(),me.label=3;case 3:return[2]}})})},ue=function(){ce()},le={name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(de,fe){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(he){switch(he.label){case 0:return ne=de.loggerProvider,ne.log("Installing @amplitude/plugin-page-url-enrichment-browser"),oe=!0,ee?(re=new BrowserStorage(ee.sessionStorage),[4,re.isEnabled()]):[3,2];case 1:te=he.sent(),ee.addEventListener("popstate",ue),ie||(ee.history.pushState=new Proxy(ee.history.pushState,{apply:function(pe,ge,me){var ye=__read$1(me,3),ve=ye[0],be=ye[1],_e=ye[2];pe.apply(ge,[ve,be,_e]),oe&&ue()}}),ee.history.replaceState=new Proxy(ee.history.replaceState,{apply:function(pe,ge,me){var ye=__read$1(me,3),ve=ye[0],be=ye[1],_e=ye[2];pe.apply(ge,[ve,be,_e]),oe&&ue()}}),ie=!0),he.label=2;case 2:return[2]}})})},execute:function(de){return __awaiter(void 0,void 0,void 0,function(){var fe,he,pe,ge,me;return __generator(this,function(ye){switch(ye.label){case 0:return fe=getDecodeURI(typeof location<"u"&&location.href||""),re&&te?[4,re.get(URL_INFO_STORAGE_KEY)]:[3,5];case 1:return he=ye.sent(),he!=null&&he[CURRENT_PAGE_STORAGE_KEY]?[3,3]:[4,re.set(URL_INFO_STORAGE_KEY,(me={},me[CURRENT_PAGE_STORAGE_KEY]=fe,me[PREVIOUS_PAGE_STORAGE_KEY]=document.referrer||"",me))];case 2:ye.sent(),ye.label=3;case 3:return[4,re.get(URL_INFO_STORAGE_KEY)];case 4:if(pe=ye.sent(),ge="",pe&&(ge=pe[PREVIOUS_PAGE_STORAGE_KEY]||""),EXCLUDED_DEFAULT_EVENT_TYPES.has(de.event_type))return[2,de];de.event_properties=__assign$1(__assign$1({},de.event_properties||{}),{"[Amplitude] Page Domain":addIfNotExist(de,"[Amplitude] Page Domain",typeof location<"u"&&location.hostname||""),"[Amplitude] Page Location":addIfNotExist(de,"[Amplitude] Page Location",fe),"[Amplitude] Page Path":addIfNotExist(de,"[Amplitude] Page Path",typeof location<"u"&&getDecodeURI(location.pathname)||""),"[Amplitude] Page Title":addIfNotExist(de,"[Amplitude] Page Title",getPageTitle(replaceSensitiveString)),"[Amplitude] Page URL":addIfNotExist(de,"[Amplitude] Page URL",fe.split("?")[0]),"[Amplitude] Previous Page Location":ge,"[Amplitude] Previous Page Type":ae(ge)}),ye.label=5;case 5:return[2,de]}})})},teardown:function(){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(de){switch(de.label){case 0:return ee&&(ee.removeEventListener("popstate",ue),oe=!1),re&&te?[4,re.set(URL_INFO_STORAGE_KEY,{})]:[3,2];case 1:de.sent(),de.label=2;case 2:return[2]}})})}};return le};function addIfNotExist(ee,re,te){return ee.event_properties||(ee.event_properties={}),ee.event_properties[re]===void 0?te:ee.event_properties[re]}var AmplitudeBrowser=(function(ee){__extends(re,ee);function re(){var te=ee!==null&&ee.apply(this,arguments)||this;return te._diagnosticsSampleRate=0,te}return re.prototype.init=function(te,ne,ie){te===void 0&&(te="");var oe,se;return arguments.length>2?(oe=ne,se=ie):typeof ne=="string"?(oe=ne,se=void 0):(oe=ne==null?void 0:ne.userId,se=ne),returnWrapper(this._init(__assign$1(__assign$1({},se),{userId:oe,apiKey:te})))},re.prototype._init=function(te){var ne,ie,oe,se,ae;return __awaiter(this,void 0,void 0,function(){var ce,ue,le,de,fe,he,pe,ge,me,ye=this;return __generator(this,function(ve){switch(ve.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,useBrowserConfig(te.apiKey,te,this)]);case 1:return ce=ve.sent(),!((ne=ce.remoteConfig)===null||ne===void 0)&&ne.fetchRemoteConfig?(ue=new RemoteConfigClient(ce.apiKey,ce.loggerProvider,ce.serverZone,(ie=ce.remoteConfig)===null||ie===void 0?void 0:ie.serverUrl),[4,new Promise(function(be){ue==null||ue.subscribe("configs.analyticsSDK.browserSDK","all",function(_e,Ce,Te){ce.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:_e,source:Ce,lastFetch:Te},null,2)),_e&&updateBrowserConfigWithRemoteConfig(_e,ce),be()})})]):[3,3];case 2:ve.sent(),ve.label=3;case 3:return le=new DiagnosticsClient(ce.apiKey,ce.loggerProvider,ce.serverZone,{enabled:ce.enableDiagnostics,sampleRate:ce.diagnosticsSampleRate||this._diagnosticsSampleRate}),le.setTag("library","".concat(LIBPREFIX,"/").concat(VERSION$3)),[4,ee.prototype._init.call(this,ce)];case 4:return ve.sent(),this.logBrowserOptions(ce),this.config.diagnosticsClient=le,this.config.remoteConfigClient=ue,isAttributionTrackingEnabled(this.config.defaultTracking)?(de=getAttributionTrackingConfig(this.config),this.webAttribution=new WebAttribution(de,this.config),[4,this.webAttribution.init()]):[3,6];case 5:ve.sent(),ve.label=6;case 6:return fe=getQueryParams(),he=fe.ampTimestamp?Number(fe.ampTimestamp):void 0,pe=he?Date.now()<he:!0,this.config.identify&&this.identify(this.config.identify),ge=pe&&!Number.isNaN(Number(fe.ampSessionId))?Number(fe.ampSessionId):void 0,this.setSessionId((ae=(se=(oe=te.sessionId)!==null&&oe!==void 0?oe:ge)!==null&&se!==void 0?se:this.config.sessionId)!==null&&ae!==void 0?ae:Date.now()),me=getAnalyticsConnector(te.instanceName),me.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===OfflineDisabled?[3,8]:[4,this.add(networkConnectivityCheckerPlugin()).promise];case 7:ve.sent(),ve.label=8;case 8:return[4,this.add(new Destination({diagnosticsClient:le})).promise];case 9:return ve.sent(),[4,this.add(new Context).promise];case 10:return ve.sent(),[4,this.add(new IdentityEventSender).promise];case 11:return ve.sent(),detNotify(this.config),isFileDownloadTrackingEnabled(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(fileDownloadTracking()).promise]):[3,13];case 12:ve.sent(),ve.label=13;case 13:return isFormInteractionTrackingEnabled(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(formInteractionTracking()).promise]):[3,15];case 14:ve.sent(),ve.label=15;case 15:return isPageViewTrackingEnabled(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(pageViewTrackingPlugin(getPageViewTrackingConfig(this.config))).promise]):[3,17];case 16:ve.sent(),ve.label=17;case 17:return isElementInteractionsEnabled(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(autocapturePlugin(getElementInteractionsConfig(this.config),{diagnosticsClient:le})).promise]):[3,19];case 18:ve.sent(),ve.label=19;case 19:return isFrustrationInteractionsEnabled(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(frustrationPlugin(getFrustrationInteractionsConfig(this.config))).promise]):[3,21];case 20:ve.sent(),ve.label=21;case 21:return isNetworkTrackingEnabled(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(networkCapturePlugin(getNetworkTrackingConfig(this.config))).promise]):[3,23];case 22:ve.sent(),ve.label=23;case 23:return isWebVitalsEnabled(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(webVitalsPlugin()).promise]):[3,25];case 24:ve.sent(),ve.label=25;case 25:return isPageUrlEnrichmentEnabled(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(pageUrlEnrichmentPlugin()).promise]):[3,27];case 26:ve.sent(),ve.label=27;case 27:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 28:return ve.sent(),me.eventBridge.setEventReceiver(function(be){var _e=be.eventProperties||{},Ce=_e.time,Te=__rest(_e,["time"]),Se=typeof Ce=="number"?{time:Ce}:void 0;ye.track(be.eventType,Te,Se)}),[2]}})})},re.prototype.getUserId=function(){var te;return(te=this.config)===null||te===void 0?void 0:te.userId},re.prototype.setUserId=function(te){if(!this.config){this.q.push(this.setUserId.bind(this,te));return}this.config.loggerProvider.debug("function setUserId: ",te),(te!==this.config.userId||te===void 0)&&(this.config.userId=te,this.timeline.onIdentityChanged({userId:te}),setConnectorUserId(te,this.config.instanceName))},re.prototype.getDeviceId=function(){var te;return(te=this.config)===null||te===void 0?void 0:te.deviceId},re.prototype.setDeviceId=function(te){if(!this.config){this.q.push(this.setDeviceId.bind(this,te));return}this.config.loggerProvider.debug("function setDeviceId: ",te),te!==this.config.deviceId&&(this.config.deviceId=te,this.timeline.onIdentityChanged({deviceId:te}),setConnectorDeviceId(te,this.config.instanceName))},re.prototype.reset=function(){this.setDeviceId(UUID()),this.setUserId(void 0)},re.prototype.getIdentity=function(){var te,ne;return{deviceId:(te=this.config)===null||te===void 0?void 0:te.deviceId,userId:(ne=this.config)===null||ne===void 0?void 0:ne.userId,userProperties:this.userProperties}},re.prototype.getOptOut=function(){var te;return(te=this.config)===null||te===void 0?void 0:te.optOut},re.prototype.getSessionId=function(){var te;return(te=this.config)===null||te===void 0?void 0:te.sessionId},re.prototype.setSessionId=function(te){var ne,ie=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,te)),returnWrapper(Promise.resolve());if(te===this.config.sessionId)return returnWrapper(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",te);var oe=this.getSessionId();oe!==te&&this.timeline.onSessionIdChanged(te);var se=this.config.lastEventTime,ae=(ne=this.config.lastEventId)!==null&&ne!==void 0?ne:-1;this.config.sessionId=te,this.config.lastEventTime=void 0,this.config.pageCounter=0,isSessionTrackingEnabled(this.config.defaultTracking)&&(oe&&se&&ie.push(this.track(DEFAULT_SESSION_END_EVENT,void 0,{device_id:this.previousSessionDeviceId,event_id:++ae,session_id:oe,time:se+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var ce=this.trackCampaignEventIfNeeded(++ae,ie);return isSessionTrackingEnabled(this.config.defaultTracking)&&ie.push(this.track(DEFAULT_SESSION_START_EVENT,void 0,{event_id:ce?++ae:ae,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,returnWrapper(Promise.all(ie))},re.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},re.prototype.setTransport=function(te){if(!this.config){this.q.push(this.setTransport.bind(this,te));return}this.config.transportProvider=createTransport(te)},re.prototype.identify=function(te,ne){if(isInstanceProxy(te)){var ie=te._q;te._q=[],te=convertProxyObjectToRealObject(new Identify,ie)}return ne!=null&&ne.user_id&&this.setUserId(ne.user_id),ne!=null&&ne.device_id&&this.setDeviceId(ne.device_id),ee.prototype.identify.call(this,te,ne)},re.prototype.groupIdentify=function(te,ne,ie,oe){if(isInstanceProxy(ie)){var se=ie._q;ie._q=[],ie=convertProxyObjectToRealObject(new Identify,se)}return ee.prototype.groupIdentify.call(this,te,ne,ie,oe)},re.prototype.revenue=function(te,ne){if(isInstanceProxy(te)){var ie=te._q;te._q=[],te=convertProxyObjectToRealObject(new Revenue,ie)}return ee.prototype.revenue.call(this,te,ne)},re.prototype.trackCampaignEventIfNeeded=function(te,ne){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var ie=this.webAttribution.generateCampaignEvent(te);return ne?ne.push(this.track(ie).promise):this.track(ie),this.config.loggerProvider.log("Tracking attribution."),!0},re.prototype.process=function(te){return __awaiter(this,void 0,void 0,function(){var ne,ie,oe;return __generator(this,function(se){return ne=Date.now(),ie=isNewSession(this.config.sessionTimeout,this.config.lastEventTime),oe=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),te.event_type!==DEFAULT_SESSION_START_EVENT&&te.event_type!==DEFAULT_SESSION_END_EVENT&&(!te.session_id||te.session_id===this.getSessionId())&&(ie||oe?(this.setSessionId(ne),oe&&this.config.loggerProvider.log("Created a new session for new campaign.")):ie||this.trackCampaignEventIfNeeded()),te.event_type===SpecialEventType.IDENTIFY&&te.user_properties&&(this.userProperties=this.getOperationAppliedUserProperties(te.user_properties)),[2,ee.prototype.process.call(this,te)]})})},re.prototype.logBrowserOptions=function(te){try{var ne=__assign$1(__assign$1({},te),{apiKey:te.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(ne))}catch(ie){this.config.loggerProvider.error("Error logging browser config",ie)}},re.prototype._setDiagnosticsSampleRate=function(te){if(!(te>1||te<0)&&!this.config){this._diagnosticsSampleRate=te;return}},re})(AmplitudeCore),createInstance$1=function(){var ee=new AmplitudeBrowser;return{init:debugWrapper(ee.init.bind(ee),"init",getClientLogConfig(ee),getClientStates(ee,["config"])),add:debugWrapper(ee.add.bind(ee),"add",getClientLogConfig(ee),getClientStates(ee,["config.apiKey","timeline.plugins"])),remove:debugWrapper(ee.remove.bind(ee),"remove",getClientLogConfig(ee),getClientStates(ee,["config.apiKey","timeline.plugins"])),track:debugWrapper(ee.track.bind(ee),"track",getClientLogConfig(ee),getClientStates(ee,["config.apiKey","timeline.queue.length"])),logEvent:debugWrapper(ee.logEvent.bind(ee),"logEvent",getClientLogConfig(ee),getClientStates(ee,["config.apiKey","timeline.queue.length"])),identify:debugWrapper(ee.identify.bind(ee),"identify",getClientLogConfig(ee),getClientStates(ee,["config.apiKey","timeline.queue.length"])),groupIdentify:debugWrapper(ee.groupIdentify.bind(ee),"groupIdentify",getClientLogConfig(ee),getClientStates(ee,["config.apiKey","timeline.queue.length"])),setGroup:debugWrapper(ee.setGroup.bind(ee),"setGroup",getClientLogConfig(ee),getClientStates(ee,["config.apiKey","timeline.queue.length"])),revenue:debugWrapper(ee.revenue.bind(ee),"revenue",getClientLogConfig(ee),getClientStates(ee,["config.apiKey","timeline.queue.length"])),flush:debugWrapper(ee.flush.bind(ee),"flush",getClientLogConfig(ee),getClientStates(ee,["config.apiKey","timeline.queue.length"])),getUserId:debugWrapper(ee.getUserId.bind(ee),"getUserId",getClientLogConfig(ee),getClientStates(ee,["config","config.userId"])),setUserId:debugWrapper(ee.setUserId.bind(ee),"setUserId",getClientLogConfig(ee),getClientStates(ee,["config","config.userId"])),getDeviceId:debugWrapper(ee.getDeviceId.bind(ee),"getDeviceId",getClientLogConfig(ee),getClientStates(ee,["config","config.deviceId"])),setDeviceId:debugWrapper(ee.setDeviceId.bind(ee),"setDeviceId",getClientLogConfig(ee),getClientStates(ee,["config","config.deviceId"])),reset:debugWrapper(ee.reset.bind(ee),"reset",getClientLogConfig(ee),getClientStates(ee,["config","config.userId","config.deviceId"])),getSessionId:debugWrapper(ee.getSessionId.bind(ee),"getSessionId",getClientLogConfig(ee),getClientStates(ee,["config"])),setSessionId:debugWrapper(ee.setSessionId.bind(ee),"setSessionId",getClientLogConfig(ee),getClientStates(ee,["config"])),extendSession:debugWrapper(ee.extendSession.bind(ee),"extendSession",getClientLogConfig(ee),getClientStates(ee,["config"])),setOptOut:debugWrapper(ee.setOptOut.bind(ee),"setOptOut",getClientLogConfig(ee),getClientStates(ee,["config"])),setTransport:debugWrapper(ee.setTransport.bind(ee),"setTransport",getClientLogConfig(ee),getClientStates(ee,["config"])),getIdentity:debugWrapper(ee.getIdentity.bind(ee),"getIdentity",getClientLogConfig(ee),getClientStates(ee,["config"])),getOptOut:debugWrapper(ee.getOptOut.bind(ee),"getOptOut",getClientLogConfig(ee),getClientStates(ee,["config"])),_setDiagnosticsSampleRate:debugWrapper(ee._setDiagnosticsSampleRate.bind(ee),"_setDiagnosticsSampleRate",getClientLogConfig(ee),getClientStates(ee,["config"]))}};createInstance$1();const ApiKey={production:"be237974d6ba66e5ed3bbf56ac4b6e48",development:"000e3bbcc2c10d22df926468ee9aef91"},DefaultConfiguration={plan:{version:"168",branch:"main",source:"checkout-library",versionId:"6c9f59d1-26b3-4926-a2f0-d7d68292d669"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}};class AstroPayPaymentCardClicked{constructor(re){Ie(this,"event_type","AstroPay Payment Card Clicked");this.event_properties=re,this.event_properties=re}}class AstroPayPaymentClicked{constructor(re){Ie(this,"event_type","AstroPay Payment Clicked");this.event_properties=re,this.event_properties=re}}class AstroPayPaymentImpression{constructor(re){Ie(this,"event_type","AstroPay Payment Impression");this.event_properties=re,this.event_properties=re}}class AstroPayPaymentLinkCopied{constructor(re){Ie(this,"event_type","AstroPay Payment Link Copied");this.event_properties=re,this.event_properties=re}}class AstroPayPaymentPhoneNumberEntered{constructor(re){Ie(this,"event_type","AstroPay Payment Phone Number Entered");this.event_properties=re,this.event_properties=re}}class AstroPayPaymentStarted{constructor(re){Ie(this,"event_type","AstroPay Payment Started");this.event_properties=re,this.event_properties=re}}class AstroPayPaymentUserIdentified{constructor(re){Ie(this,"event_type","AstroPay Payment User Identified");this.event_properties=re,this.event_properties=re}}const getVoidPromiseResult=()=>({promise:Promise.resolve()});class Ampli{constructor(){Ie(this,"disabled",!1);Ie(this,"amplitude")}get client(){return this.isInitializedAndEnabled(),this.amplitude}get isLoaded(){return this.amplitude!=null}isInitializedAndEnabled(){return this.amplitude?!this.disabled:(console.error("ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?"),!1)}load(re){if(this.disabled=re.disabled??!1,this.amplitude)return console.warn("WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup."),getVoidPromiseResult();let te=null;if(re.client&&"apiKey"in re.client?te=re.client.apiKey:"environment"in re&&(te=ApiKey[re.environment]),re.client&&"instance"in re.client)this.amplitude=re.client.instance;else if(te){this.amplitude=createInstance$1();const ne=re.client&&"configuration"in re.client?re.client.configuration:{};return this.amplitude.init(te,void 0,{...DefaultConfiguration,...ne})}else console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'");return getVoidPromiseResult()}identify(re,te,ne){if(!this.isInitializedAndEnabled())return getVoidPromiseResult();re&&(ne={...ne,user_id:re});const ie=new Identify,oe=te;if(oe!=null)for(const[se,ae]of Object.entries(oe))ie.set(se,ae);return this.amplitude.identify(ie,ne)}flush(){return this.isInitializedAndEnabled()?this.amplitude.flush():getVoidPromiseResult()}track(re,te){return this.isInitializedAndEnabled()?this.amplitude.track(re,void 0,te):getVoidPromiseResult()}astroPayPaymentCardClicked(re,te){return this.track(new AstroPayPaymentCardClicked(re),te)}astroPayPaymentClicked(re,te){return this.track(new AstroPayPaymentClicked(re),te)}astroPayPaymentImpression(re,te){return this.track(new AstroPayPaymentImpression(re),te)}astroPayPaymentLinkCopied(re,te){return this.track(new AstroPayPaymentLinkCopied(re),te)}astroPayPaymentPhoneNumberEntered(re,te){return this.track(new AstroPayPaymentPhoneNumberEntered(re),te)}astroPayPaymentStarted(re,te){return this.track(new AstroPayPaymentStarted(re),te)}astroPayPaymentUserIdentified(re,te){return this.track(new AstroPayPaymentUserIdentified(re),te)}}const ampli=new Ampli;class AmplitudeTracker{}Ie(AmplitudeTracker,"init",()=>{const te=AstroPayConfig.getEnvironment()==="production";ampli.load({environment:te?"production":"development",client:{apiKey:te?ApiKey.production:ApiKey.development}})}),Ie(AmplitudeTracker,"trackEvent",(re,te,ne)=>{typeof re=="string"?ampli.client.track(re,te,ne):ampli.track(re)}),Ie(AmplitudeTracker,"cleanData",()=>{ampli.client.reset()});function getDefaultExportFromCjs(ee){return ee&&ee.__esModule&&Object.prototype.hasOwnProperty.call(ee,"default")?ee.default:ee}var singularSdk={exports:{}},hasRequiredSingularSdk;function requireSingularSdk(){return hasRequiredSingularSdk||(hasRequiredSingularSdk=1,(function(module,exports$1){(function(ee,re){module.exports=re()})(window,(function(){return(function(ee){var re={};function te(ne){if(re[ne])return re[ne].exports;var ie=re[ne]={i:ne,l:!1,exports:{}};return ee[ne].call(ie.exports,ie,ie.exports,te),ie.l=!0,ie.exports}return te.m=ee,te.c=re,te.d=function(ne,ie,oe){te.o(ne,ie)||Object.defineProperty(ne,ie,{enumerable:!0,get:oe})},te.r=function(ne){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ne,"__esModule",{value:!0})},te.t=function(ne,ie){if(1&ie&&(ne=te(ne)),8&ie||4&ie&&typeof ne=="object"&&ne&&ne.__esModule)return ne;var oe=Object.create(null);if(te.r(oe),Object.defineProperty(oe,"default",{enumerable:!0,value:ne}),2&ie&&typeof ne!="string")for(var se in ne)te.d(oe,se,(function(ae){return ne[ae]}).bind(null,se));return oe},te.n=function(ne){var ie=ne&&ne.__esModule?function(){return ne.default}:function(){return ne};return te.d(ie,"a",ie),ie},te.o=function(ne,ie){return Object.prototype.hasOwnProperty.call(ne,ie)},te.p="",te(te.s=199)})([function(ee,re,te){var ne=te(80),ie=te(130);ee.exports=function(oe,se,ae){return(se=ie(se))in oe?ne(oe,se,{value:ae,enumerable:!0,configurable:!0,writable:!0}):oe[se]=ae,oe},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){var ne=te(9),ie=te(66),oe=te(81),se=te(10),ae=te(44).f,ce=te(128),ue=te(7),le=te(46),de=te(37),fe=te(13),he=function(pe){var ge=function(me,ye,ve){if(this instanceof ge){switch(arguments.length){case 0:return new pe;case 1:return new pe(me);case 2:return new pe(me,ye)}return new pe(me,ye,ve)}return ie(pe,this,arguments)};return ge.prototype=pe.prototype,ge};ee.exports=function(pe,ge){var me,ye,ve,be,_e,Ce,Te,Se,Re,we=pe.target,Ae=pe.global,Oe=pe.stat,Ne=pe.proto,Ue=Ae?ne:Oe?ne[we]:(ne[we]||{}).prototype,Fe=Ae?ue:ue[we]||de(ue,we,{})[we],Ve=Fe.prototype;for(be in ge)ye=!(me=ce(Ae?be:we+(Oe?".":"#")+be,pe.forced))&&Ue&&fe(Ue,be),Ce=Fe[be],ye&&(Te=pe.dontCallGetSet?(Re=ae(Ue,be))&&Re.value:Ue[be]),_e=ye&&Te?Te:ge[be],ye&&typeof Ce==typeof _e||(Se=pe.bind&&ye?le(_e,ne):pe.wrap&&ye?he(_e):Ne&&se(_e)?oe(_e):_e,(pe.sham||_e&&_e.sham||Ce&&Ce.sham)&&de(Se,"sham",!0),de(Fe,be,Se),Ne&&(fe(ue,ve=we+"Prototype")||de(ue,ve,{}),de(ue[ve],be,_e),pe.real&&Ve&&(me||!Ve[be])&&de(Ve,be,_e)))}},function(ee,re){ee.exports=function(te,ne){if(!(te instanceof ne))throw new TypeError("Cannot call a class as a function")},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(401)},function(ee,re,te){var ne=te(80),ie=te(130);function oe(se,ae){for(var ce=0;ce<ae.length;ce++){var ue=ae[ce];ue.enumerable=ue.enumerable||!1,ue.configurable=!0,"value"in ue&&(ue.writable=!0),ne(se,ie(ue.key),ue)}}ee.exports=function(se,ae,ce){return ae&&oe(se.prototype,ae),ce&&oe(se,ce),ne(se,"prototype",{writable:!1}),se},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re){ee.exports=function(te){try{return!!te()}catch{return!0}}},function(ee,re,te){var ne=te(67),ie=Function.prototype,oe=ie.call,se=ne&&ie.bind.bind(oe,oe);ee.exports=ne?se:function(ae){return function(){return oe.apply(ae,arguments)}}},function(ee,re){ee.exports={}},function(ee,re,te){var ne=te(9),ie=te(70),oe=te(13),se=te(107),ae=te(55),ce=te(126),ue=ne.Symbol,le=ie("wks"),de=ce?ue.for||ue:ue&&ue.withoutSetter||se;ee.exports=function(fe){return oe(le,fe)||(le[fe]=ae&&oe(ue,fe)?ue[fe]:de("Symbol."+fe)),le[fe]}},function(ee,re,te){(function(ne){var ie=function(oe){return oe&&oe.Math==Math&&oe};ee.exports=ie(typeof globalThis=="object"&&globalThis)||ie(typeof window=="object"&&window)||ie(typeof self=="object"&&self)||ie(typeof ne=="object"&&ne)||(function(){return this})()||Function("return this")()}).call(this,te(124))},function(ee,re,te){var ne=te(125),ie=ne.all;ee.exports=ne.IS_HTMLDDA?function(oe){return typeof oe=="function"||oe===ie}:function(oe){return typeof oe=="function"}},function(ee,re,te){var ne=te(358)();ee.exports=ne;try{regeneratorRuntime=ne}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=ne:Function("r","regeneratorRuntime = r")(ne)}},function(ee,re,te){var ne=te(7),ie=te(13),oe=te(93),se=te(28).f;ee.exports=function(ae){var ce=ne.Symbol||(ne.Symbol={});ie(ce,ae)||se(ce,ae,{value:oe.f(ae)})}},function(ee,re,te){var ne=te(6),ie=te(36),oe=ne({}.hasOwnProperty);ee.exports=Object.hasOwn||function(se,ae){return oe(ie(se),ae)}},function(ee,re,te){var ne=te(67),ie=Function.prototype.call;ee.exports=ne?ie.bind(ie):function(){return ie.apply(ie,arguments)}},function(ee,re,te){var ne=te(5);ee.exports=!ne((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}))},function(ee,re,te){var ne=te(6);ee.exports=ne({}.isPrototypeOf)},function(ee,re,te){var ne=te(10),ie=te(125),oe=ie.all;ee.exports=ie.IS_HTMLDDA?function(se){return typeof se=="object"?se!==null:ne(se)||se===oe}:function(se){return typeof se=="object"?se!==null:ne(se)}},function(ee,re,te){ee.exports=te(152)},function(ee,re,te){ee.exports=te(156)},function(ee,re,te){var ne=te(17),ie=String,oe=TypeError;ee.exports=function(se){if(ne(se))return se;throw oe(ie(se)+" is not an object")}},function(ee,re,te){var ne=te(7);ee.exports=function(ie){return ne[ie+"Prototype"]}},function(ee,re,te){var ne=te(169);function ie(oe,se,ae,ce,ue,le,de){try{var fe=oe[le](de),he=fe.value}catch(pe){return void ae(pe)}fe.done?se(he):ne.resolve(he).then(ce,ue)}ee.exports=function(oe){return function(){var se=this,ae=arguments;return new ne((function(ce,ue){var le=oe.apply(se,ae);function de(he){ie(le,ce,ue,de,fe,"next",he)}function fe(he){ie(le,ce,ue,de,fe,"throw",he)}de(void 0)}))}},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(408)},function(ee,re,te){var ne=te(7),ie=te(9),oe=te(10),se=function(ae){return oe(ae)?ae:void 0};ee.exports=function(ae,ce){return arguments.length<2?se(ne[ae])||se(ie[ae]):ne[ae]&&ne[ae][ce]||ie[ae]&&ie[ae][ce]}},function(ee,re,te){var ne=te(118),ie=te(119),oe=te(157);function se(ae){var ce;return ee.exports=se=ne?ie(ce=oe).call(ce):function(ue){return ue.__proto__||oe(ue)},ee.exports.__esModule=!0,ee.exports.default=ee.exports,se(ae)}ee.exports=se,ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re){ee.exports=!0},function(ee,re,te){var ne=te(104),ie=te(54);ee.exports=function(oe){return ne(ie(oe))}},function(ee,re,te){var ne=te(15),ie=te(127),oe=te(129),se=te(20),ae=te(84),ce=TypeError,ue=Object.defineProperty,le=Object.getOwnPropertyDescriptor;re.f=ne?oe?function(de,fe,he){if(se(de),fe=ae(fe),se(he),typeof de=="function"&&fe==="prototype"&&"value"in he&&"writable"in he&&!he.writable){var pe=le(de,fe);pe&&pe.writable&&(de[fe]=he.value,he={configurable:"configurable"in he?he.configurable:pe.configurable,enumerable:"enumerable"in he?he.enumerable:pe.enumerable,writable:!1})}return ue(de,fe,he)}:ue:function(de,fe,he){if(se(de),fe=ae(fe),se(he),ie)try{return ue(de,fe,he)}catch{}if("get"in he||"set"in he)throw ce("Accessors not supported");return"value"in he&&(de[fe]=he.value),de}},function(ee,re,te){var ne=te(38),ie=String;ee.exports=function(oe){if(ne(oe)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return ie(oe)}},function(ee,re,te){var ne=te(10),ie=te(69),oe=TypeError;ee.exports=function(se){if(ne(se))return se;throw oe(ie(se)+" is not a function")}},function(ee,re,te){var ne=te(37);ee.exports=function(ie,oe,se,ae){return ae&&ae.enumerable?ie[oe]=se:ne(ie,oe,se),ie}},function(ee,re,te){var ne=te(87).default,ie=te(281);ee.exports=function(oe,se){if(se&&(ne(se)==="object"||typeof se=="function"))return se;if(se!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ie(oe)},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){var ne=te(158),ie=te(80),oe=te(307);ee.exports=function(se,ae){if(typeof ae!="function"&&ae!==null)throw new TypeError("Super expression must either be null or a function");se.prototype=ne(ae&&ae.prototype,{constructor:{value:se,writable:!0,configurable:!0}}),ie(se,"prototype",{writable:!1}),ae&&oe(se,ae)},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(274)},function(ee,re,te){var ne=te(322),ie=te(330),oe=te(337),se=te(353);ee.exports=function(ae,ce){return ne(ae)||ie(ae,ce)||oe(ae,ce)||se()},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){var ne=te(54),ie=Object;ee.exports=function(oe){return ie(ne(oe))}},function(ee,re,te){var ne=te(15),ie=te(28),oe=te(45);ee.exports=ne?function(se,ae,ce){return ie.f(se,ae,oe(1,ce))}:function(se,ae,ce){return se[ae]=ce,se}},function(ee,re,te){var ne=te(111),ie=te(10),oe=te(51),se=te(8)("toStringTag"),ae=Object,ce=oe((function(){return arguments})())=="Arguments";ee.exports=ne?oe:function(ue){var le,de,fe;return ue===void 0?"Undefined":ue===null?"Null":typeof(de=(function(he,pe){try{return he[pe]}catch{}})(le=ae(ue),se))=="string"?de:ce?oe(le):(fe=oe(le))=="Object"&&ie(le.callee)?"Arguments":fe}},function(ee,re,te){te(48);var ne=te(239),ie=te(9),oe=te(38),se=te(37),ae=te(59),ce=te(8)("toStringTag");for(var ue in ne){var le=ie[ue],de=le&&le.prototype;de&&oe(de)!==ce&&se(de,ce,ue),ae[ue]=ae.Array}},function(ee,re,te){ee.exports=te(265)},function(ee,re,te){ee.exports=te(154)},function(ee,re,te){ee.exports=te(155)},function(ee,re,te){ee.exports=te(410)},function(ee,re,te){var ne=te(15),ie=te(14),oe=te(82),se=te(45),ae=te(27),ce=te(84),ue=te(13),le=te(127),de=Object.getOwnPropertyDescriptor;re.f=ne?de:function(fe,he){if(fe=ae(fe),he=ce(he),le)try{return de(fe,he)}catch{}if(ue(fe,he))return se(!ie(oe.f,fe,he),fe[he])}},function(ee,re){ee.exports=function(te,ne){return{enumerable:!(1&te),configurable:!(2&te),writable:!(4&te),value:ne}}},function(ee,re,te){var ne=te(81),ie=te(30),oe=te(67),se=ne(ne.bind);ee.exports=function(ae,ce){return ie(ae),ce===void 0?ae:oe?se(ae,ce):function(){return ae.apply(ce,arguments)}}},function(ee,re,te){var ne=te(111),ie=te(28).f,oe=te(37),se=te(13),ae=te(218),ce=te(8)("toStringTag");ee.exports=function(ue,le,de,fe){if(ue){var he=de?ue:ue.prototype;se(he,ce)||ie(he,ce,{configurable:!0,value:le}),fe&&!ne&&oe(he,"toString",ae)}}},function(ee,re,te){var ne=te(27),ie=te(143),oe=te(59),se=te(58),ae=te(28).f,ce=te(144),ue=te(149),le=te(26),de=te(15),fe=se.set,he=se.getterFor("Array Iterator");ee.exports=ce(Array,"Array",(function(ge,me){fe(this,{type:"Array Iterator",target:ne(ge),index:0,kind:me})}),(function(){var ge=he(this),me=ge.target,ye=ge.kind,ve=ge.index++;return!me||ve>=me.length?(ge.target=void 0,ue(void 0,!0)):ue(ye=="keys"?ve:ye=="values"?me[ve]:[ve,me[ve]],!1)}),"values");var pe=oe.Arguments=oe.Array;if(ie("keys"),ie("values"),ie("entries"),!le&&de&&pe.name!=="values")try{ae(pe,"name",{value:"values"})}catch{}},function(ee,re,te){var ne=te(30),ie=TypeError,oe=function(se){var ae,ce;this.promise=new se((function(ue,le){if(ae!==void 0||ce!==void 0)throw ie("Bad Promise constructor");ae=ue,ce=le})),this.resolve=ne(ae),this.reject=ne(ce)};ee.exports.f=function(se){return new oe(se)}},function(ee,re,te){ee.exports=te(439)},function(ee,re,te){var ne=te(6),ie=ne({}.toString),oe=ne("".slice);ee.exports=function(se){return oe(ie(se),8,-1)}},function(ee,re,te){var ne=te(132);ee.exports=function(ie){return ne(ie.length)}},function(ee,re,te){ee.exports=te(315)},function(ee,re,te){var ne=te(83),ie=TypeError;ee.exports=function(oe){if(ne(oe))throw ie("Can't call method on "+oe);return oe}},function(ee,re,te){var ne=te(86),ie=te(5);ee.exports=!!Object.getOwnPropertySymbols&&!ie((function(){var oe=Symbol();return!String(oe)||!(Object(oe)instanceof Symbol)||!Symbol.sham&&ne&&ne<41}))},function(ee,re,te){var ne=te(51);ee.exports=Array.isArray||function(ie){return ne(ie)=="Array"}},function(ee,re,te){var ne,ie=te(20),oe=te(112),se=te(115),ae=te(90),ce=te(137),ue=te(108),le=te(91),de=le("IE_PROTO"),fe=function(){},he=function(me){return"<script>"+me+"<\/script>"},pe=function(me){me.write(he("")),me.close();var ye=me.parentWindow.Object;return me=null,ye},ge=function(){try{ne=new ActiveXObject("htmlfile")}catch{}var me,ye;ge=typeof document<"u"?document.domain&&ne?pe(ne):((ye=ue("iframe")).style.display="none",ce.appendChild(ye),ye.src="javascript:",(me=ye.contentWindow.document).open(),me.write(he("document.F=Object")),me.close(),me.F):pe(ne);for(var ve=se.length;ve--;)delete ge.prototype[se[ve]];return ge()};ae[de]=!0,ee.exports=Object.create||function(me,ye){var ve;return me!==null?(fe.prototype=ie(me),ve=new fe,fe.prototype=null,ve[de]=me):ve=ge(),ye===void 0?ve:oe.f(ve,ye)}},function(ee,re,te){var ne,ie,oe,se=te(219),ae=te(9),ce=te(17),ue=te(37),le=te(13),de=te(106),fe=te(91),he=te(90),pe=ae.TypeError,ge=ae.WeakMap;if(se||de.state){var me=de.state||(de.state=new ge);me.get=me.get,me.has=me.has,me.set=me.set,ne=function(ve,be){if(me.has(ve))throw pe("Object already initialized");return be.facade=ve,me.set(ve,be),be},ie=function(ve){return me.get(ve)||{}},oe=function(ve){return me.has(ve)}}else{var ye=fe("state");he[ye]=!0,ne=function(ve,be){if(le(ve,ye))throw pe("Object already initialized");return be.facade=ve,ue(ve,ye,be),be},ie=function(ve){return le(ve,ye)?ve[ye]:{}},oe=function(ve){return le(ve,ye)}}ee.exports={set:ne,get:ie,has:oe,enforce:function(ve){return oe(ve)?ie(ve):ne(ve,{})},getterFor:function(ve){return function(be){var _e;if(!ce(be)||(_e=ie(be)).type!==ve)throw pe("Incompatible receiver, "+ve+" required");return _e}}}},function(ee,re){ee.exports={}},function(ee,re,te){var ne=te(150).charAt,ie=te(29),oe=te(58),se=te(144),ae=te(149),ce=oe.set,ue=oe.getterFor("String Iterator");se(String,"String",(function(le){ce(this,{type:"String Iterator",string:ie(le),index:0})}),(function(){var le,de=ue(this),fe=de.string,he=de.index;return he>=fe.length?ae(void 0,!0):(le=ne(fe,he),de.index+=le.length,ae(le,!1))}))},function(ee,re){ee.exports=function(te){try{return{error:!1,value:te()}}catch(ne){return{error:!0,value:ne}}}},function(ee,re,te){var ne=te(9);ee.exports=ne.Promise},function(ee,re,te){ee.exports=te(123)},function(ee,re,te){ee.exports=te(262)},function(ee,re,te){ee.exports=te(182)},function(ee,re,te){var ne=te(67),ie=Function.prototype,oe=ie.apply,se=ie.call;ee.exports=typeof Reflect=="object"&&Reflect.apply||(ne?se.bind(oe):function(){return se.apply(oe,arguments)})},function(ee,re,te){var ne=te(5);ee.exports=!ne((function(){var ie=(function(){}).bind();return typeof ie!="function"||ie.hasOwnProperty("prototype")}))},function(ee,re){ee.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},function(ee,re){var te=String;ee.exports=function(ne){try{return te(ne)}catch{return"Object"}}},function(ee,re,te){var ne=te(26),ie=te(106);(ee.exports=function(oe,se){return ie[oe]||(ie[oe]=se!==void 0?se:{})})("versions",[]).push({version:"3.27.2",mode:ne?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.2/LICENSE",source:"https://github.com/zloirock/core-js"})},function(ee,re,te){var ne=te(84),ie=te(28),oe=te(45);ee.exports=function(se,ae,ce){var ue=ne(ae);ue in se?ie.f(se,ue,oe(0,ce)):se[ue]=ce}},function(ee,re){},function(ee,re,te){var ne=te(136),ie=te(115);ee.exports=Object.keys||function(oe){return ne(oe,ie)}},function(ee,re,te){var ne=te(6);ee.exports=ne([].slice)},function(ee,re,te){var ne=te(13),ie=te(10),oe=te(36),se=te(91),ae=te(148),ce=se("IE_PROTO"),ue=Object,le=ue.prototype;ee.exports=ae?ue.getPrototypeOf:function(de){var fe=oe(de);if(ne(fe,ce))return fe[ce];var he=fe.constructor;return ie(he)&&fe instanceof he?he.prototype:fe instanceof ue?le:null}},function(ee,re,te){var ne=te(38),ie=te(105),oe=te(83),se=te(59),ae=te(8)("iterator");ee.exports=function(ce){if(!oe(ce))return ie(ce,ae)||ie(ce,"@@iterator")||se[ne(ce)]}},function(ee,re,te){var ne=te(46),ie=te(14),oe=te(20),se=te(69),ae=te(167),ce=te(52),ue=te(16),le=te(96),de=te(76),fe=te(166),he=TypeError,pe=function(me,ye){this.stopped=me,this.result=ye},ge=pe.prototype;ee.exports=function(me,ye,ve){var be,_e,Ce,Te,Se,Re,we,Ae=ve&&ve.that,Oe=!(!ve||!ve.AS_ENTRIES),Ne=!(!ve||!ve.IS_RECORD),Ue=!(!ve||!ve.IS_ITERATOR),Fe=!(!ve||!ve.INTERRUPTED),Ve=ne(ye,Ae),He=function(qe){return be&&fe(be,"normal",qe),new pe(!0,qe)},ur=function(qe){return Oe?(oe(qe),Fe?Ve(qe[0],qe[1],He):Ve(qe[0],qe[1])):Fe?Ve(qe,He):Ve(qe)};if(Ne)be=me.iterator;else if(Ue)be=me;else{if(!(_e=de(me)))throw he(se(me)+" is not iterable");if(ae(_e)){for(Ce=0,Te=ce(me);Te>Ce;Ce++)if((Se=ur(me[Ce]))&&ue(ge,Se))return Se;return new pe(!1)}be=le(me,_e)}for(Re=Ne?me.next:be.next;!(we=ie(Re,be)).done;){try{Se=ur(we.value)}catch(qe){fe(be,"throw",qe)}if(typeof Se=="object"&&Se&&ue(ge,Se))return Se}return new pe(!1)}},function(ee,re,te){var ne=te(9),ie=te(62),oe=te(10),se=te(128),ae=te(134),ce=te(8),ue=te(382),le=te(177),de=te(26),fe=te(86),he=ie&&ie.prototype,pe=ce("species"),ge=!1,me=oe(ne.PromiseRejectionEvent),ye=se("Promise",(function(){var ve=ae(ie),be=ve!==String(ie);if(!be&&fe===66||de&&(!he.catch||!he.finally))return!0;if(!fe||fe<51||!/native code/.test(ve)){var _e=new ie((function(Te){Te(1)})),Ce=function(Te){Te((function(){}),(function(){}))};if((_e.constructor={})[pe]=Ce,!(ge=_e.then((function(){}))instanceof Ce))return!0}return!be&&(ue||le)&&!me}));ee.exports={CONSTRUCTOR:ye,REJECTION_EVENT:me,SUBCLASSING:ge}},function(ee,re,te){ee.exports=te(354)},function(ee,re,te){ee.exports=te(200)},function(ee,re,te){var ne=te(51),ie=te(6);ee.exports=function(oe){if(ne(oe)==="Function")return ie(oe)}},function(ee,re,te){var ne={}.propertyIsEnumerable,ie=Object.getOwnPropertyDescriptor,oe=ie&&!ne.call({1:2},1);re.f=oe?function(se){var ae=ie(this,se);return!!ae&&ae.enumerable}:ne},function(ee,re){ee.exports=function(te){return te==null}},function(ee,re,te){var ne=te(205),ie=te(85);ee.exports=function(oe){var se=ne(oe,"string");return ie(se)?se:se+""}},function(ee,re,te){var ne=te(24),ie=te(10),oe=te(16),se=te(126),ae=Object;ee.exports=se?function(ce){return typeof ce=="symbol"}:function(ce){var ue=ne("Symbol");return ie(ue)&&oe(ue.prototype,ae(ce))}},function(ee,re,te){var ne,ie,oe=te(9),se=te(68),ae=oe.process,ce=oe.Deno,ue=ae&&ae.versions||ce&&ce.version,le=ue&&ue.v8;le&&(ie=(ne=le.split("."))[0]>0&&ne[0]<4?1:+(ne[0]+ne[1])),!ie&&se&&(!(ne=se.match(/Edge\/(\d+)/))||ne[1]>=74)&&(ne=se.match(/Chrome\/(\d+)/))&&(ie=+ne[1]),ee.exports=ie},function(ee,re,te){var ne=te(109),ie=te(248);function oe(se){return ee.exports=oe=typeof ne=="function"&&typeof ie=="symbol"?function(ae){return typeof ae}:function(ae){return ae&&typeof ne=="function"&&ae.constructor===ne&&ae!==ne.prototype?"symbol":typeof ae},ee.exports.__esModule=!0,ee.exports.default=ee.exports,oe(se)}ee.exports=oe,ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){var ne=te(6),ie=te(5),oe=te(10),se=te(38),ae=te(24),ce=te(134),ue=function(){},le=[],de=ae("Reflect","construct"),fe=/^\s*(?:class|function)\b/,he=ne(fe.exec),pe=!fe.exec(ue),ge=function(ye){if(!oe(ye))return!1;try{return de(ue,le,ye),!0}catch{return!1}},me=function(ye){if(!oe(ye))return!1;switch(se(ye)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return pe||!!he(fe,ce(ye))}catch{return!0}};me.sham=!0,ee.exports=!de||ie((function(){var ye;return ge(ge.call)||!ge(Object)||!ge((function(){ye=!0}))||ye}))?me:ge},function(ee,re,te){var ne=te(5),ie=te(8),oe=te(86),se=ie("species");ee.exports=function(ae){return oe>=51||!ne((function(){var ce=[];return(ce.constructor={})[se]=function(){return{foo:1}},ce[ae](Boolean).foo!==1}))}},function(ee,re){ee.exports={}},function(ee,re,te){var ne=te(70),ie=te(107),oe=ne("keys");ee.exports=function(se){return oe[se]||(oe[se]=ie(se))}},function(ee,re){re.f=Object.getOwnPropertySymbols},function(ee,re,te){var ne=te(8);re.f=ne},function(ee,re,te){var ne=te(46),ie=te(6),oe=te(104),se=te(36),ae=te(52),ce=te(133),ue=ie([].push),le=function(de){var fe=de==1,he=de==2,pe=de==3,ge=de==4,me=de==6,ye=de==7,ve=de==5||me;return function(be,_e,Ce,Te){for(var Se,Re,we=se(be),Ae=oe(we),Oe=ne(_e,Ce),Ne=ae(Ae),Ue=0,Fe=Te||ce,Ve=fe?Fe(be,Ne):he||ye?Fe(be,0):void 0;Ne>Ue;Ue++)if((ve||Ue in Ae)&&(Re=Oe(Se=Ae[Ue],Ue,we),de))if(fe)Ve[Ue]=Re;else if(Re)switch(de){case 3:return!0;case 5:return Se;case 6:return Ue;case 2:ue(Ve,Se)}else switch(de){case 4:return!1;case 7:ue(Ve,Se)}return me?-1:pe||ge?ge:Ve}};ee.exports={forEach:le(0),map:le(1),filter:le(2),some:le(3),every:le(4),find:le(5),findIndex:le(6),filterReject:le(7)}},function(ee,re,te){var ne=te(6),ie=te(20),oe=te(238);ee.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var se,ae=!1,ce={};try{(se=ne(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(ce,[]),ae=ce instanceof Array}catch{}return function(ue,le){return ie(ue),oe(le),ae?se(ue,le):ue.__proto__=le,ue}})():void 0)},function(ee,re,te){var ne=te(14),ie=te(30),oe=te(20),se=te(69),ae=te(76),ce=TypeError;ee.exports=function(ue,le){var de=arguments.length<2?ae(ue):le;if(ie(de))return oe(ne(de,ue));throw ce(se(ue)+" is not iterable")}},function(ee,re,te){(function(ne){var ie=te(51);ee.exports=ne!==void 0&&ie(ne)=="process"}).call(this,te(172))},function(ee,re){var te=TypeError;ee.exports=function(ne,ie){if(ne<ie)throw te("Not enough arguments");return ne}},function(ee,re,te){var ne=te(62),ie=te(168),oe=te(78).CONSTRUCTOR;ee.exports=oe||!ie((function(se){ne.all(se).then(void 0,(function(){}))}))},function(ee,re,te){ee.exports=te(311)},function(ee,re,te){ee.exports=te(418)},function(ee,re,te){ee.exports=te(425)},function(ee,re,te){var ne=te(446),ie=te(119),oe=te(454),se=te(458);function ae(){var ce;return typeof Reflect<"u"&&ne?(ee.exports=ae=ie(ce=ne).call(ce),ee.exports.__esModule=!0,ee.exports.default=ee.exports):(ee.exports=ae=function(ue,le,de){var fe=se(ue,le);if(fe){var he=oe(fe,le);return he.get?he.get.call(arguments.length<3?ue:de):he.value}},ee.exports.__esModule=!0,ee.exports.default=ee.exports),ae.apply(this,arguments)}ee.exports=ae,ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){var ne=te(6),ie=te(5),oe=te(51),se=Object,ae=ne("".split);ee.exports=ie((function(){return!se("z").propertyIsEnumerable(0)}))?function(ce){return oe(ce)=="String"?ae(ce,""):se(ce)}:se},function(ee,re,te){var ne=te(30),ie=te(83);ee.exports=function(oe,se){var ae=oe[se];return ie(ae)?void 0:ne(ae)}},function(ee,re,te){var ne=te(9),ie=te(207),oe=ne["__core-js_shared__"]||ie("__core-js_shared__",{});ee.exports=oe},function(ee,re,te){var ne=te(6),ie=0,oe=Math.random(),se=ne(1 .toString);ee.exports=function(ae){return"Symbol("+(ae===void 0?"":ae)+")_"+se(++ie+oe,36)}},function(ee,re,te){var ne=te(9),ie=te(17),oe=ne.document,se=ie(oe)&&ie(oe.createElement);ee.exports=function(ae){return se?oe.createElement(ae):{}}},function(ee,re,te){ee.exports=te(208)},function(ee,re,te){var ne=te(213);ee.exports=function(ie){var oe=+ie;return oe!=oe||oe===0?0:ne(oe)}},function(ee,re,te){var ne={};ne[te(8)("toStringTag")]="z",ee.exports=String(ne)==="[object z]"},function(ee,re,te){var ne=te(15),ie=te(129),oe=te(28),se=te(20),ae=te(27),ce=te(73);re.f=ne&&!ie?Object.defineProperties:function(ue,le){se(ue);for(var de,fe=ae(le),he=ce(le),pe=he.length,ge=0;pe>ge;)oe.f(ue,de=he[ge++],fe[de]);return ue}},function(ee,re,te){var ne=te(27),ie=te(114),oe=te(52),se=function(ae){return function(ce,ue,le){var de,fe=ne(ce),he=oe(fe),pe=ie(le,he);if(ae&&ue!=ue){for(;he>pe;)if((de=fe[pe++])!=de)return!0}else for(;he>pe;pe++)if((ae||pe in fe)&&fe[pe]===ue)return ae||pe||0;return!ae&&-1}};ee.exports={includes:se(!0),indexOf:se(!1)}},function(ee,re,te){var ne=te(110),ie=Math.max,oe=Math.min;ee.exports=function(se,ae){var ce=ne(se);return ce<0?ie(ce+ae,0):oe(ce,ae)}},function(ee,re){ee.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(ee,re,te){var ne=te(136),ie=te(115).concat("length","prototype");re.f=Object.getOwnPropertyNames||function(oe){return ne(oe,ie)}},function(ee,re,te){var ne=te(114),ie=te(52),oe=te(71),se=Array,ae=Math.max;ee.exports=function(ce,ue,le){for(var de=ie(ce),fe=ne(ue,de),he=ne(le===void 0?de:le,de),pe=se(ae(he-fe,0)),ge=0;fe<he;fe++,ge++)oe(pe,ge,ce[fe]);return pe.length=ge,pe}},function(ee,re,te){ee.exports=te(282)},function(ee,re,te){ee.exports=te(288)},function(ee,re,te){var ne=te(16),ie=TypeError;ee.exports=function(oe,se){if(ne(se,oe))return oe;throw ie("Incorrect invocation")}},function(ee,re){ee.exports=`
|
|
877
|
-
\v\f\r \u2028\u2029\uFEFF`},function(ee,re,te){ee.exports=te(428)},function(ee,re,te){var ne=te(203);ee.exports=ne},function(ee,re){var te;te=(function(){return this})();try{te=te||new Function("return this")()}catch{typeof window=="object"&&(te=window)}ee.exports=te},function(ee,re){var te=typeof document=="object"&&document.all,ne=te===void 0&&te!==void 0;ee.exports={all:te,IS_HTMLDDA:ne}},function(ee,re,te){var ne=te(55);ee.exports=ne&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(ee,re,te){var ne=te(15),ie=te(5),oe=te(108);ee.exports=!ne&&!ie((function(){return Object.defineProperty(oe("div"),"a",{get:function(){return 7}}).a!=7}))},function(ee,re,te){var ne=te(5),ie=te(10),oe=/#|\.prototype\./,se=function(de,fe){var he=ce[ae(de)];return he==le||he!=ue&&(ie(fe)?ne(fe):!!fe)},ae=se.normalize=function(de){return String(de).replace(oe,".").toLowerCase()},ce=se.data={},ue=se.NATIVE="N",le=se.POLYFILL="P";ee.exports=se},function(ee,re,te){var ne=te(15),ie=te(5);ee.exports=ne&&ie((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!=42}))},function(ee,re,te){var ne=te(87).default,ie=te(254);ee.exports=function(oe){var se=ie(oe,"string");return ne(se)==="symbol"?se:String(se)},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){var ne=te(1),ie=te(5),oe=te(56),se=te(17),ae=te(36),ce=te(52),ue=te(214),le=te(71),de=te(133),fe=te(89),he=te(8),pe=te(86),ge=he("isConcatSpreadable"),me=pe>=51||!ie((function(){var ve=[];return ve[ge]=!1,ve.concat()[0]!==ve})),ye=function(ve){if(!se(ve))return!1;var be=ve[ge];return be!==void 0?!!be:oe(ve)};ne({target:"Array",proto:!0,arity:1,forced:!me||!fe("concat")},{concat:function(ve){var be,_e,Ce,Te,Se,Re=ae(this),we=de(Re,0),Ae=0;for(be=-1,Ce=arguments.length;be<Ce;be++)if(ye(Se=be===-1?Re:arguments[be]))for(Te=ce(Se),ue(Ae+Te),_e=0;_e<Te;_e++,Ae++)_e in Se&&le(we,Ae,Se[_e]);else ue(Ae+1),le(we,Ae++,Se);return we.length=Ae,we}})},function(ee,re,te){var ne=te(110),ie=Math.min;ee.exports=function(oe){return oe>0?ie(ne(oe),9007199254740991):0}},function(ee,re,te){var ne=te(215);ee.exports=function(ie,oe){return new(ne(ie))(oe===0?0:oe)}},function(ee,re,te){var ne=te(6),ie=te(10),oe=te(106),se=ne(Function.toString);ie(oe.inspectSource)||(oe.inspectSource=function(ae){return se(ae)}),ee.exports=oe.inspectSource},function(ee,re,te){te(216),te(220),te(221),te(140),te(222)},function(ee,re,te){var ne=te(6),ie=te(13),oe=te(27),se=te(113).indexOf,ae=te(90),ce=ne([].push);ee.exports=function(ue,le){var de,fe=oe(ue),he=0,pe=[];for(de in fe)!ie(ae,de)&&ie(fe,de)&&ce(pe,de);for(;le.length>he;)ie(fe,de=le[he++])&&(~se(pe,de)||ce(pe,de));return pe}},function(ee,re,te){var ne=te(24);ee.exports=ne("document","documentElement")},function(ee,re,te){var ne=te(14),ie=te(24),oe=te(8),se=te(31);ee.exports=function(){var ae=ie("Symbol"),ce=ae&&ae.prototype,ue=ce&&ce.valueOf,le=oe("toPrimitive");ce&&!ce[le]&&se(ce,le,(function(de){return ne(ue,this)}),{arity:1})}},function(ee,re,te){var ne=te(55);ee.exports=ne&&!!Symbol.for&&!!Symbol.keyFor},function(ee,re,te){var ne=te(1),ie=te(24),oe=te(66),se=te(14),ae=te(6),ce=te(5),ue=te(56),le=te(10),de=te(17),fe=te(85),he=te(74),pe=te(55),ge=ie("JSON","stringify"),me=ae(/./.exec),ye=ae("".charAt),ve=ae("".charCodeAt),be=ae("".replace),_e=ae(1 .toString),Ce=/[\uD800-\uDFFF]/g,Te=/^[\uD800-\uDBFF]$/,Se=/^[\uDC00-\uDFFF]$/,Re=!pe||ce((function(){var Ne=ie("Symbol")();return ge([Ne])!="[null]"||ge({a:Ne})!="{}"||ge(Object(Ne))!="{}"})),we=ce((function(){return ge("\uDF06\uD834")!=='"\\udf06\\ud834"'||ge("\uDEAD")!=='"\\udead"'})),Ae=function(Ne,Ue){var Fe=he(arguments),Ve=Ue;if((de(Ue)||Ne!==void 0)&&!fe(Ne))return ue(Ue)||(Ue=function(He,ur){if(le(Ve)&&(ur=se(Ve,this,He,ur)),!fe(ur))return ur}),Fe[1]=Ue,oe(ge,null,Fe)},Oe=function(Ne,Ue,Fe){var Ve=ye(Fe,Ue-1),He=ye(Fe,Ue+1);return me(Te,Ne)&&!me(Se,He)||me(Se,Ne)&&!me(Te,Ve)?"\\u"+_e(ve(Ne,0),16):Ne};ge&&ne({target:"JSON",stat:!0,arity:3,forced:Re||we},{stringify:function(Ne,Ue,Fe){var Ve=he(arguments),He=oe(Re?Ae:ge,null,Ve);return we&&typeof He=="string"?be(He,Ce,Oe):He}})},function(ee,re,te){te(12)("iterator")},function(ee,re,te){var ne=te(12),ie=te(138);ne("toPrimitive"),ie()},function(ee,re){ee.exports=function(){}},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(26),se=te(145),ae=te(10),ce=te(146),ue=te(75),le=te(95),de=te(47),fe=te(37),he=te(31),pe=te(8),ge=te(59),me=te(147),ye=se.PROPER,ve=se.CONFIGURABLE,be=me.IteratorPrototype,_e=me.BUGGY_SAFARI_ITERATORS,Ce=pe("iterator"),Te=function(){return this};ee.exports=function(Se,Re,we,Ae,Oe,Ne,Ue){ce(we,Re,Ae);var Fe,Ve,He,ur=function(Cr){if(Cr===Oe&&Qe)return Qe;if(!_e&&Cr in fr)return fr[Cr];switch(Cr){case"keys":case"values":case"entries":return function(){return new we(this,Cr)}}return function(){return new we(this)}},qe=Re+" Iterator",hr=!1,fr=Se.prototype,dr=fr[Ce]||fr["@@iterator"]||Oe&&fr[Oe],Qe=!_e&&dr||ur(Oe),Bt=Re=="Array"&&fr.entries||dr;if(Bt&&(Fe=ue(Bt.call(new Se)))!==Object.prototype&&Fe.next&&(oe||ue(Fe)===be||(le?le(Fe,be):ae(Fe[Ce])||he(Fe,Ce,Te)),de(Fe,qe,!0,!0),oe&&(ge[qe]=Te)),ye&&Oe=="values"&&dr&&dr.name!=="values"&&(!oe&&ve?fe(fr,"name","values"):(hr=!0,Qe=function(){return ie(dr,this)})),Oe)if(Ve={values:ur("values"),keys:Ne?Qe:ur("keys"),entries:ur("entries")},Ue)for(He in Ve)(_e||hr||!(He in fr))&&he(fr,He,Ve[He]);else ne({target:Re,proto:!0,forced:_e||hr},Ve);return oe&&!Ue||fr[Ce]===Qe||he(fr,Ce,Qe,{name:Oe}),ge[Re]=Qe,Ve}},function(ee,re,te){var ne=te(15),ie=te(13),oe=Function.prototype,se=ne&&Object.getOwnPropertyDescriptor,ae=ie(oe,"name"),ce=ae&&(function(){}).name==="something",ue=ae&&(!ne||ne&&se(oe,"name").configurable);ee.exports={EXISTS:ae,PROPER:ce,CONFIGURABLE:ue}},function(ee,re,te){var ne=te(147).IteratorPrototype,ie=te(57),oe=te(45),se=te(47),ae=te(59),ce=function(){return this};ee.exports=function(ue,le,de,fe){var he=le+" Iterator";return ue.prototype=ie(ne,{next:oe(+!fe,de)}),se(ue,he,!1,!0),ae[he]=ce,ue}},function(ee,re,te){var ne,ie,oe,se=te(5),ae=te(10),ce=te(17),ue=te(57),le=te(75),de=te(31),fe=te(8),he=te(26),pe=fe("iterator"),ge=!1;[].keys&&("next"in(oe=[].keys())?(ie=le(le(oe)))!==Object.prototype&&(ne=ie):ge=!0),!ce(ne)||se((function(){var me={};return ne[pe].call(me)!==me}))?ne={}:he&&(ne=ue(ne)),ae(ne[pe])||de(ne,pe,(function(){return this})),ee.exports={IteratorPrototype:ne,BUGGY_SAFARI_ITERATORS:ge}},function(ee,re,te){var ne=te(5);ee.exports=!ne((function(){function ie(){}return ie.prototype.constructor=null,Object.getPrototypeOf(new ie)!==ie.prototype}))},function(ee,re){ee.exports=function(te,ne){return{value:te,done:ne}}},function(ee,re,te){var ne=te(6),ie=te(110),oe=te(29),se=te(54),ae=ne("".charAt),ce=ne("".charCodeAt),ue=ne("".slice),le=function(de){return function(fe,he){var pe,ge,me=oe(se(fe)),ye=ie(he),ve=me.length;return ye<0||ye>=ve?de?"":void 0:(pe=ce(me,ye))<55296||pe>56319||ye+1===ve||(ge=ce(me,ye+1))<56320||ge>57343?de?ae(me,ye):pe:de?ue(me,ye,ye+2):ge-56320+(pe-55296<<10)+65536}};ee.exports={codeAt:le(!1),charAt:le(!0)}},function(ee,re,te){var ne=te(24),ie=te(6),oe=te(116),se=te(92),ae=te(20),ce=ie([].concat);ee.exports=ne("Reflect","ownKeys")||function(ue){var le=oe.f(ae(ue)),de=se.f;return de?ce(le,de(ue)):le}},function(ee,re,te){te(39);var ne=te(38),ie=te(13),oe=te(16),se=te(268),ae=Array.prototype,ce={DOMTokenList:!0,NodeList:!0};ee.exports=function(ue){var le=ue.forEach;return ue===ae||oe(ae,ue)&&le===ae.forEach||ie(ce,ne(ue))?se:le}},function(ee,re,te){var ne=te(5);ee.exports=function(ie,oe){var se=[][ie];return!!se&&ne((function(){se.call(null,oe||function(){return 1},1)}))}},function(ee,re,te){var ne=te(272);ee.exports=ne},function(ee,re,te){var ne=te(278);ee.exports=ne},function(ee,re,te){var ne=te(279);ee.exports=ne},function(ee,re,te){ee.exports=te(296)},function(ee,re,te){ee.exports=te(302)},function(ee,re,te){var ne=te(305);ee.exports=ne},function(ee,re,te){var ne=te(15),ie=te(6),oe=te(14),se=te(5),ae=te(73),ce=te(92),ue=te(82),le=te(36),de=te(104),fe=Object.assign,he=Object.defineProperty,pe=ie([].concat);ee.exports=!fe||se((function(){if(ne&&fe({b:1},fe(he({},"a",{enumerable:!0,get:function(){he(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var ge={},me={},ye=Symbol();return ge[ye]=7,"abcdefghijklmnopqrst".split("").forEach((function(ve){me[ve]=ve})),fe({},ge)[ye]!=7||ae(fe({},me)).join("")!="abcdefghijklmnopqrst"}))?function(ge,me){for(var ye=le(ge),ve=arguments.length,be=1,_e=ce.f,Ce=ue.f;ve>be;)for(var Te,Se=de(arguments[be++]),Re=_e?pe(ae(Se),_e(Se)):ae(Se),we=Re.length,Ae=0;we>Ae;)Te=Re[Ae++],ne&&!oe(Ce,Se,Te)||(ye[Te]=Se[Te]);return ye}:fe},function(ee,re,te){var ne=te(321),ie=TypeError;ee.exports=function(oe){if(ne(oe))throw ie("The method doesn't accept regular expressions");return oe}},function(ee,re,te){var ne=te(8)("match");ee.exports=function(ie){var oe=/./;try{"/./"[ie](oe)}catch{try{return oe[ne]=!1,"/./"[ie](oe)}catch{}}return!1}},function(ee,re,te){ee.exports=te(338)},function(ee,re,te){var ne=te(349);ee.exports=ne},function(ee,re,te){var ne=te(46),ie=te(14),oe=te(36),se=te(351),ae=te(167),ce=te(88),ue=te(52),le=te(71),de=te(96),fe=te(76),he=Array;ee.exports=function(pe){var ge=oe(pe),me=ce(this),ye=arguments.length,ve=ye>1?arguments[1]:void 0,be=ve!==void 0;be&&(ve=ne(ve,ye>2?arguments[2]:void 0));var _e,Ce,Te,Se,Re,we,Ae=fe(ge),Oe=0;if(!Ae||this===he&&ae(Ae))for(_e=ue(ge),Ce=me?new this(_e):he(_e);_e>Oe;Oe++)we=be?ve(ge[Oe],Oe):ge[Oe],le(Ce,Oe,we);else for(Re=(Se=de(ge,Ae)).next,Ce=me?new this:[];!(Te=ie(Re,Se)).done;Oe++)we=be?se(Se,ve,[Te.value,Oe],!0):Te.value,le(Ce,Oe,we);return Ce.length=Oe,Ce}},function(ee,re,te){var ne=te(14),ie=te(20),oe=te(105);ee.exports=function(se,ae,ce){var ue,le;ie(se);try{if(!(ue=oe(se,"return"))){if(ae==="throw")throw ce;return ce}ue=ne(ue,se)}catch(de){le=!0,ue=de}if(ae==="throw")throw ce;if(le)throw ue;return ie(ue),ce}},function(ee,re,te){var ne=te(8),ie=te(59),oe=ne("iterator"),se=Array.prototype;ee.exports=function(ae){return ae!==void 0&&(ie.Array===ae||se[oe]===ae)}},function(ee,re,te){var ne=te(8)("iterator"),ie=!1;try{var oe=0,se={next:function(){return{done:!!oe++}},return:function(){ie=!0}};se[ne]=function(){return this},Array.from(se,(function(){throw 2}))}catch{}ee.exports=function(ae,ce){if(!ce&&!ie)return!1;var ue=!1;try{var le={};le[ne]=function(){return{next:function(){return{done:ue=!0}}}},ae(le)}catch{}return ue}},function(ee,re,te){ee.exports=te(363)},function(ee,re,te){var ne=te(366);te(39),ee.exports=ne},function(ee,re,te){te(367)},function(ee,re){var te,ne,ie=ee.exports={};function oe(){throw new Error("setTimeout has not been defined")}function se(){throw new Error("clearTimeout has not been defined")}function ae(me){if(te===setTimeout)return setTimeout(me,0);if((te===oe||!te)&&setTimeout)return te=setTimeout,setTimeout(me,0);try{return te(me,0)}catch{try{return te.call(null,me,0)}catch{return te.call(this,me,0)}}}(function(){try{te=typeof setTimeout=="function"?setTimeout:oe}catch{te=oe}try{ne=typeof clearTimeout=="function"?clearTimeout:se}catch{ne=se}})();var ce,ue=[],le=!1,de=-1;function fe(){le&&ce&&(le=!1,ce.length?ue=ce.concat(ue):de=-1,ue.length&&he())}function he(){if(!le){var me=ae(fe);le=!0;for(var ye=ue.length;ye;){for(ce=ue,ue=[];++de<ye;)ce&&ce[de].run();de=-1,ye=ue.length}ce=null,le=!1,(function(ve){if(ne===clearTimeout)return clearTimeout(ve);if((ne===se||!ne)&&clearTimeout)return ne=clearTimeout,clearTimeout(ve);try{ne(ve)}catch{try{return ne.call(null,ve)}catch{return ne.call(this,ve)}}})(me)}}function pe(me,ye){this.fun=me,this.array=ye}function ge(){}ie.nextTick=function(me){var ye=new Array(arguments.length-1);if(arguments.length>1)for(var ve=1;ve<arguments.length;ve++)ye[ve-1]=arguments[ve];ue.push(new pe(me,ye)),ue.length!==1||le||ae(he)},pe.prototype.run=function(){this.fun.apply(null,this.array)},ie.title="browser",ie.browser=!0,ie.env={},ie.argv=[],ie.version="",ie.versions={},ie.on=ge,ie.addListener=ge,ie.once=ge,ie.off=ge,ie.removeListener=ge,ie.removeAllListeners=ge,ie.emit=ge,ie.prependListener=ge,ie.prependOnceListener=ge,ie.listeners=function(me){return[]},ie.binding=function(me){throw new Error("process.binding is not supported")},ie.cwd=function(){return"/"},ie.chdir=function(me){throw new Error("process.chdir is not supported")},ie.umask=function(){return 0}},function(ee,re,te){var ne=te(20),ie=te(377),oe=te(83),se=te(8)("species");ee.exports=function(ae,ce){var ue,le=ne(ae).constructor;return le===void 0||oe(ue=ne(le)[se])?ce:ie(ue)}},function(ee,re,te){var ne,ie,oe,se,ae=te(9),ce=te(66),ue=te(46),le=te(10),de=te(13),fe=te(5),he=te(137),pe=te(74),ge=te(108),me=te(98),ye=te(175),ve=te(97),be=ae.setImmediate,_e=ae.clearImmediate,Ce=ae.process,Te=ae.Dispatch,Se=ae.Function,Re=ae.MessageChannel,we=ae.String,Ae=0,Oe={};fe((function(){ne=ae.location}));var Ne=function(He){if(de(Oe,He)){var ur=Oe[He];delete Oe[He],ur()}},Ue=function(He){return function(){Ne(He)}},Fe=function(He){Ne(He.data)},Ve=function(He){ae.postMessage(we(He),ne.protocol+"//"+ne.host)};be&&_e||(be=function(He){me(arguments.length,1);var ur=le(He)?He:Se(He),qe=pe(arguments,1);return Oe[++Ae]=function(){ce(ur,void 0,qe)},ie(Ae),Ae},_e=function(He){delete Oe[He]},ve?ie=function(He){Ce.nextTick(Ue(He))}:Te&&Te.now?ie=function(He){Te.now(Ue(He))}:Re&&!ye?(se=(oe=new Re).port2,oe.port1.onmessage=Fe,ie=ue(se.postMessage,se)):ae.addEventListener&&le(ae.postMessage)&&!ae.importScripts&&ne&&ne.protocol!=="file:"&&!fe(Ve)?(ie=Ve,ae.addEventListener("message",Fe,!1)):ie="onreadystatechange"in ge("script")?function(He){he.appendChild(ge("script")).onreadystatechange=function(){he.removeChild(this),Ne(He)}}:function(He){setTimeout(Ue(He),0)}),ee.exports={set:be,clear:_e}},function(ee,re,te){var ne=te(68);ee.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(ne)},function(ee,re){var te=function(){this.head=null,this.tail=null};te.prototype={add:function(ne){var ie={item:ne,next:null},oe=this.tail;oe?oe.next=ie:this.head=ie,this.tail=ie},get:function(){var ne=this.head;if(ne)return(this.head=ne.next)===null&&(this.tail=null),ne.item}},ee.exports=te},function(ee,re){ee.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},function(ee,re,te){var ne=te(20),ie=te(17),oe=te(49);ee.exports=function(se,ae){if(ne(se),ie(ae)&&ae.constructor===se)return ae;var ce=oe.f(se);return(0,ce.resolve)(ae),ce.promise}},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(30),se=te(49),ae=te(61),ce=te(77);ne({target:"Promise",stat:!0,forced:te(99)},{allSettled:function(ue){var le=this,de=se.f(le),fe=de.resolve,he=de.reject,pe=ae((function(){var ge=oe(le.resolve),me=[],ye=0,ve=1;ce(ue,(function(be){var _e=ye++,Ce=!1;ve++,ie(ge,le,be).then((function(Te){Ce||(Ce=!0,me[_e]={status:"fulfilled",value:Te},--ve||fe(me))}),(function(Te){Ce||(Ce=!0,me[_e]={status:"rejected",reason:Te},--ve||fe(me))}))})),--ve||fe(me)}));return pe.error&&he(pe.value),de.promise}})},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(30),se=te(24),ae=te(49),ce=te(61),ue=te(77),le=te(99);ne({target:"Promise",stat:!0,forced:le},{any:function(de){var fe=this,he=se("AggregateError"),pe=ae.f(fe),ge=pe.resolve,me=pe.reject,ye=ce((function(){var ve=oe(fe.resolve),be=[],_e=0,Ce=1,Te=!1;ue(de,(function(Se){var Re=_e++,we=!1;Ce++,ie(ve,fe,Se).then((function(Ae){we||Te||(Te=!0,ge(Ae))}),(function(Ae){we||Te||(we=!0,be[Re]=Ae,--Ce||me(new he(be,"No one promise resolved")))}))})),--Ce||me(new he(be,"No one promise resolved"))}));return ye.error&&me(ye.value),pe.promise}})},function(ee,re,te){var ne=te(6),ie=te(54),oe=te(29),se=te(121),ae=ne("".replace),ce="["+se+"]",ue=RegExp("^"+ce+ce+"*"),le=RegExp(ce+ce+"*$"),de=function(fe){return function(he){var pe=oe(ie(he));return 1&fe&&(pe=ae(pe,ue,"")),2&fe&&(pe=ae(pe,le,"")),pe}};ee.exports={start:de(1),end:de(2),trim:de(3)}},function(ee,re,te){var ne=te(415);ee.exports=ne},function(ee,re,te){te(184)},function(ee,re,te){te(48);var ne=te(1),ie=te(9),oe=te(14),se=te(6),ae=te(15),ce=te(185),ue=te(31),le=te(430),de=te(47),fe=te(146),he=te(58),pe=te(120),ge=te(10),me=te(13),ye=te(46),ve=te(38),be=te(20),_e=te(17),Ce=te(29),Te=te(57),Se=te(45),Re=te(96),we=te(76),Ae=te(98),Oe=te(8),Ne=te(431),Ue=Oe("iterator"),Fe=he.set,Ve=he.getterFor("URLSearchParams"),He=he.getterFor("URLSearchParamsIterator"),ur=Object.getOwnPropertyDescriptor,qe=function(Je){if(!ae)return ie[Je];var Tr=ur(ie,Je);return Tr&&Tr.value},hr=qe("fetch"),fr=qe("Request"),dr=qe("Headers"),Qe=fr&&fr.prototype,Bt=dr&&dr.prototype,Cr=ie.RegExp,$e=ie.TypeError,Le=ie.decodeURIComponent,We=ie.encodeURIComponent,mr=se("".charAt),lr=se([].join),Sr=se([].push),zr=se("".replace),$r=se([].shift),Yr=se([].splice),ei=se("".split),ai=se("".slice),Gr=/\+/g,Ye=Array(4),Ir=function(Je){return Ye[Je-1]||(Ye[Je-1]=Cr("((?:%[\\da-f]{2}){"+Je+"})","gi"))},Rr=function(Je){try{return Le(Je)}catch{return Je}},xr=function(Je){var Tr=zr(Je,Gr," "),Or=4;try{return Le(Tr)}catch{for(;Or;)Tr=zr(Tr,Ir(Or--),Rr);return Tr}},Br=/[!'()~]|%20/g,li={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ei=function(Je){return li[Je]},gi=function(Je){return zr(We(Je),Br,Ei)},ti=fe((function(Je,Tr){Fe(this,{type:"URLSearchParamsIterator",iterator:Re(Ve(Je).entries),kind:Tr})}),"Iterator",(function(){var Je=He(this),Tr=Je.kind,Or=Je.iterator.next(),Nr=Or.value;return Or.done||(Or.value=Tr==="keys"?Nr.key:Tr==="values"?Nr.value:[Nr.key,Nr.value]),Or}),!0),di=function(Je){this.entries=[],this.url=null,Je!==void 0&&(_e(Je)?this.parseObject(Je):this.parseQuery(typeof Je=="string"?mr(Je,0)==="?"?ai(Je,1):Je:Ce(Je)))};di.prototype={type:"URLSearchParams",bindURL:function(Je){this.url=Je,this.update()},parseObject:function(Je){var Tr,Or,Nr,jr,mi,Ii,Oi,Si=we(Je);if(Si)for(Or=(Tr=Re(Je,Si)).next;!(Nr=oe(Or,Tr)).done;){if(mi=(jr=Re(be(Nr.value))).next,(Ii=oe(mi,jr)).done||(Oi=oe(mi,jr)).done||!oe(mi,jr).done)throw $e("Expected sequence with length 2");Sr(this.entries,{key:Ce(Ii.value),value:Ce(Oi.value)})}else for(var Ni in Je)me(Je,Ni)&&Sr(this.entries,{key:Ni,value:Ce(Je[Ni])})},parseQuery:function(Je){if(Je)for(var Tr,Or,Nr=ei(Je,"&"),jr=0;jr<Nr.length;)(Tr=Nr[jr++]).length&&(Or=ei(Tr,"="),Sr(this.entries,{key:xr($r(Or)),value:xr(lr(Or,"="))}))},serialize:function(){for(var Je,Tr=this.entries,Or=[],Nr=0;Nr<Tr.length;)Je=Tr[Nr++],Sr(Or,gi(Je.key)+"="+gi(Je.value));return lr(Or,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Xr=function(){pe(this,Er);var Je=arguments.length>0?arguments[0]:void 0;Fe(this,new di(Je))},Er=Xr.prototype;if(le(Er,{append:function(Je,Tr){Ae(arguments.length,2);var Or=Ve(this);Sr(Or.entries,{key:Ce(Je),value:Ce(Tr)}),Or.updateURL()},delete:function(Je){Ae(arguments.length,1);for(var Tr=Ve(this),Or=Tr.entries,Nr=Ce(Je),jr=0;jr<Or.length;)Or[jr].key===Nr?Yr(Or,jr,1):jr++;Tr.updateURL()},get:function(Je){Ae(arguments.length,1);for(var Tr=Ve(this).entries,Or=Ce(Je),Nr=0;Nr<Tr.length;Nr++)if(Tr[Nr].key===Or)return Tr[Nr].value;return null},getAll:function(Je){Ae(arguments.length,1);for(var Tr=Ve(this).entries,Or=Ce(Je),Nr=[],jr=0;jr<Tr.length;jr++)Tr[jr].key===Or&&Sr(Nr,Tr[jr].value);return Nr},has:function(Je){Ae(arguments.length,1);for(var Tr=Ve(this).entries,Or=Ce(Je),Nr=0;Nr<Tr.length;)if(Tr[Nr++].key===Or)return!0;return!1},set:function(Je,Tr){Ae(arguments.length,1);for(var Or,Nr=Ve(this),jr=Nr.entries,mi=!1,Ii=Ce(Je),Oi=Ce(Tr),Si=0;Si<jr.length;Si++)(Or=jr[Si]).key===Ii&&(mi?Yr(jr,Si--,1):(mi=!0,Or.value=Oi));mi||Sr(jr,{key:Ii,value:Oi}),Nr.updateURL()},sort:function(){var Je=Ve(this);Ne(Je.entries,(function(Tr,Or){return Tr.key>Or.key?1:-1})),Je.updateURL()},forEach:function(Je){for(var Tr,Or=Ve(this).entries,Nr=ye(Je,arguments.length>1?arguments[1]:void 0),jr=0;jr<Or.length;)Nr((Tr=Or[jr++]).value,Tr.key,this)},keys:function(){return new ti(this,"keys")},values:function(){return new ti(this,"values")},entries:function(){return new ti(this,"entries")}},{enumerable:!0}),ue(Er,Ue,Er.entries,{name:"entries"}),ue(Er,"toString",(function(){return Ve(this).serialize()}),{enumerable:!0}),de(Xr,"URLSearchParams"),ne({global:!0,constructor:!0,forced:!ce},{URLSearchParams:Xr}),!ce&&ge(dr)){var Lr=se(Bt.has),Pr=se(Bt.set),Mr=function(Je){if(_e(Je)){var Tr,Or=Je.body;if(ve(Or)==="URLSearchParams")return Tr=Je.headers?new dr(Je.headers):new dr,Lr(Tr,"content-type")||Pr(Tr,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Te(Je,{body:Se(0,Ce(Or)),headers:Se(0,Tr)})}return Je};if(ge(hr)&&ne({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Je){return hr(Je,arguments.length>1?Mr(arguments[1]):{})}}),ge(fr)){var Zr=function(Je){return pe(this,Qe),new fr(Je,arguments.length>1?Mr(arguments[1]):{})};Qe.constructor=Zr,Zr.prototype=Qe,ne({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Zr})}}ee.exports={URLSearchParams:Xr,getState:Ve}},function(ee,re,te){var ne=te(5),ie=te(8),oe=te(26),se=ie("iterator");ee.exports=!ne((function(){var ae=new URL("b?a=1&b=2&c=3","http://a"),ce=ae.searchParams,ue="";return ae.pathname="c%20d",ce.forEach((function(le,de){ce.delete("b"),ue+=de+le})),oe&&!ae.toJSON||!ce.sort||ae.href!=="http://a/c%20d?a=1&c=3"||ce.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!ce[se]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||ue!=="a1c3"||new URL("http://x",void 0).host!=="x"}))},function(ee,re,te){var ne,ie=te(9),oe=te(66),se=te(10),ae=te(462),ce=te(68),ue=te(74),le=te(98),de=ie.Function,fe=/MSIE .\./.test(ce)||ae&&((ne=ie.Bun.version.split(".")).length<3||ne[0]==0&&(ne[1]<3||ne[1]==3&&ne[2]==0));ee.exports=function(he,pe){var ge=pe?2:1;return fe?function(me,ye){var ve=le(arguments.length,1)>ge,be=se(me)?me:de(me),_e=ve?ue(arguments,ge):[],Ce=ve?function(){oe(be,this,_e)}:be;return pe?he(Ce,ye):he(Ce)}:he}},function(ee,re,te){ee.exports=te(468)},function(ee,re,te){ee.exports=te(308)},function(ee,re,te){ee.exports=te(159)},function(ee,re,te){ee.exports=te(404)},function(ee,re,te){ee.exports=te(170)},function(module,exports$1,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
877
|
+
\v\f\r \u2028\u2029\uFEFF`},function(ee,re,te){ee.exports=te(428)},function(ee,re,te){var ne=te(203);ee.exports=ne},function(ee,re){var te;te=(function(){return this})();try{te=te||new Function("return this")()}catch{typeof window=="object"&&(te=window)}ee.exports=te},function(ee,re){var te=typeof document=="object"&&document.all,ne=te===void 0&&te!==void 0;ee.exports={all:te,IS_HTMLDDA:ne}},function(ee,re,te){var ne=te(55);ee.exports=ne&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(ee,re,te){var ne=te(15),ie=te(5),oe=te(108);ee.exports=!ne&&!ie((function(){return Object.defineProperty(oe("div"),"a",{get:function(){return 7}}).a!=7}))},function(ee,re,te){var ne=te(5),ie=te(10),oe=/#|\.prototype\./,se=function(de,fe){var he=ce[ae(de)];return he==le||he!=ue&&(ie(fe)?ne(fe):!!fe)},ae=se.normalize=function(de){return String(de).replace(oe,".").toLowerCase()},ce=se.data={},ue=se.NATIVE="N",le=se.POLYFILL="P";ee.exports=se},function(ee,re,te){var ne=te(15),ie=te(5);ee.exports=ne&&ie((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!=42}))},function(ee,re,te){var ne=te(87).default,ie=te(254);ee.exports=function(oe){var se=ie(oe,"string");return ne(se)==="symbol"?se:String(se)},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){var ne=te(1),ie=te(5),oe=te(56),se=te(17),ae=te(36),ce=te(52),ue=te(214),le=te(71),de=te(133),fe=te(89),he=te(8),pe=te(86),ge=he("isConcatSpreadable"),me=pe>=51||!ie((function(){var ve=[];return ve[ge]=!1,ve.concat()[0]!==ve})),ye=function(ve){if(!se(ve))return!1;var be=ve[ge];return be!==void 0?!!be:oe(ve)};ne({target:"Array",proto:!0,arity:1,forced:!me||!fe("concat")},{concat:function(ve){var be,_e,Ce,Te,Se,Re=ae(this),we=de(Re,0),Ae=0;for(be=-1,Ce=arguments.length;be<Ce;be++)if(ye(Se=be===-1?Re:arguments[be]))for(Te=ce(Se),ue(Ae+Te),_e=0;_e<Te;_e++,Ae++)_e in Se&&le(we,Ae,Se[_e]);else ue(Ae+1),le(we,Ae++,Se);return we.length=Ae,we}})},function(ee,re,te){var ne=te(110),ie=Math.min;ee.exports=function(oe){return oe>0?ie(ne(oe),9007199254740991):0}},function(ee,re,te){var ne=te(215);ee.exports=function(ie,oe){return new(ne(ie))(oe===0?0:oe)}},function(ee,re,te){var ne=te(6),ie=te(10),oe=te(106),se=ne(Function.toString);ie(oe.inspectSource)||(oe.inspectSource=function(ae){return se(ae)}),ee.exports=oe.inspectSource},function(ee,re,te){te(216),te(220),te(221),te(140),te(222)},function(ee,re,te){var ne=te(6),ie=te(13),oe=te(27),se=te(113).indexOf,ae=te(90),ce=ne([].push);ee.exports=function(ue,le){var de,fe=oe(ue),he=0,pe=[];for(de in fe)!ie(ae,de)&&ie(fe,de)&&ce(pe,de);for(;le.length>he;)ie(fe,de=le[he++])&&(~se(pe,de)||ce(pe,de));return pe}},function(ee,re,te){var ne=te(24);ee.exports=ne("document","documentElement")},function(ee,re,te){var ne=te(14),ie=te(24),oe=te(8),se=te(31);ee.exports=function(){var ae=ie("Symbol"),ce=ae&&ae.prototype,ue=ce&&ce.valueOf,le=oe("toPrimitive");ce&&!ce[le]&&se(ce,le,(function(de){return ne(ue,this)}),{arity:1})}},function(ee,re,te){var ne=te(55);ee.exports=ne&&!!Symbol.for&&!!Symbol.keyFor},function(ee,re,te){var ne=te(1),ie=te(24),oe=te(66),se=te(14),ae=te(6),ce=te(5),ue=te(56),le=te(10),de=te(17),fe=te(85),he=te(74),pe=te(55),ge=ie("JSON","stringify"),me=ae(/./.exec),ye=ae("".charAt),ve=ae("".charCodeAt),be=ae("".replace),_e=ae(1 .toString),Ce=/[\uD800-\uDFFF]/g,Te=/^[\uD800-\uDBFF]$/,Se=/^[\uDC00-\uDFFF]$/,Re=!pe||ce((function(){var Ne=ie("Symbol")();return ge([Ne])!="[null]"||ge({a:Ne})!="{}"||ge(Object(Ne))!="{}"})),we=ce((function(){return ge("\uDF06\uD834")!=='"\\udf06\\ud834"'||ge("\uDEAD")!=='"\\udead"'})),Ae=function(Ne,Ue){var Fe=he(arguments),Ve=Ue;if((de(Ue)||Ne!==void 0)&&!fe(Ne))return ue(Ue)||(Ue=function(He,ur){if(le(Ve)&&(ur=se(Ve,this,He,ur)),!fe(ur))return ur}),Fe[1]=Ue,oe(ge,null,Fe)},Oe=function(Ne,Ue,Fe){var Ve=ye(Fe,Ue-1),He=ye(Fe,Ue+1);return me(Te,Ne)&&!me(Se,He)||me(Se,Ne)&&!me(Te,Ve)?"\\u"+_e(ve(Ne,0),16):Ne};ge&&ne({target:"JSON",stat:!0,arity:3,forced:Re||we},{stringify:function(Ne,Ue,Fe){var Ve=he(arguments),He=oe(Re?Ae:ge,null,Ve);return we&&typeof He=="string"?be(He,Ce,Oe):He}})},function(ee,re,te){te(12)("iterator")},function(ee,re,te){var ne=te(12),ie=te(138);ne("toPrimitive"),ie()},function(ee,re){ee.exports=function(){}},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(26),se=te(145),ae=te(10),ce=te(146),ue=te(75),le=te(95),de=te(47),fe=te(37),he=te(31),pe=te(8),ge=te(59),me=te(147),ye=se.PROPER,ve=se.CONFIGURABLE,be=me.IteratorPrototype,_e=me.BUGGY_SAFARI_ITERATORS,Ce=pe("iterator"),Te=function(){return this};ee.exports=function(Se,Re,we,Ae,Oe,Ne,Ue){ce(we,Re,Ae);var Fe,Ve,He,ur=function(Cr){if(Cr===Oe&&Qe)return Qe;if(!_e&&Cr in fr)return fr[Cr];switch(Cr){case"keys":case"values":case"entries":return function(){return new we(this,Cr)}}return function(){return new we(this)}},qe=Re+" Iterator",hr=!1,fr=Se.prototype,dr=fr[Ce]||fr["@@iterator"]||Oe&&fr[Oe],Qe=!_e&&dr||ur(Oe),Bt=Re=="Array"&&fr.entries||dr;if(Bt&&(Fe=ue(Bt.call(new Se)))!==Object.prototype&&Fe.next&&(oe||ue(Fe)===be||(le?le(Fe,be):ae(Fe[Ce])||he(Fe,Ce,Te)),de(Fe,qe,!0,!0),oe&&(ge[qe]=Te)),ye&&Oe=="values"&&dr&&dr.name!=="values"&&(!oe&&ve?fe(fr,"name","values"):(hr=!0,Qe=function(){return ie(dr,this)})),Oe)if(Ve={values:ur("values"),keys:Ne?Qe:ur("keys"),entries:ur("entries")},Ue)for(He in Ve)(_e||hr||!(He in fr))&&he(fr,He,Ve[He]);else ne({target:Re,proto:!0,forced:_e||hr},Ve);return oe&&!Ue||fr[Ce]===Qe||he(fr,Ce,Qe,{name:Oe}),ge[Re]=Qe,Ve}},function(ee,re,te){var ne=te(15),ie=te(13),oe=Function.prototype,se=ne&&Object.getOwnPropertyDescriptor,ae=ie(oe,"name"),ce=ae&&(function(){}).name==="something",ue=ae&&(!ne||ne&&se(oe,"name").configurable);ee.exports={EXISTS:ae,PROPER:ce,CONFIGURABLE:ue}},function(ee,re,te){var ne=te(147).IteratorPrototype,ie=te(57),oe=te(45),se=te(47),ae=te(59),ce=function(){return this};ee.exports=function(ue,le,de,fe){var he=le+" Iterator";return ue.prototype=ie(ne,{next:oe(+!fe,de)}),se(ue,he,!1,!0),ae[he]=ce,ue}},function(ee,re,te){var ne,ie,oe,se=te(5),ae=te(10),ce=te(17),ue=te(57),le=te(75),de=te(31),fe=te(8),he=te(26),pe=fe("iterator"),ge=!1;[].keys&&("next"in(oe=[].keys())?(ie=le(le(oe)))!==Object.prototype&&(ne=ie):ge=!0),!ce(ne)||se((function(){var me={};return ne[pe].call(me)!==me}))?ne={}:he&&(ne=ue(ne)),ae(ne[pe])||de(ne,pe,(function(){return this})),ee.exports={IteratorPrototype:ne,BUGGY_SAFARI_ITERATORS:ge}},function(ee,re,te){var ne=te(5);ee.exports=!ne((function(){function ie(){}return ie.prototype.constructor=null,Object.getPrototypeOf(new ie)!==ie.prototype}))},function(ee,re){ee.exports=function(te,ne){return{value:te,done:ne}}},function(ee,re,te){var ne=te(6),ie=te(110),oe=te(29),se=te(54),ae=ne("".charAt),ce=ne("".charCodeAt),ue=ne("".slice),le=function(de){return function(fe,he){var pe,ge,me=oe(se(fe)),ye=ie(he),ve=me.length;return ye<0||ye>=ve?de?"":void 0:(pe=ce(me,ye))<55296||pe>56319||ye+1===ve||(ge=ce(me,ye+1))<56320||ge>57343?de?ae(me,ye):pe:de?ue(me,ye,ye+2):ge-56320+(pe-55296<<10)+65536}};ee.exports={codeAt:le(!1),charAt:le(!0)}},function(ee,re,te){var ne=te(24),ie=te(6),oe=te(116),se=te(92),ae=te(20),ce=ie([].concat);ee.exports=ne("Reflect","ownKeys")||function(ue){var le=oe.f(ae(ue)),de=se.f;return de?ce(le,de(ue)):le}},function(ee,re,te){te(39);var ne=te(38),ie=te(13),oe=te(16),se=te(268),ae=Array.prototype,ce={DOMTokenList:!0,NodeList:!0};ee.exports=function(ue){var le=ue.forEach;return ue===ae||oe(ae,ue)&&le===ae.forEach||ie(ce,ne(ue))?se:le}},function(ee,re,te){var ne=te(5);ee.exports=function(ie,oe){var se=[][ie];return!!se&&ne((function(){se.call(null,oe||function(){return 1},1)}))}},function(ee,re,te){var ne=te(272);ee.exports=ne},function(ee,re,te){var ne=te(278);ee.exports=ne},function(ee,re,te){var ne=te(279);ee.exports=ne},function(ee,re,te){ee.exports=te(296)},function(ee,re,te){ee.exports=te(302)},function(ee,re,te){var ne=te(305);ee.exports=ne},function(ee,re,te){var ne=te(15),ie=te(6),oe=te(14),se=te(5),ae=te(73),ce=te(92),ue=te(82),le=te(36),de=te(104),fe=Object.assign,he=Object.defineProperty,pe=ie([].concat);ee.exports=!fe||se((function(){if(ne&&fe({b:1},fe(he({},"a",{enumerable:!0,get:function(){he(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var ge={},me={},ye=Symbol();return ge[ye]=7,"abcdefghijklmnopqrst".split("").forEach((function(ve){me[ve]=ve})),fe({},ge)[ye]!=7||ae(fe({},me)).join("")!="abcdefghijklmnopqrst"}))?function(ge,me){for(var ye=le(ge),ve=arguments.length,be=1,_e=ce.f,Ce=ue.f;ve>be;)for(var Te,Se=de(arguments[be++]),Re=_e?pe(ae(Se),_e(Se)):ae(Se),we=Re.length,Ae=0;we>Ae;)Te=Re[Ae++],ne&&!oe(Ce,Se,Te)||(ye[Te]=Se[Te]);return ye}:fe},function(ee,re,te){var ne=te(321),ie=TypeError;ee.exports=function(oe){if(ne(oe))throw ie("The method doesn't accept regular expressions");return oe}},function(ee,re,te){var ne=te(8)("match");ee.exports=function(ie){var oe=/./;try{"/./"[ie](oe)}catch{try{return oe[ne]=!1,"/./"[ie](oe)}catch{}}return!1}},function(ee,re,te){ee.exports=te(338)},function(ee,re,te){var ne=te(349);ee.exports=ne},function(ee,re,te){var ne=te(46),ie=te(14),oe=te(36),se=te(351),ae=te(167),ce=te(88),ue=te(52),le=te(71),de=te(96),fe=te(76),he=Array;ee.exports=function(pe){var ge=oe(pe),me=ce(this),ye=arguments.length,ve=ye>1?arguments[1]:void 0,be=ve!==void 0;be&&(ve=ne(ve,ye>2?arguments[2]:void 0));var _e,Ce,Te,Se,Re,we,Ae=fe(ge),Oe=0;if(!Ae||this===he&&ae(Ae))for(_e=ue(ge),Ce=me?new this(_e):he(_e);_e>Oe;Oe++)we=be?ve(ge[Oe],Oe):ge[Oe],le(Ce,Oe,we);else for(Re=(Se=de(ge,Ae)).next,Ce=me?new this:[];!(Te=ie(Re,Se)).done;Oe++)we=be?se(Se,ve,[Te.value,Oe],!0):Te.value,le(Ce,Oe,we);return Ce.length=Oe,Ce}},function(ee,re,te){var ne=te(14),ie=te(20),oe=te(105);ee.exports=function(se,ae,ce){var ue,le;ie(se);try{if(!(ue=oe(se,"return"))){if(ae==="throw")throw ce;return ce}ue=ne(ue,se)}catch(de){le=!0,ue=de}if(ae==="throw")throw ce;if(le)throw ue;return ie(ue),ce}},function(ee,re,te){var ne=te(8),ie=te(59),oe=ne("iterator"),se=Array.prototype;ee.exports=function(ae){return ae!==void 0&&(ie.Array===ae||se[oe]===ae)}},function(ee,re,te){var ne=te(8)("iterator"),ie=!1;try{var oe=0,se={next:function(){return{done:!!oe++}},return:function(){ie=!0}};se[ne]=function(){return this},Array.from(se,(function(){throw 2}))}catch{}ee.exports=function(ae,ce){if(!ce&&!ie)return!1;var ue=!1;try{var le={};le[ne]=function(){return{next:function(){return{done:ue=!0}}}},ae(le)}catch{}return ue}},function(ee,re,te){ee.exports=te(363)},function(ee,re,te){var ne=te(366);te(39),ee.exports=ne},function(ee,re,te){te(367)},function(ee,re){var te,ne,ie=ee.exports={};function oe(){throw new Error("setTimeout has not been defined")}function se(){throw new Error("clearTimeout has not been defined")}function ae(me){if(te===setTimeout)return setTimeout(me,0);if((te===oe||!te)&&setTimeout)return te=setTimeout,setTimeout(me,0);try{return te(me,0)}catch{try{return te.call(null,me,0)}catch{return te.call(this,me,0)}}}(function(){try{te=typeof setTimeout=="function"?setTimeout:oe}catch{te=oe}try{ne=typeof clearTimeout=="function"?clearTimeout:se}catch{ne=se}})();var ce,ue=[],le=!1,de=-1;function fe(){le&&ce&&(le=!1,ce.length?ue=ce.concat(ue):de=-1,ue.length&&he())}function he(){if(!le){var me=ae(fe);le=!0;for(var ye=ue.length;ye;){for(ce=ue,ue=[];++de<ye;)ce&&ce[de].run();de=-1,ye=ue.length}ce=null,le=!1,(function(ve){if(ne===clearTimeout)return clearTimeout(ve);if((ne===se||!ne)&&clearTimeout)return ne=clearTimeout,clearTimeout(ve);try{ne(ve)}catch{try{return ne.call(null,ve)}catch{return ne.call(this,ve)}}})(me)}}function pe(me,ye){this.fun=me,this.array=ye}function ge(){}ie.nextTick=function(me){var ye=new Array(arguments.length-1);if(arguments.length>1)for(var ve=1;ve<arguments.length;ve++)ye[ve-1]=arguments[ve];ue.push(new pe(me,ye)),ue.length!==1||le||ae(he)},pe.prototype.run=function(){this.fun.apply(null,this.array)},ie.title="browser",ie.browser=!0,ie.env={},ie.argv=[],ie.version="",ie.versions={},ie.on=ge,ie.addListener=ge,ie.once=ge,ie.off=ge,ie.removeListener=ge,ie.removeAllListeners=ge,ie.emit=ge,ie.prependListener=ge,ie.prependOnceListener=ge,ie.listeners=function(me){return[]},ie.binding=function(me){throw new Error("process.binding is not supported")},ie.cwd=function(){return"/"},ie.chdir=function(me){throw new Error("process.chdir is not supported")},ie.umask=function(){return 0}},function(ee,re,te){var ne=te(20),ie=te(377),oe=te(83),se=te(8)("species");ee.exports=function(ae,ce){var ue,le=ne(ae).constructor;return le===void 0||oe(ue=ne(le)[se])?ce:ie(ue)}},function(ee,re,te){var ne,ie,oe,se,ae=te(9),ce=te(66),ue=te(46),le=te(10),de=te(13),fe=te(5),he=te(137),pe=te(74),ge=te(108),me=te(98),ye=te(175),ve=te(97),be=ae.setImmediate,_e=ae.clearImmediate,Ce=ae.process,Te=ae.Dispatch,Se=ae.Function,Re=ae.MessageChannel,we=ae.String,Ae=0,Oe={};fe((function(){ne=ae.location}));var Ne=function(He){if(de(Oe,He)){var ur=Oe[He];delete Oe[He],ur()}},Ue=function(He){return function(){Ne(He)}},Fe=function(He){Ne(He.data)},Ve=function(He){ae.postMessage(we(He),ne.protocol+"//"+ne.host)};be&&_e||(be=function(He){me(arguments.length,1);var ur=le(He)?He:Se(He),qe=pe(arguments,1);return Oe[++Ae]=function(){ce(ur,void 0,qe)},ie(Ae),Ae},_e=function(He){delete Oe[He]},ve?ie=function(He){Ce.nextTick(Ue(He))}:Te&&Te.now?ie=function(He){Te.now(Ue(He))}:Re&&!ye?(se=(oe=new Re).port2,oe.port1.onmessage=Fe,ie=ue(se.postMessage,se)):ae.addEventListener&&le(ae.postMessage)&&!ae.importScripts&&ne&&ne.protocol!=="file:"&&!fe(Ve)?(ie=Ve,ae.addEventListener("message",Fe,!1)):ie="onreadystatechange"in ge("script")?function(He){he.appendChild(ge("script")).onreadystatechange=function(){he.removeChild(this),Ne(He)}}:function(He){setTimeout(Ue(He),0)}),ee.exports={set:be,clear:_e}},function(ee,re,te){var ne=te(68);ee.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(ne)},function(ee,re){var te=function(){this.head=null,this.tail=null};te.prototype={add:function(ne){var ie={item:ne,next:null},oe=this.tail;oe?oe.next=ie:this.head=ie,this.tail=ie},get:function(){var ne=this.head;if(ne)return(this.head=ne.next)===null&&(this.tail=null),ne.item}},ee.exports=te},function(ee,re){ee.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},function(ee,re,te){var ne=te(20),ie=te(17),oe=te(49);ee.exports=function(se,ae){if(ne(se),ie(ae)&&ae.constructor===se)return ae;var ce=oe.f(se);return(0,ce.resolve)(ae),ce.promise}},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(30),se=te(49),ae=te(61),ce=te(77);ne({target:"Promise",stat:!0,forced:te(99)},{allSettled:function(ue){var le=this,de=se.f(le),fe=de.resolve,he=de.reject,pe=ae((function(){var ge=oe(le.resolve),me=[],ye=0,ve=1;ce(ue,(function(be){var _e=ye++,Ce=!1;ve++,ie(ge,le,be).then((function(Te){Ce||(Ce=!0,me[_e]={status:"fulfilled",value:Te},--ve||fe(me))}),(function(Te){Ce||(Ce=!0,me[_e]={status:"rejected",reason:Te},--ve||fe(me))}))})),--ve||fe(me)}));return pe.error&&he(pe.value),de.promise}})},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(30),se=te(24),ae=te(49),ce=te(61),ue=te(77),le=te(99);ne({target:"Promise",stat:!0,forced:le},{any:function(de){var fe=this,he=se("AggregateError"),pe=ae.f(fe),ge=pe.resolve,me=pe.reject,ye=ce((function(){var ve=oe(fe.resolve),be=[],_e=0,Ce=1,Te=!1;ue(de,(function(Se){var Re=_e++,we=!1;Ce++,ie(ve,fe,Se).then((function(Ae){we||Te||(Te=!0,ge(Ae))}),(function(Ae){we||Te||(we=!0,be[Re]=Ae,--Ce||me(new he(be,"No one promise resolved")))}))})),--Ce||me(new he(be,"No one promise resolved"))}));return ye.error&&me(ye.value),pe.promise}})},function(ee,re,te){var ne=te(6),ie=te(54),oe=te(29),se=te(121),ae=ne("".replace),ce="["+se+"]",ue=RegExp("^"+ce+ce+"*"),le=RegExp(ce+ce+"*$"),de=function(fe){return function(he){var pe=oe(ie(he));return 1&fe&&(pe=ae(pe,ue,"")),2&fe&&(pe=ae(pe,le,"")),pe}};ee.exports={start:de(1),end:de(2),trim:de(3)}},function(ee,re,te){var ne=te(415);ee.exports=ne},function(ee,re,te){te(184)},function(ee,re,te){te(48);var ne=te(1),ie=te(9),oe=te(14),se=te(6),ae=te(15),ce=te(185),ue=te(31),le=te(430),de=te(47),fe=te(146),he=te(58),pe=te(120),ge=te(10),me=te(13),ye=te(46),ve=te(38),be=te(20),_e=te(17),Ce=te(29),Te=te(57),Se=te(45),Re=te(96),we=te(76),Ae=te(98),Oe=te(8),Ne=te(431),Ue=Oe("iterator"),Fe=he.set,Ve=he.getterFor("URLSearchParams"),He=he.getterFor("URLSearchParamsIterator"),ur=Object.getOwnPropertyDescriptor,qe=function(Ze){if(!ae)return ie[Ze];var Tr=ur(ie,Ze);return Tr&&Tr.value},hr=qe("fetch"),fr=qe("Request"),dr=qe("Headers"),Qe=fr&&fr.prototype,Bt=dr&&dr.prototype,Cr=ie.RegExp,$e=ie.TypeError,Le=ie.decodeURIComponent,We=ie.encodeURIComponent,mr=se("".charAt),lr=se([].join),Sr=se([].push),zr=se("".replace),$r=se([].shift),Yr=se([].splice),ei=se("".split),ai=se("".slice),Gr=/\+/g,Ye=Array(4),Ir=function(Ze){return Ye[Ze-1]||(Ye[Ze-1]=Cr("((?:%[\\da-f]{2}){"+Ze+"})","gi"))},Rr=function(Ze){try{return Le(Ze)}catch{return Ze}},xr=function(Ze){var Tr=zr(Ze,Gr," "),Or=4;try{return Le(Tr)}catch{for(;Or;)Tr=zr(Tr,Ir(Or--),Rr);return Tr}},Br=/[!'()~]|%20/g,li={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ei=function(Ze){return li[Ze]},gi=function(Ze){return zr(We(Ze),Br,Ei)},ti=fe((function(Ze,Tr){Fe(this,{type:"URLSearchParamsIterator",iterator:Re(Ve(Ze).entries),kind:Tr})}),"Iterator",(function(){var Ze=He(this),Tr=Ze.kind,Or=Ze.iterator.next(),Nr=Or.value;return Or.done||(Or.value=Tr==="keys"?Nr.key:Tr==="values"?Nr.value:[Nr.key,Nr.value]),Or}),!0),di=function(Ze){this.entries=[],this.url=null,Ze!==void 0&&(_e(Ze)?this.parseObject(Ze):this.parseQuery(typeof Ze=="string"?mr(Ze,0)==="?"?ai(Ze,1):Ze:Ce(Ze)))};di.prototype={type:"URLSearchParams",bindURL:function(Ze){this.url=Ze,this.update()},parseObject:function(Ze){var Tr,Or,Nr,jr,mi,Ii,Oi,Si=we(Ze);if(Si)for(Or=(Tr=Re(Ze,Si)).next;!(Nr=oe(Or,Tr)).done;){if(mi=(jr=Re(be(Nr.value))).next,(Ii=oe(mi,jr)).done||(Oi=oe(mi,jr)).done||!oe(mi,jr).done)throw $e("Expected sequence with length 2");Sr(this.entries,{key:Ce(Ii.value),value:Ce(Oi.value)})}else for(var Ni in Ze)me(Ze,Ni)&&Sr(this.entries,{key:Ni,value:Ce(Ze[Ni])})},parseQuery:function(Ze){if(Ze)for(var Tr,Or,Nr=ei(Ze,"&"),jr=0;jr<Nr.length;)(Tr=Nr[jr++]).length&&(Or=ei(Tr,"="),Sr(this.entries,{key:xr($r(Or)),value:xr(lr(Or,"="))}))},serialize:function(){for(var Ze,Tr=this.entries,Or=[],Nr=0;Nr<Tr.length;)Ze=Tr[Nr++],Sr(Or,gi(Ze.key)+"="+gi(Ze.value));return lr(Or,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Xr=function(){pe(this,Er);var Ze=arguments.length>0?arguments[0]:void 0;Fe(this,new di(Ze))},Er=Xr.prototype;if(le(Er,{append:function(Ze,Tr){Ae(arguments.length,2);var Or=Ve(this);Sr(Or.entries,{key:Ce(Ze),value:Ce(Tr)}),Or.updateURL()},delete:function(Ze){Ae(arguments.length,1);for(var Tr=Ve(this),Or=Tr.entries,Nr=Ce(Ze),jr=0;jr<Or.length;)Or[jr].key===Nr?Yr(Or,jr,1):jr++;Tr.updateURL()},get:function(Ze){Ae(arguments.length,1);for(var Tr=Ve(this).entries,Or=Ce(Ze),Nr=0;Nr<Tr.length;Nr++)if(Tr[Nr].key===Or)return Tr[Nr].value;return null},getAll:function(Ze){Ae(arguments.length,1);for(var Tr=Ve(this).entries,Or=Ce(Ze),Nr=[],jr=0;jr<Tr.length;jr++)Tr[jr].key===Or&&Sr(Nr,Tr[jr].value);return Nr},has:function(Ze){Ae(arguments.length,1);for(var Tr=Ve(this).entries,Or=Ce(Ze),Nr=0;Nr<Tr.length;)if(Tr[Nr++].key===Or)return!0;return!1},set:function(Ze,Tr){Ae(arguments.length,1);for(var Or,Nr=Ve(this),jr=Nr.entries,mi=!1,Ii=Ce(Ze),Oi=Ce(Tr),Si=0;Si<jr.length;Si++)(Or=jr[Si]).key===Ii&&(mi?Yr(jr,Si--,1):(mi=!0,Or.value=Oi));mi||Sr(jr,{key:Ii,value:Oi}),Nr.updateURL()},sort:function(){var Ze=Ve(this);Ne(Ze.entries,(function(Tr,Or){return Tr.key>Or.key?1:-1})),Ze.updateURL()},forEach:function(Ze){for(var Tr,Or=Ve(this).entries,Nr=ye(Ze,arguments.length>1?arguments[1]:void 0),jr=0;jr<Or.length;)Nr((Tr=Or[jr++]).value,Tr.key,this)},keys:function(){return new ti(this,"keys")},values:function(){return new ti(this,"values")},entries:function(){return new ti(this,"entries")}},{enumerable:!0}),ue(Er,Ue,Er.entries,{name:"entries"}),ue(Er,"toString",(function(){return Ve(this).serialize()}),{enumerable:!0}),de(Xr,"URLSearchParams"),ne({global:!0,constructor:!0,forced:!ce},{URLSearchParams:Xr}),!ce&&ge(dr)){var Lr=se(Bt.has),Pr=se(Bt.set),Mr=function(Ze){if(_e(Ze)){var Tr,Or=Ze.body;if(ve(Or)==="URLSearchParams")return Tr=Ze.headers?new dr(Ze.headers):new dr,Lr(Tr,"content-type")||Pr(Tr,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Te(Ze,{body:Se(0,Ce(Or)),headers:Se(0,Tr)})}return Ze};if(ge(hr)&&ne({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Ze){return hr(Ze,arguments.length>1?Mr(arguments[1]):{})}}),ge(fr)){var Jr=function(Ze){return pe(this,Qe),new fr(Ze,arguments.length>1?Mr(arguments[1]):{})};Qe.constructor=Jr,Jr.prototype=Qe,ne({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Jr})}}ee.exports={URLSearchParams:Xr,getState:Ve}},function(ee,re,te){var ne=te(5),ie=te(8),oe=te(26),se=ie("iterator");ee.exports=!ne((function(){var ae=new URL("b?a=1&b=2&c=3","http://a"),ce=ae.searchParams,ue="";return ae.pathname="c%20d",ce.forEach((function(le,de){ce.delete("b"),ue+=de+le})),oe&&!ae.toJSON||!ce.sort||ae.href!=="http://a/c%20d?a=1&c=3"||ce.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!ce[se]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||ue!=="a1c3"||new URL("http://x",void 0).host!=="x"}))},function(ee,re,te){var ne,ie=te(9),oe=te(66),se=te(10),ae=te(462),ce=te(68),ue=te(74),le=te(98),de=ie.Function,fe=/MSIE .\./.test(ce)||ae&&((ne=ie.Bun.version.split(".")).length<3||ne[0]==0&&(ne[1]<3||ne[1]==3&&ne[2]==0));ee.exports=function(he,pe){var ge=pe?2:1;return fe?function(me,ye){var ve=le(arguments.length,1)>ge,be=se(me)?me:de(me),_e=ve?ue(arguments,ge):[],Ce=ve?function(){oe(be,this,_e)}:be;return pe?he(Ce,ye):he(Ce)}:he}},function(ee,re,te){ee.exports=te(468)},function(ee,re,te){ee.exports=te(308)},function(ee,re,te){ee.exports=te(159)},function(ee,re,te){ee.exports=te(404)},function(ee,re,te){ee.exports=te(170)},function(module,exports$1,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
878
878
|
* [js-sha1]{@link https://github.com/emn178/js-sha1}
|
|
879
879
|
*
|
|
880
880
|
* @version 0.6.0
|
|
881
881
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
882
882
|
* @copyright Chen, Yi-Cyuan 2014-2017
|
|
883
883
|
* @license MIT
|
|
884
|
-
*/(function(){var root=typeof window=="object"?window:{},NODE_JS=!root.JS_SHA1_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS&&(root=global);var COMMON_JS=!root.JS_SHA1_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=__webpack_require__(423),HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[],createOutputMethod=function(ee){return function(re){return new Sha1(!0).update(re)[ee]()}},createMethod=function(){var ee=createOutputMethod("hex");NODE_JS&&(ee=nodeWrap(ee)),ee.create=function(){return new Sha1},ee.update=function(ne){return ee.create().update(ne)};for(var re=0;re<OUTPUT_TYPES.length;++re){var te=OUTPUT_TYPES[re];ee[te]=createOutputMethod(te)}return ee},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(ee){if(typeof ee=="string")return crypto.createHash("sha1").update(ee,"utf8").digest("hex");if(ee.constructor===ArrayBuffer)ee=new Uint8Array(ee);else if(ee.length===void 0)return method(ee);return crypto.createHash("sha1").update(new Buffer(ee)).digest("hex")};return nodeMethod};function Sha1(ee){ee?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Sha1.prototype.update=function(ee){if(!this.finalized){var re=typeof ee!="string";re&&ee.constructor===root.ArrayBuffer&&(ee=new Uint8Array(ee));for(var te,ne,ie=0,oe=ee.length||0,se=this.blocks;ie<oe;){if(this.hashed&&(this.hashed=!1,se[0]=this.block,se[16]=se[1]=se[2]=se[3]=se[4]=se[5]=se[6]=se[7]=se[8]=se[9]=se[10]=se[11]=se[12]=se[13]=se[14]=se[15]=0),re)for(ne=this.start;ie<oe&&ne<64;++ie)se[ne>>2]|=ee[ie]<<SHIFT[3&ne++];else for(ne=this.start;ie<oe&&ne<64;++ie)(te=ee.charCodeAt(ie))<128?se[ne>>2]|=te<<SHIFT[3&ne++]:te<2048?(se[ne>>2]|=(192|te>>6)<<SHIFT[3&ne++],se[ne>>2]|=(128|63&te)<<SHIFT[3&ne++]):te<55296||te>=57344?(se[ne>>2]|=(224|te>>12)<<SHIFT[3&ne++],se[ne>>2]|=(128|te>>6&63)<<SHIFT[3&ne++],se[ne>>2]|=(128|63&te)<<SHIFT[3&ne++]):(te=65536+((1023&te)<<10|1023&ee.charCodeAt(++ie)),se[ne>>2]|=(240|te>>18)<<SHIFT[3&ne++],se[ne>>2]|=(128|te>>12&63)<<SHIFT[3&ne++],se[ne>>2]|=(128|te>>6&63)<<SHIFT[3&ne++],se[ne>>2]|=(128|63&te)<<SHIFT[3&ne++]);this.lastByteIndex=ne,this.bytes+=ne-this.start,ne>=64?(this.block=se[16],this.start=ne-64,this.hash(),this.hashed=!0):this.start=ne}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha1.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var ee=this.blocks,re=this.lastByteIndex;ee[16]=this.block,ee[re>>2]|=EXTRA[3&re],this.block=ee[16],re>=56&&(this.hashed||this.hash(),ee[0]=this.block,ee[16]=ee[1]=ee[2]=ee[3]=ee[4]=ee[5]=ee[6]=ee[7]=ee[8]=ee[9]=ee[10]=ee[11]=ee[12]=ee[13]=ee[14]=ee[15]=0),ee[14]=this.hBytes<<3|this.bytes>>>29,ee[15]=this.bytes<<3,this.hash()}},Sha1.prototype.hash=function(){var ee,re,te=this.h0,ne=this.h1,ie=this.h2,oe=this.h3,se=this.h4,ae=this.blocks;for(ee=16;ee<80;++ee)re=ae[ee-3]^ae[ee-8]^ae[ee-14]^ae[ee-16],ae[ee]=re<<1|re>>>31;for(ee=0;ee<20;ee+=5)te=(re=(ne=(re=(ie=(re=(oe=(re=(se=(re=te<<5|te>>>27)+(ne&ie|~ne&oe)+se+1518500249+ae[ee]<<0)<<5|se>>>27)+(te&(ne=ne<<30|ne>>>2)|~te&ie)+oe+1518500249+ae[ee+1]<<0)<<5|oe>>>27)+(se&(te=te<<30|te>>>2)|~se&ne)+ie+1518500249+ae[ee+2]<<0)<<5|ie>>>27)+(oe&(se=se<<30|se>>>2)|~oe&te)+ne+1518500249+ae[ee+3]<<0)<<5|ne>>>27)+(ie&(oe=oe<<30|oe>>>2)|~ie&se)+te+1518500249+ae[ee+4]<<0,ie=ie<<30|ie>>>2;for(;ee<40;ee+=5)te=(re=(ne=(re=(ie=(re=(oe=(re=(se=(re=te<<5|te>>>27)+(ne^ie^oe)+se+1859775393+ae[ee]<<0)<<5|se>>>27)+(te^(ne=ne<<30|ne>>>2)^ie)+oe+1859775393+ae[ee+1]<<0)<<5|oe>>>27)+(se^(te=te<<30|te>>>2)^ne)+ie+1859775393+ae[ee+2]<<0)<<5|ie>>>27)+(oe^(se=se<<30|se>>>2)^te)+ne+1859775393+ae[ee+3]<<0)<<5|ne>>>27)+(ie^(oe=oe<<30|oe>>>2)^se)+te+1859775393+ae[ee+4]<<0,ie=ie<<30|ie>>>2;for(;ee<60;ee+=5)te=(re=(ne=(re=(ie=(re=(oe=(re=(se=(re=te<<5|te>>>27)+(ne&ie|ne&oe|ie&oe)+se-1894007588+ae[ee]<<0)<<5|se>>>27)+(te&(ne=ne<<30|ne>>>2)|te&ie|ne&ie)+oe-1894007588+ae[ee+1]<<0)<<5|oe>>>27)+(se&(te=te<<30|te>>>2)|se&ne|te&ne)+ie-1894007588+ae[ee+2]<<0)<<5|ie>>>27)+(oe&(se=se<<30|se>>>2)|oe&te|se&te)+ne-1894007588+ae[ee+3]<<0)<<5|ne>>>27)+(ie&(oe=oe<<30|oe>>>2)|ie&se|oe&se)+te-1894007588+ae[ee+4]<<0,ie=ie<<30|ie>>>2;for(;ee<80;ee+=5)te=(re=(ne=(re=(ie=(re=(oe=(re=(se=(re=te<<5|te>>>27)+(ne^ie^oe)+se-899497514+ae[ee]<<0)<<5|se>>>27)+(te^(ne=ne<<30|ne>>>2)^ie)+oe-899497514+ae[ee+1]<<0)<<5|oe>>>27)+(se^(te=te<<30|te>>>2)^ne)+ie-899497514+ae[ee+2]<<0)<<5|ie>>>27)+(oe^(se=se<<30|se>>>2)^te)+ne-899497514+ae[ee+3]<<0)<<5|ne>>>27)+(ie^(oe=oe<<30|oe>>>2)^se)+te-899497514+ae[ee+4]<<0,ie=ie<<30|ie>>>2;this.h0=this.h0+te<<0,this.h1=this.h1+ne<<0,this.h2=this.h2+ie<<0,this.h3=this.h3+oe<<0,this.h4=this.h4+se<<0},Sha1.prototype.hex=function(){this.finalize();var ee=this.h0,re=this.h1,te=this.h2,ne=this.h3,ie=this.h4;return HEX_CHARS[ee>>28&15]+HEX_CHARS[ee>>24&15]+HEX_CHARS[ee>>20&15]+HEX_CHARS[ee>>16&15]+HEX_CHARS[ee>>12&15]+HEX_CHARS[ee>>8&15]+HEX_CHARS[ee>>4&15]+HEX_CHARS[15&ee]+HEX_CHARS[re>>28&15]+HEX_CHARS[re>>24&15]+HEX_CHARS[re>>20&15]+HEX_CHARS[re>>16&15]+HEX_CHARS[re>>12&15]+HEX_CHARS[re>>8&15]+HEX_CHARS[re>>4&15]+HEX_CHARS[15&re]+HEX_CHARS[te>>28&15]+HEX_CHARS[te>>24&15]+HEX_CHARS[te>>20&15]+HEX_CHARS[te>>16&15]+HEX_CHARS[te>>12&15]+HEX_CHARS[te>>8&15]+HEX_CHARS[te>>4&15]+HEX_CHARS[15&te]+HEX_CHARS[ne>>28&15]+HEX_CHARS[ne>>24&15]+HEX_CHARS[ne>>20&15]+HEX_CHARS[ne>>16&15]+HEX_CHARS[ne>>12&15]+HEX_CHARS[ne>>8&15]+HEX_CHARS[ne>>4&15]+HEX_CHARS[15&ne]+HEX_CHARS[ie>>28&15]+HEX_CHARS[ie>>24&15]+HEX_CHARS[ie>>20&15]+HEX_CHARS[ie>>16&15]+HEX_CHARS[ie>>12&15]+HEX_CHARS[ie>>8&15]+HEX_CHARS[ie>>4&15]+HEX_CHARS[15&ie]},Sha1.prototype.toString=Sha1.prototype.hex,Sha1.prototype.digest=function(){this.finalize();var ee=this.h0,re=this.h1,te=this.h2,ne=this.h3,ie=this.h4;return[ee>>24&255,ee>>16&255,ee>>8&255,255&ee,re>>24&255,re>>16&255,re>>8&255,255&re,te>>24&255,te>>16&255,te>>8&255,255&te,ne>>24&255,ne>>16&255,ne>>8&255,255&ne,ie>>24&255,ie>>16&255,ie>>8&255,255&ie]},Sha1.prototype.array=Sha1.prototype.digest,Sha1.prototype.arrayBuffer=function(){this.finalize();var ee=new ArrayBuffer(20),re=new DataView(ee);return re.setUint32(0,this.h0),re.setUint32(4,this.h1),re.setUint32(8,this.h2),re.setUint32(12,this.h3),re.setUint32(16,this.h4),ee};var exports$1=createMethod();COMMON_JS?module.exports=exports$1:(root.sha1=exports$1,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=(function(){return exports$1}).call(exports$1,__webpack_require__,exports$1,module),__WEBPACK_AMD_DEFINE_RESULT__===void 0||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__(172),__webpack_require__(124))},function(ee,re,te){var ne=new(te(424))(Math.random()*Number.MAX_SAFE_INTEGER);ee.exports=function(ie){for(var oe=ie.length;oe--;)ie[oe]=Math.floor(256*ne.random());return ie}},function(ee,re,te){ee.exports=te(164)},function(ee,re,te){ee.exports=te(432)},function(ee,re,te){ee.exports=te(436)},function(ee,re,te){ee.exports=te(459)},function(ee,re,te){var ne=te(464),ie=te(187),oe=te(471);ee.exports=function(se,ae){if(se==null)return{};var ce,ue,le=oe(se,ae);if(ne){var de=ne(se);for(ue=0;ue<de.length;ue++)ce=de[ue],ie(ae).call(ae,ce)>=0||Object.prototype.propertyIsEnumerable.call(se,ce)&&(le[ce]=se[ce])}return le},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(476)},function(ee,re,te){ee.exports=te(201)},function(ee,re,te){var ne=te(202);ee.exports=ne},function(ee,re,te){var ne=te(123);ee.exports=ne},function(ee,re,te){te(204);var ne=te(7).Object,ie=ee.exports=function(oe,se,ae){return ne.defineProperty(oe,se,ae)};ne.defineProperty.sham&&(ie.sham=!0)},function(ee,re,te){var ne=te(1),ie=te(15),oe=te(28).f;ne({target:"Object",stat:!0,forced:Object.defineProperty!==oe,sham:!ie},{defineProperty:oe})},function(ee,re,te){var ne=te(14),ie=te(17),oe=te(85),se=te(105),ae=te(206),ce=te(8),ue=TypeError,le=ce("toPrimitive");ee.exports=function(de,fe){if(!ie(de)||oe(de))return de;var he,pe=se(de,le);if(pe){if(fe===void 0&&(fe="default"),he=ne(pe,de,fe),!ie(he)||oe(he))return he;throw ue("Can't convert object to primitive value")}return fe===void 0&&(fe="number"),ae(de,fe)}},function(ee,re,te){var ne=te(14),ie=te(10),oe=te(17),se=TypeError;ee.exports=function(ae,ce){var ue,le;if(ce==="string"&&ie(ue=ae.toString)&&!oe(le=ne(ue,ae))||ie(ue=ae.valueOf)&&!oe(le=ne(ue,ae))||ce!=="string"&&ie(ue=ae.toString)&&!oe(le=ne(ue,ae)))return le;throw se("Can't convert object to primitive value")}},function(ee,re,te){var ne=te(9),ie=Object.defineProperty;ee.exports=function(oe,se){try{ie(ne,oe,{value:se,configurable:!0,writable:!0})}catch{ne[oe]=se}return se}},function(ee,re,te){ee.exports=te(209)},function(ee,re,te){var ne=te(210);te(241),te(242),te(243),te(244),te(245),te(246),te(247),ee.exports=ne},function(ee,re,te){var ne=te(211);te(240),ee.exports=ne},function(ee,re,te){var ne=te(212);te(39),ee.exports=ne},function(ee,re,te){te(131),te(72),te(135),te(223),te(224),te(225),te(226),te(141),te(227),te(228),te(229),te(230),te(231),te(232),te(142),te(233),te(234),te(235),te(236),te(237);var ne=te(7);ee.exports=ne.Symbol},function(ee,re){var te=Math.ceil,ne=Math.floor;ee.exports=Math.trunc||function(ie){var oe=+ie;return(oe>0?ne:te)(oe)}},function(ee,re){var te=TypeError;ee.exports=function(ne){if(ne>9007199254740991)throw te("Maximum allowed index exceeded");return ne}},function(ee,re,te){var ne=te(56),ie=te(88),oe=te(17),se=te(8)("species"),ae=Array;ee.exports=function(ce){var ue;return ne(ce)&&(ue=ce.constructor,(ie(ue)&&(ue===ae||ne(ue.prototype))||oe(ue)&&(ue=ue[se])===null)&&(ue=void 0)),ue===void 0?ae:ue}},function(ee,re,te){var ne=te(1),ie=te(9),oe=te(14),se=te(6),ae=te(26),ce=te(15),ue=te(55),le=te(5),de=te(13),fe=te(16),he=te(20),pe=te(27),ge=te(84),me=te(29),ye=te(45),ve=te(57),be=te(73),_e=te(116),Ce=te(217),Te=te(92),Se=te(44),Re=te(28),we=te(112),Ae=te(82),Oe=te(31),Ne=te(70),Ue=te(91),Fe=te(90),Ve=te(107),He=te(8),ur=te(93),qe=te(12),hr=te(138),fr=te(47),dr=te(58),Qe=te(94).forEach,Bt=Ue("hidden"),Cr=dr.set,$e=dr.getterFor("Symbol"),Le=Object.prototype,We=ie.Symbol,mr=We&&We.prototype,lr=ie.TypeError,Sr=ie.QObject,zr=Se.f,$r=Re.f,Yr=Ce.f,ei=Ae.f,ai=se([].push),Gr=Ne("symbols"),Ye=Ne("op-symbols"),Ir=Ne("wks"),Rr=!Sr||!Sr.prototype||!Sr.prototype.findChild,xr=ce&&le((function(){return ve($r({},"a",{get:function(){return $r(this,"a",{value:7}).a}})).a!=7}))?function(Er,Lr,Pr){var Mr=zr(Le,Lr);Mr&&delete Le[Lr],$r(Er,Lr,Pr),Mr&&Er!==Le&&$r(Le,Lr,Mr)}:$r,Br=function(Er,Lr){var Pr=Gr[Er]=ve(mr);return Cr(Pr,{type:"Symbol",tag:Er,description:Lr}),ce||(Pr.description=Lr),Pr},li=function(Er,Lr,Pr){Er===Le&&li(Ye,Lr,Pr),he(Er);var Mr=ge(Lr);return he(Pr),de(Gr,Mr)?(Pr.enumerable?(de(Er,Bt)&&Er[Bt][Mr]&&(Er[Bt][Mr]=!1),Pr=ve(Pr,{enumerable:ye(0,!1)})):(de(Er,Bt)||$r(Er,Bt,ye(1,{})),Er[Bt][Mr]=!0),xr(Er,Mr,Pr)):$r(Er,Mr,Pr)},Ei=function(Er,Lr){he(Er);var Pr=pe(Lr),Mr=be(Pr).concat(Xr(Pr));return Qe(Mr,(function(Zr){ce&&!oe(gi,Pr,Zr)||li(Er,Zr,Pr[Zr])})),Er},gi=function(Er){var Lr=ge(Er),Pr=oe(ei,this,Lr);return!(this===Le&&de(Gr,Lr)&&!de(Ye,Lr))&&(!(Pr||!de(this,Lr)||!de(Gr,Lr)||de(this,Bt)&&this[Bt][Lr])||Pr)},ti=function(Er,Lr){var Pr=pe(Er),Mr=ge(Lr);if(Pr!==Le||!de(Gr,Mr)||de(Ye,Mr)){var Zr=zr(Pr,Mr);return!Zr||!de(Gr,Mr)||de(Pr,Bt)&&Pr[Bt][Mr]||(Zr.enumerable=!0),Zr}},di=function(Er){var Lr=Yr(pe(Er)),Pr=[];return Qe(Lr,(function(Mr){de(Gr,Mr)||de(Fe,Mr)||ai(Pr,Mr)})),Pr},Xr=function(Er){var Lr=Er===Le,Pr=Yr(Lr?Ye:pe(Er)),Mr=[];return Qe(Pr,(function(Zr){!de(Gr,Zr)||Lr&&!de(Le,Zr)||ai(Mr,Gr[Zr])})),Mr};ue||(Oe(mr=(We=function(){if(fe(mr,this))throw lr("Symbol is not a constructor");var Er=arguments.length&&arguments[0]!==void 0?me(arguments[0]):void 0,Lr=Ve(Er),Pr=function(Mr){this===Le&&oe(Pr,Ye,Mr),de(this,Bt)&&de(this[Bt],Lr)&&(this[Bt][Lr]=!1),xr(this,Lr,ye(1,Mr))};return ce&&Rr&&xr(Le,Lr,{configurable:!0,set:Pr}),Br(Lr,Er)}).prototype,"toString",(function(){return $e(this).tag})),Oe(We,"withoutSetter",(function(Er){return Br(Ve(Er),Er)})),Ae.f=gi,Re.f=li,we.f=Ei,Se.f=ti,_e.f=Ce.f=di,Te.f=Xr,ur.f=function(Er){return Br(He(Er),Er)},ce&&($r(mr,"description",{configurable:!0,get:function(){return $e(this).description}}),ae||Oe(Le,"propertyIsEnumerable",gi,{unsafe:!0}))),ne({global:!0,constructor:!0,wrap:!0,forced:!ue,sham:!ue},{Symbol:We}),Qe(be(Ir),(function(Er){qe(Er)})),ne({target:"Symbol",stat:!0,forced:!ue},{useSetter:function(){Rr=!0},useSimple:function(){Rr=!1}}),ne({target:"Object",stat:!0,forced:!ue,sham:!ce},{create:function(Er,Lr){return Lr===void 0?ve(Er):Ei(ve(Er),Lr)},defineProperty:li,defineProperties:Ei,getOwnPropertyDescriptor:ti}),ne({target:"Object",stat:!0,forced:!ue},{getOwnPropertyNames:di}),hr(),fr(We,"Symbol"),Fe[Bt]=!0},function(ee,re,te){var ne=te(51),ie=te(27),oe=te(116).f,se=te(117),ae=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ee.exports.f=function(ce){return ae&&ne(ce)=="Window"?(function(ue){try{return oe(ue)}catch{return se(ae)}})(ce):oe(ie(ce))}},function(ee,re,te){var ne=te(111),ie=te(38);ee.exports=ne?{}.toString:function(){return"[object "+ie(this)+"]"}},function(ee,re,te){var ne=te(9),ie=te(10),oe=ne.WeakMap;ee.exports=ie(oe)&&/native code/.test(String(oe))},function(ee,re,te){var ne=te(1),ie=te(24),oe=te(13),se=te(29),ae=te(70),ce=te(139),ue=ae("string-to-symbol-registry"),le=ae("symbol-to-string-registry");ne({target:"Symbol",stat:!0,forced:!ce},{for:function(de){var fe=se(de);if(oe(ue,fe))return ue[fe];var he=ie("Symbol")(fe);return ue[fe]=he,le[he]=fe,he}})},function(ee,re,te){var ne=te(1),ie=te(13),oe=te(85),se=te(69),ae=te(70),ce=te(139),ue=ae("symbol-to-string-registry");ne({target:"Symbol",stat:!0,forced:!ce},{keyFor:function(le){if(!oe(le))throw TypeError(se(le)+" is not a symbol");if(ie(ue,le))return ue[le]}})},function(ee,re,te){var ne=te(1),ie=te(55),oe=te(5),se=te(92),ae=te(36);ne({target:"Object",stat:!0,forced:!ie||oe((function(){se.f(1)}))},{getOwnPropertySymbols:function(ce){var ue=se.f;return ue?ue(ae(ce)):[]}})},function(ee,re,te){te(12)("asyncIterator")},function(ee,re){},function(ee,re,te){te(12)("hasInstance")},function(ee,re,te){te(12)("isConcatSpreadable")},function(ee,re,te){te(12)("match")},function(ee,re,te){te(12)("matchAll")},function(ee,re,te){te(12)("replace")},function(ee,re,te){te(12)("search")},function(ee,re,te){te(12)("species")},function(ee,re,te){te(12)("split")},function(ee,re,te){var ne=te(24),ie=te(12),oe=te(47);ie("toStringTag"),oe(ne("Symbol"),"Symbol")},function(ee,re,te){te(12)("unscopables")},function(ee,re,te){var ne=te(9);te(47)(ne.JSON,"JSON",!0)},function(ee,re){},function(ee,re){},function(ee,re,te){var ne=te(10),ie=String,oe=TypeError;ee.exports=function(se){if(typeof se=="object"||ne(se))return se;throw oe("Can't set "+ie(se)+" as a prototype")}},function(ee,re){ee.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(ee,re,te){te(12)("dispose")},function(ee,re,te){te(12)("asyncDispose")},function(ee,re,te){te(12)("matcher")},function(ee,re,te){te(12)("metadataKey")},function(ee,re,te){te(12)("observable")},function(ee,re,te){te(12)("metadata")},function(ee,re,te){te(12)("patternMatch")},function(ee,re,te){te(12)("replaceAll")},function(ee,re,te){ee.exports=te(249)},function(ee,re,te){ee.exports=te(250)},function(ee,re,te){var ne=te(251);ee.exports=ne},function(ee,re,te){var ne=te(252);ee.exports=ne},function(ee,re,te){var ne=te(253);te(39),ee.exports=ne},function(ee,re,te){te(48),te(72),te(60),te(141);var ne=te(93);ee.exports=ne.f("iterator")},function(ee,re,te){var ne=te(255),ie=te(87).default;ee.exports=function(oe,se){if(ie(oe)!=="object"||oe===null)return oe;var ae=oe[ne];if(ae!==void 0){var ce=ae.call(oe,se||"default");if(ie(ce)!=="object")return ce;throw new TypeError("@@toPrimitive must return a primitive value.")}return(se==="string"?String:Number)(oe)},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(256)},function(ee,re,te){ee.exports=te(257)},function(ee,re,te){var ne=te(258);ee.exports=ne},function(ee,re,te){var ne=te(259);ee.exports=ne},function(ee,re,te){var ne=te(260);ee.exports=ne},function(ee,re,te){te(261),te(142);var ne=te(93);ee.exports=ne.f("toPrimitive")},function(ee,re){},function(ee,re,te){var ne=te(263);ee.exports=ne},function(ee,re,te){te(264);var ne=te(7).Object,ie=ee.exports=function(oe,se){return ne.defineProperties(oe,se)};ne.defineProperties.sham&&(ie.sham=!0)},function(ee,re,te){var ne=te(1),ie=te(15),oe=te(112).f;ne({target:"Object",stat:!0,forced:Object.defineProperties!==oe,sham:!ie},{defineProperties:oe})},function(ee,re,te){var ne=te(266);ee.exports=ne},function(ee,re,te){te(267);var ne=te(7);ee.exports=ne.Object.getOwnPropertyDescriptors},function(ee,re,te){var ne=te(1),ie=te(15),oe=te(151),se=te(27),ae=te(44),ce=te(71);ne({target:"Object",stat:!0,sham:!ie},{getOwnPropertyDescriptors:function(ue){for(var le,de,fe=se(ue),he=ae.f,pe=oe(fe),ge={},me=0;pe.length>me;)(de=he(fe,le=pe[me++]))!==void 0&&ce(ge,le,de);return ge}})},function(ee,re,te){var ne=te(269);ee.exports=ne},function(ee,re,te){te(270);var ne=te(21);ee.exports=ne("Array").forEach},function(ee,re,te){var ne=te(1),ie=te(271);ne({target:"Array",proto:!0,forced:[].forEach!=ie},{forEach:ie})},function(ee,re,te){var ne=te(94).forEach,ie=te(153)("forEach");ee.exports=ie?[].forEach:function(oe){return ne(this,oe,arguments.length>1?arguments[1]:void 0)}},function(ee,re,te){te(273);var ne=te(7).Object,ie=ee.exports=function(oe,se){return ne.getOwnPropertyDescriptor(oe,se)};ne.getOwnPropertyDescriptor.sham&&(ie.sham=!0)},function(ee,re,te){var ne=te(1),ie=te(5),oe=te(27),se=te(44).f,ae=te(15);ne({target:"Object",stat:!0,forced:!ae||ie((function(){se(1)})),sham:!ae},{getOwnPropertyDescriptor:function(ce,ue){return se(oe(ce),ue)}})},function(ee,re,te){var ne=te(275);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(276),oe=Array.prototype;ee.exports=function(se){var ae=se.filter;return se===oe||ne(oe,se)&&ae===oe.filter?ie:ae}},function(ee,re,te){te(277);var ne=te(21);ee.exports=ne("Array").filter},function(ee,re,te){var ne=te(1),ie=te(94).filter;ne({target:"Array",proto:!0,forced:!te(89)("filter")},{filter:function(oe){return ie(this,oe,arguments.length>1?arguments[1]:void 0)}})},function(ee,re,te){te(135);var ne=te(7);ee.exports=ne.Object.getOwnPropertySymbols},function(ee,re,te){te(280);var ne=te(7);ee.exports=ne.Object.keys},function(ee,re,te){var ne=te(1),ie=te(36),oe=te(73);ne({target:"Object",stat:!0,forced:te(5)((function(){oe(1)}))},{keys:function(se){return oe(ie(se))}})},function(ee,re){ee.exports=function(te){if(te===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return te},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(283)},function(ee,re,te){var ne=te(284);ee.exports=ne},function(ee,re,te){var ne=te(285);ee.exports=ne},function(ee,re,te){var ne=te(286);ee.exports=ne},function(ee,re,te){te(287);var ne=te(7);ee.exports=ne.Object.setPrototypeOf},function(ee,re,te){te(1)({target:"Object",stat:!0},{setPrototypeOf:te(95)})},function(ee,re,te){ee.exports=te(289)},function(ee,re,te){var ne=te(290);ee.exports=ne},function(ee,re,te){var ne=te(291);ee.exports=ne},function(ee,re,te){var ne=te(292);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(293),oe=Function.prototype;ee.exports=function(se){var ae=se.bind;return se===oe||ne(oe,se)&&ae===oe.bind?ie:ae}},function(ee,re,te){te(294);var ne=te(21);ee.exports=ne("Function").bind},function(ee,re,te){var ne=te(1),ie=te(295);ne({target:"Function",proto:!0,forced:Function.bind!==ie},{bind:ie})},function(ee,re,te){var ne=te(6),ie=te(30),oe=te(17),se=te(13),ae=te(74),ce=te(67),ue=Function,le=ne([].concat),de=ne([].join),fe={},he=function(pe,ge,me){if(!se(fe,ge)){for(var ye=[],ve=0;ve<ge;ve++)ye[ve]="a["+ve+"]";fe[ge]=ue("C,a","return new C("+de(ye,",")+")")}return fe[ge](pe,me)};ee.exports=ce?ue.bind:function(pe){var ge=ie(this),me=ge.prototype,ye=ae(arguments,1),ve=function(){var be=le(ye,ae(arguments));return this instanceof ve?he(ge,be.length,be):ge.apply(pe,be)};return oe(me)&&(ve.prototype=me),ve}},function(ee,re,te){ee.exports=te(297)},function(ee,re,te){var ne=te(298);ee.exports=ne},function(ee,re,te){var ne=te(299);ee.exports=ne},function(ee,re,te){var ne=te(300);ee.exports=ne},function(ee,re,te){te(301);var ne=te(7);ee.exports=ne.Object.getPrototypeOf},function(ee,re,te){var ne=te(1),ie=te(5),oe=te(36),se=te(75),ae=te(148);ne({target:"Object",stat:!0,forced:ie((function(){se(1)})),sham:!ae},{getPrototypeOf:function(ce){return se(oe(ce))}})},function(ee,re,te){ee.exports=te(303)},function(ee,re,te){var ne=te(304);ee.exports=ne},function(ee,re,te){var ne=te(159);ee.exports=ne},function(ee,re,te){te(306);var ne=te(7).Object;ee.exports=function(ie,oe){return ne.create(ie,oe)}},function(ee,re,te){te(1)({target:"Object",stat:!0,sham:!te(15)},{create:te(57)})},function(ee,re,te){var ne=te(118),ie=te(119);function oe(se,ae){var ce;return ee.exports=oe=ne?ie(ce=ne).call(ce):function(ue,le){return ue.__proto__=le,ue},ee.exports.__esModule=!0,ee.exports.default=ee.exports,oe(se,ae)}ee.exports=oe,ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){var ne=te(309);ee.exports=ne},function(ee,re,te){te(310);var ne=te(7);ee.exports=ne.Object.assign},function(ee,re,te){var ne=te(1),ie=te(160);ne({target:"Object",stat:!0,arity:2,forced:Object.assign!==ie},{assign:ie})},function(ee,re,te){var ne=te(312);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(313),oe=Array.prototype;ee.exports=function(se){var ae=se.map;return se===oe||ne(oe,se)&&ae===oe.map?ie:ae}},function(ee,re,te){te(314);var ne=te(21);ee.exports=ne("Array").map},function(ee,re,te){var ne=te(1),ie=te(94).map;ne({target:"Array",proto:!0,forced:!te(89)("map")},{map:function(oe){return ie(this,oe,arguments.length>1?arguments[1]:void 0)}})},function(ee,re,te){var ne=te(316);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(317),oe=te(319),se=Array.prototype,ae=String.prototype;ee.exports=function(ce){var ue=ce.includes;return ce===se||ne(se,ce)&&ue===se.includes?ie:typeof ce=="string"||ce===ae||ne(ae,ce)&&ue===ae.includes?oe:ue}},function(ee,re,te){te(318);var ne=te(21);ee.exports=ne("Array").includes},function(ee,re,te){var ne=te(1),ie=te(113).includes,oe=te(5),se=te(143);ne({target:"Array",proto:!0,forced:oe((function(){return!Array(1).includes()}))},{includes:function(ae){return ie(this,ae,arguments.length>1?arguments[1]:void 0)}}),se("includes")},function(ee,re,te){te(320);var ne=te(21);ee.exports=ne("String").includes},function(ee,re,te){var ne=te(1),ie=te(6),oe=te(161),se=te(54),ae=te(29),ce=te(162),ue=ie("".indexOf);ne({target:"String",proto:!0,forced:!ce("includes")},{includes:function(le){return!!~ue(ae(se(this)),ae(oe(le)),arguments.length>1?arguments[1]:void 0)}})},function(ee,re,te){var ne=te(17),ie=te(51),oe=te(8)("match");ee.exports=function(se){var ae;return ne(se)&&((ae=se[oe])!==void 0?!!ae:ie(se)=="RegExp")}},function(ee,re,te){var ne=te(323);ee.exports=function(ie){if(ne(ie))return ie},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(324)},function(ee,re,te){ee.exports=te(325)},function(ee,re,te){var ne=te(326);ee.exports=ne},function(ee,re,te){var ne=te(327);ee.exports=ne},function(ee,re,te){var ne=te(328);ee.exports=ne},function(ee,re,te){te(329);var ne=te(7);ee.exports=ne.Array.isArray},function(ee,re,te){te(1)({target:"Array",stat:!0},{isArray:te(56)})},function(ee,re,te){var ne=te(109),ie=te(331);ee.exports=function(oe,se){var ae=oe==null?null:ne!==void 0&&ie(oe)||oe["@@iterator"];if(ae!=null){var ce,ue,le,de,fe=[],he=!0,pe=!1;try{if(le=(ae=ae.call(oe)).next,se===0){if(Object(ae)!==ae)return;he=!1}else for(;!(he=(ce=le.call(ae)).done)&&(fe.push(ce.value),fe.length!==se);he=!0);}catch(ge){pe=!0,ue=ge}finally{try{if(!he&&ae.return!=null&&(de=ae.return(),Object(de)!==de))return}finally{if(pe)throw ue}}return fe}},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(332)},function(ee,re,te){ee.exports=te(333)},function(ee,re,te){var ne=te(334);ee.exports=ne},function(ee,re,te){var ne=te(335);ee.exports=ne},function(ee,re,te){var ne=te(336);te(39),ee.exports=ne},function(ee,re,te){te(48),te(60);var ne=te(76);ee.exports=ne},function(ee,re,te){var ne=te(163),ie=te(345),oe=te(352);ee.exports=function(se,ae){var ce;if(se){if(typeof se=="string")return oe(se,ae);var ue=ne(ce=Object.prototype.toString.call(se)).call(ce,8,-1);return ue==="Object"&&se.constructor&&(ue=se.constructor.name),ue==="Map"||ue==="Set"?ie(se):ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue)?oe(se,ae):void 0}},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(339)},function(ee,re,te){var ne=te(340);ee.exports=ne},function(ee,re,te){var ne=te(341);ee.exports=ne},function(ee,re,te){var ne=te(342);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(343),oe=Array.prototype;ee.exports=function(se){var ae=se.slice;return se===oe||ne(oe,se)&&ae===oe.slice?ie:ae}},function(ee,re,te){te(344);var ne=te(21);ee.exports=ne("Array").slice},function(ee,re,te){var ne=te(1),ie=te(56),oe=te(88),se=te(17),ae=te(114),ce=te(52),ue=te(27),le=te(71),de=te(8),fe=te(89),he=te(74),pe=fe("slice"),ge=de("species"),me=Array,ye=Math.max;ne({target:"Array",proto:!0,forced:!pe},{slice:function(ve,be){var _e,Ce,Te,Se=ue(this),Re=ce(Se),we=ae(ve,Re),Ae=ae(be===void 0?Re:be,Re);if(ie(Se)&&(_e=Se.constructor,(oe(_e)&&(_e===me||ie(_e.prototype))||se(_e)&&(_e=_e[ge])===null)&&(_e=void 0),_e===me||_e===void 0))return he(Se,we,Ae);for(Ce=new(_e===void 0?me:_e)(ye(Ae-we,0)),Te=0;we<Ae;we++,Te++)we in Se&&le(Ce,Te,Se[we]);return Ce.length=Te,Ce}})},function(ee,re,te){ee.exports=te(346)},function(ee,re,te){ee.exports=te(347)},function(ee,re,te){var ne=te(348);ee.exports=ne},function(ee,re,te){var ne=te(164);ee.exports=ne},function(ee,re,te){te(60),te(350);var ne=te(7);ee.exports=ne.Array.from},function(ee,re,te){var ne=te(1),ie=te(165);ne({target:"Array",stat:!0,forced:!te(168)((function(oe){Array.from(oe)}))},{from:ie})},function(ee,re,te){var ne=te(20),ie=te(166);ee.exports=function(oe,se,ae,ce){try{return ce?se(ne(ae)[0],ae[1]):se(ae)}catch(ue){ie(oe,"throw",ue)}}},function(ee,re){ee.exports=function(te,ne){(ne==null||ne>te.length)&&(ne=te.length);for(var ie=0,oe=new Array(ne);ie<ne;ie++)oe[ie]=te[ie];return oe},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re){ee.exports=function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
885
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){var ne=te(355);ee.exports=ne},function(ee,re,te){te(356);var ne=te(7);ee.exports=ne.Object.entries},function(ee,re,te){var ne=te(1),ie=te(357).entries;ne({target:"Object",stat:!0},{entries:function(oe){return ie(oe)}})},function(ee,re,te){var ne=te(15),ie=te(6),oe=te(73),se=te(27),ae=ie(te(82).f),ce=ie([].push),ue=function(le){return function(de){for(var fe,he=se(de),pe=oe(he),ge=pe.length,me=0,ye=[];ge>me;)fe=pe[me++],ne&&!ae(he,fe)||ce(ye,le?[fe,he[fe]]:he[fe]);return ye}};ee.exports={entries:ue(!0),values:ue(!1)}},function(ee,re,te){var ne=te(87).default,ie=te(80),oe=te(109),se=te(158),ae=te(157),ce=te(359),ue=te(118),le=te(169),de=te(393),fe=te(163);function he(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ee.exports=he=function(){return pe},ee.exports.__esModule=!0,ee.exports.default=ee.exports;var pe={},ge=Object.prototype,me=ge.hasOwnProperty,ye=ie||function($e,Le,We){$e[Le]=We.value},ve=typeof oe=="function"?oe:{},be=ve.iterator||"@@iterator",_e=ve.asyncIterator||"@@asyncIterator",Ce=ve.toStringTag||"@@toStringTag";function Te($e,Le,We){return ie($e,Le,{value:We,enumerable:!0,configurable:!0,writable:!0}),$e[Le]}try{Te({},"")}catch{Te=function(Le,We,mr){return Le[We]=mr}}function Se($e,Le,We,mr){var lr=Le&&Le.prototype instanceof Ae?Le:Ae,Sr=se(lr.prototype),zr=new Qe(mr||[]);return ye(Sr,"_invoke",{value:qe($e,We,zr)}),Sr}function Re($e,Le,We){try{return{type:"normal",arg:$e.call(Le,We)}}catch(mr){return{type:"throw",arg:mr}}}pe.wrap=Se;var we={};function Ae(){}function Oe(){}function Ne(){}var Ue={};Te(Ue,be,(function(){return this}));var Fe=ae&&ae(ae(Bt([])));Fe&&Fe!==ge&&me.call(Fe,be)&&(Ue=Fe);var Ve=Ne.prototype=Ae.prototype=se(Ue);function He($e){var Le;ce(Le=["next","throw","return"]).call(Le,(function(We){Te($e,We,(function(mr){return this._invoke(We,mr)}))}))}function ur($e,Le){var We;ye(this,"_invoke",{value:function(mr,lr){function Sr(){return new Le((function(zr,$r){(function Yr(ei,ai,Gr,Ye){var Ir=Re($e[ei],$e,ai);if(Ir.type!=="throw"){var Rr=Ir.arg,xr=Rr.value;return xr&&ne(xr)=="object"&&me.call(xr,"__await")?Le.resolve(xr.__await).then((function(Br){Yr("next",Br,Gr,Ye)}),(function(Br){Yr("throw",Br,Gr,Ye)})):Le.resolve(xr).then((function(Br){Rr.value=Br,Gr(Rr)}),(function(Br){return Yr("throw",Br,Gr,Ye)}))}Ye(Ir.arg)})(mr,lr,zr,$r)}))}return We=We?We.then(Sr,Sr):Sr()}})}function qe($e,Le,We){var mr="suspendedStart";return function(lr,Sr){if(mr==="executing")throw new Error("Generator is already running");if(mr==="completed"){if(lr==="throw")throw Sr;return Cr()}for(We.method=lr,We.arg=Sr;;){var zr=We.delegate;if(zr){var $r=hr(zr,We);if($r){if($r===we)continue;return $r}}if(We.method==="next")We.sent=We._sent=We.arg;else if(We.method==="throw"){if(mr==="suspendedStart")throw mr="completed",We.arg;We.dispatchException(We.arg)}else We.method==="return"&&We.abrupt("return",We.arg);mr="executing";var Yr=Re($e,Le,We);if(Yr.type==="normal"){if(mr=We.done?"completed":"suspendedYield",Yr.arg===we)continue;return{value:Yr.arg,done:We.done}}Yr.type==="throw"&&(mr="completed",We.method="throw",We.arg=Yr.arg)}}}function hr($e,Le){var We=Le.method,mr=$e.iterator[We];if(mr===void 0)return Le.delegate=null,We==="throw"&&$e.iterator.return&&(Le.method="return",Le.arg=void 0,hr($e,Le),Le.method==="throw")||We!=="return"&&(Le.method="throw",Le.arg=new TypeError("The iterator does not provide a '"+We+"' method")),we;var lr=Re(mr,$e.iterator,Le.arg);if(lr.type==="throw")return Le.method="throw",Le.arg=lr.arg,Le.delegate=null,we;var Sr=lr.arg;return Sr?Sr.done?(Le[$e.resultName]=Sr.value,Le.next=$e.nextLoc,Le.method!=="return"&&(Le.method="next",Le.arg=void 0),Le.delegate=null,we):Sr:(Le.method="throw",Le.arg=new TypeError("iterator result is not an object"),Le.delegate=null,we)}function fr($e){var Le={tryLoc:$e[0]};1 in $e&&(Le.catchLoc=$e[1]),2 in $e&&(Le.finallyLoc=$e[2],Le.afterLoc=$e[3]),this.tryEntries.push(Le)}function dr($e){var Le=$e.completion||{};Le.type="normal",delete Le.arg,$e.completion=Le}function Qe($e){this.tryEntries=[{tryLoc:"root"}],ce($e).call($e,fr,this),this.reset(!0)}function Bt($e){if($e){var Le=$e[be];if(Le)return Le.call($e);if(typeof $e.next=="function")return $e;if(!isNaN($e.length)){var We=-1,mr=function lr(){for(;++We<$e.length;)if(me.call($e,We))return lr.value=$e[We],lr.done=!1,lr;return lr.value=void 0,lr.done=!0,lr};return mr.next=mr}}return{next:Cr}}function Cr(){return{value:void 0,done:!0}}return Oe.prototype=Ne,ye(Ve,"constructor",{value:Ne,configurable:!0}),ye(Ne,"constructor",{value:Oe,configurable:!0}),Oe.displayName=Te(Ne,Ce,"GeneratorFunction"),pe.isGeneratorFunction=function($e){var Le=typeof $e=="function"&&$e.constructor;return!!Le&&(Le===Oe||(Le.displayName||Le.name)==="GeneratorFunction")},pe.mark=function($e){return ue?ue($e,Ne):($e.__proto__=Ne,Te($e,Ce,"GeneratorFunction")),$e.prototype=se(Ve),$e},pe.awrap=function($e){return{__await:$e}},He(ur.prototype),Te(ur.prototype,_e,(function(){return this})),pe.AsyncIterator=ur,pe.async=function($e,Le,We,mr,lr){lr===void 0&&(lr=le);var Sr=new ur(Se($e,Le,We,mr),lr);return pe.isGeneratorFunction(Le)?Sr:Sr.next().then((function(zr){return zr.done?zr.value:Sr.next()}))},He(Ve),Te(Ve,Ce,"Generator"),Te(Ve,be,(function(){return this})),Te(Ve,"toString",(function(){return"[object Generator]"})),pe.keys=function($e){var Le=Object($e),We=[];for(var mr in Le)We.push(mr);return de(We).call(We),function lr(){for(;We.length;){var Sr=We.pop();if(Sr in Le)return lr.value=Sr,lr.done=!1,lr}return lr.done=!0,lr}},pe.values=Bt,Qe.prototype={constructor:Qe,reset:function($e){var Le;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,ce(Le=this.tryEntries).call(Le,dr),!$e)for(var We in this)We.charAt(0)==="t"&&me.call(this,We)&&!isNaN(+fe(We).call(We,1))&&(this[We]=void 0)},stop:function(){this.done=!0;var $e=this.tryEntries[0].completion;if($e.type==="throw")throw $e.arg;return this.rval},dispatchException:function($e){if(this.done)throw $e;var Le=this;function We(Yr,ei){return Sr.type="throw",Sr.arg=$e,Le.next=Yr,ei&&(Le.method="next",Le.arg=void 0),!!ei}for(var mr=this.tryEntries.length-1;mr>=0;--mr){var lr=this.tryEntries[mr],Sr=lr.completion;if(lr.tryLoc==="root")return We("end");if(lr.tryLoc<=this.prev){var zr=me.call(lr,"catchLoc"),$r=me.call(lr,"finallyLoc");if(zr&&$r){if(this.prev<lr.catchLoc)return We(lr.catchLoc,!0);if(this.prev<lr.finallyLoc)return We(lr.finallyLoc)}else if(zr){if(this.prev<lr.catchLoc)return We(lr.catchLoc,!0)}else{if(!$r)throw new Error("try statement without catch or finally");if(this.prev<lr.finallyLoc)return We(lr.finallyLoc)}}}},abrupt:function($e,Le){for(var We=this.tryEntries.length-1;We>=0;--We){var mr=this.tryEntries[We];if(mr.tryLoc<=this.prev&&me.call(mr,"finallyLoc")&&this.prev<mr.finallyLoc){var lr=mr;break}}lr&&($e==="break"||$e==="continue")&&lr.tryLoc<=Le&&Le<=lr.finallyLoc&&(lr=null);var Sr=lr?lr.completion:{};return Sr.type=$e,Sr.arg=Le,lr?(this.method="next",this.next=lr.finallyLoc,we):this.complete(Sr)},complete:function($e,Le){if($e.type==="throw")throw $e.arg;return $e.type==="break"||$e.type==="continue"?this.next=$e.arg:$e.type==="return"?(this.rval=this.arg=$e.arg,this.method="return",this.next="end"):$e.type==="normal"&&Le&&(this.next=Le),we},finish:function($e){for(var Le=this.tryEntries.length-1;Le>=0;--Le){var We=this.tryEntries[Le];if(We.finallyLoc===$e)return this.complete(We.completion,We.afterLoc),dr(We),we}},catch:function($e){for(var Le=this.tryEntries.length-1;Le>=0;--Le){var We=this.tryEntries[Le];if(We.tryLoc===$e){var mr=We.completion;if(mr.type==="throw"){var lr=mr.arg;dr(We)}return lr}}throw new Error("illegal catch attempt")},delegateYield:function($e,Le,We){return this.delegate={iterator:Bt($e),resultName:Le,nextLoc:We},this.method==="next"&&(this.arg=void 0),we}},pe}ee.exports=he,ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(360)},function(ee,re,te){ee.exports=te(361)},function(ee,re,te){var ne=te(362);ee.exports=ne},function(ee,re,te){var ne=te(152);ee.exports=ne},function(ee,re,te){ee.exports=te(364)},function(ee,re,te){var ne=te(365);te(389),te(390),te(391),te(392),ee.exports=ne},function(ee,re,te){var ne=te(170);ee.exports=ne},function(ee,re,te){te(171),te(48),te(72),te(374),te(179),te(180),te(388),te(60);var ne=te(7);ee.exports=ne.Promise},function(ee,re,te){var ne=te(1),ie=te(16),oe=te(75),se=te(95),ae=te(368),ce=te(57),ue=te(37),le=te(45),de=te(369),fe=te(370),he=te(77),pe=te(373),ge=te(8)("toStringTag"),me=Error,ye=[].push,ve=function(_e,Ce){var Te,Se=ie(be,this);se?Te=se(me(),Se?oe(this):be):(Te=Se?this:ce(be),ue(Te,ge,"Error")),Ce!==void 0&&ue(Te,"message",pe(Ce)),fe(Te,ve,Te.stack,1),arguments.length>2&&de(Te,arguments[2]);var Re=[];return he(_e,ye,{that:Re}),ue(Te,"errors",Re),Te};se?se(ve,me):ae(ve,me,{name:!0});var be=ve.prototype=ce(me.prototype,{constructor:le(1,ve),message:le(1,""),name:le(1,"AggregateError")});ne({global:!0,constructor:!0,arity:2},{AggregateError:ve})},function(ee,re,te){var ne=te(13),ie=te(151),oe=te(44),se=te(28);ee.exports=function(ae,ce,ue){for(var le=ie(ce),de=se.f,fe=oe.f,he=0;he<le.length;he++){var pe=le[he];ne(ae,pe)||ue&&ne(ue,pe)||de(ae,pe,fe(ce,pe))}}},function(ee,re,te){var ne=te(17),ie=te(37);ee.exports=function(oe,se){ne(se)&&"cause"in se&&ie(oe,"cause",se.cause)}},function(ee,re,te){var ne=te(37),ie=te(371),oe=te(372),se=Error.captureStackTrace;ee.exports=function(ae,ce,ue,le){oe&&(se?se(ae,ce):ne(ae,"stack",ie(ue,le)))}},function(ee,re,te){var ne=te(6),ie=Error,oe=ne("".replace),se=String(ie("zxcasd").stack),ae=/\n\s*at [^:]*:[^\n]*/,ce=ae.test(se);ee.exports=function(ue,le){if(ce&&typeof ue=="string"&&!ie.prepareStackTrace)for(;le--;)ue=oe(ue,ae,"");return ue}},function(ee,re,te){var ne=te(5),ie=te(45);ee.exports=!ne((function(){var oe=Error("a");return!("stack"in oe)||(Object.defineProperty(oe,"stack",ie(1,7)),oe.stack!==7)}))},function(ee,re,te){var ne=te(29);ee.exports=function(ie,oe){return ie===void 0?arguments.length<2?"":oe:ne(ie)}},function(ee,re,te){te(375),te(383),te(384),te(385),te(386),te(387)},function(ee,re,te){var ne,ie,oe,se=te(1),ae=te(26),ce=te(97),ue=te(9),le=te(14),de=te(31),fe=te(95),he=te(47),pe=te(376),ge=te(30),me=te(10),ye=te(17),ve=te(120),be=te(173),_e=te(174).set,Ce=te(378),Te=te(381),Se=te(61),Re=te(176),we=te(58),Ae=te(62),Oe=te(78),Ne=te(49),Ue=Oe.CONSTRUCTOR,Fe=Oe.REJECTION_EVENT,Ve=Oe.SUBCLASSING,He=we.getterFor("Promise"),ur=we.set,qe=Ae&&Ae.prototype,hr=Ae,fr=qe,dr=ue.TypeError,Qe=ue.document,Bt=ue.process,Cr=Ne.f,$e=Cr,Le=!!(Qe&&Qe.createEvent&&ue.dispatchEvent),We=function(Ye){var Ir;return!(!ye(Ye)||!me(Ir=Ye.then))&&Ir},mr=function(Ye,Ir){var Rr,xr,Br,li=Ir.value,Ei=Ir.state==1,gi=Ei?Ye.ok:Ye.fail,ti=Ye.resolve,di=Ye.reject,Xr=Ye.domain;try{gi?(Ei||(Ir.rejection===2&&Yr(Ir),Ir.rejection=1),gi===!0?Rr=li:(Xr&&Xr.enter(),Rr=gi(li),Xr&&(Xr.exit(),Br=!0)),Rr===Ye.promise?di(dr("Promise-chain cycle")):(xr=We(Rr))?le(xr,Rr,ti,di):ti(Rr)):di(li)}catch(Er){Xr&&!Br&&Xr.exit(),di(Er)}},lr=function(Ye,Ir){Ye.notified||(Ye.notified=!0,Ce((function(){for(var Rr,xr=Ye.reactions;Rr=xr.get();)mr(Rr,Ye);Ye.notified=!1,Ir&&!Ye.rejection&&zr(Ye)})))},Sr=function(Ye,Ir,Rr){var xr,Br;Le?((xr=Qe.createEvent("Event")).promise=Ir,xr.reason=Rr,xr.initEvent(Ye,!1,!0),ue.dispatchEvent(xr)):xr={promise:Ir,reason:Rr},!Fe&&(Br=ue["on"+Ye])?Br(xr):Ye==="unhandledrejection"&&Te("Unhandled promise rejection",Rr)},zr=function(Ye){le(_e,ue,(function(){var Ir,Rr=Ye.facade,xr=Ye.value;if($r(Ye)&&(Ir=Se((function(){ce?Bt.emit("unhandledRejection",xr,Rr):Sr("unhandledrejection",Rr,xr)})),Ye.rejection=ce||$r(Ye)?2:1,Ir.error))throw Ir.value}))},$r=function(Ye){return Ye.rejection!==1&&!Ye.parent},Yr=function(Ye){le(_e,ue,(function(){var Ir=Ye.facade;ce?Bt.emit("rejectionHandled",Ir):Sr("rejectionhandled",Ir,Ye.value)}))},ei=function(Ye,Ir,Rr){return function(xr){Ye(Ir,xr,Rr)}},ai=function(Ye,Ir,Rr){Ye.done||(Ye.done=!0,Rr&&(Ye=Rr),Ye.value=Ir,Ye.state=2,lr(Ye,!0))},Gr=function(Ye,Ir,Rr){if(!Ye.done){Ye.done=!0,Rr&&(Ye=Rr);try{if(Ye.facade===Ir)throw dr("Promise can't be resolved itself");var xr=We(Ir);xr?Ce((function(){var Br={done:!1};try{le(xr,Ir,ei(Gr,Br,Ye),ei(ai,Br,Ye))}catch(li){ai(Br,li,Ye)}})):(Ye.value=Ir,Ye.state=1,lr(Ye,!1))}catch(Br){ai({done:!1},Br,Ye)}}};if(Ue&&(fr=(hr=function(Ye){ve(this,fr),ge(Ye),le(ne,this);var Ir=He(this);try{Ye(ei(Gr,Ir),ei(ai,Ir))}catch(Rr){ai(Ir,Rr)}}).prototype,(ne=function(Ye){ur(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Re,rejection:!1,state:0,value:void 0})}).prototype=de(fr,"then",(function(Ye,Ir){var Rr=He(this),xr=Cr(be(this,hr));return Rr.parent=!0,xr.ok=!me(Ye)||Ye,xr.fail=me(Ir)&&Ir,xr.domain=ce?Bt.domain:void 0,Rr.state==0?Rr.reactions.add(xr):Ce((function(){mr(xr,Rr)})),xr.promise})),ie=function(){var Ye=new ne,Ir=He(Ye);this.promise=Ye,this.resolve=ei(Gr,Ir),this.reject=ei(ai,Ir)},Ne.f=Cr=function(Ye){return Ye===hr||Ye===void 0?new ie(Ye):$e(Ye)},!ae&&me(Ae)&&qe!==Object.prototype)){oe=qe.then,Ve||de(qe,"then",(function(Ye,Ir){var Rr=this;return new hr((function(xr,Br){le(oe,Rr,xr,Br)})).then(Ye,Ir)}),{unsafe:!0});try{delete qe.constructor}catch{}fe&&fe(qe,fr)}se({global:!0,constructor:!0,wrap:!0,forced:Ue},{Promise:hr}),he(hr,"Promise",!1,!0),pe("Promise")},function(ee,re,te){var ne=te(24),ie=te(28),oe=te(8),se=te(15),ae=oe("species");ee.exports=function(ce){var ue=ne(ce),le=ie.f;se&&ue&&!ue[ae]&&le(ue,ae,{configurable:!0,get:function(){return this}})}},function(ee,re,te){var ne=te(88),ie=te(69),oe=TypeError;ee.exports=function(se){if(ne(se))return se;throw oe(ie(se)+" is not a constructor")}},function(ee,re,te){var ne,ie,oe,se,ae,ce=te(9),ue=te(46),le=te(44).f,de=te(174).set,fe=te(176),he=te(175),pe=te(379),ge=te(380),me=te(97),ye=ce.MutationObserver||ce.WebKitMutationObserver,ve=ce.document,be=ce.process,_e=ce.Promise,Ce=le(ce,"queueMicrotask"),Te=Ce&&Ce.value;if(!Te){var Se=new fe,Re=function(){var we,Ae;for(me&&(we=be.domain)&&we.exit();Ae=Se.get();)try{Ae()}catch(Oe){throw Se.head&&ne(),Oe}we&&we.enter()};he||me||ge||!ye||!ve?!pe&&_e&&_e.resolve?((se=_e.resolve(void 0)).constructor=_e,ae=ue(se.then,se),ne=function(){ae(Re)}):me?ne=function(){be.nextTick(Re)}:(de=ue(de,ce),ne=function(){de(Re)}):(ie=!0,oe=ve.createTextNode(""),new ye(Re).observe(oe,{characterData:!0}),ne=function(){oe.data=ie=!ie}),Te=function(we){Se.head||ne(),Se.add(we)}}ee.exports=Te},function(ee,re,te){var ne=te(68);ee.exports=/ipad|iphone|ipod/i.test(ne)&&typeof Pebble<"u"},function(ee,re,te){var ne=te(68);ee.exports=/web0s(?!.*chrome)/i.test(ne)},function(ee,re){ee.exports=function(te,ne){try{arguments.length==1?console.error(te):console.error(te,ne)}catch{}}},function(ee,re,te){var ne=te(177),ie=te(97);ee.exports=!ne&&!ie&&typeof window=="object"&&typeof document=="object"},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(30),se=te(49),ae=te(61),ce=te(77);ne({target:"Promise",stat:!0,forced:te(99)},{all:function(ue){var le=this,de=se.f(le),fe=de.resolve,he=de.reject,pe=ae((function(){var ge=oe(le.resolve),me=[],ye=0,ve=1;ce(ue,(function(be){var _e=ye++,Ce=!1;ve++,ie(ge,le,be).then((function(Te){Ce||(Ce=!0,me[_e]=Te,--ve||fe(me))}),he)})),--ve||fe(me)}));return pe.error&&he(pe.value),de.promise}})},function(ee,re,te){var ne=te(1),ie=te(26),oe=te(78).CONSTRUCTOR,se=te(62),ae=te(24),ce=te(10),ue=te(31),le=se&&se.prototype;if(ne({target:"Promise",proto:!0,forced:oe,real:!0},{catch:function(fe){return this.then(void 0,fe)}}),!ie&&ce(se)){var de=ae("Promise").prototype.catch;le.catch!==de&&ue(le,"catch",de,{unsafe:!0})}},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(30),se=te(49),ae=te(61),ce=te(77);ne({target:"Promise",stat:!0,forced:te(99)},{race:function(ue){var le=this,de=se.f(le),fe=de.reject,he=ae((function(){var pe=oe(le.resolve);ce(ue,(function(ge){ie(pe,le,ge).then(de.resolve,fe)}))}));return he.error&&fe(he.value),de.promise}})},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(49);ne({target:"Promise",stat:!0,forced:te(78).CONSTRUCTOR},{reject:function(se){var ae=oe.f(this);return ie(ae.reject,void 0,se),ae.promise}})},function(ee,re,te){var ne=te(1),ie=te(24),oe=te(26),se=te(62),ae=te(78).CONSTRUCTOR,ce=te(178),ue=ie("Promise"),le=oe&&!ae;ne({target:"Promise",stat:!0,forced:oe||ae},{resolve:function(de){return ce(le&&this===ue?se:this,de)}})},function(ee,re,te){var ne=te(1),ie=te(26),oe=te(62),se=te(5),ae=te(24),ce=te(10),ue=te(173),le=te(178),de=te(31),fe=oe&&oe.prototype;if(ne({target:"Promise",proto:!0,real:!0,forced:!!oe&&se((function(){fe.finally.call({then:function(){}},(function(){}))}))},{finally:function(pe){var ge=ue(this,ae("Promise")),me=ce(pe);return this.then(me?function(ye){return le(ge,pe()).then((function(){return ye}))}:pe,me?function(ye){return le(ge,pe()).then((function(){throw ye}))}:pe)}}),!ie&&ce(oe)){var he=ae("Promise").prototype.finally;fe.finally!==he&&de(fe,"finally",he,{unsafe:!0})}},function(ee,re,te){te(171)},function(ee,re,te){te(179)},function(ee,re,te){var ne=te(1),ie=te(49),oe=te(61);ne({target:"Promise",stat:!0,forced:!0},{try:function(se){var ae=ie.f(this),ce=oe(se);return(ce.error?ae.reject:ae.resolve)(ce.value),ae.promise}})},function(ee,re,te){te(180)},function(ee,re,te){ee.exports=te(394)},function(ee,re,te){ee.exports=te(395)},function(ee,re,te){var ne=te(396);ee.exports=ne},function(ee,re,te){var ne=te(397);ee.exports=ne},function(ee,re,te){var ne=te(398);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(399),oe=Array.prototype;ee.exports=function(se){var ae=se.reverse;return se===oe||ne(oe,se)&&ae===oe.reverse?ie:ae}},function(ee,re,te){te(400);var ne=te(21);ee.exports=ne("Array").reverse},function(ee,re,te){var ne=te(1),ie=te(6),oe=te(56),se=ie([].reverse),ae=[1,2];ne({target:"Array",proto:!0,forced:String(ae)===String(ae.reverse())},{reverse:function(){return oe(this)&&(this.length=this.length),se(this)}})},function(ee,re,te){var ne=te(402);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(403),oe=Array.prototype;ee.exports=function(se){var ae=se.concat;return se===oe||ne(oe,se)&&ae===oe.concat?ie:ae}},function(ee,re,te){te(131);var ne=te(21);ee.exports=ne("Array").concat},function(ee,re,te){var ne=te(405);ee.exports=ne},function(ee,re,te){te(406);var ne=te(7);ee.exports=ne.parseInt},function(ee,re,te){var ne=te(1),ie=te(407);ne({global:!0,forced:parseInt!=ie},{parseInt:ie})},function(ee,re,te){var ne=te(9),ie=te(5),oe=te(6),se=te(29),ae=te(181).trim,ce=te(121),ue=ne.parseInt,le=ne.Symbol,de=le&&le.iterator,fe=/^[+-]?0x/i,he=oe(fe.exec),pe=ue(ce+"08")!==8||ue(ce+"0x16")!==22||de&&!ie((function(){ue(Object(de))}));ee.exports=pe?function(ge,me){var ye=ae(se(ge));return ue(ye,me>>>0||(he(fe,ye)?16:10))}:ue},function(ee,re,te){var ne=te(409);ee.exports=ne},function(ee,re,te){te(140);var ne=te(7),ie=te(66);ne.JSON||(ne.JSON={stringify:JSON.stringify}),ee.exports=function(oe,se,ae){return ie(ne.JSON.stringify,null,arguments)}},function(ee,re,te){ee.exports=te(411)},function(ee,re,te){var ne=te(412);ee.exports=ne},function(ee,re,te){var ne=te(413);ee.exports=ne},function(ee,re,te){var ne=te(414);te(39),ee.exports=ne},function(ee,re,te){te(48),te(60);var ne=te(96);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(416),oe=Array.prototype;ee.exports=function(se){var ae=se.indexOf;return se===oe||ne(oe,se)&&ae===oe.indexOf?ie:ae}},function(ee,re,te){te(417);var ne=te(21);ee.exports=ne("Array").indexOf},function(ee,re,te){var ne=te(1),ie=te(81),oe=te(113).indexOf,se=te(153),ae=ie([].indexOf),ce=!!ae&&1/ae([1],1,-0)<0;ne({target:"Array",proto:!0,forced:ce||!se("indexOf")},{indexOf:function(ue){var le=arguments.length>1?arguments[1]:void 0;return ce?ae(this,ue,le)||0:oe(this,ue,le)}})},function(ee,re,te){var ne=te(419);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(420),oe=String.prototype;ee.exports=function(se){var ae=se.trim;return typeof se=="string"||se===oe||ne(oe,se)&&ae===oe.trim?ie:ae}},function(ee,re,te){te(421);var ne=te(21);ee.exports=ne("String").trim},function(ee,re,te){var ne=te(1),ie=te(181).trim;ne({target:"String",proto:!0,forced:te(422)("trim")},{trim:function(){return ie(this)}})},function(ee,re,te){var ne=te(145).PROPER,ie=te(5),oe=te(121);ee.exports=function(se){return ie((function(){return!!oe[se]()||"
"[se]()!=="
"||ne&&oe[se].name!==se}))}},function(ee,re){(function(te){ee.exports=te}).call(this,{})},function(ee,re){var te=function(ne){ne==null&&(ne=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,ne.constructor==Array?this.init_by_array(ne,ne.length):this.init_seed(ne)};te.prototype.init_seed=function(ne){for(this.mt[0]=ne>>>0,this.mti=1;this.mti<this.N;this.mti++)ne=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30,this.mt[this.mti]=(1812433253*((4294901760&ne)>>>16)<<16)+1812433253*(65535&ne)+this.mti,this.mt[this.mti]>>>=0},te.prototype.init_by_array=function(ne,ie){var oe,se,ae;for(this.init_seed(19650218),oe=1,se=0,ae=this.N>ie?this.N:ie;ae;ae--){var ce=this.mt[oe-1]^this.mt[oe-1]>>>30;this.mt[oe]=(this.mt[oe]^(1664525*((4294901760&ce)>>>16)<<16)+1664525*(65535&ce))+ne[se]+se,this.mt[oe]>>>=0,se++,++oe>=this.N&&(this.mt[0]=this.mt[this.N-1],oe=1),se>=ie&&(se=0)}for(ae=this.N-1;ae;ae--)ce=this.mt[oe-1]^this.mt[oe-1]>>>30,this.mt[oe]=(this.mt[oe]^(1566083941*((4294901760&ce)>>>16)<<16)+1566083941*(65535&ce))-oe,this.mt[oe]>>>=0,++oe>=this.N&&(this.mt[0]=this.mt[this.N-1],oe=1);this.mt[0]=2147483648},te.prototype.random_int=function(){var ne,ie=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var oe;for(this.mti==this.N+1&&this.init_seed(5489),oe=0;oe<this.N-this.M;oe++)ne=this.mt[oe]&this.UPPER_MASK|this.mt[oe+1]&this.LOWER_MASK,this.mt[oe]=this.mt[oe+this.M]^ne>>>1^ie[1&ne];for(;oe<this.N-1;oe++)ne=this.mt[oe]&this.UPPER_MASK|this.mt[oe+1]&this.LOWER_MASK,this.mt[oe]=this.mt[oe+(this.M-this.N)]^ne>>>1^ie[1&ne];ne=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^ne>>>1^ie[1&ne],this.mti=0}return ne=this.mt[this.mti++],ne^=ne>>>11,ne^=ne<<7&2636928640,ne^=ne<<15&4022730752,(ne^=ne>>>18)>>>0},te.prototype.random_int31=function(){return this.random_int()>>>1},te.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},te.prototype.random=function(){return this.random_int()*(1/4294967296)},te.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},te.prototype.random_long=function(){return(67108864*(this.random_int()>>>5)+(this.random_int()>>>6))*(1/9007199254740992)},ee.exports=te},function(ee,re,te){te(39);var ne=te(38),ie=te(13),oe=te(16),se=te(426),ae=Array.prototype,ce={DOMTokenList:!0,NodeList:!0};ee.exports=function(ue){var le=ue.entries;return ue===ae||oe(ae,ue)&&le===ae.entries||ie(ce,ne(ue))?se:le}},function(ee,re,te){var ne=te(427);ee.exports=ne},function(ee,re,te){te(48),te(72);var ne=te(21);ee.exports=ne("Array").entries},function(ee,re,te){var ne=te(429);te(39),ee.exports=ne},function(ee,re,te){te(183);var ne=te(7);ee.exports=ne.URLSearchParams},function(ee,re,te){var ne=te(31);ee.exports=function(ie,oe,se){for(var ae in oe)se&&se.unsafe&&ie[ae]?ie[ae]=oe[ae]:ne(ie,ae,oe[ae],se);return ie}},function(ee,re,te){var ne=te(117),ie=Math.floor,oe=function(ce,ue){var le=ce.length,de=ie(le/2);return le<8?se(ce,ue):ae(ce,oe(ne(ce,0,de),ue),oe(ne(ce,de),ue),ue)},se=function(ce,ue){for(var le,de,fe=ce.length,he=1;he<fe;){for(de=he,le=ce[he];de&&ue(ce[de-1],le)>0;)ce[de]=ce[--de];de!==he++&&(ce[de]=le)}return ce},ae=function(ce,ue,le,de){for(var fe=ue.length,he=le.length,pe=0,ge=0;pe<fe||ge<he;)ce[pe+ge]=pe<fe&&ge<he?de(ue[pe],le[ge])<=0?ue[pe++]:le[ge++]:pe<fe?ue[pe++]:le[ge++];return ce};ee.exports=oe},function(ee,re,te){var ne=te(433);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(434),oe=String.prototype;ee.exports=function(se){var ae=se.startsWith;return typeof se=="string"||se===oe||ne(oe,se)&&ae===oe.startsWith?ie:ae}},function(ee,re,te){te(435);var ne=te(21);ee.exports=ne("String").startsWith},function(ee,re,te){var ne,ie=te(1),oe=te(81),se=te(44).f,ae=te(132),ce=te(29),ue=te(161),le=te(54),de=te(162),fe=te(26),he=oe("".startsWith),pe=oe("".slice),ge=Math.min,me=de("startsWith");ie({target:"String",proto:!0,forced:!!(fe||me||(ne=se(String.prototype,"startsWith"),!ne||ne.writable))&&!me},{startsWith:function(ye){var ve=ce(le(this));ue(ye);var be=ae(ge(arguments.length>1?arguments[1]:void 0,ve.length)),_e=ce(ye);return he?he(ve,_e,be):pe(ve,be,be+_e.length)===_e}})},function(ee,re,te){te(39);var ne=te(38),ie=te(13),oe=te(16),se=te(437),ae=Array.prototype,ce={DOMTokenList:!0,NodeList:!0};ee.exports=function(ue){var le=ue.keys;return ue===ae||oe(ae,ue)&&le===ae.keys||ie(ce,ne(ue))?se:le}},function(ee,re,te){var ne=te(438);ee.exports=ne},function(ee,re,te){te(48),te(72);var ne=te(21);ee.exports=ne("Array").keys},function(ee,re,te){var ne=te(440);ee.exports=ne},function(ee,re,te){te(441),te(445),te(183);var ne=te(7);ee.exports=ne.URL},function(ee,re,te){te(442)},function(ee,re,te){te(60);var ne,ie=te(1),oe=te(15),se=te(185),ae=te(9),ce=te(46),ue=te(6),le=te(31),de=te(443),fe=te(120),he=te(13),pe=te(160),ge=te(165),me=te(117),ye=te(150).codeAt,ve=te(444),be=te(29),_e=te(47),Ce=te(98),Te=te(184),Se=te(58),Re=Se.set,we=Se.getterFor("URL"),Ae=Te.URLSearchParams,Oe=Te.getState,Ne=ae.URL,Ue=ae.TypeError,Fe=ae.parseInt,Ve=Math.floor,He=Math.pow,ur=ue("".charAt),qe=ue(/./.exec),hr=ue([].join),fr=ue(1 .toString),dr=ue([].pop),Qe=ue([].push),Bt=ue("".replace),Cr=ue([].shift),$e=ue("".split),Le=ue("".slice),We=ue("".toLowerCase),mr=ue([].unshift),lr=/[a-z]/i,Sr=/[\d+-.a-z]/i,zr=/\d/,$r=/^0x/i,Yr=/^[0-7]+$/,ei=/^\d+$/,ai=/^[\da-f]+$/i,Gr=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ye=/[\0\t\n\r #/:<>?@[\\\]^|]/,Ir=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Rr=/[\t\n\r]/g,xr=function(Be){var Xe,Ge,Ur,je;if(typeof Be=="number"){for(Xe=[],Ge=0;Ge<4;Ge++)mr(Xe,Be%256),Be=Ve(Be/256);return hr(Xe,".")}if(typeof Be=="object"){for(Xe="",Ur=(function(Kr){for(var Vr=null,Dr=1,Me=null,Ze=0,Hr=0;Hr<8;Hr++)Kr[Hr]!==0?(Ze>Dr&&(Vr=Me,Dr=Ze),Me=null,Ze=0):(Me===null&&(Me=Hr),++Ze);return Ze>Dr&&(Vr=Me,Dr=Ze),Vr})(Be),Ge=0;Ge<8;Ge++)je&&Be[Ge]===0||(je&&(je=!1),Ur===Ge?(Xe+=Ge?":":"::",je=!0):(Xe+=fr(Be[Ge],16),Ge<7&&(Xe+=":")));return"["+Xe+"]"}return Be},Br={},li=pe({},Br,{" ":1,'"':1,"<":1,">":1,"`":1}),Ei=pe({},li,{"#":1,"?":1,"{":1,"}":1}),gi=pe({},Ei,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ti=function(Be,Xe){var Ge=ye(Be,0);return Ge>32&&Ge<127&&!he(Xe,Be)?Be:encodeURIComponent(Be)},di={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Xr=function(Be,Xe){var Ge;return Be.length==2&&qe(lr,ur(Be,0))&&((Ge=ur(Be,1))==":"||!Xe&&Ge=="|")},Er=function(Be){var Xe;return Be.length>1&&Xr(Le(Be,0,2))&&(Be.length==2||(Xe=ur(Be,2))==="/"||Xe==="\\"||Xe==="?"||Xe==="#")},Lr=function(Be){return Be==="."||We(Be)==="%2e"},Pr={},Mr={},Zr={},Je={},Tr={},Or={},Nr={},jr={},mi={},Ii={},Oi={},Si={},Ni={},zi={},Ji={},$i={},Ui={},wi={},Zi={},Di={},Ai={},ji=function(Be,Xe,Ge){var Ur,je,Kr,Vr=be(Be);if(Xe){if(je=this.parse(Vr))throw Ue(je);this.searchParams=null}else{if(Ge!==void 0&&(Ur=new ji(Ge,!0)),je=this.parse(Vr,null,Ur))throw Ue(je);(Kr=Oe(new Ae)).bindURL(this),this.searchParams=Kr}};ji.prototype={type:"URL",parse:function(Be,Xe,Ge){var Ur,je,Kr,Vr,Dr,Me=this,Ze=Xe||Pr,Hr=0,Ar="",Qr=!1,ri=!1,Ti=!1;for(Be=be(Be),Xe||(Me.scheme="",Me.username="",Me.password="",Me.host=null,Me.port=null,Me.path=[],Me.query=null,Me.fragment=null,Me.cannotBeABaseURL=!1,Be=Bt(Be,Ir,"")),Be=Bt(Be,Rr,""),Ur=ge(Be);Hr<=Ur.length;){switch(je=Ur[Hr],Ze){case Pr:if(!je||!qe(lr,je)){if(Xe)return"Invalid scheme";Ze=Zr;continue}Ar+=We(je),Ze=Mr;break;case Mr:if(je&&(qe(Sr,je)||je=="+"||je=="-"||je=="."))Ar+=We(je);else{if(je!=":"){if(Xe)return"Invalid scheme";Ar="",Ze=Zr,Hr=0;continue}if(Xe&&(Me.isSpecial()!=he(di,Ar)||Ar=="file"&&(Me.includesCredentials()||Me.port!==null)||Me.scheme=="file"&&!Me.host))return;if(Me.scheme=Ar,Xe)return void(Me.isSpecial()&&di[Me.scheme]==Me.port&&(Me.port=null));Ar="",Me.scheme=="file"?Ze=zi:Me.isSpecial()&&Ge&&Ge.scheme==Me.scheme?Ze=Je:Me.isSpecial()?Ze=jr:Ur[Hr+1]=="/"?(Ze=Tr,Hr++):(Me.cannotBeABaseURL=!0,Qe(Me.path,""),Ze=Zi)}break;case Zr:if(!Ge||Ge.cannotBeABaseURL&&je!="#")return"Invalid scheme";if(Ge.cannotBeABaseURL&&je=="#"){Me.scheme=Ge.scheme,Me.path=me(Ge.path),Me.query=Ge.query,Me.fragment="",Me.cannotBeABaseURL=!0,Ze=Ai;break}Ze=Ge.scheme=="file"?zi:Or;continue;case Je:if(je!="/"||Ur[Hr+1]!="/"){Ze=Or;continue}Ze=mi,Hr++;break;case Tr:if(je=="/"){Ze=Ii;break}Ze=wi;continue;case Or:if(Me.scheme=Ge.scheme,je==ne)Me.username=Ge.username,Me.password=Ge.password,Me.host=Ge.host,Me.port=Ge.port,Me.path=me(Ge.path),Me.query=Ge.query;else if(je=="/"||je=="\\"&&Me.isSpecial())Ze=Nr;else if(je=="?")Me.username=Ge.username,Me.password=Ge.password,Me.host=Ge.host,Me.port=Ge.port,Me.path=me(Ge.path),Me.query="",Ze=Di;else{if(je!="#"){Me.username=Ge.username,Me.password=Ge.password,Me.host=Ge.host,Me.port=Ge.port,Me.path=me(Ge.path),Me.path.length--,Ze=wi;continue}Me.username=Ge.username,Me.password=Ge.password,Me.host=Ge.host,Me.port=Ge.port,Me.path=me(Ge.path),Me.query=Ge.query,Me.fragment="",Ze=Ai}break;case Nr:if(!Me.isSpecial()||je!="/"&&je!="\\"){if(je!="/"){Me.username=Ge.username,Me.password=Ge.password,Me.host=Ge.host,Me.port=Ge.port,Ze=wi;continue}Ze=Ii}else Ze=mi;break;case jr:if(Ze=mi,je!="/"||ur(Ar,Hr+1)!="/")continue;Hr++;break;case mi:if(je!="/"&&je!="\\"){Ze=Ii;continue}break;case Ii:if(je=="@"){Qr&&(Ar="%40"+Ar),Qr=!0,Kr=ge(Ar);for(var bi=0;bi<Kr.length;bi++){var oi=Kr[bi];if(oi!=":"||Ti){var eo=ti(oi,gi);Ti?Me.password+=eo:Me.username+=eo}else Ti=!0}Ar=""}else if(je==ne||je=="/"||je=="?"||je=="#"||je=="\\"&&Me.isSpecial()){if(Qr&&Ar=="")return"Invalid authority";Hr-=ge(Ar).length+1,Ar="",Ze=Oi}else Ar+=je;break;case Oi:case Si:if(Xe&&Me.scheme=="file"){Ze=$i;continue}if(je!=":"||ri){if(je==ne||je=="/"||je=="?"||je=="#"||je=="\\"&&Me.isSpecial()){if(Me.isSpecial()&&Ar=="")return"Invalid host";if(Xe&&Ar==""&&(Me.includesCredentials()||Me.port!==null))return;if(Vr=Me.parseHost(Ar))return Vr;if(Ar="",Ze=Ui,Xe)return;continue}je=="["?ri=!0:je=="]"&&(ri=!1),Ar+=je}else{if(Ar=="")return"Invalid host";if(Vr=Me.parseHost(Ar))return Vr;if(Ar="",Ze=Ni,Xe==Si)return}break;case Ni:if(!qe(zr,je)){if(je==ne||je=="/"||je=="?"||je=="#"||je=="\\"&&Me.isSpecial()||Xe){if(Ar!=""){var qi=Fe(Ar,10);if(qi>65535)return"Invalid port";Me.port=Me.isSpecial()&&qi===di[Me.scheme]?null:qi,Ar=""}if(Xe)return;Ze=Ui;continue}return"Invalid port"}Ar+=je;break;case zi:if(Me.scheme="file",je=="/"||je=="\\")Ze=Ji;else{if(!Ge||Ge.scheme!="file"){Ze=wi;continue}if(je==ne)Me.host=Ge.host,Me.path=me(Ge.path),Me.query=Ge.query;else if(je=="?")Me.host=Ge.host,Me.path=me(Ge.path),Me.query="",Ze=Di;else{if(je!="#"){Er(hr(me(Ur,Hr),""))||(Me.host=Ge.host,Me.path=me(Ge.path),Me.shortenPath()),Ze=wi;continue}Me.host=Ge.host,Me.path=me(Ge.path),Me.query=Ge.query,Me.fragment="",Ze=Ai}}break;case Ji:if(je=="/"||je=="\\"){Ze=$i;break}Ge&&Ge.scheme=="file"&&!Er(hr(me(Ur,Hr),""))&&(Xr(Ge.path[0],!0)?Qe(Me.path,Ge.path[0]):Me.host=Ge.host),Ze=wi;continue;case $i:if(je==ne||je=="/"||je=="\\"||je=="?"||je=="#"){if(!Xe&&Xr(Ar))Ze=wi;else if(Ar==""){if(Me.host="",Xe)return;Ze=Ui}else{if(Vr=Me.parseHost(Ar))return Vr;if(Me.host=="localhost"&&(Me.host=""),Xe)return;Ar="",Ze=Ui}continue}Ar+=je;break;case Ui:if(Me.isSpecial()){if(Ze=wi,je!="/"&&je!="\\")continue}else if(Xe||je!="?")if(Xe||je!="#"){if(je!=ne&&(Ze=wi,je!="/"))continue}else Me.fragment="",Ze=Ai;else Me.query="",Ze=Di;break;case wi:if(je==ne||je=="/"||je=="\\"&&Me.isSpecial()||!Xe&&(je=="?"||je=="#")){if((Dr=We(Dr=Ar))===".."||Dr==="%2e."||Dr===".%2e"||Dr==="%2e%2e"?(Me.shortenPath(),je=="/"||je=="\\"&&Me.isSpecial()||Qe(Me.path,"")):Lr(Ar)?je=="/"||je=="\\"&&Me.isSpecial()||Qe(Me.path,""):(Me.scheme=="file"&&!Me.path.length&&Xr(Ar)&&(Me.host&&(Me.host=""),Ar=ur(Ar,0)+":"),Qe(Me.path,Ar)),Ar="",Me.scheme=="file"&&(je==ne||je=="?"||je=="#"))for(;Me.path.length>1&&Me.path[0]==="";)Cr(Me.path);je=="?"?(Me.query="",Ze=Di):je=="#"&&(Me.fragment="",Ze=Ai)}else Ar+=ti(je,Ei);break;case Zi:je=="?"?(Me.query="",Ze=Di):je=="#"?(Me.fragment="",Ze=Ai):je!=ne&&(Me.path[0]+=ti(je,Br));break;case Di:Xe||je!="#"?je!=ne&&(je=="'"&&Me.isSpecial()?Me.query+="%27":Me.query+=je=="#"?"%23":ti(je,Br)):(Me.fragment="",Ze=Ai);break;case Ai:je!=ne&&(Me.fragment+=ti(je,li))}Hr++}},parseHost:function(Be){var Xe,Ge,Ur;if(ur(Be,0)=="["){if(ur(Be,Be.length-1)!="]"||!(Xe=(function(je){var Kr,Vr,Dr,Me,Ze,Hr,Ar,Qr=[0,0,0,0,0,0,0,0],ri=0,Ti=null,bi=0,oi=function(){return ur(je,bi)};if(oi()==":"){if(ur(je,1)!=":")return;bi+=2,Ti=++ri}for(;oi();){if(ri==8)return;if(oi()!=":"){for(Kr=Vr=0;Vr<4&&qe(ai,oi());)Kr=16*Kr+Fe(oi(),16),bi++,Vr++;if(oi()=="."){if(Vr==0||(bi-=Vr,ri>6))return;for(Dr=0;oi();){if(Me=null,Dr>0){if(!(oi()=="."&&Dr<4))return;bi++}if(!qe(zr,oi()))return;for(;qe(zr,oi());){if(Ze=Fe(oi(),10),Me===null)Me=Ze;else{if(Me==0)return;Me=10*Me+Ze}if(Me>255)return;bi++}Qr[ri]=256*Qr[ri]+Me,++Dr!=2&&Dr!=4||ri++}if(Dr!=4)return;break}if(oi()==":"){if(bi++,!oi())return}else if(oi())return;Qr[ri++]=Kr}else{if(Ti!==null)return;bi++,Ti=++ri}}if(Ti!==null)for(Hr=ri-Ti,ri=7;ri!=0&&Hr>0;)Ar=Qr[ri],Qr[ri--]=Qr[Ti+Hr-1],Qr[Ti+--Hr]=Ar;else if(ri!=8)return;return Qr})(Le(Be,1,-1))))return"Invalid host";this.host=Xe}else if(this.isSpecial()){if(Be=ve(Be),qe(Gr,Be)||(Xe=(function(je){var Kr,Vr,Dr,Me,Ze,Hr,Ar,Qr=$e(je,".");if(Qr.length&&Qr[Qr.length-1]==""&&Qr.length--,(Kr=Qr.length)>4)return je;for(Vr=[],Dr=0;Dr<Kr;Dr++){if((Me=Qr[Dr])=="")return je;if(Ze=10,Me.length>1&&ur(Me,0)=="0"&&(Ze=qe($r,Me)?16:8,Me=Le(Me,Ze==8?1:2)),Me==="")Hr=0;else{if(!qe(Ze==10?ei:Ze==8?Yr:ai,Me))return je;Hr=Fe(Me,Ze)}Qe(Vr,Hr)}for(Dr=0;Dr<Kr;Dr++)if(Hr=Vr[Dr],Dr==Kr-1){if(Hr>=He(256,5-Kr))return null}else if(Hr>255)return null;for(Ar=dr(Vr),Dr=0;Dr<Vr.length;Dr++)Ar+=Vr[Dr]*He(256,3-Dr);return Ar})(Be))===null)return"Invalid host";this.host=Xe}else{if(qe(Ye,Be))return"Invalid host";for(Xe="",Ge=ge(Be),Ur=0;Ur<Ge.length;Ur++)Xe+=ti(Ge[Ur],Br);this.host=Xe}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme=="file"},includesCredentials:function(){return this.username!=""||this.password!=""},isSpecial:function(){return he(di,this.scheme)},shortenPath:function(){var Be=this.path,Xe=Be.length;!Xe||this.scheme=="file"&&Xe==1&&Xr(Be[0],!0)||Be.length--},serialize:function(){var Be=this,Xe=Be.scheme,Ge=Be.username,Ur=Be.password,je=Be.host,Kr=Be.port,Vr=Be.path,Dr=Be.query,Me=Be.fragment,Ze=Xe+":";return je!==null?(Ze+="//",Be.includesCredentials()&&(Ze+=Ge+(Ur?":"+Ur:"")+"@"),Ze+=xr(je),Kr!==null&&(Ze+=":"+Kr)):Xe=="file"&&(Ze+="//"),Ze+=Be.cannotBeABaseURL?Vr[0]:Vr.length?"/"+hr(Vr,"/"):"",Dr!==null&&(Ze+="?"+Dr),Me!==null&&(Ze+="#"+Me),Ze},setHref:function(Be){var Xe=this.parse(Be);if(Xe)throw Ue(Xe);this.searchParams.update()},getOrigin:function(){var Be=this.scheme,Xe=this.port;if(Be=="blob")try{return new Fi(Be.path[0]).origin}catch{return"null"}return Be!="file"&&this.isSpecial()?Be+"://"+xr(this.host)+(Xe!==null?":"+Xe:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(Be){this.parse(be(Be)+":",Pr)},getUsername:function(){return this.username},setUsername:function(Be){var Xe=ge(be(Be));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var Ge=0;Ge<Xe.length;Ge++)this.username+=ti(Xe[Ge],gi)}},getPassword:function(){return this.password},setPassword:function(Be){var Xe=ge(be(Be));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var Ge=0;Ge<Xe.length;Ge++)this.password+=ti(Xe[Ge],gi)}},getHost:function(){var Be=this.host,Xe=this.port;return Be===null?"":Xe===null?xr(Be):xr(Be)+":"+Xe},setHost:function(Be){this.cannotBeABaseURL||this.parse(Be,Oi)},getHostname:function(){var Be=this.host;return Be===null?"":xr(Be)},setHostname:function(Be){this.cannotBeABaseURL||this.parse(Be,Si)},getPort:function(){var Be=this.port;return Be===null?"":be(Be)},setPort:function(Be){this.cannotHaveUsernamePasswordPort()||((Be=be(Be))==""?this.port=null:this.parse(Be,Ni))},getPathname:function(){var Be=this.path;return this.cannotBeABaseURL?Be[0]:Be.length?"/"+hr(Be,"/"):""},setPathname:function(Be){this.cannotBeABaseURL||(this.path=[],this.parse(Be,Ui))},getSearch:function(){var Be=this.query;return Be?"?"+Be:""},setSearch:function(Be){(Be=be(Be))==""?this.query=null:(ur(Be,0)=="?"&&(Be=Le(Be,1)),this.query="",this.parse(Be,Di)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var Be=this.fragment;return Be?"#"+Be:""},setHash:function(Be){(Be=be(Be))!=""?(ur(Be,0)=="#"&&(Be=Le(Be,1)),this.fragment="",this.parse(Be,Ai)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Fi=function(Be){var Xe=fe(this,ci),Ge=Ce(arguments.length,1)>1?arguments[1]:void 0,Ur=Re(Xe,new ji(Be,!1,Ge));oe||(Xe.href=Ur.serialize(),Xe.origin=Ur.getOrigin(),Xe.protocol=Ur.getProtocol(),Xe.username=Ur.getUsername(),Xe.password=Ur.getPassword(),Xe.host=Ur.getHost(),Xe.hostname=Ur.getHostname(),Xe.port=Ur.getPort(),Xe.pathname=Ur.getPathname(),Xe.search=Ur.getSearch(),Xe.searchParams=Ur.getSearchParams(),Xe.hash=Ur.getHash())},ci=Fi.prototype,vi=function(Be,Xe){return{get:function(){return we(this)[Be]()},set:Xe&&function(Ge){return we(this)[Xe](Ge)},configurable:!0,enumerable:!0}};if(oe&&(de(ci,"href",vi("serialize","setHref")),de(ci,"origin",vi("getOrigin")),de(ci,"protocol",vi("getProtocol","setProtocol")),de(ci,"username",vi("getUsername","setUsername")),de(ci,"password",vi("getPassword","setPassword")),de(ci,"host",vi("getHost","setHost")),de(ci,"hostname",vi("getHostname","setHostname")),de(ci,"port",vi("getPort","setPort")),de(ci,"pathname",vi("getPathname","setPathname")),de(ci,"search",vi("getSearch","setSearch")),de(ci,"searchParams",vi("getSearchParams")),de(ci,"hash",vi("getHash","setHash"))),le(ci,"toJSON",(function(){return we(this).serialize()}),{enumerable:!0}),le(ci,"toString",(function(){return we(this).serialize()}),{enumerable:!0}),Ne){var Wi=Ne.createObjectURL,Qi=Ne.revokeObjectURL;Wi&&le(Fi,"createObjectURL",ce(Wi,Ne)),Qi&&le(Fi,"revokeObjectURL",ce(Qi,Ne))}_e(Fi,"URL"),ie({global:!0,constructor:!0,forced:!se,sham:!oe},{URL:Fi})},function(ee,re,te){var ne=te(28);ee.exports=function(ie,oe,se){return ne.f(ie,oe,se)}},function(ee,re,te){var ne=te(6),ie=/[^\0-\u007E]/,oe=/[.\u3002\uFF0E\uFF61]/g,se="Overflow: input needs wider integers to process",ae=RangeError,ce=ne(oe.exec),ue=Math.floor,le=String.fromCharCode,de=ne("".charCodeAt),fe=ne([].join),he=ne([].push),pe=ne("".replace),ge=ne("".split),me=ne("".toLowerCase),ye=function(_e){return _e+22+75*(_e<26)},ve=function(_e,Ce,Te){var Se=0;for(_e=Te?ue(_e/700):_e>>1,_e+=ue(_e/Ce);_e>455;)_e=ue(_e/35),Se+=36;return ue(Se+36*_e/(_e+38))},be=function(_e){var Ce,Te,Se=[],Re=(_e=(function(dr){for(var Qe=[],Bt=0,Cr=dr.length;Bt<Cr;){var $e=de(dr,Bt++);if($e>=55296&&$e<=56319&&Bt<Cr){var Le=de(dr,Bt++);(64512&Le)==56320?he(Qe,((1023&$e)<<10)+(1023&Le)+65536):(he(Qe,$e),Bt--)}else he(Qe,$e)}return Qe})(_e)).length,we=128,Ae=0,Oe=72;for(Ce=0;Ce<_e.length;Ce++)(Te=_e[Ce])<128&&he(Se,le(Te));var Ne=Se.length,Ue=Ne;for(Ne&&he(Se,"-");Ue<Re;){var Fe=2147483647;for(Ce=0;Ce<_e.length;Ce++)(Te=_e[Ce])>=we&&Te<Fe&&(Fe=Te);var Ve=Ue+1;if(Fe-we>ue((2147483647-Ae)/Ve))throw ae(se);for(Ae+=(Fe-we)*Ve,we=Fe,Ce=0;Ce<_e.length;Ce++){if((Te=_e[Ce])<we&&++Ae>2147483647)throw ae(se);if(Te==we){for(var He=Ae,ur=36;;){var qe=ur<=Oe?1:ur>=Oe+26?26:ur-Oe;if(He<qe)break;var hr=He-qe,fr=36-qe;he(Se,le(ye(qe+hr%fr))),He=ue(hr/fr),ur+=36}he(Se,le(ye(He))),Oe=ve(Ae,Ve,Ue==Ne),Ae=0,Ue++}}Ae++,we++}return fe(Se,"")};ee.exports=function(_e){var Ce,Te,Se=[],Re=ge(pe(me(_e),oe,"."),".");for(Ce=0;Ce<Re.length;Ce++)Te=Re[Ce],he(Se,ce(ie,Te)?"xn--"+be(Te):Te);return fe(Se,".")}},function(ee,re){},function(ee,re,te){ee.exports=te(447)},function(ee,re,te){ee.exports=te(448)},function(ee,re,te){var ne=te(449);ee.exports=ne},function(ee,re,te){var ne=te(450);ee.exports=ne},function(ee,re,te){var ne=te(451);ee.exports=ne},function(ee,re,te){te(452);var ne=te(7);ee.exports=ne.Reflect.get},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(17),se=te(20),ae=te(453),ce=te(44),ue=te(75);ne({target:"Reflect",stat:!0},{get:function le(de,fe){var he,pe,ge=arguments.length<3?de:arguments[2];return se(de)===ge?de[fe]:(he=ce.f(de,fe))?ae(he)?he.value:he.get===void 0?void 0:ie(he.get,ge):oe(pe=ue(de))?le(pe,fe,ge):void 0}})},function(ee,re,te){var ne=te(13);ee.exports=function(ie){return ie!==void 0&&(ne(ie,"value")||ne(ie,"writable"))}},function(ee,re,te){ee.exports=te(455)},function(ee,re,te){ee.exports=te(456)},function(ee,re,te){var ne=te(457);ee.exports=ne},function(ee,re,te){var ne=te(154);ee.exports=ne},function(ee,re,te){var ne=te(25);ee.exports=function(ie,oe){for(;!Object.prototype.hasOwnProperty.call(ie,oe)&&(ie=ne(ie))!==null;);return ie},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){te(460);var ne=te(7);ee.exports=ne.setInterval},function(ee,re,te){te(461),te(463)},function(ee,re,te){var ne=te(1),ie=te(9),oe=te(186)(ie.setInterval,!0);ne({global:!0,bind:!0,forced:ie.setInterval!==oe},{setInterval:oe})},function(ee,re){ee.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"},function(ee,re,te){var ne=te(1),ie=te(9),oe=te(186)(ie.setTimeout,!0);ne({global:!0,bind:!0,forced:ie.setTimeout!==oe},{setTimeout:oe})},function(ee,re,te){ee.exports=te(465)},function(ee,re,te){ee.exports=te(466)},function(ee,re,te){var ne=te(467);ee.exports=ne},function(ee,re,te){var ne=te(155);ee.exports=ne},function(ee,re,te){ee.exports=te(469)},function(ee,re,te){var ne=te(470);ee.exports=ne},function(ee,re,te){var ne=te(182);ee.exports=ne},function(ee,re,te){var ne=te(472),ie=te(187);ee.exports=function(oe,se){if(oe==null)return{};var ae,ce,ue={},le=ne(oe);for(ce=0;ce<le.length;ce++)ae=le[ce],ie(se).call(se,ae)>=0||(ue[ae]=oe[ae]);return ue},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(473)},function(ee,re,te){ee.exports=te(474)},function(ee,re,te){var ne=te(475);ee.exports=ne},function(ee,re,te){var ne=te(156);ee.exports=ne},function(ee,re,te){te.r(re),te.d(re,"singularSdk",(function(){return Pa})),te.d(re,"SingularConfig",(function(){return La})),te.d(re,"LinkParams",(function(){return ka})),te.d(re,"BannersOptions",(function(){return Na}));var ne={};te.r(ne),te.d(ne,"DefaultSessionTimeoutMinutes",(function(){return $e})),te.d(ne,"Version",(function(){return Le})),te.d(ne,"SdidPersistModeOff",(function(){return We})),te.d(ne,"SdidPersistModeAuto",(function(){return mr})),te.d(ne,"SdidPersistModeManual",(function(){return lr})),te.d(ne,"ECID_PREFIX",(function(){return Sr}));var ie={};te.r(ie),te.d(ie,"TabClosed",(function(){return zr}));var oe={};te.r(oe),te.d(oe,"ConversionEventApi",(function(){return $r})),te.d(oe,"CustomUserIdEventApi",(function(){return Yr})),te.d(oe,"EventApi",(function(){return ei})),te.d(oe,"PageVisitApi",(function(){return ai})),te.d(oe,"PageVisitEventName",(function(){return Gr})),te.d(oe,"SetMatchIdEventName",(function(){return Ye})),te.d(oe,"FetchBanner",(function(){return Ir}));var se={};te.r(se),te.d(se,"ApiQueueKey",(function(){return Rr})),te.d(se,"CustomUserIdKey",(function(){return xr})),te.d(se,"BannerLastDismissedKey",(function(){return Br})),te.d(se,"DidVisitSiteKey",(function(){return li})),te.d(se,"DidSendEventKeyBase",(function(){return Ei})),te.d(se,"ConversionEventOccurredKey",(function(){return gi})),te.d(se,"GlobalStoragePrefix",(function(){return ti})),te.d(se,"GlobalProperties",(function(){return di})),te.d(se,"MaxApisInQueue",(function(){return Xr})),te.d(se,"SessionIdKey",(function(){return Er})),te.d(se,"FirstPageVisitOccurredKey",(function(){return Lr})),te.d(se,"FirstPageVisitURL",(function(){return Pr})),te.d(se,"SingularDeviceIdKey",(function(){return Mr})),te.d(se,"MatchIdKey",(function(){return Zr})),te.d(se,"SingularInstanceIdKey",(function(){return Je})),te.d(se,"StorageEnabledTestKey",(function(){return Tr})),te.d(se,"StorageEnabledTestValue",(function(){return Or})),te.d(se,"StorageLastEventTimestamp",(function(){return Nr})),te.d(se,"StorageTouchpointTimestampKey",(function(){return jr})),te.d(se,"StorageWebUrlKey",(function(){return mi})),te.d(se,"Types",(function(){return Ii}));var ae={};te.r(ae),te.d(ae,"AppName",(function(){return Oi})),te.d(ae,"BrowserAvailableMemory",(function(){return Si})),te.d(ae,"BrowserUsedMemory",(function(){return Ni})),te.d(ae,"BannerShowsCounter",(function(){return zi})),te.d(ae,"BannerSourceUrl",(function(){return Ji})),te.d(ae,"ClientHints",(function(){return $i})),te.d(ae,"CustomUserId",(function(){return Ui})),te.d(ae,"CurrentDeviceTime",(function(){return wi})),te.d(ae,"DeeplinkParam",(function(){return Zi})),te.d(ae,"DeferredDeeplinkParam",(function(){return Di})),te.d(ae,"DocumentReferrer",(function(){return Ai})),te.d(ae,"EventId",(function(){return ji})),te.d(ae,"EventName",(function(){return Fi})),te.d(ae,"EventProductName",(function(){return ci})),te.d(ae,"Extra",(function(){return vi})),te.d(ae,"GlobalProperties",(function(){return Wi})),te.d(ae,"IsConversion",(function(){return Qi})),te.d(ae,"IsFirstEvent",(function(){return Be})),te.d(ae,"IsFirstVisit",(function(){return Xe})),te.d(ae,"IsFirstPageVisitInSession",(function(){return Ge})),te.d(ae,"isAfterConversionEvent",(function(){return Ur})),te.d(ae,"IsPageRefreshed",(function(){return je})),te.d(ae,"IsRevenueEvent",(function(){return Kr})),te.d(ae,"IsSetMatchId",(function(){return Vr})),te.d(ae,"Keyspace",(function(){return Dr})),te.d(ae,"Lag",(function(){return Me})),te.d(ae,"Locale",(function(){return Ze})),te.d(ae,"MatchId",(function(){return Hr})),te.d(ae,"OS",(function(){return Ar})),te.d(ae,"ECID",(function(){return Qr})),te.d(ae,"Owner",(function(){return ri})),te.d(ae,"PassthroughParam",(function(){return Ti})),te.d(ae,"Platform",(function(){return bi})),te.d(ae,"PlatformWeb",(function(){return oi})),te.d(ae,"PreviousSdid",(function(){return eo})),te.d(ae,"ProductId",(function(){return qi})),te.d(ae,"RevenueAmount",(function(){return Do})),te.d(ae,"RevenueCurrency",(function(){return Mo})),te.d(ae,"ScreenHeight",(function(){return Uo})),te.d(ae,"ScreenWidth",(function(){return Fo})),te.d(ae,"SdidPersistMode",(function(){return $o})),te.d(ae,"SdidPersistFailedReason",(function(){return Bo})),te.d(ae,"SdkVersion",(function(){return Vo})),te.d(ae,"SessionId",(function(){return Ho})),te.d(ae,"SingularDeviceId",(function(){return zo})),te.d(ae,"SingularInstanceId",(function(){return jo})),te.d(ae,"StorageType",(function(){return Wo})),te.d(ae,"Timezone",(function(){return qo})),te.d(ae,"TouchpointTimestamp",(function(){return Go})),te.d(ae,"UserAgent",(function(){return mo})),te.d(ae,"UUID",(function(){return Ko})),te.d(ae,"UUID_REGEX",(function(){return Yo})),te.d(ae,"WebParams",(function(){return Xo})),te.d(ae,"WebUrl",(function(){return vo})),te.d(ae,"LastDismissed",(function(){return Jo})),te.d(ae,"BannerName",(function(){return Zo})),te.d(ae,"BannerID",(function(){return Qo})),te.d(ae,"Source",(function(){return ts})),te.d(ae,"WebUrlMarketingParams",(function(){return rs}));var ce={};te.r(ce),te.d(ce,"BaseUrl",(function(){return ns})),te.d(ce,"ContentType",(function(){return is})),te.d(ce,"ContentTypeValue",(function(){return os})),te.d(ce,"Endpoints",(function(){return ss})),te.d(ce,"PostMethod",(function(){return as})),te.d(ce,"GetMethod",(function(){return cs})),te.d(ce,"PostParams",(function(){return us})),te.d(ce,"Status",(function(){return ls})),te.d(ce,"RequestTimeoutMs",(function(){return ds})),te.d(ce,"ValidResponse",(function(){return fs})),te.d(ce,"ValidResponseCode",(function(){return ps})),te.d(ce,"FetchBannerResponseLinkKey",(function(){return hs}));var ue={};te.r(ue),te.d(ue,"Android",(function(){return gs})),te.d(ue,"iOS",(function(){return ms})),te.d(ue,"Linux",(function(){return vs})),te.d(ue,"MacOs",(function(){return ys})),te.d(ue,"Unknown",(function(){return bs})),te.d(ue,"Windows",(function(){return _s})),te.d(ue,"iOSPlatforms",(function(){return Es})),te.d(ue,"MacOsPlatforms",(function(){return Ss})),te.d(ue,"WindowsPlatforms",(function(){return Ts}));var le={};te.r(le),te.d(le,"Debug",(function(){return Cs})),te.d(le,"Info",(function(){return Is})),te.d(le,"Warn",(function(){return ws})),te.d(le,"None",(function(){return As}));var de={};te.r(de),te.d(de,"HighEntropyValuesKeys",(function(){return xs})),te.d(de,"PlatformKey",(function(){return yo}));var fe={};te.r(fe),te.d(fe,"CookieDomainKey",(function(){return Rs})),te.d(fe,"CookieExpiresKey",(function(){return Os})),te.d(fe,"MilliSecondsInDay",(function(){return bo})),te.d(fe,"ThirtyDaysInSeconds",(function(){return _o})),te.d(fe,"CookieExpirationInDays",(function(){return Ps})),te.d(fe,"SingularDeviceIdKey",(function(){return Ls}));var he=te(2),pe=te.n(he),ge=te(4),me=te.n(ge),ye=te(0),ve=te.n(ye),be=te(63),_e=te.n(be),Ce=te(64),Te=te.n(Ce),Se=te(40),Re=te.n(Se),we=te(18),Ae=te.n(we),Oe=te(41),Ne=te.n(Oe),Ue=te(34),Fe=te.n(Ue),Ve=te(42),He=te.n(Ve),ur=te(19),qe=te.n(ur),hr=te(32),fr=te.n(hr),dr=te(25),Qe=te.n(dr),Bt=te(33),Cr=te.n(Bt),$e=30,Le="WebSDK-v".concat("1.4.8"),We="off",mr="auto",lr="manual",Sr="__singular_ddl__",zr="onbeforeunload",$r="conversion_event",Yr="custom_user_id_event",ei="event",ai="page_visit",Gr="__PAGE_VISIT__",Ye="setMatchId",Ir="fetch_banner",Rr="singular_api_queue",xr="singular_custom_user_id",Br="banner_last_dismissed",li="did_visit_site",Ei="did_send_event",gi="conversion_event_occurred",ti="global",di="global_properties",Xr=1e3,Er="singular_session_id",Lr="singular_first_page_visit_occurred",Pr="first_page_visit_url",Mr="singular_id",Zr="match_id",Je="singular_instance_id",Tr="singular_storage_enabled_test",Or="test_value",Nr="last_event_timestamp",jr="touchpoint_timestamp",mi="web_url",Ii={Local:"local",Session:"session",Memory:"memory"},Oi="n",Si="browser_available_memory",Ni="browser_used_memory",zi="counter_banner_showed",Ji="source_url",$i="client_hints",Ui="custom_user_id",wi="current_device_time",Zi="_dl",Di="_ddl",Ai="document_referrer",ji="event_id",Fi="n",ci="product_name",vi="e",Wi="global_properties",Qi="conversion_event",Be="first",Xe="is_first_visit",Ge="is_first_page_visit_in_session",Ur="is_after_conversion_event",je="is_page_refreshed",Kr="is_revenue_event",Vr="is_set_match_id",Dr="k",Me="lag",Ze="l",Hr="match_id",Ar="os",Qr="ecid",ri="a",Ti="_p",bi="p",oi="Web",eo="prev_sdid",qi="i",Do="r",Mo="pcc",Uo="screen_height",Fo="screen_width",$o="sdid_persist_mode",Bo="sdid_persist_failed_reason",Vo="sdk",Ho="s",zo="SDID",jo="singular_instance_id",Wo="storage_type",qo="timezone",Go="touchpoint_timestamp",mo="device_user_agent",Ko="u",Yo="^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",Xo="_web_params",vo="web_url",Jo="last_dismissed",Zo="bn",Qo="baid",ts="utm_source",rs={clid_params:["clid="],singular_p_params:["pcnid=","pcrnid=","pcid=","pcn=","psc=","pscid=","pscn=","pcrid=","pcrn=","ps=","psid=","psn=","pshid=","paffid=","paffn=","pcc=","psrc=","pmed="],singular_wp_params:["wpcid=","wpcn=","wpsc=","wpscid=","wpscn=","wpcrid=","wpcrn=","wps=","wpsid=","wpsn=","wpshid=","wpaffid=","wpaffn=","wpkw=","wpsrc=","wpmed="],utm_params:["utm_.+="],additional_params:["kw=","an=","ud="]},ns="https://sdk-api-v1.singular.net/api/v1/",is="Content-Type",os="application/json",ss={Session:"start",Event:"event",DeviceCustomUserId:"set_device_for_custom_id",FetchBanner:"banners"},as="POST",cs="GET",us=[Wi,vi,vo,mo,ci,Ai,$i],ls="status",ds=3e4,fs="ok",ps=200,hs="link",gs="Android",ms="iOS",vs="Linux",ys="MacOS",bs="Unknown",_s="Windows",Es=["iPhone","iPad","iPod"],Ss=["Macintosh","MacIntel","MacPPC","Mac68K"],Ts=["Win32","Win64","Windows","WinCE"],Cs=3,Is=2,ws=1,As=0,xs=["platformVersion",yo,"uaFullVersion","model","architecture"],yo="platform",Rs="domain",Os="expires",bo=864e5,_o=2592e3,Ps=365*bo,Ls="singular_device_id",ks=te(188),Ns=te.n(ks),Ds=te(189),Ms=te.n(Ds),Us=te(100),Eo=te.n(Us),Fs=te(53),Gi=te.n(Fs),$s=te(35),Bi=te.n($s),Bs=te(79),oo=te.n(Bs),Vs=te(11),ui=te.n(Vs),Hs=te(3),qr=te.n(Hs),zs=te(190),js=te.n(zs),Ws=te(191),qs=te.n(Ws),Gs=te(22),Mi=te.n(Gs),Ks=te(23),Pi=te.n(Ks),Ys=te(43),Vi=te.n(Ys),Xs=te(65),to=te.n(Xs),Js=te(101),So=te.n(Js),Zs=te(192),Qs=te.n(Zs),ea=te(193),ta=te.n(ea),yr=(function(){function ze(){pe()(this,ze)}var Ee,xe,Pe,De;return me()(ze,null,[{key:"generateUUID",value:function(){var ke=window.crypto?window.crypto:window.msCrypto;return ke&&ke.getRandomValues&&ke.getRandomValues(new Uint8Array(1))||(ke={getRandomValues:function(Ke){return ta()(Ke)}}),("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(function(Ke){return(Ke^ke.getRandomValues(new Uint8Array(1))[0]&15>>Ke/4).toString(16)}))}},{key:"isUUID",value:function(ke){return RegExp(ae.UUID_REGEX).test(ke)}},{key:"getCurrentTimestamp",value:function(){return Math.round(new Date().getTime()/1e3)}},{key:"getOS",value:(De=Mi()(ui.a.mark((function ke(){var Ke,gr,_r,vr,br;return ui.a.wrap((function(wr){for(;;)switch(wr.prev=wr.next){case 0:return wr.prev=0,vr=navigator.platform||"",wr.next=4,this._getUserAgentInfo();case 4:if(br=wr.sent,!Gi()(Ke=ue.MacOsPlatforms).call(Ke,vr)){wr.next=9;break}return wr.abrupt("return",ue.MacOs);case 9:if(!Gi()(gr=ue.iOSPlatforms).call(gr,vr)&&!/iPad|iPhone|iPod/.test(br)){wr.next=13;break}return wr.abrupt("return",ue.iOS);case 13:if(!Gi()(_r=ue.WindowsPlatforms).call(_r,vr)){wr.next=17;break}return wr.abrupt("return",ue.Windows);case 17:if(!/Android/.test(br)){wr.next=21;break}return wr.abrupt("return",ue.Android);case 21:if(!/Linux/.test(vr)){wr.next=23;break}return wr.abrupt("return",ue.Linux);case 23:wr.next=27;break;case 25:wr.prev=25,wr.t0=wr.catch(0);case 27:return wr.abrupt("return",ue.Unknown);case 28:case"end":return wr.stop()}}),ke,this,[[0,25]])}))),function(){return De.apply(this,arguments)})},{key:"isNullOrEmpty",value:function(ke){return ke==null||ke===""}},{key:"calculateHash",value:function(ke,Ke){return Qs.a.hex(Ke+ke)}},{key:"getTimeZone",value:function(){return new Date().toString().match(/([A-Z]+[\+-][0-9]+)/)[1]}},{key:"getBrowserAvailableMemory",value:function(){try{return window.performance.hasOwnProperty("memory")&&window.performance.memory.hasOwnProperty("jsHeapSizeLimit")?window.performance.memory.jsHeapSizeLimit:null}catch{return null}}},{key:"getBrowserUsedMemory",value:function(){try{return window.performance.hasOwnProperty("memory")&&window.performance.memory.hasOwnProperty("usedJSHeapSize")?window.performance.memory.usedJSHeapSize:null}catch{return null}}},{key:"buildWebToAppLink",value:function(ke,Ke,gr,_r,vr){var br,wr;if(!this.isValidUrl(ke))return null;var Fr=this.parseQueryFromUrl(ke),pi=this.extractQueryStringWithFragment(Ke);this.isNullOrEmpty(pi)||(Fr[ae.WebParams]=pi),this.isNullOrEmpty(gr)||(Fr[ae.DeeplinkParam]=gr),this.isNullOrEmpty(_r)||(Fr[ae.PassthroughParam]=_r),this.isNullOrEmpty(vr)||(Fr[ae.DeferredDeeplinkParam]=vr);var hi=Eo()(br=qe()(Fr)).call(br,(function(_i){var xi;return qr()(xi="".concat(encodeURIComponent(_i),"=")).call(xi,encodeURIComponent(Fr[_i]))}));return qr()(wr="".concat(this.extractUrlWithPath(ke),"?")).call(wr,hi.join("&"))}},{key:"parseQueryFromUrl",value:function(ke){if(this.isNullOrEmpty(ke))return{};var Ke=ke.split("?");if(Ke.length<=1)return{};for(var gr={},_r=Ke[1].split("#")[0].split("&"),vr=0;vr<_r.length;vr++){var br=_r[vr].split("=");gr[decodeURIComponent(br[0])]=decodeURIComponent(br[1]||"")}return gr}},{key:"extractUrlWithPath",value:function(ke){return this.isNullOrEmpty(ke)?null:ke.split("?")[0]}},{key:"isValidUrl",value:function(ke){return this.isNullOrEmpty(ke)?!1:/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(ke)}},{key:"extractQueryStringWithFragment",value:function(ke){if(this.isNullOrEmpty(ke))return null;var Ke=ke.split("?");return Ke.length>=2&&!this.isNullOrEmpty(Ke[1])||(Ke=ke.split("#")).length>=2&&!this.isNullOrEmpty(Ke[1])?Ke[1]:""}},{key:"isPageRefreshed",value:function(){try{if(!window.performance||window.performance.navigation.type!==1)return!1}catch{return!1}return!0}},{key:"getClientHints",value:function(){return this._getDataFromClientHints(de.HighEntropyValuesKeys)}},{key:"setSdkWrapper",value:function(ke){ze.isNullOrEmpty(ke)||(this._sdkWrapper=ke)}},{key:"getSdkVersion",value:function(){var ke;return this._sdkWrapper?qr()(ke="".concat(ne.Version,"-")).call(ke,this._sdkWrapper):ne.Version}},{key:"getCookie",value:function(ke){var Ke=document.cookie;if(ze.isNullOrEmpty(Ke))return null;var gr=document.cookie.split(";"),_r=ke+"=",vr=null;return Ae()(gr).call(gr,(function(br){br=So()(br).call(br),to()(br).call(br,_r)===0&&(vr=decodeURIComponent(br.substring(_r.length,br.length)))})),vr}},{key:"setCookie",value:function(ke,Ke,gr){var _r,vr,br,wr,Fr;if(!(ze.isNullOrEmpty(ke)||ze.isNullOrEmpty(Ke)||ze.isNullOrEmpty(gr))){var pi=ze._getCookieExpirationDate();document.cookie=qr()(_r=qr()(vr=qr()(br=qr()(wr=qr()(Fr="".concat(ke,"=")).call(Fr,encodeURIComponent(Ke),"; ")).call(wr,fe.CookieDomainKey,"=")).call(br,gr,"; ")).call(vr,fe.CookieExpiresKey,"=")).call(_r,pi.toGMTString(),"; path=/")}}},{key:"_getCookieExpirationDate",value:function(){var ke=new Date;return ke.setTime(ke.getTime()+fe.CookieExpirationInDays),ke}},{key:"_getUserAgentInfo",value:(Pe=Mi()(ui.a.mark((function ke(){return ui.a.wrap((function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(navigator.userAgentData){Ke.next=2;break}return Ke.abrupt("return",navigator.userAgent||"");case 2:return Ke.next=4,this._getClientHintsPlatform();case 4:return Ke.abrupt("return",Ke.sent);case 5:case"end":return Ke.stop()}}),ke,this)}))),function(){return Pe.apply(this,arguments)})},{key:"_getClientHintsPlatform",value:(xe=Mi()(ui.a.mark((function ke(){var Ke;return ui.a.wrap((function(gr){for(;;)switch(gr.prev=gr.next){case 0:return gr.next=2,this._getDataFromClientHints([de.PlatformKey]);case 2:if(Ke=gr.sent){gr.next=5;break}return gr.abrupt("return","");case 5:return gr.abrupt("return",Ke[de.PlatformKey]||"");case 6:case"end":return gr.stop()}}),ke,this)}))),function(){return xe.apply(this,arguments)})},{key:"_getDataFromClientHints",value:(Ee=Mi()(ui.a.mark((function ke(Ke){return ui.a.wrap((function(gr){for(;;)switch(gr.prev=gr.next){case 0:if(navigator.userAgentData){gr.next=2;break}return gr.abrupt("return",null);case 2:return gr.next=4,navigator.userAgentData.getHighEntropyValues(Ke);case 4:return gr.abrupt("return",gr.sent);case 5:case"end":return gr.stop()}}),ke)}))),function(ke){return Ee.apply(this,arguments)})},{key:"extractMarketingData",value:function(ke){var Ke=[],gr=!0,_r=!1,vr=void 0;try{for(var br,wr=Vi()(ke);!(gr=(br=wr.next()).done);gr=!0){var Fr=br.value;for(var pi in ae.WebUrlMarketingParams){var hi=!0,_i=!1,xi=void 0;try{for(var yi,Li=Vi()(ae.WebUrlMarketingParams[pi]);!(hi=(yi=Li.next()).done);hi=!0){var no=yi.value;RegExp("^"+no).test(Fr+"=")&&Ke.push(Fr)}}catch(Hi){_i=!0,xi=Hi}finally{try{hi||Li.return==null||Li.return()}finally{if(_i)throw xi}}}}}catch(Hi){_r=!0,vr=Hi}finally{try{gr||wr.return==null||wr.return()}finally{if(_r)throw vr}}return Ke}},{key:"appendQueryParamsToUrl",value:function(ke,Ke,gr){var _r,vr,br;return qr()(_r=qr()(vr=qr()(br="".concat(gr.split(ke)[0],"?")).call(br,Ke)).call(vr,ke=="?"?"&":"#")).call(_r,gr.split(ke)[1])}}]),ze})(),ra=te(102),To=te.n(ra),na=te(194),ia=te.n(na),oa=te(122),Co=te.n(oa),sa=te(195),aa=te.n(sa),ca=te(196),ua=te.n(ca),la=te(50),Ki=te.n(la),ni=(function(){function ze(){pe()(this,ze)}return me()(ze,null,[{key:"setLogLevel",value:function(Ee){this._logLevel=Ee}},{key:"debug",value:function(Ee){this._logLevel===le.Debug&&console.log(Ee)}},{key:"info",value:function(Ee){this._logLevel>=le.Info&&console.log(Ee)}},{key:"warn",value:function(Ee){this._logLevel>=le.Warn&&console.warn(Ee)}}]),ze})();ve()(ni,"_logLevel",le.None);var Yi=(function(){function ze(Ee,xe){pe()(this,ze),ve()(this,"_isInitialized",!1),ze.getAvailableStorageType(),this._storagePrefix=xe,this._isInitialized=!0,Ee===se.Types.Local&&ze._isLocalStorageAvailable()?this._storage=localStorage:Ee!==se.Types.Local&&Ee!==se.Types.Session||!ze._isSessionStorageAvailable()?this._buildMemoryStorage():this._storage=sessionStorage}return me()(ze,[{key:"getItem",value:function(Ee){var xe;return yr.isNullOrEmpty(Ee)||!this._isInitialized?null:this._storage.getItem(qr()(xe="".concat(this._storagePrefix,"_")).call(xe,Ee))}},{key:"setItem",value:function(Ee,xe){var Pe;!yr.isNullOrEmpty(Ee)&&xe&&this._isInitialized&&this._storage.setItem(qr()(Pe="".concat(this._storagePrefix,"_")).call(Pe,Ee),xe)}},{key:"removeItem",value:function(Ee){var xe;!yr.isNullOrEmpty(Ee)&&this._isInitialized&&this._storage.removeItem(qr()(xe="".concat(this._storagePrefix,"_")).call(xe,Ee))}},{key:"_buildMemoryStorage",value:function(){var Ee=this;ni.warn("Using memory storage"),this._storage={_data:{},setItem:function(xe,Pe){Ee._storage._data[xe]=Pe},getItem:function(xe){return Ee._storage._data[xe]},removeItem:function(xe){delete Ee._storage._data[xe]}}}}],[{key:"getAvailableStorageType",value:function(){return this._availableStorageType||(this._isLocalStorageAvailable()?this._availableStorageType=se.Types.Local:this._isSessionStorageAvailable()?this._availableStorageType=se.Types.Session:this._availableStorageType=se.Types.Memory),this._availableStorageType}},{key:"_isLocalStorageAvailable",value:function(){if(this._availableStorageType===se.Types.Local)return!0;try{localStorage.setItem(se.StorageEnabledTestKey,se.StorageEnabledTestValue);var Ee=localStorage.getItem(se.StorageEnabledTestKey)===se.StorageEnabledTestValue;return localStorage.removeItem(se.StorageEnabledTestKey),Ee}catch{return!1}}},{key:"_isSessionStorageAvailable",value:function(){if(this._availableStorageType===se.Types.Local||this._availableStorageType===se.Types.Session)return!0;try{sessionStorage.setItem(se.StorageEnabledTestKey,se.StorageEnabledTestValue);var Ee=sessionStorage.getItem(se.StorageEnabledTestKey)===se.StorageEnabledTestValue;return sessionStorage.removeItem(se.StorageEnabledTestKey),Ee}catch{return!1}}}]),ze})();ve()(Yi,"_availableStorageType",void 0);var kr=(function(){function ze(){pe()(this,ze)}return me()(ze,[{key:"init",value:function(Ee){return this._singularConfig=Ee,this._storage=new Yi(se.Types.Local,this.getStoragePrefix()),this._singularDeviceIdStorage=new Yi(se.Types.Local,se.GlobalStoragePrefix),this._isFirstVisit=null,this._newSessionIdNeeded=!1,this.setWebUrl(),this.loadSingularPersistentData(),this}},{key:"loadSingularPersistentData",value:function(){this._sdidPersistMode=ne.SdidPersistModeOff,this._sdidPersistFailReason=null,this._previousSdid=null,this._singularDeviceId=null,this._instanceId=null,this._matchId=null,this.getSingularDeviceId(),this.getCustomUserId(),this.getSingularInstanceId(),this._persistSingularDeviceIdIfNeeded()}},{key:"setWebUrl",value:function(){var Ee=this._storage.getItem(se.StorageWebUrlKey),xe=this._storage.getItem(se.StorageTouchpointTimestampKey),Pe=window.location.href,De=this._isWebUrlContainingMarketingData(Pe),ke=!Ee,Ke=this._didWebUrlChange(Pe);ke||De&&Ke?(De&&(ke||Ke)&&this.setConversionEventOccurred(!0),this._webUrl=Pe,this._touchpointTimestamp=yr.getCurrentTimestamp(),this._storage.setItem(se.StorageWebUrlKey,this._webUrl),this._storage.setItem(se.StorageTouchpointTimestampKey,this._touchpointTimestamp),this._newSessionIdNeeded=!0):(this._webUrl=Ee,this._touchpointTimestamp=xe)}},{key:"getSingularDeviceId",value:function(){if(this._singularDeviceId)return this._singularDeviceId;var Ee=this._singularDeviceIdStorage.getItem(se.SingularDeviceIdKey);if(this._singularConfig._singularDeviceId)this._sdidPersistMode=ne.SdidPersistModeManual,yr.isUUID(this._singularConfig._singularDeviceId)?(ni.debug("Persistent Singular Device Id was set manually"),this._singularDeviceIdStorage.setItem(se.SingularDeviceIdKey,this._singularConfig._singularDeviceId)):(ni.debug("Persistent Singular Device Id provided was not in uuid format"),this._sdidPersistFailReason="invalid udid:".concat(this._singularConfig._singularDeviceId));else if(!yr.isNullOrEmpty(this._singularConfig._autoPersistDomain)){var xe=yr.getCookie(fe.SingularDeviceIdKey);this._sdidPersistMode=ne.SdidPersistModeAuto,xe!=null&&(xe===""?this._sdidPersistFailReason="singular sdid cookie was set to an empty string":yr.isUUID(xe)?(ni.debug("Persistent Singular Device Id was set automatically from cookies"),this._singularDeviceIdStorage.setItem(se.SingularDeviceIdKey,xe)):this._sdidPersistFailReason="invalid udid:".concat(xe))}return this._singularDeviceId=this._getPersistentUUID(this._singularDeviceIdStorage,se.SingularDeviceIdKey),yr.isNullOrEmpty(Ee)||this._singularDeviceId===Ee||(this._previousSdid=Ee),this._singularDeviceId}},{key:"getSdidPersistMode",value:function(){return this._sdidPersistMode}},{key:"getSdidPersistFailReason",value:function(){return this._sdidPersistFailReason}},{key:"getPreviousSdid",value:function(){return this._previousSdid}},{key:"getStoragePrefix",value:function(){var Ee;return qr()(Ee="".concat(this._singularConfig.apikey,"_")).call(Ee,this._singularConfig.productId)}},{key:"getCustomUserId",value:function(){return this._customUserId||(this._customUserId=this._storage.getItem(se.CustomUserIdKey)),this._customUserId}},{key:"getWebUrl",value:function(){return this._webUrl}},{key:"getTouchpointTimestamp",value:function(){return this._touchpointTimestamp}},{key:"setCustomUserId",value:function(Ee){this._customUserId=Ee,this._storage.setItem(se.CustomUserIdKey,Ee)}},{key:"unsetCustomUserId",value:function(){this._customUserId=null,this._storage.removeItem(se.CustomUserIdKey)}},{key:"getSingularConfig",value:function(){return this._singularConfig}},{key:"getSessionId",value:function(){return this._storage.getItem(se.SessionIdKey)}},{key:"getSessionIdForPageVisit",value:function(){if(!this._isNewSessionIdNeeded())return this.getSessionId();var Ee=this._generateNewSessionId();return this.setFirstPageVisitOccurred(!1),this.setFirstPageVisitURL(null),this.getSessionId()||this.saveSessionId(Ee),Ee}},{key:"getSingularInstanceId",value:function(){return this._instanceId||(this._instanceId=this._getPersistentUUID(this._storage,se.SingularInstanceIdKey)),this._instanceId}},{key:"saveSessionId",value:function(Ee){this._setSessionId(Ee)}},{key:"isFirstVisit",value:function(){return this._isFirstVisit!==null||(this._isFirstVisit=!this._storage.getItem(se.DidVisitSiteKey),this._isFirstVisit&&this._storage.setItem(se.DidVisitSiteKey,!0)),this._isFirstVisit}},{key:"getMatchID",value:function(){return this._matchId||(this._matchId=this._singularDeviceIdStorage.getItem(se.MatchIdKey)),this._matchId}},{key:"setMatchID",value:function(Ee){this._singularDeviceIdStorage.setItem(se.MatchIdKey,Ee),this._matchId=Ee}},{key:"clearMatchID",value:function(){this._singularDeviceIdStorage.removeItem(se.MatchIdKey),this._matchId=null}},{key:"clearGlobalProperties",value:function(){this._storage.removeItem(se.GlobalProperties)}},{key:"getGlobalProperties",value:function(){return JSON.parse(this._storage.getItem(se.GlobalProperties))}},{key:"setGlobalProperties",value:function(Ee,xe){if(Ee){var Pe=this.getGlobalProperties()||{};Pe[Ee]=xe,this._storage.setItem(se.GlobalProperties,Pi()(Pe))}}},{key:"IsFirstEvent",value:function(Ee){var xe,Pe=qr()(xe="".concat(se.DidSendEventKeyBase,".")).call(xe,Ee),De=!!this._storage.getItem(Pe);return De||this._storage.setItem(Pe,!0),!De}},{key:"updateLastEventTimestamp",value:function(){this._storage.setItem(se.StorageLastEventTimestamp,yr.getCurrentTimestamp())}},{key:"getFirstPageVisitOccurred",value:function(){return this._storage.getItem(se.FirstPageVisitOccurredKey)==="true"}},{key:"setFirstPageVisitOccurred",value:function(Ee){return this._storage.setItem(se.FirstPageVisitOccurredKey,Ee.toString())}},{key:"setFirstPageVisitURL",value:function(Ee){this._storage.setItem(se.FirstPageVisitURL,Ee)}},{key:"getFirstPageVisitURL",value:function(){return this._storage.getItem(se.FirstPageVisitURL)}},{key:"getConversionEventOccurred",value:function(){return this._storage.getItem(se.ConversionEventOccurredKey)==="true"}},{key:"setConversionEventOccurred",value:function(Ee){return this._storage.setItem(se.ConversionEventOccurredKey,Ee.toString())}},{key:"updateSingularConfig",value:function(Ee){this._singularConfig=Ee,Ee.customUserId&&this.setCustomUserId(Ee.customUserId),this.loadSingularPersistentData()}},{key:"_getPersistentUUID",value:function(Ee,xe){var Pe=Ee.getItem(xe);return Pe||(Pe=yr.generateUUID(),Ee.setItem(xe,Pe)),Pe}},{key:"_isWebUrlContainingMarketingData",value:function(Ee){try{var xe=new Ki.a(Ee).searchParams;for(var Pe in ae.WebUrlMarketingParams){var De=!0,ke=!1,Ke=void 0;try{for(var gr,_r=Vi()(ae.WebUrlMarketingParams[Pe]);!(De=(gr=_r.next()).done);De=!0){var vr=gr.value;if(vr==="utm_.+="){var br=!0,wr=!1,Fr=void 0;try{for(var pi,hi=Vi()(ua()(xe).call(xe));!(br=(pi=hi.next()).done);br=!0){var _i=pi.value;if(aa()(_i).call(_i,"utm_"))return!0}}catch(io){wr=!0,Fr=io}finally{try{br||hi.return==null||hi.return()}finally{if(wr)throw Fr}}}else{var xi=vr.replace(/=$/,"");if(xe.has(xi))return!0}}}catch(io){ke=!0,Ke=io}finally{try{De||_r.return==null||_r.return()}finally{if(ke)throw Ke}}}return!1}catch{for(var yi in ae.WebUrlMarketingParams){var Li=!0,no=!1,Hi=void 0;try{for(var Lo,ho=Vi()(ae.WebUrlMarketingParams[yi]);!(Li=(Lo=ho.next()).done);Li=!0){var Da=Lo.value;if(RegExp(Da).test(Ee))return!0}}catch(Ma){no=!0,Hi=Ma}finally{try{Li||ho.return==null||ho.return()}finally{if(no)throw Hi}}}return!1}}},{key:"_didWebUrlChange",value:function(Ee){var xe=new Co.a(this._storage.getItem(se.StorageWebUrlKey)),Pe=new Co.a(Ee);if(xe.size!==Pe.size)return!0;for(var De=0,ke=ia()(To()(Pe).call(Pe));De<ke.length;De++){var Ke=Bi()(ke[De],2),gr=Ke[0],_r=Ke[1];if(xe.get(gr)!==_r)return!0}return!1}},{key:"_setSessionId",value:function(Ee){this._storage.setItem(se.SessionIdKey,Ee)}},{key:"_getLastEventTimestamp",value:function(){return this._storage.getItem(se.StorageLastEventTimestamp)}},{key:"_isNewSessionIdNeeded",value:function(){return this._newSessionIdNeeded||!this.getSessionId()||!this._getLastEventTimestamp()||this._isSessionTimeout()}},{key:"_isSessionTimeout",value:function(){var Ee=yr.getCurrentTimestamp()-this._getLastEventTimestamp();return!!isNaN(Ee)||Ee>this._singularConfig.sessionTimeOutInSeconds}},{key:"_generateNewSessionId",value:function(){return this._newSessionIdNeeded=!1,yr.generateUUID()}},{key:"_persistSingularDeviceIdIfNeeded",value:function(){yr.isNullOrEmpty(this._singularConfig._autoPersistDomain)||yr.setCookie(fe.SingularDeviceIdKey,this.getSingularDeviceId(),this._singularConfig._autoPersistDomain)}}],[{key:"getInstance",value:function(){return this._instance||(this._instance=new ze),this._instance}}]),ze})();function Io(ze,Ee){var xe=qe()(ze);if(He.a){var Pe=He()(ze);Ee&&(Pe=Fe()(Pe).call(Pe,(function(De){return Ne()(ze,De).enumerable}))),xe.push.apply(xe,Pe)}return xe}function da(ze){for(var Ee=1;Ee<arguments.length;Ee++){var xe,Pe=arguments[Ee]!=null?arguments[Ee]:{};if(Ee%2)Ae()(xe=Io(Pe,!0)).call(xe,(function(ke){ve()(ze,ke,Pe[ke])}));else if(Re.a)Te()(ze,Re()(Pe));else{var De;Ae()(De=Io(Pe)).call(De,(function(ke){_e()(ze,ke,Ne()(Pe,ke))}))}}return ze}ve()(kr,"_instance",void 0);var ki=(function(){function ze(){pe()(this,ze),ve()(this,"_endpoint",void 0),this._extra={},this._method=ce.PostMethod,this.initApiParams(),kr.getInstance().updateLastEventTimestamp()}var Ee;return me()(ze,[{key:"initApiParams",value:function(){var xe;this._params=(xe={},ve()(xe,ae.BrowserAvailableMemory,yr.getBrowserAvailableMemory()),ve()(xe,ae.BrowserUsedMemory,yr.getBrowserUsedMemory()),ve()(xe,ae.CustomUserId,kr.getInstance().getCustomUserId()),ve()(xe,ae.CurrentDeviceTime,yr.getCurrentTimestamp()),ve()(xe,ae.EventId,yr.generateUUID()),ve()(xe,ae.IsConversion,!1),ve()(xe,ae.Keyspace,ae.SingularDeviceId),ve()(xe,ae.Owner,kr.getInstance().getSingularConfig().apikey),ve()(xe,ae.Platform,ae.PlatformWeb),ve()(xe,ae.ProductId,kr.getInstance().getSingularConfig().productId),ve()(xe,ae.ScreenHeight,window.screen.height),ve()(xe,ae.ScreenWidth,window.screen.width),ve()(xe,ae.SdkVersion,yr.getSdkVersion()),ve()(xe,ae.SingularInstanceId,kr.getInstance().getSingularInstanceId()),ve()(xe,ae.SingularDeviceId.toLowerCase(),kr.getInstance().getSingularDeviceId()),ve()(xe,ae.StorageType,Yi.getAvailableStorageType()),ve()(xe,ae.Timezone,yr.getTimeZone()),ve()(xe,ae.TouchpointTimestamp,kr.getInstance().getTouchpointTimestamp()),ve()(xe,ae.UserAgent,navigator.userAgent),ve()(xe,ae.UUID,kr.getInstance().getSingularDeviceId()),ve()(xe,ae.GlobalProperties,kr.getInstance().getGlobalProperties()&&Pi()(kr.getInstance().getGlobalProperties())),xe)}},{key:"sendRequest",value:(Ee=Mi()(ui.a.mark((function xe(){var Pe,De=this;return ui.a.wrap((function(ke){for(;;)switch(ke.prev=ke.next){case 0:return ke.next=2,yr.getOS();case 2:return this._params[ae.OS]=ke.sent,ke.next=5,yr.getClientHints();case 5:return(Pe=ke.sent)&&(this._params[ae.ClientHints]=Pi()(Pe)),ke.abrupt("return",new qs.a((function(Ke){var gr;qe()(De._extra).length>0&&(De._params[ae.Extra]=Pi()(De._extra)),De._params[ae.SessionId]||(De._params[ae.SessionId]=kr.getInstance().getSessionId());var _r=da({},De._params,ve()({},ae.Lag,yr.getCurrentTimestamp()-js()(De._params[ae.CurrentDeviceTime]))),vr=De._method===ce.PostMethod?De._buildRequestBody(_r):null,br=De._buildQueryParams(_r),wr=De._buildRequestUrl(br);ni.debug(qr()(gr=`Sending api request
|
|
884
|
+
*/(function(){var root=typeof window=="object"?window:{},NODE_JS=!root.JS_SHA1_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS&&(root=global);var COMMON_JS=!root.JS_SHA1_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=__webpack_require__(423),HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[],createOutputMethod=function(ee){return function(re){return new Sha1(!0).update(re)[ee]()}},createMethod=function(){var ee=createOutputMethod("hex");NODE_JS&&(ee=nodeWrap(ee)),ee.create=function(){return new Sha1},ee.update=function(ne){return ee.create().update(ne)};for(var re=0;re<OUTPUT_TYPES.length;++re){var te=OUTPUT_TYPES[re];ee[te]=createOutputMethod(te)}return ee},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(ee){if(typeof ee=="string")return crypto.createHash("sha1").update(ee,"utf8").digest("hex");if(ee.constructor===ArrayBuffer)ee=new Uint8Array(ee);else if(ee.length===void 0)return method(ee);return crypto.createHash("sha1").update(new Buffer(ee)).digest("hex")};return nodeMethod};function Sha1(ee){ee?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Sha1.prototype.update=function(ee){if(!this.finalized){var re=typeof ee!="string";re&&ee.constructor===root.ArrayBuffer&&(ee=new Uint8Array(ee));for(var te,ne,ie=0,oe=ee.length||0,se=this.blocks;ie<oe;){if(this.hashed&&(this.hashed=!1,se[0]=this.block,se[16]=se[1]=se[2]=se[3]=se[4]=se[5]=se[6]=se[7]=se[8]=se[9]=se[10]=se[11]=se[12]=se[13]=se[14]=se[15]=0),re)for(ne=this.start;ie<oe&&ne<64;++ie)se[ne>>2]|=ee[ie]<<SHIFT[3&ne++];else for(ne=this.start;ie<oe&&ne<64;++ie)(te=ee.charCodeAt(ie))<128?se[ne>>2]|=te<<SHIFT[3&ne++]:te<2048?(se[ne>>2]|=(192|te>>6)<<SHIFT[3&ne++],se[ne>>2]|=(128|63&te)<<SHIFT[3&ne++]):te<55296||te>=57344?(se[ne>>2]|=(224|te>>12)<<SHIFT[3&ne++],se[ne>>2]|=(128|te>>6&63)<<SHIFT[3&ne++],se[ne>>2]|=(128|63&te)<<SHIFT[3&ne++]):(te=65536+((1023&te)<<10|1023&ee.charCodeAt(++ie)),se[ne>>2]|=(240|te>>18)<<SHIFT[3&ne++],se[ne>>2]|=(128|te>>12&63)<<SHIFT[3&ne++],se[ne>>2]|=(128|te>>6&63)<<SHIFT[3&ne++],se[ne>>2]|=(128|63&te)<<SHIFT[3&ne++]);this.lastByteIndex=ne,this.bytes+=ne-this.start,ne>=64?(this.block=se[16],this.start=ne-64,this.hash(),this.hashed=!0):this.start=ne}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha1.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var ee=this.blocks,re=this.lastByteIndex;ee[16]=this.block,ee[re>>2]|=EXTRA[3&re],this.block=ee[16],re>=56&&(this.hashed||this.hash(),ee[0]=this.block,ee[16]=ee[1]=ee[2]=ee[3]=ee[4]=ee[5]=ee[6]=ee[7]=ee[8]=ee[9]=ee[10]=ee[11]=ee[12]=ee[13]=ee[14]=ee[15]=0),ee[14]=this.hBytes<<3|this.bytes>>>29,ee[15]=this.bytes<<3,this.hash()}},Sha1.prototype.hash=function(){var ee,re,te=this.h0,ne=this.h1,ie=this.h2,oe=this.h3,se=this.h4,ae=this.blocks;for(ee=16;ee<80;++ee)re=ae[ee-3]^ae[ee-8]^ae[ee-14]^ae[ee-16],ae[ee]=re<<1|re>>>31;for(ee=0;ee<20;ee+=5)te=(re=(ne=(re=(ie=(re=(oe=(re=(se=(re=te<<5|te>>>27)+(ne&ie|~ne&oe)+se+1518500249+ae[ee]<<0)<<5|se>>>27)+(te&(ne=ne<<30|ne>>>2)|~te&ie)+oe+1518500249+ae[ee+1]<<0)<<5|oe>>>27)+(se&(te=te<<30|te>>>2)|~se&ne)+ie+1518500249+ae[ee+2]<<0)<<5|ie>>>27)+(oe&(se=se<<30|se>>>2)|~oe&te)+ne+1518500249+ae[ee+3]<<0)<<5|ne>>>27)+(ie&(oe=oe<<30|oe>>>2)|~ie&se)+te+1518500249+ae[ee+4]<<0,ie=ie<<30|ie>>>2;for(;ee<40;ee+=5)te=(re=(ne=(re=(ie=(re=(oe=(re=(se=(re=te<<5|te>>>27)+(ne^ie^oe)+se+1859775393+ae[ee]<<0)<<5|se>>>27)+(te^(ne=ne<<30|ne>>>2)^ie)+oe+1859775393+ae[ee+1]<<0)<<5|oe>>>27)+(se^(te=te<<30|te>>>2)^ne)+ie+1859775393+ae[ee+2]<<0)<<5|ie>>>27)+(oe^(se=se<<30|se>>>2)^te)+ne+1859775393+ae[ee+3]<<0)<<5|ne>>>27)+(ie^(oe=oe<<30|oe>>>2)^se)+te+1859775393+ae[ee+4]<<0,ie=ie<<30|ie>>>2;for(;ee<60;ee+=5)te=(re=(ne=(re=(ie=(re=(oe=(re=(se=(re=te<<5|te>>>27)+(ne&ie|ne&oe|ie&oe)+se-1894007588+ae[ee]<<0)<<5|se>>>27)+(te&(ne=ne<<30|ne>>>2)|te&ie|ne&ie)+oe-1894007588+ae[ee+1]<<0)<<5|oe>>>27)+(se&(te=te<<30|te>>>2)|se&ne|te&ne)+ie-1894007588+ae[ee+2]<<0)<<5|ie>>>27)+(oe&(se=se<<30|se>>>2)|oe&te|se&te)+ne-1894007588+ae[ee+3]<<0)<<5|ne>>>27)+(ie&(oe=oe<<30|oe>>>2)|ie&se|oe&se)+te-1894007588+ae[ee+4]<<0,ie=ie<<30|ie>>>2;for(;ee<80;ee+=5)te=(re=(ne=(re=(ie=(re=(oe=(re=(se=(re=te<<5|te>>>27)+(ne^ie^oe)+se-899497514+ae[ee]<<0)<<5|se>>>27)+(te^(ne=ne<<30|ne>>>2)^ie)+oe-899497514+ae[ee+1]<<0)<<5|oe>>>27)+(se^(te=te<<30|te>>>2)^ne)+ie-899497514+ae[ee+2]<<0)<<5|ie>>>27)+(oe^(se=se<<30|se>>>2)^te)+ne-899497514+ae[ee+3]<<0)<<5|ne>>>27)+(ie^(oe=oe<<30|oe>>>2)^se)+te-899497514+ae[ee+4]<<0,ie=ie<<30|ie>>>2;this.h0=this.h0+te<<0,this.h1=this.h1+ne<<0,this.h2=this.h2+ie<<0,this.h3=this.h3+oe<<0,this.h4=this.h4+se<<0},Sha1.prototype.hex=function(){this.finalize();var ee=this.h0,re=this.h1,te=this.h2,ne=this.h3,ie=this.h4;return HEX_CHARS[ee>>28&15]+HEX_CHARS[ee>>24&15]+HEX_CHARS[ee>>20&15]+HEX_CHARS[ee>>16&15]+HEX_CHARS[ee>>12&15]+HEX_CHARS[ee>>8&15]+HEX_CHARS[ee>>4&15]+HEX_CHARS[15&ee]+HEX_CHARS[re>>28&15]+HEX_CHARS[re>>24&15]+HEX_CHARS[re>>20&15]+HEX_CHARS[re>>16&15]+HEX_CHARS[re>>12&15]+HEX_CHARS[re>>8&15]+HEX_CHARS[re>>4&15]+HEX_CHARS[15&re]+HEX_CHARS[te>>28&15]+HEX_CHARS[te>>24&15]+HEX_CHARS[te>>20&15]+HEX_CHARS[te>>16&15]+HEX_CHARS[te>>12&15]+HEX_CHARS[te>>8&15]+HEX_CHARS[te>>4&15]+HEX_CHARS[15&te]+HEX_CHARS[ne>>28&15]+HEX_CHARS[ne>>24&15]+HEX_CHARS[ne>>20&15]+HEX_CHARS[ne>>16&15]+HEX_CHARS[ne>>12&15]+HEX_CHARS[ne>>8&15]+HEX_CHARS[ne>>4&15]+HEX_CHARS[15&ne]+HEX_CHARS[ie>>28&15]+HEX_CHARS[ie>>24&15]+HEX_CHARS[ie>>20&15]+HEX_CHARS[ie>>16&15]+HEX_CHARS[ie>>12&15]+HEX_CHARS[ie>>8&15]+HEX_CHARS[ie>>4&15]+HEX_CHARS[15&ie]},Sha1.prototype.toString=Sha1.prototype.hex,Sha1.prototype.digest=function(){this.finalize();var ee=this.h0,re=this.h1,te=this.h2,ne=this.h3,ie=this.h4;return[ee>>24&255,ee>>16&255,ee>>8&255,255&ee,re>>24&255,re>>16&255,re>>8&255,255&re,te>>24&255,te>>16&255,te>>8&255,255&te,ne>>24&255,ne>>16&255,ne>>8&255,255&ne,ie>>24&255,ie>>16&255,ie>>8&255,255&ie]},Sha1.prototype.array=Sha1.prototype.digest,Sha1.prototype.arrayBuffer=function(){this.finalize();var ee=new ArrayBuffer(20),re=new DataView(ee);return re.setUint32(0,this.h0),re.setUint32(4,this.h1),re.setUint32(8,this.h2),re.setUint32(12,this.h3),re.setUint32(16,this.h4),ee};var exports$1=createMethod();COMMON_JS?module.exports=exports$1:(root.sha1=exports$1,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=(function(){return exports$1}).call(exports$1,__webpack_require__,exports$1,module),__WEBPACK_AMD_DEFINE_RESULT__===void 0||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__(172),__webpack_require__(124))},function(ee,re,te){var ne=new(te(424))(Math.random()*Number.MAX_SAFE_INTEGER);ee.exports=function(ie){for(var oe=ie.length;oe--;)ie[oe]=Math.floor(256*ne.random());return ie}},function(ee,re,te){ee.exports=te(164)},function(ee,re,te){ee.exports=te(432)},function(ee,re,te){ee.exports=te(436)},function(ee,re,te){ee.exports=te(459)},function(ee,re,te){var ne=te(464),ie=te(187),oe=te(471);ee.exports=function(se,ae){if(se==null)return{};var ce,ue,le=oe(se,ae);if(ne){var de=ne(se);for(ue=0;ue<de.length;ue++)ce=de[ue],ie(ae).call(ae,ce)>=0||Object.prototype.propertyIsEnumerable.call(se,ce)&&(le[ce]=se[ce])}return le},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(476)},function(ee,re,te){ee.exports=te(201)},function(ee,re,te){var ne=te(202);ee.exports=ne},function(ee,re,te){var ne=te(123);ee.exports=ne},function(ee,re,te){te(204);var ne=te(7).Object,ie=ee.exports=function(oe,se,ae){return ne.defineProperty(oe,se,ae)};ne.defineProperty.sham&&(ie.sham=!0)},function(ee,re,te){var ne=te(1),ie=te(15),oe=te(28).f;ne({target:"Object",stat:!0,forced:Object.defineProperty!==oe,sham:!ie},{defineProperty:oe})},function(ee,re,te){var ne=te(14),ie=te(17),oe=te(85),se=te(105),ae=te(206),ce=te(8),ue=TypeError,le=ce("toPrimitive");ee.exports=function(de,fe){if(!ie(de)||oe(de))return de;var he,pe=se(de,le);if(pe){if(fe===void 0&&(fe="default"),he=ne(pe,de,fe),!ie(he)||oe(he))return he;throw ue("Can't convert object to primitive value")}return fe===void 0&&(fe="number"),ae(de,fe)}},function(ee,re,te){var ne=te(14),ie=te(10),oe=te(17),se=TypeError;ee.exports=function(ae,ce){var ue,le;if(ce==="string"&&ie(ue=ae.toString)&&!oe(le=ne(ue,ae))||ie(ue=ae.valueOf)&&!oe(le=ne(ue,ae))||ce!=="string"&&ie(ue=ae.toString)&&!oe(le=ne(ue,ae)))return le;throw se("Can't convert object to primitive value")}},function(ee,re,te){var ne=te(9),ie=Object.defineProperty;ee.exports=function(oe,se){try{ie(ne,oe,{value:se,configurable:!0,writable:!0})}catch{ne[oe]=se}return se}},function(ee,re,te){ee.exports=te(209)},function(ee,re,te){var ne=te(210);te(241),te(242),te(243),te(244),te(245),te(246),te(247),ee.exports=ne},function(ee,re,te){var ne=te(211);te(240),ee.exports=ne},function(ee,re,te){var ne=te(212);te(39),ee.exports=ne},function(ee,re,te){te(131),te(72),te(135),te(223),te(224),te(225),te(226),te(141),te(227),te(228),te(229),te(230),te(231),te(232),te(142),te(233),te(234),te(235),te(236),te(237);var ne=te(7);ee.exports=ne.Symbol},function(ee,re){var te=Math.ceil,ne=Math.floor;ee.exports=Math.trunc||function(ie){var oe=+ie;return(oe>0?ne:te)(oe)}},function(ee,re){var te=TypeError;ee.exports=function(ne){if(ne>9007199254740991)throw te("Maximum allowed index exceeded");return ne}},function(ee,re,te){var ne=te(56),ie=te(88),oe=te(17),se=te(8)("species"),ae=Array;ee.exports=function(ce){var ue;return ne(ce)&&(ue=ce.constructor,(ie(ue)&&(ue===ae||ne(ue.prototype))||oe(ue)&&(ue=ue[se])===null)&&(ue=void 0)),ue===void 0?ae:ue}},function(ee,re,te){var ne=te(1),ie=te(9),oe=te(14),se=te(6),ae=te(26),ce=te(15),ue=te(55),le=te(5),de=te(13),fe=te(16),he=te(20),pe=te(27),ge=te(84),me=te(29),ye=te(45),ve=te(57),be=te(73),_e=te(116),Ce=te(217),Te=te(92),Se=te(44),Re=te(28),we=te(112),Ae=te(82),Oe=te(31),Ne=te(70),Ue=te(91),Fe=te(90),Ve=te(107),He=te(8),ur=te(93),qe=te(12),hr=te(138),fr=te(47),dr=te(58),Qe=te(94).forEach,Bt=Ue("hidden"),Cr=dr.set,$e=dr.getterFor("Symbol"),Le=Object.prototype,We=ie.Symbol,mr=We&&We.prototype,lr=ie.TypeError,Sr=ie.QObject,zr=Se.f,$r=Re.f,Yr=Ce.f,ei=Ae.f,ai=se([].push),Gr=Ne("symbols"),Ye=Ne("op-symbols"),Ir=Ne("wks"),Rr=!Sr||!Sr.prototype||!Sr.prototype.findChild,xr=ce&&le((function(){return ve($r({},"a",{get:function(){return $r(this,"a",{value:7}).a}})).a!=7}))?function(Er,Lr,Pr){var Mr=zr(Le,Lr);Mr&&delete Le[Lr],$r(Er,Lr,Pr),Mr&&Er!==Le&&$r(Le,Lr,Mr)}:$r,Br=function(Er,Lr){var Pr=Gr[Er]=ve(mr);return Cr(Pr,{type:"Symbol",tag:Er,description:Lr}),ce||(Pr.description=Lr),Pr},li=function(Er,Lr,Pr){Er===Le&&li(Ye,Lr,Pr),he(Er);var Mr=ge(Lr);return he(Pr),de(Gr,Mr)?(Pr.enumerable?(de(Er,Bt)&&Er[Bt][Mr]&&(Er[Bt][Mr]=!1),Pr=ve(Pr,{enumerable:ye(0,!1)})):(de(Er,Bt)||$r(Er,Bt,ye(1,{})),Er[Bt][Mr]=!0),xr(Er,Mr,Pr)):$r(Er,Mr,Pr)},Ei=function(Er,Lr){he(Er);var Pr=pe(Lr),Mr=be(Pr).concat(Xr(Pr));return Qe(Mr,(function(Jr){ce&&!oe(gi,Pr,Jr)||li(Er,Jr,Pr[Jr])})),Er},gi=function(Er){var Lr=ge(Er),Pr=oe(ei,this,Lr);return!(this===Le&&de(Gr,Lr)&&!de(Ye,Lr))&&(!(Pr||!de(this,Lr)||!de(Gr,Lr)||de(this,Bt)&&this[Bt][Lr])||Pr)},ti=function(Er,Lr){var Pr=pe(Er),Mr=ge(Lr);if(Pr!==Le||!de(Gr,Mr)||de(Ye,Mr)){var Jr=zr(Pr,Mr);return!Jr||!de(Gr,Mr)||de(Pr,Bt)&&Pr[Bt][Mr]||(Jr.enumerable=!0),Jr}},di=function(Er){var Lr=Yr(pe(Er)),Pr=[];return Qe(Lr,(function(Mr){de(Gr,Mr)||de(Fe,Mr)||ai(Pr,Mr)})),Pr},Xr=function(Er){var Lr=Er===Le,Pr=Yr(Lr?Ye:pe(Er)),Mr=[];return Qe(Pr,(function(Jr){!de(Gr,Jr)||Lr&&!de(Le,Jr)||ai(Mr,Gr[Jr])})),Mr};ue||(Oe(mr=(We=function(){if(fe(mr,this))throw lr("Symbol is not a constructor");var Er=arguments.length&&arguments[0]!==void 0?me(arguments[0]):void 0,Lr=Ve(Er),Pr=function(Mr){this===Le&&oe(Pr,Ye,Mr),de(this,Bt)&&de(this[Bt],Lr)&&(this[Bt][Lr]=!1),xr(this,Lr,ye(1,Mr))};return ce&&Rr&&xr(Le,Lr,{configurable:!0,set:Pr}),Br(Lr,Er)}).prototype,"toString",(function(){return $e(this).tag})),Oe(We,"withoutSetter",(function(Er){return Br(Ve(Er),Er)})),Ae.f=gi,Re.f=li,we.f=Ei,Se.f=ti,_e.f=Ce.f=di,Te.f=Xr,ur.f=function(Er){return Br(He(Er),Er)},ce&&($r(mr,"description",{configurable:!0,get:function(){return $e(this).description}}),ae||Oe(Le,"propertyIsEnumerable",gi,{unsafe:!0}))),ne({global:!0,constructor:!0,wrap:!0,forced:!ue,sham:!ue},{Symbol:We}),Qe(be(Ir),(function(Er){qe(Er)})),ne({target:"Symbol",stat:!0,forced:!ue},{useSetter:function(){Rr=!0},useSimple:function(){Rr=!1}}),ne({target:"Object",stat:!0,forced:!ue,sham:!ce},{create:function(Er,Lr){return Lr===void 0?ve(Er):Ei(ve(Er),Lr)},defineProperty:li,defineProperties:Ei,getOwnPropertyDescriptor:ti}),ne({target:"Object",stat:!0,forced:!ue},{getOwnPropertyNames:di}),hr(),fr(We,"Symbol"),Fe[Bt]=!0},function(ee,re,te){var ne=te(51),ie=te(27),oe=te(116).f,se=te(117),ae=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ee.exports.f=function(ce){return ae&&ne(ce)=="Window"?(function(ue){try{return oe(ue)}catch{return se(ae)}})(ce):oe(ie(ce))}},function(ee,re,te){var ne=te(111),ie=te(38);ee.exports=ne?{}.toString:function(){return"[object "+ie(this)+"]"}},function(ee,re,te){var ne=te(9),ie=te(10),oe=ne.WeakMap;ee.exports=ie(oe)&&/native code/.test(String(oe))},function(ee,re,te){var ne=te(1),ie=te(24),oe=te(13),se=te(29),ae=te(70),ce=te(139),ue=ae("string-to-symbol-registry"),le=ae("symbol-to-string-registry");ne({target:"Symbol",stat:!0,forced:!ce},{for:function(de){var fe=se(de);if(oe(ue,fe))return ue[fe];var he=ie("Symbol")(fe);return ue[fe]=he,le[he]=fe,he}})},function(ee,re,te){var ne=te(1),ie=te(13),oe=te(85),se=te(69),ae=te(70),ce=te(139),ue=ae("symbol-to-string-registry");ne({target:"Symbol",stat:!0,forced:!ce},{keyFor:function(le){if(!oe(le))throw TypeError(se(le)+" is not a symbol");if(ie(ue,le))return ue[le]}})},function(ee,re,te){var ne=te(1),ie=te(55),oe=te(5),se=te(92),ae=te(36);ne({target:"Object",stat:!0,forced:!ie||oe((function(){se.f(1)}))},{getOwnPropertySymbols:function(ce){var ue=se.f;return ue?ue(ae(ce)):[]}})},function(ee,re,te){te(12)("asyncIterator")},function(ee,re){},function(ee,re,te){te(12)("hasInstance")},function(ee,re,te){te(12)("isConcatSpreadable")},function(ee,re,te){te(12)("match")},function(ee,re,te){te(12)("matchAll")},function(ee,re,te){te(12)("replace")},function(ee,re,te){te(12)("search")},function(ee,re,te){te(12)("species")},function(ee,re,te){te(12)("split")},function(ee,re,te){var ne=te(24),ie=te(12),oe=te(47);ie("toStringTag"),oe(ne("Symbol"),"Symbol")},function(ee,re,te){te(12)("unscopables")},function(ee,re,te){var ne=te(9);te(47)(ne.JSON,"JSON",!0)},function(ee,re){},function(ee,re){},function(ee,re,te){var ne=te(10),ie=String,oe=TypeError;ee.exports=function(se){if(typeof se=="object"||ne(se))return se;throw oe("Can't set "+ie(se)+" as a prototype")}},function(ee,re){ee.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(ee,re,te){te(12)("dispose")},function(ee,re,te){te(12)("asyncDispose")},function(ee,re,te){te(12)("matcher")},function(ee,re,te){te(12)("metadataKey")},function(ee,re,te){te(12)("observable")},function(ee,re,te){te(12)("metadata")},function(ee,re,te){te(12)("patternMatch")},function(ee,re,te){te(12)("replaceAll")},function(ee,re,te){ee.exports=te(249)},function(ee,re,te){ee.exports=te(250)},function(ee,re,te){var ne=te(251);ee.exports=ne},function(ee,re,te){var ne=te(252);ee.exports=ne},function(ee,re,te){var ne=te(253);te(39),ee.exports=ne},function(ee,re,te){te(48),te(72),te(60),te(141);var ne=te(93);ee.exports=ne.f("iterator")},function(ee,re,te){var ne=te(255),ie=te(87).default;ee.exports=function(oe,se){if(ie(oe)!=="object"||oe===null)return oe;var ae=oe[ne];if(ae!==void 0){var ce=ae.call(oe,se||"default");if(ie(ce)!=="object")return ce;throw new TypeError("@@toPrimitive must return a primitive value.")}return(se==="string"?String:Number)(oe)},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(256)},function(ee,re,te){ee.exports=te(257)},function(ee,re,te){var ne=te(258);ee.exports=ne},function(ee,re,te){var ne=te(259);ee.exports=ne},function(ee,re,te){var ne=te(260);ee.exports=ne},function(ee,re,te){te(261),te(142);var ne=te(93);ee.exports=ne.f("toPrimitive")},function(ee,re){},function(ee,re,te){var ne=te(263);ee.exports=ne},function(ee,re,te){te(264);var ne=te(7).Object,ie=ee.exports=function(oe,se){return ne.defineProperties(oe,se)};ne.defineProperties.sham&&(ie.sham=!0)},function(ee,re,te){var ne=te(1),ie=te(15),oe=te(112).f;ne({target:"Object",stat:!0,forced:Object.defineProperties!==oe,sham:!ie},{defineProperties:oe})},function(ee,re,te){var ne=te(266);ee.exports=ne},function(ee,re,te){te(267);var ne=te(7);ee.exports=ne.Object.getOwnPropertyDescriptors},function(ee,re,te){var ne=te(1),ie=te(15),oe=te(151),se=te(27),ae=te(44),ce=te(71);ne({target:"Object",stat:!0,sham:!ie},{getOwnPropertyDescriptors:function(ue){for(var le,de,fe=se(ue),he=ae.f,pe=oe(fe),ge={},me=0;pe.length>me;)(de=he(fe,le=pe[me++]))!==void 0&&ce(ge,le,de);return ge}})},function(ee,re,te){var ne=te(269);ee.exports=ne},function(ee,re,te){te(270);var ne=te(21);ee.exports=ne("Array").forEach},function(ee,re,te){var ne=te(1),ie=te(271);ne({target:"Array",proto:!0,forced:[].forEach!=ie},{forEach:ie})},function(ee,re,te){var ne=te(94).forEach,ie=te(153)("forEach");ee.exports=ie?[].forEach:function(oe){return ne(this,oe,arguments.length>1?arguments[1]:void 0)}},function(ee,re,te){te(273);var ne=te(7).Object,ie=ee.exports=function(oe,se){return ne.getOwnPropertyDescriptor(oe,se)};ne.getOwnPropertyDescriptor.sham&&(ie.sham=!0)},function(ee,re,te){var ne=te(1),ie=te(5),oe=te(27),se=te(44).f,ae=te(15);ne({target:"Object",stat:!0,forced:!ae||ie((function(){se(1)})),sham:!ae},{getOwnPropertyDescriptor:function(ce,ue){return se(oe(ce),ue)}})},function(ee,re,te){var ne=te(275);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(276),oe=Array.prototype;ee.exports=function(se){var ae=se.filter;return se===oe||ne(oe,se)&&ae===oe.filter?ie:ae}},function(ee,re,te){te(277);var ne=te(21);ee.exports=ne("Array").filter},function(ee,re,te){var ne=te(1),ie=te(94).filter;ne({target:"Array",proto:!0,forced:!te(89)("filter")},{filter:function(oe){return ie(this,oe,arguments.length>1?arguments[1]:void 0)}})},function(ee,re,te){te(135);var ne=te(7);ee.exports=ne.Object.getOwnPropertySymbols},function(ee,re,te){te(280);var ne=te(7);ee.exports=ne.Object.keys},function(ee,re,te){var ne=te(1),ie=te(36),oe=te(73);ne({target:"Object",stat:!0,forced:te(5)((function(){oe(1)}))},{keys:function(se){return oe(ie(se))}})},function(ee,re){ee.exports=function(te){if(te===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return te},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(283)},function(ee,re,te){var ne=te(284);ee.exports=ne},function(ee,re,te){var ne=te(285);ee.exports=ne},function(ee,re,te){var ne=te(286);ee.exports=ne},function(ee,re,te){te(287);var ne=te(7);ee.exports=ne.Object.setPrototypeOf},function(ee,re,te){te(1)({target:"Object",stat:!0},{setPrototypeOf:te(95)})},function(ee,re,te){ee.exports=te(289)},function(ee,re,te){var ne=te(290);ee.exports=ne},function(ee,re,te){var ne=te(291);ee.exports=ne},function(ee,re,te){var ne=te(292);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(293),oe=Function.prototype;ee.exports=function(se){var ae=se.bind;return se===oe||ne(oe,se)&&ae===oe.bind?ie:ae}},function(ee,re,te){te(294);var ne=te(21);ee.exports=ne("Function").bind},function(ee,re,te){var ne=te(1),ie=te(295);ne({target:"Function",proto:!0,forced:Function.bind!==ie},{bind:ie})},function(ee,re,te){var ne=te(6),ie=te(30),oe=te(17),se=te(13),ae=te(74),ce=te(67),ue=Function,le=ne([].concat),de=ne([].join),fe={},he=function(pe,ge,me){if(!se(fe,ge)){for(var ye=[],ve=0;ve<ge;ve++)ye[ve]="a["+ve+"]";fe[ge]=ue("C,a","return new C("+de(ye,",")+")")}return fe[ge](pe,me)};ee.exports=ce?ue.bind:function(pe){var ge=ie(this),me=ge.prototype,ye=ae(arguments,1),ve=function(){var be=le(ye,ae(arguments));return this instanceof ve?he(ge,be.length,be):ge.apply(pe,be)};return oe(me)&&(ve.prototype=me),ve}},function(ee,re,te){ee.exports=te(297)},function(ee,re,te){var ne=te(298);ee.exports=ne},function(ee,re,te){var ne=te(299);ee.exports=ne},function(ee,re,te){var ne=te(300);ee.exports=ne},function(ee,re,te){te(301);var ne=te(7);ee.exports=ne.Object.getPrototypeOf},function(ee,re,te){var ne=te(1),ie=te(5),oe=te(36),se=te(75),ae=te(148);ne({target:"Object",stat:!0,forced:ie((function(){se(1)})),sham:!ae},{getPrototypeOf:function(ce){return se(oe(ce))}})},function(ee,re,te){ee.exports=te(303)},function(ee,re,te){var ne=te(304);ee.exports=ne},function(ee,re,te){var ne=te(159);ee.exports=ne},function(ee,re,te){te(306);var ne=te(7).Object;ee.exports=function(ie,oe){return ne.create(ie,oe)}},function(ee,re,te){te(1)({target:"Object",stat:!0,sham:!te(15)},{create:te(57)})},function(ee,re,te){var ne=te(118),ie=te(119);function oe(se,ae){var ce;return ee.exports=oe=ne?ie(ce=ne).call(ce):function(ue,le){return ue.__proto__=le,ue},ee.exports.__esModule=!0,ee.exports.default=ee.exports,oe(se,ae)}ee.exports=oe,ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){var ne=te(309);ee.exports=ne},function(ee,re,te){te(310);var ne=te(7);ee.exports=ne.Object.assign},function(ee,re,te){var ne=te(1),ie=te(160);ne({target:"Object",stat:!0,arity:2,forced:Object.assign!==ie},{assign:ie})},function(ee,re,te){var ne=te(312);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(313),oe=Array.prototype;ee.exports=function(se){var ae=se.map;return se===oe||ne(oe,se)&&ae===oe.map?ie:ae}},function(ee,re,te){te(314);var ne=te(21);ee.exports=ne("Array").map},function(ee,re,te){var ne=te(1),ie=te(94).map;ne({target:"Array",proto:!0,forced:!te(89)("map")},{map:function(oe){return ie(this,oe,arguments.length>1?arguments[1]:void 0)}})},function(ee,re,te){var ne=te(316);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(317),oe=te(319),se=Array.prototype,ae=String.prototype;ee.exports=function(ce){var ue=ce.includes;return ce===se||ne(se,ce)&&ue===se.includes?ie:typeof ce=="string"||ce===ae||ne(ae,ce)&&ue===ae.includes?oe:ue}},function(ee,re,te){te(318);var ne=te(21);ee.exports=ne("Array").includes},function(ee,re,te){var ne=te(1),ie=te(113).includes,oe=te(5),se=te(143);ne({target:"Array",proto:!0,forced:oe((function(){return!Array(1).includes()}))},{includes:function(ae){return ie(this,ae,arguments.length>1?arguments[1]:void 0)}}),se("includes")},function(ee,re,te){te(320);var ne=te(21);ee.exports=ne("String").includes},function(ee,re,te){var ne=te(1),ie=te(6),oe=te(161),se=te(54),ae=te(29),ce=te(162),ue=ie("".indexOf);ne({target:"String",proto:!0,forced:!ce("includes")},{includes:function(le){return!!~ue(ae(se(this)),ae(oe(le)),arguments.length>1?arguments[1]:void 0)}})},function(ee,re,te){var ne=te(17),ie=te(51),oe=te(8)("match");ee.exports=function(se){var ae;return ne(se)&&((ae=se[oe])!==void 0?!!ae:ie(se)=="RegExp")}},function(ee,re,te){var ne=te(323);ee.exports=function(ie){if(ne(ie))return ie},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(324)},function(ee,re,te){ee.exports=te(325)},function(ee,re,te){var ne=te(326);ee.exports=ne},function(ee,re,te){var ne=te(327);ee.exports=ne},function(ee,re,te){var ne=te(328);ee.exports=ne},function(ee,re,te){te(329);var ne=te(7);ee.exports=ne.Array.isArray},function(ee,re,te){te(1)({target:"Array",stat:!0},{isArray:te(56)})},function(ee,re,te){var ne=te(109),ie=te(331);ee.exports=function(oe,se){var ae=oe==null?null:ne!==void 0&&ie(oe)||oe["@@iterator"];if(ae!=null){var ce,ue,le,de,fe=[],he=!0,pe=!1;try{if(le=(ae=ae.call(oe)).next,se===0){if(Object(ae)!==ae)return;he=!1}else for(;!(he=(ce=le.call(ae)).done)&&(fe.push(ce.value),fe.length!==se);he=!0);}catch(ge){pe=!0,ue=ge}finally{try{if(!he&&ae.return!=null&&(de=ae.return(),Object(de)!==de))return}finally{if(pe)throw ue}}return fe}},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(332)},function(ee,re,te){ee.exports=te(333)},function(ee,re,te){var ne=te(334);ee.exports=ne},function(ee,re,te){var ne=te(335);ee.exports=ne},function(ee,re,te){var ne=te(336);te(39),ee.exports=ne},function(ee,re,te){te(48),te(60);var ne=te(76);ee.exports=ne},function(ee,re,te){var ne=te(163),ie=te(345),oe=te(352);ee.exports=function(se,ae){var ce;if(se){if(typeof se=="string")return oe(se,ae);var ue=ne(ce=Object.prototype.toString.call(se)).call(ce,8,-1);return ue==="Object"&&se.constructor&&(ue=se.constructor.name),ue==="Map"||ue==="Set"?ie(se):ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue)?oe(se,ae):void 0}},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(339)},function(ee,re,te){var ne=te(340);ee.exports=ne},function(ee,re,te){var ne=te(341);ee.exports=ne},function(ee,re,te){var ne=te(342);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(343),oe=Array.prototype;ee.exports=function(se){var ae=se.slice;return se===oe||ne(oe,se)&&ae===oe.slice?ie:ae}},function(ee,re,te){te(344);var ne=te(21);ee.exports=ne("Array").slice},function(ee,re,te){var ne=te(1),ie=te(56),oe=te(88),se=te(17),ae=te(114),ce=te(52),ue=te(27),le=te(71),de=te(8),fe=te(89),he=te(74),pe=fe("slice"),ge=de("species"),me=Array,ye=Math.max;ne({target:"Array",proto:!0,forced:!pe},{slice:function(ve,be){var _e,Ce,Te,Se=ue(this),Re=ce(Se),we=ae(ve,Re),Ae=ae(be===void 0?Re:be,Re);if(ie(Se)&&(_e=Se.constructor,(oe(_e)&&(_e===me||ie(_e.prototype))||se(_e)&&(_e=_e[ge])===null)&&(_e=void 0),_e===me||_e===void 0))return he(Se,we,Ae);for(Ce=new(_e===void 0?me:_e)(ye(Ae-we,0)),Te=0;we<Ae;we++,Te++)we in Se&&le(Ce,Te,Se[we]);return Ce.length=Te,Ce}})},function(ee,re,te){ee.exports=te(346)},function(ee,re,te){ee.exports=te(347)},function(ee,re,te){var ne=te(348);ee.exports=ne},function(ee,re,te){var ne=te(164);ee.exports=ne},function(ee,re,te){te(60),te(350);var ne=te(7);ee.exports=ne.Array.from},function(ee,re,te){var ne=te(1),ie=te(165);ne({target:"Array",stat:!0,forced:!te(168)((function(oe){Array.from(oe)}))},{from:ie})},function(ee,re,te){var ne=te(20),ie=te(166);ee.exports=function(oe,se,ae,ce){try{return ce?se(ne(ae)[0],ae[1]):se(ae)}catch(ue){ie(oe,"throw",ue)}}},function(ee,re){ee.exports=function(te,ne){(ne==null||ne>te.length)&&(ne=te.length);for(var ie=0,oe=new Array(ne);ie<ne;ie++)oe[ie]=te[ie];return oe},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re){ee.exports=function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
885
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){var ne=te(355);ee.exports=ne},function(ee,re,te){te(356);var ne=te(7);ee.exports=ne.Object.entries},function(ee,re,te){var ne=te(1),ie=te(357).entries;ne({target:"Object",stat:!0},{entries:function(oe){return ie(oe)}})},function(ee,re,te){var ne=te(15),ie=te(6),oe=te(73),se=te(27),ae=ie(te(82).f),ce=ie([].push),ue=function(le){return function(de){for(var fe,he=se(de),pe=oe(he),ge=pe.length,me=0,ye=[];ge>me;)fe=pe[me++],ne&&!ae(he,fe)||ce(ye,le?[fe,he[fe]]:he[fe]);return ye}};ee.exports={entries:ue(!0),values:ue(!1)}},function(ee,re,te){var ne=te(87).default,ie=te(80),oe=te(109),se=te(158),ae=te(157),ce=te(359),ue=te(118),le=te(169),de=te(393),fe=te(163);function he(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ee.exports=he=function(){return pe},ee.exports.__esModule=!0,ee.exports.default=ee.exports;var pe={},ge=Object.prototype,me=ge.hasOwnProperty,ye=ie||function($e,Le,We){$e[Le]=We.value},ve=typeof oe=="function"?oe:{},be=ve.iterator||"@@iterator",_e=ve.asyncIterator||"@@asyncIterator",Ce=ve.toStringTag||"@@toStringTag";function Te($e,Le,We){return ie($e,Le,{value:We,enumerable:!0,configurable:!0,writable:!0}),$e[Le]}try{Te({},"")}catch{Te=function(Le,We,mr){return Le[We]=mr}}function Se($e,Le,We,mr){var lr=Le&&Le.prototype instanceof Ae?Le:Ae,Sr=se(lr.prototype),zr=new Qe(mr||[]);return ye(Sr,"_invoke",{value:qe($e,We,zr)}),Sr}function Re($e,Le,We){try{return{type:"normal",arg:$e.call(Le,We)}}catch(mr){return{type:"throw",arg:mr}}}pe.wrap=Se;var we={};function Ae(){}function Oe(){}function Ne(){}var Ue={};Te(Ue,be,(function(){return this}));var Fe=ae&&ae(ae(Bt([])));Fe&&Fe!==ge&&me.call(Fe,be)&&(Ue=Fe);var Ve=Ne.prototype=Ae.prototype=se(Ue);function He($e){var Le;ce(Le=["next","throw","return"]).call(Le,(function(We){Te($e,We,(function(mr){return this._invoke(We,mr)}))}))}function ur($e,Le){var We;ye(this,"_invoke",{value:function(mr,lr){function Sr(){return new Le((function(zr,$r){(function Yr(ei,ai,Gr,Ye){var Ir=Re($e[ei],$e,ai);if(Ir.type!=="throw"){var Rr=Ir.arg,xr=Rr.value;return xr&&ne(xr)=="object"&&me.call(xr,"__await")?Le.resolve(xr.__await).then((function(Br){Yr("next",Br,Gr,Ye)}),(function(Br){Yr("throw",Br,Gr,Ye)})):Le.resolve(xr).then((function(Br){Rr.value=Br,Gr(Rr)}),(function(Br){return Yr("throw",Br,Gr,Ye)}))}Ye(Ir.arg)})(mr,lr,zr,$r)}))}return We=We?We.then(Sr,Sr):Sr()}})}function qe($e,Le,We){var mr="suspendedStart";return function(lr,Sr){if(mr==="executing")throw new Error("Generator is already running");if(mr==="completed"){if(lr==="throw")throw Sr;return Cr()}for(We.method=lr,We.arg=Sr;;){var zr=We.delegate;if(zr){var $r=hr(zr,We);if($r){if($r===we)continue;return $r}}if(We.method==="next")We.sent=We._sent=We.arg;else if(We.method==="throw"){if(mr==="suspendedStart")throw mr="completed",We.arg;We.dispatchException(We.arg)}else We.method==="return"&&We.abrupt("return",We.arg);mr="executing";var Yr=Re($e,Le,We);if(Yr.type==="normal"){if(mr=We.done?"completed":"suspendedYield",Yr.arg===we)continue;return{value:Yr.arg,done:We.done}}Yr.type==="throw"&&(mr="completed",We.method="throw",We.arg=Yr.arg)}}}function hr($e,Le){var We=Le.method,mr=$e.iterator[We];if(mr===void 0)return Le.delegate=null,We==="throw"&&$e.iterator.return&&(Le.method="return",Le.arg=void 0,hr($e,Le),Le.method==="throw")||We!=="return"&&(Le.method="throw",Le.arg=new TypeError("The iterator does not provide a '"+We+"' method")),we;var lr=Re(mr,$e.iterator,Le.arg);if(lr.type==="throw")return Le.method="throw",Le.arg=lr.arg,Le.delegate=null,we;var Sr=lr.arg;return Sr?Sr.done?(Le[$e.resultName]=Sr.value,Le.next=$e.nextLoc,Le.method!=="return"&&(Le.method="next",Le.arg=void 0),Le.delegate=null,we):Sr:(Le.method="throw",Le.arg=new TypeError("iterator result is not an object"),Le.delegate=null,we)}function fr($e){var Le={tryLoc:$e[0]};1 in $e&&(Le.catchLoc=$e[1]),2 in $e&&(Le.finallyLoc=$e[2],Le.afterLoc=$e[3]),this.tryEntries.push(Le)}function dr($e){var Le=$e.completion||{};Le.type="normal",delete Le.arg,$e.completion=Le}function Qe($e){this.tryEntries=[{tryLoc:"root"}],ce($e).call($e,fr,this),this.reset(!0)}function Bt($e){if($e){var Le=$e[be];if(Le)return Le.call($e);if(typeof $e.next=="function")return $e;if(!isNaN($e.length)){var We=-1,mr=function lr(){for(;++We<$e.length;)if(me.call($e,We))return lr.value=$e[We],lr.done=!1,lr;return lr.value=void 0,lr.done=!0,lr};return mr.next=mr}}return{next:Cr}}function Cr(){return{value:void 0,done:!0}}return Oe.prototype=Ne,ye(Ve,"constructor",{value:Ne,configurable:!0}),ye(Ne,"constructor",{value:Oe,configurable:!0}),Oe.displayName=Te(Ne,Ce,"GeneratorFunction"),pe.isGeneratorFunction=function($e){var Le=typeof $e=="function"&&$e.constructor;return!!Le&&(Le===Oe||(Le.displayName||Le.name)==="GeneratorFunction")},pe.mark=function($e){return ue?ue($e,Ne):($e.__proto__=Ne,Te($e,Ce,"GeneratorFunction")),$e.prototype=se(Ve),$e},pe.awrap=function($e){return{__await:$e}},He(ur.prototype),Te(ur.prototype,_e,(function(){return this})),pe.AsyncIterator=ur,pe.async=function($e,Le,We,mr,lr){lr===void 0&&(lr=le);var Sr=new ur(Se($e,Le,We,mr),lr);return pe.isGeneratorFunction(Le)?Sr:Sr.next().then((function(zr){return zr.done?zr.value:Sr.next()}))},He(Ve),Te(Ve,Ce,"Generator"),Te(Ve,be,(function(){return this})),Te(Ve,"toString",(function(){return"[object Generator]"})),pe.keys=function($e){var Le=Object($e),We=[];for(var mr in Le)We.push(mr);return de(We).call(We),function lr(){for(;We.length;){var Sr=We.pop();if(Sr in Le)return lr.value=Sr,lr.done=!1,lr}return lr.done=!0,lr}},pe.values=Bt,Qe.prototype={constructor:Qe,reset:function($e){var Le;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,ce(Le=this.tryEntries).call(Le,dr),!$e)for(var We in this)We.charAt(0)==="t"&&me.call(this,We)&&!isNaN(+fe(We).call(We,1))&&(this[We]=void 0)},stop:function(){this.done=!0;var $e=this.tryEntries[0].completion;if($e.type==="throw")throw $e.arg;return this.rval},dispatchException:function($e){if(this.done)throw $e;var Le=this;function We(Yr,ei){return Sr.type="throw",Sr.arg=$e,Le.next=Yr,ei&&(Le.method="next",Le.arg=void 0),!!ei}for(var mr=this.tryEntries.length-1;mr>=0;--mr){var lr=this.tryEntries[mr],Sr=lr.completion;if(lr.tryLoc==="root")return We("end");if(lr.tryLoc<=this.prev){var zr=me.call(lr,"catchLoc"),$r=me.call(lr,"finallyLoc");if(zr&&$r){if(this.prev<lr.catchLoc)return We(lr.catchLoc,!0);if(this.prev<lr.finallyLoc)return We(lr.finallyLoc)}else if(zr){if(this.prev<lr.catchLoc)return We(lr.catchLoc,!0)}else{if(!$r)throw new Error("try statement without catch or finally");if(this.prev<lr.finallyLoc)return We(lr.finallyLoc)}}}},abrupt:function($e,Le){for(var We=this.tryEntries.length-1;We>=0;--We){var mr=this.tryEntries[We];if(mr.tryLoc<=this.prev&&me.call(mr,"finallyLoc")&&this.prev<mr.finallyLoc){var lr=mr;break}}lr&&($e==="break"||$e==="continue")&&lr.tryLoc<=Le&&Le<=lr.finallyLoc&&(lr=null);var Sr=lr?lr.completion:{};return Sr.type=$e,Sr.arg=Le,lr?(this.method="next",this.next=lr.finallyLoc,we):this.complete(Sr)},complete:function($e,Le){if($e.type==="throw")throw $e.arg;return $e.type==="break"||$e.type==="continue"?this.next=$e.arg:$e.type==="return"?(this.rval=this.arg=$e.arg,this.method="return",this.next="end"):$e.type==="normal"&&Le&&(this.next=Le),we},finish:function($e){for(var Le=this.tryEntries.length-1;Le>=0;--Le){var We=this.tryEntries[Le];if(We.finallyLoc===$e)return this.complete(We.completion,We.afterLoc),dr(We),we}},catch:function($e){for(var Le=this.tryEntries.length-1;Le>=0;--Le){var We=this.tryEntries[Le];if(We.tryLoc===$e){var mr=We.completion;if(mr.type==="throw"){var lr=mr.arg;dr(We)}return lr}}throw new Error("illegal catch attempt")},delegateYield:function($e,Le,We){return this.delegate={iterator:Bt($e),resultName:Le,nextLoc:We},this.method==="next"&&(this.arg=void 0),we}},pe}ee.exports=he,ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(360)},function(ee,re,te){ee.exports=te(361)},function(ee,re,te){var ne=te(362);ee.exports=ne},function(ee,re,te){var ne=te(152);ee.exports=ne},function(ee,re,te){ee.exports=te(364)},function(ee,re,te){var ne=te(365);te(389),te(390),te(391),te(392),ee.exports=ne},function(ee,re,te){var ne=te(170);ee.exports=ne},function(ee,re,te){te(171),te(48),te(72),te(374),te(179),te(180),te(388),te(60);var ne=te(7);ee.exports=ne.Promise},function(ee,re,te){var ne=te(1),ie=te(16),oe=te(75),se=te(95),ae=te(368),ce=te(57),ue=te(37),le=te(45),de=te(369),fe=te(370),he=te(77),pe=te(373),ge=te(8)("toStringTag"),me=Error,ye=[].push,ve=function(_e,Ce){var Te,Se=ie(be,this);se?Te=se(me(),Se?oe(this):be):(Te=Se?this:ce(be),ue(Te,ge,"Error")),Ce!==void 0&&ue(Te,"message",pe(Ce)),fe(Te,ve,Te.stack,1),arguments.length>2&&de(Te,arguments[2]);var Re=[];return he(_e,ye,{that:Re}),ue(Te,"errors",Re),Te};se?se(ve,me):ae(ve,me,{name:!0});var be=ve.prototype=ce(me.prototype,{constructor:le(1,ve),message:le(1,""),name:le(1,"AggregateError")});ne({global:!0,constructor:!0,arity:2},{AggregateError:ve})},function(ee,re,te){var ne=te(13),ie=te(151),oe=te(44),se=te(28);ee.exports=function(ae,ce,ue){for(var le=ie(ce),de=se.f,fe=oe.f,he=0;he<le.length;he++){var pe=le[he];ne(ae,pe)||ue&&ne(ue,pe)||de(ae,pe,fe(ce,pe))}}},function(ee,re,te){var ne=te(17),ie=te(37);ee.exports=function(oe,se){ne(se)&&"cause"in se&&ie(oe,"cause",se.cause)}},function(ee,re,te){var ne=te(37),ie=te(371),oe=te(372),se=Error.captureStackTrace;ee.exports=function(ae,ce,ue,le){oe&&(se?se(ae,ce):ne(ae,"stack",ie(ue,le)))}},function(ee,re,te){var ne=te(6),ie=Error,oe=ne("".replace),se=String(ie("zxcasd").stack),ae=/\n\s*at [^:]*:[^\n]*/,ce=ae.test(se);ee.exports=function(ue,le){if(ce&&typeof ue=="string"&&!ie.prepareStackTrace)for(;le--;)ue=oe(ue,ae,"");return ue}},function(ee,re,te){var ne=te(5),ie=te(45);ee.exports=!ne((function(){var oe=Error("a");return!("stack"in oe)||(Object.defineProperty(oe,"stack",ie(1,7)),oe.stack!==7)}))},function(ee,re,te){var ne=te(29);ee.exports=function(ie,oe){return ie===void 0?arguments.length<2?"":oe:ne(ie)}},function(ee,re,te){te(375),te(383),te(384),te(385),te(386),te(387)},function(ee,re,te){var ne,ie,oe,se=te(1),ae=te(26),ce=te(97),ue=te(9),le=te(14),de=te(31),fe=te(95),he=te(47),pe=te(376),ge=te(30),me=te(10),ye=te(17),ve=te(120),be=te(173),_e=te(174).set,Ce=te(378),Te=te(381),Se=te(61),Re=te(176),we=te(58),Ae=te(62),Oe=te(78),Ne=te(49),Ue=Oe.CONSTRUCTOR,Fe=Oe.REJECTION_EVENT,Ve=Oe.SUBCLASSING,He=we.getterFor("Promise"),ur=we.set,qe=Ae&&Ae.prototype,hr=Ae,fr=qe,dr=ue.TypeError,Qe=ue.document,Bt=ue.process,Cr=Ne.f,$e=Cr,Le=!!(Qe&&Qe.createEvent&&ue.dispatchEvent),We=function(Ye){var Ir;return!(!ye(Ye)||!me(Ir=Ye.then))&&Ir},mr=function(Ye,Ir){var Rr,xr,Br,li=Ir.value,Ei=Ir.state==1,gi=Ei?Ye.ok:Ye.fail,ti=Ye.resolve,di=Ye.reject,Xr=Ye.domain;try{gi?(Ei||(Ir.rejection===2&&Yr(Ir),Ir.rejection=1),gi===!0?Rr=li:(Xr&&Xr.enter(),Rr=gi(li),Xr&&(Xr.exit(),Br=!0)),Rr===Ye.promise?di(dr("Promise-chain cycle")):(xr=We(Rr))?le(xr,Rr,ti,di):ti(Rr)):di(li)}catch(Er){Xr&&!Br&&Xr.exit(),di(Er)}},lr=function(Ye,Ir){Ye.notified||(Ye.notified=!0,Ce((function(){for(var Rr,xr=Ye.reactions;Rr=xr.get();)mr(Rr,Ye);Ye.notified=!1,Ir&&!Ye.rejection&&zr(Ye)})))},Sr=function(Ye,Ir,Rr){var xr,Br;Le?((xr=Qe.createEvent("Event")).promise=Ir,xr.reason=Rr,xr.initEvent(Ye,!1,!0),ue.dispatchEvent(xr)):xr={promise:Ir,reason:Rr},!Fe&&(Br=ue["on"+Ye])?Br(xr):Ye==="unhandledrejection"&&Te("Unhandled promise rejection",Rr)},zr=function(Ye){le(_e,ue,(function(){var Ir,Rr=Ye.facade,xr=Ye.value;if($r(Ye)&&(Ir=Se((function(){ce?Bt.emit("unhandledRejection",xr,Rr):Sr("unhandledrejection",Rr,xr)})),Ye.rejection=ce||$r(Ye)?2:1,Ir.error))throw Ir.value}))},$r=function(Ye){return Ye.rejection!==1&&!Ye.parent},Yr=function(Ye){le(_e,ue,(function(){var Ir=Ye.facade;ce?Bt.emit("rejectionHandled",Ir):Sr("rejectionhandled",Ir,Ye.value)}))},ei=function(Ye,Ir,Rr){return function(xr){Ye(Ir,xr,Rr)}},ai=function(Ye,Ir,Rr){Ye.done||(Ye.done=!0,Rr&&(Ye=Rr),Ye.value=Ir,Ye.state=2,lr(Ye,!0))},Gr=function(Ye,Ir,Rr){if(!Ye.done){Ye.done=!0,Rr&&(Ye=Rr);try{if(Ye.facade===Ir)throw dr("Promise can't be resolved itself");var xr=We(Ir);xr?Ce((function(){var Br={done:!1};try{le(xr,Ir,ei(Gr,Br,Ye),ei(ai,Br,Ye))}catch(li){ai(Br,li,Ye)}})):(Ye.value=Ir,Ye.state=1,lr(Ye,!1))}catch(Br){ai({done:!1},Br,Ye)}}};if(Ue&&(fr=(hr=function(Ye){ve(this,fr),ge(Ye),le(ne,this);var Ir=He(this);try{Ye(ei(Gr,Ir),ei(ai,Ir))}catch(Rr){ai(Ir,Rr)}}).prototype,(ne=function(Ye){ur(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Re,rejection:!1,state:0,value:void 0})}).prototype=de(fr,"then",(function(Ye,Ir){var Rr=He(this),xr=Cr(be(this,hr));return Rr.parent=!0,xr.ok=!me(Ye)||Ye,xr.fail=me(Ir)&&Ir,xr.domain=ce?Bt.domain:void 0,Rr.state==0?Rr.reactions.add(xr):Ce((function(){mr(xr,Rr)})),xr.promise})),ie=function(){var Ye=new ne,Ir=He(Ye);this.promise=Ye,this.resolve=ei(Gr,Ir),this.reject=ei(ai,Ir)},Ne.f=Cr=function(Ye){return Ye===hr||Ye===void 0?new ie(Ye):$e(Ye)},!ae&&me(Ae)&&qe!==Object.prototype)){oe=qe.then,Ve||de(qe,"then",(function(Ye,Ir){var Rr=this;return new hr((function(xr,Br){le(oe,Rr,xr,Br)})).then(Ye,Ir)}),{unsafe:!0});try{delete qe.constructor}catch{}fe&&fe(qe,fr)}se({global:!0,constructor:!0,wrap:!0,forced:Ue},{Promise:hr}),he(hr,"Promise",!1,!0),pe("Promise")},function(ee,re,te){var ne=te(24),ie=te(28),oe=te(8),se=te(15),ae=oe("species");ee.exports=function(ce){var ue=ne(ce),le=ie.f;se&&ue&&!ue[ae]&&le(ue,ae,{configurable:!0,get:function(){return this}})}},function(ee,re,te){var ne=te(88),ie=te(69),oe=TypeError;ee.exports=function(se){if(ne(se))return se;throw oe(ie(se)+" is not a constructor")}},function(ee,re,te){var ne,ie,oe,se,ae,ce=te(9),ue=te(46),le=te(44).f,de=te(174).set,fe=te(176),he=te(175),pe=te(379),ge=te(380),me=te(97),ye=ce.MutationObserver||ce.WebKitMutationObserver,ve=ce.document,be=ce.process,_e=ce.Promise,Ce=le(ce,"queueMicrotask"),Te=Ce&&Ce.value;if(!Te){var Se=new fe,Re=function(){var we,Ae;for(me&&(we=be.domain)&&we.exit();Ae=Se.get();)try{Ae()}catch(Oe){throw Se.head&&ne(),Oe}we&&we.enter()};he||me||ge||!ye||!ve?!pe&&_e&&_e.resolve?((se=_e.resolve(void 0)).constructor=_e,ae=ue(se.then,se),ne=function(){ae(Re)}):me?ne=function(){be.nextTick(Re)}:(de=ue(de,ce),ne=function(){de(Re)}):(ie=!0,oe=ve.createTextNode(""),new ye(Re).observe(oe,{characterData:!0}),ne=function(){oe.data=ie=!ie}),Te=function(we){Se.head||ne(),Se.add(we)}}ee.exports=Te},function(ee,re,te){var ne=te(68);ee.exports=/ipad|iphone|ipod/i.test(ne)&&typeof Pebble<"u"},function(ee,re,te){var ne=te(68);ee.exports=/web0s(?!.*chrome)/i.test(ne)},function(ee,re){ee.exports=function(te,ne){try{arguments.length==1?console.error(te):console.error(te,ne)}catch{}}},function(ee,re,te){var ne=te(177),ie=te(97);ee.exports=!ne&&!ie&&typeof window=="object"&&typeof document=="object"},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(30),se=te(49),ae=te(61),ce=te(77);ne({target:"Promise",stat:!0,forced:te(99)},{all:function(ue){var le=this,de=se.f(le),fe=de.resolve,he=de.reject,pe=ae((function(){var ge=oe(le.resolve),me=[],ye=0,ve=1;ce(ue,(function(be){var _e=ye++,Ce=!1;ve++,ie(ge,le,be).then((function(Te){Ce||(Ce=!0,me[_e]=Te,--ve||fe(me))}),he)})),--ve||fe(me)}));return pe.error&&he(pe.value),de.promise}})},function(ee,re,te){var ne=te(1),ie=te(26),oe=te(78).CONSTRUCTOR,se=te(62),ae=te(24),ce=te(10),ue=te(31),le=se&&se.prototype;if(ne({target:"Promise",proto:!0,forced:oe,real:!0},{catch:function(fe){return this.then(void 0,fe)}}),!ie&&ce(se)){var de=ae("Promise").prototype.catch;le.catch!==de&&ue(le,"catch",de,{unsafe:!0})}},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(30),se=te(49),ae=te(61),ce=te(77);ne({target:"Promise",stat:!0,forced:te(99)},{race:function(ue){var le=this,de=se.f(le),fe=de.reject,he=ae((function(){var pe=oe(le.resolve);ce(ue,(function(ge){ie(pe,le,ge).then(de.resolve,fe)}))}));return he.error&&fe(he.value),de.promise}})},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(49);ne({target:"Promise",stat:!0,forced:te(78).CONSTRUCTOR},{reject:function(se){var ae=oe.f(this);return ie(ae.reject,void 0,se),ae.promise}})},function(ee,re,te){var ne=te(1),ie=te(24),oe=te(26),se=te(62),ae=te(78).CONSTRUCTOR,ce=te(178),ue=ie("Promise"),le=oe&&!ae;ne({target:"Promise",stat:!0,forced:oe||ae},{resolve:function(de){return ce(le&&this===ue?se:this,de)}})},function(ee,re,te){var ne=te(1),ie=te(26),oe=te(62),se=te(5),ae=te(24),ce=te(10),ue=te(173),le=te(178),de=te(31),fe=oe&&oe.prototype;if(ne({target:"Promise",proto:!0,real:!0,forced:!!oe&&se((function(){fe.finally.call({then:function(){}},(function(){}))}))},{finally:function(pe){var ge=ue(this,ae("Promise")),me=ce(pe);return this.then(me?function(ye){return le(ge,pe()).then((function(){return ye}))}:pe,me?function(ye){return le(ge,pe()).then((function(){throw ye}))}:pe)}}),!ie&&ce(oe)){var he=ae("Promise").prototype.finally;fe.finally!==he&&de(fe,"finally",he,{unsafe:!0})}},function(ee,re,te){te(171)},function(ee,re,te){te(179)},function(ee,re,te){var ne=te(1),ie=te(49),oe=te(61);ne({target:"Promise",stat:!0,forced:!0},{try:function(se){var ae=ie.f(this),ce=oe(se);return(ce.error?ae.reject:ae.resolve)(ce.value),ae.promise}})},function(ee,re,te){te(180)},function(ee,re,te){ee.exports=te(394)},function(ee,re,te){ee.exports=te(395)},function(ee,re,te){var ne=te(396);ee.exports=ne},function(ee,re,te){var ne=te(397);ee.exports=ne},function(ee,re,te){var ne=te(398);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(399),oe=Array.prototype;ee.exports=function(se){var ae=se.reverse;return se===oe||ne(oe,se)&&ae===oe.reverse?ie:ae}},function(ee,re,te){te(400);var ne=te(21);ee.exports=ne("Array").reverse},function(ee,re,te){var ne=te(1),ie=te(6),oe=te(56),se=ie([].reverse),ae=[1,2];ne({target:"Array",proto:!0,forced:String(ae)===String(ae.reverse())},{reverse:function(){return oe(this)&&(this.length=this.length),se(this)}})},function(ee,re,te){var ne=te(402);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(403),oe=Array.prototype;ee.exports=function(se){var ae=se.concat;return se===oe||ne(oe,se)&&ae===oe.concat?ie:ae}},function(ee,re,te){te(131);var ne=te(21);ee.exports=ne("Array").concat},function(ee,re,te){var ne=te(405);ee.exports=ne},function(ee,re,te){te(406);var ne=te(7);ee.exports=ne.parseInt},function(ee,re,te){var ne=te(1),ie=te(407);ne({global:!0,forced:parseInt!=ie},{parseInt:ie})},function(ee,re,te){var ne=te(9),ie=te(5),oe=te(6),se=te(29),ae=te(181).trim,ce=te(121),ue=ne.parseInt,le=ne.Symbol,de=le&&le.iterator,fe=/^[+-]?0x/i,he=oe(fe.exec),pe=ue(ce+"08")!==8||ue(ce+"0x16")!==22||de&&!ie((function(){ue(Object(de))}));ee.exports=pe?function(ge,me){var ye=ae(se(ge));return ue(ye,me>>>0||(he(fe,ye)?16:10))}:ue},function(ee,re,te){var ne=te(409);ee.exports=ne},function(ee,re,te){te(140);var ne=te(7),ie=te(66);ne.JSON||(ne.JSON={stringify:JSON.stringify}),ee.exports=function(oe,se,ae){return ie(ne.JSON.stringify,null,arguments)}},function(ee,re,te){ee.exports=te(411)},function(ee,re,te){var ne=te(412);ee.exports=ne},function(ee,re,te){var ne=te(413);ee.exports=ne},function(ee,re,te){var ne=te(414);te(39),ee.exports=ne},function(ee,re,te){te(48),te(60);var ne=te(96);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(416),oe=Array.prototype;ee.exports=function(se){var ae=se.indexOf;return se===oe||ne(oe,se)&&ae===oe.indexOf?ie:ae}},function(ee,re,te){te(417);var ne=te(21);ee.exports=ne("Array").indexOf},function(ee,re,te){var ne=te(1),ie=te(81),oe=te(113).indexOf,se=te(153),ae=ie([].indexOf),ce=!!ae&&1/ae([1],1,-0)<0;ne({target:"Array",proto:!0,forced:ce||!se("indexOf")},{indexOf:function(ue){var le=arguments.length>1?arguments[1]:void 0;return ce?ae(this,ue,le)||0:oe(this,ue,le)}})},function(ee,re,te){var ne=te(419);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(420),oe=String.prototype;ee.exports=function(se){var ae=se.trim;return typeof se=="string"||se===oe||ne(oe,se)&&ae===oe.trim?ie:ae}},function(ee,re,te){te(421);var ne=te(21);ee.exports=ne("String").trim},function(ee,re,te){var ne=te(1),ie=te(181).trim;ne({target:"String",proto:!0,forced:te(422)("trim")},{trim:function(){return ie(this)}})},function(ee,re,te){var ne=te(145).PROPER,ie=te(5),oe=te(121);ee.exports=function(se){return ie((function(){return!!oe[se]()||"
"[se]()!=="
"||ne&&oe[se].name!==se}))}},function(ee,re){(function(te){ee.exports=te}).call(this,{})},function(ee,re){var te=function(ne){ne==null&&(ne=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,ne.constructor==Array?this.init_by_array(ne,ne.length):this.init_seed(ne)};te.prototype.init_seed=function(ne){for(this.mt[0]=ne>>>0,this.mti=1;this.mti<this.N;this.mti++)ne=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30,this.mt[this.mti]=(1812433253*((4294901760&ne)>>>16)<<16)+1812433253*(65535&ne)+this.mti,this.mt[this.mti]>>>=0},te.prototype.init_by_array=function(ne,ie){var oe,se,ae;for(this.init_seed(19650218),oe=1,se=0,ae=this.N>ie?this.N:ie;ae;ae--){var ce=this.mt[oe-1]^this.mt[oe-1]>>>30;this.mt[oe]=(this.mt[oe]^(1664525*((4294901760&ce)>>>16)<<16)+1664525*(65535&ce))+ne[se]+se,this.mt[oe]>>>=0,se++,++oe>=this.N&&(this.mt[0]=this.mt[this.N-1],oe=1),se>=ie&&(se=0)}for(ae=this.N-1;ae;ae--)ce=this.mt[oe-1]^this.mt[oe-1]>>>30,this.mt[oe]=(this.mt[oe]^(1566083941*((4294901760&ce)>>>16)<<16)+1566083941*(65535&ce))-oe,this.mt[oe]>>>=0,++oe>=this.N&&(this.mt[0]=this.mt[this.N-1],oe=1);this.mt[0]=2147483648},te.prototype.random_int=function(){var ne,ie=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var oe;for(this.mti==this.N+1&&this.init_seed(5489),oe=0;oe<this.N-this.M;oe++)ne=this.mt[oe]&this.UPPER_MASK|this.mt[oe+1]&this.LOWER_MASK,this.mt[oe]=this.mt[oe+this.M]^ne>>>1^ie[1&ne];for(;oe<this.N-1;oe++)ne=this.mt[oe]&this.UPPER_MASK|this.mt[oe+1]&this.LOWER_MASK,this.mt[oe]=this.mt[oe+(this.M-this.N)]^ne>>>1^ie[1&ne];ne=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^ne>>>1^ie[1&ne],this.mti=0}return ne=this.mt[this.mti++],ne^=ne>>>11,ne^=ne<<7&2636928640,ne^=ne<<15&4022730752,(ne^=ne>>>18)>>>0},te.prototype.random_int31=function(){return this.random_int()>>>1},te.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},te.prototype.random=function(){return this.random_int()*(1/4294967296)},te.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},te.prototype.random_long=function(){return(67108864*(this.random_int()>>>5)+(this.random_int()>>>6))*(1/9007199254740992)},ee.exports=te},function(ee,re,te){te(39);var ne=te(38),ie=te(13),oe=te(16),se=te(426),ae=Array.prototype,ce={DOMTokenList:!0,NodeList:!0};ee.exports=function(ue){var le=ue.entries;return ue===ae||oe(ae,ue)&&le===ae.entries||ie(ce,ne(ue))?se:le}},function(ee,re,te){var ne=te(427);ee.exports=ne},function(ee,re,te){te(48),te(72);var ne=te(21);ee.exports=ne("Array").entries},function(ee,re,te){var ne=te(429);te(39),ee.exports=ne},function(ee,re,te){te(183);var ne=te(7);ee.exports=ne.URLSearchParams},function(ee,re,te){var ne=te(31);ee.exports=function(ie,oe,se){for(var ae in oe)se&&se.unsafe&&ie[ae]?ie[ae]=oe[ae]:ne(ie,ae,oe[ae],se);return ie}},function(ee,re,te){var ne=te(117),ie=Math.floor,oe=function(ce,ue){var le=ce.length,de=ie(le/2);return le<8?se(ce,ue):ae(ce,oe(ne(ce,0,de),ue),oe(ne(ce,de),ue),ue)},se=function(ce,ue){for(var le,de,fe=ce.length,he=1;he<fe;){for(de=he,le=ce[he];de&&ue(ce[de-1],le)>0;)ce[de]=ce[--de];de!==he++&&(ce[de]=le)}return ce},ae=function(ce,ue,le,de){for(var fe=ue.length,he=le.length,pe=0,ge=0;pe<fe||ge<he;)ce[pe+ge]=pe<fe&&ge<he?de(ue[pe],le[ge])<=0?ue[pe++]:le[ge++]:pe<fe?ue[pe++]:le[ge++];return ce};ee.exports=oe},function(ee,re,te){var ne=te(433);ee.exports=ne},function(ee,re,te){var ne=te(16),ie=te(434),oe=String.prototype;ee.exports=function(se){var ae=se.startsWith;return typeof se=="string"||se===oe||ne(oe,se)&&ae===oe.startsWith?ie:ae}},function(ee,re,te){te(435);var ne=te(21);ee.exports=ne("String").startsWith},function(ee,re,te){var ne,ie=te(1),oe=te(81),se=te(44).f,ae=te(132),ce=te(29),ue=te(161),le=te(54),de=te(162),fe=te(26),he=oe("".startsWith),pe=oe("".slice),ge=Math.min,me=de("startsWith");ie({target:"String",proto:!0,forced:!!(fe||me||(ne=se(String.prototype,"startsWith"),!ne||ne.writable))&&!me},{startsWith:function(ye){var ve=ce(le(this));ue(ye);var be=ae(ge(arguments.length>1?arguments[1]:void 0,ve.length)),_e=ce(ye);return he?he(ve,_e,be):pe(ve,be,be+_e.length)===_e}})},function(ee,re,te){te(39);var ne=te(38),ie=te(13),oe=te(16),se=te(437),ae=Array.prototype,ce={DOMTokenList:!0,NodeList:!0};ee.exports=function(ue){var le=ue.keys;return ue===ae||oe(ae,ue)&&le===ae.keys||ie(ce,ne(ue))?se:le}},function(ee,re,te){var ne=te(438);ee.exports=ne},function(ee,re,te){te(48),te(72);var ne=te(21);ee.exports=ne("Array").keys},function(ee,re,te){var ne=te(440);ee.exports=ne},function(ee,re,te){te(441),te(445),te(183);var ne=te(7);ee.exports=ne.URL},function(ee,re,te){te(442)},function(ee,re,te){te(60);var ne,ie=te(1),oe=te(15),se=te(185),ae=te(9),ce=te(46),ue=te(6),le=te(31),de=te(443),fe=te(120),he=te(13),pe=te(160),ge=te(165),me=te(117),ye=te(150).codeAt,ve=te(444),be=te(29),_e=te(47),Ce=te(98),Te=te(184),Se=te(58),Re=Se.set,we=Se.getterFor("URL"),Ae=Te.URLSearchParams,Oe=Te.getState,Ne=ae.URL,Ue=ae.TypeError,Fe=ae.parseInt,Ve=Math.floor,He=Math.pow,ur=ue("".charAt),qe=ue(/./.exec),hr=ue([].join),fr=ue(1 .toString),dr=ue([].pop),Qe=ue([].push),Bt=ue("".replace),Cr=ue([].shift),$e=ue("".split),Le=ue("".slice),We=ue("".toLowerCase),mr=ue([].unshift),lr=/[a-z]/i,Sr=/[\d+-.a-z]/i,zr=/\d/,$r=/^0x/i,Yr=/^[0-7]+$/,ei=/^\d+$/,ai=/^[\da-f]+$/i,Gr=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ye=/[\0\t\n\r #/:<>?@[\\\]^|]/,Ir=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Rr=/[\t\n\r]/g,xr=function(Be){var Xe,Ge,Ur,je;if(typeof Be=="number"){for(Xe=[],Ge=0;Ge<4;Ge++)mr(Xe,Be%256),Be=Ve(Be/256);return hr(Xe,".")}if(typeof Be=="object"){for(Xe="",Ur=(function(Kr){for(var Vr=null,Dr=1,Me=null,Je=0,Hr=0;Hr<8;Hr++)Kr[Hr]!==0?(Je>Dr&&(Vr=Me,Dr=Je),Me=null,Je=0):(Me===null&&(Me=Hr),++Je);return Je>Dr&&(Vr=Me,Dr=Je),Vr})(Be),Ge=0;Ge<8;Ge++)je&&Be[Ge]===0||(je&&(je=!1),Ur===Ge?(Xe+=Ge?":":"::",je=!0):(Xe+=fr(Be[Ge],16),Ge<7&&(Xe+=":")));return"["+Xe+"]"}return Be},Br={},li=pe({},Br,{" ":1,'"':1,"<":1,">":1,"`":1}),Ei=pe({},li,{"#":1,"?":1,"{":1,"}":1}),gi=pe({},Ei,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ti=function(Be,Xe){var Ge=ye(Be,0);return Ge>32&&Ge<127&&!he(Xe,Be)?Be:encodeURIComponent(Be)},di={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Xr=function(Be,Xe){var Ge;return Be.length==2&&qe(lr,ur(Be,0))&&((Ge=ur(Be,1))==":"||!Xe&&Ge=="|")},Er=function(Be){var Xe;return Be.length>1&&Xr(Le(Be,0,2))&&(Be.length==2||(Xe=ur(Be,2))==="/"||Xe==="\\"||Xe==="?"||Xe==="#")},Lr=function(Be){return Be==="."||We(Be)==="%2e"},Pr={},Mr={},Jr={},Ze={},Tr={},Or={},Nr={},jr={},mi={},Ii={},Oi={},Si={},Ni={},zi={},Zi={},$i={},Ui={},wi={},Ji={},Di={},Ai={},ji=function(Be,Xe,Ge){var Ur,je,Kr,Vr=be(Be);if(Xe){if(je=this.parse(Vr))throw Ue(je);this.searchParams=null}else{if(Ge!==void 0&&(Ur=new ji(Ge,!0)),je=this.parse(Vr,null,Ur))throw Ue(je);(Kr=Oe(new Ae)).bindURL(this),this.searchParams=Kr}};ji.prototype={type:"URL",parse:function(Be,Xe,Ge){var Ur,je,Kr,Vr,Dr,Me=this,Je=Xe||Pr,Hr=0,Ar="",Qr=!1,ri=!1,Ti=!1;for(Be=be(Be),Xe||(Me.scheme="",Me.username="",Me.password="",Me.host=null,Me.port=null,Me.path=[],Me.query=null,Me.fragment=null,Me.cannotBeABaseURL=!1,Be=Bt(Be,Ir,"")),Be=Bt(Be,Rr,""),Ur=ge(Be);Hr<=Ur.length;){switch(je=Ur[Hr],Je){case Pr:if(!je||!qe(lr,je)){if(Xe)return"Invalid scheme";Je=Jr;continue}Ar+=We(je),Je=Mr;break;case Mr:if(je&&(qe(Sr,je)||je=="+"||je=="-"||je=="."))Ar+=We(je);else{if(je!=":"){if(Xe)return"Invalid scheme";Ar="",Je=Jr,Hr=0;continue}if(Xe&&(Me.isSpecial()!=he(di,Ar)||Ar=="file"&&(Me.includesCredentials()||Me.port!==null)||Me.scheme=="file"&&!Me.host))return;if(Me.scheme=Ar,Xe)return void(Me.isSpecial()&&di[Me.scheme]==Me.port&&(Me.port=null));Ar="",Me.scheme=="file"?Je=zi:Me.isSpecial()&&Ge&&Ge.scheme==Me.scheme?Je=Ze:Me.isSpecial()?Je=jr:Ur[Hr+1]=="/"?(Je=Tr,Hr++):(Me.cannotBeABaseURL=!0,Qe(Me.path,""),Je=Ji)}break;case Jr:if(!Ge||Ge.cannotBeABaseURL&&je!="#")return"Invalid scheme";if(Ge.cannotBeABaseURL&&je=="#"){Me.scheme=Ge.scheme,Me.path=me(Ge.path),Me.query=Ge.query,Me.fragment="",Me.cannotBeABaseURL=!0,Je=Ai;break}Je=Ge.scheme=="file"?zi:Or;continue;case Ze:if(je!="/"||Ur[Hr+1]!="/"){Je=Or;continue}Je=mi,Hr++;break;case Tr:if(je=="/"){Je=Ii;break}Je=wi;continue;case Or:if(Me.scheme=Ge.scheme,je==ne)Me.username=Ge.username,Me.password=Ge.password,Me.host=Ge.host,Me.port=Ge.port,Me.path=me(Ge.path),Me.query=Ge.query;else if(je=="/"||je=="\\"&&Me.isSpecial())Je=Nr;else if(je=="?")Me.username=Ge.username,Me.password=Ge.password,Me.host=Ge.host,Me.port=Ge.port,Me.path=me(Ge.path),Me.query="",Je=Di;else{if(je!="#"){Me.username=Ge.username,Me.password=Ge.password,Me.host=Ge.host,Me.port=Ge.port,Me.path=me(Ge.path),Me.path.length--,Je=wi;continue}Me.username=Ge.username,Me.password=Ge.password,Me.host=Ge.host,Me.port=Ge.port,Me.path=me(Ge.path),Me.query=Ge.query,Me.fragment="",Je=Ai}break;case Nr:if(!Me.isSpecial()||je!="/"&&je!="\\"){if(je!="/"){Me.username=Ge.username,Me.password=Ge.password,Me.host=Ge.host,Me.port=Ge.port,Je=wi;continue}Je=Ii}else Je=mi;break;case jr:if(Je=mi,je!="/"||ur(Ar,Hr+1)!="/")continue;Hr++;break;case mi:if(je!="/"&&je!="\\"){Je=Ii;continue}break;case Ii:if(je=="@"){Qr&&(Ar="%40"+Ar),Qr=!0,Kr=ge(Ar);for(var bi=0;bi<Kr.length;bi++){var oi=Kr[bi];if(oi!=":"||Ti){var eo=ti(oi,gi);Ti?Me.password+=eo:Me.username+=eo}else Ti=!0}Ar=""}else if(je==ne||je=="/"||je=="?"||je=="#"||je=="\\"&&Me.isSpecial()){if(Qr&&Ar=="")return"Invalid authority";Hr-=ge(Ar).length+1,Ar="",Je=Oi}else Ar+=je;break;case Oi:case Si:if(Xe&&Me.scheme=="file"){Je=$i;continue}if(je!=":"||ri){if(je==ne||je=="/"||je=="?"||je=="#"||je=="\\"&&Me.isSpecial()){if(Me.isSpecial()&&Ar=="")return"Invalid host";if(Xe&&Ar==""&&(Me.includesCredentials()||Me.port!==null))return;if(Vr=Me.parseHost(Ar))return Vr;if(Ar="",Je=Ui,Xe)return;continue}je=="["?ri=!0:je=="]"&&(ri=!1),Ar+=je}else{if(Ar=="")return"Invalid host";if(Vr=Me.parseHost(Ar))return Vr;if(Ar="",Je=Ni,Xe==Si)return}break;case Ni:if(!qe(zr,je)){if(je==ne||je=="/"||je=="?"||je=="#"||je=="\\"&&Me.isSpecial()||Xe){if(Ar!=""){var qi=Fe(Ar,10);if(qi>65535)return"Invalid port";Me.port=Me.isSpecial()&&qi===di[Me.scheme]?null:qi,Ar=""}if(Xe)return;Je=Ui;continue}return"Invalid port"}Ar+=je;break;case zi:if(Me.scheme="file",je=="/"||je=="\\")Je=Zi;else{if(!Ge||Ge.scheme!="file"){Je=wi;continue}if(je==ne)Me.host=Ge.host,Me.path=me(Ge.path),Me.query=Ge.query;else if(je=="?")Me.host=Ge.host,Me.path=me(Ge.path),Me.query="",Je=Di;else{if(je!="#"){Er(hr(me(Ur,Hr),""))||(Me.host=Ge.host,Me.path=me(Ge.path),Me.shortenPath()),Je=wi;continue}Me.host=Ge.host,Me.path=me(Ge.path),Me.query=Ge.query,Me.fragment="",Je=Ai}}break;case Zi:if(je=="/"||je=="\\"){Je=$i;break}Ge&&Ge.scheme=="file"&&!Er(hr(me(Ur,Hr),""))&&(Xr(Ge.path[0],!0)?Qe(Me.path,Ge.path[0]):Me.host=Ge.host),Je=wi;continue;case $i:if(je==ne||je=="/"||je=="\\"||je=="?"||je=="#"){if(!Xe&&Xr(Ar))Je=wi;else if(Ar==""){if(Me.host="",Xe)return;Je=Ui}else{if(Vr=Me.parseHost(Ar))return Vr;if(Me.host=="localhost"&&(Me.host=""),Xe)return;Ar="",Je=Ui}continue}Ar+=je;break;case Ui:if(Me.isSpecial()){if(Je=wi,je!="/"&&je!="\\")continue}else if(Xe||je!="?")if(Xe||je!="#"){if(je!=ne&&(Je=wi,je!="/"))continue}else Me.fragment="",Je=Ai;else Me.query="",Je=Di;break;case wi:if(je==ne||je=="/"||je=="\\"&&Me.isSpecial()||!Xe&&(je=="?"||je=="#")){if((Dr=We(Dr=Ar))===".."||Dr==="%2e."||Dr===".%2e"||Dr==="%2e%2e"?(Me.shortenPath(),je=="/"||je=="\\"&&Me.isSpecial()||Qe(Me.path,"")):Lr(Ar)?je=="/"||je=="\\"&&Me.isSpecial()||Qe(Me.path,""):(Me.scheme=="file"&&!Me.path.length&&Xr(Ar)&&(Me.host&&(Me.host=""),Ar=ur(Ar,0)+":"),Qe(Me.path,Ar)),Ar="",Me.scheme=="file"&&(je==ne||je=="?"||je=="#"))for(;Me.path.length>1&&Me.path[0]==="";)Cr(Me.path);je=="?"?(Me.query="",Je=Di):je=="#"&&(Me.fragment="",Je=Ai)}else Ar+=ti(je,Ei);break;case Ji:je=="?"?(Me.query="",Je=Di):je=="#"?(Me.fragment="",Je=Ai):je!=ne&&(Me.path[0]+=ti(je,Br));break;case Di:Xe||je!="#"?je!=ne&&(je=="'"&&Me.isSpecial()?Me.query+="%27":Me.query+=je=="#"?"%23":ti(je,Br)):(Me.fragment="",Je=Ai);break;case Ai:je!=ne&&(Me.fragment+=ti(je,li))}Hr++}},parseHost:function(Be){var Xe,Ge,Ur;if(ur(Be,0)=="["){if(ur(Be,Be.length-1)!="]"||!(Xe=(function(je){var Kr,Vr,Dr,Me,Je,Hr,Ar,Qr=[0,0,0,0,0,0,0,0],ri=0,Ti=null,bi=0,oi=function(){return ur(je,bi)};if(oi()==":"){if(ur(je,1)!=":")return;bi+=2,Ti=++ri}for(;oi();){if(ri==8)return;if(oi()!=":"){for(Kr=Vr=0;Vr<4&&qe(ai,oi());)Kr=16*Kr+Fe(oi(),16),bi++,Vr++;if(oi()=="."){if(Vr==0||(bi-=Vr,ri>6))return;for(Dr=0;oi();){if(Me=null,Dr>0){if(!(oi()=="."&&Dr<4))return;bi++}if(!qe(zr,oi()))return;for(;qe(zr,oi());){if(Je=Fe(oi(),10),Me===null)Me=Je;else{if(Me==0)return;Me=10*Me+Je}if(Me>255)return;bi++}Qr[ri]=256*Qr[ri]+Me,++Dr!=2&&Dr!=4||ri++}if(Dr!=4)return;break}if(oi()==":"){if(bi++,!oi())return}else if(oi())return;Qr[ri++]=Kr}else{if(Ti!==null)return;bi++,Ti=++ri}}if(Ti!==null)for(Hr=ri-Ti,ri=7;ri!=0&&Hr>0;)Ar=Qr[ri],Qr[ri--]=Qr[Ti+Hr-1],Qr[Ti+--Hr]=Ar;else if(ri!=8)return;return Qr})(Le(Be,1,-1))))return"Invalid host";this.host=Xe}else if(this.isSpecial()){if(Be=ve(Be),qe(Gr,Be)||(Xe=(function(je){var Kr,Vr,Dr,Me,Je,Hr,Ar,Qr=$e(je,".");if(Qr.length&&Qr[Qr.length-1]==""&&Qr.length--,(Kr=Qr.length)>4)return je;for(Vr=[],Dr=0;Dr<Kr;Dr++){if((Me=Qr[Dr])=="")return je;if(Je=10,Me.length>1&&ur(Me,0)=="0"&&(Je=qe($r,Me)?16:8,Me=Le(Me,Je==8?1:2)),Me==="")Hr=0;else{if(!qe(Je==10?ei:Je==8?Yr:ai,Me))return je;Hr=Fe(Me,Je)}Qe(Vr,Hr)}for(Dr=0;Dr<Kr;Dr++)if(Hr=Vr[Dr],Dr==Kr-1){if(Hr>=He(256,5-Kr))return null}else if(Hr>255)return null;for(Ar=dr(Vr),Dr=0;Dr<Vr.length;Dr++)Ar+=Vr[Dr]*He(256,3-Dr);return Ar})(Be))===null)return"Invalid host";this.host=Xe}else{if(qe(Ye,Be))return"Invalid host";for(Xe="",Ge=ge(Be),Ur=0;Ur<Ge.length;Ur++)Xe+=ti(Ge[Ur],Br);this.host=Xe}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme=="file"},includesCredentials:function(){return this.username!=""||this.password!=""},isSpecial:function(){return he(di,this.scheme)},shortenPath:function(){var Be=this.path,Xe=Be.length;!Xe||this.scheme=="file"&&Xe==1&&Xr(Be[0],!0)||Be.length--},serialize:function(){var Be=this,Xe=Be.scheme,Ge=Be.username,Ur=Be.password,je=Be.host,Kr=Be.port,Vr=Be.path,Dr=Be.query,Me=Be.fragment,Je=Xe+":";return je!==null?(Je+="//",Be.includesCredentials()&&(Je+=Ge+(Ur?":"+Ur:"")+"@"),Je+=xr(je),Kr!==null&&(Je+=":"+Kr)):Xe=="file"&&(Je+="//"),Je+=Be.cannotBeABaseURL?Vr[0]:Vr.length?"/"+hr(Vr,"/"):"",Dr!==null&&(Je+="?"+Dr),Me!==null&&(Je+="#"+Me),Je},setHref:function(Be){var Xe=this.parse(Be);if(Xe)throw Ue(Xe);this.searchParams.update()},getOrigin:function(){var Be=this.scheme,Xe=this.port;if(Be=="blob")try{return new Fi(Be.path[0]).origin}catch{return"null"}return Be!="file"&&this.isSpecial()?Be+"://"+xr(this.host)+(Xe!==null?":"+Xe:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(Be){this.parse(be(Be)+":",Pr)},getUsername:function(){return this.username},setUsername:function(Be){var Xe=ge(be(Be));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var Ge=0;Ge<Xe.length;Ge++)this.username+=ti(Xe[Ge],gi)}},getPassword:function(){return this.password},setPassword:function(Be){var Xe=ge(be(Be));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var Ge=0;Ge<Xe.length;Ge++)this.password+=ti(Xe[Ge],gi)}},getHost:function(){var Be=this.host,Xe=this.port;return Be===null?"":Xe===null?xr(Be):xr(Be)+":"+Xe},setHost:function(Be){this.cannotBeABaseURL||this.parse(Be,Oi)},getHostname:function(){var Be=this.host;return Be===null?"":xr(Be)},setHostname:function(Be){this.cannotBeABaseURL||this.parse(Be,Si)},getPort:function(){var Be=this.port;return Be===null?"":be(Be)},setPort:function(Be){this.cannotHaveUsernamePasswordPort()||((Be=be(Be))==""?this.port=null:this.parse(Be,Ni))},getPathname:function(){var Be=this.path;return this.cannotBeABaseURL?Be[0]:Be.length?"/"+hr(Be,"/"):""},setPathname:function(Be){this.cannotBeABaseURL||(this.path=[],this.parse(Be,Ui))},getSearch:function(){var Be=this.query;return Be?"?"+Be:""},setSearch:function(Be){(Be=be(Be))==""?this.query=null:(ur(Be,0)=="?"&&(Be=Le(Be,1)),this.query="",this.parse(Be,Di)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var Be=this.fragment;return Be?"#"+Be:""},setHash:function(Be){(Be=be(Be))!=""?(ur(Be,0)=="#"&&(Be=Le(Be,1)),this.fragment="",this.parse(Be,Ai)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Fi=function(Be){var Xe=fe(this,ci),Ge=Ce(arguments.length,1)>1?arguments[1]:void 0,Ur=Re(Xe,new ji(Be,!1,Ge));oe||(Xe.href=Ur.serialize(),Xe.origin=Ur.getOrigin(),Xe.protocol=Ur.getProtocol(),Xe.username=Ur.getUsername(),Xe.password=Ur.getPassword(),Xe.host=Ur.getHost(),Xe.hostname=Ur.getHostname(),Xe.port=Ur.getPort(),Xe.pathname=Ur.getPathname(),Xe.search=Ur.getSearch(),Xe.searchParams=Ur.getSearchParams(),Xe.hash=Ur.getHash())},ci=Fi.prototype,vi=function(Be,Xe){return{get:function(){return we(this)[Be]()},set:Xe&&function(Ge){return we(this)[Xe](Ge)},configurable:!0,enumerable:!0}};if(oe&&(de(ci,"href",vi("serialize","setHref")),de(ci,"origin",vi("getOrigin")),de(ci,"protocol",vi("getProtocol","setProtocol")),de(ci,"username",vi("getUsername","setUsername")),de(ci,"password",vi("getPassword","setPassword")),de(ci,"host",vi("getHost","setHost")),de(ci,"hostname",vi("getHostname","setHostname")),de(ci,"port",vi("getPort","setPort")),de(ci,"pathname",vi("getPathname","setPathname")),de(ci,"search",vi("getSearch","setSearch")),de(ci,"searchParams",vi("getSearchParams")),de(ci,"hash",vi("getHash","setHash"))),le(ci,"toJSON",(function(){return we(this).serialize()}),{enumerable:!0}),le(ci,"toString",(function(){return we(this).serialize()}),{enumerable:!0}),Ne){var Wi=Ne.createObjectURL,Qi=Ne.revokeObjectURL;Wi&&le(Fi,"createObjectURL",ce(Wi,Ne)),Qi&&le(Fi,"revokeObjectURL",ce(Qi,Ne))}_e(Fi,"URL"),ie({global:!0,constructor:!0,forced:!se,sham:!oe},{URL:Fi})},function(ee,re,te){var ne=te(28);ee.exports=function(ie,oe,se){return ne.f(ie,oe,se)}},function(ee,re,te){var ne=te(6),ie=/[^\0-\u007E]/,oe=/[.\u3002\uFF0E\uFF61]/g,se="Overflow: input needs wider integers to process",ae=RangeError,ce=ne(oe.exec),ue=Math.floor,le=String.fromCharCode,de=ne("".charCodeAt),fe=ne([].join),he=ne([].push),pe=ne("".replace),ge=ne("".split),me=ne("".toLowerCase),ye=function(_e){return _e+22+75*(_e<26)},ve=function(_e,Ce,Te){var Se=0;for(_e=Te?ue(_e/700):_e>>1,_e+=ue(_e/Ce);_e>455;)_e=ue(_e/35),Se+=36;return ue(Se+36*_e/(_e+38))},be=function(_e){var Ce,Te,Se=[],Re=(_e=(function(dr){for(var Qe=[],Bt=0,Cr=dr.length;Bt<Cr;){var $e=de(dr,Bt++);if($e>=55296&&$e<=56319&&Bt<Cr){var Le=de(dr,Bt++);(64512&Le)==56320?he(Qe,((1023&$e)<<10)+(1023&Le)+65536):(he(Qe,$e),Bt--)}else he(Qe,$e)}return Qe})(_e)).length,we=128,Ae=0,Oe=72;for(Ce=0;Ce<_e.length;Ce++)(Te=_e[Ce])<128&&he(Se,le(Te));var Ne=Se.length,Ue=Ne;for(Ne&&he(Se,"-");Ue<Re;){var Fe=2147483647;for(Ce=0;Ce<_e.length;Ce++)(Te=_e[Ce])>=we&&Te<Fe&&(Fe=Te);var Ve=Ue+1;if(Fe-we>ue((2147483647-Ae)/Ve))throw ae(se);for(Ae+=(Fe-we)*Ve,we=Fe,Ce=0;Ce<_e.length;Ce++){if((Te=_e[Ce])<we&&++Ae>2147483647)throw ae(se);if(Te==we){for(var He=Ae,ur=36;;){var qe=ur<=Oe?1:ur>=Oe+26?26:ur-Oe;if(He<qe)break;var hr=He-qe,fr=36-qe;he(Se,le(ye(qe+hr%fr))),He=ue(hr/fr),ur+=36}he(Se,le(ye(He))),Oe=ve(Ae,Ve,Ue==Ne),Ae=0,Ue++}}Ae++,we++}return fe(Se,"")};ee.exports=function(_e){var Ce,Te,Se=[],Re=ge(pe(me(_e),oe,"."),".");for(Ce=0;Ce<Re.length;Ce++)Te=Re[Ce],he(Se,ce(ie,Te)?"xn--"+be(Te):Te);return fe(Se,".")}},function(ee,re){},function(ee,re,te){ee.exports=te(447)},function(ee,re,te){ee.exports=te(448)},function(ee,re,te){var ne=te(449);ee.exports=ne},function(ee,re,te){var ne=te(450);ee.exports=ne},function(ee,re,te){var ne=te(451);ee.exports=ne},function(ee,re,te){te(452);var ne=te(7);ee.exports=ne.Reflect.get},function(ee,re,te){var ne=te(1),ie=te(14),oe=te(17),se=te(20),ae=te(453),ce=te(44),ue=te(75);ne({target:"Reflect",stat:!0},{get:function le(de,fe){var he,pe,ge=arguments.length<3?de:arguments[2];return se(de)===ge?de[fe]:(he=ce.f(de,fe))?ae(he)?he.value:he.get===void 0?void 0:ie(he.get,ge):oe(pe=ue(de))?le(pe,fe,ge):void 0}})},function(ee,re,te){var ne=te(13);ee.exports=function(ie){return ie!==void 0&&(ne(ie,"value")||ne(ie,"writable"))}},function(ee,re,te){ee.exports=te(455)},function(ee,re,te){ee.exports=te(456)},function(ee,re,te){var ne=te(457);ee.exports=ne},function(ee,re,te){var ne=te(154);ee.exports=ne},function(ee,re,te){var ne=te(25);ee.exports=function(ie,oe){for(;!Object.prototype.hasOwnProperty.call(ie,oe)&&(ie=ne(ie))!==null;);return ie},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){te(460);var ne=te(7);ee.exports=ne.setInterval},function(ee,re,te){te(461),te(463)},function(ee,re,te){var ne=te(1),ie=te(9),oe=te(186)(ie.setInterval,!0);ne({global:!0,bind:!0,forced:ie.setInterval!==oe},{setInterval:oe})},function(ee,re){ee.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"},function(ee,re,te){var ne=te(1),ie=te(9),oe=te(186)(ie.setTimeout,!0);ne({global:!0,bind:!0,forced:ie.setTimeout!==oe},{setTimeout:oe})},function(ee,re,te){ee.exports=te(465)},function(ee,re,te){ee.exports=te(466)},function(ee,re,te){var ne=te(467);ee.exports=ne},function(ee,re,te){var ne=te(155);ee.exports=ne},function(ee,re,te){ee.exports=te(469)},function(ee,re,te){var ne=te(470);ee.exports=ne},function(ee,re,te){var ne=te(182);ee.exports=ne},function(ee,re,te){var ne=te(472),ie=te(187);ee.exports=function(oe,se){if(oe==null)return{};var ae,ce,ue={},le=ne(oe);for(ce=0;ce<le.length;ce++)ae=le[ce],ie(se).call(se,ae)>=0||(ue[ae]=oe[ae]);return ue},ee.exports.__esModule=!0,ee.exports.default=ee.exports},function(ee,re,te){ee.exports=te(473)},function(ee,re,te){ee.exports=te(474)},function(ee,re,te){var ne=te(475);ee.exports=ne},function(ee,re,te){var ne=te(156);ee.exports=ne},function(ee,re,te){te.r(re),te.d(re,"singularSdk",(function(){return Pa})),te.d(re,"SingularConfig",(function(){return La})),te.d(re,"LinkParams",(function(){return ka})),te.d(re,"BannersOptions",(function(){return Na}));var ne={};te.r(ne),te.d(ne,"DefaultSessionTimeoutMinutes",(function(){return $e})),te.d(ne,"Version",(function(){return Le})),te.d(ne,"SdidPersistModeOff",(function(){return We})),te.d(ne,"SdidPersistModeAuto",(function(){return mr})),te.d(ne,"SdidPersistModeManual",(function(){return lr})),te.d(ne,"ECID_PREFIX",(function(){return Sr}));var ie={};te.r(ie),te.d(ie,"TabClosed",(function(){return zr}));var oe={};te.r(oe),te.d(oe,"ConversionEventApi",(function(){return $r})),te.d(oe,"CustomUserIdEventApi",(function(){return Yr})),te.d(oe,"EventApi",(function(){return ei})),te.d(oe,"PageVisitApi",(function(){return ai})),te.d(oe,"PageVisitEventName",(function(){return Gr})),te.d(oe,"SetMatchIdEventName",(function(){return Ye})),te.d(oe,"FetchBanner",(function(){return Ir}));var se={};te.r(se),te.d(se,"ApiQueueKey",(function(){return Rr})),te.d(se,"CustomUserIdKey",(function(){return xr})),te.d(se,"BannerLastDismissedKey",(function(){return Br})),te.d(se,"DidVisitSiteKey",(function(){return li})),te.d(se,"DidSendEventKeyBase",(function(){return Ei})),te.d(se,"ConversionEventOccurredKey",(function(){return gi})),te.d(se,"GlobalStoragePrefix",(function(){return ti})),te.d(se,"GlobalProperties",(function(){return di})),te.d(se,"MaxApisInQueue",(function(){return Xr})),te.d(se,"SessionIdKey",(function(){return Er})),te.d(se,"FirstPageVisitOccurredKey",(function(){return Lr})),te.d(se,"FirstPageVisitURL",(function(){return Pr})),te.d(se,"SingularDeviceIdKey",(function(){return Mr})),te.d(se,"MatchIdKey",(function(){return Jr})),te.d(se,"SingularInstanceIdKey",(function(){return Ze})),te.d(se,"StorageEnabledTestKey",(function(){return Tr})),te.d(se,"StorageEnabledTestValue",(function(){return Or})),te.d(se,"StorageLastEventTimestamp",(function(){return Nr})),te.d(se,"StorageTouchpointTimestampKey",(function(){return jr})),te.d(se,"StorageWebUrlKey",(function(){return mi})),te.d(se,"Types",(function(){return Ii}));var ae={};te.r(ae),te.d(ae,"AppName",(function(){return Oi})),te.d(ae,"BrowserAvailableMemory",(function(){return Si})),te.d(ae,"BrowserUsedMemory",(function(){return Ni})),te.d(ae,"BannerShowsCounter",(function(){return zi})),te.d(ae,"BannerSourceUrl",(function(){return Zi})),te.d(ae,"ClientHints",(function(){return $i})),te.d(ae,"CustomUserId",(function(){return Ui})),te.d(ae,"CurrentDeviceTime",(function(){return wi})),te.d(ae,"DeeplinkParam",(function(){return Ji})),te.d(ae,"DeferredDeeplinkParam",(function(){return Di})),te.d(ae,"DocumentReferrer",(function(){return Ai})),te.d(ae,"EventId",(function(){return ji})),te.d(ae,"EventName",(function(){return Fi})),te.d(ae,"EventProductName",(function(){return ci})),te.d(ae,"Extra",(function(){return vi})),te.d(ae,"GlobalProperties",(function(){return Wi})),te.d(ae,"IsConversion",(function(){return Qi})),te.d(ae,"IsFirstEvent",(function(){return Be})),te.d(ae,"IsFirstVisit",(function(){return Xe})),te.d(ae,"IsFirstPageVisitInSession",(function(){return Ge})),te.d(ae,"isAfterConversionEvent",(function(){return Ur})),te.d(ae,"IsPageRefreshed",(function(){return je})),te.d(ae,"IsRevenueEvent",(function(){return Kr})),te.d(ae,"IsSetMatchId",(function(){return Vr})),te.d(ae,"Keyspace",(function(){return Dr})),te.d(ae,"Lag",(function(){return Me})),te.d(ae,"Locale",(function(){return Je})),te.d(ae,"MatchId",(function(){return Hr})),te.d(ae,"OS",(function(){return Ar})),te.d(ae,"ECID",(function(){return Qr})),te.d(ae,"Owner",(function(){return ri})),te.d(ae,"PassthroughParam",(function(){return Ti})),te.d(ae,"Platform",(function(){return bi})),te.d(ae,"PlatformWeb",(function(){return oi})),te.d(ae,"PreviousSdid",(function(){return eo})),te.d(ae,"ProductId",(function(){return qi})),te.d(ae,"RevenueAmount",(function(){return Do})),te.d(ae,"RevenueCurrency",(function(){return Mo})),te.d(ae,"ScreenHeight",(function(){return Uo})),te.d(ae,"ScreenWidth",(function(){return Fo})),te.d(ae,"SdidPersistMode",(function(){return $o})),te.d(ae,"SdidPersistFailedReason",(function(){return Bo})),te.d(ae,"SdkVersion",(function(){return Vo})),te.d(ae,"SessionId",(function(){return Ho})),te.d(ae,"SingularDeviceId",(function(){return zo})),te.d(ae,"SingularInstanceId",(function(){return jo})),te.d(ae,"StorageType",(function(){return Wo})),te.d(ae,"Timezone",(function(){return qo})),te.d(ae,"TouchpointTimestamp",(function(){return Go})),te.d(ae,"UserAgent",(function(){return mo})),te.d(ae,"UUID",(function(){return Ko})),te.d(ae,"UUID_REGEX",(function(){return Yo})),te.d(ae,"WebParams",(function(){return Xo})),te.d(ae,"WebUrl",(function(){return vo})),te.d(ae,"LastDismissed",(function(){return Zo})),te.d(ae,"BannerName",(function(){return Jo})),te.d(ae,"BannerID",(function(){return Qo})),te.d(ae,"Source",(function(){return ts})),te.d(ae,"WebUrlMarketingParams",(function(){return rs}));var ce={};te.r(ce),te.d(ce,"BaseUrl",(function(){return ns})),te.d(ce,"ContentType",(function(){return is})),te.d(ce,"ContentTypeValue",(function(){return os})),te.d(ce,"Endpoints",(function(){return ss})),te.d(ce,"PostMethod",(function(){return as})),te.d(ce,"GetMethod",(function(){return cs})),te.d(ce,"PostParams",(function(){return us})),te.d(ce,"Status",(function(){return ls})),te.d(ce,"RequestTimeoutMs",(function(){return ds})),te.d(ce,"ValidResponse",(function(){return fs})),te.d(ce,"ValidResponseCode",(function(){return ps})),te.d(ce,"FetchBannerResponseLinkKey",(function(){return hs}));var ue={};te.r(ue),te.d(ue,"Android",(function(){return gs})),te.d(ue,"iOS",(function(){return ms})),te.d(ue,"Linux",(function(){return vs})),te.d(ue,"MacOs",(function(){return ys})),te.d(ue,"Unknown",(function(){return bs})),te.d(ue,"Windows",(function(){return _s})),te.d(ue,"iOSPlatforms",(function(){return Es})),te.d(ue,"MacOsPlatforms",(function(){return Ss})),te.d(ue,"WindowsPlatforms",(function(){return Ts}));var le={};te.r(le),te.d(le,"Debug",(function(){return Cs})),te.d(le,"Info",(function(){return Is})),te.d(le,"Warn",(function(){return ws})),te.d(le,"None",(function(){return As}));var de={};te.r(de),te.d(de,"HighEntropyValuesKeys",(function(){return xs})),te.d(de,"PlatformKey",(function(){return yo}));var fe={};te.r(fe),te.d(fe,"CookieDomainKey",(function(){return Rs})),te.d(fe,"CookieExpiresKey",(function(){return Os})),te.d(fe,"MilliSecondsInDay",(function(){return bo})),te.d(fe,"ThirtyDaysInSeconds",(function(){return _o})),te.d(fe,"CookieExpirationInDays",(function(){return Ps})),te.d(fe,"SingularDeviceIdKey",(function(){return Ls}));var he=te(2),pe=te.n(he),ge=te(4),me=te.n(ge),ye=te(0),ve=te.n(ye),be=te(63),_e=te.n(be),Ce=te(64),Te=te.n(Ce),Se=te(40),Re=te.n(Se),we=te(18),Ae=te.n(we),Oe=te(41),Ne=te.n(Oe),Ue=te(34),Fe=te.n(Ue),Ve=te(42),He=te.n(Ve),ur=te(19),qe=te.n(ur),hr=te(32),fr=te.n(hr),dr=te(25),Qe=te.n(dr),Bt=te(33),Cr=te.n(Bt),$e=30,Le="WebSDK-v".concat("1.4.8"),We="off",mr="auto",lr="manual",Sr="__singular_ddl__",zr="onbeforeunload",$r="conversion_event",Yr="custom_user_id_event",ei="event",ai="page_visit",Gr="__PAGE_VISIT__",Ye="setMatchId",Ir="fetch_banner",Rr="singular_api_queue",xr="singular_custom_user_id",Br="banner_last_dismissed",li="did_visit_site",Ei="did_send_event",gi="conversion_event_occurred",ti="global",di="global_properties",Xr=1e3,Er="singular_session_id",Lr="singular_first_page_visit_occurred",Pr="first_page_visit_url",Mr="singular_id",Jr="match_id",Ze="singular_instance_id",Tr="singular_storage_enabled_test",Or="test_value",Nr="last_event_timestamp",jr="touchpoint_timestamp",mi="web_url",Ii={Local:"local",Session:"session",Memory:"memory"},Oi="n",Si="browser_available_memory",Ni="browser_used_memory",zi="counter_banner_showed",Zi="source_url",$i="client_hints",Ui="custom_user_id",wi="current_device_time",Ji="_dl",Di="_ddl",Ai="document_referrer",ji="event_id",Fi="n",ci="product_name",vi="e",Wi="global_properties",Qi="conversion_event",Be="first",Xe="is_first_visit",Ge="is_first_page_visit_in_session",Ur="is_after_conversion_event",je="is_page_refreshed",Kr="is_revenue_event",Vr="is_set_match_id",Dr="k",Me="lag",Je="l",Hr="match_id",Ar="os",Qr="ecid",ri="a",Ti="_p",bi="p",oi="Web",eo="prev_sdid",qi="i",Do="r",Mo="pcc",Uo="screen_height",Fo="screen_width",$o="sdid_persist_mode",Bo="sdid_persist_failed_reason",Vo="sdk",Ho="s",zo="SDID",jo="singular_instance_id",Wo="storage_type",qo="timezone",Go="touchpoint_timestamp",mo="device_user_agent",Ko="u",Yo="^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",Xo="_web_params",vo="web_url",Zo="last_dismissed",Jo="bn",Qo="baid",ts="utm_source",rs={clid_params:["clid="],singular_p_params:["pcnid=","pcrnid=","pcid=","pcn=","psc=","pscid=","pscn=","pcrid=","pcrn=","ps=","psid=","psn=","pshid=","paffid=","paffn=","pcc=","psrc=","pmed="],singular_wp_params:["wpcid=","wpcn=","wpsc=","wpscid=","wpscn=","wpcrid=","wpcrn=","wps=","wpsid=","wpsn=","wpshid=","wpaffid=","wpaffn=","wpkw=","wpsrc=","wpmed="],utm_params:["utm_.+="],additional_params:["kw=","an=","ud="]},ns="https://sdk-api-v1.singular.net/api/v1/",is="Content-Type",os="application/json",ss={Session:"start",Event:"event",DeviceCustomUserId:"set_device_for_custom_id",FetchBanner:"banners"},as="POST",cs="GET",us=[Wi,vi,vo,mo,ci,Ai,$i],ls="status",ds=3e4,fs="ok",ps=200,hs="link",gs="Android",ms="iOS",vs="Linux",ys="MacOS",bs="Unknown",_s="Windows",Es=["iPhone","iPad","iPod"],Ss=["Macintosh","MacIntel","MacPPC","Mac68K"],Ts=["Win32","Win64","Windows","WinCE"],Cs=3,Is=2,ws=1,As=0,xs=["platformVersion",yo,"uaFullVersion","model","architecture"],yo="platform",Rs="domain",Os="expires",bo=864e5,_o=2592e3,Ps=365*bo,Ls="singular_device_id",ks=te(188),Ns=te.n(ks),Ds=te(189),Ms=te.n(Ds),Us=te(100),Eo=te.n(Us),Fs=te(53),Gi=te.n(Fs),$s=te(35),Bi=te.n($s),Bs=te(79),oo=te.n(Bs),Vs=te(11),ui=te.n(Vs),Hs=te(3),qr=te.n(Hs),zs=te(190),js=te.n(zs),Ws=te(191),qs=te.n(Ws),Gs=te(22),Mi=te.n(Gs),Ks=te(23),Pi=te.n(Ks),Ys=te(43),Vi=te.n(Ys),Xs=te(65),to=te.n(Xs),Zs=te(101),So=te.n(Zs),Js=te(192),Qs=te.n(Js),ea=te(193),ta=te.n(ea),yr=(function(){function ze(){pe()(this,ze)}var Ee,xe,Pe,De;return me()(ze,null,[{key:"generateUUID",value:function(){var ke=window.crypto?window.crypto:window.msCrypto;return ke&&ke.getRandomValues&&ke.getRandomValues(new Uint8Array(1))||(ke={getRandomValues:function(Ke){return ta()(Ke)}}),("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(function(Ke){return(Ke^ke.getRandomValues(new Uint8Array(1))[0]&15>>Ke/4).toString(16)}))}},{key:"isUUID",value:function(ke){return RegExp(ae.UUID_REGEX).test(ke)}},{key:"getCurrentTimestamp",value:function(){return Math.round(new Date().getTime()/1e3)}},{key:"getOS",value:(De=Mi()(ui.a.mark((function ke(){var Ke,gr,_r,vr,br;return ui.a.wrap((function(wr){for(;;)switch(wr.prev=wr.next){case 0:return wr.prev=0,vr=navigator.platform||"",wr.next=4,this._getUserAgentInfo();case 4:if(br=wr.sent,!Gi()(Ke=ue.MacOsPlatforms).call(Ke,vr)){wr.next=9;break}return wr.abrupt("return",ue.MacOs);case 9:if(!Gi()(gr=ue.iOSPlatforms).call(gr,vr)&&!/iPad|iPhone|iPod/.test(br)){wr.next=13;break}return wr.abrupt("return",ue.iOS);case 13:if(!Gi()(_r=ue.WindowsPlatforms).call(_r,vr)){wr.next=17;break}return wr.abrupt("return",ue.Windows);case 17:if(!/Android/.test(br)){wr.next=21;break}return wr.abrupt("return",ue.Android);case 21:if(!/Linux/.test(vr)){wr.next=23;break}return wr.abrupt("return",ue.Linux);case 23:wr.next=27;break;case 25:wr.prev=25,wr.t0=wr.catch(0);case 27:return wr.abrupt("return",ue.Unknown);case 28:case"end":return wr.stop()}}),ke,this,[[0,25]])}))),function(){return De.apply(this,arguments)})},{key:"isNullOrEmpty",value:function(ke){return ke==null||ke===""}},{key:"calculateHash",value:function(ke,Ke){return Qs.a.hex(Ke+ke)}},{key:"getTimeZone",value:function(){return new Date().toString().match(/([A-Z]+[\+-][0-9]+)/)[1]}},{key:"getBrowserAvailableMemory",value:function(){try{return window.performance.hasOwnProperty("memory")&&window.performance.memory.hasOwnProperty("jsHeapSizeLimit")?window.performance.memory.jsHeapSizeLimit:null}catch{return null}}},{key:"getBrowserUsedMemory",value:function(){try{return window.performance.hasOwnProperty("memory")&&window.performance.memory.hasOwnProperty("usedJSHeapSize")?window.performance.memory.usedJSHeapSize:null}catch{return null}}},{key:"buildWebToAppLink",value:function(ke,Ke,gr,_r,vr){var br,wr;if(!this.isValidUrl(ke))return null;var Fr=this.parseQueryFromUrl(ke),pi=this.extractQueryStringWithFragment(Ke);this.isNullOrEmpty(pi)||(Fr[ae.WebParams]=pi),this.isNullOrEmpty(gr)||(Fr[ae.DeeplinkParam]=gr),this.isNullOrEmpty(_r)||(Fr[ae.PassthroughParam]=_r),this.isNullOrEmpty(vr)||(Fr[ae.DeferredDeeplinkParam]=vr);var hi=Eo()(br=qe()(Fr)).call(br,(function(_i){var xi;return qr()(xi="".concat(encodeURIComponent(_i),"=")).call(xi,encodeURIComponent(Fr[_i]))}));return qr()(wr="".concat(this.extractUrlWithPath(ke),"?")).call(wr,hi.join("&"))}},{key:"parseQueryFromUrl",value:function(ke){if(this.isNullOrEmpty(ke))return{};var Ke=ke.split("?");if(Ke.length<=1)return{};for(var gr={},_r=Ke[1].split("#")[0].split("&"),vr=0;vr<_r.length;vr++){var br=_r[vr].split("=");gr[decodeURIComponent(br[0])]=decodeURIComponent(br[1]||"")}return gr}},{key:"extractUrlWithPath",value:function(ke){return this.isNullOrEmpty(ke)?null:ke.split("?")[0]}},{key:"isValidUrl",value:function(ke){return this.isNullOrEmpty(ke)?!1:/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(ke)}},{key:"extractQueryStringWithFragment",value:function(ke){if(this.isNullOrEmpty(ke))return null;var Ke=ke.split("?");return Ke.length>=2&&!this.isNullOrEmpty(Ke[1])||(Ke=ke.split("#")).length>=2&&!this.isNullOrEmpty(Ke[1])?Ke[1]:""}},{key:"isPageRefreshed",value:function(){try{if(!window.performance||window.performance.navigation.type!==1)return!1}catch{return!1}return!0}},{key:"getClientHints",value:function(){return this._getDataFromClientHints(de.HighEntropyValuesKeys)}},{key:"setSdkWrapper",value:function(ke){ze.isNullOrEmpty(ke)||(this._sdkWrapper=ke)}},{key:"getSdkVersion",value:function(){var ke;return this._sdkWrapper?qr()(ke="".concat(ne.Version,"-")).call(ke,this._sdkWrapper):ne.Version}},{key:"getCookie",value:function(ke){var Ke=document.cookie;if(ze.isNullOrEmpty(Ke))return null;var gr=document.cookie.split(";"),_r=ke+"=",vr=null;return Ae()(gr).call(gr,(function(br){br=So()(br).call(br),to()(br).call(br,_r)===0&&(vr=decodeURIComponent(br.substring(_r.length,br.length)))})),vr}},{key:"setCookie",value:function(ke,Ke,gr){var _r,vr,br,wr,Fr;if(!(ze.isNullOrEmpty(ke)||ze.isNullOrEmpty(Ke)||ze.isNullOrEmpty(gr))){var pi=ze._getCookieExpirationDate();document.cookie=qr()(_r=qr()(vr=qr()(br=qr()(wr=qr()(Fr="".concat(ke,"=")).call(Fr,encodeURIComponent(Ke),"; ")).call(wr,fe.CookieDomainKey,"=")).call(br,gr,"; ")).call(vr,fe.CookieExpiresKey,"=")).call(_r,pi.toGMTString(),"; path=/")}}},{key:"_getCookieExpirationDate",value:function(){var ke=new Date;return ke.setTime(ke.getTime()+fe.CookieExpirationInDays),ke}},{key:"_getUserAgentInfo",value:(Pe=Mi()(ui.a.mark((function ke(){return ui.a.wrap((function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(navigator.userAgentData){Ke.next=2;break}return Ke.abrupt("return",navigator.userAgent||"");case 2:return Ke.next=4,this._getClientHintsPlatform();case 4:return Ke.abrupt("return",Ke.sent);case 5:case"end":return Ke.stop()}}),ke,this)}))),function(){return Pe.apply(this,arguments)})},{key:"_getClientHintsPlatform",value:(xe=Mi()(ui.a.mark((function ke(){var Ke;return ui.a.wrap((function(gr){for(;;)switch(gr.prev=gr.next){case 0:return gr.next=2,this._getDataFromClientHints([de.PlatformKey]);case 2:if(Ke=gr.sent){gr.next=5;break}return gr.abrupt("return","");case 5:return gr.abrupt("return",Ke[de.PlatformKey]||"");case 6:case"end":return gr.stop()}}),ke,this)}))),function(){return xe.apply(this,arguments)})},{key:"_getDataFromClientHints",value:(Ee=Mi()(ui.a.mark((function ke(Ke){return ui.a.wrap((function(gr){for(;;)switch(gr.prev=gr.next){case 0:if(navigator.userAgentData){gr.next=2;break}return gr.abrupt("return",null);case 2:return gr.next=4,navigator.userAgentData.getHighEntropyValues(Ke);case 4:return gr.abrupt("return",gr.sent);case 5:case"end":return gr.stop()}}),ke)}))),function(ke){return Ee.apply(this,arguments)})},{key:"extractMarketingData",value:function(ke){var Ke=[],gr=!0,_r=!1,vr=void 0;try{for(var br,wr=Vi()(ke);!(gr=(br=wr.next()).done);gr=!0){var Fr=br.value;for(var pi in ae.WebUrlMarketingParams){var hi=!0,_i=!1,xi=void 0;try{for(var yi,Li=Vi()(ae.WebUrlMarketingParams[pi]);!(hi=(yi=Li.next()).done);hi=!0){var no=yi.value;RegExp("^"+no).test(Fr+"=")&&Ke.push(Fr)}}catch(Hi){_i=!0,xi=Hi}finally{try{hi||Li.return==null||Li.return()}finally{if(_i)throw xi}}}}}catch(Hi){_r=!0,vr=Hi}finally{try{gr||wr.return==null||wr.return()}finally{if(_r)throw vr}}return Ke}},{key:"appendQueryParamsToUrl",value:function(ke,Ke,gr){var _r,vr,br;return qr()(_r=qr()(vr=qr()(br="".concat(gr.split(ke)[0],"?")).call(br,Ke)).call(vr,ke=="?"?"&":"#")).call(_r,gr.split(ke)[1])}}]),ze})(),ra=te(102),To=te.n(ra),na=te(194),ia=te.n(na),oa=te(122),Co=te.n(oa),sa=te(195),aa=te.n(sa),ca=te(196),ua=te.n(ca),la=te(50),Ki=te.n(la),ni=(function(){function ze(){pe()(this,ze)}return me()(ze,null,[{key:"setLogLevel",value:function(Ee){this._logLevel=Ee}},{key:"debug",value:function(Ee){this._logLevel===le.Debug&&console.log(Ee)}},{key:"info",value:function(Ee){this._logLevel>=le.Info&&console.log(Ee)}},{key:"warn",value:function(Ee){this._logLevel>=le.Warn&&console.warn(Ee)}}]),ze})();ve()(ni,"_logLevel",le.None);var Yi=(function(){function ze(Ee,xe){pe()(this,ze),ve()(this,"_isInitialized",!1),ze.getAvailableStorageType(),this._storagePrefix=xe,this._isInitialized=!0,Ee===se.Types.Local&&ze._isLocalStorageAvailable()?this._storage=localStorage:Ee!==se.Types.Local&&Ee!==se.Types.Session||!ze._isSessionStorageAvailable()?this._buildMemoryStorage():this._storage=sessionStorage}return me()(ze,[{key:"getItem",value:function(Ee){var xe;return yr.isNullOrEmpty(Ee)||!this._isInitialized?null:this._storage.getItem(qr()(xe="".concat(this._storagePrefix,"_")).call(xe,Ee))}},{key:"setItem",value:function(Ee,xe){var Pe;!yr.isNullOrEmpty(Ee)&&xe&&this._isInitialized&&this._storage.setItem(qr()(Pe="".concat(this._storagePrefix,"_")).call(Pe,Ee),xe)}},{key:"removeItem",value:function(Ee){var xe;!yr.isNullOrEmpty(Ee)&&this._isInitialized&&this._storage.removeItem(qr()(xe="".concat(this._storagePrefix,"_")).call(xe,Ee))}},{key:"_buildMemoryStorage",value:function(){var Ee=this;ni.warn("Using memory storage"),this._storage={_data:{},setItem:function(xe,Pe){Ee._storage._data[xe]=Pe},getItem:function(xe){return Ee._storage._data[xe]},removeItem:function(xe){delete Ee._storage._data[xe]}}}}],[{key:"getAvailableStorageType",value:function(){return this._availableStorageType||(this._isLocalStorageAvailable()?this._availableStorageType=se.Types.Local:this._isSessionStorageAvailable()?this._availableStorageType=se.Types.Session:this._availableStorageType=se.Types.Memory),this._availableStorageType}},{key:"_isLocalStorageAvailable",value:function(){if(this._availableStorageType===se.Types.Local)return!0;try{localStorage.setItem(se.StorageEnabledTestKey,se.StorageEnabledTestValue);var Ee=localStorage.getItem(se.StorageEnabledTestKey)===se.StorageEnabledTestValue;return localStorage.removeItem(se.StorageEnabledTestKey),Ee}catch{return!1}}},{key:"_isSessionStorageAvailable",value:function(){if(this._availableStorageType===se.Types.Local||this._availableStorageType===se.Types.Session)return!0;try{sessionStorage.setItem(se.StorageEnabledTestKey,se.StorageEnabledTestValue);var Ee=sessionStorage.getItem(se.StorageEnabledTestKey)===se.StorageEnabledTestValue;return sessionStorage.removeItem(se.StorageEnabledTestKey),Ee}catch{return!1}}}]),ze})();ve()(Yi,"_availableStorageType",void 0);var kr=(function(){function ze(){pe()(this,ze)}return me()(ze,[{key:"init",value:function(Ee){return this._singularConfig=Ee,this._storage=new Yi(se.Types.Local,this.getStoragePrefix()),this._singularDeviceIdStorage=new Yi(se.Types.Local,se.GlobalStoragePrefix),this._isFirstVisit=null,this._newSessionIdNeeded=!1,this.setWebUrl(),this.loadSingularPersistentData(),this}},{key:"loadSingularPersistentData",value:function(){this._sdidPersistMode=ne.SdidPersistModeOff,this._sdidPersistFailReason=null,this._previousSdid=null,this._singularDeviceId=null,this._instanceId=null,this._matchId=null,this.getSingularDeviceId(),this.getCustomUserId(),this.getSingularInstanceId(),this._persistSingularDeviceIdIfNeeded()}},{key:"setWebUrl",value:function(){var Ee=this._storage.getItem(se.StorageWebUrlKey),xe=this._storage.getItem(se.StorageTouchpointTimestampKey),Pe=window.location.href,De=this._isWebUrlContainingMarketingData(Pe),ke=!Ee,Ke=this._didWebUrlChange(Pe);ke||De&&Ke?(De&&(ke||Ke)&&this.setConversionEventOccurred(!0),this._webUrl=Pe,this._touchpointTimestamp=yr.getCurrentTimestamp(),this._storage.setItem(se.StorageWebUrlKey,this._webUrl),this._storage.setItem(se.StorageTouchpointTimestampKey,this._touchpointTimestamp),this._newSessionIdNeeded=!0):(this._webUrl=Ee,this._touchpointTimestamp=xe)}},{key:"getSingularDeviceId",value:function(){if(this._singularDeviceId)return this._singularDeviceId;var Ee=this._singularDeviceIdStorage.getItem(se.SingularDeviceIdKey);if(this._singularConfig._singularDeviceId)this._sdidPersistMode=ne.SdidPersistModeManual,yr.isUUID(this._singularConfig._singularDeviceId)?(ni.debug("Persistent Singular Device Id was set manually"),this._singularDeviceIdStorage.setItem(se.SingularDeviceIdKey,this._singularConfig._singularDeviceId)):(ni.debug("Persistent Singular Device Id provided was not in uuid format"),this._sdidPersistFailReason="invalid udid:".concat(this._singularConfig._singularDeviceId));else if(!yr.isNullOrEmpty(this._singularConfig._autoPersistDomain)){var xe=yr.getCookie(fe.SingularDeviceIdKey);this._sdidPersistMode=ne.SdidPersistModeAuto,xe!=null&&(xe===""?this._sdidPersistFailReason="singular sdid cookie was set to an empty string":yr.isUUID(xe)?(ni.debug("Persistent Singular Device Id was set automatically from cookies"),this._singularDeviceIdStorage.setItem(se.SingularDeviceIdKey,xe)):this._sdidPersistFailReason="invalid udid:".concat(xe))}return this._singularDeviceId=this._getPersistentUUID(this._singularDeviceIdStorage,se.SingularDeviceIdKey),yr.isNullOrEmpty(Ee)||this._singularDeviceId===Ee||(this._previousSdid=Ee),this._singularDeviceId}},{key:"getSdidPersistMode",value:function(){return this._sdidPersistMode}},{key:"getSdidPersistFailReason",value:function(){return this._sdidPersistFailReason}},{key:"getPreviousSdid",value:function(){return this._previousSdid}},{key:"getStoragePrefix",value:function(){var Ee;return qr()(Ee="".concat(this._singularConfig.apikey,"_")).call(Ee,this._singularConfig.productId)}},{key:"getCustomUserId",value:function(){return this._customUserId||(this._customUserId=this._storage.getItem(se.CustomUserIdKey)),this._customUserId}},{key:"getWebUrl",value:function(){return this._webUrl}},{key:"getTouchpointTimestamp",value:function(){return this._touchpointTimestamp}},{key:"setCustomUserId",value:function(Ee){this._customUserId=Ee,this._storage.setItem(se.CustomUserIdKey,Ee)}},{key:"unsetCustomUserId",value:function(){this._customUserId=null,this._storage.removeItem(se.CustomUserIdKey)}},{key:"getSingularConfig",value:function(){return this._singularConfig}},{key:"getSessionId",value:function(){return this._storage.getItem(se.SessionIdKey)}},{key:"getSessionIdForPageVisit",value:function(){if(!this._isNewSessionIdNeeded())return this.getSessionId();var Ee=this._generateNewSessionId();return this.setFirstPageVisitOccurred(!1),this.setFirstPageVisitURL(null),this.getSessionId()||this.saveSessionId(Ee),Ee}},{key:"getSingularInstanceId",value:function(){return this._instanceId||(this._instanceId=this._getPersistentUUID(this._storage,se.SingularInstanceIdKey)),this._instanceId}},{key:"saveSessionId",value:function(Ee){this._setSessionId(Ee)}},{key:"isFirstVisit",value:function(){return this._isFirstVisit!==null||(this._isFirstVisit=!this._storage.getItem(se.DidVisitSiteKey),this._isFirstVisit&&this._storage.setItem(se.DidVisitSiteKey,!0)),this._isFirstVisit}},{key:"getMatchID",value:function(){return this._matchId||(this._matchId=this._singularDeviceIdStorage.getItem(se.MatchIdKey)),this._matchId}},{key:"setMatchID",value:function(Ee){this._singularDeviceIdStorage.setItem(se.MatchIdKey,Ee),this._matchId=Ee}},{key:"clearMatchID",value:function(){this._singularDeviceIdStorage.removeItem(se.MatchIdKey),this._matchId=null}},{key:"clearGlobalProperties",value:function(){this._storage.removeItem(se.GlobalProperties)}},{key:"getGlobalProperties",value:function(){return JSON.parse(this._storage.getItem(se.GlobalProperties))}},{key:"setGlobalProperties",value:function(Ee,xe){if(Ee){var Pe=this.getGlobalProperties()||{};Pe[Ee]=xe,this._storage.setItem(se.GlobalProperties,Pi()(Pe))}}},{key:"IsFirstEvent",value:function(Ee){var xe,Pe=qr()(xe="".concat(se.DidSendEventKeyBase,".")).call(xe,Ee),De=!!this._storage.getItem(Pe);return De||this._storage.setItem(Pe,!0),!De}},{key:"updateLastEventTimestamp",value:function(){this._storage.setItem(se.StorageLastEventTimestamp,yr.getCurrentTimestamp())}},{key:"getFirstPageVisitOccurred",value:function(){return this._storage.getItem(se.FirstPageVisitOccurredKey)==="true"}},{key:"setFirstPageVisitOccurred",value:function(Ee){return this._storage.setItem(se.FirstPageVisitOccurredKey,Ee.toString())}},{key:"setFirstPageVisitURL",value:function(Ee){this._storage.setItem(se.FirstPageVisitURL,Ee)}},{key:"getFirstPageVisitURL",value:function(){return this._storage.getItem(se.FirstPageVisitURL)}},{key:"getConversionEventOccurred",value:function(){return this._storage.getItem(se.ConversionEventOccurredKey)==="true"}},{key:"setConversionEventOccurred",value:function(Ee){return this._storage.setItem(se.ConversionEventOccurredKey,Ee.toString())}},{key:"updateSingularConfig",value:function(Ee){this._singularConfig=Ee,Ee.customUserId&&this.setCustomUserId(Ee.customUserId),this.loadSingularPersistentData()}},{key:"_getPersistentUUID",value:function(Ee,xe){var Pe=Ee.getItem(xe);return Pe||(Pe=yr.generateUUID(),Ee.setItem(xe,Pe)),Pe}},{key:"_isWebUrlContainingMarketingData",value:function(Ee){try{var xe=new Ki.a(Ee).searchParams;for(var Pe in ae.WebUrlMarketingParams){var De=!0,ke=!1,Ke=void 0;try{for(var gr,_r=Vi()(ae.WebUrlMarketingParams[Pe]);!(De=(gr=_r.next()).done);De=!0){var vr=gr.value;if(vr==="utm_.+="){var br=!0,wr=!1,Fr=void 0;try{for(var pi,hi=Vi()(ua()(xe).call(xe));!(br=(pi=hi.next()).done);br=!0){var _i=pi.value;if(aa()(_i).call(_i,"utm_"))return!0}}catch(io){wr=!0,Fr=io}finally{try{br||hi.return==null||hi.return()}finally{if(wr)throw Fr}}}else{var xi=vr.replace(/=$/,"");if(xe.has(xi))return!0}}}catch(io){ke=!0,Ke=io}finally{try{De||_r.return==null||_r.return()}finally{if(ke)throw Ke}}}return!1}catch{for(var yi in ae.WebUrlMarketingParams){var Li=!0,no=!1,Hi=void 0;try{for(var Lo,ho=Vi()(ae.WebUrlMarketingParams[yi]);!(Li=(Lo=ho.next()).done);Li=!0){var Da=Lo.value;if(RegExp(Da).test(Ee))return!0}}catch(Ma){no=!0,Hi=Ma}finally{try{Li||ho.return==null||ho.return()}finally{if(no)throw Hi}}}return!1}}},{key:"_didWebUrlChange",value:function(Ee){var xe=new Co.a(this._storage.getItem(se.StorageWebUrlKey)),Pe=new Co.a(Ee);if(xe.size!==Pe.size)return!0;for(var De=0,ke=ia()(To()(Pe).call(Pe));De<ke.length;De++){var Ke=Bi()(ke[De],2),gr=Ke[0],_r=Ke[1];if(xe.get(gr)!==_r)return!0}return!1}},{key:"_setSessionId",value:function(Ee){this._storage.setItem(se.SessionIdKey,Ee)}},{key:"_getLastEventTimestamp",value:function(){return this._storage.getItem(se.StorageLastEventTimestamp)}},{key:"_isNewSessionIdNeeded",value:function(){return this._newSessionIdNeeded||!this.getSessionId()||!this._getLastEventTimestamp()||this._isSessionTimeout()}},{key:"_isSessionTimeout",value:function(){var Ee=yr.getCurrentTimestamp()-this._getLastEventTimestamp();return!!isNaN(Ee)||Ee>this._singularConfig.sessionTimeOutInSeconds}},{key:"_generateNewSessionId",value:function(){return this._newSessionIdNeeded=!1,yr.generateUUID()}},{key:"_persistSingularDeviceIdIfNeeded",value:function(){yr.isNullOrEmpty(this._singularConfig._autoPersistDomain)||yr.setCookie(fe.SingularDeviceIdKey,this.getSingularDeviceId(),this._singularConfig._autoPersistDomain)}}],[{key:"getInstance",value:function(){return this._instance||(this._instance=new ze),this._instance}}]),ze})();function Io(ze,Ee){var xe=qe()(ze);if(He.a){var Pe=He()(ze);Ee&&(Pe=Fe()(Pe).call(Pe,(function(De){return Ne()(ze,De).enumerable}))),xe.push.apply(xe,Pe)}return xe}function da(ze){for(var Ee=1;Ee<arguments.length;Ee++){var xe,Pe=arguments[Ee]!=null?arguments[Ee]:{};if(Ee%2)Ae()(xe=Io(Pe,!0)).call(xe,(function(ke){ve()(ze,ke,Pe[ke])}));else if(Re.a)Te()(ze,Re()(Pe));else{var De;Ae()(De=Io(Pe)).call(De,(function(ke){_e()(ze,ke,Ne()(Pe,ke))}))}}return ze}ve()(kr,"_instance",void 0);var ki=(function(){function ze(){pe()(this,ze),ve()(this,"_endpoint",void 0),this._extra={},this._method=ce.PostMethod,this.initApiParams(),kr.getInstance().updateLastEventTimestamp()}var Ee;return me()(ze,[{key:"initApiParams",value:function(){var xe;this._params=(xe={},ve()(xe,ae.BrowserAvailableMemory,yr.getBrowserAvailableMemory()),ve()(xe,ae.BrowserUsedMemory,yr.getBrowserUsedMemory()),ve()(xe,ae.CustomUserId,kr.getInstance().getCustomUserId()),ve()(xe,ae.CurrentDeviceTime,yr.getCurrentTimestamp()),ve()(xe,ae.EventId,yr.generateUUID()),ve()(xe,ae.IsConversion,!1),ve()(xe,ae.Keyspace,ae.SingularDeviceId),ve()(xe,ae.Owner,kr.getInstance().getSingularConfig().apikey),ve()(xe,ae.Platform,ae.PlatformWeb),ve()(xe,ae.ProductId,kr.getInstance().getSingularConfig().productId),ve()(xe,ae.ScreenHeight,window.screen.height),ve()(xe,ae.ScreenWidth,window.screen.width),ve()(xe,ae.SdkVersion,yr.getSdkVersion()),ve()(xe,ae.SingularInstanceId,kr.getInstance().getSingularInstanceId()),ve()(xe,ae.SingularDeviceId.toLowerCase(),kr.getInstance().getSingularDeviceId()),ve()(xe,ae.StorageType,Yi.getAvailableStorageType()),ve()(xe,ae.Timezone,yr.getTimeZone()),ve()(xe,ae.TouchpointTimestamp,kr.getInstance().getTouchpointTimestamp()),ve()(xe,ae.UserAgent,navigator.userAgent),ve()(xe,ae.UUID,kr.getInstance().getSingularDeviceId()),ve()(xe,ae.GlobalProperties,kr.getInstance().getGlobalProperties()&&Pi()(kr.getInstance().getGlobalProperties())),xe)}},{key:"sendRequest",value:(Ee=Mi()(ui.a.mark((function xe(){var Pe,De=this;return ui.a.wrap((function(ke){for(;;)switch(ke.prev=ke.next){case 0:return ke.next=2,yr.getOS();case 2:return this._params[ae.OS]=ke.sent,ke.next=5,yr.getClientHints();case 5:return(Pe=ke.sent)&&(this._params[ae.ClientHints]=Pi()(Pe)),ke.abrupt("return",new qs.a((function(Ke){var gr;qe()(De._extra).length>0&&(De._params[ae.Extra]=Pi()(De._extra)),De._params[ae.SessionId]||(De._params[ae.SessionId]=kr.getInstance().getSessionId());var _r=da({},De._params,ve()({},ae.Lag,yr.getCurrentTimestamp()-js()(De._params[ae.CurrentDeviceTime]))),vr=De._method===ce.PostMethod?De._buildRequestBody(_r):null,br=De._buildQueryParams(_r),wr=De._buildRequestUrl(br);ni.debug(qr()(gr=`Sending api request
|
|
886
886
|
Url:`.concat(wr,`
|
|
887
887
|
Body:`)).call(gr,Pi()(vr)));var Fr=new XMLHttpRequest;Fr.open(De._method||ce.PostMethod,wr,!0),Fr.setRequestHeader(ce.ContentType,ce.ContentTypeValue),Fr.timeout=ce.RequestTimeoutMs,Fr.ontimeout=function(){Ke(!1)},Fr.onreadystatechange=function(){Fr.readyState===XMLHttpRequest.DONE&&Ke(De.handleResponse(Fr))},Fr.send(Pi()(vr))})));case 8:case"end":return ke.stop()}}),xe,this)}))),function(){return Ee.apply(this,arguments)})},{key:"handleResponse",value:function(xe){try{var Pe=JSON.parse(xe.responseText);return xe.status===ce.ValidResponseCode&&Pe[ce.Status]===ce.ValidResponse}catch{return!1}}},{key:"_buildRequestBody",value:function(xe){var Pe,De,ke={};if(Ae()(Pe=Fe()(De=oo()(xe)).call(De,(function(gr){var _r,vr=Bi()(gr,2),br=vr[0],wr=vr[1];return Gi()(_r=ce.PostParams).call(_r,br)&&!yr.isNullOrEmpty(wr)}))).call(Pe,(function(gr){var _r=Bi()(gr,2),vr=_r[0],br=_r[1];ke[vr]=br})),qe()(ke).length===0)return{};var Ke=Pi()(ke);return{payload:Ke,signature:yr.calculateHash(Ke,kr.getInstance().getSingularConfig().secret)}}},{key:"_buildQueryParams",value:function(xe){var Pe,De,ke,Ke=this,gr=Eo()(Pe=Fe()(De=qe()(xe)).call(De,(function(br){var wr;return!yr.isNullOrEmpty(xe[br])&&(Ke._method!==ce.PostMethod||!Gi()(wr=ce.PostParams).call(wr,br))}))).call(Pe,(function(br){var wr;return qr()(wr="".concat(encodeURIComponent(br),"=")).call(wr,encodeURIComponent(xe[br]))})),_r="?".concat(gr.join("&")),vr=yr.calculateHash(_r,kr.getInstance().getSingularConfig().secret);return qr()(ke="".concat(_r,"&h=")).call(ke,vr)}},{key:"_buildRequestUrl",value:function(xe){var Pe,De;return qr()(Pe=qr()(De="".concat(ce.BaseUrl)).call(De,this._endpoint)).call(Pe,xe)}},{key:"eventId",get:function(){return this._params[ae.EventId]}}],[{key:"toJsonString",value:function(xe){return yr.isNullOrEmpty(xe)?null:Pi()(xe)}},{key:"fromJsonString",value:function(xe){if(yr.isNullOrEmpty(xe))return null;var Pe=JSON.parse(xe),De=Ms()(this.apiClasses[Pe._apiType].prototype);return Ns()(De,Pe),De}}]),ze})();function wo(ze,Ee){var xe=qe()(ze);if(He.a){var Pe=He()(ze);Ee&&(Pe=Fe()(Pe).call(Pe,(function(De){return Ne()(ze,De).enumerable}))),xe.push.apply(xe,Pe)}return xe}function so(ze){for(var Ee=1;Ee<arguments.length;Ee++){var xe,Pe=arguments[Ee]!=null?arguments[Ee]:{};if(Ee%2)Ae()(xe=wo(Pe,!0)).call(xe,(function(ke){ve()(ze,ke,Pe[ke])}));else if(Re.a)Te()(ze,Re()(Pe));else{var De;Ae()(De=wo(Pe)).call(De,(function(ke){_e()(ze,ke,Ne()(Pe,ke))}))}}return ze}ve()(ki,"apiClasses",{});var Xi=(function(ze){function Ee(xe){var Pe,De;if(pe()(this,Ee),yr.isNullOrEmpty(xe))throw new Error("eventName must not be null or empty");return(De=fr()(this,Qe()(Ee).call(this)))._apiType=oe.EventApi,De._endpoint=ce.Endpoints.Event,De._params=so({},De._params,(Pe={},ve()(Pe,ae.EventProductName,kr.getInstance().getSingularConfig().productName),ve()(Pe,ae.EventName,xe),ve()(Pe,ae.IsRevenueEvent,!1),ve()(Pe,ae.IsFirstEvent,kr.getInstance().IsFirstEvent(xe)),ve()(Pe,ae.isAfterConversionEvent,De._getIsAfterConversionEvent()),Pe)),De}return Cr()(Ee,ze),me()(Ee,[{key:"_getIsAfterConversionEvent",value:function(){var xe=kr.getInstance(),Pe=xe.getFirstPageVisitOccurred(),De=xe.getConversionEventOccurred();if(Pe&&De){xe.setConversionEventOccurred(!1);var ke=xe.getTouchpointTimestamp();if(ke&&yr.getCurrentTimestamp()-ke<_o)return!0}return!1}},{key:"withRevenue",value:function(xe,Pe){if(yr.isNullOrEmpty(xe))throw new Error("Currency must not be null or empty");if(yr.isNullOrEmpty(Pe))throw new Error("Amount must not be null or empty");return this._extra[ae.RevenueCurrency]=xe,this._extra[ae.RevenueAmount]=Pe,this._params[ae.IsRevenueEvent]=!0,this}},{key:"withArgs",value:function(xe){return xe&&qe()(xe).length!==0?(this._extra=so({},this._extra,{},xe),this):this}},{key:"withParams",value:function(xe){return xe&&qe()(xe).length!==0?(this._params=so({},this._params,{},xe),this):this}}]),Ee})(ki);function Ao(ze,Ee){var xe=qe()(ze);if(He.a){var Pe=He()(ze);Ee&&(Pe=Fe()(Pe).call(Pe,(function(De){return Ne()(ze,De).enumerable}))),xe.push.apply(xe,Pe)}return xe}var ao,co=(function(ze){function Ee(xe){var Pe,De;return pe()(this,Ee),(De=fr()(this,Qe()(Ee).call(this,xe)))._apiType=oe.ConversionEventApi,De._params=(function(ke){for(var Ke=1;Ke<arguments.length;Ke++){var gr,_r=arguments[Ke]!=null?arguments[Ke]:{};if(Ke%2)Ae()(gr=Ao(_r,!0)).call(gr,(function(br){ve()(ke,br,_r[br])}));else if(Re.a)Te()(ke,Re()(_r));else{var vr;Ae()(vr=Ao(_r)).call(vr,(function(br){_e()(ke,br,Ne()(_r,br))}))}}return ke})({},De._params,(Pe={},ve()(Pe,ae.IsConversion,!0),ve()(Pe,ae.WebUrl,kr.getInstance().getWebUrl()),Pe)),De}return Cr()(Ee,ze),Ee})(Xi),fa=(function(){function ze(){pe()(this,ze),this._storage=new Yi(se.Types.Session,kr.getInstance().getStoragePrefix()),this._queue=this._loadQueueFromStorage()}return me()(ze,[{key:"enqueue",value:function(Ee){yr.isNullOrEmpty(Ee)||!(Ee instanceof ki)||this._queue.length>=se.MaxApisInQueue||(ni.debug("Enqueued api:".concat(Pi()(Ee))),this._queue.push(ki.toJsonString(Ee)),this._saveQueueToStorage())}},{key:"dequeue",value:function(){if(this.isQueueEmpty())return null;var Ee=ki.fromJsonString(this._queue.shift());return this._saveQueueToStorage(),ni.debug("Dequeued api:".concat(Pi()(Ee))),Ee}},{key:"peek",value:function(){return this.isQueueEmpty()?null:ki.fromJsonString(this._queue[0])}},{key:"isQueueEmpty",value:function(){return this._queue.length<=0}},{key:"_saveQueueToStorage",value:function(){this._storage.setItem(se.ApiQueueKey,Pi()(this._queue))}},{key:"_loadQueueFromStorage",value:function(){var Ee=this._storage.getItem(se.ApiQueueKey);return Ee?(ni.info("Api queue loaded from storage"),JSON.parse(Ee)):[]}}]),ze})(),pa=te(103),xo=te.n(pa),uo=(function(ze){function Ee(){var xe;pe()(this,Ee);var Pe=kr.getInstance().getSessionIdForPageVisit();(xe=fr()(this,Qe()(Ee).call(this,oe.PageVisitEventName)))._apiType=oe.PageVisitApi,xe._params[ae.SessionId]=Pe,xe._params[ae.WebUrl]=window.location.href,xe._params[ae.DocumentReferrer]=document.referrer,xe._params[ae.IsFirstVisit]=kr.getInstance().isFirstVisit(),xe._params[ae.IsPageRefreshed]=yr.isPageRefreshed(),xe._params[ae.SdidPersistMode]=kr.getInstance().getSdidPersistMode(),xe._params[ae.IsFirstPageVisitInSession]=!kr.getInstance().getFirstPageVisitOccurred(),xe._params[ae.ECID]=kr.getInstance().getMatchID()||kr.getInstance().getSingularDeviceId();var De=kr.getInstance().getSdidPersistFailReason();yr.isNullOrEmpty(De)||(xe._params[ae.SdidPersistFailedReason]=De);var ke=kr.getInstance().getPreviousSdid();return yr.isNullOrEmpty(ke)||(xe._params[ae.PreviousSdid]=ke),xe}return Cr()(Ee,ze),me()(Ee,[{key:"_getIsAfterConversionEvent",value:function(){return!1}},{key:"handleResponse",value:function(xe){var Pe=xo()(Qe()(Ee.prototype),"handleResponse",this).call(this,xe);return Pe&&(kr.getInstance().saveSessionId(this._params[ae.SessionId]),kr.getInstance().getFirstPageVisitOccurred()||(kr.getInstance().setFirstPageVisitURL(this._params[ae.WebUrl]),kr.getInstance().setFirstPageVisitOccurred(!0))),Pe}}]),Ee})(co),Ro=(function(ze){function Ee(){var xe;return pe()(this,Ee),(xe=fr()(this,Qe()(Ee).call(this)))._apiType=oe.CustomUserIdEventApi,xe._endpoint=ce.Endpoints.DeviceCustomUserId,xe}return Cr()(Ee,ze),Ee})(ki),ha=(function(){function ze(){var xe=this;pe()(this,ze),ve()(this,"_tabClosed",(function(){return xe._skipFailed=!0,xe._startSendingApis()})),this._setSupportedApis(),this._skipFailed=!1,this._isSendingApis=!1,this._storageQueue=new fa,window.addEventListener(ie.TabClosed,this._tabClosed),this._startSendingApis()}var Ee;return me()(ze,[{key:"sendApi",value:function(xe){if(!yr.isNullOrEmpty(xe)&&xe instanceof ki)return this._storageQueue.enqueue(xe),this._startSendingApis()}},{key:"_startSendingApis",value:(Ee=Mi()(ui.a.mark((function xe(){var Pe;return ui.a.wrap((function(De){for(;;)switch(De.prev=De.next){case 0:if(!this._isSendingApis){De.next=2;break}return De.abrupt("return");case 2:this._isSendingApis=!0;case 3:if(this._storageQueue.isQueueEmpty()){De.next=13;break}return Pe=this._storageQueue.peek(),De.next=7,Pe.sendRequest();case 7:if(De.sent||this._skipFailed){De.next=10;break}return De.abrupt("break",13);case 10:this._storageQueue.dequeue(),De.next=3;break;case 13:this._isSendingApis=!1;case 14:case"end":return De.stop()}}),xe,this)}))),function(){return Ee.apply(this,arguments)})},{key:"_setSupportedApis",value:function(){var xe;ki.apiClasses=(xe={},ve()(xe,oe.ConversionEventApi,co),ve()(xe,oe.CustomUserIdEventApi,Ro),ve()(xe,oe.EventApi,Xi),ve()(xe,oe.PageVisitApi,uo),xe)}}]),ze})(),ga=te(197),ma=te.n(ga),va=te(198),ya=te.n(va),ba=(function(ze){function Ee(){var Pe,De;pe()(this,Ee),(De=fr()(this,Qe()(Ee).call(this)))._apiType=oe.FetchBannerApi,De._method=ce.GetMethod,De._endpoint=ce.Endpoints.FetchBanner;var ke=kr.getInstance();return De._params=(Pe={},ve()(Pe,ae.Owner,ke.getSingularConfig().apikey),ve()(Pe,ae.Locale,navigator.language),ve()(Pe,ae.CurrentDeviceTime,yr.getCurrentTimestamp()),ve()(Pe,ae.Timezone,yr.getTimeZone()),ve()(Pe,ae.BannerShowsCounter,"1"),ve()(Pe,ae.Keyspace,ae.SingularDeviceId),ve()(Pe,ae.ProductId,ke.getSingularConfig().productId),ve()(Pe,ae.IsFirstVisit,ke.isFirstVisit()),ve()(Pe,ae.SdkVersion,yr.getSdkVersion()),Pe),De}var xe;return Cr()(Ee,ze),me()(Ee,[{key:"sendRequest",value:(xe=Mi()(ui.a.mark((function Pe(De){return ui.a.wrap((function(ke){for(;;)switch(ke.prev=ke.next){case 0:return this._params[ae.BannerSourceUrl]=location.href,De&&(this._params[ae.LastDismissed]=De),ke.next=4,xo()(Qe()(Ee.prototype),"sendRequest",this).call(this);case 4:return ke.abrupt("return",ke.sent);case 5:case"end":return ke.stop()}}),Pe,this)}))),function(Pe){return xe.apply(this,arguments)})},{key:"_buildRequestUrl",value:function(Pe){var De,ke;return qr()(De=qr()(ke="".concat(ce.BaseUrl.replace("v1/",""))).call(ke,this._endpoint)).call(De,Pe)}},{key:"isValidResponse",value:function(Pe){var De=Pe.display,ke=Pe.meta;return De&&ke?ce.FetchBannerResponseLinkKey in ke:(ni.debug("BannerApi.isValidResponse: missing display or meta keys"),!1)}},{key:"handleResponse",value:function(Pe){try{ni.debug("handeling response of banner request: ".concat(Pe));var De=JSON.parse(Pe.responseText);return De?Pe.status===ce.ValidResponseCode&&this.isValidResponse(De)?De:void ni.debug("response is not valid"):void 0}catch{ni.debug("error processing response")}}}]),Ee})(ki),_a=(function(){function ze(){pe()(this,ze),ve()(this,"getBannerLastDismissed",(function(){return kr.getInstance()._storage.getItem(se.BannerLastDismissedKey)})),ve()(this,"setBannerLastDismissed",(function(){kr.getInstance()._storage.setItem(se.BannerLastDismissedKey,yr.getCurrentTimestamp())})),this.isShowingBanner=!1,this.bannersAPI=new ba,this.bannerElement=this.htmlToElement(this.fetchTemplate()),this.bannerStyle=null,this.closeButton=this.bannerElement.getElementsByClassName("singular-banner-close-button")[0],this.downloadButton=this.bannerElement.getElementsByClassName("singular-banner-download-button")[0],this.onCloseClick,this.onDownloadClick,this.urlChangeInterval}var Ee,xe;return me()(ze,[{key:"fetchTemplate",value:function(){return`<div id="singular-banner">
|
|
888
888
|
<img class="singular-banner-background-image">
|
|
@@ -1500,7 +1500,7 @@ Minimum version required to store current data is: `+Oe+`.
|
|
|
1500
1500
|
align-items: center;
|
|
1501
1501
|
gap: 8px;
|
|
1502
1502
|
}
|
|
1503
|
-
`;class PaymentMethod extends Component{constructor(te){super({tag:"div",styles:ne=>getPaymentMethodStyles(ne)});Ie(this,"componentProps");Ie(this,"loadingWrapper");Ie(this,"timerElement",null);Ie(this,"timerInstance",null);Ie(this,"pollingService",null);Ie(this,"pendingStatusRetrier",new PendingStatusRetrier);this.componentProps=te,this.loadingWrapper=this.createLoadingWrapper(),this.element.append(this.loadingWrapper),this.fetchPaymentMethodData()}createLoadingWrapper(){const te=document.createElement("div");te.classList.add("loading-wrapper");const ne=new Loading({size:100,variant:"fetching",color:ThemeManager.getStyles().primaryColor}).element,ie=new Typography({text:AstroPayI18n.translate("waiting_confirmation"),size:"base",lineHeight:30,weight:600}).element;ie.style.marginTop="8px";const oe=new Typography({text:AstroPayI18n.translate("do_not_close_window"),size:"medium",lineHeight:24}).element;return te.append(ne,ie,oe),te}async fetchPaymentMethodData(){var te;try{if((te=this.componentProps.paymentMethod)!=null&&te.uri){const ne={methodCode:this.componentProps.paymentMethod.code},ie=await this.pendingStatusRetrier.fetchUntilSections(this.componentProps.paymentMethod.uri,this.componentProps.paymentExternalId,ne);this.renderSections(ie)}else throw new Error(AstroPayI18n.translate("generic_error"))}catch(ne){if(ne instanceof PendingStatusRetryCancelledError)return;const ie=ne;this.showErrorMessage(ie.description??ie.message)}finally{this.loadingWrapper.remove()}}async checkPaymentStatus(){try{const te=await PaymentService.getPaymentStatus(this.componentProps.paymentExternalId);te.pollingStatus===EPollingStatus.ACCEPTED?this.initializePollingService(te):te.pollingStatus===EPollingStatus.FINISHED&&this.handlePaymentFinished(te)}catch(te){const ne=te;this.showErrorMessage(ne.description??ne.message),this.stopTimer(),this.stopPolling()}}initializePollingService(te){this.pollingService=new PollingService(te,ne=>this.showWaitingInfo(ne),ne=>this.handlePaymentFinished(ne),ne=>this.handlePollingError(ne)),this.pollingService.startPolling()}handlePollingError(te){if(typeof te=="object"&&te!==null&&"text"in te){const ie=te;this.showErrorMessage(ie.text)}else{const ie=te;this.showErrorMessage(ie.description??ie.message)}this.stopPolling()}stopTimer(){this.timerInstance&&(this.timerInstance.stopTimer(),this.timerInstance=null,this.timerElement=null)}handlePaymentFinished(te){te.data.status===EPaymentStatus.COMPLETED?this.handleSuccessSection(te.data.successSection):this.handleErrorSection(te.data.errorSection)}handleSuccessSection(te){if(!te)return;const ne=[],ie=new Status$1({type:"success",title:te.title,description:te.description}).element;ne.push(ie),this.componentProps.onSuccess?this.componentProps.onSuccess(ne):(this.element.innerHTML="",ne.forEach(oe=>this.element.append(oe)))}handleErrorSection(te){if(!te)return;const ne=[],ie=new Status$1({type:"error",title:te.title,description:te.description}).element;ne.push(ie),this.componentProps.onError?this.componentProps.onError(ne):(this.element.innerHTML="",ne.forEach(oe=>this.element.append(oe)))}showErrorMessage(te){this.element.innerHTML="";const ne=document.createElement("div");ne.classList.add("timeout-container");const ie=new Typography({text:te,size:ThemeManager.getFontScale().xSmall,color:ThemeManager.getStyles().messages.error.textColor}).element;ne.append(ie,this.renderRetryButton()),this.element.append(ne)}showWaitingInfo(te){let ne=this.element.querySelector(".loading-pooling");ne||(ne=document.createElement("div"),ne.classList.add("loading-pooling"),this.element.append(ne)),ne.innerHTML="";const ie=new Loading({size:12,color:ThemeManager.getStyles().textPrimaryColor}).element,oe=new Typography({text:te,size:"xSmall"}).element;ne.append(ie,oe)}async renderSections(te){te.filter(ne=>!!ne).sort((ne,ie)=>ne.order-ie.order).forEach(ne=>{const{componentType:ie,metadata:oe}=ne;switch(ie){case EComponentType.AMOUNT_DISPLAY:this.renderAmountDisplay(oe);break;case EComponentType.COPY:this.renderCopy(oe);break;case EComponentType.DESCRIPTION:this.renderDescription(oe);break;case EComponentType.EXPIRATION_TIMER:this.renderTimer(oe);break;case EComponentType.QR_CODE:this.renderQRCode(oe);break;case EComponentType.SHARE:this.renderShare(oe);break;default:console.warn("Unknown component type:",ie)}}),await this.checkPaymentStatus()}renderCopy(te){const ne=new Button({text:te.label,variant:"copy-to-clipboard",size:"medium",iconLeft:te.iconLeft,iconRight:te.iconRight??"copy_2_line",onClick:()=>{copyToClipboard(te.value)}}).element;this.element.append(ne)}renderShare(te){const ne=new Button({text:te.label,variant:"text",size:"medium",iconRight:te.iconRight,iconLeft:te.iconLeft,onClick:()=>{var ie,oe,se;shareInfo(((ie=te==null?void 0:te.richTextInfo)==null?void 0:ie.title)??"Share",((oe=te==null?void 0:te.richTextInfo)==null?void 0:oe.description)??te.value,(se=te==null?void 0:te.richTextInfo)==null?void 0:se.url)}}).element;this.element.append(ne)}renderDescription(te){const ne=new Typography({text:`${te.text} ${formatAmountCurrency(te.amount,te.currency,AstroPayConfig.getCurrencyMode())}`,size:"medium",lineHeight:24,weight:600}).element;this.element.append(ne)}renderQRCode(te){const ne=new QrCode({value:te.value,altText:AstroPayI18n.translate("qr_code")}).element;this.element.append(ne)}renderAmountDisplay(te){const ne=new Typography({text:te.value,size:"medium",lineHeight:24,weight:600}).element;this.element.append(ne)}renderTimer(te){this.timerInstance=new Timer({time:te.time,text:te.label,iconLeft:te.iconLeft,iconRight:te.iconRight,timeoutText:te.timeoutInfo.description,onTimeOut:()=>this.handleTimeout(te)}),this.timerElement=this.timerInstance.element,this.element.append(this.timerElement)}handleTimeout(te){this.stopPolling(),this.stopTimer();const ne=document.createElement("div");ne.classList.add("timeout-container"),this.timerElement&&ne.append(this.timerElement),te.timeoutInfo.description&&ne.append(this.renderExpiredBadge(te.timeoutInfo.description)),te.timeoutInfo.retry&&ne.append(this.renderRetryButton()),this.element.innerHTML="",this.element.append(ne)}renderRetryButton(){return new Button({text:AstroPayI18n.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(te){return new Badge({items:[{title:te,icon:"alert_line"}],variant:"default",align:"center"}).element}stopPolling(){this.pollingService&&(this.pollingService.stopPolling(),this.pollingService=null)}destroy(){this.pendingStatusRetrier.cancel(),this.stopPolling(),this.element.remove()}}const paymentIcons={[EPaymentCode.AP]:"astropay_payment_method",[EPaymentCode.IX]:"system_pix",[EPaymentCode.CREDIT_CARD]:"bank_card_line",[EPaymentCode.DEBIT_CARD]:"bank_card_line",[EPaymentCode.CW]:"bank_card_line",[EPaymentCode.DC]:"bank_card_line",[EPaymentCode.CC]:"bank_card_line",[EPaymentCode.QA]:"qrcode_line"},paymentAuxIcons={[EPaymentCode.CREDIT_CARD]:["payment_visa","payment_master"],[EPaymentCode.DEBIT_CARD]:["payment_visa","payment_master"],[EPaymentCode.CW]:["payment_visa","payment_master"],[EPaymentCode.DC]:["payment_visa","payment_master"],[EPaymentCode.CC]:["payment_visa","payment_master"]},callbackEvent=(ee,re)=>{switch(ee){case EPaymentCode.CREDIT_CARD:case EPaymentCode.DEBIT_CARD:case EPaymentCode.CW:case EPaymentCode.DC:case EPaymentCode.CC:AmplitudeAnalytics.astroPayPaymentCardClicked(re);break}},validatePaymentMethod=ee=>!!ee.enabled,createPaymentInstance=(ee,re)=>{const{paymentExternalId:te,amount:ne,currency:ie,country:oe,user:se,countries:ae,benefits:ce,cardConfig:ue,actionLabel:le,onSuccess:de,onError:fe,onProcessingStart:he,onProcessingEnd:pe}=re;switch(ee.code){case EPaymentCode.AP:return new AstroPayPaymentMethod({paymentExternalId:te,user:se,countries:ae,benefits:ce,paymentAmount:{amount:ne,currency:ie},actionLabel:le,onSuccess:de,onError:fe});default:return CARDS_METHOD.includes(ee.code)?new CardPaymentMethod({paymentExternalId:te,amount:ne,currency:ie,country:oe,paymentMethod:ee,showPaymentSummary:ue==null?void 0:ue.showPaymentSummary,expirationDateFormat:ue==null?void 0:ue.expirationDateFormat,onSuccess:de,onError:fe,...he&&{onProcessingStart:he},...pe&&{onProcessingEnd:pe}}):new PaymentMethod({paymentExternalId:te,paymentMethod:ee,onSuccess:de,onError:fe})}},buildMethodDescription=(ee,re)=>ee.map((te,ne)=>ne===re&&te.description?`${te.label} · ${te.description}`:te.label).join(" · "),buildCardGroupAccordionItem=(ee,re)=>{var ae;const{paymentExternalId:te}=re,ne=ee[0];let ie=null,oe=null;const se=ee.map((ce,ue)=>{let le=null;return{label:ce.label,content:()=>(le==null||le.destroy(),le=createPaymentInstance(ce,{...re,onProcessingStart:()=>{var de;ie==null||ie.lock(),(de=re.onProcessingStart)==null||de.call(re)},onProcessingEnd:()=>{var de;ie==null||ie.unlock(),(de=re.onProcessingEnd)==null||de.call(re)}}),le.element),onClose:()=>{le==null||le.destroy(),le=null},onSelect:()=>{oe==null||oe(buildMethodDescription(ee,ue)),callbackEvent(ce.code,te)}}});return{icon:ne.logo||paymentIcons[ne.code]||"bank_card_line",title:ne.label,description:buildMethodDescription(ee,0),auxImage:paymentAuxIcons[ne.code]??["payment_visa","payment_master"],tag:(ae=ne==null?void 0:ne.metadata)==null?void 0:ae.tag,content:()=>(ie=new CardTabs({tabs:se,defaultActiveTab:0,variant:"segmented"}),ie.element),onClose:()=>{ie==null||ie.destroy(),ie=null},onClickCallback:()=>callbackEvent(ne.code,te),onReady:ce=>{oe=ce}}},mountPaymentMethodItems=({paymentMethods:ee,paymentExternalId:re,...te})=>{var fe;if(!(ee!=null&&ee.length))return[];const ne=ee.filter(validatePaymentMethod),ie={paymentExternalId:re,...te},oe=ne.filter(he=>CARDS_METHOD.includes(he.code)),ae=ne.filter(he=>!CARDS_METHOD.includes(he.code)).map(he=>{var ge;let pe=null;return{icon:he.logo||paymentIcons[he.code]||"pay_line",title:he.label,description:he==null?void 0:he.description,auxImage:paymentAuxIcons[he.code],tag:(ge=he==null?void 0:he.metadata)==null?void 0:ge.tag,content:()=>(pe==null||pe.destroy(),pe=createPaymentInstance(he,ie),pe.element),onClose:()=>{pe==null||pe.destroy(),pe=null},onClickCallback:()=>callbackEvent(he.code,re)}});if(oe.length<=1){const he=[...ae];if(oe.length===1){const pe=oe[0];let ge=null;const me={icon:pe.logo||paymentIcons[pe.code]||"pay_line",title:pe.label,description:pe==null?void 0:pe.description,auxImage:paymentAuxIcons[pe.code],tag:(fe=pe==null?void 0:pe.metadata)==null?void 0:fe.tag,content:()=>(ge==null||ge.destroy(),ge=createPaymentInstance(pe,ie),ge.element),onClose:()=>{ge==null||ge.destroy(),ge=null},onClickCallback:()=>callbackEvent(pe.code,re)},ye=ne.findIndex(be=>CARDS_METHOD.includes(be.code)),ve=ne.slice(0,ye).filter(be=>!CARDS_METHOD.includes(be.code)).length;he.splice(ve,0,me)}return he}const ce=buildCardGroupAccordionItem(oe,ie),ue=ne.findIndex(he=>CARDS_METHOD.includes(he.code)),le=ne.slice(0,ue).filter(he=>!CARDS_METHOD.includes(he.code)).length,de=[...ae];return de.splice(le,0,ce),de},getAstroPayFullCheckoutStyles=ee=>css`
|
|
1503
|
+
`;class PaymentMethod extends Component{constructor(te){super({tag:"div",styles:ne=>getPaymentMethodStyles(ne)});Ie(this,"componentProps");Ie(this,"loadingWrapper");Ie(this,"timerElement",null);Ie(this,"timerInstance",null);Ie(this,"pollingService",null);Ie(this,"pendingStatusRetrier",new PendingStatusRetrier);this.componentProps=te,this.loadingWrapper=this.createLoadingWrapper(),this.element.append(this.loadingWrapper),this.fetchPaymentMethodData()}createLoadingWrapper(){const te=document.createElement("div");te.classList.add("loading-wrapper");const ne=new Loading({size:100,variant:"fetching",color:ThemeManager.getStyles().primaryColor}).element,ie=new Typography({text:AstroPayI18n.translate("waiting_confirmation"),size:"base",lineHeight:30,weight:600}).element;ie.style.marginTop="8px";const oe=new Typography({text:AstroPayI18n.translate("do_not_close_window"),size:"medium",lineHeight:24}).element;return te.append(ne,ie,oe),te}async fetchPaymentMethodData(){var te;try{if((te=this.componentProps.paymentMethod)!=null&&te.uri){const ne={methodCode:this.componentProps.paymentMethod.code},ie=await this.pendingStatusRetrier.fetchUntilSections(this.componentProps.paymentMethod.uri,this.componentProps.paymentExternalId,ne);this.renderSections(ie)}else throw new Error(AstroPayI18n.translate("generic_error"))}catch(ne){if(ne instanceof PendingStatusRetryCancelledError)return;const ie=ne;this.showErrorMessage(ie.description??ie.message)}finally{this.loadingWrapper.remove()}}async checkPaymentStatus(){try{const te=await PaymentService.getPaymentStatus(this.componentProps.paymentExternalId);te.pollingStatus===EPollingStatus.ACCEPTED?this.initializePollingService(te):te.pollingStatus===EPollingStatus.FINISHED&&this.handlePaymentFinished(te)}catch(te){const ne=te;this.showErrorMessage(ne.description??ne.message),this.stopTimer(),this.stopPolling()}}initializePollingService(te){this.pollingService=new PollingService(te,ne=>this.showWaitingInfo(ne),ne=>this.handlePaymentFinished(ne),ne=>this.handlePollingError(ne)),this.pollingService.startPolling()}handlePollingError(te){if(typeof te=="object"&&te!==null&&"text"in te){const ie=te;this.showErrorMessage(ie.text)}else{const ie=te;this.showErrorMessage(ie.description??ie.message)}this.stopPolling()}stopTimer(){this.timerInstance&&(this.timerInstance.stopTimer(),this.timerInstance=null,this.timerElement=null)}handlePaymentFinished(te){te.data.status===EPaymentStatus.COMPLETED?this.handleSuccessSection(te.data.successSection):this.handleErrorSection(te.data.errorSection)}handleSuccessSection(te){if(!te)return;const ne=[],ie=new Status$1({type:"success",title:te.title,description:te.description}).element;ne.push(ie),this.componentProps.onSuccess?this.componentProps.onSuccess(ne):(this.element.innerHTML="",ne.forEach(oe=>this.element.append(oe)))}handleErrorSection(te){if(!te)return;const ne=[],ie=new Status$1({type:"error",title:te.title,description:te.description}).element;ne.push(ie),this.componentProps.onError?this.componentProps.onError(ne):(this.element.innerHTML="",ne.forEach(oe=>this.element.append(oe)))}showErrorMessage(te){this.element.innerHTML="";const ne=document.createElement("div");ne.classList.add("timeout-container");const ie=new Typography({text:te,size:ThemeManager.getFontScale().xSmall,color:ThemeManager.getStyles().messages.error.textColor}).element;ne.append(ie,this.renderRetryButton()),this.element.append(ne)}showWaitingInfo(te){let ne=this.element.querySelector(".loading-pooling");ne||(ne=document.createElement("div"),ne.classList.add("loading-pooling"),this.element.append(ne)),ne.innerHTML="";const ie=new Loading({size:12,color:ThemeManager.getStyles().textPrimaryColor}).element,oe=new Typography({text:te,size:"xSmall"}).element;ne.append(ie,oe)}async renderSections(te){te.filter(ne=>!!ne).sort((ne,ie)=>ne.order-ie.order).forEach(ne=>{const{componentType:ie,metadata:oe}=ne;switch(ie){case EComponentType.AMOUNT_DISPLAY:this.renderAmountDisplay(oe);break;case EComponentType.COPY:this.renderCopy(oe);break;case EComponentType.DESCRIPTION:this.renderDescription(oe);break;case EComponentType.EXPIRATION_TIMER:this.renderTimer(oe);break;case EComponentType.QR_CODE:this.renderQRCode(oe);break;case EComponentType.SHARE:this.renderShare(oe);break;default:console.warn("Unknown component type:",ie)}}),await this.checkPaymentStatus()}renderCopy(te){const ne=new Button({text:te.label,variant:"copy-to-clipboard",size:"medium",iconLeft:te.iconLeft,iconRight:te.iconRight??"copy_2_line",onClick:()=>{copyToClipboard(te.value)}}).element;this.element.append(ne)}renderShare(te){const ne=new Button({text:te.label,variant:"text",size:"medium",iconRight:te.iconRight,iconLeft:te.iconLeft,onClick:()=>{var ie,oe,se;shareInfo(((ie=te==null?void 0:te.richTextInfo)==null?void 0:ie.title)??"Share",((oe=te==null?void 0:te.richTextInfo)==null?void 0:oe.description)??te.value,(se=te==null?void 0:te.richTextInfo)==null?void 0:se.url)}}).element;this.element.append(ne)}renderDescription(te){const ne=new Typography({text:`${te.text} ${formatAmountCurrency(te.amount,te.currency,AstroPayConfig.getCurrencyMode())}`,size:"medium",lineHeight:24,weight:600,align:"center"}).element;this.element.append(ne)}renderQRCode(te){const ne=new QrCode({value:te.value,altText:AstroPayI18n.translate("qr_code")}).element;this.element.append(ne)}renderAmountDisplay(te){const ne=new Typography({text:te.value,size:"medium",lineHeight:24,weight:600}).element;this.element.append(ne)}renderTimer(te){this.timerInstance=new Timer({time:te.time,text:te.label,iconLeft:te.iconLeft,iconRight:te.iconRight,timeoutText:te.timeoutInfo.description,onTimeOut:()=>this.handleTimeout(te)}),this.timerElement=this.timerInstance.element,this.element.append(this.timerElement)}handleTimeout(te){this.stopPolling(),this.stopTimer();const ne=document.createElement("div");ne.classList.add("timeout-container"),this.timerElement&&ne.append(this.timerElement),te.timeoutInfo.description&&ne.append(this.renderExpiredBadge(te.timeoutInfo.description)),te.timeoutInfo.retry&&ne.append(this.renderRetryButton()),this.element.innerHTML="",this.element.append(ne)}renderRetryButton(){return new Button({text:AstroPayI18n.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(te){return new Badge({items:[{title:te,icon:"alert_line"}],variant:"default",align:"center"}).element}stopPolling(){this.pollingService&&(this.pollingService.stopPolling(),this.pollingService=null)}destroy(){this.pendingStatusRetrier.cancel(),this.stopPolling(),this.element.remove()}}const paymentIcons={[EPaymentCode.AP]:"astropay_payment_method",[EPaymentCode.IX]:"system_pix",[EPaymentCode.CREDIT_CARD]:"bank_card_line",[EPaymentCode.DEBIT_CARD]:"bank_card_line",[EPaymentCode.CW]:"bank_card_line",[EPaymentCode.DC]:"bank_card_line",[EPaymentCode.CC]:"bank_card_line",[EPaymentCode.QA]:"qrcode_line"},paymentAuxIcons={[EPaymentCode.CREDIT_CARD]:["payment_visa","payment_master"],[EPaymentCode.DEBIT_CARD]:["payment_visa","payment_master"],[EPaymentCode.CW]:["payment_visa","payment_master"],[EPaymentCode.DC]:["payment_visa","payment_master"],[EPaymentCode.CC]:["payment_visa","payment_master"]},callbackEvent=(ee,re)=>{switch(ee){case EPaymentCode.CREDIT_CARD:case EPaymentCode.DEBIT_CARD:case EPaymentCode.CW:case EPaymentCode.DC:case EPaymentCode.CC:AmplitudeAnalytics.astroPayPaymentCardClicked(re);break}},validatePaymentMethod=ee=>!!ee.enabled,createPaymentInstance=(ee,re)=>{const{paymentExternalId:te,amount:ne,currency:ie,country:oe,user:se,countries:ae,benefits:ce,cardConfig:ue,actionLabel:le,onSuccess:de,onError:fe,onProcessingStart:he,onProcessingEnd:pe}=re;switch(ee.code){case EPaymentCode.AP:return new AstroPayPaymentMethod({paymentExternalId:te,user:se,countries:ae,benefits:ce,paymentAmount:{amount:ne,currency:ie},actionLabel:le,onSuccess:de,onError:fe});default:return CARDS_METHOD.includes(ee.code)?new CardPaymentMethod({paymentExternalId:te,amount:ne,currency:ie,country:oe,paymentMethod:ee,showPaymentSummary:ue==null?void 0:ue.showPaymentSummary,expirationDateFormat:ue==null?void 0:ue.expirationDateFormat,onSuccess:de,onError:fe,...he&&{onProcessingStart:he},...pe&&{onProcessingEnd:pe}}):new PaymentMethod({paymentExternalId:te,paymentMethod:ee,onSuccess:de,onError:fe})}},buildMethodDescription=(ee,re)=>ee.map((te,ne)=>ne===re&&te.description?`${te.label} · ${te.description}`:te.label).join(" · "),buildCardGroupAccordionItem=(ee,re)=>{var ae;const{paymentExternalId:te}=re,ne=ee[0];let ie=null,oe=null;const se=ee.map((ce,ue)=>{let le=null;return{label:ce.label,content:()=>(le==null||le.destroy(),le=createPaymentInstance(ce,{...re,onProcessingStart:()=>{var de;ie==null||ie.lock(),(de=re.onProcessingStart)==null||de.call(re)},onProcessingEnd:()=>{var de;ie==null||ie.unlock(),(de=re.onProcessingEnd)==null||de.call(re)}}),le.element),onClose:()=>{le==null||le.destroy(),le=null},onSelect:()=>{oe==null||oe(buildMethodDescription(ee,ue)),callbackEvent(ce.code,te)}}});return{icon:ne.logo||paymentIcons[ne.code]||"bank_card_line",title:ne.label,description:buildMethodDescription(ee,0),auxImage:paymentAuxIcons[ne.code]??["payment_visa","payment_master"],tag:(ae=ne==null?void 0:ne.metadata)==null?void 0:ae.tag,content:()=>(ie=new CardTabs({tabs:se,defaultActiveTab:0,variant:"segmented"}),ie.element),onClose:()=>{ie==null||ie.destroy(),ie=null},onClickCallback:()=>callbackEvent(ne.code,te),onReady:ce=>{oe=ce}}},mountPaymentMethodItems=({paymentMethods:ee,paymentExternalId:re,...te})=>{var fe;if(!(ee!=null&&ee.length))return[];const ne=ee.filter(validatePaymentMethod),ie={paymentExternalId:re,...te},oe=ne.filter(he=>CARDS_METHOD.includes(he.code)),ae=ne.filter(he=>!CARDS_METHOD.includes(he.code)).map(he=>{var ge;let pe=null;return{icon:he.logo||paymentIcons[he.code]||"pay_line",title:he.label,description:he==null?void 0:he.description,auxImage:paymentAuxIcons[he.code],tag:(ge=he==null?void 0:he.metadata)==null?void 0:ge.tag,content:()=>(pe==null||pe.destroy(),pe=createPaymentInstance(he,ie),pe.element),onClose:()=>{pe==null||pe.destroy(),pe=null},onClickCallback:()=>callbackEvent(he.code,re)}});if(oe.length<=1){const he=[...ae];if(oe.length===1){const pe=oe[0];let ge=null;const me={icon:pe.logo||paymentIcons[pe.code]||"pay_line",title:pe.label,description:pe==null?void 0:pe.description,auxImage:paymentAuxIcons[pe.code],tag:(fe=pe==null?void 0:pe.metadata)==null?void 0:fe.tag,content:()=>(ge==null||ge.destroy(),ge=createPaymentInstance(pe,ie),ge.element),onClose:()=>{ge==null||ge.destroy(),ge=null},onClickCallback:()=>callbackEvent(pe.code,re)},ye=ne.findIndex(be=>CARDS_METHOD.includes(be.code)),ve=ne.slice(0,ye).filter(be=>!CARDS_METHOD.includes(be.code)).length;he.splice(ve,0,me)}return he}const ce=buildCardGroupAccordionItem(oe,ie),ue=ne.findIndex(he=>CARDS_METHOD.includes(he.code)),le=ne.slice(0,ue).filter(he=>!CARDS_METHOD.includes(he.code)).length,de=[...ae];return de.splice(le,0,ce),de},getAstroPayFullCheckoutStyles=ee=>css`
|
|
1504
1504
|
background-color: ${ee.backgroundColor};
|
|
1505
1505
|
|
|
1506
1506
|
display: flex;
|
|
@@ -1540,5 +1540,25 @@ Minimum version required to store current data is: `+Oe+`.
|
|
|
1540
1540
|
gap: 8px;
|
|
1541
1541
|
min-height: 250px;
|
|
1542
1542
|
}
|
|
1543
|
-
`;class AstroPayPayment extends Component{constructor(te){super({tag:"div",styles:ie=>getAstroPayPaymentStyles(ie)});Ie(this,"loadingWrapper");Ie(this,"componentProps");Ie(this,"methodCode");if(this.methodCode=ECheckoutPaymentMethod.ASTRO_PAY,te.paymentExternalId)this.componentProps=te;else{const ie=te;this.componentProps={...ie,country:ie.country.trim().toUpperCase(),currency:ie.currency.trim().toUpperCase()}}AstroPayCore.registerComponent(this),AmplitudeAnalytics.astroPayPaymentImpression("AstroPayPayment"),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const ne=new Loading({size:100,variant:"fetching",color:ThemeManager.getStyles().primaryColor}).element;this.loadingWrapper.append(ne),this.element.appendChild(this.loadingWrapper),DataDogTracker.trackEvent("ap_cl_astropay_payment_init"),this.createPayment()}async createPayment(){var te,ne;try{let ie;this.componentProps.paymentExternalId?ie=await PaymentService.getPaymentDetails(this.componentProps.paymentExternalId,"astropay_payment"):ie=await PaymentService.postCreatePayment({country:this.componentProps.country,currency:this.componentProps.currency,amount:this.componentProps.amount,user:this.componentProps.user,order:this.componentProps.order,methodCode:this.methodCode},"astropay_payment"),this.renderAstroPayMethod(ie)}catch(ie){const oe=ie;(ne=(te=this.componentProps)==null?void 0:te.onError)==null||ne.call(te);const se=new Typography({text:oe.description??oe.message,size:ThemeManager.getFontScale().xSmall,color:ThemeManager.getStyles().messages.error.textColor}).element;this.element.appendChild(se)}finally{this.loadingWrapper.remove()}}renderAstroPayMethod(te){const{paymentExternalId:ne,user:ie,countries:oe,benefits:se,metadata:ae,paymentAmount:ce}=te;this.element.innerHTML="";const ue=(ce==null?void 0:ce.amount)??this.componentProps.amount,le=(ce==null?void 0:ce.currency)??this.componentProps.currency;if(ue===void 0||le===void 0)throw new Error(AstroPayI18n.translate("generic_error"));const de={amount:ue,currency:le},fe=new AstroPayPaymentMethod({paymentExternalId:ne,user:ie,countries:oe,benefits:se,paymentAmount:de,actionLabel:ae==null?void 0:ae.actionLabel,onSuccess:he=>this.showResultScreen(he,{type:"success",onSuccess:this.componentProps.onSuccess}),onError:he=>this.showResultScreen(he,{type:"error",onError:this.componentProps.onError})}).element;this.element.append(fe)}showResultScreen(te,ne){this.element.innerHTML="";const ie=new ResultScreen({type:ne.type,contentElements:te,onSuccess:ne==null?void 0:ne.onSuccess,onError:ne==null?void 0:ne.onError});this.element.append(ie.element)}render(te){if(!te)throw new Error("Container element not found");te.appendChild(this.element)}destroy(){this.element.remove(),AstroPayCore.unregisterComponent(this)}}loadFonts();const serializedNodeIds=new WeakMap;function hasSerializedNode(ee){return serializedNodeIds.has(ee)}function nodeAndAncestorsHaveSerializedNode(ee){let re=ee;for(;re;){if(!hasSerializedNode(re)&&!isNodeShadowRoot(re))return!1;re=getParentNode(re)}return!0}function getSerializedNodeId(ee){return serializedNodeIds.get(ee)}function setSerializedNodeId(ee,re){serializedNodeIds.set(ee,re)}function getElementInputValue(ee,re){const te=ee.tagName,ne=ee.value;if(shouldMaskNode(ee,re)){const ie=ee.type;return te==="INPUT"&&(ie==="button"||ie==="submit"||ie==="reset")?ne:!ne||te==="OPTION"?void 0:CENSORED_STRING_MARK}if(te==="OPTION"||te==="SELECT")return ee.value;if(!(te!=="INPUT"&&te!=="TEXTAREA"))return ne}const URL_IN_CSS_REF=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,ABSOLUTE_URL=/^[A-Za-z]+:|^\/\//,DATA_URI=/^data:.*,/i;function switchToAbsoluteUrl(ee,re){return ee.replace(URL_IN_CSS_REF,(te,ne,ie,oe,se,ae)=>{const ce=ie||se||ae;if(!re||!ce||ABSOLUTE_URL.test(ce)||DATA_URI.test(ce))return te;const ue=ne||oe||"";return`url(${ue}${makeUrlAbsolute(ce,re)}${ue})`})}function makeUrlAbsolute(ee,re){try{return buildUrl(ee,re).href}catch{return ee}}const TAG_NAME_REGEX=/[^a-z1-6-_]/;function getValidTagName(ee){const re=ee.toLowerCase().trim();return TAG_NAME_REGEX.test(re)?"div":re}function censoredImageForSize(ee,re){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${ee}' height='${re}' style='background-color:silver'%3E%3C/svg%3E`}const RecordType={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},NodeType={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},IncrementalSource={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},MouseInteractionType={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},MediaInteractionType={Play:0,Pause:1};function serializeStyleSheets(ee){if(!(ee===void 0||ee.length===0))return ee.map(re=>{const te=re.cssRules||re.rules;return{cssRules:Array.from(te,oe=>oe.cssText),disabled:re.disabled||void 0,media:re.media.length>0?Array.from(re.media):void 0}})}function serializeAttribute(ee,re,te,ne){if(re===NodePrivacyLevel.HIDDEN)return null;const ie=ee.getAttribute(te);if(re===NodePrivacyLevel.MASK&&te!==PRIVACY_ATTR_NAME&&!STABLE_ATTRIBUTES.includes(te)&&te!==ne.actionNameAttribute){const oe=ee.tagName;switch(te){case"title":case"alt":case"placeholder":return CENSORED_STRING_MARK}if(oe==="IMG"&&(te==="src"||te==="srcset")){const se=ee;if(se.naturalWidth>0)return censoredImageForSize(se.naturalWidth,se.naturalHeight);const{width:ae,height:ce}=ee.getBoundingClientRect();return ae>0||ce>0?censoredImageForSize(ae,ce):CENSORED_IMG_MARK}if(oe==="SOURCE"&&(te==="src"||te==="srcset"))return CENSORED_IMG_MARK;if(oe==="A"&&te==="href"||ie&&te.startsWith("data-")||oe==="IFRAME"&&te==="srcdoc")return CENSORED_STRING_MARK}return!ie||typeof ie!="string"?ie:isLongDataUrl(ie)?sanitizeDataUrl(ie):ie}function serializeAttributes(ee,re,te){if(re===NodePrivacyLevel.HIDDEN)return{};const ne={},ie=getValidTagName(ee.tagName),oe=ee.ownerDocument;for(let le=0;le<ee.attributes.length;le+=1){const fe=ee.attributes.item(le).name,he=serializeAttribute(ee,re,fe,te.configuration);he!==null&&(ne[fe]=he)}if(ee.value&&(ie==="textarea"||ie==="select"||ie==="option"||ie==="input")){const le=getElementInputValue(ee,re);le!==void 0&&(ne.value=le)}if(ie==="option"&&re===NodePrivacyLevel.ALLOW){const le=ee;le.selected&&(ne.selected=le.selected)}if(ie==="link"){const le=Array.from(oe.styleSheets).find(fe=>fe.href===ee.href),de=getCssRulesString(le);de&&le&&(ne._cssText=de)}if(ie==="style"&&ee.sheet){const le=getCssRulesString(ee.sheet);le&&(ne._cssText=le)}const se=ee;if(ie==="input"&&(se.type==="radio"||se.type==="checkbox")&&(re===NodePrivacyLevel.ALLOW?ne.checked=!!se.checked:shouldMaskNode(se,re)&&delete ne.checked),ie==="audio"||ie==="video"){const le=ee;ne.rr_mediaState=le.paused?"paused":"played"}let ae,ce;const ue=te.serializationContext;switch(ue.status){case 0:ae=Math.round(ee.scrollTop),ce=Math.round(ee.scrollLeft),(ae||ce)&&ue.elementsScrollPositions.set(ee,{scrollTop:ae,scrollLeft:ce});break;case 1:ue.elementsScrollPositions.has(ee)&&({scrollTop:ae,scrollLeft:ce}=ue.elementsScrollPositions.get(ee));break}return ce&&(ne.rr_scrollLeft=ce),ae&&(ne.rr_scrollTop=ae),ne}function getCssRulesString(ee){if(!ee)return null;let re;try{re=ee.rules||ee.cssRules}catch{}if(!re)return null;const te=Array.from(re,isSafari()?getCssRuleStringForSafari:getCssRuleString).join("");return switchToAbsoluteUrl(te,ee.href)}function getCssRuleStringForSafari(ee){if(isCSSStyleRule(ee)&&ee.selectorText.includes(":")){const re=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return ee.cssText.replace(re,"$1\\$2")}return getCssRuleString(ee)}function getCssRuleString(ee){return isCSSImportRule(ee)&&getCssRulesString(ee.styleSheet)||ee.cssText}function isCSSImportRule(ee){return"styleSheet"in ee}function isCSSStyleRule(ee){return"selectorText"in ee}function serializeNodeWithId(ee,re){const te=serializeNode(ee,re);if(!te)return null;const ne=getSerializedNodeId(ee)||generateNextId(),ie=te;return ie.id=ne,setSerializedNodeId(ee,ne),re.serializedNodeIds&&re.serializedNodeIds.add(ne),ie}let _nextId=1;function generateNextId(){return _nextId++}function serializeChildNodes(ee,re){const te=[];return forEachChildNodes(ee,ne=>{const ie=serializeNodeWithId(ne,re);ie&&te.push(ie)}),te}function serializeNode(ee,re){switch(ee.nodeType){case ee.DOCUMENT_NODE:return serializeDocumentNode(ee,re);case ee.DOCUMENT_FRAGMENT_NODE:return serializeDocumentFragmentNode(ee,re);case ee.DOCUMENT_TYPE_NODE:return serializeDocumentTypeNode(ee);case ee.ELEMENT_NODE:return serializeElementNode(ee,re);case ee.TEXT_NODE:return serializeTextNode(ee,re);case ee.CDATA_SECTION_NODE:return serializeCDataNode()}}function serializeDocumentNode(ee,re){return{type:NodeType.Document,childNodes:serializeChildNodes(ee,re),adoptedStyleSheets:serializeStyleSheets(ee.adoptedStyleSheets)}}function serializeDocumentFragmentNode(ee,re){const te=isNodeShadowRoot(ee);return te&&re.serializationContext.shadowRootsController.addShadowRoot(ee),{type:NodeType.DocumentFragment,childNodes:serializeChildNodes(ee,re),isShadowRoot:te,adoptedStyleSheets:te?serializeStyleSheets(ee.adoptedStyleSheets):void 0}}function serializeDocumentTypeNode(ee){return{type:NodeType.DocumentType,name:ee.name,publicId:ee.publicId,systemId:ee.systemId}}function serializeElementNode(ee,re){const te=getValidTagName(ee.tagName),ne=isSVGElement(ee)||void 0,ie=reducePrivacyLevel(getNodeSelfPrivacyLevel(ee),re.parentNodePrivacyLevel);if(ie===NodePrivacyLevel.HIDDEN){const{width:ae,height:ce}=ee.getBoundingClientRect();return{type:NodeType.Element,tagName:te,attributes:{rr_width:`${ae}px`,rr_height:`${ce}px`,[PRIVACY_ATTR_NAME]:PRIVACY_ATTR_VALUE_HIDDEN},childNodes:[],isSVG:ne}}if(ie===NodePrivacyLevel.IGNORE)return;const oe=serializeAttributes(ee,ie,re);let se=[];if(hasChildNodes(ee)&&te!=="style"){let ae;re.parentNodePrivacyLevel===ie&&re.ignoreWhiteSpace===(te==="head")?ae=re:ae={...re,parentNodePrivacyLevel:ie,ignoreWhiteSpace:te==="head"},se=serializeChildNodes(ee,ae)}return{type:NodeType.Element,tagName:te,attributes:oe,childNodes:se,isSVG:ne}}function isSVGElement(ee){return ee.tagName==="svg"||ee instanceof SVGElement}function serializeTextNode(ee,re){const te=getTextContent(ee,re.ignoreWhiteSpace||!1,re.parentNodePrivacyLevel);if(te!==void 0)return{type:NodeType.Text,textContent:te}}function serializeCDataNode(){return{type:NodeType.CDATA,textContent:""}}function serializeDocument(ee,re,te){return serializeNodeWithId(ee,{serializationContext:te,parentNodePrivacyLevel:re.defaultPrivacyLevel,configuration:re})}function isTouchEvent(ee){return!!ee.changedTouches}function getEventTarget(ee){return ee.composed===!0&&isNodeShadowHost(ee.target)?ee.composedPath()[0]:ee.target}const TOLERANCE=25;function isVisualViewportFactoredIn(ee){return Math.abs(ee.pageTop-ee.offsetTop-window.scrollY)>TOLERANCE||Math.abs(ee.pageLeft-ee.offsetLeft-window.scrollX)>TOLERANCE}const convertMouseEventToLayoutCoordinates=(ee,re)=>{const te=window.visualViewport,ne={layoutViewportX:ee,layoutViewportY:re,visualViewportX:ee,visualViewportY:re};if(te)isVisualViewportFactoredIn(te)?(ne.layoutViewportX=Math.round(ee+te.offsetLeft),ne.layoutViewportY=Math.round(re+te.offsetTop)):(ne.visualViewportX=Math.round(ee-te.offsetLeft),ne.visualViewportY=Math.round(re-te.offsetTop));else return ne;return ne},getVisualViewport=ee=>({scale:ee.scale,offsetLeft:ee.offsetLeft,offsetTop:ee.offsetTop,pageLeft:ee.pageLeft,pageTop:ee.pageTop,height:ee.height,width:ee.width});function assembleIncrementalSnapshot(ee,re){return{data:{source:ee,...re},type:RecordType.IncrementalSnapshot,timestamp:timeStampNow()}}const MOUSE_MOVE_OBSERVER_THRESHOLD=50;function trackMove(ee,re){const{throttled:te,cancel:ne}=throttle$2(oe=>{const se=getEventTarget(oe);if(hasSerializedNode(se)){const ae=tryToComputeCoordinates(oe);if(!ae)return;const ce={id:getSerializedNodeId(se),timeOffset:0,x:ae.x,y:ae.y};re(assembleIncrementalSnapshot(isTouchEvent(oe)?IncrementalSource.TouchMove:IncrementalSource.MouseMove,{positions:[ce]}))}},MOUSE_MOVE_OBSERVER_THRESHOLD,{trailing:!1}),{stop:ie}=addEventListeners(ee,document,["mousemove","touchmove"],te,{capture:!0,passive:!0});return{stop:()=>{ie(),ne()}}}function tryToComputeCoordinates(ee){let{clientX:re,clientY:te}=isTouchEvent(ee)?ee.changedTouches[0]:ee;if(window.visualViewport){const{visualViewportX:ne,visualViewportY:ie}=convertMouseEventToLayoutCoordinates(re,te);re=ne,te=ie}if(!Number.isFinite(re)||!Number.isFinite(te)){ee.isTrusted&&addTelemetryDebug("mouse/touch event without x/y");return}return{x:re,y:te}}const eventTypeToMouseInteraction={pointerup:MouseInteractionType.MouseUp,mousedown:MouseInteractionType.MouseDown,click:MouseInteractionType.Click,contextmenu:MouseInteractionType.ContextMenu,dblclick:MouseInteractionType.DblClick,focus:MouseInteractionType.Focus,blur:MouseInteractionType.Blur,touchstart:MouseInteractionType.TouchStart,touchend:MouseInteractionType.TouchEnd};function trackMouseInteraction(ee,re,te){const ne=ie=>{const oe=getEventTarget(ie);if(getNodePrivacyLevel(oe,ee.defaultPrivacyLevel)===NodePrivacyLevel.HIDDEN||!hasSerializedNode(oe))return;const se=getSerializedNodeId(oe),ae=eventTypeToMouseInteraction[ie.type];let ce;if(ae!==MouseInteractionType.Blur&&ae!==MouseInteractionType.Focus){const le=tryToComputeCoordinates(ie);if(!le)return;ce={id:se,type:ae,x:le.x,y:le.y}}else ce={id:se,type:ae};const ue={id:te.getIdForEvent(ie),...assembleIncrementalSnapshot(IncrementalSource.MouseInteraction,ce)};re(ue)};return addEventListeners(ee,document,Object.keys(eventTypeToMouseInteraction),ne,{capture:!0,passive:!0})}const SCROLL_OBSERVER_THRESHOLD=100;function trackScroll(ee,re,te,ne=document){const{throttled:ie,cancel:oe}=throttle$2(ae=>{const ce=getEventTarget(ae);if(!ce||getNodePrivacyLevel(ce,ee.defaultPrivacyLevel)===NodePrivacyLevel.HIDDEN||!hasSerializedNode(ce))return;const ue=getSerializedNodeId(ce),le=ce===document?{scrollTop:getScrollY(),scrollLeft:getScrollX()}:{scrollTop:Math.round(ce.scrollTop),scrollLeft:Math.round(ce.scrollLeft)};te.set(ce,le),re(assembleIncrementalSnapshot(IncrementalSource.Scroll,{id:ue,x:le.scrollLeft,y:le.scrollTop}))},SCROLL_OBSERVER_THRESHOLD),{stop:se}=addEventListener$1(ee,ne,"scroll",ie,{capture:!0,passive:!0});return{stop:()=>{se(),oe()}}}const VISUAL_VIEWPORT_OBSERVER_THRESHOLD=200;function trackViewportResize(ee,re){const te=initViewportObservable(ee).subscribe(ne=>{re(assembleIncrementalSnapshot(IncrementalSource.ViewportResize,ne))});return{stop:()=>{te.unsubscribe()}}}function trackVisualViewportResize(ee,re){const te=window.visualViewport;if(!te)return{stop:noop$2};const{throttled:ne,cancel:ie}=throttle$2(()=>{re({data:getVisualViewport(te),type:RecordType.VisualViewport,timestamp:timeStampNow()})},VISUAL_VIEWPORT_OBSERVER_THRESHOLD,{trailing:!1}),{stop:oe}=addEventListeners(ee,te,["resize","scroll"],ne,{capture:!0,passive:!0});return{stop:()=>{oe(),ie()}}}function trackMediaInteraction(ee,re){return addEventListeners(ee,document,["play","pause"],te=>{const ne=getEventTarget(te);!ne||getNodePrivacyLevel(ne,ee.defaultPrivacyLevel)===NodePrivacyLevel.HIDDEN||!hasSerializedNode(ne)||re(assembleIncrementalSnapshot(IncrementalSource.MediaInteraction,{id:getSerializedNodeId(ne),type:te.type==="play"?MediaInteractionType.Play:MediaInteractionType.Pause}))},{capture:!0,passive:!0})}function trackStyleSheet(ee){function re(ie,oe){ie&&hasSerializedNode(ie.ownerNode)&&oe(getSerializedNodeId(ie.ownerNode))}const te=[instrumentMethod(CSSStyleSheet.prototype,"insertRule",({target:ie,parameters:[oe,se]})=>{re(ie,ae=>ee(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule,{id:ae,adds:[{rule:oe,index:se}]})))}),instrumentMethod(CSSStyleSheet.prototype,"deleteRule",({target:ie,parameters:[oe]})=>{re(ie,se=>ee(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule,{id:se,removes:[{index:oe}]})))})];typeof CSSGroupingRule<"u"?ne(CSSGroupingRule):(ne(CSSMediaRule),ne(CSSSupportsRule));function ne(ie){te.push(instrumentMethod(ie.prototype,"insertRule",({target:oe,parameters:[se,ae]})=>{re(oe.parentStyleSheet,ce=>{const ue=getPathToNestedCSSRule(oe);ue&&(ue.push(ae||0),ee(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule,{id:ce,adds:[{rule:se,index:ue}]})))})}),instrumentMethod(ie.prototype,"deleteRule",({target:oe,parameters:[se]})=>{re(oe.parentStyleSheet,ae=>{const ce=getPathToNestedCSSRule(oe);ce&&(ce.push(se),ee(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule,{id:ae,removes:[{index:ce}]})))})}))}return{stop:()=>{te.forEach(ie=>ie.stop())}}}function getPathToNestedCSSRule(ee){const re=[];let te=ee;for(;te.parentRule;){const se=Array.from(te.parentRule.cssRules).indexOf(te);re.unshift(se),te=te.parentRule}if(!te.parentStyleSheet)return;const ie=Array.from(te.parentStyleSheet.cssRules).indexOf(te);return re.unshift(ie),re}function trackFocus(ee,re){return addEventListeners(ee,window,["focus","blur"],()=>{re({data:{has_focus:document.hasFocus()},type:RecordType.Focus,timestamp:timeStampNow()})})}function trackFrustration(ee,re,te){const ne=ee.subscribe(12,ie=>{var oe,se;ie.rawRumEvent.type==="action"&&ie.rawRumEvent.action.type==="click"&&(!((se=(oe=ie.rawRumEvent.action.frustration)===null||oe===void 0?void 0:oe.type)===null||se===void 0)&&se.length)&&"events"in ie.domainContext&&ie.domainContext.events&&ie.domainContext.events.length&&re({timestamp:ie.rawRumEvent.date,type:RecordType.FrustrationRecord,data:{frustrationTypes:ie.rawRumEvent.action.frustration.type,recordIds:ie.domainContext.events.map(ae=>te.getIdForEvent(ae))}})});return{stop:()=>{ne.unsubscribe()}}}function trackViewEnd(ee,re){const te=ee.subscribe(5,()=>{re({timestamp:timeStampNow(),type:RecordType.ViewEnd})});return{stop:()=>{te.unsubscribe()}}}function trackInput(ee,re,te=document){const ne=ee.defaultPrivacyLevel,ie=new WeakMap,oe=te!==document,{stop:se}=addEventListeners(ee,te,oe?["change"]:["input","change"],le=>{const de=getEventTarget(le);(de instanceof HTMLInputElement||de instanceof HTMLTextAreaElement||de instanceof HTMLSelectElement)&&ce(de)},{capture:!0,passive:!0});let ae;if(oe)ae=noop$2;else{const le=[instrumentSetter(HTMLInputElement.prototype,"value",ce),instrumentSetter(HTMLInputElement.prototype,"checked",ce),instrumentSetter(HTMLSelectElement.prototype,"value",ce),instrumentSetter(HTMLTextAreaElement.prototype,"value",ce),instrumentSetter(HTMLSelectElement.prototype,"selectedIndex",ce)];ae=()=>{le.forEach(de=>de.stop())}}return{stop:()=>{ae(),se()}};function ce(le){const de=getNodePrivacyLevel(le,ne);if(de===NodePrivacyLevel.HIDDEN)return;const fe=le.type;let he;if(fe==="radio"||fe==="checkbox"){if(shouldMaskNode(le,de))return;he={isChecked:le.checked}}else{const ge=getElementInputValue(le,de);if(ge===void 0)return;he={text:ge}}ue(le,he);const pe=le.name;fe==="radio"&&pe&&le.checked&&document.querySelectorAll(`input[type="radio"][name="${CSS.escape(pe)}"]`).forEach(ge=>{ge!==le&&ue(ge,{isChecked:!1})})}function ue(le,de){if(!hasSerializedNode(le))return;const fe=ie.get(le);(!fe||fe.text!==de.text||fe.isChecked!==de.isChecked)&&(ie.set(le,de),re(assembleIncrementalSnapshot(IncrementalSource.Input,{id:getSerializedNodeId(le),...de})))}}const MUTATION_PROCESS_MAX_DELAY=100,MUTATION_PROCESS_MIN_DELAY=16;function createMutationBatch(ee){let re=noop$2,te=[];function ne(){re(),ee(te),te=[]}const{throttled:ie,cancel:oe}=throttle$2(ne,MUTATION_PROCESS_MIN_DELAY,{leading:!1});return{addMutations:se=>{te.length===0&&(re=requestIdleCallback(ie,{timeout:MUTATION_PROCESS_MAX_DELAY})),te.push(...se)},flush:ne,stop:()=>{re(),oe()}}}function trackMutation(ee,re,te,ne){const ie=getMutationObserverConstructor();if(!ie)return{stop:noop$2,flush:noop$2};const oe=createMutationBatch(ae=>{processMutations(ae.concat(se.takeRecords()),ee,re,te)}),se=new ie(monitor(oe.addMutations));return se.observe(ne,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{se.disconnect(),oe.stop()},flush:()=>{oe.flush()}}}function processMutations(ee,re,te,ne){const ie=new Map;ee.filter(de=>de.type==="childList").forEach(de=>{de.removedNodes.forEach(fe=>{traverseRemovedShadowDom(fe,ne.removeShadowRoot)})});const oe=ee.filter(de=>de.target.isConnected&&nodeAndAncestorsHaveSerializedNode(de.target)&&getNodePrivacyLevel(de.target,te.defaultPrivacyLevel,ie)!==NodePrivacyLevel.HIDDEN),{adds:se,removes:ae,hasBeenSerialized:ce}=processChildListMutations(oe.filter(de=>de.type==="childList"),te,ne,ie),ue=processCharacterDataMutations(oe.filter(de=>de.type==="characterData"&&!ce(de.target)),te,ie),le=processAttributesMutations(oe.filter(de=>de.type==="attributes"&&!ce(de.target)),te,ie);!ue.length&&!le.length&&!ae.length&&!se.length||re(assembleIncrementalSnapshot(IncrementalSource.Mutation,{adds:se,removes:ae,texts:ue,attributes:le}))}function processChildListMutations(ee,re,te,ne){const ie=new Set,oe=new Map;for(const fe of ee)fe.addedNodes.forEach(he=>{ie.add(he)}),fe.removedNodes.forEach(he=>{ie.has(he)||oe.set(he,fe.target),ie.delete(he)});const se=Array.from(ie);sortAddedAndMovedNodes(se);const ae=new Set,ce=[];for(const fe of se){if(le(fe))continue;const he=getNodePrivacyLevel(fe.parentNode,re.defaultPrivacyLevel,ne);if(he===NodePrivacyLevel.HIDDEN||he===NodePrivacyLevel.IGNORE)continue;const pe=serializeNodeWithId(fe,{serializedNodeIds:ae,parentNodePrivacyLevel:he,serializationContext:{status:2,shadowRootsController:te},configuration:re});if(!pe)continue;const ge=getParentNode(fe);ce.push({nextId:de(fe),parentId:getSerializedNodeId(ge),node:pe})}const ue=[];return oe.forEach((fe,he)=>{hasSerializedNode(he)&&ue.push({parentId:getSerializedNodeId(fe),id:getSerializedNodeId(he)})}),{adds:ce,removes:ue,hasBeenSerialized:le};function le(fe){return hasSerializedNode(fe)&&ae.has(getSerializedNodeId(fe))}function de(fe){let he=fe.nextSibling;for(;he;){if(hasSerializedNode(he))return getSerializedNodeId(he);he=he.nextSibling}return null}}function processCharacterDataMutations(ee,re,te){var ne;const ie=[],oe=new Set,se=ee.filter(ae=>oe.has(ae.target)?!1:(oe.add(ae.target),!0));for(const ae of se){if(ae.target.textContent===ae.oldValue)continue;const ue=getNodePrivacyLevel(getParentNode(ae.target),re.defaultPrivacyLevel,te);ue===NodePrivacyLevel.HIDDEN||ue===NodePrivacyLevel.IGNORE||ie.push({id:getSerializedNodeId(ae.target),value:(ne=getTextContent(ae.target,!1,ue))!==null&&ne!==void 0?ne:null})}return ie}function processAttributesMutations(ee,re,te){const ne=[],ie=new Map,oe=ee.filter(ae=>{const ce=ie.get(ae.target);return ce&&ce.has(ae.attributeName)?!1:(ce?ce.add(ae.attributeName):ie.set(ae.target,new Set([ae.attributeName])),!0)}),se=new Map;for(const ae of oe){if(ae.target.getAttribute(ae.attributeName)===ae.oldValue)continue;const ue=getNodePrivacyLevel(ae.target,re.defaultPrivacyLevel,te),le=serializeAttribute(ae.target,ue,ae.attributeName,re);let de;if(ae.attributeName==="value"){const he=getElementInputValue(ae.target,ue);if(he===void 0)continue;de=he}else typeof le=="string"?de=le:de=null;let fe=se.get(ae.target);fe||(fe={id:getSerializedNodeId(ae.target),attributes:{}},ne.push(fe),se.set(ae.target,fe)),fe.attributes[ae.attributeName]=de}return ne}function sortAddedAndMovedNodes(ee){ee.sort((re,te)=>{const ne=re.compareDocumentPosition(te);return ne&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:ne&Node.DOCUMENT_POSITION_CONTAINS||ne&Node.DOCUMENT_POSITION_FOLLOWING?1:ne&Node.DOCUMENT_POSITION_PRECEDING?-1:0})}function traverseRemovedShadowDom(ee,re){isNodeShadowHost(ee)&&re(ee.shadowRoot),forEachChildNodes(ee,te=>traverseRemovedShadowDom(te,re))}function createElementsScrollPositions(){const ee=new WeakMap;return{set(re,te){re===document&&!document.scrollingElement||ee.set(re===document?document.scrollingElement:re,te)},get(re){return ee.get(re)},has(re){return ee.has(re)}}}const initShadowRootsController=(ee,re,te)=>{const ne=new Map,ie={addShadowRoot:oe=>{if(ne.has(oe))return;const se=trackMutation(re,ee,ie,oe),ae=trackInput(ee,re,oe),ce=trackScroll(ee,re,te,oe);ne.set(oe,{flush:()=>se.flush(),stop:()=>{se.stop(),ae.stop(),ce.stop()}})},removeShadowRoot:oe=>{const se=ne.get(oe);se&&(se.stop(),ne.delete(oe))},stop:()=>{ne.forEach(({stop:oe})=>oe())},flush:()=>{ne.forEach(({flush:oe})=>oe())}};return ie};function startFullSnapshots(ee,re,te,ne,ie,oe){const se=(ce=timeStampNow(),ue={status:0,elementsScrollPositions:ee,shadowRootsController:re})=>{const{width:le,height:de}=getViewportDimension(),fe=[{data:{height:de,href:window.location.href,width:le},type:RecordType.Meta,timestamp:ce},{data:{has_focus:document.hasFocus()},type:RecordType.Focus,timestamp:ce},{data:{node:serializeDocument(document,ne,ue),initialOffset:{left:getScrollX(),top:getScrollY()}},type:RecordType.FullSnapshot,timestamp:ce}];return window.visualViewport&&fe.push({data:getVisualViewport(window.visualViewport),type:RecordType.VisualViewport,timestamp:ce}),fe};oe(se());const{unsubscribe:ae}=te.subscribe(2,ce=>{ie(),oe(se(ce.startClocks.timeStamp,{shadowRootsController:re,status:1,elementsScrollPositions:ee}))});return{stop:ae}}function initRecordIds(){const ee=new WeakMap;let re=1;return{getIdForEvent(te){return ee.has(te)||ee.set(te,re++),ee.get(te)}}}function record(ee){const{emit:re,configuration:te,lifeCycle:ne}=ee;if(!re)throw new Error("emit function is required");const ie=fe=>{re(fe),sendToExtension("record",{record:fe});const he=ee.viewHistory.findView();addRecord(he.id)},oe=createElementsScrollPositions(),se=initShadowRootsController(te,ie,oe),{stop:ae}=startFullSnapshots(oe,se,ne,te,ce,fe=>fe.forEach(he=>ie(he)));function ce(){se.flush(),le.flush()}const ue=initRecordIds(),le=trackMutation(ie,te,se,document),de=[le,trackMove(te,ie),trackMouseInteraction(te,ie,ue),trackScroll(te,ie,oe,document),trackViewportResize(te,ie),trackInput(te,ie),trackMediaInteraction(te,ie),trackStyleSheet(ie),trackFocus(te,ie),trackVisualViewportResize(te,ie),trackFrustration(ne,ie,ue),trackViewEnd(ne,fe=>{ce(),ie(fe)})];return{stop:()=>{se.stop(),de.forEach(fe=>fe.stop()),ae()},flushMutations:ce,shadowRootsController:se}}function buildReplayPayload(ee,re,te){const ne=new FormData;ne.append("segment",new Blob([ee],{type:"application/octet-stream"}),`${re.session.id}-${re.start}`);const ie={raw_segment_size:te,compressed_segment_size:ee.byteLength,...re},oe=JSON.stringify(ie);return ne.append("event",new Blob([oe],{type:"application/json"})),{data:ne,bytesCount:ee.byteLength}}function createSegment({context:ee,creationReason:re,encoder:te}){let ne=0;const ie=ee.view.id,oe={start:1/0,end:-1/0,creation_reason:re,records_count:0,has_full_snapshot:!1,index_in_view:getSegmentsCount(ie),source:"browser",...ee};addSegment(ie);function se(ce,ue){oe.start=Math.min(oe.start,ce.timestamp),oe.end=Math.max(oe.end,ce.timestamp),oe.records_count+=1,oe.has_full_snapshot||(oe.has_full_snapshot=ce.type===RecordType.FullSnapshot);const le=te.isEmpty?'{"records":[':",";te.write(le+JSON.stringify(ce),de=>{ne+=de,ue(ne)})}function ae(ce){if(te.isEmpty)throw new Error("Empty segment flushed");te.write(`],${JSON.stringify(oe).slice(1)}
|
|
1544
|
-
|
|
1543
|
+
`;class AstroPayPayment extends Component{constructor(te){super({tag:"div",styles:ie=>getAstroPayPaymentStyles(ie)});Ie(this,"loadingWrapper");Ie(this,"componentProps");Ie(this,"methodCode");if(this.methodCode=ECheckoutPaymentMethod.ASTRO_PAY,te.paymentExternalId)this.componentProps=te;else{const ie=te;this.componentProps={...ie,country:ie.country.trim().toUpperCase(),currency:ie.currency.trim().toUpperCase()}}AstroPayCore.registerComponent(this),AmplitudeAnalytics.astroPayPaymentImpression("AstroPayPayment"),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const ne=new Loading({size:100,variant:"fetching",color:ThemeManager.getStyles().primaryColor}).element;this.loadingWrapper.append(ne),this.element.appendChild(this.loadingWrapper),DataDogTracker.trackEvent("ap_cl_astropay_payment_init"),this.createPayment()}async createPayment(){var te,ne;try{let ie;this.componentProps.paymentExternalId?ie=await PaymentService.getPaymentDetails(this.componentProps.paymentExternalId,"astropay_payment"):ie=await PaymentService.postCreatePayment({country:this.componentProps.country,currency:this.componentProps.currency,amount:this.componentProps.amount,user:this.componentProps.user,order:this.componentProps.order,methodCode:this.methodCode},"astropay_payment"),this.renderAstroPayMethod(ie)}catch(ie){const oe=ie;(ne=(te=this.componentProps)==null?void 0:te.onError)==null||ne.call(te);const se=new Typography({text:oe.description??oe.message,size:ThemeManager.getFontScale().xSmall,color:ThemeManager.getStyles().messages.error.textColor}).element;this.element.appendChild(se)}finally{this.loadingWrapper.remove()}}renderAstroPayMethod(te){const{paymentExternalId:ne,user:ie,countries:oe,benefits:se,metadata:ae,paymentAmount:ce}=te;this.element.innerHTML="";const ue=(ce==null?void 0:ce.amount)??this.componentProps.amount,le=(ce==null?void 0:ce.currency)??this.componentProps.currency;if(ue===void 0||le===void 0)throw new Error(AstroPayI18n.translate("generic_error"));const de={amount:ue,currency:le},fe=new AstroPayPaymentMethod({paymentExternalId:ne,user:ie,countries:oe,benefits:se,paymentAmount:de,actionLabel:ae==null?void 0:ae.actionLabel,onSuccess:he=>this.showResultScreen(he,{type:"success",onSuccess:this.componentProps.onSuccess}),onError:he=>this.showResultScreen(he,{type:"error",onError:this.componentProps.onError})}).element;this.element.append(fe)}showResultScreen(te,ne){this.element.innerHTML="";const ie=new ResultScreen({type:ne.type,contentElements:te,onSuccess:ne==null?void 0:ne.onSuccess,onError:ne==null?void 0:ne.onError});this.element.append(ie.element)}render(te){if(!te)throw new Error("Container element not found");te.appendChild(this.element)}destroy(){this.element.remove(),AstroPayCore.unregisterComponent(this)}}const EXCLUDED_METHOD_CODES=[...CARDS_METHOD,EPaymentCode.AP],isSupportedSinglePaymentMethodCode=ee=>typeof ee=="string"&&ee.trim()!==""&&!EXCLUDED_METHOD_CODES.some(re=>re===ee),findRequestedPaymentMethod=(ee,re)=>ee==null?void 0:ee.find(te=>te.code===re&&te.enabled),getAstroPaySinglePaymentMethodStyles=ee=>css`
|
|
1544
|
+
background-color: ${ee.backgroundColor};
|
|
1545
|
+
|
|
1546
|
+
display: flex;
|
|
1547
|
+
flex-direction: column;
|
|
1548
|
+
gap: 12px;
|
|
1549
|
+
|
|
1550
|
+
max-width: ${typeof ee.width=="number"?`${ee.width}px`:ee.width};
|
|
1551
|
+
padding: ${typeof ee.paddingWrapper=="number"?`${ee.paddingWrapper}px`:ee.paddingWrapper};
|
|
1552
|
+
border-radius: ${typeof ee.borderRadiusWrapper=="number"?`${ee.borderRadiusWrapper}px`:ee.borderRadiusWrapper};
|
|
1553
|
+
|
|
1554
|
+
.ap-single-payment-method-loading {
|
|
1555
|
+
display: flex;
|
|
1556
|
+
flex-direction: column;
|
|
1557
|
+
justify-content: center;
|
|
1558
|
+
align-items: center;
|
|
1559
|
+
width: 100%;
|
|
1560
|
+
gap: 8px;
|
|
1561
|
+
min-height: 250px;
|
|
1562
|
+
}
|
|
1563
|
+
`,INITIALIZER="single_payment_method";class AstroPaySinglePaymentMethod extends Component{constructor(te){super({tag:"div",styles:ae=>getAstroPaySinglePaymentMethodStyles(ae)});Ie(this,"componentProps");Ie(this,"loadingWrapper",null);Ie(this,"paymentMethod",null);Ie(this,"isDestroyed",!1);const ne=te.showTitle??!0,ie=te.paymentMethodCode,oe=typeof ie=="string"?ie.trim().toUpperCase():ie;if(this.componentProps=te.paymentExternalId!==void 0?{...te,showTitle:ne,paymentMethodCode:oe}:{...te,showTitle:ne,paymentMethodCode:oe,country:te.country.trim().toUpperCase(),currency:te.currency.trim().toUpperCase()},AstroPayCore.registerComponent(this),AmplitudeAnalytics.astroPayPaymentImpression("AstroPaySinglePaymentMethod"),DataDogTracker.trackEvent("ap_cl_astropay_single_payment_method_init"),!isSupportedSinglePaymentMethodCode(this.componentProps.paymentMethodCode)){this.showErrorMessage(AstroPayI18n.translate("payment_method_unavailable")),queueMicrotask(()=>{var ae,ce;this.isDestroyed||(ce=(ae=this.componentProps).onError)==null||ce.call(ae)});return}this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("ap-single-payment-method-loading");const se=new Loading({size:100,variant:"fetching",color:ThemeManager.getStyles().primaryColor}).element;this.loadingWrapper.append(se),this.element.appendChild(this.loadingWrapper),this.createPayment()}async createPayment(){var ne,ie;const te=this.componentProps;try{let oe;if(te.paymentExternalId!==void 0?oe=await PaymentService.getPaymentDetails(te.paymentExternalId,INITIALIZER):oe=await PaymentService.postCreatePayment({country:te.country,currency:te.currency,amount:te.amount,order:te.order,methodCode:te.paymentMethodCode},INITIALIZER),this.isDestroyed)return;this.renderPaymentMethod(oe)}catch(oe){if(this.isDestroyed)return;const se=oe;(ne=te.onError)==null||ne.call(te),this.showErrorMessage(se.description??se.message)}finally{(ie=this.loadingWrapper)==null||ie.remove()}}renderPaymentMethod(te){var ie,oe;const ne=findRequestedPaymentMethod(te.paymentMethods,this.componentProps.paymentMethodCode);if(ne===void 0){(oe=(ie=this.componentProps).onError)==null||oe.call(ie),this.showErrorMessage(AstroPayI18n.translate("payment_method_unavailable"));return}if(this.element.innerHTML="",this.componentProps.showTitle===!0&&ne.label.trim()!==""){const se=new Typography({text:ne.label,variant:"div",size:ThemeManager.getFontScale().small,weight:600}).element;se.classList.add("ap-single-payment-method-title"),this.element.append(se)}this.paymentMethod=new PaymentMethod({paymentExternalId:te.paymentExternalId,paymentMethod:ne,onSuccess:se=>this.showResultScreen(se,{type:"success",onSuccess:this.componentProps.onSuccess}),onError:se=>this.showResultScreen(se,{type:"error",onError:this.componentProps.onError})}),this.element.append(this.paymentMethod.element)}showErrorMessage(te){this.element.innerHTML="";const ne=new Typography({text:te,size:ThemeManager.getFontScale().xSmall,color:ThemeManager.getStyles().messages.error.textColor}).element;this.element.append(ne)}showResultScreen(te,ne){var oe;(oe=this.paymentMethod)==null||oe.destroy(),this.paymentMethod=null,this.element.innerHTML="";const ie=new ResultScreen({type:ne.type,contentElements:te,onSuccess:ne.onSuccess,onError:ne.onError});this.element.append(ie.element)}render(te){if(!te)throw new Error("Container element not found");te.appendChild(this.element)}destroy(){var te;this.isDestroyed=!0,(te=this.paymentMethod)==null||te.destroy(),this.paymentMethod=null,this.element.remove(),AstroPayCore.unregisterComponent(this)}}loadFonts();const serializedNodeIds=new WeakMap;function hasSerializedNode(ee){return serializedNodeIds.has(ee)}function nodeAndAncestorsHaveSerializedNode(ee){let re=ee;for(;re;){if(!hasSerializedNode(re)&&!isNodeShadowRoot(re))return!1;re=getParentNode(re)}return!0}function getSerializedNodeId(ee){return serializedNodeIds.get(ee)}function setSerializedNodeId(ee,re){serializedNodeIds.set(ee,re)}function getElementInputValue(ee,re){const te=ee.tagName,ne=ee.value;if(shouldMaskNode(ee,re)){const ie=ee.type;return te==="INPUT"&&(ie==="button"||ie==="submit"||ie==="reset")?ne:!ne||te==="OPTION"?void 0:CENSORED_STRING_MARK}if(te==="OPTION"||te==="SELECT")return ee.value;if(!(te!=="INPUT"&&te!=="TEXTAREA"))return ne}const URL_IN_CSS_REF=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,ABSOLUTE_URL=/^[A-Za-z]+:|^\/\//,DATA_URI=/^data:.*,/i;function switchToAbsoluteUrl(ee,re){return ee.replace(URL_IN_CSS_REF,(te,ne,ie,oe,se,ae)=>{const ce=ie||se||ae;if(!re||!ce||ABSOLUTE_URL.test(ce)||DATA_URI.test(ce))return te;const ue=ne||oe||"";return`url(${ue}${makeUrlAbsolute(ce,re)}${ue})`})}function makeUrlAbsolute(ee,re){try{return buildUrl(ee,re).href}catch{return ee}}const TAG_NAME_REGEX=/[^a-z1-6-_]/;function getValidTagName(ee){const re=ee.toLowerCase().trim();return TAG_NAME_REGEX.test(re)?"div":re}function censoredImageForSize(ee,re){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${ee}' height='${re}' style='background-color:silver'%3E%3C/svg%3E`}const RecordType={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},NodeType={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},IncrementalSource={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},MouseInteractionType={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},MediaInteractionType={Play:0,Pause:1};function serializeStyleSheets(ee){if(!(ee===void 0||ee.length===0))return ee.map(re=>{const te=re.cssRules||re.rules;return{cssRules:Array.from(te,oe=>oe.cssText),disabled:re.disabled||void 0,media:re.media.length>0?Array.from(re.media):void 0}})}function serializeAttribute(ee,re,te,ne){if(re===NodePrivacyLevel.HIDDEN)return null;const ie=ee.getAttribute(te);if(re===NodePrivacyLevel.MASK&&te!==PRIVACY_ATTR_NAME&&!STABLE_ATTRIBUTES.includes(te)&&te!==ne.actionNameAttribute){const oe=ee.tagName;switch(te){case"title":case"alt":case"placeholder":return CENSORED_STRING_MARK}if(oe==="IMG"&&(te==="src"||te==="srcset")){const se=ee;if(se.naturalWidth>0)return censoredImageForSize(se.naturalWidth,se.naturalHeight);const{width:ae,height:ce}=ee.getBoundingClientRect();return ae>0||ce>0?censoredImageForSize(ae,ce):CENSORED_IMG_MARK}if(oe==="SOURCE"&&(te==="src"||te==="srcset"))return CENSORED_IMG_MARK;if(oe==="A"&&te==="href"||ie&&te.startsWith("data-")||oe==="IFRAME"&&te==="srcdoc")return CENSORED_STRING_MARK}return!ie||typeof ie!="string"?ie:isLongDataUrl(ie)?sanitizeDataUrl(ie):ie}function serializeAttributes(ee,re,te){if(re===NodePrivacyLevel.HIDDEN)return{};const ne={},ie=getValidTagName(ee.tagName),oe=ee.ownerDocument;for(let le=0;le<ee.attributes.length;le+=1){const fe=ee.attributes.item(le).name,he=serializeAttribute(ee,re,fe,te.configuration);he!==null&&(ne[fe]=he)}if(ee.value&&(ie==="textarea"||ie==="select"||ie==="option"||ie==="input")){const le=getElementInputValue(ee,re);le!==void 0&&(ne.value=le)}if(ie==="option"&&re===NodePrivacyLevel.ALLOW){const le=ee;le.selected&&(ne.selected=le.selected)}if(ie==="link"){const le=Array.from(oe.styleSheets).find(fe=>fe.href===ee.href),de=getCssRulesString(le);de&&le&&(ne._cssText=de)}if(ie==="style"&&ee.sheet){const le=getCssRulesString(ee.sheet);le&&(ne._cssText=le)}const se=ee;if(ie==="input"&&(se.type==="radio"||se.type==="checkbox")&&(re===NodePrivacyLevel.ALLOW?ne.checked=!!se.checked:shouldMaskNode(se,re)&&delete ne.checked),ie==="audio"||ie==="video"){const le=ee;ne.rr_mediaState=le.paused?"paused":"played"}let ae,ce;const ue=te.serializationContext;switch(ue.status){case 0:ae=Math.round(ee.scrollTop),ce=Math.round(ee.scrollLeft),(ae||ce)&&ue.elementsScrollPositions.set(ee,{scrollTop:ae,scrollLeft:ce});break;case 1:ue.elementsScrollPositions.has(ee)&&({scrollTop:ae,scrollLeft:ce}=ue.elementsScrollPositions.get(ee));break}return ce&&(ne.rr_scrollLeft=ce),ae&&(ne.rr_scrollTop=ae),ne}function getCssRulesString(ee){if(!ee)return null;let re;try{re=ee.rules||ee.cssRules}catch{}if(!re)return null;const te=Array.from(re,isSafari()?getCssRuleStringForSafari:getCssRuleString).join("");return switchToAbsoluteUrl(te,ee.href)}function getCssRuleStringForSafari(ee){if(isCSSStyleRule(ee)&&ee.selectorText.includes(":")){const re=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return ee.cssText.replace(re,"$1\\$2")}return getCssRuleString(ee)}function getCssRuleString(ee){return isCSSImportRule(ee)&&getCssRulesString(ee.styleSheet)||ee.cssText}function isCSSImportRule(ee){return"styleSheet"in ee}function isCSSStyleRule(ee){return"selectorText"in ee}function serializeNodeWithId(ee,re){const te=serializeNode(ee,re);if(!te)return null;const ne=getSerializedNodeId(ee)||generateNextId(),ie=te;return ie.id=ne,setSerializedNodeId(ee,ne),re.serializedNodeIds&&re.serializedNodeIds.add(ne),ie}let _nextId=1;function generateNextId(){return _nextId++}function serializeChildNodes(ee,re){const te=[];return forEachChildNodes(ee,ne=>{const ie=serializeNodeWithId(ne,re);ie&&te.push(ie)}),te}function serializeNode(ee,re){switch(ee.nodeType){case ee.DOCUMENT_NODE:return serializeDocumentNode(ee,re);case ee.DOCUMENT_FRAGMENT_NODE:return serializeDocumentFragmentNode(ee,re);case ee.DOCUMENT_TYPE_NODE:return serializeDocumentTypeNode(ee);case ee.ELEMENT_NODE:return serializeElementNode(ee,re);case ee.TEXT_NODE:return serializeTextNode(ee,re);case ee.CDATA_SECTION_NODE:return serializeCDataNode()}}function serializeDocumentNode(ee,re){return{type:NodeType.Document,childNodes:serializeChildNodes(ee,re),adoptedStyleSheets:serializeStyleSheets(ee.adoptedStyleSheets)}}function serializeDocumentFragmentNode(ee,re){const te=isNodeShadowRoot(ee);return te&&re.serializationContext.shadowRootsController.addShadowRoot(ee),{type:NodeType.DocumentFragment,childNodes:serializeChildNodes(ee,re),isShadowRoot:te,adoptedStyleSheets:te?serializeStyleSheets(ee.adoptedStyleSheets):void 0}}function serializeDocumentTypeNode(ee){return{type:NodeType.DocumentType,name:ee.name,publicId:ee.publicId,systemId:ee.systemId}}function serializeElementNode(ee,re){const te=getValidTagName(ee.tagName),ne=isSVGElement(ee)||void 0,ie=reducePrivacyLevel(getNodeSelfPrivacyLevel(ee),re.parentNodePrivacyLevel);if(ie===NodePrivacyLevel.HIDDEN){const{width:ae,height:ce}=ee.getBoundingClientRect();return{type:NodeType.Element,tagName:te,attributes:{rr_width:`${ae}px`,rr_height:`${ce}px`,[PRIVACY_ATTR_NAME]:PRIVACY_ATTR_VALUE_HIDDEN},childNodes:[],isSVG:ne}}if(ie===NodePrivacyLevel.IGNORE)return;const oe=serializeAttributes(ee,ie,re);let se=[];if(hasChildNodes(ee)&&te!=="style"){let ae;re.parentNodePrivacyLevel===ie&&re.ignoreWhiteSpace===(te==="head")?ae=re:ae={...re,parentNodePrivacyLevel:ie,ignoreWhiteSpace:te==="head"},se=serializeChildNodes(ee,ae)}return{type:NodeType.Element,tagName:te,attributes:oe,childNodes:se,isSVG:ne}}function isSVGElement(ee){return ee.tagName==="svg"||ee instanceof SVGElement}function serializeTextNode(ee,re){const te=getTextContent(ee,re.ignoreWhiteSpace||!1,re.parentNodePrivacyLevel);if(te!==void 0)return{type:NodeType.Text,textContent:te}}function serializeCDataNode(){return{type:NodeType.CDATA,textContent:""}}function serializeDocument(ee,re,te){return serializeNodeWithId(ee,{serializationContext:te,parentNodePrivacyLevel:re.defaultPrivacyLevel,configuration:re})}function isTouchEvent(ee){return!!ee.changedTouches}function getEventTarget(ee){return ee.composed===!0&&isNodeShadowHost(ee.target)?ee.composedPath()[0]:ee.target}const TOLERANCE=25;function isVisualViewportFactoredIn(ee){return Math.abs(ee.pageTop-ee.offsetTop-window.scrollY)>TOLERANCE||Math.abs(ee.pageLeft-ee.offsetLeft-window.scrollX)>TOLERANCE}const convertMouseEventToLayoutCoordinates=(ee,re)=>{const te=window.visualViewport,ne={layoutViewportX:ee,layoutViewportY:re,visualViewportX:ee,visualViewportY:re};if(te)isVisualViewportFactoredIn(te)?(ne.layoutViewportX=Math.round(ee+te.offsetLeft),ne.layoutViewportY=Math.round(re+te.offsetTop)):(ne.visualViewportX=Math.round(ee-te.offsetLeft),ne.visualViewportY=Math.round(re-te.offsetTop));else return ne;return ne},getVisualViewport=ee=>({scale:ee.scale,offsetLeft:ee.offsetLeft,offsetTop:ee.offsetTop,pageLeft:ee.pageLeft,pageTop:ee.pageTop,height:ee.height,width:ee.width});function assembleIncrementalSnapshot(ee,re){return{data:{source:ee,...re},type:RecordType.IncrementalSnapshot,timestamp:timeStampNow()}}const MOUSE_MOVE_OBSERVER_THRESHOLD=50;function trackMove(ee,re){const{throttled:te,cancel:ne}=throttle$2(oe=>{const se=getEventTarget(oe);if(hasSerializedNode(se)){const ae=tryToComputeCoordinates(oe);if(!ae)return;const ce={id:getSerializedNodeId(se),timeOffset:0,x:ae.x,y:ae.y};re(assembleIncrementalSnapshot(isTouchEvent(oe)?IncrementalSource.TouchMove:IncrementalSource.MouseMove,{positions:[ce]}))}},MOUSE_MOVE_OBSERVER_THRESHOLD,{trailing:!1}),{stop:ie}=addEventListeners(ee,document,["mousemove","touchmove"],te,{capture:!0,passive:!0});return{stop:()=>{ie(),ne()}}}function tryToComputeCoordinates(ee){let{clientX:re,clientY:te}=isTouchEvent(ee)?ee.changedTouches[0]:ee;if(window.visualViewport){const{visualViewportX:ne,visualViewportY:ie}=convertMouseEventToLayoutCoordinates(re,te);re=ne,te=ie}if(!Number.isFinite(re)||!Number.isFinite(te)){ee.isTrusted&&addTelemetryDebug("mouse/touch event without x/y");return}return{x:re,y:te}}const eventTypeToMouseInteraction={pointerup:MouseInteractionType.MouseUp,mousedown:MouseInteractionType.MouseDown,click:MouseInteractionType.Click,contextmenu:MouseInteractionType.ContextMenu,dblclick:MouseInteractionType.DblClick,focus:MouseInteractionType.Focus,blur:MouseInteractionType.Blur,touchstart:MouseInteractionType.TouchStart,touchend:MouseInteractionType.TouchEnd};function trackMouseInteraction(ee,re,te){const ne=ie=>{const oe=getEventTarget(ie);if(getNodePrivacyLevel(oe,ee.defaultPrivacyLevel)===NodePrivacyLevel.HIDDEN||!hasSerializedNode(oe))return;const se=getSerializedNodeId(oe),ae=eventTypeToMouseInteraction[ie.type];let ce;if(ae!==MouseInteractionType.Blur&&ae!==MouseInteractionType.Focus){const le=tryToComputeCoordinates(ie);if(!le)return;ce={id:se,type:ae,x:le.x,y:le.y}}else ce={id:se,type:ae};const ue={id:te.getIdForEvent(ie),...assembleIncrementalSnapshot(IncrementalSource.MouseInteraction,ce)};re(ue)};return addEventListeners(ee,document,Object.keys(eventTypeToMouseInteraction),ne,{capture:!0,passive:!0})}const SCROLL_OBSERVER_THRESHOLD=100;function trackScroll(ee,re,te,ne=document){const{throttled:ie,cancel:oe}=throttle$2(ae=>{const ce=getEventTarget(ae);if(!ce||getNodePrivacyLevel(ce,ee.defaultPrivacyLevel)===NodePrivacyLevel.HIDDEN||!hasSerializedNode(ce))return;const ue=getSerializedNodeId(ce),le=ce===document?{scrollTop:getScrollY(),scrollLeft:getScrollX()}:{scrollTop:Math.round(ce.scrollTop),scrollLeft:Math.round(ce.scrollLeft)};te.set(ce,le),re(assembleIncrementalSnapshot(IncrementalSource.Scroll,{id:ue,x:le.scrollLeft,y:le.scrollTop}))},SCROLL_OBSERVER_THRESHOLD),{stop:se}=addEventListener$1(ee,ne,"scroll",ie,{capture:!0,passive:!0});return{stop:()=>{se(),oe()}}}const VISUAL_VIEWPORT_OBSERVER_THRESHOLD=200;function trackViewportResize(ee,re){const te=initViewportObservable(ee).subscribe(ne=>{re(assembleIncrementalSnapshot(IncrementalSource.ViewportResize,ne))});return{stop:()=>{te.unsubscribe()}}}function trackVisualViewportResize(ee,re){const te=window.visualViewport;if(!te)return{stop:noop$2};const{throttled:ne,cancel:ie}=throttle$2(()=>{re({data:getVisualViewport(te),type:RecordType.VisualViewport,timestamp:timeStampNow()})},VISUAL_VIEWPORT_OBSERVER_THRESHOLD,{trailing:!1}),{stop:oe}=addEventListeners(ee,te,["resize","scroll"],ne,{capture:!0,passive:!0});return{stop:()=>{oe(),ie()}}}function trackMediaInteraction(ee,re){return addEventListeners(ee,document,["play","pause"],te=>{const ne=getEventTarget(te);!ne||getNodePrivacyLevel(ne,ee.defaultPrivacyLevel)===NodePrivacyLevel.HIDDEN||!hasSerializedNode(ne)||re(assembleIncrementalSnapshot(IncrementalSource.MediaInteraction,{id:getSerializedNodeId(ne),type:te.type==="play"?MediaInteractionType.Play:MediaInteractionType.Pause}))},{capture:!0,passive:!0})}function trackStyleSheet(ee){function re(ie,oe){ie&&hasSerializedNode(ie.ownerNode)&&oe(getSerializedNodeId(ie.ownerNode))}const te=[instrumentMethod(CSSStyleSheet.prototype,"insertRule",({target:ie,parameters:[oe,se]})=>{re(ie,ae=>ee(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule,{id:ae,adds:[{rule:oe,index:se}]})))}),instrumentMethod(CSSStyleSheet.prototype,"deleteRule",({target:ie,parameters:[oe]})=>{re(ie,se=>ee(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule,{id:se,removes:[{index:oe}]})))})];typeof CSSGroupingRule<"u"?ne(CSSGroupingRule):(ne(CSSMediaRule),ne(CSSSupportsRule));function ne(ie){te.push(instrumentMethod(ie.prototype,"insertRule",({target:oe,parameters:[se,ae]})=>{re(oe.parentStyleSheet,ce=>{const ue=getPathToNestedCSSRule(oe);ue&&(ue.push(ae||0),ee(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule,{id:ce,adds:[{rule:se,index:ue}]})))})}),instrumentMethod(ie.prototype,"deleteRule",({target:oe,parameters:[se]})=>{re(oe.parentStyleSheet,ae=>{const ce=getPathToNestedCSSRule(oe);ce&&(ce.push(se),ee(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule,{id:ae,removes:[{index:ce}]})))})}))}return{stop:()=>{te.forEach(ie=>ie.stop())}}}function getPathToNestedCSSRule(ee){const re=[];let te=ee;for(;te.parentRule;){const se=Array.from(te.parentRule.cssRules).indexOf(te);re.unshift(se),te=te.parentRule}if(!te.parentStyleSheet)return;const ie=Array.from(te.parentStyleSheet.cssRules).indexOf(te);return re.unshift(ie),re}function trackFocus(ee,re){return addEventListeners(ee,window,["focus","blur"],()=>{re({data:{has_focus:document.hasFocus()},type:RecordType.Focus,timestamp:timeStampNow()})})}function trackFrustration(ee,re,te){const ne=ee.subscribe(12,ie=>{var oe,se;ie.rawRumEvent.type==="action"&&ie.rawRumEvent.action.type==="click"&&(!((se=(oe=ie.rawRumEvent.action.frustration)===null||oe===void 0?void 0:oe.type)===null||se===void 0)&&se.length)&&"events"in ie.domainContext&&ie.domainContext.events&&ie.domainContext.events.length&&re({timestamp:ie.rawRumEvent.date,type:RecordType.FrustrationRecord,data:{frustrationTypes:ie.rawRumEvent.action.frustration.type,recordIds:ie.domainContext.events.map(ae=>te.getIdForEvent(ae))}})});return{stop:()=>{ne.unsubscribe()}}}function trackViewEnd(ee,re){const te=ee.subscribe(5,()=>{re({timestamp:timeStampNow(),type:RecordType.ViewEnd})});return{stop:()=>{te.unsubscribe()}}}function trackInput(ee,re,te=document){const ne=ee.defaultPrivacyLevel,ie=new WeakMap,oe=te!==document,{stop:se}=addEventListeners(ee,te,oe?["change"]:["input","change"],le=>{const de=getEventTarget(le);(de instanceof HTMLInputElement||de instanceof HTMLTextAreaElement||de instanceof HTMLSelectElement)&&ce(de)},{capture:!0,passive:!0});let ae;if(oe)ae=noop$2;else{const le=[instrumentSetter(HTMLInputElement.prototype,"value",ce),instrumentSetter(HTMLInputElement.prototype,"checked",ce),instrumentSetter(HTMLSelectElement.prototype,"value",ce),instrumentSetter(HTMLTextAreaElement.prototype,"value",ce),instrumentSetter(HTMLSelectElement.prototype,"selectedIndex",ce)];ae=()=>{le.forEach(de=>de.stop())}}return{stop:()=>{ae(),se()}};function ce(le){const de=getNodePrivacyLevel(le,ne);if(de===NodePrivacyLevel.HIDDEN)return;const fe=le.type;let he;if(fe==="radio"||fe==="checkbox"){if(shouldMaskNode(le,de))return;he={isChecked:le.checked}}else{const ge=getElementInputValue(le,de);if(ge===void 0)return;he={text:ge}}ue(le,he);const pe=le.name;fe==="radio"&&pe&&le.checked&&document.querySelectorAll(`input[type="radio"][name="${CSS.escape(pe)}"]`).forEach(ge=>{ge!==le&&ue(ge,{isChecked:!1})})}function ue(le,de){if(!hasSerializedNode(le))return;const fe=ie.get(le);(!fe||fe.text!==de.text||fe.isChecked!==de.isChecked)&&(ie.set(le,de),re(assembleIncrementalSnapshot(IncrementalSource.Input,{id:getSerializedNodeId(le),...de})))}}const MUTATION_PROCESS_MAX_DELAY=100,MUTATION_PROCESS_MIN_DELAY=16;function createMutationBatch(ee){let re=noop$2,te=[];function ne(){re(),ee(te),te=[]}const{throttled:ie,cancel:oe}=throttle$2(ne,MUTATION_PROCESS_MIN_DELAY,{leading:!1});return{addMutations:se=>{te.length===0&&(re=requestIdleCallback(ie,{timeout:MUTATION_PROCESS_MAX_DELAY})),te.push(...se)},flush:ne,stop:()=>{re(),oe()}}}function trackMutation(ee,re,te,ne){const ie=getMutationObserverConstructor();if(!ie)return{stop:noop$2,flush:noop$2};const oe=createMutationBatch(ae=>{processMutations(ae.concat(se.takeRecords()),ee,re,te)}),se=new ie(monitor(oe.addMutations));return se.observe(ne,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{se.disconnect(),oe.stop()},flush:()=>{oe.flush()}}}function processMutations(ee,re,te,ne){const ie=new Map;ee.filter(de=>de.type==="childList").forEach(de=>{de.removedNodes.forEach(fe=>{traverseRemovedShadowDom(fe,ne.removeShadowRoot)})});const oe=ee.filter(de=>de.target.isConnected&&nodeAndAncestorsHaveSerializedNode(de.target)&&getNodePrivacyLevel(de.target,te.defaultPrivacyLevel,ie)!==NodePrivacyLevel.HIDDEN),{adds:se,removes:ae,hasBeenSerialized:ce}=processChildListMutations(oe.filter(de=>de.type==="childList"),te,ne,ie),ue=processCharacterDataMutations(oe.filter(de=>de.type==="characterData"&&!ce(de.target)),te,ie),le=processAttributesMutations(oe.filter(de=>de.type==="attributes"&&!ce(de.target)),te,ie);!ue.length&&!le.length&&!ae.length&&!se.length||re(assembleIncrementalSnapshot(IncrementalSource.Mutation,{adds:se,removes:ae,texts:ue,attributes:le}))}function processChildListMutations(ee,re,te,ne){const ie=new Set,oe=new Map;for(const fe of ee)fe.addedNodes.forEach(he=>{ie.add(he)}),fe.removedNodes.forEach(he=>{ie.has(he)||oe.set(he,fe.target),ie.delete(he)});const se=Array.from(ie);sortAddedAndMovedNodes(se);const ae=new Set,ce=[];for(const fe of se){if(le(fe))continue;const he=getNodePrivacyLevel(fe.parentNode,re.defaultPrivacyLevel,ne);if(he===NodePrivacyLevel.HIDDEN||he===NodePrivacyLevel.IGNORE)continue;const pe=serializeNodeWithId(fe,{serializedNodeIds:ae,parentNodePrivacyLevel:he,serializationContext:{status:2,shadowRootsController:te},configuration:re});if(!pe)continue;const ge=getParentNode(fe);ce.push({nextId:de(fe),parentId:getSerializedNodeId(ge),node:pe})}const ue=[];return oe.forEach((fe,he)=>{hasSerializedNode(he)&&ue.push({parentId:getSerializedNodeId(fe),id:getSerializedNodeId(he)})}),{adds:ce,removes:ue,hasBeenSerialized:le};function le(fe){return hasSerializedNode(fe)&&ae.has(getSerializedNodeId(fe))}function de(fe){let he=fe.nextSibling;for(;he;){if(hasSerializedNode(he))return getSerializedNodeId(he);he=he.nextSibling}return null}}function processCharacterDataMutations(ee,re,te){var ne;const ie=[],oe=new Set,se=ee.filter(ae=>oe.has(ae.target)?!1:(oe.add(ae.target),!0));for(const ae of se){if(ae.target.textContent===ae.oldValue)continue;const ue=getNodePrivacyLevel(getParentNode(ae.target),re.defaultPrivacyLevel,te);ue===NodePrivacyLevel.HIDDEN||ue===NodePrivacyLevel.IGNORE||ie.push({id:getSerializedNodeId(ae.target),value:(ne=getTextContent(ae.target,!1,ue))!==null&&ne!==void 0?ne:null})}return ie}function processAttributesMutations(ee,re,te){const ne=[],ie=new Map,oe=ee.filter(ae=>{const ce=ie.get(ae.target);return ce&&ce.has(ae.attributeName)?!1:(ce?ce.add(ae.attributeName):ie.set(ae.target,new Set([ae.attributeName])),!0)}),se=new Map;for(const ae of oe){if(ae.target.getAttribute(ae.attributeName)===ae.oldValue)continue;const ue=getNodePrivacyLevel(ae.target,re.defaultPrivacyLevel,te),le=serializeAttribute(ae.target,ue,ae.attributeName,re);let de;if(ae.attributeName==="value"){const he=getElementInputValue(ae.target,ue);if(he===void 0)continue;de=he}else typeof le=="string"?de=le:de=null;let fe=se.get(ae.target);fe||(fe={id:getSerializedNodeId(ae.target),attributes:{}},ne.push(fe),se.set(ae.target,fe)),fe.attributes[ae.attributeName]=de}return ne}function sortAddedAndMovedNodes(ee){ee.sort((re,te)=>{const ne=re.compareDocumentPosition(te);return ne&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:ne&Node.DOCUMENT_POSITION_CONTAINS||ne&Node.DOCUMENT_POSITION_FOLLOWING?1:ne&Node.DOCUMENT_POSITION_PRECEDING?-1:0})}function traverseRemovedShadowDom(ee,re){isNodeShadowHost(ee)&&re(ee.shadowRoot),forEachChildNodes(ee,te=>traverseRemovedShadowDom(te,re))}function createElementsScrollPositions(){const ee=new WeakMap;return{set(re,te){re===document&&!document.scrollingElement||ee.set(re===document?document.scrollingElement:re,te)},get(re){return ee.get(re)},has(re){return ee.has(re)}}}const initShadowRootsController=(ee,re,te)=>{const ne=new Map,ie={addShadowRoot:oe=>{if(ne.has(oe))return;const se=trackMutation(re,ee,ie,oe),ae=trackInput(ee,re,oe),ce=trackScroll(ee,re,te,oe);ne.set(oe,{flush:()=>se.flush(),stop:()=>{se.stop(),ae.stop(),ce.stop()}})},removeShadowRoot:oe=>{const se=ne.get(oe);se&&(se.stop(),ne.delete(oe))},stop:()=>{ne.forEach(({stop:oe})=>oe())},flush:()=>{ne.forEach(({flush:oe})=>oe())}};return ie};function startFullSnapshots(ee,re,te,ne,ie,oe){const se=(ce=timeStampNow(),ue={status:0,elementsScrollPositions:ee,shadowRootsController:re})=>{const{width:le,height:de}=getViewportDimension(),fe=[{data:{height:de,href:window.location.href,width:le},type:RecordType.Meta,timestamp:ce},{data:{has_focus:document.hasFocus()},type:RecordType.Focus,timestamp:ce},{data:{node:serializeDocument(document,ne,ue),initialOffset:{left:getScrollX(),top:getScrollY()}},type:RecordType.FullSnapshot,timestamp:ce}];return window.visualViewport&&fe.push({data:getVisualViewport(window.visualViewport),type:RecordType.VisualViewport,timestamp:ce}),fe};oe(se());const{unsubscribe:ae}=te.subscribe(2,ce=>{ie(),oe(se(ce.startClocks.timeStamp,{shadowRootsController:re,status:1,elementsScrollPositions:ee}))});return{stop:ae}}function initRecordIds(){const ee=new WeakMap;let re=1;return{getIdForEvent(te){return ee.has(te)||ee.set(te,re++),ee.get(te)}}}function record(ee){const{emit:re,configuration:te,lifeCycle:ne}=ee;if(!re)throw new Error("emit function is required");const ie=fe=>{re(fe),sendToExtension("record",{record:fe});const he=ee.viewHistory.findView();addRecord(he.id)},oe=createElementsScrollPositions(),se=initShadowRootsController(te,ie,oe),{stop:ae}=startFullSnapshots(oe,se,ne,te,ce,fe=>fe.forEach(he=>ie(he)));function ce(){se.flush(),le.flush()}const ue=initRecordIds(),le=trackMutation(ie,te,se,document),de=[le,trackMove(te,ie),trackMouseInteraction(te,ie,ue),trackScroll(te,ie,oe,document),trackViewportResize(te,ie),trackInput(te,ie),trackMediaInteraction(te,ie),trackStyleSheet(ie),trackFocus(te,ie),trackVisualViewportResize(te,ie),trackFrustration(ne,ie,ue),trackViewEnd(ne,fe=>{ce(),ie(fe)})];return{stop:()=>{se.stop(),de.forEach(fe=>fe.stop()),ae()},flushMutations:ce,shadowRootsController:se}}function buildReplayPayload(ee,re,te){const ne=new FormData;ne.append("segment",new Blob([ee],{type:"application/octet-stream"}),`${re.session.id}-${re.start}`);const ie={raw_segment_size:te,compressed_segment_size:ee.byteLength,...re},oe=JSON.stringify(ie);return ne.append("event",new Blob([oe],{type:"application/json"})),{data:ne,bytesCount:ee.byteLength}}function createSegment({context:ee,creationReason:re,encoder:te}){let ne=0;const ie=ee.view.id,oe={start:1/0,end:-1/0,creation_reason:re,records_count:0,has_full_snapshot:!1,index_in_view:getSegmentsCount(ie),source:"browser",...ee};addSegment(ie);function se(ce,ue){oe.start=Math.min(oe.start,ce.timestamp),oe.end=Math.max(oe.end,ce.timestamp),oe.records_count+=1,oe.has_full_snapshot||(oe.has_full_snapshot=ce.type===RecordType.FullSnapshot);const le=te.isEmpty?'{"records":[':",";te.write(le+JSON.stringify(ce),de=>{ne+=de,ue(ne)})}function ae(ce){if(te.isEmpty)throw new Error("Empty segment flushed");te.write(`],${JSON.stringify(oe).slice(1)}
|
|
1564
|
+
`),te.finish(ue=>{addWroteData(oe.view.id,ue.rawBytesCount),ce(oe,ue)})}return{addRecord:se,flush:ae}}const SEGMENT_DURATION_LIMIT=5*ONE_SECOND;let SEGMENT_BYTES_LIMIT=6e4;function startSegmentCollection(ee,re,te,ne,ie,oe){return doStartSegmentCollection(ee,()=>computeSegmentContext(re.applicationId,te,ne),ie,oe)}function doStartSegmentCollection(ee,re,te,ne){let ie={status:0,nextSegmentCreationReason:"init"};const{unsubscribe:oe}=ee.subscribe(2,()=>{ae("view_change")}),{unsubscribe:se}=ee.subscribe(11,ce=>{ae(ce.reason)});function ae(ce){ie.status===1&&(ie.segment.flush((ue,le)=>{const de=buildReplayPayload(le.output,ue,le.rawBytesCount);isPageExitReason(ce)?te.sendOnExit(de):te.send(de)}),clearTimeout$1(ie.expirationTimeoutId)),ce!=="stop"?ie={status:0,nextSegmentCreationReason:ce}:ie={status:2}}return{addRecord:ce=>{if(ie.status!==2){if(ie.status===0){const ue=re();if(!ue)return;ie={status:1,segment:createSegment({encoder:ne,context:ue,creationReason:ie.nextSegmentCreationReason}),expirationTimeoutId:setTimeout$1(()=>{ae("segment_duration_limit")},SEGMENT_DURATION_LIMIT)}}ie.segment.addRecord(ce,ue=>{ue>SEGMENT_BYTES_LIMIT&&ae("segment_bytes_limit")})}},stop:()=>{ae("stop"),oe(),se()}}}function computeSegmentContext(ee,re,te){const ne=re.findTrackedSession(),ie=te.findView();if(!(!ne||!ie))return{application:{id:ee},session:{id:ne.id},view:{id:ie.id}}}function startRecordBridge(ee){const re=getEventBridge();return{addRecord:te=>{const ne=ee.findView();re.send("record",te,ne.id)}}}function startRecording(ee,re,te,ne,ie,oe){const se=[],ae=de=>{ee.notify(14,{error:de}),addTelemetryDebug("Error reported to customer",{"error.message":de.message})},ce=oe||createHttpRequest(re.sessionReplayEndpointBuilder,SEGMENT_BYTES_LIMIT,ae);let ue;if(canUseEventBridge())({addRecord:ue}=startRecordBridge(ne));else{const de=startSegmentCollection(ee,re,te,ne,ce,ie);ue=de.addRecord,se.push(de.stop)}const{stop:le}=record({emit:ue,configuration:re,lifeCycle:ee,viewHistory:ne});return se.push(le),{stop:()=>{se.forEach(de=>de())}}}const startRecording$1=Object.freeze(Object.defineProperty({__proto__:null,startRecording},Symbol.toStringTag,{value:"Module"}));function getNumberOfSamples(ee){let re=0;for(const te of ee)te.stackId!==void 0&&re++;return re}const registry=new Map;let enabledTime=!1;function enableLongTaskRegistry(){enabledTime=performance.now()}function disableLongTaskRegistry(){enabledTime=!1,registry.clear()}function setLongTaskId(ee,re){registry.set(re,ee)}function getLongTaskId(ee){if(!(enabledTime===!1||ee.startTime<enabledTime))return registry.get(ee.startTime)}function deleteLongTaskIdsBefore(ee){if(!(enabledTime===!1||ee<enabledTime))for(const re of registry.keys())re<ee&®istry.delete(re)}function mayStoreLongTaskIdForProfilerCorrelation({rawRumEvent:ee,startTime:re}){if(ee.type!=="long_task")return;const te=ee.long_task.id;setLongTaskId(te,re)}const sendProfile=(ee,re,te,ne)=>{const ie=buildProfileEvent(ee,re,te,ne),oe=buildProfilingPayload(ee,ie),se=re.build("fetch",oe);return addTelemetryDebug("Sending profile to public profiling intake",{profilingIntakeURL:se,applicationId:te,sessionId:ne}),fetch(se,{body:oe.data,method:"POST"})};function buildProfileEvent(ee,re,te,ne){const ie=re.tags,oe=buildProfileEventAttributes(ee,te,ne),se=buildProfileEventTags(ie),ae=new Date(ee.timeOrigin+ee.startTime),ce=new Date(ee.timeOrigin+ee.endTime);return{...oe,attachments:["wall-time.json"],start:ae.toISOString(),end:ce.toISOString(),family:"chrome",runtime:"chrome",format:"json",version:4,tags_profiler:se.join(",")}}function buildProfileEventTags(ee){return ee.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"])}function buildProfilingPayload(ee,re){const te=new Blob([JSON.stringify(ee)],{type:"application/json"}),ne=new FormData;return ne.append("event",new Blob([JSON.stringify(re)],{type:"application/json"}),"event.json"),ne.append("wall-time.json",te,"wall-time.json"),{data:ne,bytesCount:0}}function buildProfileEventAttributes(ee,re,te){const ne={application:{id:re}};te&&(ne.session={id:te});const ie=Array.from(new Set(ee.views.map(se=>se.viewId)));ie.length&&(ne.view={id:ie});const oe=ee.longTasks.map(se=>getLongTaskId(se)).filter(se=>se!==void 0);return oe.length&&(ne.long_task={id:oe}),ne}const transport={sendProfile},DEFAULT_RUM_PROFILER_CONFIGURATION={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};function createRumProfiler(ee,re,te,ne=DEFAULT_RUM_PROFILER_CONFIGURATION){const ie=supportPerformanceTimingEvent(RumPerformanceEntryType.LONG_ANIMATION_FRAME);let oe;const se=[];let ae={state:"stopped"};function ce(we){ae.state!=="running"&&(oe=we?{startTime:we.startClocks.relative,viewId:we.id,viewName:we.name}:void 0,se.push(addEventListener$1(ee,window,"visibilitychange",be).stop,addEventListener$1(ee,window,"beforeunload",_e).stop),de())}async function ue(){await he("stopped"),disableLongTaskRegistry(),se.forEach(we=>we())}function le(we){if(we.state==="running")return{cleanupTasks:we.cleanupTasks,observer:we.observer};const Ae=[];let Oe;if(ee.trackLongTasks){Oe=new PerformanceObserver(ye),Oe.observe({entryTypes:[Ce()]});const Ue=re.subscribe(12,Fe=>{mayStoreLongTaskIdForProfilerCorrelation(Fe)});enableLongTaskRegistry(),Ae.push(()=>Oe==null?void 0:Oe.disconnect()),Ae.push(Ue.unsubscribe)}const Ne=re.subscribe(2,Ue=>{pe({viewId:Ue.id,viewName:Ue.name,startTime:Ue.startClocks.relative})});return Ae.push(Ne.unsubscribe),{cleanupTasks:Ae,observer:Oe}}function de(){const we=getGlobalObject().Profiler;if(!we)throw new Error("RUM Profiler is not supported in this browser.");fe(ae).catch(monitorError);const{cleanupTasks:Ae,observer:Oe}=le(ae);let Ne;try{Ne=new we({sampleInterval:ne.sampleIntervalMs,maxBufferSize:Math.round(ne.collectIntervalMs*1.5/ne.sampleIntervalMs)})}catch(Ue){display.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",Ue);return}ae={state:"running",startTime:performance.now(),profiler:Ne,timeoutId:setTimeout$1(de,ne.collectIntervalMs),longTasks:[],views:[],cleanupTasks:Ae,observer:Oe},pe(oe),Ne.addEventListener("samplebufferfull",me)}async function fe(we){var Ae,Oe;if(we.state!=="running")return;ve((Oe=(Ae=we.observer)===null||Ae===void 0?void 0:Ae.takeRecords())!==null&&Oe!==void 0?Oe:[]),clearTimeout$1(we.timeoutId),we.profiler.removeEventListener("samplebufferfull",me);const{startTime:Ne,longTasks:Ue,views:Fe}=we,Ve=performance.now();await we.profiler.stop().then(He=>{const ur=performance.now(),qe=Ue.length>0,hr=ur-Ne<ne.minProfileDurationMs,fr=getNumberOfSamples(He.samples)<ne.minNumberOfSamples;!qe&&(hr||fr)||(ge(Object.assign(He,{startTime:Ne,endTime:ur,timeOrigin:performance.timeOrigin,longTasks:Ue,views:Fe,sampleInterval:ne.sampleIntervalMs})),deleteLongTaskIdsBefore(Ve))}).catch(monitorError)}async function he(we){ae.state==="running"&&(ae.cleanupTasks.forEach(Ae=>Ae()),await fe(ae),ae={state:we})}function pe(we){ae.state!=="running"||!we||ae.views.push(we)}function ge(we){var Ae;const Oe=(Ae=te.findTrackedSession())===null||Ae===void 0?void 0:Ae.id;transport.sendProfile(we,ee.profilingEndpointBuilder,ee.applicationId,Oe).catch(monitorError)}function me(){de()}function ye(we){ve(we.getEntries())}function ve(we){if(ae.state==="running")for(const Ae of we)Ae.duration<ne.sampleIntervalMs||ae.longTasks.push({id:getLongTaskId(Ae),duration:Ae.duration,entryType:Ae.entryType,startTime:Ae.startTime})}function be(){document.visibilityState==="hidden"&&ae.state==="running"?he("paused").catch(monitorError):document.visibilityState==="visible"&&ae.state==="paused"&&de()}function _e(){de()}function Ce(){return ie?"long-animation-frame":"longtask"}function Te(){return ae.state==="stopped"}function Se(){return ae.state==="running"}function Re(){return ae.state==="paused"}return{start:ce,stop:ue,isStopped:Te,isRunning:Se,isPaused:Re}}const profiler=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_RUM_PROFILER_CONFIGURATION,createRumProfiler},Symbol.toStringTag,{value:"Module"}));exports.AstroPayCardPayment=AstroPayCardPayment,exports.AstroPayCore=AstroPayCore,exports.AstroPayFullCheckout=AstroPayFullCheckout,exports.AstroPayPayment=AstroPayPayment,exports.AstroPaySinglePaymentMethod=AstroPaySinglePaymentMethod,exports.Core=AstroPayCore,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}));
|