@stigg/react-sdk 7.7.1-beta.0 → 7.7.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/dist/index.d.ts +5 -2
  2. package/dist/react-sdk.cjs.js +298 -238
  3. package/dist/react-sdk.esm.js +5223 -3827
  4. package/package.json +2 -3
  5. package/src/assets/add.svg +0 -3
  6. package/src/assets/addons.svg +0 -12
  7. package/src/assets/arrow-forward.svg +0 -3
  8. package/src/assets/arrow-right.svg +0 -6
  9. package/src/assets/billing-info-customer.svg +0 -11
  10. package/src/assets/check-stigg.svg +0 -3
  11. package/src/assets/check.svg +0 -5
  12. package/src/assets/close.svg +0 -3
  13. package/src/assets/contact-support.svg +0 -13
  14. package/src/assets/coupon.svg +0 -6
  15. package/src/assets/credit-card.svg +0 -10
  16. package/src/assets/dollar-coin.svg +0 -13
  17. package/src/assets/edit-icon.svg +0 -3
  18. package/src/assets/entitlement-check.svg +0 -3
  19. package/src/assets/lottie/checkout-success.json +0 -1
  20. package/src/assets/mini-schedule.svg +0 -3
  21. package/src/assets/outlined-checked-circle-disabled.svg +0 -6
  22. package/src/assets/outlined-checked-circle.svg +0 -6
  23. package/src/assets/outlined-circle.svg +0 -3
  24. package/src/assets/pay-as-you-go-charge.svg +0 -11
  25. package/src/assets/payment-method.svg +0 -4
  26. package/src/assets/plus-icon.svg +0 -6
  27. package/src/assets/powered-by-stigg.svg +0 -13
  28. package/src/assets/promotions.svg +0 -13
  29. package/src/assets/remove.svg +0 -3
  30. package/src/assets/restore.svg +0 -3
  31. package/src/assets/sand-clock.svg +0 -4
  32. package/src/assets/schedule-box.svg +0 -9
  33. package/src/assets/schedule.svg +0 -3
  34. package/src/assets/subscription-renews-icon.svg +0 -14
  35. package/src/assets/trash.svg +0 -8
  36. package/src/components/StiggProvider.tsx +0 -170
  37. package/src/components/checkout/Checkout.tsx +0 -37
  38. package/src/components/checkout/CheckoutContainer.style.ts +0 -51
  39. package/src/components/checkout/CheckoutContainer.tsx +0 -193
  40. package/src/components/checkout/CheckoutProvider.tsx +0 -181
  41. package/src/components/checkout/components/Button.tsx +0 -35
  42. package/src/components/checkout/components/ChangePlanButton.tsx +0 -30
  43. package/src/components/checkout/components/ContentLoadingSkeleton.tsx +0 -41
  44. package/src/components/checkout/components/DowngradeToFreeContainer.tsx +0 -115
  45. package/src/components/checkout/components/InputField.tsx +0 -26
  46. package/src/components/checkout/components/Skeletons.style.ts +0 -30
  47. package/src/components/checkout/components/StyledArrow.tsx +0 -9
  48. package/src/components/checkout/components/index.ts +0 -3
  49. package/src/components/checkout/configurations/steps.ts +0 -1
  50. package/src/components/checkout/configurations/textOverrides.ts +0 -150
  51. package/src/components/checkout/configurations/theme.ts +0 -46
  52. package/src/components/checkout/configurations/typography.ts +0 -30
  53. package/src/components/checkout/formatting.ts +0 -12
  54. package/src/components/checkout/hooks/index.ts +0 -8
  55. package/src/components/checkout/hooks/useAddonsStepModel.ts +0 -92
  56. package/src/components/checkout/hooks/useCheckoutModel.ts +0 -53
  57. package/src/components/checkout/hooks/useCouponModel.ts +0 -28
  58. package/src/components/checkout/hooks/useLoadCheckout.ts +0 -48
  59. package/src/components/checkout/hooks/usePaymentStepModel.ts +0 -68
  60. package/src/components/checkout/hooks/usePlanStepModel.ts +0 -184
  61. package/src/components/checkout/hooks/usePreviewSubscription.ts +0 -165
  62. package/src/components/checkout/hooks/useProgressBarModel.ts +0 -211
  63. package/src/components/checkout/hooks/useSubscriptionModel.ts +0 -22
  64. package/src/components/checkout/hooks/useSubscriptionState.ts +0 -26
  65. package/src/components/checkout/index.ts +0 -8
  66. package/src/components/checkout/planHeader/PlanHeader.tsx +0 -41
  67. package/src/components/checkout/planHeader/index.ts +0 -1
  68. package/src/components/checkout/progressBar/CheckoutProgressBar.style.ts +0 -35
  69. package/src/components/checkout/progressBar/CheckoutProgressBar.tsx +0 -82
  70. package/src/components/checkout/promotionCode/AddPromotionCode.tsx +0 -107
  71. package/src/components/checkout/promotionCode/AddPromotionCodeButton.tsx +0 -43
  72. package/src/components/checkout/promotionCode/AppliedPromotionCode.tsx +0 -49
  73. package/src/components/checkout/promotionCode/PromotionCodeSection.tsx +0 -40
  74. package/src/components/checkout/promotionCode/index.ts +0 -1
  75. package/src/components/checkout/steps/addons/CheckoutAddonsStep.style.tsx +0 -34
  76. package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +0 -144
  77. package/src/components/checkout/steps/addons/addon.utils.ts +0 -67
  78. package/src/components/checkout/steps/addons/components/AddonInputContainer.tsx +0 -84
  79. package/src/components/checkout/steps/addons/components/AddonTextContainer.tsx +0 -45
  80. package/src/components/checkout/steps/addons/index.ts +0 -1
  81. package/src/components/checkout/steps/payment/PaymentMethods.style.ts +0 -36
  82. package/src/components/checkout/steps/payment/PaymentMethods.tsx +0 -106
  83. package/src/components/checkout/steps/payment/PaymentStep.tsx +0 -63
  84. package/src/components/checkout/steps/payment/index.ts +0 -1
  85. package/src/components/checkout/steps/payment/stripe/StripePaymentForm.tsx +0 -79
  86. package/src/components/checkout/steps/payment/stripe/index.ts +0 -3
  87. package/src/components/checkout/steps/payment/stripe/stripe.utils.ts +0 -122
  88. package/src/components/checkout/steps/payment/stripe/useStripeIntegration.ts +0 -33
  89. package/src/components/checkout/steps/payment/stripe/useSubmit.ts +0 -135
  90. package/src/components/checkout/steps/payment/zuora/ZuoraPaymentForm.tsx +0 -128
  91. package/src/components/checkout/steps/payment/zuora/index.ts +0 -9
  92. package/src/components/checkout/steps/payment/zuora/useZuoraIntegration.ts +0 -57
  93. package/src/components/checkout/steps/payment/zuora/useZuoraSubmit.ts +0 -125
  94. package/src/components/checkout/steps/payment/zuora/zuora.utils.ts +0 -72
  95. package/src/components/checkout/steps/plan/BillingPeriodPicker.style.tsx +0 -69
  96. package/src/components/checkout/steps/plan/BillingPeriodPicker.tsx +0 -86
  97. package/src/components/checkout/steps/plan/CheckoutChargeList.tsx +0 -223
  98. package/src/components/checkout/steps/plan/CheckoutPlanStep.style.tsx +0 -6
  99. package/src/components/checkout/steps/plan/CheckoutPlanStep.tsx +0 -31
  100. package/src/components/checkout/steps/plan/index.ts +0 -1
  101. package/src/components/checkout/summary/CheckoutSuccess.tsx +0 -82
  102. package/src/components/checkout/summary/CheckoutSummary.tsx +0 -458
  103. package/src/components/checkout/summary/CheckoutSummarySkeleton.tsx +0 -38
  104. package/src/components/checkout/summary/components/CheckoutCaptions.tsx +0 -145
  105. package/src/components/checkout/summary/components/GraduatedPriceBreakdown.tsx +0 -70
  106. package/src/components/checkout/summary/components/LineItems.tsx +0 -275
  107. package/src/components/checkout/summary/components/WithSkeleton.tsx +0 -16
  108. package/src/components/checkout/summary/components/getPriceBreakdownString.ts +0 -66
  109. package/src/components/checkout/summary/index.ts +0 -2
  110. package/src/components/checkout/types.ts +0 -82
  111. package/src/components/common/CollapsableSectionIcon.tsx +0 -9
  112. package/src/components/common/Icon.tsx +0 -61
  113. package/src/components/common/InformationTooltip.tsx +0 -28
  114. package/src/components/common/LongText.tsx +0 -100
  115. package/src/components/common/PoweredByStigg.tsx +0 -59
  116. package/src/components/common/ProgressBar.tsx +0 -41
  117. package/src/components/common/StatusChip.tsx +0 -29
  118. package/src/components/common/TiersSelectContainer.tsx +0 -39
  119. package/src/components/common/Typography.tsx +0 -117
  120. package/src/components/common/VolumeBulkSelect.tsx +0 -74
  121. package/src/components/common/VolumePerUnitInput.tsx +0 -42
  122. package/src/components/common/chart/chartjs.helpers.ts +0 -17
  123. package/src/components/common/chart/chartjs.plugins.ts +0 -34
  124. package/src/components/common/chart/chartjs.theme.ts +0 -41
  125. package/src/components/common/chart/chartjs.tooltip.plugin.tsx +0 -224
  126. package/src/components/common/customIcons.ts +0 -24
  127. package/src/components/common/iconColor.ts +0 -15
  128. package/src/components/common/mapExternalTheme.ts +0 -147
  129. package/src/components/common/mediaQuery.ts +0 -19
  130. package/src/components/common/table/DataRows.tsx +0 -33
  131. package/src/components/common/table/EmptyState.tsx +0 -19
  132. package/src/components/common/table/ErrorState.tsx +0 -19
  133. package/src/components/common/table/GenericTable.tsx +0 -155
  134. package/src/components/common/table/LoadingRows.tsx +0 -33
  135. package/src/components/common/table/index.ts +0 -6
  136. package/src/components/common/table/types.ts +0 -30
  137. package/src/components/credits/balance/CreditBalance.tsx +0 -70
  138. package/src/components/credits/balance/CreditBalanceValue.tsx +0 -60
  139. package/src/components/credits/creditUsageChart/CreditUsage.chartjs.ts +0 -223
  140. package/src/components/credits/creditUsageChart/CreditUsageChart.tsx +0 -128
  141. package/src/components/credits/creditUsageChart/CreditUsageChartEmptyState.tsx +0 -29
  142. package/src/components/credits/creditUsageChart/CreditUsageChartErrorState.tsx +0 -19
  143. package/src/components/credits/creditUsageChart/CreditUsageChartHeader.tsx +0 -104
  144. package/src/components/credits/creditUsageChart/CreditUsageChartTooltip.tsx +0 -93
  145. package/src/components/credits/creditUsageChart/CreditUsageLegend.tsx +0 -141
  146. package/src/components/credits/creditUsageChart/types.ts +0 -4
  147. package/src/components/credits/grants/CreditGrants.tsx +0 -64
  148. package/src/components/credits/grants/CreditGrantsTable.tsx +0 -101
  149. package/src/components/credits/grants/types.ts +0 -38
  150. package/src/components/credits/grants/utils.ts +0 -25
  151. package/src/components/credits/hooks/useCreditBalance.ts +0 -75
  152. package/src/components/credits/hooks/useCreditGrants.ts +0 -40
  153. package/src/components/credits/hooks/useCreditUsage.ts +0 -50
  154. package/src/components/credits/index.ts +0 -15
  155. package/src/components/credits/localization.ts +0 -25
  156. package/src/components/credits/utilization/CreditUtilization.tsx +0 -74
  157. package/src/components/credits/utilization/CreditUtilizationValue.tsx +0 -113
  158. package/src/components/credits/utils/creditBalanceUtils.ts +0 -31
  159. package/src/components/credits/utils/creditGrantUtils.ts +0 -27
  160. package/src/components/customerPortal/CustomerPortal.style.ts +0 -20
  161. package/src/components/customerPortal/CustomerPortal.tsx +0 -37
  162. package/src/components/customerPortal/CustomerPortalContainer.tsx +0 -77
  163. package/src/components/customerPortal/CustomerPortalContext.ts +0 -32
  164. package/src/components/customerPortal/CustomerPortalHeader.tsx +0 -18
  165. package/src/components/customerPortal/CustomerPortalProvider.tsx +0 -49
  166. package/src/components/customerPortal/billing/InformationGrid.tsx +0 -54
  167. package/src/components/customerPortal/billing/InvoicesSection.tsx +0 -41
  168. package/src/components/customerPortal/billing/PaymentDetailsSection.tsx +0 -140
  169. package/src/components/customerPortal/common/ExternalLinkButton.tsx +0 -34
  170. package/src/components/customerPortal/common/SectionContainer.tsx +0 -22
  171. package/src/components/customerPortal/common/SectionHeader.ts +0 -15
  172. package/src/components/customerPortal/common/SectionTitle.tsx +0 -23
  173. package/src/components/customerPortal/common/SkeletonButton.tsx +0 -5
  174. package/src/components/customerPortal/common/StyledButton.tsx +0 -13
  175. package/src/components/customerPortal/customerPortalTextOverrides.ts +0 -39
  176. package/src/components/customerPortal/customerPortalTheme.ts +0 -35
  177. package/src/components/customerPortal/hooks/useCustomerPortal.ts +0 -39
  178. package/src/components/customerPortal/index.ts +0 -16
  179. package/src/components/customerPortal/paywall/CustomerPortalPaywall.style.ts +0 -33
  180. package/src/components/customerPortal/paywall/CustomerPortalPaywall.tsx +0 -36
  181. package/src/components/customerPortal/subscriptionOverview/ContactCustomerSupport.tsx +0 -50
  182. package/src/components/customerPortal/subscriptionOverview/SubscriptionOverviewLoader.tsx +0 -28
  183. package/src/components/customerPortal/subscriptionOverview/SubscriptionsOverview.tsx +0 -106
  184. package/src/components/customerPortal/subscriptionOverview/SubscriptionsOverviewHeader.tsx +0 -48
  185. package/src/components/customerPortal/subscriptionOverview/charges/ChargeItem.tsx +0 -74
  186. package/src/components/customerPortal/subscriptionOverview/charges/ChargeList.tsx +0 -65
  187. package/src/components/customerPortal/subscriptionOverview/subscriptionScheduledUpdates/SubscriptionScheduledUpdateRow.tsx +0 -110
  188. package/src/components/customerPortal/subscriptionOverview/subscriptionScheduledUpdates/SubscriptionScheduledUpdatesAlert.tsx +0 -158
  189. package/src/components/customerPortal/subscriptionOverview/subscriptionView/SubscriptionView.style.ts +0 -6
  190. package/src/components/customerPortal/subscriptionOverview/subscriptionView/SubscriptionView.tsx +0 -37
  191. package/src/components/customerPortal/subscriptionOverview/subscriptionView/TrialPanel.tsx +0 -58
  192. package/src/components/customerPortal/subscriptionOverview/tabs/AddonsList.tsx +0 -28
  193. package/src/components/customerPortal/subscriptionOverview/tabs/Promotions.tsx +0 -62
  194. package/src/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.style.tsx +0 -32
  195. package/src/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.tsx +0 -100
  196. package/src/components/customerPortal/subscriptionOverview/types/customerPortal.types.ts +0 -4
  197. package/src/components/customerPortal/subscriptionOverview/upcomingBilling/NextEstimatedBill.tsx +0 -29
  198. package/src/components/customerPortal/subscriptionOverview/upcomingBilling/NoUpcomingBilling.tsx +0 -18
  199. package/src/components/customerPortal/subscriptionOverview/upcomingBilling/UpcomingBilling.tsx +0 -89
  200. package/src/components/customerPortal/types.ts +0 -20
  201. package/src/components/customerPortal/usage/CustomerUsageData.style.tsx +0 -22
  202. package/src/components/customerPortal/usage/CustomerUsageData.tsx +0 -124
  203. package/src/components/customerPortal/usage/featureUsage/EntitlementCTAButton.tsx +0 -62
  204. package/src/components/customerPortal/usage/featureUsage/FeatureUsage.helper.ts +0 -45
  205. package/src/components/customerPortal/usage/featureUsage/FeatureUsage.style.ts +0 -13
  206. package/src/components/customerPortal/usage/featureUsage/FeatureUsage.tsx +0 -96
  207. package/src/components/customerPortal/usage/featureUsage/FeatureUsageProgressBar.tsx +0 -56
  208. package/src/components/guards/BooleanEntitlementGuard.tsx +0 -21
  209. package/src/components/guards/EnumEntitlementGuard.tsx +0 -17
  210. package/src/components/guards/MeteredEntitlementGuard.tsx +0 -21
  211. package/src/components/guards/NumericEntitlementGuard.tsx +0 -21
  212. package/src/components/hooks/index.ts +0 -1
  213. package/src/components/hooks/useChargeSort.ts +0 -17
  214. package/src/components/hooks/useIsScreenWiderThan.ts +0 -6
  215. package/src/components/hooks/useWaitForCheckoutCompleted.ts +0 -65
  216. package/src/components/paywall/BillingPeriodPicker.tsx +0 -90
  217. package/src/components/paywall/EntitlementRow.tsx +0 -127
  218. package/src/components/paywall/Paywall.tsx +0 -189
  219. package/src/components/paywall/PaywallContainer.tsx +0 -119
  220. package/src/components/paywall/PaywallLoader.tsx +0 -96
  221. package/src/components/paywall/PlanCompatibleAddons.tsx +0 -127
  222. package/src/components/paywall/PlanEntitlements.tsx +0 -75
  223. package/src/components/paywall/PlanOffering.tsx +0 -256
  224. package/src/components/paywall/PlanOfferingButton.tsx +0 -232
  225. package/src/components/paywall/PlanPrice.tsx +0 -154
  226. package/src/components/paywall/hooks/useLoadPaywallData.ts +0 -75
  227. package/src/components/paywall/index.ts +0 -5
  228. package/src/components/paywall/paywallTextOverrides.ts +0 -79
  229. package/src/components/paywall/types.ts +0 -80
  230. package/src/components/paywall/utils/calculateTrialDaysLeft.ts +0 -5
  231. package/src/components/paywall/utils/calculateUnitQuantityText.ts +0 -23
  232. package/src/components/paywall/utils/computeDefaultBillingPeriod.ts +0 -36
  233. package/src/components/paywall/utils/getPlansToDisplay.ts +0 -13
  234. package/src/components/paywall/utils/hasPricePoints.ts +0 -10
  235. package/src/components/paywall/utils/mapPaywallData.ts +0 -126
  236. package/src/components/utils/calculateDiscountRate.ts +0 -49
  237. package/src/components/utils/currencyUtils.ts +0 -38
  238. package/src/components/utils/dateUtils.ts +0 -17
  239. package/src/components/utils/fixtures/price.fixtures.ts +0 -42
  240. package/src/components/utils/formatNumber.ts +0 -5
  241. package/src/components/utils/getFeatureName.ts +0 -26
  242. package/src/components/utils/getPaidPriceText.ts +0 -77
  243. package/src/components/utils/getPlanPrice.ts +0 -62
  244. package/src/components/utils/getSubscriptionScheduleUpdateTexts.tsx +0 -88
  245. package/src/components/utils/numberUtils.ts +0 -6
  246. package/src/components/utils/onWheelBlur.ts +0 -3
  247. package/src/components/utils/planPrices.ts +0 -10
  248. package/src/components/utils/priceTierUtils.spec.ts +0 -84
  249. package/src/components/utils/priceTierUtils.ts +0 -250
  250. package/src/components/utils/priceUtils.ts +0 -11
  251. package/src/custom.d.ts +0 -6
  252. package/src/hooks/index.ts +0 -8
  253. package/src/hooks/useActiveSubscriptions.ts +0 -21
  254. package/src/hooks/useBooleanEntitlement.ts +0 -20
  255. package/src/hooks/useCustomerPortal.ts +0 -21
  256. package/src/hooks/useEnumEntitlement.ts +0 -20
  257. package/src/hooks/useFetch.ts +0 -32
  258. package/src/hooks/useMeteredEntitlement.ts +0 -20
  259. package/src/hooks/useNumericEntitlement.ts +0 -20
  260. package/src/hooks/usePaywall.ts +0 -21
  261. package/src/hooks/useStiggContext.ts +0 -13
  262. package/src/index.ts +0 -103
  263. package/src/services/logger.ts +0 -22
  264. package/src/stories/Checkout.stories.tsx +0 -123
  265. package/src/stories/CreditBalance.stories.tsx +0 -248
  266. package/src/stories/CreditGrants.stories.tsx +0 -210
  267. package/src/stories/CreditUsageChart.stories.tsx +0 -347
  268. package/src/stories/CreditUtilization.stories.tsx +0 -287
  269. package/src/stories/CustomTheme.ts +0 -57
  270. package/src/stories/CustomerPortal.stories.tsx +0 -265
  271. package/src/stories/GenericTable.stories.tsx +0 -263
  272. package/src/stories/Paywall.stories.tsx +0 -147
  273. package/src/stories/ProgressBar.stories.tsx +0 -103
  274. package/src/stories/StatusChip.stories.tsx +0 -154
  275. package/src/stories/baseArgs.ts +0 -10
  276. package/src/stories/mocks/checkout/consts.ts +0 -15
  277. package/src/stories/mocks/checkout/mockCheckoutPreview.ts +0 -152
  278. package/src/stories/mocks/checkout/mockCheckoutState.ts +0 -212
  279. package/src/styles.css +0 -46
  280. package/src/theme/Fonts.tsx +0 -80
  281. package/src/theme/Theme.tsx +0 -64
  282. package/src/theme/emotion.d.ts +0 -17
  283. package/src/theme/getResolvedTheme.ts +0 -135
  284. package/src/theme/types.ts +0 -85
  285. package/src/types.ts +0 -22
  286. package/src/utils/styledUtils.ts +0 -64
@@ -1,53 +1,67 @@
1
- "use strict";var za=Object.create;var It=Object.defineProperty,Ka=Object.defineProperties,Qa=Object.getOwnPropertyDescriptor,Xa=Object.getOwnPropertyDescriptors,Ja=Object.getOwnPropertyNames,tt=Object.getOwnPropertySymbols,er=Object.getPrototypeOf,vt=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable;var vn=(e,n,i)=>n in e?It(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,T=(e,n)=>{for(var i in n||(n={}))vt.call(n,i)&&vn(e,i,n[i]);if(tt)for(var i of tt(n))An.call(n,i)&&vn(e,i,n[i]);return e},O=(e,n)=>Ka(e,Xa(n));var ie=(e,n)=>{var i={};for(var a in e)vt.call(e,a)&&n.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&tt)for(var a of tt(e))n.indexOf(a)<0&&An.call(e,a)&&(i[a]=e[a]);return i};var tr=(e,n,i,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of Ja(n))!vt.call(e,t)&&t!==i&&It(e,t,{get:()=>n[t],enumerable:!(a=Qa(n,t))||a.enumerable});return e};var nr=(e,n,i)=>(i=e!=null?za(er(e)):{},tr(n||!e||!e.__esModule?It(i,"default",{value:e,enumerable:!0}):i,e));var B=(e,n,i)=>new Promise((a,t)=>{var o=l=>{try{c(i.next(l))}catch(u){t(u)}},s=l=>{try{c(i.throw(l))}catch(u){t(u)}},c=l=>l.done?a(l.value):Promise.resolve(l.value).then(o,s);c((i=i.apply(e,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("@stigg/js-client-sdk"),r=require("react/jsx-runtime"),D=require("react"),di=require("@emotion/styled"),mi=require("classnames"),j=require("@mui/material/Grid"),ne=require("@emotion/react"),K=require("lodash"),gi=require("react-spinners/ClipLoader"),ae=require("color"),ze=require("lodash/merge"),te=require("moment"),pe=require("lodash/isNil"),ir=require("currency-symbol-map"),ar=require("@mui/material/InputAdornment"),be=require("@mui/material/Button"),rr=require("@mui/material/TextField"),je=require("@mui/material/Divider"),V=require("react-loading-skeleton"),or=require("@mui/material/OutlinedInput"),sr=require("@mui/material/Select"),cr=require("@mui/material/MenuItem"),Z=require("@mui/material"),lr=require("react-switch"),At=require("@mui/material/styles"),z=require("@mui/material/Box"),ur=require("@mui/material/Tabs"),Te=require("react-feather"),pi=require("@mui/material/Link"),kt=require("@mui/material/Tooltip"),at=require("@mui/material/LinearProgress"),dr=require("immer"),mr=require("lodash/cloneDeep"),gr=require("lodash/remove"),ft=require("lodash/sortBy"),kn=require("lodash/keyBy"),Nn=require("lodash/compact"),pr=require("lodash/partition"),Jt=require("@mui/material/CircularProgress"),fr=require("@mui/material/Paper"),en=require("lodash/isEmpty"),He=require("@stripe/react-stripe-js"),hr=require("react-lottie"),fi=require("@mui/material/Collapse"),Nt=require("lodash/lowerCase"),hi=require("@mui/material/Alert"),yi=require("@mui/material/Radio"),yr=require("@mui/material/Chip"),le=require("chart.js"),Cr=require("chartjs-plugin-datalabels"),Pr=require("chartjs-plugin-annotation"),br=require("chartjs-plugin-gradient"),Er=require("react-chartjs-2"),Sr=require("lodash/debounce"),Ci=require("lodash/flatMap"),wn=require("@mui/material/Tab"),Fn=require("lodash/isUndefined"),Dr=require("@mui/material/StepIcon");function xr(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,a.get?a:{enumerable:!0,get:()=>e[i]})}}return n.default=e,Object.freeze(n)}const C=xr(D),Pi={shouldForwardProp:e=>!e.startsWith("$")},p=e=>di(e,Pi),Tr=["div","span","button","input","form","p","h1","h2","h3","h4","h5","h6","a","img","ul","ol","li","table","thead","tbody","tr","td","th"];Tr.forEach(e=>{p[e]=di(e,Pi)});function bi(e,n,i){const a=i?` ${i}`:"";return(!e||e===1)&&n?`Up to ${n}${a}`:e&&e>1&&n?`${e}-${n}${a}`:e&&e>1?`Minimum ${e}${a}`:""}function Ei(e){return e==null?void 0:e.toLocaleString("en-US",{maximumFractionDigits:0})}function Ir(e,n){const i=e.stigg.palette;switch(n){case"white":return"white";case"primary.main":return i.primary;case"primary.main.light":return i.primaryLight;case"warning":return i.warning;case"error":return i.error;default:return i.text[n]||i.text.primary}}function Ht(e,n="body1"){const i=e.stigg.typography,a={h1:i.h1,h3:i.h2,h6:i.h3,body1:i.body,caption:i.caption};return a[n]||a.body1}const vr=p.div`
1
+ "use strict";var Po=Object.create;var sn=Object.defineProperty,So=Object.defineProperties,Do=Object.getOwnPropertyDescriptor,vo=Object.getOwnPropertyDescriptors,xo=Object.getOwnPropertyNames,St=Object.getOwnPropertySymbols,Io=Object.getPrototypeOf,cn=Object.prototype.hasOwnProperty,Ei=Object.prototype.propertyIsEnumerable;var bi=(e,n,i)=>n in e?sn(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,I=(e,n)=>{for(var i in n||(n={}))cn.call(n,i)&&bi(e,i,n[i]);if(St)for(var i of St(n))Ei.call(n,i)&&bi(e,i,n[i]);return e},_=(e,n)=>So(e,vo(n));var se=(e,n)=>{var i={};for(var r in e)cn.call(e,r)&&n.indexOf(r)<0&&(i[r]=e[r]);if(e!=null&&St)for(var r of St(e))n.indexOf(r)<0&&Ei.call(e,r)&&(i[r]=e[r]);return i};var To=(e,n,i,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of xo(n))!cn.call(e,t)&&t!==i&&sn(e,t,{get:()=>n[t],enumerable:!(r=Do(n,t))||r.enumerable});return e};var Ao=(e,n,i)=>(i=e!=null?Po(Io(e)):{},To(n||!e||!e.__esModule?sn(i,"default",{value:e,enumerable:!0}):i,e));var B=(e,n,i)=>new Promise((r,t)=>{var a=l=>{try{c(i.next(l))}catch(u){t(u)}},s=l=>{try{c(i.throw(l))}catch(u){t(u)}},c=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,s);c((i=i.apply(e,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("@stigg/js-client-sdk"),o=require("react/jsx-runtime"),D=require("react"),Dr=require("classnames"),R=require("@mui/material/Grid"),ee=require("lodash"),vr=require("react-spinners/ClipLoader"),le=require("color"),ft=require("lodash/merge"),oe=require("moment"),De=require("lodash/isNil"),ko=require("currency-symbol-map"),No=require("@mui/material/InputAdornment"),we=require("@mui/material/Button"),wo=require("@mui/material/TextField"),We=require("@mui/material/Divider"),H=require("react-loading-skeleton"),Fo=require("@mui/material/OutlinedInput"),jo=require("@mui/material/Select"),Ro=require("@mui/material/MenuItem"),K=require("@mui/material"),Mo=require("react-switch"),Gt=require("lodash/sortBy"),ln=require("@mui/material/styles"),Q=require("@mui/material/Box"),Uo=require("@mui/material/Tabs"),Oe=require("react-feather"),xr=require("@mui/material/Link"),un=require("@mui/material/Tooltip"),It=require("@mui/material/LinearProgress"),Oo=require("immer"),Lo=require("lodash/cloneDeep"),Bo=require("lodash/remove"),Pi=require("lodash/keyBy"),Si=require("lodash/compact"),_o=require("lodash/partition"),Bn=require("@mui/material/CircularProgress"),$o=require("@mui/material/Paper"),_n=require("lodash/isEmpty"),st=require("@stripe/react-stripe-js"),Go=require("react-lottie"),Ir=require("@mui/material/Collapse"),dn=require("lodash/lowerCase"),Tr=require("@mui/material/Alert"),Ar=require("@mui/material/Radio"),Vo=require("@mui/material/Chip"),he=require("chart.js"),Ho=require("chartjs-plugin-datalabels"),qo=require("chartjs-plugin-annotation"),Wo=require("chartjs-plugin-gradient"),Yo=require("react-chartjs-2"),Zo=require("lodash/debounce"),kr=require("lodash/flatMap"),Di=require("@mui/material/Tab"),xi=require("lodash/isUndefined"),zo=require("@mui/material/StepIcon");function Ko(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:()=>e[i]})}}return n.default=e,Object.freeze(n)}const E=Ko(D);function In(){return In=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},In.apply(this,arguments)}function Nr(e){var n=Object.create(null);return function(i){return n[i]===void 0&&(n[i]=e(i)),n[i]}}var Qo=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Xo=Nr(function(e){return Qo.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function Jo(e){if(e.sheet)return e.sheet;for(var n=0;n<document.styleSheets.length;n++)if(document.styleSheets[n].ownerNode===e)return document.styleSheets[n]}function es(e){var n=document.createElement("style");return n.setAttribute("data-emotion",e.key),e.nonce!==void 0&&n.setAttribute("nonce",e.nonce),n.appendChild(document.createTextNode("")),n.setAttribute("data-s",""),n}var ts=(function(){function e(i){var r=this;this._insertTag=function(t){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(t,a),r.tags.push(t)},this.isSpeedy=i.speedy===void 0?process.env.NODE_ENV==="production":i.speedy,this.tags=[],this.ctr=0,this.nonce=i.nonce,this.key=i.key,this.container=i.container,this.prepend=i.prepend,this.insertionPoint=i.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(r){r.forEach(this._insertTag)},n.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(es(this));var t=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var a=r.charCodeAt(0)===64&&r.charCodeAt(1)===105;a&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
2
+ `+r+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!a}if(this.isSpeedy){var s=Jo(t);try{s.insertRule(r,s.cssRules.length)}catch(c){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(r)&&console.error('There was a problem inserting the following rule: "'+r+'"',c)}}else t.appendChild(document.createTextNode(r));this.ctr++},n.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},e})(),ae="-ms-",Ot="-moz-",$="-webkit-",$n="comm",Gn="rule",Vn="decl",ns="@import",wr="@keyframes",is=Math.abs,Vt=String.fromCharCode,rs=Object.assign;function as(e,n){return ie(e,0)^45?(((n<<2^ie(e,0))<<2^ie(e,1))<<2^ie(e,2))<<2^ie(e,3):0}function Fr(e){return e.trim()}function os(e,n){return(e=n.exec(e))?e[0]:e}function G(e,n,i){return e.replace(n,i)}function Tn(e,n){return e.indexOf(n)}function ie(e,n){return e.charCodeAt(n)|0}function ct(e,n,i){return e.slice(n,i)}function Ee(e){return e.length}function Hn(e){return e.length}function Dt(e,n){return n.push(e),e}function ss(e,n){return e.map(n).join("")}var Ht=1,Ye=1,jr=0,ce=0,J=0,ze="";function qt(e,n,i,r,t,a,s){return{value:e,root:n,parent:i,type:r,props:t,children:a,line:Ht,column:Ye,length:s,return:""}}function nt(e,n){return rs(qt("",null,null,"",null,null,0),e,{length:-e.length},n)}function cs(){return J}function ls(){return J=ce>0?ie(ze,--ce):0,Ye--,J===10&&(Ye=1,Ht--),J}function de(){return J=ce<jr?ie(ze,ce++):0,Ye++,J===10&&(Ye=1,Ht++),J}function Pe(){return ie(ze,ce)}function Tt(){return ce}function ht(e,n){return ct(ze,e,n)}function lt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Rr(e){return Ht=Ye=1,jr=Ee(ze=e),ce=0,[]}function Mr(e){return ze="",e}function At(e){return Fr(ht(ce-1,An(e===91?e+2:e===40?e+1:e)))}function us(e){for(;(J=Pe())&&J<33;)de();return lt(e)>2||lt(J)>3?"":" "}function ds(e,n){for(;--n&&de()&&!(J<48||J>102||J>57&&J<65||J>70&&J<97););return ht(e,Tt()+(n<6&&Pe()==32&&de()==32))}function An(e){for(;de();)switch(J){case e:return ce;case 34:case 39:e!==34&&e!==39&&An(J);break;case 40:e===41&&An(e);break;case 92:de();break}return ce}function ms(e,n){for(;de()&&e+J!==57;)if(e+J===84&&Pe()===47)break;return"/*"+ht(n,ce-1)+"*"+Vt(e===47?e:de())}function gs(e){for(;!lt(Pe());)de();return ht(e,ce)}function ps(e){return Mr(kt("",null,null,null,[""],e=Rr(e),0,[0],e))}function kt(e,n,i,r,t,a,s,c,l){for(var u=0,d=0,p=s,m=0,f=0,g=0,y=1,P=1,S=1,v=0,A="",k=t,w=a,T=r,N=A;P;)switch(g=v,v=de()){case 40:if(g!=108&&ie(N,p-1)==58){Tn(N+=G(At(v),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:N+=At(v);break;case 9:case 10:case 13:case 32:N+=us(g);break;case 92:N+=ds(Tt()-1,7);continue;case 47:switch(Pe()){case 42:case 47:Dt(fs(ms(de(),Tt()),n,i),l);break;default:N+="/"}break;case 123*y:c[u++]=Ee(N)*S;case 125*y:case 59:case 0:switch(v){case 0:case 125:P=0;case 59+d:f>0&&Ee(N)-p&&Dt(f>32?Ti(N+";",r,i,p-1):Ti(G(N," ","")+";",r,i,p-2),l);break;case 59:N+=";";default:if(Dt(T=Ii(N,n,i,u,d,t,c,A,k=[],w=[],p),a),v===123)if(d===0)kt(N,n,T,T,k,a,p,c,w);else switch(m===99&&ie(N,3)===110?100:m){case 100:case 109:case 115:kt(e,T,T,r&&Dt(Ii(e,T,T,0,0,t,c,A,t,k=[],p),w),t,w,p,c,r?k:w);break;default:kt(N,T,T,T,[""],w,0,c,w)}}u=d=f=0,y=S=1,A=N="",p=s;break;case 58:p=1+Ee(N),f=g;default:if(y<1){if(v==123)--y;else if(v==125&&y++==0&&ls()==125)continue}switch(N+=Vt(v),v*y){case 38:S=d>0?1:(N+="\f",-1);break;case 44:c[u++]=(Ee(N)-1)*S,S=1;break;case 64:Pe()===45&&(N+=At(de())),m=Pe(),d=p=Ee(A=N+=gs(Tt())),v++;break;case 45:g===45&&Ee(N)==2&&(y=0)}}return a}function Ii(e,n,i,r,t,a,s,c,l,u,d){for(var p=t-1,m=t===0?a:[""],f=Hn(m),g=0,y=0,P=0;g<r;++g)for(var S=0,v=ct(e,p+1,p=is(y=s[g])),A=e;S<f;++S)(A=Fr(y>0?m[S]+" "+v:G(v,/&\f/g,m[S])))&&(l[P++]=A);return qt(e,n,i,t===0?Gn:c,l,u,d)}function fs(e,n,i){return qt(e,n,i,$n,Vt(cs()),ct(e,2,-2),0)}function Ti(e,n,i,r){return qt(e,n,i,Vn,ct(e,0,r),ct(e,r+1,-1),r)}function qe(e,n){for(var i="",r=Hn(e),t=0;t<r;t++)i+=n(e[t],t,e,n)||"";return i}function hs(e,n,i,r){switch(e.type){case ns:case Vn:return e.return=e.return||e.value;case $n:return"";case wr:return e.return=e.value+"{"+qe(e.children,r)+"}";case Gn:e.value=e.props.join(",")}return Ee(i=qe(e.children,r))?e.return=e.value+"{"+i+"}":""}function ys(e){var n=Hn(e);return function(i,r,t,a){for(var s="",c=0;c<n;c++)s+=e[c](i,r,t,a)||"";return s}}function Cs(e){return function(n){n.root||(n=n.return)&&e(n)}}var Ai=function(n){var i=new WeakMap;return function(r){if(i.has(r))return i.get(r);var t=n(r);return i.set(r,t),t}},bs=function(n,i,r){for(var t=0,a=0;t=a,a=Pe(),t===38&&a===12&&(i[r]=1),!lt(a);)de();return ht(n,ce)},Es=function(n,i){var r=-1,t=44;do switch(lt(t)){case 0:t===38&&Pe()===12&&(i[r]=1),n[r]+=bs(ce-1,i,r);break;case 2:n[r]+=At(t);break;case 4:if(t===44){n[++r]=Pe()===58?"&\f":"",i[r]=n[r].length;break}default:n[r]+=Vt(t)}while(t=de());return n},Ps=function(n,i){return Mr(Es(Rr(n),i))},ki=new WeakMap,Ss=function(n){if(!(n.type!=="rule"||!n.parent||n.length<1)){for(var i=n.value,r=n.parent,t=n.column===r.column&&n.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(n.props.length===1&&i.charCodeAt(0)!==58&&!ki.get(r))&&!t){ki.set(n,!0);for(var a=[],s=Ps(i,a),c=r.props,l=0,u=0;l<s.length;l++)for(var d=0;d<c.length;d++,u++)n.props[u]=a[l]?s[l].replace(/&\f/g,c[d]):c[d]+" "+s[l]}}},Ds=function(n){if(n.type==="decl"){var i=n.value;i.charCodeAt(0)===108&&i.charCodeAt(2)===98&&(n.return="",n.value="")}},vs="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",xs=function(n){return n.type==="comm"&&n.children.indexOf(vs)>-1},Is=function(n){return function(i,r,t){if(!(i.type!=="rule"||n.compat)){var a=i.value.match(/(:first|:nth|:nth-last)-child/g);if(a){for(var s=i.parent===t[0],c=s?t[0].children:t,l=c.length-1;l>=0;l--){var u=c[l];if(u.line<i.line)break;if(u.column<i.column){if(xs(u))return;break}}a.forEach(function(d){console.error('The pseudo class "'+d+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+d.split("-child")[0]+'-of-type".')})}}}},Ur=function(n){return n.type.charCodeAt(1)===105&&n.type.charCodeAt(0)===64},Ts=function(n,i){for(var r=n-1;r>=0;r--)if(!Ur(i[r]))return!0;return!1},Ni=function(n){n.type="",n.value="",n.return="",n.children="",n.props=""},As=function(n,i,r){Ur(n)&&(n.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),Ni(n)):Ts(i,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),Ni(n)))};function Or(e,n){switch(as(e,n)){case 5103:return $+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return $+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return $+e+Ot+e+ae+e+e;case 6828:case 4268:return $+e+ae+e+e;case 6165:return $+e+ae+"flex-"+e+e;case 5187:return $+e+G(e,/(\w+).+(:[^]+)/,$+"box-$1$2"+ae+"flex-$1$2")+e;case 5443:return $+e+ae+"flex-item-"+G(e,/flex-|-self/,"")+e;case 4675:return $+e+ae+"flex-line-pack"+G(e,/align-content|flex-|-self/,"")+e;case 5548:return $+e+ae+G(e,"shrink","negative")+e;case 5292:return $+e+ae+G(e,"basis","preferred-size")+e;case 6060:return $+"box-"+G(e,"-grow","")+$+e+ae+G(e,"grow","positive")+e;case 4554:return $+G(e,/([^-])(transform)/g,"$1"+$+"$2")+e;case 6187:return G(G(G(e,/(zoom-|grab)/,$+"$1"),/(image-set)/,$+"$1"),e,"")+e;case 5495:case 3959:return G(e,/(image-set\([^]*)/,$+"$1$`$1");case 4968:return G(G(e,/(.+:)(flex-)?(.*)/,$+"box-pack:$3"+ae+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$+e+e;case 4095:case 3583:case 4068:case 2532:return G(e,/(.+)-inline(.+)/,$+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ee(e)-1-n>6)switch(ie(e,n+1)){case 109:if(ie(e,n+4)!==45)break;case 102:return G(e,/(.+:)(.+)-([^]+)/,"$1"+$+"$2-$3$1"+Ot+(ie(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~Tn(e,"stretch")?Or(G(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(ie(e,n+1)!==115)break;case 6444:switch(ie(e,Ee(e)-3-(~Tn(e,"!important")&&10))){case 107:return G(e,":",":"+$)+e;case 101:return G(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$+(ie(e,14)===45?"inline-":"")+"box$3$1"+$+"$2$3$1"+ae+"$2box$3")+e}break;case 5936:switch(ie(e,n+11)){case 114:return $+e+ae+G(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $+e+ae+G(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $+e+ae+G(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return $+e+ae+e+e}return e}var ks=function(n,i,r,t){if(n.length>-1&&!n.return)switch(n.type){case Vn:n.return=Or(n.value,n.length);break;case wr:return qe([nt(n,{value:G(n.value,"@","@"+$)})],t);case Gn:if(n.length)return ss(n.props,function(a){switch(os(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return qe([nt(n,{props:[G(a,/:(read-\w+)/,":"+Ot+"$1")]})],t);case"::placeholder":return qe([nt(n,{props:[G(a,/:(plac\w+)/,":"+$+"input-$1")]}),nt(n,{props:[G(a,/:(plac\w+)/,":"+Ot+"$1")]}),nt(n,{props:[G(a,/:(plac\w+)/,ae+"input-$1")]})],t)}return""})}},Ns=[ks],ws=function(n){var i=n.key;if(process.env.NODE_ENV!=="production"&&!i)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
3
+ If multiple caches share the same key they might "fight" for each other's style elements.`);if(i==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var P=y.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var t=n.stylisPlugins||Ns;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(i))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+i+'" was passed');var a={},s,c=[];s=n.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+i+' "]'),function(y){for(var P=y.getAttribute("data-emotion").split(" "),S=1;S<P.length;S++)a[P[S]]=!0;c.push(y)});var l,u=[Ss,Ds];process.env.NODE_ENV!=="production"&&u.push(Is({get compat(){return g.compat}}),As);{var d,p=[hs,process.env.NODE_ENV!=="production"?function(y){y.root||(y.return?d.insert(y.return):y.value&&y.type!==$n&&d.insert(y.value+"{}"))}:Cs(function(y){d.insert(y)})],m=ys(u.concat(t,p)),f=function(P){return qe(ps(P),m)};l=function(P,S,v,A){d=v,process.env.NODE_ENV!=="production"&&S.map!==void 0&&(d={insert:function(w){v.insert(w+S.map)}}),f(P?P+"{"+S.styles+"}":S.styles),A&&(g.inserted[S.name]=!0)}}var g={key:i,sheet:new ts({key:i,container:s,nonce:n.nonce,speedy:n.speedy,prepend:n.prepend,insertionPoint:n.insertionPoint}),nonce:n.nonce,inserted:a,registered:{},insert:l};return g.sheet.hydrate(c),g};function kn(){return kn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},kn.apply(this,arguments)}function Fs(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var i=function r(){var t=!1;try{t=this instanceof r}catch(a){}return t?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(i,r,t.get?t:{enumerable:!0,get:function(){return e[r]}})}),i}var js=!0;function qn(e,n,i){var r="";return i.split(" ").forEach(function(t){e[t]!==void 0?n.push(e[t]+";"):r+=t+" "}),r}var Wt=function(n,i,r){var t=n.key+"-"+i.name;(r===!1||js===!1)&&n.registered[t]===void 0&&(n.registered[t]=i.styles)},Yt=function(n,i,r){Wt(n,i,r);var t=n.key+"-"+i.name;if(n.inserted[i.name]===void 0){var a=i;do n.insert(i===a?"."+t:"",a,n.sheet,!0),a=a.next;while(a!==void 0)}};function Rs(e){for(var n=0,i,r=0,t=e.length;t>=4;++r,t-=4)i=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,i=(i&65535)*1540483477+((i>>>16)*59797<<16),i^=i>>>24,n=(i&65535)*1540483477+((i>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(t){case 3:n^=(e.charCodeAt(r+2)&255)<<16;case 2:n^=(e.charCodeAt(r+1)&255)<<8;case 1:n^=e.charCodeAt(r)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}var Ms={animationIterationCount: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,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},wi=`You have illegal escape sequence in your template literal, most likely inside content's property value.
4
+ Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
5
+ You can read more about this here:
6
+ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,Us="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",Os=/[A-Z]|^ms/g,Lr=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Wn=function(n){return n.charCodeAt(1)===45},Fi=function(n){return n!=null&&typeof n!="boolean"},mn=Nr(function(e){return Wn(e)?e:e.replace(Os,"-$&").toLowerCase()}),Lt=function(n,i){switch(n){case"animation":case"animationName":if(typeof i=="string")return i.replace(Lr,function(r,t,a){return Ce={name:t,styles:a,next:Ce},t})}return Ms[n]!==1&&!Wn(n)&&typeof i=="number"&&i!==0?i+"px":i};if(process.env.NODE_ENV!=="production"){var Ls=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,Bs=["normal","none","initial","inherit","unset"],_s=Lt,$s=/^-ms-/,Gs=/-(.)/g,ji={};Lt=function(n,i){if(n==="content"&&(typeof i!="string"||Bs.indexOf(i)===-1&&!Ls.test(i)&&(i.charAt(0)!==i.charAt(i.length-1)||i.charAt(0)!=='"'&&i.charAt(0)!=="'")))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+i+"\"'`");var r=_s(n,i);return r!==""&&!Wn(n)&&n.indexOf("-")!==-1&&ji[n]===void 0&&(ji[n]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+n.replace($s,"ms-").replace(Gs,function(t,a){return a.toUpperCase()})+"?")),r}}var Br="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ut(e,n,i){if(i==null)return"";if(i.__emotion_styles!==void 0){if(process.env.NODE_ENV!=="production"&&i.toString()==="NO_COMPONENT_SELECTOR")throw new Error(Br);return i}switch(typeof i){case"boolean":return"";case"object":{if(i.anim===1)return Ce={name:i.name,styles:i.styles,next:Ce},i.name;if(i.styles!==void 0){var r=i.next;if(r!==void 0)for(;r!==void 0;)Ce={name:r.name,styles:r.styles,next:Ce},r=r.next;var t=i.styles+";";return process.env.NODE_ENV!=="production"&&i.map!==void 0&&(t+=i.map),t}return Vs(e,n,i)}case"function":{if(e!==void 0){var a=Ce,s=i(e);return Ce=a,ut(e,n,s)}else process.env.NODE_ENV!=="production"&&console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break}case"string":if(process.env.NODE_ENV!=="production"){var c=[],l=i.replace(Lr,function(d,p,m){var f="animation"+c.length;return c.push("const "+f+" = keyframes`"+m.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+f+"}"});c.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(c,["`"+l+"`"]).join(`
7
+ `)+`
8
+
9
+ You should wrap it with \`css\` like this:
10
+
11
+ `+("css`"+l+"`"))}break}if(n==null)return i;var u=n[i];return u!==void 0?u:i}function Vs(e,n,i){var r="";if(Array.isArray(i))for(var t=0;t<i.length;t++)r+=ut(e,n,i[t])+";";else for(var a in i){var s=i[a];if(typeof s!="object")n!=null&&n[s]!==void 0?r+=a+"{"+n[s]+"}":Fi(s)&&(r+=mn(a)+":"+Lt(a,s)+";");else{if(a==="NO_COMPONENT_SELECTOR"&&process.env.NODE_ENV!=="production")throw new Error(Br);if(Array.isArray(s)&&typeof s[0]=="string"&&(n==null||n[s[0]]===void 0))for(var c=0;c<s.length;c++)Fi(s[c])&&(r+=mn(a)+":"+Lt(a,s[c])+";");else{var l=ut(e,n,s);switch(a){case"animation":case"animationName":{r+=mn(a)+":"+l+";";break}default:process.env.NODE_ENV!=="production"&&a==="undefined"&&console.error(Us),r+=a+"{"+l+"}"}}}}return r}var Ri=/label:\s*([^\s;\n{]+)\s*(;|$)/g,_r;process.env.NODE_ENV!=="production"&&(_r=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);var Ce,Ze=function(n,i,r){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var t=!0,a="";Ce=void 0;var s=n[0];s==null||s.raw===void 0?(t=!1,a+=ut(r,i,s)):(process.env.NODE_ENV!=="production"&&s[0]===void 0&&console.error(wi),a+=s[0]);for(var c=1;c<n.length;c++)a+=ut(r,i,n[c]),t&&(process.env.NODE_ENV!=="production"&&s[c]===void 0&&console.error(wi),a+=s[c]);var l;process.env.NODE_ENV!=="production"&&(a=a.replace(_r,function(m){return l=m,""})),Ri.lastIndex=0;for(var u="",d;(d=Ri.exec(a))!==null;)u+="-"+d[1];var p=Rs(a)+u;return process.env.NODE_ENV!=="production"?{name:p,styles:a,map:l,next:Ce,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}:{name:p,styles:a,next:Ce}},Hs=function(n){return n()},$r=E.useInsertionEffect?E.useInsertionEffect:!1,Yn=$r||Hs,Mi=$r||D.useLayoutEffect,qs={}.hasOwnProperty,Gr=D.createContext(typeof HTMLElement!="undefined"?ws({key:"css"}):null);process.env.NODE_ENV!=="production"&&(Gr.displayName="EmotionCacheContext");var Zt=function(n){return D.forwardRef(function(i,r){var t=D.useContext(Gr);return n(i,t,r)})},Fe=D.createContext({});process.env.NODE_ENV!=="production"&&(Fe.displayName="EmotionThemeContext");var zt=function(){return D.useContext(Fe)},Ws=function(n,i){if(typeof i=="function"){var r=i(n);if(process.env.NODE_ENV!=="production"&&(r==null||typeof r!="object"||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if(process.env.NODE_ENV!=="production"&&(i==null||typeof i!="object"||Array.isArray(i)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return kn({},n,i)},Ys=Ai(function(e){return Ai(function(n){return Ws(e,n)})}),Zs=function(n){var i=D.useContext(Fe);return n.theme!==i&&(i=Ys(i)(n.theme)),D.createElement(Fe.Provider,{value:i},n.children)},Ui="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Oi="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",zs=function(n){var i=n.cache,r=n.serialized,t=n.isStringTag;return Wt(i,r,t),Yn(function(){return Yt(i,r,t)}),null},Ks=Zt(function(e,n,i){var r=e.css;typeof r=="string"&&n.registered[r]!==void 0&&(r=n.registered[r]);var t=e[Ui],a=[r],s="";typeof e.className=="string"?s=qn(n.registered,a,e.className):e.className!=null&&(s=e.className+" ");var c=Ze(a,void 0,D.useContext(Fe));if(process.env.NODE_ENV!=="production"&&c.name.indexOf("-")===-1){var l=e[Oi];l&&(c=Ze([c,"label:"+l+";"]))}s+=n.key+"-"+c.name;var u={};for(var d in e)qs.call(e,d)&&d!=="css"&&d!==Ui&&(process.env.NODE_ENV==="production"||d!==Oi)&&(u[d]=e[d]);return u.ref=i,u.className=s,D.createElement(D.Fragment,null,D.createElement(zs,{cache:n,serialized:c,isStringTag:typeof t=="string"}),D.createElement(t,u))});process.env.NODE_ENV!=="production"&&(Ks.displayName="EmotionCssPropInternal");var Qs={version:"11.10.5"},Li=!1,Vr=Zt(function(e,n){process.env.NODE_ENV!=="production"&&!Li&&(e.className||e.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),Li=!0);var i=e.styles,r=Ze([i],void 0,D.useContext(Fe)),t=D.useRef();return Mi(function(){var a=n.key+"-global",s=new n.sheet.constructor({key:a,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy}),c=!1,l=document.querySelector('style[data-emotion="'+a+" "+r.name+'"]');return n.sheet.tags.length&&(s.before=n.sheet.tags[0]),l!==null&&(c=!0,l.setAttribute("data-emotion",a),s.hydrate([l])),t.current=[s,c],function(){s.flush()}},[n]),Mi(function(){var a=t.current,s=a[0],c=a[1];if(c){a[1]=!1;return}if(r.next!==void 0&&Yt(n,r.next,!0),s.tags.length){var l=s.tags[s.tags.length-1].nextElementSibling;s.before=l,s.flush()}n.insert("",r,s,!1)},[n,r.name]),null});process.env.NODE_ENV!=="production"&&(Vr.displayName="EmotionGlobal");function Ie(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return Ze(n)}var Xs=function e(n){for(var i=n.length,r=0,t="";r<i;r++){var a=n[r];if(a!=null){var s=void 0;switch(typeof a){case"boolean":break;case"object":{if(Array.isArray(a))s=e(a);else{process.env.NODE_ENV!=="production"&&a.styles!==void 0&&a.name!==void 0&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),s="";for(var c in a)a[c]&&c&&(s&&(s+=" "),s+=c)}break}default:s=a}s&&(t&&(t+=" "),t+=s)}}return t};function Js(e,n,i){var r=[],t=qn(e,r,i);return r.length<2?i:t+n(r)}var ec=function(n){var i=n.cache,r=n.serializedArr;return Yn(function(){for(var t=0;t<r.length;t++)Yt(i,r[t],!1)}),null},tc=Zt(function(e,n){var i=!1,r=[],t=function(){if(i&&process.env.NODE_ENV!=="production")throw new Error("css can only be used during render");for(var u=arguments.length,d=new Array(u),p=0;p<u;p++)d[p]=arguments[p];var m=Ze(d,n.registered);return r.push(m),Wt(n,m,!1),n.key+"-"+m.name},a=function(){if(i&&process.env.NODE_ENV!=="production")throw new Error("cx can only be used during render");for(var u=arguments.length,d=new Array(u),p=0;p<u;p++)d[p]=arguments[p];return Js(n.registered,t,Xs(d))},s={css:t,cx:a,theme:D.useContext(Fe)},c=e.children(s);return i=!0,D.createElement(D.Fragment,null,D.createElement(ec,{cache:n,serializedArr:r}),c)});process.env.NODE_ENV!=="production"&&(tc.displayName="EmotionClassNames");if(process.env.NODE_ENV!=="production"){var Bi=!0,nc=typeof jest!="undefined"||typeof vi!="undefined";if(Bi&&!nc){var _i=typeof globalThis!="undefined"?globalThis:Bi?window:global,$i="__EMOTION_REACT_"+Qs.version.split(".")[0]+"__";_i[$i]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),_i[$i]=!0}}var ic=Xo,rc=function(n){return n!=="theme"},Gi=function(n){return typeof n=="string"&&n.charCodeAt(0)>96?ic:rc},Vi=function(n,i,r){var t;if(i){var a=i.shouldForwardProp;t=n.__emotion_forwardProp&&a?function(s){return n.__emotion_forwardProp(s)&&a(s)}:a}return typeof t!="function"&&r&&(t=n.__emotion_forwardProp),t},Hi=`You have illegal escape sequence in your template literal, most likely inside content's property value.
12
+ Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
13
+ You can read more about this here:
14
+ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,ac=function(n){var i=n.cache,r=n.serialized,t=n.isStringTag;return Wt(i,r,t),Yn(function(){return Yt(i,r,t)}),null},oc=function e(n,i){if(process.env.NODE_ENV!=="production"&&n===void 0)throw new Error(`You are trying to create a styled element with an undefined component.
15
+ You may have forgotten to import it.`);var r=n.__emotion_real===n,t=r&&n.__emotion_base||n,a,s;i!==void 0&&(a=i.label,s=i.target);var c=Vi(n,i,r),l=c||Gi(t),u=!l("as");return function(){var d=arguments,p=r&&n.__emotion_styles!==void 0?n.__emotion_styles.slice(0):[];if(a!==void 0&&p.push("label:"+a+";"),d[0]==null||d[0].raw===void 0)p.push.apply(p,d);else{process.env.NODE_ENV!=="production"&&d[0][0]===void 0&&console.error(Hi),p.push(d[0][0]);for(var m=d.length,f=1;f<m;f++)process.env.NODE_ENV!=="production"&&d[0][f]===void 0&&console.error(Hi),p.push(d[f],d[0][f])}var g=Zt(function(y,P,S){var v=u&&y.as||t,A="",k=[],w=y;if(y.theme==null){w={};for(var T in y)w[T]=y[T];w.theme=D.useContext(Fe)}typeof y.className=="string"?A=qn(P.registered,k,y.className):y.className!=null&&(A=y.className+" ");var N=Ze(p.concat(k),P.registered,w);A+=P.key+"-"+N.name,s!==void 0&&(A+=" "+s);var F=u&&c===void 0?Gi(v):l,U={};for(var L in y)u&&L==="as"||F(L)&&(U[L]=y[L]);return U.className=A,U.ref=S,D.createElement(D.Fragment,null,D.createElement(ac,{cache:P,serialized:N,isStringTag:typeof v=="string"}),D.createElement(v,U))});return g.displayName=a!==void 0?a:"Styled("+(typeof t=="string"?t:t.displayName||t.name||"Component")+")",g.defaultProps=n.defaultProps,g.__emotion_real=g,g.__emotion_base=t,g.__emotion_styles=p,g.__emotion_forwardProp=c,Object.defineProperty(g,"toString",{value:function(){return s===void 0&&process.env.NODE_ENV!=="production"?"NO_COMPONENT_SELECTOR":"."+s}}),g.withComponent=function(y,P){return e(y,In({},i,P,{shouldForwardProp:Vi(g,P,!0)})).apply(void 0,p)},g}},sc=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Bt=oc.bind();sc.forEach(function(e){Bt[e]=Bt(e)});const Hr={shouldForwardProp:e=>!e.startsWith("$")},h=e=>Bt(e,Hr),cc=["div","span","button","input","form","p","h1","h2","h3","h4","h5","h6","a","img","ul","ol","li","table","thead","tbody","tr","td","th"];cc.forEach(e=>{h[e]=Bt(e,Hr)});function qr(e,n,i){const r=i?` ${i}`:"";return(!e||e===1)&&n?`Up to ${n}${r}`:e&&e>1&&n?`${e}-${n}${r}`:e&&e>1?`Minimum ${e}${r}`:""}function Wr(e){return e==null?void 0:e.toLocaleString("en-US",{maximumFractionDigits:0})}function lc(e,n){const i=e.stigg.palette;switch(n){case"white":return"white";case"primary.main":return i.primary;case"primary.main.light":return i.primaryLight;case"warning":return i.warning;case"error":return i.error;default:return i.text[n]||i.text.primary}}function Nn(e,n="body1"){const i=e.stigg.typography,r={h1:i.h1,h3:i.h2,h6:i.h3,body1:i.body,caption:i.caption};return r[n]||r.body1}const uc=h.div`
2
16
  margin: 0;
3
17
  ${({$isInline:e})=>e&&"display: inline"};
4
18
 
5
19
  /* Apply typography styles from theme */
6
20
  font-family: ${({theme:e})=>e.stigg.typography.fontFamily};
7
21
  color: ${({$color:e})=>e};
8
- font-weight: ${({$bold:e,theme:n,$variant:i})=>e?"bold":Ht(n,i).fontWeight};
9
- font-size: ${({theme:e,$variant:n})=>Ht(e,n).fontSize};
22
+ font-weight: ${({$bold:e,theme:n,$variant:i})=>e?"bold":Nn(n,i).fontWeight};
23
+ font-size: ${({theme:e,$variant:n})=>Nn(e,n).fontSize};
10
24
  ${({$lineHeight:e})=>e&&`line-height: ${e};`}
11
- `,y=D.forwardRef((e,n)=>{const b=e,{children:i,style:a,variant:t="body1",color:o="primary",overrideColor:s,bold:c=!1,as:l,className:u,lineHeight:d}=b,h=ie(b,["children","style","variant","color","overrideColor","bold","as","className","lineHeight"]),m=ne.useTheme(),f=Ht(m,t),g=l||f.semanticElement,x=s||Ir(m,o);return r.jsx(vr,O(T({as:g,ref:n},h),{className:u,style:a,$variant:t,$bold:c,$color:x,$lineHeight:d,$isInline:g==="span",children:i}))});y.displayName="Typography";const wt=(e,n)=>{switch(e){case"primary":return n.stigg.palette.text.primary;case"secondary":return n.stigg.palette.text.secondary;default:return e}},Ar=e=>C.createElement("svg",T({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("g",{clipPath:"url(#clip0_834_118930)"},C.createElement("path",{d:"M12 6.85712V17.1428",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M6.85712 12H17.1428",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M18 0.857117H5.99997C3.15966 0.857117 0.857117 3.15966 0.857117 5.99997V18C0.857117 20.8404 3.15966 23.1428 5.99997 23.1428H18C20.8404 23.1428 23.1428 20.8404 23.1428 18V5.99997C23.1428 3.15966 20.8404 0.857117 18 0.857117Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})),C.createElement("defs",null,C.createElement("clipPath",{id:"clip0_834_118930"},C.createElement("rect",{width:24,height:24,fill:"white"})))),kr=e=>C.createElement("svg",T({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),C.createElement("path",{d:"M26 27V25C26 22.7909 24.2091 21 22 21H14C11.7909 21 10 22.7909 10 25V27",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 17C20.2091 17 22 15.2091 22 13C22 10.7909 20.2091 9 18 9C15.7909 9 14 10.7909 14 13C14 15.2091 15.7909 17 18 17Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("defs",null,C.createElement("linearGradient",{id:"paint0_linear_67_8545",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"},C.createElement("stop",{stopColor:"#56ACF6"}),C.createElement("stop",{offset:1,stopColor:"#1559E6"})))),Nr=e=>C.createElement("svg",T({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),C.createElement("path",{d:"M27 18.22C27 12.73 22.74 9 18 9C13.31 9 9 12.65 9 18.28C8.4 18.62 8 19.26 8 20V22C8 23.1 8.9 24 10 24H11V17.9C11 14.03 14.13 10.9 18 10.9C21.87 10.9 25 14.03 25 17.9V25H17V27H25C26.1 27 27 26.1 27 25V23.78C27.59 23.47 28 22.86 28 22.14V19.84C28 19.14 27.59 18.53 27 18.22Z",fill:"#7586B0"}),C.createElement("path",{d:"M15 20C15.5523 20 16 19.5523 16 19C16 18.4477 15.5523 18 15 18C14.4477 18 14 18.4477 14 19C14 19.5523 14.4477 20 15 20Z",fill:"#7586B0"}),C.createElement("path",{d:"M21 20C21.5523 20 22 19.5523 22 19C22 18.4477 21.5523 18 21 18C20.4477 18 20 18.4477 20 19C20 19.5523 20.4477 20 21 20Z",fill:"#7586B0"}),C.createElement("path",{d:"M24 17.03C23.52 14.18 21.04 12 18.05 12C15.02 12 11.76 14.51 12.02 18.45C14.49 17.44 16.35 15.24 16.88 12.56C18.19 15.19 20.88 17 24 17.03Z",fill:"#7586B0"}),C.createElement("defs",null,C.createElement("linearGradient",{id:"paint0_linear_267_19310",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"},C.createElement("stop",{stopColor:"#56ACF6"}),C.createElement("stop",{offset:1,stopColor:"#1559E6"})))),wr=e=>C.createElement("svg",T({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),C.createElement("path",{d:"M26 10H10C8.89 10 8.01 10.89 8.01 12L8 24C8 25.11 8.89 26 10 26H26C27.11 26 28 25.11 28 24V12C28 10.89 27.11 10 26 10ZM26 24H10V18H26V24ZM26 14H10V12H26V14Z",fill:"#7586B0"}),C.createElement("defs",null,C.createElement("linearGradient",{id:"paint0_linear_67_8556",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"},C.createElement("stop",{stopColor:"#56ACF6"}),C.createElement("stop",{offset:1,stopColor:"#1559E6"})))),Fr=e=>C.createElement("svg",T({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("g",{clipPath:"url(#clip0_834_120339)"},C.createElement("path",{d:"M10.3336 19.2858C15.462 19.2858 19.6193 15.1285 19.6193 10.0001C19.6193 4.87171 15.462 0.714355 10.3336 0.714355C5.20521 0.714355 1.04785 4.87171 1.04785 10.0001C1.04785 15.1285 5.20521 19.2858 10.3336 19.2858Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M12.7649 7.46052C12.6813 7.22393 12.5523 7.0088 12.3883 6.8256C12.0395 6.43592 11.5327 6.19067 10.9685 6.19067H9.4942C8.55517 6.19067 7.79395 6.9519 7.79395 7.89093C7.79395 8.68995 8.3503 9.38116 9.13086 9.5519L11.3756 10.0429C12.25 10.2342 12.8733 11.0091 12.8733 11.9043C12.8733 12.9562 12.0205 13.8097 10.9685 13.8097H9.6987C8.86936 13.8097 8.16382 13.2797 7.90233 12.5399",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M10.3335 6.19065V4.28589",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M10.3335 15.7144V13.8096",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})),C.createElement("defs",null,C.createElement("clipPath",{id:"clip0_834_120339"},C.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.333496)"})))),Si=e=>C.createElement("svg",T({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.95392 1.03353C7.1196 1.56038 6.82682 2.12178 6.29997 2.28746C5.79034 2.44773 5.30237 2.68036 4.85175 2.98146C3.76168 3.70982 2.95789 4.79361 2.57732 6.04817C2.19675 7.30273 2.26296 8.65044 2.76466 9.86166C3.26637 11.0729 4.17252 12.0727 5.32873 12.6907C6.48494 13.3087 7.81967 13.5067 9.10549 13.2509C10.3913 12.9951 11.5487 12.3014 12.3804 11.288C13.2121 10.2746 13.6666 9.00413 13.6666 7.69312C13.6666 7.14083 14.1144 6.69312 14.6666 6.69312C15.2189 6.69312 15.6666 7.14083 15.6666 7.69312C15.6666 7.92228 15.6564 8.15052 15.6361 8.37721C15.6465 8.44937 15.6492 8.52379 15.6432 8.59952L15.6392 8.64883C15.6298 8.75932 15.6028 8.86407 15.5612 8.96057C15.3409 10.2743 14.7807 11.5158 13.9264 12.5568C12.8012 13.9279 11.2353 14.8664 9.49568 15.2125C7.75603 15.5585 5.95022 15.2906 4.38594 14.4545C2.82166 13.6184 1.59568 12.2657 0.916905 10.627C0.238131 8.98832 0.148554 7.16495 0.663439 5.4676C1.17832 3.77025 2.26581 2.30394 3.74061 1.31852C4.35023 0.911179 5.01049 0.596408 5.69999 0.379577C6.22684 0.213898 6.78824 0.506683 6.95392 1.03353ZM7.56761 1.27284C7.61434 0.722538 8.09832 0.314306 8.64863 0.361031L8.69791 0.365373C9.24791 0.415584 9.65307 0.902149 9.60286 1.45215C9.55265 2.00214 9.06608 2.4073 8.51608 2.35709L8.47942 2.35386C7.92912 2.30714 7.52089 1.82315 7.56761 1.27284ZM12.4186 2.90891C12.8384 2.55014 13.4697 2.59967 13.8284 3.01954C13.8498 3.04454 13.871 3.06967 13.892 3.09494C14.2454 3.51937 14.1878 4.14991 13.7634 4.50329C13.339 4.85667 12.7084 4.79906 12.355 4.37463C12.3395 4.35592 12.3238 4.33731 12.3079 4.31879C11.9492 3.89892 11.9987 3.26769 12.4186 2.90891ZM8.99998 5.33352C8.99998 4.78124 8.55226 4.33352 7.99998 4.33352C7.44769 4.33352 6.99998 4.78124 6.99998 5.33352V8.00019C6.99998 8.55247 7.44769 9.00019 7.99998 9.00019H10.6666C11.2189 9.00019 11.6666 8.55247 11.6666 8.00019C11.6666 7.4479 11.2189 7.00019 10.6666 7.00019H8.99998V5.33352Z",fill:"#7586B0"})),jr=e=>C.createElement("svg",T({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("g",{clipPath:"url(#clip0_834_116282)"},C.createElement("path",{d:"M21.4286 5.32483H2.57146C1.62469 5.32483 0.857178 6.09235 0.857178 7.03911V10.4677C0.857178 11.4145 1.62469 12.182 2.57146 12.182H21.4286C22.3754 12.182 23.1429 11.4145 23.1429 10.4677V7.03911C23.1429 6.09235 22.3754 5.32483 21.4286 5.32483Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M21.4287 12.182V21.6106C21.4287 22.0652 21.248 22.5013 20.9266 22.8227C20.6051 23.1442 20.169 23.3249 19.7144 23.3249H4.28582C3.83116 23.3249 3.39513 23.1442 3.07363 22.8227C2.75215 22.5013 2.57153 22.0652 2.57153 21.6106V12.182",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M12 5.32483V23.3248",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M17.1429 1.03912L12 5.32484L6.85718 1.03912",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})),C.createElement("defs",null,C.createElement("clipPath",{id:"clip0_834_116282"},C.createElement("rect",{width:24,height:24,fill:"white",transform:"translate(0 0.182007)"})))),Di=e=>C.createElement("svg",T({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{d:"M10.8333 2.5C6.69168 2.5 3.33334 5.85833 3.33334 10H0.833344L4.07501 13.2417L4.13334 13.3583L7.50001 10H5.00001C5.00001 6.775 7.60834 4.16667 10.8333 4.16667C14.0583 4.16667 16.6667 6.775 16.6667 10C16.6667 13.225 14.0583 15.8333 10.8333 15.8333C9.22501 15.8333 7.76668 15.175 6.71668 14.1167L5.53334 15.3C6.89168 16.6583 8.75834 17.5 10.8333 17.5C14.975 17.5 18.3333 14.1417 18.3333 10C18.3333 5.85833 14.975 2.5 10.8333 2.5ZM10 6.66667V10.8333L13.5667 12.95L14.1667 11.9417L11.25 10.2083V6.66667H10Z",fill:"#6678A7"})),Ur=e=>C.createElement("svg",T({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("rect",{width:36,height:36,rx:10,fill:"url(#paint0_linear_834_118583)"}),C.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9539 7.70028C16.1196 8.22713 15.8268 8.78853 15.3 8.95421C14.4906 9.20875 13.7155 9.57824 12.9999 10.0564C11.2686 11.2132 9.99197 12.9346 9.38754 14.9271C8.78311 16.9196 8.88826 19.0601 9.68509 20.9838C10.4819 22.9075 11.9211 24.4954 13.7574 25.477C15.5938 26.4585 17.7136 26.7729 19.7558 26.3667C21.798 25.9605 23.6362 24.8588 24.9571 23.2492C26.278 21.6396 27 19.6219 27 17.5397C27 16.9874 27.4477 16.5397 28 16.5397C28.5523 16.5397 29 16.9874 29 17.5397C29 17.8969 28.9826 18.2526 28.9483 18.6056C28.9662 18.6949 28.9722 18.7883 28.9645 18.8837L28.9606 18.9309C28.9496 19.0607 28.9143 19.1825 28.8595 19.2924C28.5513 21.2017 27.7432 23.007 26.5031 24.518C24.8886 26.4852 22.642 27.8318 20.146 28.3283C17.65 28.8248 15.059 28.4405 12.8146 27.2408C10.5702 26.0411 8.81122 24.1004 7.83733 21.7492C6.86343 19.398 6.73491 16.7819 7.47366 14.3465C8.21241 11.9112 9.77272 9.80737 11.8887 8.3935C12.7634 7.80905 13.7107 7.35743 14.7 7.04633C15.2269 6.88065 15.7883 7.17343 15.9539 7.70028ZM17.8497 7.95155C17.8964 7.40125 18.3804 6.99302 18.9307 7.03974L18.9779 7.04385C19.528 7.0929 19.9342 7.57861 19.8851 8.12871C19.8361 8.67881 19.3503 9.085 18.8002 9.03595L18.7615 9.03257C18.2112 8.98585 17.8029 8.50186 17.8497 7.95155ZM22.8579 9.19953C23.172 8.74525 23.7949 8.63161 24.2492 8.9457C24.2751 8.96361 24.3009 8.98162 24.3266 8.99974C24.7782 9.31772 24.8865 9.94155 24.5685 10.3931C24.2505 10.8447 23.6267 10.953 23.1751 10.635C23.1541 10.6202 23.1329 10.6054 23.1118 10.5908C22.6575 10.2767 22.5438 9.6538 22.8579 9.19953ZM26.6058 12.8085C27.1045 12.5712 27.7011 12.7831 27.9384 13.2818C27.9519 13.3102 27.9653 13.3387 27.9786 13.3672C28.2116 13.868 27.9946 14.4628 27.4939 14.6958C26.9931 14.9288 26.3983 14.7117 26.1653 14.211L26.1506 14.1796L26.1324 14.1411C25.8951 13.6424 26.1071 13.0458 26.6058 12.8085ZM19 14.0003C19 13.448 18.5523 13.0003 18 13.0003C17.4477 13.0003 17 13.448 17 14.0003V18.0003C17 18.5526 17.4477 19.0003 18 19.0003H22C22.5523 19.0003 23 18.5526 23 18.0003C23 17.448 22.5523 17.0003 22 17.0003H19V14.0003Z",fill:"#7586B0"}),C.createElement("defs",null,C.createElement("linearGradient",{id:"paint0_linear_834_118583",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"}))),Mr=e=>C.createElement("svg",T({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.95394 1.70028C10.1196 2.22713 9.82684 2.78853 9.29999 2.95421C8.49057 3.20875 7.71555 3.57824 6.99987 4.05644C5.26859 5.21324 3.99197 6.93456 3.38754 8.9271C2.78311 10.9196 2.88826 13.0601 3.68509 14.9838C4.48191 16.9075 5.9211 18.4954 7.75743 19.477C9.59377 20.4585 11.7136 20.7729 13.7558 20.3667C15.798 19.9605 17.6362 18.8588 18.9571 17.2492C20.278 15.6396 21 13.6219 21 11.5397C21 10.9874 21.4477 10.5397 22 10.5397C22.5523 10.5397 23 10.9874 23 11.5397C23 11.8969 22.9826 12.2526 22.9483 12.6056C22.9662 12.6949 22.9722 12.7883 22.9645 12.8837L22.9606 12.9309C22.9496 13.0607 22.9143 13.1825 22.8595 13.2924C22.5513 15.2017 21.7432 17.007 20.5031 18.518C18.8886 20.4852 16.642 21.8318 14.146 22.3283C11.65 22.8248 9.05905 22.4405 6.81464 21.2408C4.57023 20.0411 2.81122 18.1004 1.83733 15.7492C0.863434 13.398 0.734911 10.7819 1.47366 8.34653C2.21241 5.91121 3.77272 3.80737 5.88873 2.3935C6.76341 1.80905 7.71072 1.35743 8.70001 1.04633C9.22686 0.880646 9.78826 1.17343 9.95394 1.70028ZM11.8497 1.95155C11.8964 1.40125 12.3804 0.993017 12.9307 1.03974L12.9779 1.04385C13.528 1.0929 13.9342 1.57861 13.8851 2.12871C13.8361 2.67881 13.3503 3.085 12.8002 3.03595L12.7615 3.03257C12.2112 2.98585 11.8029 2.50186 11.8497 1.95155ZM16.8579 3.19953C17.172 2.74525 17.7949 2.63161 18.2492 2.9457C18.2751 2.96361 18.3009 2.98162 18.3266 2.99974C18.7782 3.31772 18.8865 3.94155 18.5685 4.39311C18.2505 4.84467 17.6267 4.95296 17.1751 4.63498C17.1541 4.62016 17.1329 4.60542 17.1118 4.59078C16.6575 4.27669 16.5438 3.6538 16.8579 3.19953ZM20.6058 6.80846C21.1045 6.57117 21.7011 6.78308 21.9384 7.28179C21.9519 7.3102 21.9653 7.33869 21.9786 7.36723C22.2116 7.86796 21.9946 8.46276 21.4939 8.69577C20.9931 8.92877 20.3983 8.71174 20.1653 8.21101L20.1506 8.17957L20.1324 8.14112C19.8951 7.64241 20.1071 7.04576 20.6058 6.80846ZM13 8.00027C13 7.44798 12.5523 7.00027 12 7.00027C11.4477 7.00027 11 7.44798 11 8.00027V12.0003C11 12.5526 11.4477 13.0003 12 13.0003H16C16.5523 13.0003 17 12.5526 17 12.0003C17 11.448 16.5523 11.0003 16 11.0003H13V8.00027Z",fill:"#7586B0"})),Rr=e=>C.createElement("svg",T({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 10.8954 9.89543 10 11 10H25C26.1046 10 27 10.8954 27 12V26C27 27.1046 26.1046 28 25 28H11C9.89543 28 9 27.1046 9 26V12Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M22 8V12",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M14 8V12",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M9 16H27",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("defs",null,C.createElement("linearGradient",{id:"paint0_linear_45_8861",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"},C.createElement("stop",{stopColor:"#56ACF6"}),C.createElement("stop",{offset:1,stopColor:"#1559E6"})))),Lr=e=>C.createElement("svg",T({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("g",{id:"trash-2"},C.createElement("path",{id:"Shape",d:"M3 6H5H21",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{id:"Shape_2",d:"M20 6C20 5.44772 19.5523 5 19 5C18.4477 5 18 5.44772 18 6H20ZM6 6C6 5.44772 5.55228 5 5 5C4.44772 5 4 5.44772 4 6H6ZM7 6C7 6.55228 7.44772 7 8 7C8.55228 7 9 6.55228 9 6H7ZM15 6C15 6.55228 15.4477 7 16 7C16.5523 7 17 6.55228 17 6H15ZM18 6V20H20V6H18ZM18 20C18 20.5523 17.5523 21 17 21V23C18.6569 23 20 21.6569 20 20H18ZM17 21H7V23H17V21ZM7 21C6.44772 21 6 20.5523 6 20H4C4 21.6569 5.34315 23 7 23V21ZM6 20V6H4V20H6ZM9 6V4H7V6H9ZM9 4C9 3.44772 9.44772 3 10 3V1C8.34315 1 7 2.34315 7 4H9ZM10 3H14V1H10V3ZM14 3C14.5523 3 15 3.44772 15 4H17C17 2.34315 15.6569 1 14 1V3ZM15 4V6H17V4H15Z",fill:"#F88078"}),C.createElement("path",{id:"Shape_3",d:"M10 11V17",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{id:"Shape_4",d:"M14 11V17",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),Br=e=>C.createElement("svg",T({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{d:"M21.1667 4H2.83333C1.82081 4 1 4.89543 1 6V18C1 19.1046 1.82081 20 2.83333 20H21.1667C22.1792 20 23 19.1046 23 18V6C23 4.89543 22.1792 4 21.1667 4Z",fill:"#C6C6C7"}),C.createElement("path",{opacity:.3,d:"M19.75 16.4286H17.5C17.0125 16.4286 16.75 16.2 16.75 15.6667C16.75 15.1334 17.0125 14.9048 17.5 14.9048H19.75C20.2375 14.9048 20.5 15.1334 20.5 15.6667C20.5 16.2 20.2375 16.4286 19.75 16.4286ZM15.25 16.4286H13C12.5125 16.4286 12.25 16.2 12.25 15.6667C12.25 15.1334 12.5125 14.9048 13 14.9048H15.25C15.7375 14.9048 16 15.1334 16 15.6667C16 16.2 15.7375 16.4286 15.25 16.4286ZM10.75 16.4286H8.5C8.0125 16.4286 7.75 16.2 7.75 15.6667C7.75 15.1334 8.0125 14.9048 8.5 14.9048H10.75C11.2375 14.9048 11.5 15.1334 11.5 15.6667C11.5 16.2 11.2375 16.4286 10.75 16.4286ZM6.25 16.4286H4C3.5125 16.4286 3.25 16.2 3.25 15.6667C3.25 15.1334 3.5125 14.9048 4 14.9048H6.25C6.7375 14.9048 7 15.1334 7 15.6667C7 16.2 6.7375 16.4286 6.25 16.4286Z",fill:"black"})),Or=e=>C.createElement("svg",T({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("circle",{cx:10.333,cy:10,r:9,fill:"white",stroke:"#327EEE",strokeWidth:2})),$r=e=>C.createElement("svg",T({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("g",{id:"Group 16159"},C.createElement("circle",{id:"Ellipse 5",cx:10,cy:10,r:9.25,fill:"#327EEE",stroke:"#327EEE",strokeWidth:1.5}),C.createElement("path",{id:"Shape",d:"M5 10.3636L8.63667 14L12.637 10L14.6372 8",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),_r=e=>C.createElement("svg",T({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("g",{id:"Stepper indicators"},C.createElement("circle",{id:"Ellipse 5",cx:10.667,cy:10,r:9.25,fill:"#B3BCD3",stroke:"#B3BCD3",strokeWidth:1.5}),C.createElement("path",{id:"Shape",d:"M5.66699 10.3636L9.30366 14L13.304 10L15.3042 8",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),Gr=e=>C.createElement("svg",T({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{d:"M9 3L7.9425 4.0575L12.1275 8.25H3V9.75H12.1275L7.9425 13.9425L9 15L15 9L9 3Z",fill:"white"})),Vr=e=>C.createElement("svg",T({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{d:"M15.8337 5.34199L14.6587 4.16699L10.0003 8.82533L5.34199 4.16699L4.16699 5.34199L8.82533 10.0003L4.16699 14.6587L5.34199 15.8337L10.0003 11.1753L14.6587 15.8337L15.8337 14.6587L11.1753 10.0003L15.8337 5.34199Z",fill:"#327EEE"})),Hr=e=>C.createElement("svg",T({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("g",{id:"check"},C.createElement("path",{id:"Shape",d:"M20 7L9 18L4 13",stroke:"#F5F6F9",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),qr=e=>C.createElement("svg",T({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("g",{clipPath:"url(#clip0_1889_12169)"},C.createElement("path",{d:"M11.4286 7.42578L8 13.1401",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M14.857 13.1412C15.3274 12.0123 15.5118 10.7848 15.3938 9.56751C15.2758 8.35027 14.8592 7.18097 14.1808 6.16341C13.5024 5.14585 12.5833 4.31152 11.5051 3.73446C10.4268 3.1574 9.22281 2.85547 7.99986 2.85547C6.77691 2.85547 5.57288 3.1574 4.49463 3.73446C3.41639 4.31152 2.49729 5.14585 1.81892 6.16341C1.14055 7.18097 0.723889 8.35027 0.605928 9.56751C0.487968 10.7848 0.672354 12.0123 1.14272 13.1412H14.857Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})),C.createElement("defs",null,C.createElement("clipPath",{id:"clip0_1889_12169"},C.createElement("rect",{width:16,height:16,fill:"white"})))),Wr=e=>C.createElement("svg",T({width:16,height:16,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("g",{id:"tag--tags-bookmark-favorite"},C.createElement("path",{id:"Vector",d:"M1.26995 11.9426L6.05743 16.7301C6.2305 16.903 6.4651 17.0001 6.7097 17.0001C6.95431 17.0001 7.18891 16.903 7.36198 16.7301L16.8631 7.22895C16.9108 7.18332 16.9478 7.12758 16.9712 7.06583C16.9946 7.00408 17.0039 6.93787 16.9985 6.87205L16.2724 2.15839C16.2664 2.04607 16.2192 1.93992 16.1396 1.86038C16.0601 1.78085 15.9539 1.73357 15.8416 1.72764L11.128 1.00152C11.0622 0.996055 10.9959 1.00538 10.9342 1.0288C10.8724 1.05222 10.8167 1.08916 10.7711 1.1369L1.26995 10.638C1.09709 10.8111 1 11.0457 1 11.2903C1 11.5349 1.09709 11.7695 1.26995 11.9426Z",stroke:"#327EEE",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{id:"Vector_2",d:"M12.5548 6.05884C12.3916 6.05884 12.2351 5.99401 12.1197 5.87861C12.0043 5.76321 11.9395 5.60669 11.9395 5.44348C11.9395 5.28028 12.0043 5.12376 12.1197 5.00836C12.2351 4.89296 12.3916 4.82812 12.5548 4.82812C12.718 4.82812 12.8745 4.89296 12.9899 5.00836C13.1053 5.12376 13.1702 5.28028 13.1702 5.44348C13.1702 5.60669 13.1053 5.76321 12.9899 5.87861C12.8745 5.99401 12.718 6.05884 12.5548 6.05884Z",stroke:"#327EEE",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))),Yr=e=>C.createElement("svg",T({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{d:"M12 3V21.0001M3 11.9446H21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Zr=e=>C.createElement("svg",T({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{d:"M3 12H21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),zr=e=>C.createElement("svg",T({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{d:"M3 11.1429L9.71572 17.8586C9.79383 17.9367 9.92046 17.9367 9.99856 17.8586L21.8571 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Kr=Object.freeze(Object.defineProperty({__proto__:null,Add:Yr,Addons:Ar,ArrowForward:Gr,BillingInfoCustomer:kr,Check:Hr,Close:Vr,ContactSupport:Nr,Coupon:Wr,CreditCard:wr,DollarCoin:Fr,EntitlementCheck:zr,MiniSchedule:Si,OutlinedCheckedCircle:$r,OutlinedCheckedCircleDisabled:_r,OutlinedCircle:Or,PayAsYouGoCharge:qr,PaymentMethod:Br,Promotions:jr,Remove:Zr,RenewSubscription:Rr,Restore:Di,ScheduleBox:Ur,ScheduleClock:Mr,Trash:Lr},Symbol.toStringTag,{value:"Module"})),Qr=p.div`
12
- ${({$pathColor:e})=>e&&ne.css`
25
+ `,C=D.forwardRef((e,n)=>{const P=e,{children:i,style:r,variant:t="body1",color:a="primary",overrideColor:s,bold:c=!1,as:l,className:u,lineHeight:d}=P,p=se(P,["children","style","variant","color","overrideColor","bold","as","className","lineHeight"]),m=zt(),f=Nn(m,t),g=l||f.semanticElement,y=s||lc(m,a);return o.jsx(uc,_(I({as:g,ref:n},p),{className:u,style:r,$variant:t,$bold:c,$color:y,$lineHeight:d,$isInline:g==="span",children:i}))});C.displayName="Typography";const gn=(e,n)=>{switch(e){case"primary":return n.stigg.palette.text.primary;case"secondary":return n.stigg.palette.text.secondary;default:return e}},dc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{clipPath:"url(#clip0_834_118930)"},E.createElement("path",{d:"M12 6.85712V17.1428",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M6.85712 12H17.1428",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M18 0.857117H5.99997C3.15966 0.857117 0.857117 3.15966 0.857117 5.99997V18C0.857117 20.8404 3.15966 23.1428 5.99997 23.1428H18C20.8404 23.1428 23.1428 20.8404 23.1428 18V5.99997C23.1428 3.15966 20.8404 0.857117 18 0.857117Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})),E.createElement("defs",null,E.createElement("clipPath",{id:"clip0_834_118930"},E.createElement("rect",{width:24,height:24,fill:"white"})))),mc=e=>E.createElement("svg",I({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),E.createElement("path",{d:"M26 27V25C26 22.7909 24.2091 21 22 21H14C11.7909 21 10 22.7909 10 25V27",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 17C20.2091 17 22 15.2091 22 13C22 10.7909 20.2091 9 18 9C15.7909 9 14 10.7909 14 13C14 15.2091 15.7909 17 18 17Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("defs",null,E.createElement("linearGradient",{id:"paint0_linear_67_8545",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"},E.createElement("stop",{stopColor:"#56ACF6"}),E.createElement("stop",{offset:1,stopColor:"#1559E6"})))),gc=e=>E.createElement("svg",I({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),E.createElement("path",{d:"M27 18.22C27 12.73 22.74 9 18 9C13.31 9 9 12.65 9 18.28C8.4 18.62 8 19.26 8 20V22C8 23.1 8.9 24 10 24H11V17.9C11 14.03 14.13 10.9 18 10.9C21.87 10.9 25 14.03 25 17.9V25H17V27H25C26.1 27 27 26.1 27 25V23.78C27.59 23.47 28 22.86 28 22.14V19.84C28 19.14 27.59 18.53 27 18.22Z",fill:"#7586B0"}),E.createElement("path",{d:"M15 20C15.5523 20 16 19.5523 16 19C16 18.4477 15.5523 18 15 18C14.4477 18 14 18.4477 14 19C14 19.5523 14.4477 20 15 20Z",fill:"#7586B0"}),E.createElement("path",{d:"M21 20C21.5523 20 22 19.5523 22 19C22 18.4477 21.5523 18 21 18C20.4477 18 20 18.4477 20 19C20 19.5523 20.4477 20 21 20Z",fill:"#7586B0"}),E.createElement("path",{d:"M24 17.03C23.52 14.18 21.04 12 18.05 12C15.02 12 11.76 14.51 12.02 18.45C14.49 17.44 16.35 15.24 16.88 12.56C18.19 15.19 20.88 17 24 17.03Z",fill:"#7586B0"}),E.createElement("defs",null,E.createElement("linearGradient",{id:"paint0_linear_267_19310",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"},E.createElement("stop",{stopColor:"#56ACF6"}),E.createElement("stop",{offset:1,stopColor:"#1559E6"})))),pc=e=>E.createElement("svg",I({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),E.createElement("path",{d:"M26 10H10C8.89 10 8.01 10.89 8.01 12L8 24C8 25.11 8.89 26 10 26H26C27.11 26 28 25.11 28 24V12C28 10.89 27.11 10 26 10ZM26 24H10V18H26V24ZM26 14H10V12H26V14Z",fill:"#7586B0"}),E.createElement("defs",null,E.createElement("linearGradient",{id:"paint0_linear_67_8556",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"},E.createElement("stop",{stopColor:"#56ACF6"}),E.createElement("stop",{offset:1,stopColor:"#1559E6"})))),fc=e=>E.createElement("svg",I({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{clipPath:"url(#clip0_834_120339)"},E.createElement("path",{d:"M10.3336 19.2858C15.462 19.2858 19.6193 15.1285 19.6193 10.0001C19.6193 4.87171 15.462 0.714355 10.3336 0.714355C5.20521 0.714355 1.04785 4.87171 1.04785 10.0001C1.04785 15.1285 5.20521 19.2858 10.3336 19.2858Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12.7649 7.46052C12.6813 7.22393 12.5523 7.0088 12.3883 6.8256C12.0395 6.43592 11.5327 6.19067 10.9685 6.19067H9.4942C8.55517 6.19067 7.79395 6.9519 7.79395 7.89093C7.79395 8.68995 8.3503 9.38116 9.13086 9.5519L11.3756 10.0429C12.25 10.2342 12.8733 11.0091 12.8733 11.9043C12.8733 12.9562 12.0205 13.8097 10.9685 13.8097H9.6987C8.86936 13.8097 8.16382 13.2797 7.90233 12.5399",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M10.3335 6.19065V4.28589",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M10.3335 15.7144V13.8096",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})),E.createElement("defs",null,E.createElement("clipPath",{id:"clip0_834_120339"},E.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.333496)"})))),Yr=e=>E.createElement("svg",I({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.95392 1.03353C7.1196 1.56038 6.82682 2.12178 6.29997 2.28746C5.79034 2.44773 5.30237 2.68036 4.85175 2.98146C3.76168 3.70982 2.95789 4.79361 2.57732 6.04817C2.19675 7.30273 2.26296 8.65044 2.76466 9.86166C3.26637 11.0729 4.17252 12.0727 5.32873 12.6907C6.48494 13.3087 7.81967 13.5067 9.10549 13.2509C10.3913 12.9951 11.5487 12.3014 12.3804 11.288C13.2121 10.2746 13.6666 9.00413 13.6666 7.69312C13.6666 7.14083 14.1144 6.69312 14.6666 6.69312C15.2189 6.69312 15.6666 7.14083 15.6666 7.69312C15.6666 7.92228 15.6564 8.15052 15.6361 8.37721C15.6465 8.44937 15.6492 8.52379 15.6432 8.59952L15.6392 8.64883C15.6298 8.75932 15.6028 8.86407 15.5612 8.96057C15.3409 10.2743 14.7807 11.5158 13.9264 12.5568C12.8012 13.9279 11.2353 14.8664 9.49568 15.2125C7.75603 15.5585 5.95022 15.2906 4.38594 14.4545C2.82166 13.6184 1.59568 12.2657 0.916905 10.627C0.238131 8.98832 0.148554 7.16495 0.663439 5.4676C1.17832 3.77025 2.26581 2.30394 3.74061 1.31852C4.35023 0.911179 5.01049 0.596408 5.69999 0.379577C6.22684 0.213898 6.78824 0.506683 6.95392 1.03353ZM7.56761 1.27284C7.61434 0.722538 8.09832 0.314306 8.64863 0.361031L8.69791 0.365373C9.24791 0.415584 9.65307 0.902149 9.60286 1.45215C9.55265 2.00214 9.06608 2.4073 8.51608 2.35709L8.47942 2.35386C7.92912 2.30714 7.52089 1.82315 7.56761 1.27284ZM12.4186 2.90891C12.8384 2.55014 13.4697 2.59967 13.8284 3.01954C13.8498 3.04454 13.871 3.06967 13.892 3.09494C14.2454 3.51937 14.1878 4.14991 13.7634 4.50329C13.339 4.85667 12.7084 4.79906 12.355 4.37463C12.3395 4.35592 12.3238 4.33731 12.3079 4.31879C11.9492 3.89892 11.9987 3.26769 12.4186 2.90891ZM8.99998 5.33352C8.99998 4.78124 8.55226 4.33352 7.99998 4.33352C7.44769 4.33352 6.99998 4.78124 6.99998 5.33352V8.00019C6.99998 8.55247 7.44769 9.00019 7.99998 9.00019H10.6666C11.2189 9.00019 11.6666 8.55247 11.6666 8.00019C11.6666 7.4479 11.2189 7.00019 10.6666 7.00019H8.99998V5.33352Z",fill:"#7586B0"})),hc=e=>E.createElement("svg",I({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{clipPath:"url(#clip0_834_116282)"},E.createElement("path",{d:"M21.4286 5.32483H2.57146C1.62469 5.32483 0.857178 6.09235 0.857178 7.03911V10.4677C0.857178 11.4145 1.62469 12.182 2.57146 12.182H21.4286C22.3754 12.182 23.1429 11.4145 23.1429 10.4677V7.03911C23.1429 6.09235 22.3754 5.32483 21.4286 5.32483Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M21.4287 12.182V21.6106C21.4287 22.0652 21.248 22.5013 20.9266 22.8227C20.6051 23.1442 20.169 23.3249 19.7144 23.3249H4.28582C3.83116 23.3249 3.39513 23.1442 3.07363 22.8227C2.75215 22.5013 2.57153 22.0652 2.57153 21.6106V12.182",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 5.32483V23.3248",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M17.1429 1.03912L12 5.32484L6.85718 1.03912",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})),E.createElement("defs",null,E.createElement("clipPath",{id:"clip0_834_116282"},E.createElement("rect",{width:24,height:24,fill:"white",transform:"translate(0 0.182007)"})))),Zr=e=>E.createElement("svg",I({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M10.8333 2.5C6.69168 2.5 3.33334 5.85833 3.33334 10H0.833344L4.07501 13.2417L4.13334 13.3583L7.50001 10H5.00001C5.00001 6.775 7.60834 4.16667 10.8333 4.16667C14.0583 4.16667 16.6667 6.775 16.6667 10C16.6667 13.225 14.0583 15.8333 10.8333 15.8333C9.22501 15.8333 7.76668 15.175 6.71668 14.1167L5.53334 15.3C6.89168 16.6583 8.75834 17.5 10.8333 17.5C14.975 17.5 18.3333 14.1417 18.3333 10C18.3333 5.85833 14.975 2.5 10.8333 2.5ZM10 6.66667V10.8333L13.5667 12.95L14.1667 11.9417L11.25 10.2083V6.66667H10Z",fill:"#6678A7"})),yc=e=>E.createElement("svg",I({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("rect",{width:36,height:36,rx:10,fill:"url(#paint0_linear_834_118583)"}),E.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9539 7.70028C16.1196 8.22713 15.8268 8.78853 15.3 8.95421C14.4906 9.20875 13.7155 9.57824 12.9999 10.0564C11.2686 11.2132 9.99197 12.9346 9.38754 14.9271C8.78311 16.9196 8.88826 19.0601 9.68509 20.9838C10.4819 22.9075 11.9211 24.4954 13.7574 25.477C15.5938 26.4585 17.7136 26.7729 19.7558 26.3667C21.798 25.9605 23.6362 24.8588 24.9571 23.2492C26.278 21.6396 27 19.6219 27 17.5397C27 16.9874 27.4477 16.5397 28 16.5397C28.5523 16.5397 29 16.9874 29 17.5397C29 17.8969 28.9826 18.2526 28.9483 18.6056C28.9662 18.6949 28.9722 18.7883 28.9645 18.8837L28.9606 18.9309C28.9496 19.0607 28.9143 19.1825 28.8595 19.2924C28.5513 21.2017 27.7432 23.007 26.5031 24.518C24.8886 26.4852 22.642 27.8318 20.146 28.3283C17.65 28.8248 15.059 28.4405 12.8146 27.2408C10.5702 26.0411 8.81122 24.1004 7.83733 21.7492C6.86343 19.398 6.73491 16.7819 7.47366 14.3465C8.21241 11.9112 9.77272 9.80737 11.8887 8.3935C12.7634 7.80905 13.7107 7.35743 14.7 7.04633C15.2269 6.88065 15.7883 7.17343 15.9539 7.70028ZM17.8497 7.95155C17.8964 7.40125 18.3804 6.99302 18.9307 7.03974L18.9779 7.04385C19.528 7.0929 19.9342 7.57861 19.8851 8.12871C19.8361 8.67881 19.3503 9.085 18.8002 9.03595L18.7615 9.03257C18.2112 8.98585 17.8029 8.50186 17.8497 7.95155ZM22.8579 9.19953C23.172 8.74525 23.7949 8.63161 24.2492 8.9457C24.2751 8.96361 24.3009 8.98162 24.3266 8.99974C24.7782 9.31772 24.8865 9.94155 24.5685 10.3931C24.2505 10.8447 23.6267 10.953 23.1751 10.635C23.1541 10.6202 23.1329 10.6054 23.1118 10.5908C22.6575 10.2767 22.5438 9.6538 22.8579 9.19953ZM26.6058 12.8085C27.1045 12.5712 27.7011 12.7831 27.9384 13.2818C27.9519 13.3102 27.9653 13.3387 27.9786 13.3672C28.2116 13.868 27.9946 14.4628 27.4939 14.6958C26.9931 14.9288 26.3983 14.7117 26.1653 14.211L26.1506 14.1796L26.1324 14.1411C25.8951 13.6424 26.1071 13.0458 26.6058 12.8085ZM19 14.0003C19 13.448 18.5523 13.0003 18 13.0003C17.4477 13.0003 17 13.448 17 14.0003V18.0003C17 18.5526 17.4477 19.0003 18 19.0003H22C22.5523 19.0003 23 18.5526 23 18.0003C23 17.448 22.5523 17.0003 22 17.0003H19V14.0003Z",fill:"#7586B0"}),E.createElement("defs",null,E.createElement("linearGradient",{id:"paint0_linear_834_118583",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"}))),Cc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.95394 1.70028C10.1196 2.22713 9.82684 2.78853 9.29999 2.95421C8.49057 3.20875 7.71555 3.57824 6.99987 4.05644C5.26859 5.21324 3.99197 6.93456 3.38754 8.9271C2.78311 10.9196 2.88826 13.0601 3.68509 14.9838C4.48191 16.9075 5.9211 18.4954 7.75743 19.477C9.59377 20.4585 11.7136 20.7729 13.7558 20.3667C15.798 19.9605 17.6362 18.8588 18.9571 17.2492C20.278 15.6396 21 13.6219 21 11.5397C21 10.9874 21.4477 10.5397 22 10.5397C22.5523 10.5397 23 10.9874 23 11.5397C23 11.8969 22.9826 12.2526 22.9483 12.6056C22.9662 12.6949 22.9722 12.7883 22.9645 12.8837L22.9606 12.9309C22.9496 13.0607 22.9143 13.1825 22.8595 13.2924C22.5513 15.2017 21.7432 17.007 20.5031 18.518C18.8886 20.4852 16.642 21.8318 14.146 22.3283C11.65 22.8248 9.05905 22.4405 6.81464 21.2408C4.57023 20.0411 2.81122 18.1004 1.83733 15.7492C0.863434 13.398 0.734911 10.7819 1.47366 8.34653C2.21241 5.91121 3.77272 3.80737 5.88873 2.3935C6.76341 1.80905 7.71072 1.35743 8.70001 1.04633C9.22686 0.880646 9.78826 1.17343 9.95394 1.70028ZM11.8497 1.95155C11.8964 1.40125 12.3804 0.993017 12.9307 1.03974L12.9779 1.04385C13.528 1.0929 13.9342 1.57861 13.8851 2.12871C13.8361 2.67881 13.3503 3.085 12.8002 3.03595L12.7615 3.03257C12.2112 2.98585 11.8029 2.50186 11.8497 1.95155ZM16.8579 3.19953C17.172 2.74525 17.7949 2.63161 18.2492 2.9457C18.2751 2.96361 18.3009 2.98162 18.3266 2.99974C18.7782 3.31772 18.8865 3.94155 18.5685 4.39311C18.2505 4.84467 17.6267 4.95296 17.1751 4.63498C17.1541 4.62016 17.1329 4.60542 17.1118 4.59078C16.6575 4.27669 16.5438 3.6538 16.8579 3.19953ZM20.6058 6.80846C21.1045 6.57117 21.7011 6.78308 21.9384 7.28179C21.9519 7.3102 21.9653 7.33869 21.9786 7.36723C22.2116 7.86796 21.9946 8.46276 21.4939 8.69577C20.9931 8.92877 20.3983 8.71174 20.1653 8.21101L20.1506 8.17957L20.1324 8.14112C19.8951 7.64241 20.1071 7.04576 20.6058 6.80846ZM13 8.00027C13 7.44798 12.5523 7.00027 12 7.00027C11.4477 7.00027 11 7.44798 11 8.00027V12.0003C11 12.5526 11.4477 13.0003 12 13.0003H16C16.5523 13.0003 17 12.5526 17 12.0003C17 11.448 16.5523 11.0003 16 11.0003H13V8.00027Z",fill:"#7586B0"})),bc=e=>E.createElement("svg",I({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 10.8954 9.89543 10 11 10H25C26.1046 10 27 10.8954 27 12V26C27 27.1046 26.1046 28 25 28H11C9.89543 28 9 27.1046 9 26V12Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M22 8V12",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M14 8V12",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M9 16H27",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("defs",null,E.createElement("linearGradient",{id:"paint0_linear_45_8861",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"},E.createElement("stop",{stopColor:"#56ACF6"}),E.createElement("stop",{offset:1,stopColor:"#1559E6"})))),Ec=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"trash-2"},E.createElement("path",{id:"Shape",d:"M3 6H5H21",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{id:"Shape_2",d:"M20 6C20 5.44772 19.5523 5 19 5C18.4477 5 18 5.44772 18 6H20ZM6 6C6 5.44772 5.55228 5 5 5C4.44772 5 4 5.44772 4 6H6ZM7 6C7 6.55228 7.44772 7 8 7C8.55228 7 9 6.55228 9 6H7ZM15 6C15 6.55228 15.4477 7 16 7C16.5523 7 17 6.55228 17 6H15ZM18 6V20H20V6H18ZM18 20C18 20.5523 17.5523 21 17 21V23C18.6569 23 20 21.6569 20 20H18ZM17 21H7V23H17V21ZM7 21C6.44772 21 6 20.5523 6 20H4C4 21.6569 5.34315 23 7 23V21ZM6 20V6H4V20H6ZM9 6V4H7V6H9ZM9 4C9 3.44772 9.44772 3 10 3V1C8.34315 1 7 2.34315 7 4H9ZM10 3H14V1H10V3ZM14 3C14.5523 3 15 3.44772 15 4H17C17 2.34315 15.6569 1 14 1V3ZM15 4V6H17V4H15Z",fill:"#F88078"}),E.createElement("path",{id:"Shape_3",d:"M10 11V17",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{id:"Shape_4",d:"M14 11V17",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),Pc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M21.1667 4H2.83333C1.82081 4 1 4.89543 1 6V18C1 19.1046 1.82081 20 2.83333 20H21.1667C22.1792 20 23 19.1046 23 18V6C23 4.89543 22.1792 4 21.1667 4Z",fill:"#C6C6C7"}),E.createElement("path",{opacity:.3,d:"M19.75 16.4286H17.5C17.0125 16.4286 16.75 16.2 16.75 15.6667C16.75 15.1334 17.0125 14.9048 17.5 14.9048H19.75C20.2375 14.9048 20.5 15.1334 20.5 15.6667C20.5 16.2 20.2375 16.4286 19.75 16.4286ZM15.25 16.4286H13C12.5125 16.4286 12.25 16.2 12.25 15.6667C12.25 15.1334 12.5125 14.9048 13 14.9048H15.25C15.7375 14.9048 16 15.1334 16 15.6667C16 16.2 15.7375 16.4286 15.25 16.4286ZM10.75 16.4286H8.5C8.0125 16.4286 7.75 16.2 7.75 15.6667C7.75 15.1334 8.0125 14.9048 8.5 14.9048H10.75C11.2375 14.9048 11.5 15.1334 11.5 15.6667C11.5 16.2 11.2375 16.4286 10.75 16.4286ZM6.25 16.4286H4C3.5125 16.4286 3.25 16.2 3.25 15.6667C3.25 15.1334 3.5125 14.9048 4 14.9048H6.25C6.7375 14.9048 7 15.1334 7 15.6667C7 16.2 6.7375 16.4286 6.25 16.4286Z",fill:"black"})),Sc=e=>E.createElement("svg",I({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("circle",{cx:10.333,cy:10,r:9,fill:"white",stroke:"#327EEE",strokeWidth:2})),Dc=e=>E.createElement("svg",I({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"Group 16159"},E.createElement("circle",{id:"Ellipse 5",cx:10,cy:10,r:9.25,fill:"#327EEE",stroke:"#327EEE",strokeWidth:1.5}),E.createElement("path",{id:"Shape",d:"M5 10.3636L8.63667 14L12.637 10L14.6372 8",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),vc=e=>E.createElement("svg",I({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"Stepper indicators"},E.createElement("circle",{id:"Ellipse 5",cx:10.667,cy:10,r:9.25,fill:"#B3BCD3",stroke:"#B3BCD3",strokeWidth:1.5}),E.createElement("path",{id:"Shape",d:"M5.66699 10.3636L9.30366 14L13.304 10L15.3042 8",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),xc=e=>E.createElement("svg",I({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M9 3L7.9425 4.0575L12.1275 8.25H3V9.75H12.1275L7.9425 13.9425L9 15L15 9L9 3Z",fill:"white"})),Ic=e=>E.createElement("svg",I({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M15.8337 5.34199L14.6587 4.16699L10.0003 8.82533L5.34199 4.16699L4.16699 5.34199L8.82533 10.0003L4.16699 14.6587L5.34199 15.8337L10.0003 11.1753L14.6587 15.8337L15.8337 14.6587L11.1753 10.0003L15.8337 5.34199Z",fill:"#327EEE"})),Tc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"check"},E.createElement("path",{id:"Shape",d:"M20 7L9 18L4 13",stroke:"#F5F6F9",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),Ac=e=>E.createElement("svg",I({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{clipPath:"url(#clip0_1889_12169)"},E.createElement("path",{d:"M11.4286 7.42578L8 13.1401",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M14.857 13.1412C15.3274 12.0123 15.5118 10.7848 15.3938 9.56751C15.2758 8.35027 14.8592 7.18097 14.1808 6.16341C13.5024 5.14585 12.5833 4.31152 11.5051 3.73446C10.4268 3.1574 9.22281 2.85547 7.99986 2.85547C6.77691 2.85547 5.57288 3.1574 4.49463 3.73446C3.41639 4.31152 2.49729 5.14585 1.81892 6.16341C1.14055 7.18097 0.723889 8.35027 0.605928 9.56751C0.487968 10.7848 0.672354 12.0123 1.14272 13.1412H14.857Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})),E.createElement("defs",null,E.createElement("clipPath",{id:"clip0_1889_12169"},E.createElement("rect",{width:16,height:16,fill:"white"})))),kc=e=>E.createElement("svg",I({width:16,height:16,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"tag--tags-bookmark-favorite"},E.createElement("path",{id:"Vector",d:"M1.26995 11.9426L6.05743 16.7301C6.2305 16.903 6.4651 17.0001 6.7097 17.0001C6.95431 17.0001 7.18891 16.903 7.36198 16.7301L16.8631 7.22895C16.9108 7.18332 16.9478 7.12758 16.9712 7.06583C16.9946 7.00408 17.0039 6.93787 16.9985 6.87205L16.2724 2.15839C16.2664 2.04607 16.2192 1.93992 16.1396 1.86038C16.0601 1.78085 15.9539 1.73357 15.8416 1.72764L11.128 1.00152C11.0622 0.996055 10.9959 1.00538 10.9342 1.0288C10.8724 1.05222 10.8167 1.08916 10.7711 1.1369L1.26995 10.638C1.09709 10.8111 1 11.0457 1 11.2903C1 11.5349 1.09709 11.7695 1.26995 11.9426Z",stroke:"#327EEE",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{id:"Vector_2",d:"M12.5548 6.05884C12.3916 6.05884 12.2351 5.99401 12.1197 5.87861C12.0043 5.76321 11.9395 5.60669 11.9395 5.44348C11.9395 5.28028 12.0043 5.12376 12.1197 5.00836C12.2351 4.89296 12.3916 4.82812 12.5548 4.82812C12.718 4.82812 12.8745 4.89296 12.9899 5.00836C13.1053 5.12376 13.1702 5.28028 13.1702 5.44348C13.1702 5.60669 13.1053 5.76321 12.9899 5.87861C12.8745 5.99401 12.718 6.05884 12.5548 6.05884Z",stroke:"#327EEE",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))),Nc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M12 3V21.0001M3 11.9446H21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),wc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M3 12H21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Fc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M3 11.1429L9.71572 17.8586C9.79383 17.9367 9.92046 17.9367 9.99856 17.8586L21.8571 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),jc=Object.freeze(Object.defineProperty({__proto__:null,Add:Nc,Addons:dc,ArrowForward:xc,BillingInfoCustomer:mc,Check:Tc,Close:Ic,ContactSupport:gc,Coupon:kc,CreditCard:pc,DollarCoin:fc,EntitlementCheck:Fc,MiniSchedule:Yr,OutlinedCheckedCircle:Dc,OutlinedCheckedCircleDisabled:vc,OutlinedCircle:Sc,PayAsYouGoCharge:Ac,PaymentMethod:Pc,Promotions:hc,Remove:wc,RenewSubscription:bc,Restore:Zr,ScheduleBox:yc,ScheduleClock:Cc,Trash:Ec},Symbol.toStringTag,{value:"Module"})),Rc=h.div`
26
+ ${({$pathColor:e})=>e&&Ie`
13
27
  path {
14
28
  fill: ${e};
15
29
  }
16
30
  `}
17
31
 
18
- ${({$rectColor:e})=>e&&ne.css`
32
+ ${({$rectColor:e})=>e&&Ie`
19
33
  svg rect {
20
34
  fill: ${e};
21
35
  }
22
36
  `}
23
37
 
24
38
 
25
- ${({$strokeColor:e})=>e&&ne.css`
39
+ ${({$strokeColor:e})=>e&&Ie`
26
40
  g {
27
41
  stroke: ${e};
28
42
  }
29
43
  `}
30
- `;function ce({icon:e,className:n,style:i,svgPathColor:a,svgRectColor:t,svgStrokeColor:o}){const s=Kr[e],c=ne.useTheme();return r.jsx(Qr,{className:n,style:i,$pathColor:wt(a,c),$rectColor:wt(t,c),$strokeColor:wt(o,c),children:r.jsx(s,{})})}const Xr=p(y)`
44
+ `;function fe({icon:e,className:n,style:i,svgPathColor:r,svgRectColor:t,svgStrokeColor:a}){const s=jc[e],c=zt();return o.jsx(Rc,{className:n,style:i,$pathColor:gn(r,c),$rectColor:gn(t,c),$strokeColor:gn(a,c),children:o.jsx(s,{})})}const Mc=h(C)`
31
45
  margin: 0;
32
- `,Jr=p.div`
46
+ `,Uc=h.div`
33
47
  display: flex;
34
48
  align-items: center;
35
49
  gap: 16px;
36
- `,eo=p.div`
50
+ `,Oc=h.div`
37
51
  display: flex;
38
52
  align-items: center;
39
53
  flex-shrink: 0;
40
- `,to=p(ce)`
54
+ `,Lc=h(fe)`
41
55
  width: 24px;
42
56
  height: 24px;
43
57
  color: ${({theme:e})=>e.stigg.palette.primary};
44
- `;function no(e){if(!e)return"";switch(e){case P.EntitlementResetPeriod.Day:return"per day";case P.EntitlementResetPeriod.Hour:return"per hour";case P.EntitlementResetPeriod.Week:return"per week";case P.EntitlementResetPeriod.Month:return"per month";case P.EntitlementResetPeriod.Year:return"per year";default:return""}}function io({hasUnlimitedUsage:e,feature:n,resetPeriod:i,usageLimit:a,minUnitQuantity:t,maxUnitQuantity:o,isCustom:s,enumValues:c}){const l=t||o,u=`${i&&a?`${no(i)}`:""}`;if(c){const d=c.length===1?n==null?void 0:n.units:n==null?void 0:n.unitsPlural;return`${c.length} ${d}`}if(e)return`Unlimited ${n==null?void 0:n.unitsPlural}`;if(s)return`Custom ${n==null?void 0:n.unitsPlural}`;if(a){const d=a===1?n==null?void 0:n.units:n==null?void 0:n.unitsPlural;return`${Ei(a)} ${d} ${u}`}return l?bi(t,o,n==null?void 0:n.unitsPlural):n==null?void 0:n.displayName}function jn(e){var o;const t=e,{displayNameOverride:n}=t,i=ie(t,["displayNameOverride"]),a=io(i);return r.jsxs(Jr,{className:`stigg-entitlement-row-container stigg-entitlement-${(o=i.feature)==null?void 0:o.id}`,children:[r.jsx(eo,{children:r.jsx(to,{icon:"EntitlementCheck",className:"stigg-entitlement-row-icon"})}),r.jsx(Xr,{className:"stigg-entitlement-name",variant:"h6",color:"secondary",children:n||a})]})}const ao=p.div`
58
+ `;function Bc(e){if(!e)return"";switch(e){case b.EntitlementResetPeriod.Day:return"per day";case b.EntitlementResetPeriod.Hour:return"per hour";case b.EntitlementResetPeriod.Week:return"per week";case b.EntitlementResetPeriod.Month:return"per month";case b.EntitlementResetPeriod.Year:return"per year";default:return""}}function _c({hasUnlimitedUsage:e,feature:n,resetPeriod:i,usageLimit:r,minUnitQuantity:t,maxUnitQuantity:a,isCustom:s,enumValues:c}){const l=t||a,u=`${i&&r?`${Bc(i)}`:""}`;if(c){const d=c.length===1?n==null?void 0:n.units:n==null?void 0:n.unitsPlural;return`${c.length} ${d}`}if(e)return`Unlimited ${n==null?void 0:n.unitsPlural}`;if(s)return`Custom ${n==null?void 0:n.unitsPlural}`;if(r){const d=r===1?n==null?void 0:n.units:n==null?void 0:n.unitsPlural;return`${Wr(r)} ${d} ${u}`}return l?qr(t,a,n==null?void 0:n.unitsPlural):n==null?void 0:n.displayName}function qi(e){var a;const t=e,{displayNameOverride:n}=t,i=se(t,["displayNameOverride"]),r=_c(i);return o.jsxs(Uc,{className:`stigg-entitlement-row-container stigg-entitlement-${(a=i.feature)==null?void 0:a.id}`,children:[o.jsx(Oc,{children:o.jsx(Lc,{icon:"EntitlementCheck",className:"stigg-entitlement-row-icon"})}),o.jsx(Mc,{className:"stigg-entitlement-name",variant:"h6",color:"secondary",children:n||r})]})}const $c=h.div`
45
59
  display: flex;
46
60
  flex-direction: column;
47
61
  gap: 16px;
48
- `;function ro(e,n,i){if(n.entitlementsTitle)return n.entitlementsTitle(e);let a=i?"Includes:":"";return e.basePlan&&(a=`Everything in ${e.basePlan.displayName}${i?", plus:":""}`),a}function oo({plan:e,billingPeriod:n,paywallLocale:i}){var c;const t=(((c=e.pricePoints)==null?void 0:c.filter(l=>l.billingPeriod===n))||[]).filter(l=>(l==null?void 0:l.minUnitQuantity)&&(l==null?void 0:l.minUnitQuantity)>1||(l==null?void 0:l.maxUnitQuantity)).map(l=>{var u;return r.jsx(jn,{feature:l!=null&&l.feature?O(T({},l.feature),{id:l.feature.featureId}):null,minUnitQuantity:l==null?void 0:l.minUnitQuantity,maxUnitQuantity:l==null?void 0:l.maxUnitQuantity},`priceUnitEntitlement-${(u=l==null?void 0:l.feature)==null?void 0:u.displayName}`)}),o=e.entitlements.filter(({isGranted:l})=>l).filter(l=>!(l.hiddenFromWidgets||[]).includes(P.WidgetType.Paywall)),s=t.length>0||o.length>0;return r.jsxs(ao,{className:"stigg-plan-entitlements-container",children:[r.jsx(y,{className:"stigg-plan-entitlements-title",color:"secondary",variant:"h6",bold:!0,children:ro(e,i,s)}),t,o.map(l=>{var u;return r.jsx(jn,{displayNameOverride:l.displayNameOverride,feature:l.feature,resetPeriod:l.resetPeriod,hasUnlimitedUsage:l.hasUnlimitedUsage,usageLimit:l.usageLimit,enumValues:l.enumValues,isCustom:l.isCustom},(u=l.feature)==null?void 0:u.id)})]})}var ue=(e=>(e.START_TRIAL="START_TRIAL",e.UPGRADE_TRIAL_TO_PAID="UPGRADE_TRIAL_TO_PAID",e.REQUEST_CUSTOM_PLAN_ACCESS="REQUEST_CUSTOM_PLAN_ACCESS",e.CHANGE_BILLING_PERIOD="CHANGE_BILLING_PERIOD",e.CHANGE_UNIT_QUANTITY="CHANGE_UNIT_QUANTITY",e.UPGRADE_PLAN="UPGRADE_PLAN",e.DOWNGRADE_PLAN="DOWNGRADE_PLAN",e.CANCEL_SCHEDULED_UPDATES="CANCEL_SCHEDULED_UPDATES",e))(ue||{});const xi=e=>({left:"flex-start",center:"center",right:"flex-end"})[e],so=e=>{var u,d,h;const n=ae(((u=e==null?void 0:e.palette)==null?void 0:u.primary)||"#327EEE"),i=ae(((h=(d=e==null?void 0:e.palette)==null?void 0:d.text)==null?void 0:h.primary)||"#001E6C"),a=ae("#4CAF50"),t=ae("#f44336"),o=ae("#ff9800"),s=ae("#2196f3"),c=ae("#9e9e9e"),l={palette:{primary:n.hex(),primaryDark:n.darken(.3).hex(),primaryLight:n.alpha(.5).toString(),backgroundPaper:"#FFFFFF",backgroundHighlight:"#F5F6F9",backgroundSection:n.alpha(.1).toString(),backgroundButton:n.alpha(.08).toString(),outlinedBorder:"#C4CBDD",outlinedRestingBorder:n.alpha(.5).toString(),outlinedHoverBackground:n.lightness(95).hex(),switchBorder:n.lighten(.1).hex(),switchFill:n.lighten(.5).hex(),switchHandle:n.hex(),warning:"#ed6c02",error:t.hex(),errorDark:t.darken(.3).hex(),success:a.hex(),successDark:a.darken(.3).hex(),white:"#FFFFFF",text:{primary:i.hex(),secondary:i.alpha(.75).toString(),tertiary:i.alpha(.5).toString(),disabled:i.alpha(.35).toString()},statusChips:{success:{background:a.alpha(.15).toString(),text:a.darken(.2).hex(),border:"transparent"},warning:{background:o.alpha(.15).toString(),text:o.darken(.2).hex(),border:"transparent"},error:{background:t.alpha(.15).toString(),text:t.darken(.1).hex(),border:"transparent"},info:{background:s.alpha(.15).toString(),text:s.darken(.2).hex(),border:"transparent"},neutral:{background:c.alpha(.15).toString(),text:c.darken(.2).hex(),border:"transparent"}},progress:{background:"#e0e0e0",low:"#4caf50",medium:"#ff9800",high:"#f44336"}},layout:{planMinWidth:"330px",planMaxWidth:"330px",planMargin:"20px",planPadding:"40px",ctaAlignment:"left",headerAlignment:"left",descriptionAlignment:"left",descriptionMinHeight:"80px",switchBottomSpacing:"40px"},shadows:{light:"0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12)",popover:"0px 4px 5px -2px rgba(0, 30, 108, 0.2), 0px 7px 10px 1px rgba(0, 30, 108, 0.14), 0px 2px 16px 1px rgba(0, 30, 108, 0.12)"},border:{radius:"10px"},typography:{fontFamily:"custom-font, DM Sans, sans-serif",h1:{fontSize:"32px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"24px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"},caption:{fontSize:"12px",fontWeight:"normal",semanticElement:"span"}},customCss:""};return ze(l,e)},Ft=e=>te.utc(e).format("MMMM Do, yyyy");function Ti({scheduledUpdate:e,subscriptionPrices:n,billingPeriodRange:i,options:a={}}){var s,c;if(!e)return{};const{withDate:t,postfix:o=""}=a;switch(e.subscriptionScheduleType){case P.SubscriptionScheduleType.Downgrade:{let l=t;return K.isNil(l)&&(i!=null&&i.end)&&(l=!te(e.scheduledExecutionTime).isSame(i==null?void 0:i.end,"day")),{line1:r.jsxs(r.Fragment,{children:["Your subscription will be downgraded to the ",r.jsxs("b",{children:[(s=e.targetPackage)==null?void 0:s.displayName," plan"]})," ",l?r.jsxs(r.Fragment,{children:["on ",Ft(e.scheduledExecutionTime)]}):o,"."]}),line2:"Until then you still have access to your current plan."}}case P.SubscriptionScheduleType.BillingPeriod:{const l=e.scheduleVariables;return{line1:r.jsxs(r.Fragment,{children:["Your billing cycle will change to ",r.jsx("b",{children:(c=l.billingPeriod)==null?void 0:c.toLocaleLowerCase()})," ",t?r.jsxs(r.Fragment,{children:["on ",Ft(e.scheduledExecutionTime)]}):o,"."]})}}case P.SubscriptionScheduleType.UnitAmount:{const l=e.scheduleVariables,d=K.compact(n==null?void 0:n.map(({feature:b})=>b)).find(({id:b})=>b===l.featureId),{featureUnits:h,featureUnitsPlural:m}=d||{},f=l.newUnitAmount===1?h:m,g=r.jsxs(r.Fragment,{children:["Your subscription will be updated to ",r.jsx("b",{children:l.newUnitAmount})," ",f," ",t?r.jsxs(r.Fragment,{children:["on ",Ft(e.scheduledExecutionTime)]}):o,"."]}),x=`Until then you still have access to your current ${h} count.`;return{line1:g,line2:x}}default:return{}}}function co(e){return e.feature&&(e.feature.unitQuantity!==1?e.feature.unitsPlural:e.feature.units)||""}function Ii(e,n){const i=[...e];i.sort((a,t)=>a.upTo?t.upTo?a.upTo-t.upTo:-1:1);for(const a of i)if(a.upTo&&n<=a.upTo)return a;return i[i.length-1]}function Un(e,n,i){return n===P.BillingPeriod.Annually&&i?e/12:e}function qt(e,n,i,a){let t=0;if(e.unitPrice){const o=Un(e.unitPrice.amount,i,a);t+=o*n}return e.flatPrice&&(t+=Un(e.flatPrice.amount,i,a)),t}function vi(e,n,i,a){let t=n,o=0,s=0;const c=[];for(;t>0&&s<e.length;){const u=e[s],{upTo:d}=u;if(pe(d))c.push({unitQuantity:t,amount:qt(u,t,i,a)}),t=0;else{const h=d-o,m=Math.min(t,h);c.push({unitQuantity:m,amount:qt(u,m,i,a)}),t-=m,o=d}s+=1}const l=K.sum(c.map(({amount:u})=>u));return{breakdown:c,total:l}}function tn(e,n,i,a){if(!e.tiers)return 0;switch(e.tiersMode){case P.TiersMode.Volume:{const t=Ii(e.tiers,n);return qt(t,n,i,a)}case P.TiersMode.Graduated:return vi(e.tiers,n,i,a).total;default:return 0}}function nn(e){return e==null?void 0:e.some(({unitPrice:n,upTo:i})=>n&&!pe(i))}function lo(e){return e==null?void 0:e.every(({unitPrice:n,upTo:i})=>!n||pe(i))}function uo(e,n){return(e==null?void 0:e[0].upTo)&&n<=e[0].upTo}function Ai({plan:e,billingPeriod:n,currentSubscription:i,currentSubscriptionOverride:a,selectDefaultTierIndex:t}){const o=e.pricePoints.filter(s=>s.billingPeriod===n&&s.isTieredPrice);if(o.length===1){const[s]=o,{featureId:c}=s.feature,l=t?t({plan:e}):0,u=s.tiers[l];let d=nn(s.tiers)?1:u.upTo||1;if(i&&i.plan.id===e.id){const m=i.prices.find(f=>{var g;return f.pricingModel===P.BillingModel.PerUnit&&f.tiersMode&&((g=f.feature)==null?void 0:g.featureId)===c});m&&(d=m.feature.unitQuantity||1)}if((a==null?void 0:a.planId)===e.id){const m=a.billableFeatures.find(f=>f.featureId===c);m&&(d=m.quantity)}const h={};return h[c]=d,h}return{}}var Wt=(e=>(e[e.Lower=-1]="Lower",e[e.Equal=0]="Equal",e[e.Higher=1]="Higher",e))(Wt||{});function mo({perUnitQuantityByFeature:e,plan:n,currentSubscription:i,currentSubscriptionOverride:a}){var d,h;if(!i)return 0;let t=i.prices.find(m=>m.pricingModel===P.BillingModel.PerUnit&&m.tiersMode);const o=n.id===(a==null?void 0:a.planId);if(o&&(t=(d=n.pricePoints.find(m=>m.pricingModel===P.BillingModel.PerUnit&&m.tiersMode))!=null?d:t),!t)return 0;const{featureId:s,unitQuantity:c}=t.feature;let l=c;if(o){const m=(h=a==null?void 0:a.billableFeatures)==null?void 0:h.find(f=>f.featureId===s);m&&(l=m.quantity)}if(pe(l))return 0;const u=e[s];return u<l?-1:u>l?1:0}const go=p(gi)`
62
+ `;function Gc(e,n,i){if(n.entitlementsTitle)return n.entitlementsTitle(e);let r=i?"Includes:":"";return e.basePlan&&(r=`Everything in ${e.basePlan.displayName}${i?", plus:":""}`),r}function Vc({plan:e,billingPeriod:n,paywallLocale:i}){var c;const t=(((c=e.pricePoints)==null?void 0:c.filter(l=>l.billingPeriod===n))||[]).filter(l=>(l==null?void 0:l.minUnitQuantity)&&(l==null?void 0:l.minUnitQuantity)>1||(l==null?void 0:l.maxUnitQuantity)).map(l=>{var u;return o.jsx(qi,{feature:l!=null&&l.feature?_(I({},l.feature),{id:l.feature.featureId}):null,minUnitQuantity:l==null?void 0:l.minUnitQuantity,maxUnitQuantity:l==null?void 0:l.maxUnitQuantity},`priceUnitEntitlement-${(u=l==null?void 0:l.feature)==null?void 0:u.displayName}`)}),a=e.entitlements.filter(({isGranted:l})=>l).filter(l=>!(l.hiddenFromWidgets||[]).includes(b.WidgetType.Paywall)),s=t.length>0||a.length>0;return o.jsxs($c,{className:"stigg-plan-entitlements-container",children:[o.jsx(C,{className:"stigg-plan-entitlements-title",color:"secondary",variant:"h6",bold:!0,children:Gc(e,i,s)}),t,a.map(l=>{var u;return o.jsx(qi,{displayNameOverride:l.displayNameOverride,feature:l.feature,resetPeriod:l.resetPeriod,hasUnlimitedUsage:l.hasUnlimitedUsage,usageLimit:l.usageLimit,enumValues:l.enumValues,isCustom:l.isCustom},(u=l.feature)==null?void 0:u.id)})]})}var ye=(e=>(e.START_TRIAL="START_TRIAL",e.UPGRADE_TRIAL_TO_PAID="UPGRADE_TRIAL_TO_PAID",e.REQUEST_CUSTOM_PLAN_ACCESS="REQUEST_CUSTOM_PLAN_ACCESS",e.CHANGE_BILLING_PERIOD="CHANGE_BILLING_PERIOD",e.CHANGE_UNIT_QUANTITY="CHANGE_UNIT_QUANTITY",e.UPGRADE_PLAN="UPGRADE_PLAN",e.DOWNGRADE_PLAN="DOWNGRADE_PLAN",e.CANCEL_SCHEDULED_UPDATES="CANCEL_SCHEDULED_UPDATES",e))(ye||{});const zr=e=>({left:"flex-start",center:"center",right:"flex-end"})[e],Hc=e=>{var u,d,p;const n=le(((u=e==null?void 0:e.palette)==null?void 0:u.primary)||"#327EEE"),i=le(((p=(d=e==null?void 0:e.palette)==null?void 0:d.text)==null?void 0:p.primary)||"#001E6C"),r=le("#4CAF50"),t=le("#f44336"),a=le("#ff9800"),s=le("#2196f3"),c=le("#9e9e9e"),l={palette:{primary:n.hex(),primaryDark:n.darken(.3).hex(),primaryLight:n.alpha(.5).toString(),backgroundPaper:"#FFFFFF",backgroundHighlight:"#F5F6F9",backgroundSection:n.alpha(.1).toString(),backgroundButton:n.alpha(.08).toString(),outlinedBorder:"#C4CBDD",outlinedRestingBorder:n.alpha(.5).toString(),outlinedHoverBackground:n.lightness(95).hex(),switchBorder:n.lighten(.1).hex(),switchFill:n.lighten(.5).hex(),switchHandle:n.hex(),warning:"#ed6c02",error:t.hex(),errorDark:t.darken(.3).hex(),success:r.hex(),successDark:r.darken(.3).hex(),white:"#FFFFFF",text:{primary:i.hex(),secondary:i.alpha(.75).toString(),tertiary:i.alpha(.5).toString(),disabled:i.alpha(.35).toString()},statusChips:{success:{background:r.alpha(.15).toString(),text:r.darken(.2).hex(),border:"transparent"},warning:{background:a.alpha(.15).toString(),text:a.darken(.2).hex(),border:"transparent"},error:{background:t.alpha(.15).toString(),text:t.darken(.1).hex(),border:"transparent"},info:{background:s.alpha(.15).toString(),text:s.darken(.2).hex(),border:"transparent"},neutral:{background:c.alpha(.15).toString(),text:c.darken(.2).hex(),border:"transparent"}},progress:{background:"#e0e0e0",low:"#4caf50",medium:"#ff9800",high:"#f44336"}},layout:{planMinWidth:"330px",planMaxWidth:"330px",planMargin:"20px",planPadding:"40px",ctaAlignment:"left",headerAlignment:"left",descriptionAlignment:"left",descriptionMinHeight:"80px",switchBottomSpacing:"40px"},shadows:{light:"0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12)",popover:"0px 4px 5px -2px rgba(0, 30, 108, 0.2), 0px 7px 10px 1px rgba(0, 30, 108, 0.14), 0px 2px 16px 1px rgba(0, 30, 108, 0.12)"},border:{radius:"10px"},typography:{fontFamily:"custom-font, DM Sans, sans-serif",h1:{fontSize:"32px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"24px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"},caption:{fontSize:"12px",fontWeight:"normal",semanticElement:"span"}},customCss:""};return ft(l,e)},pn=e=>oe.utc(e).format("MMMM Do, yyyy");function Kr({scheduledUpdate:e,subscriptionPrices:n,billingPeriodRange:i,options:r={}}){var s,c;if(!e)return{};const{withDate:t,postfix:a=""}=r;switch(e.subscriptionScheduleType){case b.SubscriptionScheduleType.Downgrade:{let l=t;return ee.isNil(l)&&(i!=null&&i.end)&&(l=!oe(e.scheduledExecutionTime).isSame(i==null?void 0:i.end,"day")),{line1:o.jsxs(o.Fragment,{children:["Your subscription will be downgraded to the ",o.jsxs("b",{children:[(s=e.targetPackage)==null?void 0:s.displayName," plan"]})," ",l?o.jsxs(o.Fragment,{children:["on ",pn(e.scheduledExecutionTime)]}):a,"."]}),line2:"Until then you still have access to your current plan."}}case b.SubscriptionScheduleType.BillingPeriod:{const l=e.scheduleVariables;return{line1:o.jsxs(o.Fragment,{children:["Your billing cycle will change to ",o.jsx("b",{children:(c=l.billingPeriod)==null?void 0:c.toLocaleLowerCase()})," ",t?o.jsxs(o.Fragment,{children:["on ",pn(e.scheduledExecutionTime)]}):a,"."]})}}case b.SubscriptionScheduleType.UnitAmount:{const l=e.scheduleVariables,d=ee.compact(n==null?void 0:n.map(({feature:P})=>P)).find(({id:P})=>P===l.featureId),{featureUnits:p,featureUnitsPlural:m}=d||{},f=l.newUnitAmount===1?p:m,g=o.jsxs(o.Fragment,{children:["Your subscription will be updated to ",o.jsx("b",{children:l.newUnitAmount})," ",f," ",t?o.jsxs(o.Fragment,{children:["on ",pn(e.scheduledExecutionTime)]}):a,"."]}),y=`Until then you still have access to your current ${p} count.`;return{line1:g,line2:y}}default:return{}}}function qc(e){return e.feature&&(e.feature.unitQuantity!==1?e.feature.unitsPlural:e.feature.units)||""}function Qr(e,n){const i=[...e];i.sort((r,t)=>r.upTo?t.upTo?r.upTo-t.upTo:-1:1);for(const r of i)if(r.upTo&&n<=r.upTo)return r;return i[i.length-1]}function Wi(e,n,i){return n===b.BillingPeriod.Annually&&i?e/12:e}function wn(e,n,i,r){let t=0;if(e.unitPrice){const a=Wi(e.unitPrice.amount,i,r);t+=a*n}return e.flatPrice&&(t+=Wi(e.flatPrice.amount,i,r)),t}function Xr(e,n,i,r){let t=n,a=0,s=0;const c=[];for(;t>0&&s<e.length;){const u=e[s],{upTo:d}=u;if(De(d))c.push({unitQuantity:t,amount:wn(u,t,i,r)}),t=0;else{const p=d-a,m=Math.min(t,p);c.push({unitQuantity:m,amount:wn(u,m,i,r)}),t-=m,a=d}s+=1}const l=ee.sum(c.map(({amount:u})=>u));return{breakdown:c,total:l}}function Zn(e,n,i,r){if(!e.tiers)return 0;switch(e.tiersMode){case b.TiersMode.Volume:{const t=Qr(e.tiers,n);return wn(t,n,i,r)}case b.TiersMode.Graduated:return Xr(e.tiers,n,i,r).total;default:return 0}}function zn(e){return e==null?void 0:e.some(({unitPrice:n,upTo:i})=>n&&!De(i))}function Wc(e){return e==null?void 0:e.every(({unitPrice:n,upTo:i})=>!n||De(i))}function Yc(e,n){return(e==null?void 0:e[0].upTo)&&n<=e[0].upTo}function Jr({plan:e,billingPeriod:n,currentSubscription:i,currentSubscriptionOverride:r,selectDefaultTierIndex:t}){const a=e.pricePoints.filter(s=>s.billingPeriod===n&&s.isTieredPrice);if(a.length===1){const[s]=a,{featureId:c}=s.feature,l=t?t({plan:e}):0,u=s.tiers[l];let d=zn(s.tiers)?1:u.upTo||1;if(i&&i.plan.id===e.id){const m=i.prices.find(f=>{var g;return f.pricingModel===b.BillingModel.PerUnit&&f.tiersMode&&((g=f.feature)==null?void 0:g.featureId)===c});m&&(d=m.feature.unitQuantity||1)}if((r==null?void 0:r.planId)===e.id){const m=r.billableFeatures.find(f=>f.featureId===c);m&&(d=m.quantity)}const p={};return p[c]=d,p}return{}}var Fn=(e=>(e[e.Lower=-1]="Lower",e[e.Equal=0]="Equal",e[e.Higher=1]="Higher",e))(Fn||{});function Zc({perUnitQuantityByFeature:e,plan:n,currentSubscription:i,currentSubscriptionOverride:r}){var d,p;if(!i)return 0;let t=i.prices.find(m=>m.pricingModel===b.BillingModel.PerUnit&&m.tiersMode);const a=n.id===(r==null?void 0:r.planId);if(a&&(t=(d=n.pricePoints.find(m=>m.pricingModel===b.BillingModel.PerUnit&&m.tiersMode))!=null?d:t),!t)return 0;const{featureId:s,unitQuantity:c}=t.feature;let l=c;if(a){const m=(p=r==null?void 0:r.billableFeatures)==null?void 0:p.find(f=>f.featureId===s);m&&(l=m.quantity)}if(De(l))return 0;const u=e[s];return u<l?-1:u>l?1:0}const zc=h(vr)`
49
63
  margin-left: 10px;
50
- `,po=p.button`
64
+ `,Kc=h.button`
51
65
  cursor: ${({$disabled:e})=>e?"default":"pointer"};
52
66
  padding: 8px 12px;
53
67
  background-color: ${({theme:e})=>e.stigg.palette.backgroundButton};
@@ -59,19 +73,19 @@
59
73
  min-height: 42px;
60
74
  min-width: 120px;
61
75
 
62
- ${({$disabled:e})=>e&&ne.css`
76
+ ${({$disabled:e})=>e&&Ie`
63
77
  opacity: 0.5;
64
78
  `}
65
79
 
66
80
  &:hover {
67
81
  background-color: ${({theme:e,$disabled:n})=>n?e.stigg.palette.backgroundButton:e.stigg.palette.outlinedHoverBackground};
68
82
  }
69
- `,fo=p(y)`
83
+ `,Qc=h(C)`
70
84
  margin: 0;
71
85
  font-size: 15px;
72
- `,ho=p(y)`
86
+ `,Xc=h(C)`
73
87
  min-height: 87px;
74
- `,yo=p.button`
88
+ `,Jc=h.button`
75
89
  background: none;
76
90
  border: none;
77
91
  padding: 0;
@@ -79,17 +93,17 @@
79
93
 
80
94
  text-decoration: underline;
81
95
  cursor: pointer;
82
- `,Co=p(y)`
96
+ `,el=h(C)`
83
97
  margin-top: 8px;
84
98
  margin-bottom: 17px;
85
99
  min-height: 20px;
86
- `,Po=p.div`
100
+ `,tl=h.div`
87
101
  display: flex;
88
102
  flex-direction: column;
89
103
  margin-top: 4px;
90
- align-self: ${({theme:e})=>xi(e.stigg.layout.ctaAlignment)};
104
+ align-self: ${({theme:e})=>zr(e.stigg.layout.ctaAlignment)};
91
105
  width: 100%;
92
- `;function bo({isNextPlan:e,customer:n,plan:i,billingPeriod:a,isCustomerOnTrial:t,onPlanSelected:o,paywallLocale:s,withTrialLeftRow:c,currentSubscription:l,currentSubscriptionOverride:u,perUnitQuantityByFeature:d}){const h=ne.useTheme(),[m,f]=D.useState(!1),{currentPlan:g,custom:x,downgrade:b,startTrial:E,upgrade:I,startNew:N,switchToBillingPeriod:A,cancelScheduledUpdate:F}=s.planCTAButton,v=K.isFunction(b)?b(i):b,U=K.isFunction(I)?I(i):I,k={title:n?i.isLowerThanCurrentPlan?v:U:N,disabled:!1,intentionType:i.isLowerThanCurrentPlan?ue.DOWNGRADE_PLAN:t?ue.UPGRADE_TRIAL_TO_PAID:ue.UPGRADE_PLAN},L=i.pricingType===P.PricingType.Custom,{line1:$}=Ti({scheduledUpdate:i.scheduledUpdate,options:{withDate:!0}});if(i.isTriable&&!i.isCurrentCustomerPlan&&!t)k.title=E(i),k.intentionType=ue.START_TRIAL;else if(i.isCurrentCustomerPlan&&!t)if(a===i.currentCustomerPlanBillingPeriod||i.pricingType&&[P.PricingType.Free,P.PricingType.Custom].includes(i.pricingType))switch(mo({perUnitQuantityByFeature:d,plan:i,currentSubscription:l,currentSubscriptionOverride:u})){case Wt.Lower:k.intentionType=ue.CHANGE_UNIT_QUANTITY,k.title=v;break;case Wt.Higher:k.intentionType=ue.CHANGE_UNIT_QUANTITY,k.title=U;break;default:k.title=g,k.disabled=!0;break}else k.title=A(a),k.intentionType=ue.CHANGE_BILLING_PERIOD;else L&&(k.title=typeof x=="function"?x({plan:i,selectedBillingPeriod:a}):x,k.intentionType=ue.REQUEST_CUSTOM_PLAN_ACCESS);e&&i.scheduledUpdate&&(k.disabled=!1,k.title=F,k.intentionType=ue.CANCEL_SCHEDULED_UPDATES);const w=m||k.disabled;return r.jsx(r.Fragment,{children:r.jsx(Po,{className:"stigg-paywall-plan-button-layout",children:e&&$?r.jsxs(ho,{color:"secondary",variant:"body1",className:"stigg-paywall-schedule-update-text",children:[$," ",r.jsx(yo,{color:"secondary",onClick:()=>{f(!0),Promise.resolve(o(k.intentionType)).finally(()=>f(!1))},children:k.title})]}):r.jsxs(r.Fragment,{children:[r.jsxs(po,{className:"stigg-paywall-plan-button","data-testid":`paywall-card-cta-${i.displayName}`,disabled:w,$disabled:w,onClick:()=>{f(!0),Promise.resolve(o(k.intentionType)).finally(()=>f(!1))},children:[r.jsx(fo,{className:"stigg-paywall-plan-button-text",variant:"h6",color:"primary.main",children:k.title}),m&&r.jsx(go,{color:h.stigg.palette.text.disabled,loading:!0,size:16})]}),c?r.jsx(Co,{className:"stigg-trial-days-left-text",variant:"h6",color:"secondary",children:i.isCurrentCustomerPlan&&i.trialDaysLeft&&r.jsxs(r.Fragment,{children:[r.jsxs("b",{children:[i.trialDaysLeft," days"]})," left on your free trial"]})}):r.jsx("div",{style:{height:"20px"}})]})})})}const ee=({amount:e,currency:n=P.Currency.Usd,locale:i,maximumFractionDigits:a=5,minimumFractionDigits:t=0,removeTrailingZero:o})=>{const s=n.toString(),c=ir(s);let l=new Intl.NumberFormat(i,T({maximumFractionDigits:a,minimumFractionDigits:t,style:"currency",currency:s,trailingZeroDisplay:o?"stripIfInteger":"auto"},c?{currencyDisplay:"code"}:{})).format(e||0);return c&&(l=l.replace(s,c)),l=l.replace(/\s/g,""),l};function se(e,{locale:n,maximumFractionDigits:i}={}){return new Intl.NumberFormat(n,{maximumFractionDigits:i}).format(e)}function Eo({planPrices:e,paywallCalculatedPrice:n,selectedBillingPeriod:i,locale:a,shouldShowMonthlyPriceAmount:t,paywallLocale:o,perUnitQuantityByFeature:s}){var b,E,I;const{amount:c,currency:l}=n||e[0],u=c||0,d=e.length===1;let h=i===P.BillingPeriod.Annually&&t?u/12:u,m,f;const g=o.price.pricePeriod(t?P.BillingPeriod.Monthly:P.BillingPeriod.Annually);let x=g;for(const N of e)if(N.isTieredPrice&&N.tiers){const A=(s==null?void 0:s[N.feature.featureId])||1;m=N.tiers,f=co(N),h+=tn(N,A,i,t)}if(d){const N=e[0],A=N.blockSize&&N.blockSize>1?`for ${se(N.blockSize)} ${((b=N.feature)==null?void 0:b.unitsPlural)||((E=N.feature)==null?void 0:E.units)||""}`:`per ${((I=N.feature)==null?void 0:I.units)||""}`;N.pricingModel===P.BillingModel.PerUnit&&!N.isTieredPrice?x=`${A} ${g}`:N.pricingModel===P.BillingModel.UsageBased&&(x=`${A}`)}return{price:ee({amount:h,currency:l,locale:a,minimumFractionDigits:2,removeTrailingZero:!0}),unit:x,tiers:m,tierUnits:f}}function ki(e,n,i,a,t,o){var s;switch(e.pricingType){case P.PricingType.Free:return typeof i.price.free=="function"?i.price.free(e.paywallCurrency):i.price.free;case P.PricingType.Custom:return{price:typeof i.price.custom=="function"?i.price.custom({plan:e,selectedBillingPeriod:n}):i.price.custom};case P.PricingType.Paid:{const c=e.pricePoints.filter(d=>d.billingPeriod===n),l=(s=e.paywallCalculatedPricePoints)==null?void 0:s.find(d=>d.billingPeriod===n);if(!(c!=null&&c.length)&&!l)return{price:i.price.priceNotSet};const u={planPrices:c,paywallCalculatedPrice:l,selectedBillingPeriod:n,perUnitQuantityByFeature:o||{}};return i.price.paid?i.price.paid(O(T({},u),{plan:e})):Eo(O(T({},u),{locale:a,shouldShowMonthlyPriceAmount:t,paywallLocale:i}))}default:return{price:""}}}const So=p(be)`
106
+ `;function nl({isNextPlan:e,customer:n,plan:i,billingPeriod:r,isCustomerOnTrial:t,onPlanSelected:a,paywallLocale:s,withTrialLeftRow:c,currentSubscription:l,currentSubscriptionOverride:u,perUnitQuantityByFeature:d}){const p=zt(),[m,f]=D.useState(!1),{currentPlan:g,custom:y,downgrade:P,startTrial:S,upgrade:v,startNew:A,switchToBillingPeriod:k,cancelScheduledUpdate:w}=s.planCTAButton,T=ee.isFunction(P)?P(i):P,N=ee.isFunction(v)?v(i):v,F={title:n?i.isLowerThanCurrentPlan?T:N:A,disabled:!1,intentionType:i.isLowerThanCurrentPlan?ye.DOWNGRADE_PLAN:t?ye.UPGRADE_TRIAL_TO_PAID:ye.UPGRADE_PLAN},U=i.pricingType===b.PricingType.Custom,{line1:L}=Kr({scheduledUpdate:i.scheduledUpdate,options:{withDate:!0}});if(i.isTriable&&!i.isCurrentCustomerPlan&&!t)F.title=S(i),F.intentionType=ye.START_TRIAL;else if(i.isCurrentCustomerPlan&&!t)if(r===i.currentCustomerPlanBillingPeriod||i.pricingType&&[b.PricingType.Free,b.PricingType.Custom].includes(i.pricingType))switch(Zc({perUnitQuantityByFeature:d,plan:i,currentSubscription:l,currentSubscriptionOverride:u})){case Fn.Lower:F.intentionType=ye.CHANGE_UNIT_QUANTITY,F.title=T;break;case Fn.Higher:F.intentionType=ye.CHANGE_UNIT_QUANTITY,F.title=N;break;default:F.title=g,F.disabled=!0;break}else F.title=k(r),F.intentionType=ye.CHANGE_BILLING_PERIOD;else U&&(F.title=typeof y=="function"?y({plan:i,selectedBillingPeriod:r}):y,F.intentionType=ye.REQUEST_CUSTOM_PLAN_ACCESS);e&&i.scheduledUpdate&&(F.disabled=!1,F.title=w,F.intentionType=ye.CANCEL_SCHEDULED_UPDATES);const j=m||F.disabled;return o.jsx(o.Fragment,{children:o.jsx(tl,{className:"stigg-paywall-plan-button-layout",children:e&&L?o.jsxs(Xc,{color:"secondary",variant:"body1",className:"stigg-paywall-schedule-update-text",children:[L," ",o.jsx(Jc,{color:"secondary",onClick:()=>{f(!0),Promise.resolve(a(F.intentionType)).finally(()=>f(!1))},children:F.title})]}):o.jsxs(o.Fragment,{children:[o.jsxs(Kc,{className:"stigg-paywall-plan-button","data-testid":`paywall-card-cta-${i.displayName}`,disabled:j,$disabled:j,onClick:()=>{f(!0),Promise.resolve(a(F.intentionType)).finally(()=>f(!1))},children:[o.jsx(Qc,{className:"stigg-paywall-plan-button-text",variant:"h6",color:"primary.main",children:F.title}),m&&o.jsx(zc,{color:p.stigg.palette.text.disabled,loading:!0,size:16})]}),c?o.jsx(el,{className:"stigg-trial-days-left-text",variant:"h6",color:"secondary",children:i.isCurrentCustomerPlan&&i.trialDaysLeft&&o.jsxs(o.Fragment,{children:[o.jsxs("b",{children:[i.trialDaysLeft," days"]})," left on your free trial"]})}):o.jsx("div",{style:{height:"20px"}})]})})})}const re=({amount:e,currency:n=b.Currency.Usd,locale:i,maximumFractionDigits:r=5,minimumFractionDigits:t=0,removeTrailingZero:a})=>{const s=n.toString(),c=ko(s);let l=new Intl.NumberFormat(i,I({maximumFractionDigits:r,minimumFractionDigits:t,style:"currency",currency:s,trailingZeroDisplay:a?"stripIfInteger":"auto"},c?{currencyDisplay:"code"}:{})).format(e||0);return c&&(l=l.replace(s,c)),l=l.replace(/\s/g,""),l};function pe(e,{locale:n,maximumFractionDigits:i}={}){return new Intl.NumberFormat(n,{maximumFractionDigits:i}).format(e)}function il({planPrices:e,paywallCalculatedPrice:n,selectedBillingPeriod:i,locale:r,shouldShowMonthlyPriceAmount:t,paywallLocale:a,perUnitQuantityByFeature:s}){var P,S,v;const{amount:c,currency:l}=n||e[0],u=c||0,d=e.length===1;let p=i===b.BillingPeriod.Annually&&t?u/12:u,m,f;const g=a.price.pricePeriod(t?b.BillingPeriod.Monthly:b.BillingPeriod.Annually);let y=g;for(const A of e)if(A.isTieredPrice&&A.tiers){const k=(s==null?void 0:s[A.feature.featureId])||1;m=A.tiers,f=qc(A),p+=Zn(A,k,i,t)}if(d){const A=e[0],k=A.blockSize&&A.blockSize>1?`for ${pe(A.blockSize)} ${((P=A.feature)==null?void 0:P.unitsPlural)||((S=A.feature)==null?void 0:S.units)||""}`:`per ${((v=A.feature)==null?void 0:v.units)||""}`;A.pricingModel===b.BillingModel.PerUnit&&!A.isTieredPrice?y=`${k} ${g}`:A.pricingModel===b.BillingModel.UsageBased&&(y=`${k}`)}return{price:re({amount:p,currency:l,locale:r,minimumFractionDigits:2,removeTrailingZero:!0}),unit:y,tiers:m,tierUnits:f}}function ea(e,n,i,r,t,a){var s;switch(e.pricingType){case b.PricingType.Free:return typeof i.price.free=="function"?i.price.free(e.paywallCurrency):i.price.free;case b.PricingType.Custom:return{price:typeof i.price.custom=="function"?i.price.custom({plan:e,selectedBillingPeriod:n}):i.price.custom};case b.PricingType.Paid:{const c=e.pricePoints.filter(d=>d.billingPeriod===n),l=(s=e.paywallCalculatedPricePoints)==null?void 0:s.find(d=>d.billingPeriod===n);if(!(c!=null&&c.length)&&!l)return{price:i.price.priceNotSet};const u={planPrices:c,paywallCalculatedPrice:l,selectedBillingPeriod:n,perUnitQuantityByFeature:a||{}};return i.price.paid?i.price.paid(_(I({},u),{plan:e})):il(_(I({},u),{locale:r,shouldShowMonthlyPriceAmount:t,paywallLocale:i}))}default:return{price:""}}}const rl=h(we)`
93
107
  border-radius: 10px;
94
108
  text-transform: none;
95
109
 
@@ -98,26 +112,26 @@
98
112
  &:hover {
99
113
  background-color: ${({theme:e,$success:n,$error:i})=>n?e.stigg.palette.successDark:i?e.stigg.palette.errorDark:""};
100
114
  }
101
- `,Ie=i=>{var a=i,{variant:e="outlined"}=a,n=ie(a,["variant"]);return r.jsx(So,T({variant:e},n))},ht=p(rr)(({theme:e})=>({"& .MuiOutlinedInput-root":{height:"42px",borderRadius:e.stigg.border.radius,fieldset:{borderColor:e.stigg.palette.outlinedBorder},"&:not(.Mui-focused):hover fieldset":{borderColor:e.stigg.palette.outlinedRestingBorder}},"& .MuiInputBase-input":T({padding:"8px 12px",borderRadius:e.stigg.border.radius,fontFamily:e.stigg.typography.fontFamily,color:e.stigg.palette.text.primary},e.stigg.typography.body),"& .Mui-error":{fontFamily:e.stigg.typography.fontFamily}})),qe=p(j)`
115
+ `,Le=i=>{var r=i,{variant:e="outlined"}=r,n=se(r,["variant"]);return o.jsx(rl,I({variant:e},n))},Kt=h(wo)(({theme:e})=>({"& .MuiOutlinedInput-root":{height:"42px",borderRadius:e.stigg.border.radius,fieldset:{borderColor:e.stigg.palette.outlinedBorder},"&:not(.Mui-focused):hover fieldset":{borderColor:e.stigg.palette.outlinedRestingBorder}},"& .MuiInputBase-input":I({padding:"8px 12px",borderRadius:e.stigg.border.radius,fontFamily:e.stigg.typography.fontFamily,color:e.stigg.palette.text.primary},e.stigg.typography.body),"& .Mui-error":{fontFamily:e.stigg.typography.fontFamily}})),dt=h(R)`
102
116
  display: flex;
103
117
  flex-direction: ${({$flexDirection:e})=>e||"row"};
104
118
  gap: ${({$gap:e})=>e}px;
105
- `,Do=p(qe)`
119
+ `,al=h(dt)`
106
120
  span {
107
121
  display: flex;
108
122
  flex: 1;
109
123
  }
110
- `,Yt=p(j)`
124
+ `,jn=h(R)`
111
125
  span {
112
126
  display: flex;
113
127
  flex: ${({flex:e})=>e};
114
128
  }
115
- `,Q=p(V)`
129
+ `,te=h(H)`
116
130
  border-radius: 4px;
117
- `,Mn=p(j)`
131
+ `,Yi=h(R)`
118
132
  display: flex;
119
133
  flex-direction: column;
120
- `;function xo(){return r.jsxs(Mn,{container:!0,children:[r.jsxs(qe,{item:!0,$gap:48,children:[r.jsx(Q,{width:120,height:20}),r.jsx(Q,{width:120,height:20})]}),r.jsx(je,{className:"stigg-checkout-plan-header-divider",sx:{marginY:2}}),r.jsxs(Mn,{item:!0,children:[r.jsx(Q,{width:120,height:20}),r.jsxs(Do,{$gap:16,marginTop:3,children:[r.jsx(Q,{height:20}),r.jsx(Q,{height:20})]}),r.jsxs(qe,{$gap:130,marginTop:3,children:[r.jsx(Yt,{flex:1,children:r.jsx(Q,{height:20})}),r.jsx(Yt,{flex:3,children:r.jsx(Q,{height:20})})]})]})]})}const an=e=>e.target.blur();function To({width:e,tierUnits:n,value:i,handleChange:a,errorMessage:t}){return r.jsx(ht,{type:"number",onWheel:an,fullWidth:!0,error:!!t,sx:{minHeight:"46px",width:e},InputProps:{endAdornment:r.jsx(ar,{position:"end",children:r.jsx(y,{variant:"body1",color:"primary",children:n})})},value:i,onChange:o=>{var c,l;const s=(c=o==null?void 0:o.target)!=null&&c.value?Number((l=o==null?void 0:o.target)==null?void 0:l.value):null;s&&a(s)}})}const Io=p(sr)`
134
+ `;function ol(){return o.jsxs(Yi,{container:!0,children:[o.jsxs(dt,{item:!0,$gap:48,children:[o.jsx(te,{width:120,height:20}),o.jsx(te,{width:120,height:20})]}),o.jsx(We,{className:"stigg-checkout-plan-header-divider",sx:{marginY:2}}),o.jsxs(Yi,{item:!0,children:[o.jsx(te,{width:120,height:20}),o.jsxs(al,{$gap:16,marginTop:3,children:[o.jsx(te,{height:20}),o.jsx(te,{height:20})]}),o.jsxs(dt,{$gap:130,marginTop:3,children:[o.jsx(jn,{flex:1,children:o.jsx(te,{height:20})}),o.jsx(jn,{flex:3,children:o.jsx(te,{height:20})})]})]})]})}const Kn=e=>e.target.blur();function sl({width:e,tierUnits:n,value:i,handleChange:r,errorMessage:t}){return o.jsx(Kt,{type:"number",onWheel:Kn,fullWidth:!0,error:!!t,sx:{minHeight:"46px",width:e},InputProps:{endAdornment:o.jsx(No,{position:"end",children:o.jsx(C,{variant:"body1",color:"primary",children:n})})},value:i,onChange:a=>{var c,l;const s=(c=a==null?void 0:a.target)!=null&&c.value?Number((l=a==null?void 0:a.target)==null?void 0:l.value):null;s&&r(s)}})}const cl=h(jo)`
121
135
  border-radius: 10px;
122
136
  min-height: 42px;
123
137
  min-width: 120px;
@@ -125,7 +139,7 @@
125
139
  &:hover .MuiOutlinedInput-notchedOutline {
126
140
  border-color: ${({theme:e})=>e.stigg.palette.outlinedBorder};
127
141
  }
128
- `,vo=p(or)`
142
+ `,ll=h(Fo)`
129
143
  & .MuiInputBase-input {
130
144
  padding: 10px 12px;
131
145
  }
@@ -133,34 +147,34 @@
133
147
  &.Mui-focused .MuiOutlinedInput-notchedOutline {
134
148
  border-color: ${({theme:e})=>e.stigg.palette.primary} !important;
135
149
  }
136
- `;function Ao({value:e,componentId:n,tierUnits:i,tiers:a,handleChange:t,errorMessage:o}){return a?r.jsx(Io,{value:e.toString(),fullWidth:!0,error:!!o,onChange:s=>{var l,u;const c=(l=s==null?void 0:s.target)!=null&&l.value?Number((u=s==null?void 0:s.target)==null?void 0:u.value):null;c&&t(c)},id:n,input:r.jsx(vo,{}),MenuProps:{MenuListProps:{disablePadding:!0},PaperProps:{sx:{marginTop:"4px",borderRadius:"10px"}}},children:K.map(a,s=>{var c;return r.jsx(cr,{className:"stigg-price-tier-menu-item-text",value:(c=s.upTo)==null?void 0:c.toString(),children:r.jsxs(y,{variant:"body1",color:"primary",style:{lineHeight:"unset"},children:[Ei(s.upTo)," ",i]})},s.upTo)})}):null}const ko=p(y)`
150
+ `;function ul({value:e,componentId:n,tierUnits:i,tiers:r,handleChange:t,errorMessage:a}){return r?o.jsx(cl,{value:e.toString(),fullWidth:!0,error:!!a,onChange:s=>{var l,u;const c=(l=s==null?void 0:s.target)!=null&&l.value?Number((u=s==null?void 0:s.target)==null?void 0:u.value):null;c&&t(c)},id:n,input:o.jsx(ll,{}),MenuProps:{MenuListProps:{disablePadding:!0},PaperProps:{sx:{marginTop:"4px",borderRadius:"10px"}}},children:ee.map(r,s=>{var c;return o.jsx(Ro,{className:"stigg-price-tier-menu-item-text",value:(c=s.upTo)==null?void 0:c.toString(),children:o.jsxs(C,{variant:"body1",color:"primary",style:{lineHeight:"unset"},children:[Wr(s.upTo)," ",i]})},s.upTo)})}):null}const dl=h(C)`
137
151
  min-height: 46px;
138
- `;function Ni(e){const{tiers:n,errorMessage:i}=e;return r.jsx(r.Fragment,{children:r.jsxs(Z.Box,{display:"flex",flexDirection:"column",justifyContent:"center",style:{width:"100%"},children:[r.jsx(ko,{as:"div",className:"stigg-price-tier-select",children:nn(n)?r.jsx(To,T({},e)):r.jsx(Ao,T({},e))}),r.jsx(y,{style:{margin:"4px"},variant:"caption",color:"error",children:i})]})})}const wi="‎",No=p(y)`
152
+ `;function ta(e){const{tiers:n,errorMessage:i}=e;return o.jsx(o.Fragment,{children:o.jsxs(K.Box,{display:"flex",flexDirection:"column",justifyContent:"center",style:{width:"100%"},children:[o.jsx(dl,{as:"div",className:"stigg-price-tier-select",children:zn(n)?o.jsx(sl,I({},e)):o.jsx(ul,I({},e))}),o.jsx(C,{style:{margin:"4px"},variant:"caption",color:"error",children:i})]})})}const na="‎",ml=h(C)`
139
153
  word-break: break-word;
140
154
  width: 100%;
141
- `,wo=p(y)`
155
+ `,gl=h(C)`
142
156
  white-space: nowrap;
143
- `,Fo=p(y)`
157
+ `,pl=h(C)`
144
158
  white-space: normal;
145
159
  min-height: 39px;
146
- `;function jo({plan:e,billingPeriod:n,hasMonthlyPrice:i,hasAnnuallyPrice:a,paywallLocale:t}){var c,l;const o=e.pricePoints.find(u=>u.billingPeriod===n);let s=wi;return o&&i&&a&&(s=((l=(c=t.price).billingPeriod)==null?void 0:l.call(c,n))||`, billed ${n.toLowerCase()}`),r.jsx(y,{as:"span",className:"stigg-price-billing-period-text",variant:"h6",color:"secondary",children:s})}const Uo=({showStartingAt:e,withUnitPriceRow:n,withStartingAtRow:i,withTiersRow:a,plan:t,billingPeriod:o,paywallLocale:s,locale:c,hasMonthlyPrice:l,hasAnnuallyPrice:u,perUnitQuantityByFeature:d,setPerUnitQuantityByFeature:h})=>{var A;const{price:m,unit:f,tiers:g,tierUnits:x}=ki(t,o,s,c,l,d),b=t.pricePoints.find(F=>F.billingPeriod===o&&F.isTieredPrice),E=b?b.feature.featureId:void 0,I=(A=d[E||""])!=null?A:1,N=F=>{E&&h(v=>O(T({},v),{[E]:F}))};return r.jsx(No,{as:"div",className:"stigg-price-text",children:r.jsxs(r.Fragment,{children:[i&&r.jsx(y,{style:{minHeight:"20px"},className:"stigg-starting-at-text",variant:"body1",color:"secondary",children:e?s.price.startingAtCaption:wi}),r.jsx(Fo,{className:"stigg-price-point",variant:"h1",children:m}),n&&r.jsxs(y,{as:"div",className:"stigg-price-unit-and-billing-period-text",style:{minHeight:"48px"},children:[r.jsx(wo,{className:"stigg-price-unit-text",as:"span",variant:"h6",color:"secondary",children:f}),r.jsx(jo,{plan:t,billingPeriod:o,hasAnnuallyPrice:u,hasMonthlyPrice:l,paywallLocale:s})]}),a?r.jsx(Ni,{componentId:`${t.id}_${E}_tier`,tiers:g,tierUnits:x,tiersMode:b==null?void 0:b.tiersMode,handleChange:N,value:I}):null]})})},Mo=p(be)`
160
+ `;function fl({plan:e,billingPeriod:n,hasMonthlyPrice:i,hasAnnuallyPrice:r,paywallLocale:t}){var c,l;const a=e.pricePoints.find(u=>u.billingPeriod===n);let s=na;return a&&i&&r&&(s=((l=(c=t.price).billingPeriod)==null?void 0:l.call(c,n))||`, billed ${n.toLowerCase()}`),o.jsx(C,{as:"span",className:"stigg-price-billing-period-text",variant:"h6",color:"secondary",children:s})}const hl=({showStartingAt:e,withUnitPriceRow:n,withStartingAtRow:i,withTiersRow:r,plan:t,billingPeriod:a,paywallLocale:s,locale:c,hasMonthlyPrice:l,hasAnnuallyPrice:u,perUnitQuantityByFeature:d,setPerUnitQuantityByFeature:p})=>{var k;const{price:m,unit:f,tiers:g,tierUnits:y}=ea(t,a,s,c,l,d),P=t.pricePoints.find(w=>w.billingPeriod===a&&w.isTieredPrice),S=P?P.feature.featureId:void 0,v=(k=d[S||""])!=null?k:1,A=w=>{S&&p(T=>_(I({},T),{[S]:w}))};return o.jsx(ml,{as:"div",className:"stigg-price-text",children:o.jsxs(o.Fragment,{children:[i&&o.jsx(C,{style:{minHeight:"20px"},className:"stigg-starting-at-text",variant:"body1",color:"secondary",children:e?s.price.startingAtCaption:na}),o.jsx(pl,{className:"stigg-price-point",variant:"h1",children:m}),n&&o.jsxs(C,{as:"div",className:"stigg-price-unit-and-billing-period-text",style:{minHeight:"48px"},children:[o.jsx(gl,{className:"stigg-price-unit-text",as:"span",variant:"h6",color:"secondary",children:f}),o.jsx(fl,{plan:t,billingPeriod:a,hasAnnuallyPrice:u,hasMonthlyPrice:l,paywallLocale:s})]}),r?o.jsx(ta,{componentId:`${t.id}_${S}_tier`,tiers:g,tierUnits:y,tiersMode:P==null?void 0:P.tiersMode,handleChange:A,value:v}):null]})})},yl=h(we)`
147
161
  padding: 0px;
148
162
  text-transform: none;
149
163
  margin-left: 0px;
150
- `,Ro=p(y)`
164
+ `,Cl=h(C)`
151
165
  font-size: 14px;
152
166
  font-weight: 500;
153
- `,Lo=p.div`
167
+ `,bl=h.div`
154
168
  width: 100%;
155
169
  gap: 10px;
156
- `,Bo=p.div`
170
+ `,El=h.div`
157
171
  margin-top: 10px;
158
172
  overflow: hidden;
159
173
  display: flex;
160
174
  flex-direction: column;
161
175
  gap: 4px;
162
176
  width: 100%;
163
- `,Oo=p.div`
177
+ `,Pl=h.div`
164
178
  display: flex;
165
179
  flex-direction: row;
166
180
  flex-wrap: nowrap;
@@ -169,7 +183,7 @@
169
183
  padding: 8px 0px;
170
184
  max-height: 44px;
171
185
  gap: 16px;
172
- `,$o=p(y)`
186
+ `,Sl=h(C)`
173
187
  overflow: hidden;
174
188
  font-feature-settings: 'liga' off, 'clig' off;
175
189
  text-overflow: ellipsis;
@@ -178,17 +192,17 @@
178
192
  white-space: nowrap;
179
193
  min-width: 0;
180
194
  flex-shrink: 1;
181
- `,_o=p(ce)`
195
+ `,Dl=h(fe)`
182
196
  width: 24px;
183
197
  height: 24px;
184
198
  color: ${({theme:e})=>e.stigg.palette.primary};
185
- `,Go=p.div`
199
+ `,vl=h.div`
186
200
  flex: 1;
187
201
  min-width: 0;
188
- `,Vo=p.div`
202
+ `,xl=h.div`
189
203
  margin-top: 16px;
190
204
  display: flex;
191
- `,jt=4;function Ho({addons:e,paywallLocale:n}){const[i,a]=D.useState(!1);if(!e||e.length===0)return null;const t=e.filter(c=>{var l;return!((l=c.hiddenFromWidgets)!=null&&l.includes(P.WidgetType.Paywall))}),o=()=>{a(!i)},s=i?t:t.slice(0,jt);return s.length===0?null:r.jsxs(Lo,{className:"stigg-compatible-addons-container",children:[r.jsx(y,{className:"stigg-compatible-addons-header",color:"secondary",variant:"body1",bold:!0,children:n.addonsTitle}),r.jsx(Bo,{className:"stigg-compatible-addons-list",children:s.map(c=>r.jsxs(Oo,{className:mi(`stigg-compatible-addon--${c.id}`,"stigg-compatible-addon-item"),children:[r.jsx(_o,{icon:"Add",className:"stigg-compatible-addon-icon"}),r.jsx(Go,{className:"stigg-compatible-addon-content",children:r.jsx($o,{variant:"body1",color:"primary",className:"stigg-compatible-addon-name",children:c.displayName})})]},c.id))}),t.length>jt&&r.jsx(Vo,{children:r.jsx(Mo,{variant:"text",onClick:o,children:r.jsx(Ro,{color:"primary.main",children:i?"Show less":`Show ${t.length-jt} more`})})})]})}const qo="66px",Wo=p.div`
205
+ `,fn=4;function Il({addons:e,paywallLocale:n}){const[i,r]=D.useState(!1);if(!e||e.length===0)return null;const t=e.filter(c=>{var l;return!((l=c.hiddenFromWidgets)!=null&&l.includes(b.WidgetType.Paywall))}),a=()=>{r(!i)},s=i?t:t.slice(0,fn);return s.length===0?null:o.jsxs(bl,{className:"stigg-compatible-addons-container",children:[o.jsx(C,{className:"stigg-compatible-addons-header",color:"secondary",variant:"body1",bold:!0,children:n.addonsTitle}),o.jsx(El,{className:"stigg-compatible-addons-list",children:s.map(c=>o.jsxs(Pl,{className:Dr(`stigg-compatible-addon--${c.id}`,"stigg-compatible-addon-item"),children:[o.jsx(Dl,{icon:"Add",className:"stigg-compatible-addon-icon"}),o.jsx(vl,{className:"stigg-compatible-addon-content",children:o.jsx(Sl,{variant:"body1",color:"primary",className:"stigg-compatible-addon-name",children:c.displayName})})]},c.id))}),t.length>fn&&o.jsx(xl,{children:o.jsx(yl,{variant:"text",onClick:a,children:o.jsx(Cl,{color:"primary.main",children:i?"Show less":`Show ${t.length-fn} more`})})})]})}const Tl="66px",Al=h.div`
192
206
  position: relative;
193
207
  background-color: ${({theme:e,$isCurrentPlan:n})=>n?e.stigg.palette.backgroundHighlight:e.stigg.palette.backgroundPaper};
194
208
  border: ${({theme:e,$isHighlighted:n})=>n?`3px solid ${e.stigg.palette.primary}`:`1px solid ${e.stigg.palette.outlinedBorder}`};
@@ -201,38 +215,38 @@
201
215
  align-items: flex-start;
202
216
  justify-content: flex-start;
203
217
  position: relative;
204
- `,Yo=p.div`
218
+ `,kl=h.div`
205
219
  margin-top: ${({$planHasEntitlements:e})=>e?"32px":"0px"};
206
- `,Zo=p(y)`
220
+ `,Nl=h(C)`
207
221
  padding-bottom: 8px;
208
- `,zo=p.div`
222
+ `,wl=h.div`
209
223
  height: 2px;
210
224
  width: 100%;
211
225
  background-color: ${({theme:e})=>e.stigg.palette.outlinedBorder};
212
226
  margin-bottom: 40px;
213
- `,Ko=p(y)`
227
+ `,Fl=h(C)`
214
228
  text-align: ${({theme:e})=>e.stigg.layout.descriptionAlignment};
215
229
  min-height: ${({theme:e})=>e.stigg.layout.descriptionMinHeight};
216
- `,Qo=p.div`
230
+ `,jl=h.div`
217
231
  background-color: ${({theme:e})=>e.stigg.palette.primary};
218
232
  border-radius: 40px;
219
233
  position: absolute;
220
234
  top: -12px;
221
- `,Xo=p(y)`
235
+ `,Rl=h(C)`
222
236
  margin: 0;
223
237
  padding: 2px 8px;
224
- `,Jo=p.div`
238
+ `,Ml=h.div`
225
239
  width: 100%;
226
240
  display: flex;
227
241
  flex-direction: column;
228
- align-items: ${({theme:e})=>xi(e.stigg.layout.headerAlignment)};
229
- `,es=p.div`
242
+ align-items: ${({theme:e})=>zr(e.stigg.layout.headerAlignment)};
243
+ `,Ul=h.div`
230
244
  position: absolute;
231
245
  top: 0;
232
246
  background-color: ${({theme:e})=>e.stigg.palette.outlinedBorder};
233
247
  border-radius: 0px 0px 10px 10px;
234
248
  padding: 3px 12px;
235
- `,ts=p(Si)`
249
+ `,Ol=h(Yr)`
236
250
  display: flex;
237
251
  height: 100%;
238
252
  margin-right: 4px;
@@ -240,7 +254,7 @@
240
254
  path {
241
255
  fill: ${({theme:e})=>e.stigg.palette.text.primary};
242
256
  }
243
- `;function ns({text:e="Next",iconsColor:n}){return r.jsx(es,{children:r.jsxs(j,{display:"flex",alignItems:"center",gap:1,children:[r.jsx(ts,{$iconsColor:n}),r.jsx(y,{color:"primary",variant:"body1",children:e})]})})}function is({withUnitPriceRow:e,withTiersRow:n,withTrialLeftRow:i,customer:a,plan:t,billingPeriod:o,isHighlighted:s,currentSubscription:c,currentSubscriptionOverride:l,shouldShowDescriptionSection:u,hasMonthlyPrice:d,hasAnnuallyPrice:h,isCustomerOnTrial:m,onPlanSelected:f,paywallLocale:g,locale:x,withStartingAtRow:b,isCustomerInCustomPlan:E,selectDefaultTierIndex:I,hideCompatibleAddons:N}){var W;const A=t.isNextPlan&&t.isNextPlan(o),F=t.pricePoints.filter(J=>J.billingPeriod===o),v=(W=t.paywallCalculatedPricePoints)==null?void 0:W.find(J=>J.billingPeriod===o),U=F.length>1&&!!(v!=null&&v.additionalChargesMayApply),k=!E||t.pricingType===P.PricingType.Custom;let L=null;A?L=r.jsx(ns,{text:"Next plan"}):s&&g.highlightChip&&(L=r.jsx(Qo,{className:"stigg-highlight-badge",children:r.jsx(Xo,{className:"stigg-highlight-badge-text",color:"white",bold:!0,children:g.highlightChip})}));const[$,w]=D.useState(Ai({plan:t,billingPeriod:o,currentSubscription:c,currentSubscriptionOverride:l,selectDefaultTierIndex:I})),R=J=>{const de=Object.keys($).map(he=>({featureId:he,quantity:$[he]}));return f(J,de)};return r.jsxs(Wo,{className:mi(`stigg-${t.id}`,"stigg-plan-offering-container",{"stigg-current-plan":t.isCurrentCustomerPlan}),$isHighlighted:s,$isCurrentPlan:t.isCurrentCustomerPlan,children:[L,r.jsxs(Jo,{className:"stigg-header-wrapper",children:[r.jsx(Zo,{className:"stigg-plan-header",variant:"h3",children:t.displayName}),u&&r.jsx(Ko,{className:"stigg-plan-description",variant:"h6",color:"secondary",children:t.description}),r.jsx(Uo,{showStartingAt:U,withUnitPriceRow:e,withStartingAtRow:b,withTiersRow:n,plan:t,billingPeriod:o,paywallLocale:g,locale:x,hasAnnuallyPrice:h,hasMonthlyPrice:d,setPerUnitQuantityByFeature:w,perUnitQuantityByFeature:$}),k?r.jsx(bo,{isNextPlan:A,customer:a,plan:t,currentSubscription:c,currentSubscriptionOverride:l,billingPeriod:o,isCustomerOnTrial:m,onPlanSelected:R,paywallLocale:g,withTrialLeftRow:i,perUnitQuantityByFeature:$}):r.jsx("div",{style:{height:qo}}),r.jsx(zo,{className:"stigg-plan-header-divider"})]}),r.jsx(oo,{plan:t,billingPeriod:o,paywallLocale:g}),r.jsx(Yo,{$planHasEntitlements:t.entitlements.length>0,className:"stigg-addons-container",children:!N&&t.compatibleAddons&&t.compatibleAddons.length>0&&r.jsx(Ho,{addons:t.compatibleAddons,paywallLocale:g})})]})}const as=p.div`
257
+ `;function Ll({text:e="Next",iconsColor:n}){return o.jsx(Ul,{children:o.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[o.jsx(Ol,{$iconsColor:n}),o.jsx(C,{color:"primary",variant:"body1",children:e})]})})}function Bl({withUnitPriceRow:e,withTiersRow:n,withTrialLeftRow:i,customer:r,plan:t,billingPeriod:a,isHighlighted:s,currentSubscription:c,currentSubscriptionOverride:l,shouldShowDescriptionSection:u,hasMonthlyPrice:d,hasAnnuallyPrice:p,isCustomerOnTrial:m,onPlanSelected:f,paywallLocale:g,locale:y,withStartingAtRow:P,isCustomerInCustomPlan:S,selectDefaultTierIndex:v,hideCompatibleAddons:A}){var z;const k=t.isNextPlan&&t.isNextPlan(a),w=t.pricePoints.filter(X=>X.billingPeriod===a),T=(z=t.paywallCalculatedPricePoints)==null?void 0:z.find(X=>X.billingPeriod===a),N=w.length>1&&!!(T!=null&&T.additionalChargesMayApply),F=!S||t.pricingType===b.PricingType.Custom;let U=null;k?U=o.jsx(Ll,{text:"Next plan"}):s&&g.highlightChip&&(U=o.jsx(jl,{className:"stigg-highlight-badge",children:o.jsx(Rl,{className:"stigg-highlight-badge-text",color:"white",bold:!0,children:g.highlightChip})}));const[L,j]=D.useState(Jr({plan:t,billingPeriod:a,currentSubscription:c,currentSubscriptionOverride:l,selectDefaultTierIndex:v})),O=X=>{const me=Object.keys(L).map(xe=>({featureId:xe,quantity:L[xe]}));return f(X,me)};return o.jsxs(Al,{className:Dr(`stigg-${t.id}`,"stigg-plan-offering-container",{"stigg-current-plan":t.isCurrentCustomerPlan}),$isHighlighted:s,$isCurrentPlan:t.isCurrentCustomerPlan,children:[U,o.jsxs(Ml,{className:"stigg-header-wrapper",children:[o.jsx(Nl,{className:"stigg-plan-header",variant:"h3",children:t.displayName}),u&&o.jsx(Fl,{className:"stigg-plan-description",variant:"h6",color:"secondary",children:t.description}),o.jsx(hl,{showStartingAt:N,withUnitPriceRow:e,withStartingAtRow:P,withTiersRow:n,plan:t,billingPeriod:a,paywallLocale:g,locale:y,hasAnnuallyPrice:p,hasMonthlyPrice:d,setPerUnitQuantityByFeature:j,perUnitQuantityByFeature:L}),F?o.jsx(nl,{isNextPlan:k,customer:r,plan:t,currentSubscription:c,currentSubscriptionOverride:l,billingPeriod:a,isCustomerOnTrial:m,onPlanSelected:O,paywallLocale:g,withTrialLeftRow:i,perUnitQuantityByFeature:L}):o.jsx("div",{style:{height:Tl}}),o.jsx(wl,{className:"stigg-plan-header-divider"})]}),o.jsx(Vc,{plan:t,billingPeriod:a,paywallLocale:g}),o.jsx(kl,{$planHasEntitlements:t.entitlements.length>0,className:"stigg-addons-container",children:!A&&t.compatibleAddons&&t.compatibleAddons.length>0&&o.jsx(Il,{addons:t.compatibleAddons,paywallLocale:g})})]})}const _l=h.div`
244
258
  height: 40px;
245
259
  padding: 0 20px;
246
260
  margin-bottom: ${({theme:e})=>e.stigg.layout.switchBottomSpacing};
@@ -250,9 +264,9 @@
250
264
  display: flex;
251
265
  align-items: center;
252
266
  justify-content: center;
253
- `,Rn=p(y)`
267
+ `,Zi=h(C)`
254
268
  margin: 0 8px;
255
- `,rs=p(lr)`
269
+ `,$l=h(Mo)`
256
270
  & .react-switch-bg {
257
271
  border: ${({theme:e})=>`1px solid ${e.stigg.palette.switchBorder}`};
258
272
  background: ${({theme:e})=>e.stigg.palette.switchFill} !important;
@@ -263,17 +277,17 @@
263
277
  background: ${({theme:e})=>e.stigg.palette.switchHandle} !important;
264
278
  top: 0.5px !important;
265
279
  }
266
- `;function os({discount:e,disabled:n}){return r.jsxs(y,{variant:"h6",color:n?"disabled":"primary",className:"stigg-discount-rate-text",children:[e,"% off"]})}function ss({discountRate:e,selectedBillingPeriod:n,onBillingPeriodChanged:i,availableBillingPeriods:a}){if(a.length<=1)return null;const t=n===P.BillingPeriod.Monthly;return r.jsxs(as,{className:"stigg-period-picker-container",children:[r.jsx(Rn,{variant:"h6",className:"stigg-monthly-period-text",color:t?"primary":"disabled",children:"Monthly"}),r.jsx(rs,{className:"stigg-period-switch",uncheckedIcon:!1,checkedIcon:!1,height:16,width:33,onChange:o=>i(o?P.BillingPeriod.Annually:P.BillingPeriod.Monthly),checked:!t,borderRadius:10,handleDiameter:19}),r.jsx(Rn,{variant:"h6",className:"stigg-annual-period-text",color:t?"disabled":"primary",children:"Annual"}),e!==0&&r.jsx(os,{discount:e,disabled:t})]})}function cs(e,n){if(!pe(e)&&!pe(n)){const i=n/12;return Math.round((e-i)/e*100)}return null}function Ln(e,n){var a;let i;if(i=(a=e.paywallCalculatedPricePoints)==null?void 0:a.find(t=>t.billingPeriod===n),i||(i=e.pricePoints.find(t=>t.billingPeriod===n)),!(i!=null&&i.amount)){const t=e.pricePoints.find(o=>o.isTieredPrice&&o.billingPeriod===n);if(t)return tn(t,1)}return i==null?void 0:i.amount}function ls(e){return e.reduce((n,i)=>{const a=Ln(i,P.BillingPeriod.Monthly),t=Ln(i,P.BillingPeriod.Annually),o=cs(a,t);return o&&(n=Math.max(n,o)),n},0)}const us=e=>C.createElement("svg",T({width:135,height:16,viewBox:"0 0 135 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{d:"M0.0987549 3.43016V12.9878H1.15589V9.52681H3.96527C5.94922 9.52681 7.28874 8.25245 7.28874 6.47848C7.28874 4.70452 5.94922 3.43016 3.96527 3.43016H0.0987549ZM1.15589 8.55656V4.40765H4.04492C5.33376 4.40765 6.18816 5.26205 6.18816 6.47848C6.18816 7.69492 5.33376 8.55656 4.04492 8.55656H1.15589Z",fill:"#001E6C"}),C.createElement("path",{d:"M11.7787 13.1616C13.9075 13.1616 15.6525 11.5397 15.6525 9.38199C15.6525 7.21703 13.9365 5.62408 11.8077 5.62408C9.64999 5.62408 7.93395 7.24599 7.93395 9.41095C7.93395 11.5687 9.62103 13.1616 11.7787 13.1616ZM11.7932 12.2276C10.2365 12.2276 9.02005 11.0256 9.02005 9.39647C9.02005 7.76732 10.2365 6.56537 11.7932 6.56537C13.321 6.56537 14.5664 7.76732 14.5664 9.39647C14.5664 11.0256 13.321 12.2276 11.7932 12.2276Z",fill:"#001E6C"}),C.createElement("path",{d:"M19.9054 12.9878L21.4766 6.94189H21.5056L23.0623 12.9878H24.4018L26.5958 5.8051H25.4155L23.7936 11.909H23.7647L22.2152 5.8051H20.7815L19.232 11.909H19.203L17.5522 5.8051H16.3575L18.5659 12.9878H19.9054Z",fill:"#001E6C"}),C.createElement("path",{d:"M34.9835 9.42544C34.9835 7.30392 33.4051 5.62408 31.1532 5.62408C29.0534 5.62408 27.3084 7.18083 27.3084 9.41095C27.3084 11.5542 28.9086 13.1616 31.1822 13.1616C32.7679 13.1616 34.0567 12.3941 34.6794 11.1922L33.7816 10.707C33.3688 11.6049 32.3696 12.2348 31.1966 12.2348C29.5241 12.2348 28.5031 10.9894 28.4017 9.7223H34.969C34.9835 9.59197 34.9835 9.54129 34.9835 9.42544ZM31.1387 6.55089C32.5434 6.55089 33.6657 7.49942 33.854 8.80998H28.4307C28.6552 7.5501 29.7558 6.55089 31.1387 6.55089Z",fill:"#001E6C"}),C.createElement("path",{d:"M39.5922 5.68201C38.564 5.68201 37.8182 6.20334 37.4924 6.93464L37.391 5.8051H36.486V12.9878H37.5431V8.5638C37.5431 7.44873 38.1585 6.77535 39.3171 6.77535H39.9977V5.68201H39.5922Z",fill:"#001E6C"}),C.createElement("path",{d:"M48.2486 9.42544C48.2486 7.30392 46.6702 5.62408 44.4183 5.62408C42.3185 5.62408 40.5735 7.18083 40.5735 9.41095C40.5735 11.5542 42.1737 13.1616 44.4473 13.1616C46.033 13.1616 47.3218 12.3941 47.9445 11.1922L47.0467 10.707C46.634 11.6049 45.6348 12.2348 44.4618 12.2348C42.7892 12.2348 41.7682 10.9894 41.6669 9.7223H48.2342C48.2486 9.59197 48.2486 9.54129 48.2486 9.42544ZM44.4039 6.55089C45.8085 6.55089 46.9308 7.49942 47.1191 8.80998H41.6958C41.9203 7.5501 43.0209 6.55089 44.4039 6.55089Z",fill:"#001E6C"}),C.createElement("path",{d:"M55.846 7.02877C55.2161 6.13817 54.2024 5.63132 53.0149 5.63132C50.9224 5.63132 49.2425 7.21703 49.2425 9.39647C49.2425 11.5759 50.8934 13.1616 52.986 13.1616C54.1807 13.1616 55.2161 12.6403 55.8533 11.7425L55.9981 12.9878H56.9032V2.56128L55.846 2.67713V7.02877ZM53.0294 12.2276C51.5306 12.2276 50.3286 11.0401 50.3286 9.39647C50.3286 7.75284 51.5306 6.56537 53.0294 6.56537C54.5789 6.56537 55.846 7.76732 55.846 9.39647C55.846 11.0256 54.5789 12.2276 53.0294 12.2276Z",fill:"#001E6C"}),C.createElement("path",{d:"M65.7314 5.63132C64.5367 5.63132 63.5085 6.14541 62.8713 7.04325V2.56128L61.8142 2.67713V12.9878H62.7192L62.8641 11.7497C63.494 12.6475 64.5077 13.1616 65.7024 13.1616C67.795 13.1616 69.4748 11.5759 69.4748 9.39647C69.4748 7.21703 67.8239 5.63132 65.7314 5.63132ZM65.6879 12.2276C64.1384 12.2276 62.8713 11.0256 62.8713 9.39647C62.8713 7.76732 64.1384 6.56537 65.6879 6.56537C67.1867 6.56537 68.3887 7.75284 68.3887 9.39647C68.3887 11.0401 67.1867 12.2276 65.6879 12.2276Z",fill:"#001E6C"}),C.createElement("path",{d:"M76.2187 5.8051V9.9178C76.2187 11.3297 75.3136 12.1841 74.0465 12.1841C72.7866 12.1841 72.077 11.4456 72.077 10.1133V5.8051H71.0199V10.2726C71.0199 11.9669 72.1349 13.0965 73.7641 13.0965C74.843 13.0965 75.6901 12.6765 76.2187 11.9814V12.8937C76.2187 14.1608 75.2629 15.0804 73.8727 15.0804C72.7504 15.0804 71.8236 14.4794 71.5847 13.4295L70.6579 13.9074C71.0995 15.16 72.3087 16 73.8582 16C75.8132 16 77.2758 14.5953 77.2758 12.7923V5.8051H76.2187Z",fill:"#001E6C"}),C.createElement("path",{d:"M108.672 10.4867C108.672 11.9077 107.411 12.7873 105.491 12.7873C104.464 12.7873 103.634 12.6028 102.84 12.2091C102.914 11.76 102.982 11.2187 103 10.5913C103.738 11.0219 104.575 11.231 105.381 11.231C106.34 11.231 106.839 11.0096 106.839 10.5421C106.857 10.0807 106.5 9.87155 105.067 9.59473C103.406 9.26255 102.668 8.57359 102.668 7.35559C102.668 5.97767 103.929 5.0857 105.848 5.0857C106.697 5.0857 107.54 5.24564 108.186 5.52246L107.866 7.06647C107.226 6.7712 106.537 6.63587 105.848 6.63587C104.95 6.63587 104.507 6.85733 104.507 7.29408C104.507 7.67547 104.815 7.83541 106.217 8.12453C108.007 8.50592 108.678 9.19488 108.678 10.4744L108.672 10.4867ZM112.879 11.0957C112.16 11.0957 111.581 10.7143 111.581 9.70546V6.88808H113.408L113.747 5.25794H111.581V2.93884C111.157 3.06187 110.517 3.2095 109.681 3.28332L109.662 10.0315C109.662 11.8708 110.763 12.7996 112.412 12.7996C112.787 12.7996 113.113 12.7627 113.39 12.6951L113.753 10.9665C113.525 11.0465 113.236 11.1018 112.879 11.1018V11.0957ZM114.965 12.6889H116.884V5.25794H114.965V12.6889ZM115.93 2.21912C115.309 2.21297 114.829 2.66817 114.823 3.27102C114.823 3.89232 115.278 4.35983 115.894 4.36598C116.515 4.36598 116.976 3.92923 116.989 3.32638C117.001 2.70508 116.546 2.23142 115.937 2.21912H115.93ZM126.056 5.25794V11.5263C126.056 13.8946 124.456 15.5247 121.756 15.5247C120.784 15.5247 119.714 15.3094 118.994 14.8973C119.492 14.3867 119.831 13.9438 120.046 13.6239C120.532 13.79 121.042 13.8762 121.565 13.8762C123.275 13.8762 124.143 12.9288 124.143 11.7354V11.4955C123.534 12.1968 122.654 12.6336 121.602 12.6336C119.584 12.6336 118.065 11.1326 118.065 8.90577C118.065 6.67893 119.726 5.098 121.756 5.098C122.808 5.098 123.724 5.4794 124.333 6.19912L124.395 5.25179H126.062L126.056 5.25794ZM124.155 8.90577C124.155 7.72468 123.294 6.82657 122.107 6.82657C120.919 6.82657 120.046 7.72468 120.046 8.90577C120.046 10.0868 120.907 10.9542 122.107 10.9542C123.306 10.9542 124.155 10.0561 124.155 8.90577ZM134.994 5.25794V11.5263C134.994 13.8946 133.394 15.5247 130.694 15.5247C129.722 15.5247 128.652 15.3094 127.932 14.8973C128.43 14.3867 128.769 13.9438 128.984 13.6239C129.47 13.79 129.98 13.8762 130.503 13.8762C132.213 13.8762 133.081 12.9288 133.081 11.7354V11.4955C132.472 12.1968 131.592 12.6336 130.54 12.6336C128.523 12.6336 127.003 11.1326 127.003 8.90577C127.003 6.67893 128.664 5.098 130.694 5.098C131.746 5.098 132.662 5.4794 133.271 6.19912L133.333 5.25179H135L134.994 5.25794ZM133.093 8.90577C133.093 7.72468 132.232 6.82657 131.045 6.82657C129.857 6.82657 128.984 7.72468 128.984 8.90577C128.984 10.0868 129.845 10.9542 131.045 10.9542C132.244 10.9542 133.093 10.0561 133.093 8.90577Z",fill:"#001E6C"}),C.createElement("path",{d:"M95.7092 14.9825C95.6354 15.0194 94.2267 15.6407 91.7353 15.5238C90.4374 15.4623 89.3117 15.2224 88.512 15.0009L92.8241 9.99361C93.5931 10.1905 94.5835 10.375 95.7092 10.4304C98.2005 10.5534 99.6092 9.92594 99.683 9.88903L95.7092 14.9886V14.9825ZM89.2686 5.36155C88.5612 2.96863 88.838 1.45537 88.8564 1.3754L84.8457 6.44421C84.8334 6.52418 84.5566 8.03744 85.2578 10.4304C85.6269 11.673 86.1252 12.7126 86.5312 13.4384L90.3759 8.0682C90.0068 7.36693 89.5885 6.44421 89.2686 5.3677V5.36155ZM99.2647 5.89058C98.6988 3.97132 97.813 2.55033 97.4501 2.009L93.8822 6.55494L94.5527 9.77216C94.9526 9.82752 95.3462 9.86443 95.7461 9.88903C95.9491 9.89518 96.1521 9.90134 96.3489 9.90134C98.2805 9.90134 99.357 9.44613 99.4739 9.39076L99.7507 9.26773C99.7753 8.60338 99.7322 7.42844 99.2709 5.88443L99.2647 5.89058ZM97.0256 1.68297C96.4166 1.45537 94.8295 0.932493 92.8303 0.83407C91.2248 0.754101 90.0744 0.987856 89.4347 1.1724L89.3793 1.46767C89.367 1.52919 89.121 2.96248 89.7792 5.20777C89.8899 5.58916 90.0252 5.9644 90.1729 6.33964L93.4577 6.22891L97.0318 1.68912L97.0256 1.68297Z",fill:"#001E6C"})),Fi="stigg-watermark",ds=p(us)`
280
+ `;function Gl({discount:e,disabled:n}){return o.jsxs(C,{variant:"h6",color:n?"disabled":"primary",className:"stigg-discount-rate-text",children:[e,"% off"]})}function Vl({discountRate:e,selectedBillingPeriod:n,onBillingPeriodChanged:i,availableBillingPeriods:r}){if(r.length<=1)return null;const t=n===b.BillingPeriod.Monthly;return o.jsxs(_l,{className:"stigg-period-picker-container",children:[o.jsx(Zi,{variant:"h6",className:"stigg-monthly-period-text",color:t?"primary":"disabled",children:"Monthly"}),o.jsx($l,{className:"stigg-period-switch",uncheckedIcon:!1,checkedIcon:!1,height:16,width:33,onChange:a=>i(a?b.BillingPeriod.Annually:b.BillingPeriod.Monthly),checked:!t,borderRadius:10,handleDiameter:19}),o.jsx(Zi,{variant:"h6",className:"stigg-annual-period-text",color:t?"disabled":"primary",children:"Annual"}),e!==0&&o.jsx(Gl,{discount:e,disabled:t})]})}function Hl(e,n){if(!De(e)&&!De(n)){const i=n/12;return Math.round((e-i)/e*100)}return null}function zi(e,n){var r;let i;if(i=(r=e.paywallCalculatedPricePoints)==null?void 0:r.find(t=>t.billingPeriod===n),i||(i=e.pricePoints.find(t=>t.billingPeriod===n)),!(i!=null&&i.amount)){const t=e.pricePoints.find(a=>a.isTieredPrice&&a.billingPeriod===n);if(t)return Zn(t,1)}return i==null?void 0:i.amount}function ql(e){return e.reduce((n,i)=>{const r=zi(i,b.BillingPeriod.Monthly),t=zi(i,b.BillingPeriod.Annually),a=Hl(r,t);return a&&(n=Math.max(n,a)),n},0)}const Wl=e=>E.createElement("svg",I({width:135,height:16,viewBox:"0 0 135 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M0.0987549 3.43016V12.9878H1.15589V9.52681H3.96527C5.94922 9.52681 7.28874 8.25245 7.28874 6.47848C7.28874 4.70452 5.94922 3.43016 3.96527 3.43016H0.0987549ZM1.15589 8.55656V4.40765H4.04492C5.33376 4.40765 6.18816 5.26205 6.18816 6.47848C6.18816 7.69492 5.33376 8.55656 4.04492 8.55656H1.15589Z",fill:"#001E6C"}),E.createElement("path",{d:"M11.7787 13.1616C13.9075 13.1616 15.6525 11.5397 15.6525 9.38199C15.6525 7.21703 13.9365 5.62408 11.8077 5.62408C9.64999 5.62408 7.93395 7.24599 7.93395 9.41095C7.93395 11.5687 9.62103 13.1616 11.7787 13.1616ZM11.7932 12.2276C10.2365 12.2276 9.02005 11.0256 9.02005 9.39647C9.02005 7.76732 10.2365 6.56537 11.7932 6.56537C13.321 6.56537 14.5664 7.76732 14.5664 9.39647C14.5664 11.0256 13.321 12.2276 11.7932 12.2276Z",fill:"#001E6C"}),E.createElement("path",{d:"M19.9054 12.9878L21.4766 6.94189H21.5056L23.0623 12.9878H24.4018L26.5958 5.8051H25.4155L23.7936 11.909H23.7647L22.2152 5.8051H20.7815L19.232 11.909H19.203L17.5522 5.8051H16.3575L18.5659 12.9878H19.9054Z",fill:"#001E6C"}),E.createElement("path",{d:"M34.9835 9.42544C34.9835 7.30392 33.4051 5.62408 31.1532 5.62408C29.0534 5.62408 27.3084 7.18083 27.3084 9.41095C27.3084 11.5542 28.9086 13.1616 31.1822 13.1616C32.7679 13.1616 34.0567 12.3941 34.6794 11.1922L33.7816 10.707C33.3688 11.6049 32.3696 12.2348 31.1966 12.2348C29.5241 12.2348 28.5031 10.9894 28.4017 9.7223H34.969C34.9835 9.59197 34.9835 9.54129 34.9835 9.42544ZM31.1387 6.55089C32.5434 6.55089 33.6657 7.49942 33.854 8.80998H28.4307C28.6552 7.5501 29.7558 6.55089 31.1387 6.55089Z",fill:"#001E6C"}),E.createElement("path",{d:"M39.5922 5.68201C38.564 5.68201 37.8182 6.20334 37.4924 6.93464L37.391 5.8051H36.486V12.9878H37.5431V8.5638C37.5431 7.44873 38.1585 6.77535 39.3171 6.77535H39.9977V5.68201H39.5922Z",fill:"#001E6C"}),E.createElement("path",{d:"M48.2486 9.42544C48.2486 7.30392 46.6702 5.62408 44.4183 5.62408C42.3185 5.62408 40.5735 7.18083 40.5735 9.41095C40.5735 11.5542 42.1737 13.1616 44.4473 13.1616C46.033 13.1616 47.3218 12.3941 47.9445 11.1922L47.0467 10.707C46.634 11.6049 45.6348 12.2348 44.4618 12.2348C42.7892 12.2348 41.7682 10.9894 41.6669 9.7223H48.2342C48.2486 9.59197 48.2486 9.54129 48.2486 9.42544ZM44.4039 6.55089C45.8085 6.55089 46.9308 7.49942 47.1191 8.80998H41.6958C41.9203 7.5501 43.0209 6.55089 44.4039 6.55089Z",fill:"#001E6C"}),E.createElement("path",{d:"M55.846 7.02877C55.2161 6.13817 54.2024 5.63132 53.0149 5.63132C50.9224 5.63132 49.2425 7.21703 49.2425 9.39647C49.2425 11.5759 50.8934 13.1616 52.986 13.1616C54.1807 13.1616 55.2161 12.6403 55.8533 11.7425L55.9981 12.9878H56.9032V2.56128L55.846 2.67713V7.02877ZM53.0294 12.2276C51.5306 12.2276 50.3286 11.0401 50.3286 9.39647C50.3286 7.75284 51.5306 6.56537 53.0294 6.56537C54.5789 6.56537 55.846 7.76732 55.846 9.39647C55.846 11.0256 54.5789 12.2276 53.0294 12.2276Z",fill:"#001E6C"}),E.createElement("path",{d:"M65.7314 5.63132C64.5367 5.63132 63.5085 6.14541 62.8713 7.04325V2.56128L61.8142 2.67713V12.9878H62.7192L62.8641 11.7497C63.494 12.6475 64.5077 13.1616 65.7024 13.1616C67.795 13.1616 69.4748 11.5759 69.4748 9.39647C69.4748 7.21703 67.8239 5.63132 65.7314 5.63132ZM65.6879 12.2276C64.1384 12.2276 62.8713 11.0256 62.8713 9.39647C62.8713 7.76732 64.1384 6.56537 65.6879 6.56537C67.1867 6.56537 68.3887 7.75284 68.3887 9.39647C68.3887 11.0401 67.1867 12.2276 65.6879 12.2276Z",fill:"#001E6C"}),E.createElement("path",{d:"M76.2187 5.8051V9.9178C76.2187 11.3297 75.3136 12.1841 74.0465 12.1841C72.7866 12.1841 72.077 11.4456 72.077 10.1133V5.8051H71.0199V10.2726C71.0199 11.9669 72.1349 13.0965 73.7641 13.0965C74.843 13.0965 75.6901 12.6765 76.2187 11.9814V12.8937C76.2187 14.1608 75.2629 15.0804 73.8727 15.0804C72.7504 15.0804 71.8236 14.4794 71.5847 13.4295L70.6579 13.9074C71.0995 15.16 72.3087 16 73.8582 16C75.8132 16 77.2758 14.5953 77.2758 12.7923V5.8051H76.2187Z",fill:"#001E6C"}),E.createElement("path",{d:"M108.672 10.4867C108.672 11.9077 107.411 12.7873 105.491 12.7873C104.464 12.7873 103.634 12.6028 102.84 12.2091C102.914 11.76 102.982 11.2187 103 10.5913C103.738 11.0219 104.575 11.231 105.381 11.231C106.34 11.231 106.839 11.0096 106.839 10.5421C106.857 10.0807 106.5 9.87155 105.067 9.59473C103.406 9.26255 102.668 8.57359 102.668 7.35559C102.668 5.97767 103.929 5.0857 105.848 5.0857C106.697 5.0857 107.54 5.24564 108.186 5.52246L107.866 7.06647C107.226 6.7712 106.537 6.63587 105.848 6.63587C104.95 6.63587 104.507 6.85733 104.507 7.29408C104.507 7.67547 104.815 7.83541 106.217 8.12453C108.007 8.50592 108.678 9.19488 108.678 10.4744L108.672 10.4867ZM112.879 11.0957C112.16 11.0957 111.581 10.7143 111.581 9.70546V6.88808H113.408L113.747 5.25794H111.581V2.93884C111.157 3.06187 110.517 3.2095 109.681 3.28332L109.662 10.0315C109.662 11.8708 110.763 12.7996 112.412 12.7996C112.787 12.7996 113.113 12.7627 113.39 12.6951L113.753 10.9665C113.525 11.0465 113.236 11.1018 112.879 11.1018V11.0957ZM114.965 12.6889H116.884V5.25794H114.965V12.6889ZM115.93 2.21912C115.309 2.21297 114.829 2.66817 114.823 3.27102C114.823 3.89232 115.278 4.35983 115.894 4.36598C116.515 4.36598 116.976 3.92923 116.989 3.32638C117.001 2.70508 116.546 2.23142 115.937 2.21912H115.93ZM126.056 5.25794V11.5263C126.056 13.8946 124.456 15.5247 121.756 15.5247C120.784 15.5247 119.714 15.3094 118.994 14.8973C119.492 14.3867 119.831 13.9438 120.046 13.6239C120.532 13.79 121.042 13.8762 121.565 13.8762C123.275 13.8762 124.143 12.9288 124.143 11.7354V11.4955C123.534 12.1968 122.654 12.6336 121.602 12.6336C119.584 12.6336 118.065 11.1326 118.065 8.90577C118.065 6.67893 119.726 5.098 121.756 5.098C122.808 5.098 123.724 5.4794 124.333 6.19912L124.395 5.25179H126.062L126.056 5.25794ZM124.155 8.90577C124.155 7.72468 123.294 6.82657 122.107 6.82657C120.919 6.82657 120.046 7.72468 120.046 8.90577C120.046 10.0868 120.907 10.9542 122.107 10.9542C123.306 10.9542 124.155 10.0561 124.155 8.90577ZM134.994 5.25794V11.5263C134.994 13.8946 133.394 15.5247 130.694 15.5247C129.722 15.5247 128.652 15.3094 127.932 14.8973C128.43 14.3867 128.769 13.9438 128.984 13.6239C129.47 13.79 129.98 13.8762 130.503 13.8762C132.213 13.8762 133.081 12.9288 133.081 11.7354V11.4955C132.472 12.1968 131.592 12.6336 130.54 12.6336C128.523 12.6336 127.003 11.1326 127.003 8.90577C127.003 6.67893 128.664 5.098 130.694 5.098C131.746 5.098 132.662 5.4794 133.271 6.19912L133.333 5.25179H135L134.994 5.25794ZM133.093 8.90577C133.093 7.72468 132.232 6.82657 131.045 6.82657C129.857 6.82657 128.984 7.72468 128.984 8.90577C128.984 10.0868 129.845 10.9542 131.045 10.9542C132.244 10.9542 133.093 10.0561 133.093 8.90577Z",fill:"#001E6C"}),E.createElement("path",{d:"M95.7092 14.9825C95.6354 15.0194 94.2267 15.6407 91.7353 15.5238C90.4374 15.4623 89.3117 15.2224 88.512 15.0009L92.8241 9.99361C93.5931 10.1905 94.5835 10.375 95.7092 10.4304C98.2005 10.5534 99.6092 9.92594 99.683 9.88903L95.7092 14.9886V14.9825ZM89.2686 5.36155C88.5612 2.96863 88.838 1.45537 88.8564 1.3754L84.8457 6.44421C84.8334 6.52418 84.5566 8.03744 85.2578 10.4304C85.6269 11.673 86.1252 12.7126 86.5312 13.4384L90.3759 8.0682C90.0068 7.36693 89.5885 6.44421 89.2686 5.3677V5.36155ZM99.2647 5.89058C98.6988 3.97132 97.813 2.55033 97.4501 2.009L93.8822 6.55494L94.5527 9.77216C94.9526 9.82752 95.3462 9.86443 95.7461 9.88903C95.9491 9.89518 96.1521 9.90134 96.3489 9.90134C98.2805 9.90134 99.357 9.44613 99.4739 9.39076L99.7507 9.26773C99.7753 8.60338 99.7322 7.42844 99.2709 5.88443L99.2647 5.89058ZM97.0256 1.68297C96.4166 1.45537 94.8295 0.932493 92.8303 0.83407C91.2248 0.754101 90.0744 0.987856 89.4347 1.1724L89.3793 1.46767C89.367 1.52919 89.121 2.96248 89.7792 5.20777C89.8899 5.58916 90.0252 5.9644 90.1729 6.33964L93.4577 6.22891L97.0318 1.68912L97.0256 1.68297Z",fill:"#001E6C"})),ia="stigg-watermark",Yl=h(Wl)`
267
281
  * {
268
282
  fill: ${({theme:e})=>e.stigg.palette.text.secondary};
269
283
  }
270
- `,ms=p.div`
284
+ `,Zl=h.div`
271
285
  align-self: ${({$alignSelf:e})=>e||"unset"};
272
286
 
273
287
  @media (max-width: 1040px) {
274
288
  ${({$smallScreenAlign:e})=>e&&`align-self: ${e};`}
275
289
  }
276
- `;function Ue({source:e,showWatermark:n,align:i,smallScreenAlign:a="center",style:t={}}){if(!n)return null;const o=()=>{const s=window.location.hostname.replace("www.","");window.open(`https://www.stigg.io/?utm_source=${s}&utm_medium=referral&utm_campaign=${e}`,"_blank")};return r.jsx(ms,{$alignSelf:i,$smallScreenAlign:a,className:Fi,style:T({cursor:"pointer"},t),onClick:o,children:r.jsx(ds,{})})}function ji(e,n){return e.pricePoints.some(i=>i.billingPeriod===n)}function Bn(e,n){return e.some(i=>ji(i,n))}function gs(e,n,i){return e.filter(a=>a.pricingType!==P.PricingType.Paid||ji(a,n)).filter(a=>!i||!i({plan:a}))}const ps=p.div`
290
+ `;function Ke({source:e,showWatermark:n,align:i,smallScreenAlign:r="center",style:t={}}){if(!n)return null;const a=()=>{const s=window.location.hostname.replace("www.","");window.open(`https://www.stigg.io/?utm_source=${s}&utm_medium=referral&utm_campaign=${e}`,"_blank")};return o.jsx(Zl,{$alignSelf:i,$smallScreenAlign:r,className:ia,style:I({cursor:"pointer"},t),onClick:a,children:o.jsx(Yl,{})})}function ra(e,n){return e.pricePoints.some(i=>i.billingPeriod===n)}function Ki(e,n){return e.some(i=>ra(i,n))}function zl(e,n,i){return e.filter(r=>r.pricingType!==b.PricingType.Paid||ra(r,n)).filter(r=>!i||!i({plan:r}))}const Kl=h.div`
277
291
  color: ${({theme:e})=>e.stigg.palette.text.primary};
278
292
  display: flex;
279
293
  align-items: stretch;
@@ -281,7 +295,7 @@
281
295
  flex-wrap: wrap;
282
296
  padding: 10px 0;
283
297
  gap: ${({theme:e})=>e.stigg.layout.planMargin};
284
- `,fs=p.div`
298
+ `,Ql=h.div`
285
299
  display: flex;
286
300
  flex-direction: column;
287
301
  align-items: center;
@@ -289,17 +303,17 @@
289
303
  & * {
290
304
  box-sizing: border-box;
291
305
  }
292
- `,hs=p.div`
306
+ `,Xl=h.div`
293
307
  display: flex;
294
308
  flex-direction: column;
295
309
  align-items: center;
296
- `,ys=({plans:e,customer:n,currentSubscription:i,highlightedPlanId:a,selectedBillingPeriod:t,onBillingPeriodChanged:o,availableBillingPeriods:s,isCustomerOnTrial:c,onPlanSelected:l,paywallLocale:u,locale:d,shouldHidePlan:h,selectDefaultTierIndex:m,currentSubscriptionOverride:f,hideCompatibleAddons:g})=>{const{stigg:x}=G(),b=ls(e),E=e.some(w=>!!w.description),I=Bn(e,P.BillingPeriod.Monthly),N=Bn(e,P.BillingPeriod.Annually),A=gs(e,t,h),F=D.useCallback((w,R,W)=>l({plan:w,customer:n,subscription:i,intentionType:R,selectedBillingPeriod:t,billableFeatures:W}),[n,t,i,l]),v=!!i&&i.plan.pricingType===P.PricingType.Custom,U=D.useMemo(()=>A.some(w=>{var J;const R=w.pricePoints.filter(de=>de.billingPeriod===t),W=(J=w.paywallCalculatedPricePoints)==null?void 0:J.find(de=>de.billingPeriod===t);return R.length>1&&!!(W!=null&&W.additionalChargesMayApply)}),[t,A]),k=D.useMemo(()=>A.some(w=>!!ki(w,t,u,d,I).unit),[t,I,d,u,A]),L=D.useMemo(()=>!v&&A.some(w=>{const R=Ai({plan:w,billingPeriod:t,currentSubscription:i,currentSubscriptionOverride:f});return Object.values(R).length>0}),[t,i,f,v,A]),$=A.some(w=>w.isCurrentCustomerPlan&&w.trialDaysLeft);return r.jsx(fs,{className:"stigg-paywall-container",children:r.jsxs(hs,{className:"stigg-paywall-layout",children:[r.jsx(ss,{onBillingPeriodChanged:o,selectedBillingPeriod:t,availableBillingPeriods:s,discountRate:b}),r.jsx(ps,{className:"stigg-paywall-plans-layout",children:A.map(w=>r.jsx(is,{withUnitPriceRow:k,withTiersRow:L,withTrialLeftRow:$,shouldShowDescriptionSection:E,hasMonthlyPrice:I,hasAnnuallyPrice:N,plan:w,withStartingAtRow:U,currentSubscription:i,currentSubscriptionOverride:f,billingPeriod:t,isHighlighted:w.id===a,isCustomerOnTrial:c,onPlanSelected:(R,W)=>F(w,R,W),paywallLocale:u,locale:d,customer:n,isCustomerInCustomPlan:v,selectDefaultTierIndex:m,hideCompatibleAddons:g},w.id))}),r.jsx(Ue,{source:"paywall",align:"end",style:{marginTop:16},showWatermark:x.isWidgetWatermarkEnabled})]})})};class Cs{error(n,i,...a){console.error(n,i||{},a)}log(n,i){console.log(n,i||{})}debug(n,i){console.debug(n,i||{})}}const yt=new Cs;function Ps(e,n,i){const a=e.flatMap(c=>c.pricePoints).map(c=>c.billingPeriod),t=K.countBy(a),o=K.uniq(a);let s;if(i&&o.includes(i))s=i;else if(n){const c=n.find(l=>l.status===P.SubscriptionStatus.Active);c&&c.prices.length>0&&(s=c==null?void 0:c.prices[0].billingPeriod)}return s||(s=(t[P.BillingPeriod.Monthly]||0)>(t[P.BillingPeriod.Annually]||0)?P.BillingPeriod.Monthly:P.BillingPeriod.Annually),{defaultBillingPeriod:s,availableBillingPeriods:o}}function bs(e){return te.utc(e).diff(te.utc(),"days",!1)+1}const Ui={h1:{fontSize:"24px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"16px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"}};function Ce(e,n="px"){if(e)return`${e}${n}`}function nt(e){if(!e)return"normal";switch(e){case P.FontWeight.Normal:return"normal";case P.FontWeight.Bold:return"bold";default:return"normal"}}function Ct(e,n){var a,t,o,s,c,l,u,d;const i=n||{h1:{fontSize:"32px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"24px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"}};return{fontFamilyUrl:(e==null?void 0:e.fontFamily)||void 0,h1:{fontSize:Ce((a=e==null?void 0:e.h1)==null?void 0:a.fontSize)||i.h1.fontSize,fontWeight:nt((t=e==null?void 0:e.h1)==null?void 0:t.fontWeight)||i.h1.fontWeight,semanticElement:i.h1.semanticElement},h2:{fontSize:Ce((o=e==null?void 0:e.h2)==null?void 0:o.fontSize)||i.h2.fontSize,fontWeight:nt((s=e==null?void 0:e.h2)==null?void 0:s.fontWeight)||i.h2.fontWeight,semanticElement:i.h2.semanticElement},h3:{fontSize:Ce((c=e==null?void 0:e.h3)==null?void 0:c.fontSize)||i.h3.fontSize,fontWeight:nt((l=e==null?void 0:e.h3)==null?void 0:l.fontWeight)||i.h3.fontWeight,semanticElement:i.h3.semanticElement},body:{fontSize:Ce((u=e==null?void 0:e.body)==null?void 0:u.fontSize)||i.body.fontSize,fontWeight:nt((d=e==null?void 0:e.body)==null?void 0:d.fontWeight)||i.body.fontWeight,semanticElement:i.body.semanticElement}}}function Ut(e){if(e)switch(e){case P.Alignment.Left:return"left";case P.Alignment.Center:return"center";case P.Alignment.Right:return"right";default:return}}function Es(e){const{palette:n,customCss:i,typography:a}=e;return{palette:{primary:(n==null?void 0:n.primary)||void 0,backgroundPaper:(n==null?void 0:n.paywallBackgroundColor)||void 0,outlinedBorder:(n==null?void 0:n.borderColor)||void 0,backgroundHighlight:(n==null?void 0:n.currentPlanBackground)||void 0,text:{primary:(n==null?void 0:n.textColor)||void 0}},typography:Ct(a),customCss:i||void 0}}function Ss(e){const{palette:n,layout:i,customCss:a,typography:t}=e;return{customCss:a||void 0,palette:{primary:(n==null?void 0:n.primary)||void 0,backgroundPaper:(n==null?void 0:n.backgroundColor)||void 0,outlinedBorder:(n==null?void 0:n.borderColor)||void 0,backgroundHighlight:(n==null?void 0:n.currentPlanBackground)||void 0,text:{primary:(n==null?void 0:n.textColor)||void 0}},typography:Ct(t),layout:{ctaAlignment:Ut(i==null?void 0:i.alignment),headerAlignment:Ut(i==null?void 0:i.alignment),descriptionAlignment:Ut(i==null?void 0:i.alignment),planMaxWidth:Ce(i==null?void 0:i.planWidth),planMinWidth:Ce(i==null?void 0:i.planWidth),planMargin:Ce(i==null?void 0:i.planMargin),planPadding:Ce(i==null?void 0:i.planPadding)}}}function Ds(e){const{palette:n,typography:i,customCss:a}=e;return{palette:{primary:(n==null?void 0:n.primary)||void 0,backgroundPaper:(n==null?void 0:n.backgroundColor)||void 0,outlinedBorder:(n==null?void 0:n.borderColor)||void 0,text:{primary:(n==null?void 0:n.textColor)||void 0},backgroundHighlight:(n==null?void 0:n.summaryBackgroundColor)||void 0},typography:Ct(i,Ui),customCss:a||void 0}}function xs(e){let n=!0,i=(e==null?void 0:e.find(o=>o.status===P.SubscriptionStatus.InTrial))||null,a=i==null?void 0:i.plan;const t=i!=null&&i.trialEndDate?bs(i.trialEndDate):void 0;return a||(n=!1,i=(e==null?void 0:e.find(o=>o.status===P.SubscriptionStatus.Active))||null,a=i==null?void 0:i.plan),{currentSubscription:i,currentPlan:a,isCustomerOnTrial:n,trialDaysLeft:t}}function Ts(e,n,i){var A,F;const{plans:a,currency:t,configuration:o,customer:s,activeSubscriptions:c,paywallCalculatedPricePoints:l}=e||{},{currentSubscription:u,currentPlan:d,isCustomerOnTrial:h,trialDaysLeft:m}=xs(c),f=i==null?void 0:i({currentSubscription:u}),g=(u==null?void 0:u.scheduledUpdates)||[],x=(A=u==null?void 0:u.price)==null?void 0:A.billingPeriod,b=g.find(({subscriptionScheduleType:v})=>v===P.SubscriptionScheduleType.Downgrade),E=g.find(({subscriptionScheduleType:v})=>v===P.SubscriptionScheduleType.BillingPeriod);let I=ft(a,v=>v.order).map(v=>{var $;const U=($=s==null?void 0:s.eligibleForTrial)==null?void 0:$.find(w=>w.productId===v.product.id),k=f!=null&&f.planId?(f==null?void 0:f.planId)===v.id:v.id===(d==null?void 0:d.id),L=w=>{var de;const R=b==null?void 0:b.scheduleVariables,W=E==null?void 0:E.scheduleVariables,J=v.pricePoints.some(he=>he.billingPeriod===w);return b?((de=b.targetPackage)==null?void 0:de.refId)===v.id&&(!J||R.billingPeriod===w):E&&k?W.billingPeriod===w:!1};return O(T({},v),{paywallCalculatedPricePoints:l==null?void 0:l.filter(w=>w.planId===v.id),isTriable:!pe(v.defaultTrialConfig)&&(!U||U.eligible),isCurrentCustomerPlan:k,currentCustomerPlanBillingPeriod:x,isUpcomingPlan:!1,trialDaysLeft:m,isNextPlan:L,paywallCurrency:t,scheduledUpdate:b||E})});if(a&&d){const v=d&&((F=a==null?void 0:a.find(U=>U.id===(d==null?void 0:d.id)))==null?void 0:F.order);pe(v)||(I=I.map(U=>O(T({},U),{isLowerThanCurrentPlan:v>U.order})),n&&(I=I.filter(U=>U.order>=v)))}const N=o?Ss(o):void 0;return{currentPlan:d,currentSubscription:u,currentSubscriptionOverride:f,isCustomerOnTrial:h,plans:I,paywallConfiguration:N}}const Is="7.5.1",vs="@stigg/react-sdk",Pt=D.createContext(null);Pt.displayName="StiggContext";const As="en-US",ks=({apiKey:e,baseUri:n,baseEdgeUri:i,enableEdge:a,customerId:t,customerToken:o,resourceId:s,theme:c,locale:l,cacheTtlMs:u,useEntitlementPolling:d,entitlementPollingInterval:h,entitlementsFallback:m,stiggClient:f,children:g,offline:x,clientName:b=vs,clientVersion:E=Is})=>{const I=D.useRef(e),N={apiKey:e,customerId:t,customerToken:o,resourceId:s,baseUri:n,baseEdgeUri:i,enableEdge:a,entitlementsFallback:m,cacheTtlMs:u,useEntitlementPolling:d,entitlementPollingInterval:h,clientName:b,clientVersion:E,offline:x},[A,F]=D.useState(()=>({stigg:f!=null?f:P.initialize(O(T({},N),{lazyLoad:!0})),locale:l||As,isInitialized:!1,theme:c,refreshData:()=>B(null,null,function*(){F(v=>O(T({},v),{customerPortalUpdatedAt:new Date})),yield A.stigg.refresh()})}));return D.useEffect(()=>{let v=!0;const U=w=>{v&&F(w)},k=()=>U(w=>O(T({},w),{updatedAt:new Date})),L=w=>U(R=>(R.stigg&&R.stigg.removeListener("entitlementsUpdated",k),w.addListener("entitlementsUpdated",k),O(T({},R),{stigg:w,isInitialized:!0,updatedAt:new Date})));return B(null,null,function*(){let w=A.stigg;e!==I.current&&(yt.log("Updating stigg client",{apiKey:e}),I.current=e,w=P.initialize(T({},N)),U(R=>O(T({},R),{isInitialized:!1,updatedAt:new Date}))),yield w.waitForInitialization(),L(w)}),()=>{v=!1,A.stigg.removeListener("entitlementsUpdated",k),A.stigg.clearCustomer()}},[e]),D.useEffect(()=>{const v=A.stigg;t?v.setCustomerId(t,o,s):v.clearCustomer()},[t,o,s]),D.useEffect(()=>{F(v=>O(T({},v),{theme:c}))},[c]),r.jsx(Pt.Provider,{value:A,children:r.jsx(V.SkeletonTheme,{baseColor:"#F5F6F9",highlightColor:"#e5e6ea",children:g})})};function G(e){const{optional:n}=e||{},i=D.useContext(Pt);if(!i&&!n)throw new Error("Could not find Stigg context; You need to wrap your app in an <StiggProvider> component.");return i}function Ns({productId:e,resourceId:n,showOnlyEligiblePlans:i,billingCountryCode:a,preferredBillingPeriod:t,currentSubscriptionOverrideFn:o}){const{stigg:s,locale:c}=G(),[l,u]=D.useState(P.BillingPeriod.Annually),[d,h]=D.useState([]),[m,f]=D.useState(null),[g,x]=D.useState(!0);D.useEffect(()=>{B(null,null,function*(){try{x(!0),yield s.waitForInitialization();const I=yield s.getPaywall({productId:e,resourceId:n,billingCountryCode:a}),{availableBillingPeriods:N,defaultBillingPeriod:A}=Ps(I.plans,I.activeSubscriptions,t);f(I),h(N),u(A)}catch(I){yt.error(`Failed to load paywall ${I==null?void 0:I.message}`,I)}finally{x(!1)}})},[s,e,s.isCustomerLoaded,a,n,t]);const b=Ts(m,i,o);return T({customer:(m==null?void 0:m.customer)||null,isLoading:g,selectedBillingPeriod:l,setSelectedBillingPeriod:u,availableBillingPeriods:d,locale:c,configuration:b.paywallConfiguration},b)}function ws(e){return ze({highlightChip:"Recommended",addonsTitle:"Available add-ons:",planCTAButton:{upgrade:"Upgrade",downgrade:"Downgrade",startTrial:i=>{var a;return`Start ${(a=i.defaultTrialConfig)==null?void 0:a.duration} day trial`},custom:"Contact us",currentPlan:"Current plan",startNew:"Get started",switchToBillingPeriod:i=>i===P.BillingPeriod.Monthly?"Switch to monthly billing":"Switch to annual billing",cancelScheduledUpdate:"Cancel"},price:{startingAtCaption:"Starts at",pricePeriod:i=>i===P.BillingPeriod.Monthly?"/ month":"/ year",free:i=>({price:`${i==null?void 0:i.symbol}0`}),custom:"Custom",priceNotSet:"Price not set"}},e)}const Fs=e=>C.createElement("svg",T({width:15,height:11,viewBox:"0 0 15 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{d:"M5.59 7.9899L2.125 4.5249C1.73524 4.13514 1.10365 4.13402 0.712509 4.52241V4.52241C0.319409 4.91274 0.318286 5.54819 0.710005 5.9399L5.59 10.8199L14.2948 2.11513C14.6843 1.72565 14.6843 1.09417 14.2948 0.704691V0.704691C13.9055 0.315381 13.2743 0.315184 12.8848 0.70425L5.59 7.9899Z",fill:"#B2BBD3"})),js=p.div`
310
+ `,Jl=({plans:e,customer:n,currentSubscription:i,highlightedPlanId:r,selectedBillingPeriod:t,onBillingPeriodChanged:a,availableBillingPeriods:s,isCustomerOnTrial:c,onPlanSelected:l,paywallLocale:u,locale:d,shouldHidePlan:p,selectDefaultTierIndex:m,currentSubscriptionOverride:f,hideCompatibleAddons:g,showWatermark:y})=>{const P=ql(e),S=e.some(j=>!!j.description),v=Ki(e,b.BillingPeriod.Monthly),A=Ki(e,b.BillingPeriod.Annually),k=zl(e,t,p),w=D.useCallback((j,O,z)=>l({plan:j,customer:n,subscription:i,intentionType:O,selectedBillingPeriod:t,billableFeatures:z}),[n,t,i,l]),T=!!i&&i.plan.pricingType===b.PricingType.Custom,N=D.useMemo(()=>k.some(j=>{var X;const O=j.pricePoints.filter(me=>me.billingPeriod===t),z=(X=j.paywallCalculatedPricePoints)==null?void 0:X.find(me=>me.billingPeriod===t);return O.length>1&&!!(z!=null&&z.additionalChargesMayApply)}),[t,k]),F=D.useMemo(()=>k.some(j=>!!ea(j,t,u,d,v).unit),[t,v,d,u,k]),U=D.useMemo(()=>!T&&k.some(j=>{const O=Jr({plan:j,billingPeriod:t,currentSubscription:i,currentSubscriptionOverride:f});return Object.values(O).length>0}),[t,i,f,T,k]),L=k.some(j=>j.isCurrentCustomerPlan&&j.trialDaysLeft);return o.jsx(Ql,{className:"stigg-paywall-container",children:o.jsxs(Xl,{className:"stigg-paywall-layout",children:[o.jsx(Vl,{onBillingPeriodChanged:a,selectedBillingPeriod:t,availableBillingPeriods:s,discountRate:P}),o.jsx(Kl,{className:"stigg-paywall-plans-layout",children:k.map(j=>o.jsx(Bl,{withUnitPriceRow:F,withTiersRow:U,withTrialLeftRow:L,shouldShowDescriptionSection:S,hasMonthlyPrice:v,hasAnnuallyPrice:A,plan:j,withStartingAtRow:N,currentSubscription:i,currentSubscriptionOverride:f,billingPeriod:t,isHighlighted:j.id===r,isCustomerOnTrial:c,onPlanSelected:(O,z)=>w(j,O,z),paywallLocale:u,locale:d,customer:n,isCustomerInCustomPlan:T,selectDefaultTierIndex:m,hideCompatibleAddons:g},j.id))}),o.jsx(Ke,{source:"paywall",align:"end",style:{marginTop:16},showWatermark:y})]})})};class eu{error(n,i,...r){console.error(n,i||{},r)}log(n,i){console.log(n,i||{})}debug(n,i){console.debug(n,i||{})}}const Qt=new eu;function tu(e,n,i){const r=e.flatMap(c=>c.pricePoints).map(c=>c.billingPeriod),t=ee.countBy(r),a=ee.uniq(r);let s;if(i&&a.includes(i))s=i;else if(n){const c=n.find(l=>l.status===b.SubscriptionStatus.Active);c&&c.prices.length>0&&(s=c==null?void 0:c.prices[0].billingPeriod)}return s||(s=(t[b.BillingPeriod.Monthly]||0)>(t[b.BillingPeriod.Annually]||0)?b.BillingPeriod.Monthly:b.BillingPeriod.Annually),{defaultBillingPeriod:s,availableBillingPeriods:a}}function nu(e){return oe.utc(e).diff(oe.utc(),"days",!1)+1}const aa={h1:{fontSize:"24px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"16px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"}};function ke(e,n="px"){if(e)return`${e}${n}`}function vt(e){if(!e)return"normal";switch(e){case b.FontWeight.Normal:return"normal";case b.FontWeight.Bold:return"bold";default:return"normal"}}function Xt(e,n){var r,t,a,s,c,l,u,d;const i=n||{h1:{fontSize:"32px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"24px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"}};return{fontFamilyUrl:(e==null?void 0:e.fontFamily)||void 0,h1:{fontSize:ke((r=e==null?void 0:e.h1)==null?void 0:r.fontSize)||i.h1.fontSize,fontWeight:vt((t=e==null?void 0:e.h1)==null?void 0:t.fontWeight)||i.h1.fontWeight,semanticElement:i.h1.semanticElement},h2:{fontSize:ke((a=e==null?void 0:e.h2)==null?void 0:a.fontSize)||i.h2.fontSize,fontWeight:vt((s=e==null?void 0:e.h2)==null?void 0:s.fontWeight)||i.h2.fontWeight,semanticElement:i.h2.semanticElement},h3:{fontSize:ke((c=e==null?void 0:e.h3)==null?void 0:c.fontSize)||i.h3.fontSize,fontWeight:vt((l=e==null?void 0:e.h3)==null?void 0:l.fontWeight)||i.h3.fontWeight,semanticElement:i.h3.semanticElement},body:{fontSize:ke((u=e==null?void 0:e.body)==null?void 0:u.fontSize)||i.body.fontSize,fontWeight:vt((d=e==null?void 0:e.body)==null?void 0:d.fontWeight)||i.body.fontWeight,semanticElement:i.body.semanticElement}}}function hn(e){if(e)switch(e){case b.Alignment.Left:return"left";case b.Alignment.Center:return"center";case b.Alignment.Right:return"right";default:return}}function iu(e){const{palette:n,customCss:i,typography:r}=e;return{palette:{primary:(n==null?void 0:n.primary)||void 0,backgroundPaper:(n==null?void 0:n.paywallBackgroundColor)||void 0,outlinedBorder:(n==null?void 0:n.borderColor)||void 0,backgroundHighlight:(n==null?void 0:n.currentPlanBackground)||void 0,text:{primary:(n==null?void 0:n.textColor)||void 0}},typography:Xt(r),customCss:i||void 0}}function ru(e){const{palette:n,layout:i,customCss:r,typography:t}=e;return{customCss:r||void 0,palette:{primary:(n==null?void 0:n.primary)||void 0,backgroundPaper:(n==null?void 0:n.backgroundColor)||void 0,outlinedBorder:(n==null?void 0:n.borderColor)||void 0,backgroundHighlight:(n==null?void 0:n.currentPlanBackground)||void 0,text:{primary:(n==null?void 0:n.textColor)||void 0}},typography:Xt(t),layout:{ctaAlignment:hn(i==null?void 0:i.alignment),headerAlignment:hn(i==null?void 0:i.alignment),descriptionAlignment:hn(i==null?void 0:i.alignment),planMaxWidth:ke(i==null?void 0:i.planWidth),planMinWidth:ke(i==null?void 0:i.planWidth),planMargin:ke(i==null?void 0:i.planMargin),planPadding:ke(i==null?void 0:i.planPadding)}}}function au(e){const{palette:n,typography:i,customCss:r}=e;return{palette:{primary:(n==null?void 0:n.primary)||void 0,backgroundPaper:(n==null?void 0:n.backgroundColor)||void 0,outlinedBorder:(n==null?void 0:n.borderColor)||void 0,text:{primary:(n==null?void 0:n.textColor)||void 0},backgroundHighlight:(n==null?void 0:n.summaryBackgroundColor)||void 0},typography:Xt(i,aa),customCss:r||void 0}}function ou(e){let n=!0,i=(e==null?void 0:e.find(a=>a.status===b.SubscriptionStatus.InTrial))||null,r=i==null?void 0:i.plan;const t=i!=null&&i.trialEndDate?nu(i.trialEndDate):void 0;return r||(n=!1,i=(e==null?void 0:e.find(a=>a.status===b.SubscriptionStatus.Active))||null,r=i==null?void 0:i.plan),{currentSubscription:i,currentPlan:r,isCustomerOnTrial:n,trialDaysLeft:t}}function su(e,n,i){var k,w;const{plans:r,currency:t,configuration:a,customer:s,activeSubscriptions:c,paywallCalculatedPricePoints:l}=e||{},{currentSubscription:u,currentPlan:d,isCustomerOnTrial:p,trialDaysLeft:m}=ou(c),f=i==null?void 0:i({currentSubscription:u}),g=(u==null?void 0:u.scheduledUpdates)||[],y=(k=u==null?void 0:u.price)==null?void 0:k.billingPeriod,P=g.find(({subscriptionScheduleType:T})=>T===b.SubscriptionScheduleType.Downgrade),S=g.find(({subscriptionScheduleType:T})=>T===b.SubscriptionScheduleType.BillingPeriod);let v=Gt(r,T=>T.order).map(T=>{var L;const N=(L=s==null?void 0:s.eligibleForTrial)==null?void 0:L.find(j=>j.productId===T.product.id),F=f!=null&&f.planId?(f==null?void 0:f.planId)===T.id:T.id===(d==null?void 0:d.id),U=j=>{var me;const O=P==null?void 0:P.scheduleVariables,z=S==null?void 0:S.scheduleVariables,X=T.pricePoints.some(xe=>xe.billingPeriod===j);return P?((me=P.targetPackage)==null?void 0:me.refId)===T.id&&(!X||O.billingPeriod===j):S&&F?z.billingPeriod===j:!1};return _(I({},T),{paywallCalculatedPricePoints:l==null?void 0:l.filter(j=>j.planId===T.id),isTriable:!De(T.defaultTrialConfig)&&(!N||N.eligible),isCurrentCustomerPlan:F,currentCustomerPlanBillingPeriod:y,isUpcomingPlan:!1,trialDaysLeft:m,isNextPlan:U,paywallCurrency:t,scheduledUpdate:P||S})});if(r&&d){const T=d&&((w=r==null?void 0:r.find(N=>N.id===(d==null?void 0:d.id)))==null?void 0:w.order);De(T)||(v=v.map(N=>_(I({},N),{isLowerThanCurrentPlan:T>N.order})),n&&(v=v.filter(N=>N.order>=T)))}const A=a?ru(a):void 0;return{currentPlan:d,currentSubscription:u,currentSubscriptionOverride:f,isCustomerOnTrial:p,plans:v,paywallConfiguration:A}}const cu="7.7.1-beta.1",lu="@stigg/react-sdk",Jt=D.createContext(null);Jt.displayName="StiggContext";const uu="en-US",du=({apiKey:e,baseUri:n,baseEdgeUri:i,enableEdge:r,customerId:t,customerToken:a,resourceId:s,theme:c,locale:l,cacheTtlMs:u,useEntitlementPolling:d,entitlementPollingInterval:p,entitlementsFallback:m,stiggClient:f,children:g,offline:y,clientName:P=lu,clientVersion:S=cu})=>{const v=D.useRef(e),A={apiKey:e,customerId:t,customerToken:a,resourceId:s,baseUri:n,baseEdgeUri:i,enableEdge:r,entitlementsFallback:m,cacheTtlMs:u,useEntitlementPolling:d,entitlementPollingInterval:p,clientName:P,clientVersion:S,offline:y},[k,w]=D.useState(()=>({stigg:f!=null?f:b.initialize(_(I({},A),{lazyLoad:!0})),locale:l||uu,isInitialized:!1,theme:c,refreshData:()=>B(null,null,function*(){w(T=>_(I({},T),{customerPortalUpdatedAt:new Date})),yield k.stigg.refresh()})}));return D.useEffect(()=>{let T=!0;const N=j=>{T&&w(j)},F=()=>N(j=>_(I({},j),{updatedAt:new Date})),U=j=>N(O=>(O.stigg&&O.stigg.removeListener("entitlementsUpdated",F),j.addListener("entitlementsUpdated",F),_(I({},O),{stigg:j,isInitialized:!0,updatedAt:new Date})));return B(null,null,function*(){let j=k.stigg;e!==v.current&&(Qt.log("Updating stigg client",{apiKey:e}),v.current=e,j=b.initialize(I({},A)),N(O=>_(I({},O),{isInitialized:!1,updatedAt:new Date}))),yield j.waitForInitialization(),U(j)}),()=>{T=!1,k.stigg.removeListener("entitlementsUpdated",F),k.stigg.clearCustomer()}},[e]),D.useEffect(()=>{const T=k.stigg;t?T.setCustomerId(t,a,s):T.clearCustomer()},[t,a,s]),D.useEffect(()=>{w(T=>_(I({},T),{theme:c}))},[c]),o.jsx(Jt.Provider,{value:k,children:o.jsx(H.SkeletonTheme,{baseColor:"#F5F6F9",highlightColor:"#e5e6ea",children:g})})};function q(e){const{optional:n}=e||{},i=D.useContext(Jt);if(!i&&!n)throw new Error("Could not find Stigg context; You need to wrap your app in an <StiggProvider> component.");return i}function mu({productId:e,resourceId:n,showOnlyEligiblePlans:i,billingCountryCode:r,preferredBillingPeriod:t,currentSubscriptionOverrideFn:a}){const{stigg:s,locale:c}=q(),[l,u]=D.useState(b.BillingPeriod.Annually),[d,p]=D.useState([]),[m,f]=D.useState(null),[g,y]=D.useState(!0);D.useEffect(()=>{B(null,null,function*(){try{y(!0),yield s.waitForInitialization();const v=yield s.getPaywall({productId:e,resourceId:n,billingCountryCode:r}),{availableBillingPeriods:A,defaultBillingPeriod:k}=tu(v.plans,v.activeSubscriptions,t);f(v),p(A),u(k)}catch(v){Qt.error(`Failed to load paywall ${v==null?void 0:v.message}`,v)}finally{y(!1)}})},[s,e,s.isCustomerLoaded,r,n,t]);const P=su(m,i,a);return I({customer:(m==null?void 0:m.customer)||null,isLoading:g,selectedBillingPeriod:l,setSelectedBillingPeriod:u,availableBillingPeriods:d,locale:c,configuration:P.paywallConfiguration,showWatermark:s.getShowWatermark()},P)}function gu(e){return ft({highlightChip:"Recommended",addonsTitle:"Available add-ons:",planCTAButton:{upgrade:"Upgrade",downgrade:"Downgrade",startTrial:i=>{var r;return`Start ${(r=i.defaultTrialConfig)==null?void 0:r.duration} day trial`},custom:"Contact us",currentPlan:"Current plan",startNew:"Get started",switchToBillingPeriod:i=>i===b.BillingPeriod.Monthly?"Switch to monthly billing":"Switch to annual billing",cancelScheduledUpdate:"Cancel"},price:{startingAtCaption:"Starts at",pricePeriod:i=>i===b.BillingPeriod.Monthly?"/ month":"/ year",free:i=>({price:`${i==null?void 0:i.symbol}0`}),custom:"Custom",priceNotSet:"Price not set"}},e)}const pu=e=>E.createElement("svg",I({width:15,height:11,viewBox:"0 0 15 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M5.59 7.9899L2.125 4.5249C1.73524 4.13514 1.10365 4.13402 0.712509 4.52241V4.52241C0.319409 4.91274 0.318286 5.54819 0.710005 5.9399L5.59 10.8199L14.2948 2.11513C14.6843 1.72565 14.6843 1.09417 14.2948 0.704691V0.704691C13.9055 0.315381 13.2743 0.315184 12.8848 0.70425L5.59 7.9899Z",fill:"#B2BBD3"})),fu=h.div`
297
311
  display: flex;
298
312
  flex-direction: column;
299
313
  align-items: center;
300
- `,Mt=p(Fs)`
314
+ `,yn=h(pu)`
301
315
  margin-right: 16px;
302
- `,Us=p.div`
316
+ `,hu=h.div`
303
317
  display: flex;
304
318
  flex-direction: column;
305
319
  align-items: flex-start;
@@ -311,25 +325,25 @@
311
325
  max-width: ${({theme:e})=>e.stigg.layout.planMaxWidth};
312
326
  min-height: 450px;
313
327
  border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedBorder}`};
314
- `,Ms=p.div`
328
+ `,yu=h.div`
315
329
  display: flex;
316
330
  gap: ${({theme:e})=>e.stigg.layout.planMargin};
317
331
  flex-wrap: wrap;
318
332
  justify-content: center;
319
- `,Rt=p.div`
333
+ `,Cn=h.div`
320
334
  display: flex;
321
335
  align-items: center;
322
336
  margin-bottom: 12px;
323
- `,Rs=p.div`
337
+ `,Cu=h.div`
324
338
  margin-top: auto;
325
- `,Ls=p.div`
339
+ `,bu=h.div`
326
340
  width: 150px;
327
341
  margin-bottom: ${({theme:e})=>e.stigg.layout.switchBottomSpacing};
328
342
  padding: 12px 12px;
329
343
  border-radius: 10px;
330
344
  background-color: white;
331
345
  border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedBorder}`};
332
- `;function Lt(){return r.jsxs(Us,{children:[r.jsx(V,{width:120,borderRadius:4}),r.jsx(V,{circle:!0,width:40,height:40}),r.jsx(V,{style:{marginBottom:33},width:120,borderRadius:4}),r.jsxs(Rt,{children:[r.jsx(Mt,{}),r.jsx(V,{width:120,borderRadius:4})]}),r.jsxs(Rt,{children:[r.jsx(Mt,{}),r.jsx(V,{width:120,borderRadius:4})]}),r.jsxs(Rt,{children:[r.jsx(Mt,{}),r.jsx(V,{width:120,borderRadius:4})]}),r.jsx(Rs,{children:r.jsx(V,{height:50,borderRadius:4})})]})}function Bs(){return r.jsxs(js,{className:"stigg-skeleton-loader-container",children:[r.jsx(Ls,{className:"stigg-skeleton-loader-billing-period",children:r.jsx(V,{borderRadius:4})}),r.jsxs(Ms,{className:"stigg-skeleton-loader-plans-container",children:[r.jsx(Lt,{}),r.jsx(Lt,{}),r.jsx(Lt,{})]})]})}const Os=({externalFontUrl:e})=>r.jsx(ne.Global,{styles:ne.css`
346
+ `;function bn(){return o.jsxs(hu,{children:[o.jsx(H,{width:120,borderRadius:4}),o.jsx(H,{circle:!0,width:40,height:40}),o.jsx(H,{style:{marginBottom:33},width:120,borderRadius:4}),o.jsxs(Cn,{children:[o.jsx(yn,{}),o.jsx(H,{width:120,borderRadius:4})]}),o.jsxs(Cn,{children:[o.jsx(yn,{}),o.jsx(H,{width:120,borderRadius:4})]}),o.jsxs(Cn,{children:[o.jsx(yn,{}),o.jsx(H,{width:120,borderRadius:4})]}),o.jsx(Cu,{children:o.jsx(H,{height:50,borderRadius:4})})]})}function Eu(){return o.jsxs(fu,{className:"stigg-skeleton-loader-container",children:[o.jsx(bu,{className:"stigg-skeleton-loader-billing-period",children:o.jsx(H,{borderRadius:4})}),o.jsxs(yu,{className:"stigg-skeleton-loader-plans-container",children:[o.jsx(bn,{}),o.jsx(bn,{}),o.jsx(bn,{})]})]})}const Pu=({externalFontUrl:e})=>o.jsx(Vr,{styles:Ie`
333
347
  ${e&&`
334
348
  @font-face {
335
349
  font-family: 'custom-font';
@@ -399,11 +413,11 @@
399
413
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,
400
414
  U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
401
415
  }
402
- `}),$s=p.div`
403
- ${({$customCss:e})=>e&&ne.css`
416
+ `}),Su=h.div`
417
+ ${({$customCss:e})=>e&&Ie`
404
418
  ${e}
405
419
  `}
406
- `;function bt(e){const{theme:n}=G(),i=ze(e,n);return so(i)}const _s=e=>({primary:{main:e.palette.primary}}),ke=({children:e,componentTheme:n})=>{const i=bt(n),a=_s(i),t=At.createTheme({palette:a,stigg:i});return r.jsx(At.ThemeProvider,{theme:{[At.THEME_ID]:t},children:r.jsx(ne.ThemeProvider,{theme:{stigg:i},children:r.jsxs($s,{$customCss:i.customCss,children:[r.jsx(Os,{externalFontUrl:i.typography.fontFamilyUrl}),e]})})})},Me=D.createContext(null);Me.displayName="CustomerPortalContext";const fe=()=>{const e=D.useContext(Me);if(!e)throw new Error("Could not find Customer portal context; You need to wrap your customer portal components in an <CustomerPortalProvider> component.");return e};function rn(e){return!!D.useContext(e)}const Gs=({productId:e,resourceId:n,highlightedPlanId:i,showOnlyEligiblePlans:a,textOverrides:t,onPlanSelected:o,preferredBillingPeriod:s,onBillingPeriodChange:c,billingCountryCode:l,shouldHidePlan:u,selectDefaultTierIndex:d,currentSubscriptionOverride:h,hideCompatibleAddons:m})=>{const f=rn(Me);let g=!1;if(f){const{isLoading:W,resourceId:J}=fe();g=W,n=J}const{plans:x,customer:b,currentSubscription:E,currentSubscriptionOverride:I,isCustomerOnTrial:N,isLoading:A,selectedBillingPeriod:F,setSelectedBillingPeriod:v,availableBillingPeriods:U,locale:k,configuration:L}=Ns({productId:e,resourceId:n,showOnlyEligiblePlans:a,billingCountryCode:l,preferredBillingPeriod:s,currentSubscriptionOverrideFn:h}),$=ws(t),w=W=>{v(W),c&&c(W)},R=!x||A||g?r.jsx(Bs,{}):r.jsx(ys,{plans:x,customer:b,currentSubscription:E,currentSubscriptionOverride:I,selectedBillingPeriod:F,onBillingPeriodChanged:w,availableBillingPeriods:U,highlightedPlanId:i,isCustomerOnTrial:N,onPlanSelected:o,paywallLocale:$,locale:k,shouldHidePlan:u,selectDefaultTierIndex:d,hideCompatibleAddons:m});return f?R:r.jsx(ke,{componentTheme:L,children:R})};function Vs({resourceId:e,productId:n}){const{stigg:i,customerPortalUpdatedAt:a}=G(),[t,o]=D.useState(!1),[s,c]=D.useState();return D.useEffect(()=>{B(null,null,function*(){if(i.isCustomerLoaded)try{o(!0);const u=yield i.getCustomerPortal({resourceId:e,productId:n});c(u)}catch(u){yt.error(`Failed to load customer portal ${u==null?void 0:u.message}`,u)}finally{o(!1)}})},[i,i.isCustomerLoaded,a,e,n]),{customerPortal:s,isLoading:t}}function Hs(e){return ze({manageSubscription:"Manage",usageTabTitle:"Usage",addonsTabTitle:"Add-ons",promotionsTabTitle:"Promotions",promotionsSubtitle:"You were granted access to additional functionality at no additional cost.",contactSupportTitle:"Have questions about your subscription?",contactSupportLink:"Contact support",editBilling:"Edit billing details",invoicesTitle:"Invoices",viewInvoiceHistory:"View invoice history",editPaymentDetails:"Edit",paywallSectionTitle:"Plans",cancelScheduledUpdatesButtonTitle:"Cancel"},e)}function qs(e,n,i){var t,o,s,c;return{sectionTitleColor:(n==null?void 0:n.sectionTitleColor)||e.palette.text.secondary,planNameColor:(n==null?void 0:n.planNameColor)||e.palette.text.primary,backgroundColor:(n==null?void 0:n.backgroundColor)||((t=i==null?void 0:i.palette)==null?void 0:t.backgroundColor)||"white",borderColor:(n==null?void 0:n.borderColor)||((o=i==null?void 0:i.palette)==null?void 0:o.borderColor)||"rgba(0, 30, 108, 0.15)",listItemBackgroundColor:(n==null?void 0:n.backgroundColor)||((s=i==null?void 0:i.palette)==null?void 0:s.backgroundColor)||"white",tabMaxHeight:(n==null?void 0:n.tabMaxHeight)||"380px",iconsColor:(n==null?void 0:n.iconsColor)||((c=i==null?void 0:i.palette)==null?void 0:c.iconsColor)||void 0,iconsBackgroundColor:n==null?void 0:n.iconsBackgroundColor}}function Mi({children:e,textOverrides:n,theme:i,resourceId:a,productId:t}){const{customerPortalUpdatedAt:o}=G(),{customerPortal:s,isLoading:c}=Vs({resourceId:a,productId:t}),l=s!=null&&s.configuration?Es(s.configuration):void 0,u=bt(l),d=qs(u,i,s==null?void 0:s.configuration),h=Hs(n);return r.jsx(ke,{componentTheme:l,children:r.jsx(Me.Provider,{value:{customerPortal:s,isLoading:c,textOverrides:h,theme:d,resourceId:a},children:e},o==null?void 0:o.toString())})}const Et=p(be)`
420
+ `;function en(e){const{theme:n}=q(),i=ft(e,n);return Hc(i)}const Du=e=>({primary:{main:e.palette.primary}}),$e=({children:e,componentTheme:n})=>{const i=en(n),r=Du(i),t=ln.createTheme({palette:r,stigg:i});return o.jsx(ln.ThemeProvider,{theme:{[ln.THEME_ID]:t},children:o.jsx(Zs,{theme:{stigg:i},children:o.jsxs(Su,{$customCss:i.customCss,children:[o.jsx(Pu,{externalFontUrl:i.typography.fontFamilyUrl}),e]})})})},Qe=D.createContext(null);Qe.displayName="CustomerPortalContext";const ve=()=>{const e=D.useContext(Qe);if(!e)throw new Error("Could not find Customer portal context; You need to wrap your customer portal components in an <CustomerPortalProvider> component.");return e};function Qn(e){return!!D.useContext(e)}const vu=({productId:e,resourceId:n,highlightedPlanId:i,showOnlyEligiblePlans:r,textOverrides:t,onPlanSelected:a,preferredBillingPeriod:s,onBillingPeriodChange:c,billingCountryCode:l,shouldHidePlan:u,selectDefaultTierIndex:d,currentSubscriptionOverride:p,hideCompatibleAddons:m})=>{const f=Qn(Qe);let g=!1;if(f){const{isLoading:X,resourceId:me}=ve();g=X,n=me}const{plans:y,customer:P,currentSubscription:S,currentSubscriptionOverride:v,isCustomerOnTrial:A,isLoading:k,selectedBillingPeriod:w,setSelectedBillingPeriod:T,availableBillingPeriods:N,locale:F,configuration:U,showWatermark:L}=mu({productId:e,resourceId:n,showOnlyEligiblePlans:r,billingCountryCode:l,preferredBillingPeriod:s,currentSubscriptionOverrideFn:p}),j=gu(t),O=X=>{T(X),c&&c(X)},z=!y||k||g?o.jsx(Eu,{}):o.jsx(Jl,{plans:y,customer:P,currentSubscription:S,currentSubscriptionOverride:v,selectedBillingPeriod:w,onBillingPeriodChanged:O,availableBillingPeriods:N,highlightedPlanId:i,isCustomerOnTrial:A,onPlanSelected:a,paywallLocale:j,locale:F,shouldHidePlan:u,selectDefaultTierIndex:d,hideCompatibleAddons:m,showWatermark:L});return f?z:o.jsx($e,{componentTheme:U,children:z})};function xu({resourceId:e,productId:n}){const{stigg:i,customerPortalUpdatedAt:r}=q(),[t,a]=D.useState(!1),[s,c]=D.useState();return D.useEffect(()=>{B(null,null,function*(){if(i.isCustomerLoaded)try{a(!0);const u=yield i.getCustomerPortal({resourceId:e,productId:n});c(u)}catch(u){Qt.error(`Failed to load customer portal ${u==null?void 0:u.message}`,u)}finally{a(!1)}})},[i,i.isCustomerLoaded,r,e,n]),{customerPortal:s,showWatermark:i.getShowWatermark(),isLoading:t}}function Iu(e){return ft({manageSubscription:"Manage",usageTabTitle:"Usage",addonsTabTitle:"Add-ons",promotionsTabTitle:"Promotions",promotionsSubtitle:"You were granted access to additional functionality at no additional cost.",contactSupportTitle:"Have questions about your subscription?",contactSupportLink:"Contact support",editBilling:"Edit billing details",invoicesTitle:"Invoices",viewInvoiceHistory:"View invoice history",editPaymentDetails:"Edit",paywallSectionTitle:"Plans",cancelScheduledUpdatesButtonTitle:"Cancel"},e)}function Tu(e,n,i){var t,a,s,c;return{sectionTitleColor:(n==null?void 0:n.sectionTitleColor)||e.palette.text.secondary,planNameColor:(n==null?void 0:n.planNameColor)||e.palette.text.primary,backgroundColor:(n==null?void 0:n.backgroundColor)||((t=i==null?void 0:i.palette)==null?void 0:t.backgroundColor)||"white",borderColor:(n==null?void 0:n.borderColor)||((a=i==null?void 0:i.palette)==null?void 0:a.borderColor)||"rgba(0, 30, 108, 0.15)",listItemBackgroundColor:(n==null?void 0:n.backgroundColor)||((s=i==null?void 0:i.palette)==null?void 0:s.backgroundColor)||"white",tabMaxHeight:(n==null?void 0:n.tabMaxHeight)||"380px",iconsColor:(n==null?void 0:n.iconsColor)||((c=i==null?void 0:i.palette)==null?void 0:c.iconsColor)||void 0,iconsBackgroundColor:n==null?void 0:n.iconsBackgroundColor}}function oa({children:e,textOverrides:n,theme:i,resourceId:r,productId:t}){const{customerPortalUpdatedAt:a}=q(),{customerPortal:s,isLoading:c,showWatermark:l}=xu({resourceId:r,productId:t}),u=s!=null&&s.configuration?iu(s.configuration):void 0,d=en(u),p=Tu(d,i,s==null?void 0:s.configuration),m=Iu(n);return o.jsx($e,{componentTheme:u,children:o.jsx(Qe.Provider,{value:{customerPortal:s,isLoading:c,showWatermark:l,textOverrides:m,theme:p,resourceId:r},children:e},a==null?void 0:a.toString())})}const tn=h(we)`
407
421
  border-radius: 10px;
408
422
  padding: 8px 16px;
409
423
  text-transform: none;
@@ -412,7 +426,7 @@
412
426
  &:hover {
413
427
  border-color: ${({theme:e})=>e.stigg.palette.outlinedRestingBorder};
414
428
  }
415
- `,Ws=e=>C.createElement("svg",T({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.3333 2.5L17.5 6.66667L6.66667 17.5H2.5V13.3333L13.3333 2.5V2.5Z",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Ke=p.div`
429
+ `,Au=e=>E.createElement("svg",I({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.3333 2.5L17.5 6.66667L6.66667 17.5H2.5V13.3333L13.3333 2.5V2.5Z",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),yt=h.div`
416
430
  display: flex;
417
431
  align-items: center;
418
432
  justify-content: space-between;
@@ -422,11 +436,11 @@
422
436
  margin-bottom: 32px;
423
437
  }
424
438
  `};
425
- `;function Qe({title:e,className:n,isLoading:i}){const{theme:a}=fe();return i?r.jsx(V,{width:120}):r.jsx(y,{className:n,overrideColor:a.sectionTitleColor,variant:"h3",bold:!0,children:e})}var St=(e=>(e.MANAGE_SUBSCRIPTION="MANAGE_SUBSCRIPTION",e.UPGRADE_PLAN="UPGRADE_PLAN",e.UPGRADE_TRIAL_PLAN="UPGRADE_TRIAL_PLAN",e))(St||{});const Ys=p(Ws)`
439
+ `;function Ct({title:e,className:n,isLoading:i}){const{theme:r}=ve();return i?o.jsx(H,{width:120}):o.jsx(C,{className:n,overrideColor:r.sectionTitleColor,variant:"h3",bold:!0,children:e})}var nn=(e=>(e.MANAGE_SUBSCRIPTION="MANAGE_SUBSCRIPTION",e.UPGRADE_PLAN="UPGRADE_PLAN",e.UPGRADE_TRIAL_PLAN="UPGRADE_TRIAL_PLAN",e))(nn||{});const ku=h(Au)`
426
440
  path {
427
441
  stroke: ${({theme:e})=>e.stigg.palette.primary};
428
442
  }
429
- `;function Zs({onManageSubscription:e,hideManageButton:n,textOverrides:i}){return r.jsxs(Ke,{className:"stigg-customer-portal-overview-header",$disableMargin:!0,children:[r.jsx(Qe,{title:"Subscription",className:"stigg-overview-title"}),!n&&r.jsxs(Et,{className:"stigg-manage-subscription-button",variant:"outlined",onClick:()=>e({intentionType:St.MANAGE_SUBSCRIPTION}),children:[r.jsx(Ys,{className:"stigg-manage-subscription-button-image"}),r.jsx(y,{className:"stigg-manage-subscription-button-text",color:"primary.main",style:{marginLeft:"8px"},variant:"body1",children:i==null?void 0:i.manageSubscription})]})]})}function Ri(){const{customerPortal:e}=fe(),n=Ci(e==null?void 0:e.subscriptions,i=>i.addons);return en(n)?null:r.jsx("div",{className:"stigg-addons-list-layout",children:n.map((i,a)=>r.jsxs(y,{as:"span",className:"stigg-addon-list-item-text",variant:"body1",children:[i.quantity>1&&`${i.quantity} X `,i.displayName,a===n.length-1?"":", "]},i.addonId))})}const On=p.div`
443
+ `;function Nu({onManageSubscription:e,hideManageButton:n,textOverrides:i}){return o.jsxs(yt,{className:"stigg-customer-portal-overview-header",$disableMargin:!0,children:[o.jsx(Ct,{title:"Subscription",className:"stigg-overview-title"}),!n&&o.jsxs(tn,{className:"stigg-manage-subscription-button",variant:"outlined",onClick:()=>e({intentionType:nn.MANAGE_SUBSCRIPTION}),children:[o.jsx(ku,{className:"stigg-manage-subscription-button-image"}),o.jsx(C,{className:"stigg-manage-subscription-button-text",color:"primary.main",style:{marginLeft:"8px"},variant:"body1",children:i==null?void 0:i.manageSubscription})]})]})}function sa(){const{customerPortal:e}=ve(),n=kr(e==null?void 0:e.subscriptions,i=>i.addons);return _n(n)?null:o.jsx("div",{className:"stigg-addons-list-layout",children:n.map((i,r)=>o.jsxs(C,{as:"span",className:"stigg-addon-list-item-text",variant:"body1",children:[i.quantity>1&&`${i.quantity} X `,i.displayName,r===n.length-1?"":", "]},i.addonId))})}const Qi=h.div`
430
444
  display: flex;
431
445
  justify-content: space-between;
432
446
  align-items: center;
@@ -437,19 +451,19 @@
437
451
  & > *:first-of-type {
438
452
  max-width: 60%;
439
453
  }
440
- `;function zs(e){var t;const{displayName:n,usageLimit:i,hasUnlimitedUsage:a}=e;return a?`Unlimited ${n}`:i?`${n} x ${(t=e.usageLimit)==null?void 0:t.toLocaleString()}`:n}function Li(){const{customerPortal:e,textOverrides:n,theme:i}=fe(),a=e==null?void 0:e.promotionalEntitlements;return r.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[r.jsx(y,{color:"secondary",children:n.promotionsSubtitle}),r.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[r.jsxs(On,{$borderColor:i.borderColor,children:[r.jsx(y,{variant:"body1",bold:!0,children:"Feature"}),r.jsx(y,{variant:"body1",bold:!0,children:"Expiration date"})]}),a==null?void 0:a.map((t,o)=>r.jsxs(On,{$borderColor:i.borderColor,children:[r.jsx(y,{variant:"body1",children:zs(t)}),r.jsx(y,{variant:"body1",color:"disabled",children:t.endDate?te.utc(t.endDate).format("MMM Do, YYYY"):"None"})]},`${t.displayName}-${o}`))]})]})}const Ks=p(ur)`
454
+ `;function wu(e){var t;const{displayName:n,usageLimit:i,hasUnlimitedUsage:r}=e;return r?`Unlimited ${n}`:i?`${n} x ${(t=e.usageLimit)==null?void 0:t.toLocaleString()}`:n}function ca(){const{customerPortal:e,textOverrides:n,theme:i}=ve(),r=e==null?void 0:e.promotionalEntitlements;return o.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[o.jsx(C,{color:"secondary",children:n.promotionsSubtitle}),o.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[o.jsxs(Qi,{$borderColor:i.borderColor,children:[o.jsx(C,{variant:"body1",bold:!0,children:"Feature"}),o.jsx(C,{variant:"body1",bold:!0,children:"Expiration date"})]}),r==null?void 0:r.map((t,a)=>o.jsxs(Qi,{$borderColor:i.borderColor,children:[o.jsx(C,{variant:"body1",children:wu(t)}),o.jsx(C,{variant:"body1",color:"disabled",children:t.endDate?oe.utc(t.endDate).format("MMM Do, YYYY"):"None"})]},`${t.displayName}-${a}`))]})]})}const Fu=h(Uo)`
441
455
  .MuiTabs-indicator {
442
456
  background-color: #001e6c;
443
457
  }
444
- `,Qs=p.div`
458
+ `,ju=h.div`
445
459
  width: 100%;
446
460
  flex: 1;
447
461
  margin-top: 16px;
448
- `,Xs=p(z)`
462
+ `,Ru=h(Q)`
449
463
  margin-top: 16px;
450
464
  max-height: ${({$maxHeight:e})=>e};
451
465
  overflow-y: auto;
452
- `;p.div`
466
+ `;h.div`
453
467
  display: flex;
454
468
  flex-direction: column;
455
469
  padding: 24px;
@@ -458,28 +472,28 @@
458
472
  margin-bottom: 16px;
459
473
  row-gap: 16px;
460
474
  background-color: ${({$backgroundColor:e})=>e};
461
- `;function $n(e){const s=e,{children:n,value:i,index:a,maxHeight:t}=s,o=ie(s,["children","value","index","maxHeight"]);return r.jsx("div",O(T({role:"tabpanel",hidden:i!==a},o),{children:i===a&&r.jsx(Xs,{$maxHeight:t,children:n})}))}function _n({isSelected:e,label:n,icon:i}){const a=e?"primary":"secondary";return r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[r.jsx(ce,{icon:i,svgStrokeColor:a}),r.jsx(y,{variant:"h6",bold:e,color:a,children:n})]})}function Js({customerPortal:e,hiddenSections:n,textOverrides:i,theme:a}){const t=Ci(e.subscriptions,m=>m.addons),o=m=>n==null?void 0:n.some(f=>f===m),s=t.length>0&&!o("addons"),c=e.promotionalEntitlements.length>0&&!o("promotionalEntitlements"),[l,u]=D.useState(s?1:2),d=(m,f)=>{u(f)};return s||c?r.jsxs(Qs,{children:[r.jsx(z,{sx:{borderBottom:1,borderColor:"divider"},children:r.jsxs(Ks,{value:l,onChange:d,children:[s?r.jsx(wn,{sx:{textTransform:"none"},value:1,label:r.jsx(_n,{isSelected:l===1,label:i.addonsTabTitle,icon:"Addons"})}):null,c?r.jsx(wn,{sx:{textTransform:"none"},value:2,label:r.jsx(_n,{isSelected:l===2,label:i.promotionsTabTitle,icon:"Promotions"})}):null]})}),r.jsx($n,{value:l,index:1,maxHeight:a.tabMaxHeight,children:r.jsx(Ri,{})}),r.jsx($n,{value:l,index:2,maxHeight:a.tabMaxHeight,children:r.jsx(Li,{})})]}):null}const Bi={xs:320,sm:640,md:768,lg:1024,xl:1280,xxl:1536},Oi=e=>`(min-width: ${Bi[e]}px)`,ge=Object.keys(Bi).reduce((e,n)=>O(T({},e),{[n]:`@media ${Oi(n)}`}),{});function Ne(e){return Z.useMediaQuery(Oi(e))}const ec=p.div`
475
+ `;function Xi(e){const s=e,{children:n,value:i,index:r,maxHeight:t}=s,a=se(s,["children","value","index","maxHeight"]);return o.jsx("div",_(I({role:"tabpanel",hidden:i!==r},a),{children:i===r&&o.jsx(Ru,{$maxHeight:t,children:n})}))}function Ji({isSelected:e,label:n,icon:i}){const r=e?"primary":"secondary";return o.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[o.jsx(fe,{icon:i,svgStrokeColor:r}),o.jsx(C,{variant:"h6",bold:e,color:r,children:n})]})}function Mu({customerPortal:e,hiddenSections:n,textOverrides:i,theme:r}){const t=kr(e.subscriptions,m=>m.addons),a=m=>n==null?void 0:n.some(f=>f===m),s=t.length>0&&!a("addons"),c=e.promotionalEntitlements.length>0&&!a("promotionalEntitlements"),[l,u]=D.useState(s?1:2),d=(m,f)=>{u(f)};return s||c?o.jsxs(ju,{children:[o.jsx(Q,{sx:{borderBottom:1,borderColor:"divider"},children:o.jsxs(Fu,{value:l,onChange:d,children:[s?o.jsx(Di,{sx:{textTransform:"none"},value:1,label:o.jsx(Ji,{isSelected:l===1,label:i.addonsTabTitle,icon:"Addons"})}):null,c?o.jsx(Di,{sx:{textTransform:"none"},value:2,label:o.jsx(Ji,{isSelected:l===2,label:i.promotionsTabTitle,icon:"Promotions"})}):null]})}),o.jsx(Xi,{value:l,index:1,maxHeight:r.tabMaxHeight,children:o.jsx(sa,{})}),o.jsx(Xi,{value:l,index:2,maxHeight:r.tabMaxHeight,children:o.jsx(ca,{})})]}):null}const la={xs:320,sm:640,md:768,lg:1024,xl:1280,xxl:1536},ua=e=>`(min-width: ${la[e]}px)`,Se=Object.keys(la).reduce((e,n)=>_(I({},e),{[n]:`@media ${ua(n)}`}),{});function Ge(e){return K.useMediaQuery(ua(e))}const Uu=h.div`
462
476
  display: flex;
463
477
  justify-content: space-between;
464
478
  flex-wrap: wrap;
465
- `,tc=p.div`
479
+ `,Ou=h.div`
466
480
  display: flex;
467
481
  flex-direction: column;
468
482
  gap: 32px;
469
- `;function nc(){const e=Ne("md");return r.jsxs(ec,{className:"stigg-subscription-overview-skeleton-layout",children:[r.jsxs(tc,{children:[r.jsx(V,{width:120}),r.jsx(V,{width:120})]}),r.jsx(V,{width:e?295:260,height:193})]})}function ic({scheduleUpdate:e}){const{targetPackage:n}=e;return r.jsxs(j,{container:!0,alignItems:"center",children:[r.jsx(j,{children:r.jsx(Te.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})}),r.jsx(j,{item:!0,children:r.jsxs(y,{className:"stigg-scheduled-updates-description",variant:"body1",children:["Downgrade to the ",r.jsx("b",{children:n==null?void 0:n.displayName})," plan"]})})]})}function ac({scheduleUpdate:e}){const{scheduleVariables:n}=e,{billingPeriod:i}=n,a=i===P.BillingPeriod.Monthly?"annually":"monthly",t=i===P.BillingPeriod.Monthly?"monthly":"annually";return r.jsxs(j,{container:!0,alignItems:"center",children:[r.jsx(j,{children:r.jsx(Te.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})}),r.jsx(j,{item:!0,children:r.jsxs(y,{className:"stigg-scheduled-updates-description",variant:"body1",children:["Change from an ",a," to a ",r.jsx("b",{children:t})," billing cycle"]})})]})}function rc({subscription:e,scheduleUpdate:n}){const{scheduleVariables:i}=n,{newUnitAmount:a,featureId:t}=i,s=K.compact(e.prices.map(({feature:d})=>d)).find(d=>d.id===t);if(!s)return null;const{featureUnits:c,featureUnitsPlural:l}=s,u=a===1?c:l;return r.jsxs(j,{container:!0,alignItems:"flex-start",flexWrap:"nowrap",children:[r.jsx(j,{children:r.jsx(Te.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})}),r.jsx(j,{item:!0,children:r.jsxs(y,{className:"stigg-scheduled-updates-description",variant:"body1",children:["Reduce the ",r.jsx("b",{children:c})," quantity to ",a," ",u]})})]})}function oc({scheduleUpdate:e,subscription:n}){switch(e.subscriptionScheduleType){case P.SubscriptionScheduleType.Downgrade:return r.jsx(ic,{scheduleUpdate:e});case P.SubscriptionScheduleType.BillingPeriod:return r.jsx(ac,{scheduleUpdate:e});case P.SubscriptionScheduleType.UnitAmount:return r.jsx(rc,{scheduleUpdate:e,subscription:n});default:return null}}const sc=p(z)`
483
+ `;function Lu(){const e=Ge("md");return o.jsxs(Uu,{className:"stigg-subscription-overview-skeleton-layout",children:[o.jsxs(Ou,{children:[o.jsx(H,{width:120}),o.jsx(H,{width:120})]}),o.jsx(H,{width:e?295:260,height:193})]})}function Bu({scheduleUpdate:e}){const{targetPackage:n}=e;return o.jsxs(R,{container:!0,alignItems:"center",children:[o.jsx(R,{children:o.jsx(Oe.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})}),o.jsx(R,{item:!0,children:o.jsxs(C,{className:"stigg-scheduled-updates-description",variant:"body1",children:["Downgrade to the ",o.jsx("b",{children:n==null?void 0:n.displayName})," plan"]})})]})}function _u({scheduleUpdate:e}){const{scheduleVariables:n}=e,{billingPeriod:i}=n,r=i===b.BillingPeriod.Monthly?"annually":"monthly",t=i===b.BillingPeriod.Monthly?"monthly":"annually";return o.jsxs(R,{container:!0,alignItems:"center",children:[o.jsx(R,{children:o.jsx(Oe.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})}),o.jsx(R,{item:!0,children:o.jsxs(C,{className:"stigg-scheduled-updates-description",variant:"body1",children:["Change from an ",r," to a ",o.jsx("b",{children:t})," billing cycle"]})})]})}function $u({subscription:e,scheduleUpdate:n}){const{scheduleVariables:i}=n,{newUnitAmount:r,featureId:t}=i,s=ee.compact(e.prices.map(({feature:d})=>d)).find(d=>d.id===t);if(!s)return null;const{featureUnits:c,featureUnitsPlural:l}=s,u=r===1?c:l;return o.jsxs(R,{container:!0,alignItems:"flex-start",flexWrap:"nowrap",children:[o.jsx(R,{children:o.jsx(Oe.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})}),o.jsx(R,{item:!0,children:o.jsxs(C,{className:"stigg-scheduled-updates-description",variant:"body1",children:["Reduce the ",o.jsx("b",{children:c})," quantity to ",r," ",u]})})]})}function Gu({scheduleUpdate:e,subscription:n}){switch(e.subscriptionScheduleType){case b.SubscriptionScheduleType.Downgrade:return o.jsx(Bu,{scheduleUpdate:e});case b.SubscriptionScheduleType.BillingPeriod:return o.jsx(_u,{scheduleUpdate:e});case b.SubscriptionScheduleType.UnitAmount:return o.jsx($u,{scheduleUpdate:e,subscription:n});default:return null}}const Vu=h(Q)`
470
484
  border-bottom: ${({$borderColor:e})=>`1px solid ${e}`};
471
485
  border-top-left-radius: 10px;
472
486
  border-top-right-radius: 10px;
473
487
  margin: -64px -64px 64px -64px;
474
488
  padding: 24px 32px;
475
- `,cc=p(gi)`
489
+ `,Hu=h(vr)`
476
490
  margin-left: 4px;
477
- `,lc=p(Di)`
491
+ `,qu=h(Zr)`
478
492
  color: ${({theme:e})=>e.stigg.palette.primary};
479
493
  path {
480
494
  fill: ${({theme:e})=>e.stigg.palette.primary};
481
495
  }
482
- `;function uc({subscription:e}){const{scheduledUpdates:n}=e;return r.jsxs(r.Fragment,{children:[r.jsx(j,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1,children:r.jsx(j,{children:r.jsx(y,{className:"stigg-scheduled-updates-description",variant:"body1",children:"The following updates will take effect in the next billing cycle:"})})}),r.jsx(j,{children:(n||[]).map(i=>r.jsx(oc,{scheduleUpdate:i,subscription:e},i.subscriptionScheduleType))})]})}function dc({subscription:e}){const{scheduledUpdates:n}=e,[i]=n||[],{line1:a,line2:t}=Ti({scheduledUpdate:i,subscriptionPrices:e.prices,billingPeriodRange:e.billingPeriodRange,options:{postfix:"at the end of the current billing period"}});return r.jsxs(r.Fragment,{children:[r.jsx(j,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1,children:r.jsx(j,{children:r.jsx(y,{className:"stigg-scheduled-updates-title",variant:"body1",color:"primary",children:a})})}),t&&r.jsx(j,{children:r.jsx(y,{className:"stigg-scheduled-updates-subtitle",variant:"body1",color:"secondary",children:t})})]})}function mc({subscription:e,onCancelScheduledUpdates:n,theme:i,cancelScheduledUpdatesButtonTitle:a}){const t=ne.useTheme(),[o,s]=D.useState(!1),{scheduledUpdates:c}=e;if(!c||c.length===0)return null;const l=c.length===1;return r.jsx(sc,{$borderColor:i.borderColor,className:"stigg-scheduled-updates-alert-container",children:r.jsxs(j,{container:!0,alignItems:l?"center":"flex-start",gap:2,children:[r.jsx(j,{item:!0,display:"flex",children:r.jsx(ce,{icon:"ScheduleBox",svgPathColor:i.iconsColor,svgRectColor:i.iconsBackgroundColor})}),r.jsx(j,{item:!0,flex:1,children:l?r.jsx(dc,{subscription:e}):r.jsx(uc,{subscription:e})}),!!n&&r.jsx(j,{item:!0,children:r.jsxs(Et,{variant:"outlined",onClick:()=>{s(!0),Promise.resolve(n(e)).finally(()=>s(!1))},children:[o?r.jsx(cc,{loading:!0,size:16,color:t.stigg.palette.text.disabled}):r.jsx(lc,{style:{display:"flex",marginRight:4},className:"stigg-scheduled-updates-cancel-update-button-icon"}),r.jsx(y,{variant:"body1",color:"primary.main",className:"stigg-scheduled-updates-cancel-update-button",children:a})]})})]})})}const Xe=p.div`
496
+ `;function Wu({subscription:e}){const{scheduledUpdates:n}=e;return o.jsxs(o.Fragment,{children:[o.jsx(R,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1,children:o.jsx(R,{children:o.jsx(C,{className:"stigg-scheduled-updates-description",variant:"body1",children:"The following updates will take effect in the next billing cycle:"})})}),o.jsx(R,{children:(n||[]).map(i=>o.jsx(Gu,{scheduleUpdate:i,subscription:e},i.subscriptionScheduleType))})]})}function Yu({subscription:e}){const{scheduledUpdates:n}=e,[i]=n||[],{line1:r,line2:t}=Kr({scheduledUpdate:i,subscriptionPrices:e.prices,billingPeriodRange:e.billingPeriodRange,options:{postfix:"at the end of the current billing period"}});return o.jsxs(o.Fragment,{children:[o.jsx(R,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1,children:o.jsx(R,{children:o.jsx(C,{className:"stigg-scheduled-updates-title",variant:"body1",color:"primary",children:r})})}),t&&o.jsx(R,{children:o.jsx(C,{className:"stigg-scheduled-updates-subtitle",variant:"body1",color:"secondary",children:t})})]})}function Zu({subscription:e,onCancelScheduledUpdates:n,theme:i,cancelScheduledUpdatesButtonTitle:r}){const t=zt(),[a,s]=D.useState(!1),{scheduledUpdates:c}=e;if(!c||c.length===0)return null;const l=c.length===1;return o.jsx(Vu,{$borderColor:i.borderColor,className:"stigg-scheduled-updates-alert-container",children:o.jsxs(R,{container:!0,alignItems:l?"center":"flex-start",gap:2,children:[o.jsx(R,{item:!0,display:"flex",children:o.jsx(fe,{icon:"ScheduleBox",svgPathColor:i.iconsColor,svgRectColor:i.iconsBackgroundColor})}),o.jsx(R,{item:!0,flex:1,children:l?o.jsx(Yu,{subscription:e}):o.jsx(Wu,{subscription:e})}),!!n&&o.jsx(R,{item:!0,children:o.jsxs(tn,{variant:"outlined",onClick:()=>{s(!0),Promise.resolve(n(e)).finally(()=>s(!1))},children:[a?o.jsx(Hu,{loading:!0,size:16,color:t.stigg.palette.text.disabled}):o.jsx(qu,{style:{display:"flex",marginRight:4},className:"stigg-scheduled-updates-cancel-update-button-icon"}),o.jsx(C,{variant:"body1",color:"primary.main",className:"stigg-scheduled-updates-cancel-update-button",children:r})]})})]})})}const bt=h.div`
483
497
  width: 100%;
484
498
  display: flex;
485
499
  flex-direction: column;
@@ -488,21 +502,21 @@
488
502
  border: ${({$borderColor:e})=>`1px solid ${e}`};
489
503
 
490
504
  padding: 16px;
491
- ${ge.sm} {
505
+ ${Se.sm} {
492
506
  padding: 32px;
493
507
  }
494
- ${ge.md} {
508
+ ${Se.md} {
495
509
  padding: 48px;
496
510
  }
497
- ${ge.lg} {
511
+ ${Se.lg} {
498
512
  padding: 64px;
499
513
  }
500
- `;function gc({billingPeriod:e,rangeEnd:n,amount:i,currency:a}){return r.jsxs(r.Fragment,{children:[r.jsx(y,{variant:"h6",children:"Next estimated bill"}),r.jsx(y,{variant:"h1",children:ee({amount:i,currency:a,maximumFractionDigits:2})}),r.jsxs(y,{as:"div",variant:"body1",color:"secondary",children:["Billed ",e===P.BillingPeriod.Monthly?"monthly":"annually"," on"," ",r.jsx(y,{variant:"body1",as:"span",color:"primary",children:te.utc(n).format("MMM Do, YYYY")})]}),r.jsx(y,{variant:"body1",color:"secondary",children:"* Additional tax rates may apply"})]})}function Bt({description:e}){return r.jsxs(r.Fragment,{children:[r.jsx(y,{variant:"h6",color:"secondary",children:"No upcoming bill"}),r.jsx(y,{variant:"body1",color:"secondary",children:e})]})}const pc=p.div`
514
+ `;function zu({billingPeriod:e,rangeEnd:n,amount:i,currency:r}){return o.jsxs(o.Fragment,{children:[o.jsx(C,{variant:"h6",children:"Next estimated bill"}),o.jsx(C,{variant:"h1",children:re({amount:i,currency:r,maximumFractionDigits:2})}),o.jsxs(C,{as:"div",variant:"body1",color:"secondary",children:["Billed ",e===b.BillingPeriod.Monthly?"monthly":"annually"," on"," ",o.jsx(C,{variant:"body1",as:"span",color:"primary",children:oe.utc(n).format("MMM Do, YYYY")})]}),o.jsx(C,{variant:"body1",color:"secondary",children:"* Additional tax rates may apply"})]})}function En({description:e}){return o.jsxs(o.Fragment,{children:[o.jsx(C,{variant:"h6",color:"secondary",children:"No upcoming bill"}),o.jsx(C,{variant:"body1",color:"secondary",children:e})]})}const Ku=h.div`
501
515
  display: flex;
502
516
  flex-direction: column;
503
517
  align-items: left;
504
518
  gap: 8px;
505
- `,fc=p(be)`
519
+ `,Qu=h(we)`
506
520
  width: fit-content;
507
521
  &.MuiButton-root {
508
522
  padding: 0;
@@ -510,7 +524,7 @@
510
524
  background: none;
511
525
  }
512
526
  }
513
- `;function hc({onContactSupport:e,label:n,linkLabel:i}){const a=r.jsx(y,{color:e?"primary.main":"secondary",children:i});return r.jsxs(pc,{className:"stigg-contact-support-layout",children:[r.jsx(y,{className:"stigg-contact-support-label",color:"secondary",children:n}),e?r.jsx(fc,{className:"stigg-contact-support-button",style:{textTransform:"none"},variant:"text",onClick:e,children:a}):a]})}const yc=p.div`
527
+ `;function Xu({onContactSupport:e,label:n,linkLabel:i}){const r=o.jsx(C,{color:e?"primary.main":"secondary",children:i});return o.jsxs(Ku,{className:"stigg-contact-support-layout",children:[o.jsx(C,{className:"stigg-contact-support-label",color:"secondary",children:n}),e?o.jsx(Qu,{className:"stigg-contact-support-button",style:{textTransform:"none"},variant:"text",onClick:e,children:r}):r]})}const Ju=h.div`
514
528
  max-height: 278px;
515
529
  display: flex;
516
530
  flex-direction: column;
@@ -519,21 +533,21 @@
519
533
  border: ${({$borderColor:e})=>`1px solid ${e}`};
520
534
  padding: 32px;
521
535
  gap: 16px;
522
- `;function Cc({subscription:e,theme:n,textOverrides:i,onContactSupport:a}){var l,u,d,h,m,f,g;const{pricingType:t}=e;let o;const s=(u=(l=e.prices)==null?void 0:l.every(x=>x.billingModel!==P.BillingModel.UsageBased))!=null?u:!0,c=(d=e.scheduledUpdates)==null?void 0:d.find(({subscriptionScheduleType:x,targetPackage:b})=>x===P.SubscriptionScheduleType.Downgrade&&(b==null?void 0:b.pricingType)===P.PricingType.Free);if(t===P.PricingType.Free)o=r.jsx(Bt,{description:"You're on a free plan, so you don’t have any upcoming charges"});else if(t===P.PricingType.Paid)if(c&&s)o=r.jsx(Bt,{description:"Your plan will be downgraded to a free plan, so you don’t have any upcoming charges"});else if(e.status===P.SubscriptionStatus.InTrial)o=r.jsx(Bt,{description:`You’re on a free trial of the ${e.planName} plan, so you don’t have any upcoming charges`});else{const x=(m=(h=e.prices)==null?void 0:h[0])==null?void 0:m.billingPeriod,b=(f=e.billingPeriodRange)==null?void 0:f.end,E=(g=e.totalPrice)==null?void 0:g.total;x&&b&&E&&(o=r.jsx(gc,{billingPeriod:x,rangeEnd:b,amount:E.amount,currency:E.currency}))}else t===P.PricingType.Custom&&(o=r.jsx(hc,{onContactSupport:a,label:i.contactSupportTitle,linkLabel:i.contactSupportLink}));return r.jsx(yc,{className:"stigg-subscription-total-price-layout",$borderColor:n.borderColor,children:o})}const Pc=e=>C.createElement("svg",T({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("path",{d:"M12.9469 13.5999H11.9344L11.935 10.7756C11.935 10.6288 11.87 10.4819 11.7557 10.3838L8.62061 7.91816L11.755 5.4532C11.8694 5.35507 11.9344 5.22444 11.9344 5.06132L11.935 2.40004H12.9475C13.225 2.40004 13.4375 2.18755 13.4375 1.91004C13.4375 1.63254 13.225 1.42004 12.9475 1.42004L3.05311 1.42067C2.77561 1.42067 2.56311 1.63316 2.56311 1.91067C2.56311 2.18817 2.77561 2.40067 3.05311 2.40067H4.06561L4.06498 5.06131C4.06498 5.20818 4.12998 5.35505 4.24436 5.45318L7.36244 7.91814L4.245 10.3837C4.13062 10.4819 4.06562 10.6125 4.06562 10.7756V13.5999H3.05313C2.77562 13.5999 2.56313 13.8124 2.56313 14.0899C2.56313 14.3674 2.77562 14.5799 3.05313 14.5799H12.9469C13.2244 14.5799 13.4369 14.3674 13.4369 14.0899C13.4369 13.8124 13.2244 13.5999 12.9469 13.5999ZM5.04498 2.39995H10.9551V4.81627L8.00002 7.16747L5.04498 4.81627V2.39995ZM5.04498 11.0206L8.00002 8.66939L10.9551 11.0044V13.5838H5.04498V11.0206Z",fill:"white"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.05303 1.25404L12.9474 1.25342C13.317 1.25342 13.6041 1.54053 13.6041 1.91008C13.6041 2.27964 13.317 2.56675 12.9474 2.56675H12.1016L12.101 5.06136V5.06136C12.101 5.2747 12.0135 5.45101 11.8635 5.57973L11.8581 5.58436L8.89014 7.9182L11.8642 10.2572C12.0164 10.3878 12.1016 10.5814 12.1016 10.7757L12.101 13.4333H12.9468C13.3164 13.4333 13.6035 13.7204 13.6035 14.09C13.6035 14.4595 13.3164 14.7466 12.9468 14.7466H3.05304C2.68349 14.7466 2.39638 14.4595 2.39638 14.09C2.39638 13.7204 2.68349 13.4333 3.05304 13.4333H3.89887V10.7757C3.89887 10.5623 3.98635 10.386 4.13639 10.2573L4.14144 10.253L7.09365 7.91821L4.13566 5.57982C3.98346 5.44923 3.89823 5.25562 3.89823 5.06135L3.89882 2.56738H3.05303C2.68348 2.56738 2.39636 2.28026 2.39636 1.91071C2.39636 1.54116 2.68348 1.25405 3.05303 1.25404V1.25404ZM12.9474 1.58675L3.05304 1.58738C2.86758 1.58738 2.7297 1.72525 2.7297 1.91071C2.7297 2.09617 2.86757 2.23404 3.05303 2.23404H4.23223L4.23157 5.06135V5.06135C4.23158 5.15983 4.27538 5.25908 4.35053 5.32476L7.63107 7.91815L4.35113 10.5123C4.2739 10.5795 4.23221 10.6639 4.23221 10.7757V13.7666H3.05304C2.86759 13.7666 2.72971 13.9045 2.72971 14.09C2.72971 14.2754 2.86759 14.4133 3.05304 14.4133H12.9468C13.1323 14.4133 13.2701 14.2754 13.2701 14.09C13.2701 13.9045 13.1323 13.7667 12.9468 13.7667H11.7676L11.7683 10.7757V10.7757C11.7683 10.6772 11.7245 10.5781 11.6495 10.5124L8.35092 7.91819L11.6489 5.32461C11.726 5.25743 11.7676 5.17306 11.7676 5.06136L11.7683 2.23342H12.9474C13.1329 2.23342 13.2708 2.09554 13.2708 1.91008C13.2708 1.72463 13.1329 1.58676 12.9474 1.58675V1.58675ZM4.87823 2.23332H11.1216V4.89669L7.99994 7.3805L4.87823 4.89669V2.23332ZM5.21157 2.56666V4.73593L7.99994 6.95452L10.7883 4.73593V2.56666H5.21157ZM7.99958 8.45673L11.1216 10.9237V13.7505H4.87823V10.9403L7.99958 8.45673ZM8.0003 8.88213L5.21157 11.101V13.4172H10.7883V11.0852L8.0003 8.88213Z",fill:"white"})),on=p(t=>{var o=t,{children:e,className:n,placement:i="top"}=o,a=ie(o,["children","className","placement"]);return r.jsx(kt,O(T({arrow:!0,placement:i},a),{classes:{popper:n,tooltip:"stigg-tooltip",arrow:"stigg-tooltip-arrow"},children:r.jsx("div",{children:e})}))})(({theme:e,$padding:n=8,$maxWidth:i=300})=>({[`& .${kt.tooltipClasses.tooltip}`]:{backgroundColor:e.stigg.palette.white,maxWidth:i,boxShadow:e.stigg.shadows.popover,padding:n,borderRadius:e.stigg.border.radius,color:e.stigg.palette.text.primary},[`& .${kt.tooltipClasses.arrow}`]:{color:e.stigg.palette.white}})),bc=p(y)`
536
+ `;function ed({subscription:e,theme:n,textOverrides:i,onContactSupport:r}){var l,u,d,p,m,f,g;const{pricingType:t}=e;let a;const s=(u=(l=e.prices)==null?void 0:l.every(y=>y.billingModel!==b.BillingModel.UsageBased))!=null?u:!0,c=(d=e.scheduledUpdates)==null?void 0:d.find(({subscriptionScheduleType:y,targetPackage:P})=>y===b.SubscriptionScheduleType.Downgrade&&(P==null?void 0:P.pricingType)===b.PricingType.Free);if(t===b.PricingType.Free)a=o.jsx(En,{description:"You're on a free plan, so you don’t have any upcoming charges"});else if(t===b.PricingType.Paid)if(c&&s)a=o.jsx(En,{description:"Your plan will be downgraded to a free plan, so you don’t have any upcoming charges"});else if(e.status===b.SubscriptionStatus.InTrial)a=o.jsx(En,{description:`You’re on a free trial of the ${e.planName} plan, so you don’t have any upcoming charges`});else{const y=(m=(p=e.prices)==null?void 0:p[0])==null?void 0:m.billingPeriod,P=(f=e.billingPeriodRange)==null?void 0:f.end,S=(g=e.totalPrice)==null?void 0:g.total;y&&P&&S&&(a=o.jsx(zu,{billingPeriod:y,rangeEnd:P,amount:S.amount,currency:S.currency}))}else t===b.PricingType.Custom&&(a=o.jsx(Xu,{onContactSupport:r,label:i.contactSupportTitle,linkLabel:i.contactSupportLink}));return o.jsx(Ju,{className:"stigg-subscription-total-price-layout",$borderColor:n.borderColor,children:a})}const td=e=>E.createElement("svg",I({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M12.9469 13.5999H11.9344L11.935 10.7756C11.935 10.6288 11.87 10.4819 11.7557 10.3838L8.62061 7.91816L11.755 5.4532C11.8694 5.35507 11.9344 5.22444 11.9344 5.06132L11.935 2.40004H12.9475C13.225 2.40004 13.4375 2.18755 13.4375 1.91004C13.4375 1.63254 13.225 1.42004 12.9475 1.42004L3.05311 1.42067C2.77561 1.42067 2.56311 1.63316 2.56311 1.91067C2.56311 2.18817 2.77561 2.40067 3.05311 2.40067H4.06561L4.06498 5.06131C4.06498 5.20818 4.12998 5.35505 4.24436 5.45318L7.36244 7.91814L4.245 10.3837C4.13062 10.4819 4.06562 10.6125 4.06562 10.7756V13.5999H3.05313C2.77562 13.5999 2.56313 13.8124 2.56313 14.0899C2.56313 14.3674 2.77562 14.5799 3.05313 14.5799H12.9469C13.2244 14.5799 13.4369 14.3674 13.4369 14.0899C13.4369 13.8124 13.2244 13.5999 12.9469 13.5999ZM5.04498 2.39995H10.9551V4.81627L8.00002 7.16747L5.04498 4.81627V2.39995ZM5.04498 11.0206L8.00002 8.66939L10.9551 11.0044V13.5838H5.04498V11.0206Z",fill:"white"}),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.05303 1.25404L12.9474 1.25342C13.317 1.25342 13.6041 1.54053 13.6041 1.91008C13.6041 2.27964 13.317 2.56675 12.9474 2.56675H12.1016L12.101 5.06136V5.06136C12.101 5.2747 12.0135 5.45101 11.8635 5.57973L11.8581 5.58436L8.89014 7.9182L11.8642 10.2572C12.0164 10.3878 12.1016 10.5814 12.1016 10.7757L12.101 13.4333H12.9468C13.3164 13.4333 13.6035 13.7204 13.6035 14.09C13.6035 14.4595 13.3164 14.7466 12.9468 14.7466H3.05304C2.68349 14.7466 2.39638 14.4595 2.39638 14.09C2.39638 13.7204 2.68349 13.4333 3.05304 13.4333H3.89887V10.7757C3.89887 10.5623 3.98635 10.386 4.13639 10.2573L4.14144 10.253L7.09365 7.91821L4.13566 5.57982C3.98346 5.44923 3.89823 5.25562 3.89823 5.06135L3.89882 2.56738H3.05303C2.68348 2.56738 2.39636 2.28026 2.39636 1.91071C2.39636 1.54116 2.68348 1.25405 3.05303 1.25404V1.25404ZM12.9474 1.58675L3.05304 1.58738C2.86758 1.58738 2.7297 1.72525 2.7297 1.91071C2.7297 2.09617 2.86757 2.23404 3.05303 2.23404H4.23223L4.23157 5.06135V5.06135C4.23158 5.15983 4.27538 5.25908 4.35053 5.32476L7.63107 7.91815L4.35113 10.5123C4.2739 10.5795 4.23221 10.6639 4.23221 10.7757V13.7666H3.05304C2.86759 13.7666 2.72971 13.9045 2.72971 14.09C2.72971 14.2754 2.86759 14.4133 3.05304 14.4133H12.9468C13.1323 14.4133 13.2701 14.2754 13.2701 14.09C13.2701 13.9045 13.1323 13.7667 12.9468 13.7667H11.7676L11.7683 10.7757V10.7757C11.7683 10.6772 11.7245 10.5781 11.6495 10.5124L8.35092 7.91819L11.6489 5.32461C11.726 5.25743 11.7676 5.17306 11.7676 5.06136L11.7683 2.23342H12.9474C13.1329 2.23342 13.2708 2.09554 13.2708 1.91008C13.2708 1.72463 13.1329 1.58676 12.9474 1.58675V1.58675ZM4.87823 2.23332H11.1216V4.89669L7.99994 7.3805L4.87823 4.89669V2.23332ZM5.21157 2.56666V4.73593L7.99994 6.95452L10.7883 4.73593V2.56666H5.21157ZM7.99958 8.45673L11.1216 10.9237V13.7505H4.87823V10.9403L7.99958 8.45673ZM8.0003 8.88213L5.21157 11.101V13.4172H10.7883V11.0852L8.0003 8.88213Z",fill:"white"})),Xn=h(t=>{var a=t,{children:e,className:n,placement:i="top"}=a,r=se(a,["children","className","placement"]);return o.jsx(un,_(I({arrow:!0,placement:i},r),{classes:{popper:n,tooltip:"stigg-tooltip",arrow:"stigg-tooltip-arrow"},children:o.jsx("div",{children:e})}))})(({theme:e,$padding:n=8,$maxWidth:i=300})=>({[`& .${un.tooltipClasses.tooltip}`]:{backgroundColor:e.stigg.palette.white,maxWidth:i,boxShadow:e.stigg.shadows.popover,padding:n,borderRadius:e.stigg.border.radius,color:e.stigg.palette.text.primary},[`& .${un.tooltipClasses.arrow}`]:{color:e.stigg.palette.white}})),nd=h(C)`
523
537
  display: ${({$display:e})=>e};
524
538
  -webkit-line-clamp: ${({$maxLines:e})=>e};
525
539
  -webkit-box-orient: vertical;
526
540
  text-overflow: ellipsis;
527
541
  overflow: hidden;
528
542
  white-space: normal;
529
- ${({$wordBreak:e})=>e&&ne.css`
543
+ ${({$wordBreak:e})=>e&&Ie`
530
544
  word-break: break-word;
531
545
  `}
532
546
 
533
- ${({$bold:e})=>e&&ne.css`
547
+ ${({$bold:e})=>e&&Ie`
534
548
  font-weight: bold;
535
549
  `}
536
- `;function Gn(e){return e&&(e.clientHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)}const We=({leaveDelay:e,children:n,variant:i,color:a,maxLines:t=1,wordBreak:o,bold:s,tooltipPlacement:c="top",className:l,display:u="-webkit-box",style:d,"data-testid":h})=>{const[m,f]=D.useState(!1),g=D.useRef(null),x=r.jsx(bc,{ref:g,variant:i,color:a,$maxLines:t,$wordBreak:o,$bold:s,className:l,$display:u,style:d,"data-testid":h,children:n});D.useEffect(()=>{if(g!=null&&g.current){const E=Gn(g.current);f(E)}},[g]);const b=(g==null?void 0:g.current)&&Gn(g.current);return r.jsx("span",{children:m||b?r.jsx(on,{placement:c,leaveDelay:e,title:r.jsx(y,{variant:"body1",children:n}),children:x}):x})},Ec=p.div`
550
+ `;function er(e){return e&&(e.clientHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)}const mt=({leaveDelay:e,children:n,variant:i,color:r,maxLines:t=1,wordBreak:a,bold:s,tooltipPlacement:c="top",className:l,display:u="-webkit-box",style:d,"data-testid":p})=>{const[m,f]=D.useState(!1),g=D.useRef(null),y=o.jsx(nd,{ref:g,variant:i,color:r,$maxLines:t,$wordBreak:a,$bold:s,className:l,$display:u,style:d,"data-testid":p,children:n});D.useEffect(()=>{if(g!=null&&g.current){const S=er(g.current);f(S)}},[g]);const P=(g==null?void 0:g.current)&&er(g.current);return o.jsx("span",{children:m||P?o.jsx(Xn,{placement:c,leaveDelay:e,title:o.jsx(C,{variant:"body1",children:n}),children:y}):y})},id=h.div`
537
551
  width: 100%;
538
552
  display: flex;
539
553
  align-items: center;
@@ -542,48 +556,48 @@
542
556
  border-radius: 10px;
543
557
  padding: 8px 16px;
544
558
  margin-top: 16px;
545
- `,Sc=p(pi)`
559
+ `,rd=h(xr)`
546
560
  text-decoration-color: white;
547
561
  color: white;
548
562
  cursor: pointer;
549
- `;function Dc({subscription:e,includePlanName:n,onManageSubscription:i}){return(e==null?void 0:e.status)!==P.SubscriptionStatus.InTrial?null:r.jsxs(Ec,{className:"stigg-subscription-trial-badge",children:[r.jsx(Pc,{className:"stigg-subscription-trial-badge-image"}),r.jsx("div",{style:{flex:1,marginRight:4},children:r.jsxs(We,{variant:"body1",className:"stigg-subscription-trial-badge-text",color:"white",children:[`${e.trialRemainingDays} days remaining in trial`,n&&` of the ${e.planName} plan`]})}),r.jsx(Sc,{className:"stigg-subscription-trial-upgrade-button",onClick:()=>i({intentionType:St.UPGRADE_TRIAL_PLAN}),children:r.jsx(y,{color:"white",children:"Upgrade plan"})})]})}function xc({mainSubscription:e,trialSubscription:n,onManageSubscription:i,theme:a}){return r.jsxs("div",{className:"stigg-subscription-view-layout",children:[r.jsxs(y,{className:"stigg-subscription-plan-name",variant:"h1",overrideColor:a.planNameColor,style:{marginTop:8},children:[e.planName," plan"]}),r.jsx(Dc,{subscription:n,includePlanName:(n==null?void 0:n.planName)!==e.planName,onManageSubscription:i})]})}const $i=70;function sn(e,n){return Math.min(Math.floor(e/n*100),100)}function Tc(e){let n;return e<$i?n="standard":e<100?n="warning":n="error",n}function Ic(e){if(!e.resetPeriod||!e.usagePeriodEnd)return null;const n=i=>te.utc(e.usagePeriodEnd).diff(te.utc(),i);switch(e.resetPeriod){case"MONTH":return`Resets monthly - in ${n("days")} days`;case"WEEK":return`Resets weekly - in ${n("days")} days`;case"DAY":return`Resets daily - in ${n("hours")} hours`;case"HOUR":return`Resets hourly - in ${n("minutes")} minutes`;default:return null}}const vc=p(at)`
563
+ `;function ad({subscription:e,includePlanName:n,onManageSubscription:i}){return(e==null?void 0:e.status)!==b.SubscriptionStatus.InTrial?null:o.jsxs(id,{className:"stigg-subscription-trial-badge",children:[o.jsx(td,{className:"stigg-subscription-trial-badge-image"}),o.jsx("div",{style:{flex:1,marginRight:4},children:o.jsxs(mt,{variant:"body1",className:"stigg-subscription-trial-badge-text",color:"white",children:[`${e.trialRemainingDays} days remaining in trial`,n&&` of the ${e.planName} plan`]})}),o.jsx(rd,{className:"stigg-subscription-trial-upgrade-button",onClick:()=>i({intentionType:nn.UPGRADE_TRIAL_PLAN}),children:o.jsx(C,{color:"white",children:"Upgrade plan"})})]})}function od({mainSubscription:e,trialSubscription:n,onManageSubscription:i,theme:r}){return o.jsxs("div",{className:"stigg-subscription-view-layout",children:[o.jsxs(C,{className:"stigg-subscription-plan-name",variant:"h1",overrideColor:r.planNameColor,style:{marginTop:8},children:[e.planName," plan"]}),o.jsx(ad,{subscription:n,includePlanName:(n==null?void 0:n.planName)!==e.planName,onManageSubscription:i})]})}const da=70;function Jn(e,n){return Math.min(Math.floor(e/n*100),100)}function sd(e){let n;return e<da?n="standard":e<100?n="warning":n="error",n}function cd(e){if(!e.resetPeriod||!e.usagePeriodEnd)return null;const n=i=>oe.utc(e.usagePeriodEnd).diff(oe.utc(),i);switch(e.resetPeriod){case b.EntitlementResetPeriod.Month:return`Resets monthly - in ${n("days")} days`;case b.EntitlementResetPeriod.Week:return`Resets weekly - in ${n("days")} days`;case b.EntitlementResetPeriod.Day:return`Resets daily - in ${n("hours")} hours`;case b.EntitlementResetPeriod.Hour:return`Resets hourly - in ${n("minutes")} minutes`;default:return null}}const ld=h(It)`
550
564
  height: 4px;
551
- background-color: ${({theme:e})=>ae(e.stigg.palette.primary).alpha(.4).string()};
565
+ background-color: ${({theme:e})=>le(e.stigg.palette.primary).alpha(.4).string()};
552
566
 
553
567
  span {
554
568
  background-color: ${({$progressStatus:e,theme:n})=>{switch(e){case"standard":return n.stigg.palette.primary;case"warning":return n.stigg.palette.warning;case"error":return n.stigg.palette.error;default:return n.stigg.palette.primary}}};
555
569
  }
556
- `,Ac=p(je)`
570
+ `,ud=h(We)`
557
571
  border-style: dotted;
558
572
  border-bottom-width: 2px;
559
- border-color: ${({theme:e})=>ae(e.stigg.palette.outlinedRestingBorder).alpha(.4).string()};
560
- `;function _i({entitlement:e}){if(e.hasUnlimitedUsage)return r.jsx(Ac,{});const n=sn(e.currentUsage||0,e.usageLimit),i=Tc(n);return r.jsx(vc,{$progressStatus:i,className:`stigg-feature-usage-progress-bar-${i.toString()}`,variant:"determinate",value:n})}const Vn=p(be)`
573
+ border-color: ${({theme:e})=>le(e.stigg.palette.outlinedRestingBorder).alpha(.4).string()};
574
+ `;function ma({entitlement:e}){if(e.hasUnlimitedUsage)return o.jsx(ud,{});const n=Jn(e.currentUsage||0,e.usageLimit),i=sd(n);return o.jsx(ld,{$progressStatus:i,className:`stigg-feature-usage-progress-bar-${i.toString()}`,variant:"determinate",value:n})}const tr=h(we)`
561
575
  text-transform: none;
562
576
  padding: 0;
563
577
  white-space: nowrap;
564
- `;function Gi({entitlement:e,feature:n,onManageSubscription:i,onBuyMore:a,canBuyMore:t,canUpgradeSubscription:o,hasCustomSubscription:s}){return s||e.hasUnlimitedUsage||sn(e.currentUsage||0,e.usageLimit)<$i?null:t?a?r.jsx(Vn,{variant:"text",onClick:()=>a(n,e),children:r.jsx(y,{color:"primary.main",children:"Buy more"})}):null:o&&i?r.jsx(Vn,{variant:"text",onClick:()=>i({intentionType:St.UPGRADE_PLAN}),children:r.jsx(y,{color:"primary.main",children:"Upgrade"})}):null}function kc({amount:e,currency:n,blockSize:i,entitlement:a,feature:t,hideChargePrice:o,onBuyMore:s,onManageSubscription:c,canUpgradeSubscription:l,hasCustomSubscription:u}){var d,h,m;return r.jsxs("div",{className:`stigg-charge-list-item stigg-charge-list-item-${a.feature.refId}`,style:{display:"flex",flexDirection:"column",gap:12},children:[r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:12},children:[r.jsxs("div",{style:{display:"flex",gap:12},children:[r.jsx(We,{variant:"body1",color:"primary",children:t.displayName}),!o&&r.jsxs(We,{variant:"body1",color:"secondary",children:[ee({amount:e,currency:n})," per ",i?`${i} `:"",i?t.featureUnitsPlural:t.featureUnits]})]}),r.jsxs("div",{style:{display:"flex",gap:12},children:[r.jsx(Gi,{entitlement:a,feature:t,canBuyMore:!0,onBuyMore:s,onManageSubscription:c,canUpgradeSubscription:l,hasCustomSubscription:u}),r.jsx(y,{variant:"body1",color:"primary",style:{whiteSpace:"nowrap"},children:a.hasUnlimitedUsage?(d=a.currentUsage)==null?void 0:d.toLocaleString():`${(h=a.currentUsage)==null?void 0:h.toLocaleString()} of ${(m=a.usageLimit)==null?void 0:m.toLocaleString()}`})]})]}),r.jsx(_i,{entitlement:a})]})}function Nc({subscription:e,entitlements:n,onBuyMore:i,onManageSubscription:a,hasCustomSubscription:t,canUpgradeSubscription:o}){const s=K.keyBy(n,"feature.refId"),c=e.prices.filter(({feature:l,price:u})=>!!l&&s[l.refId]&&!!u);return c.length?r.jsx("div",{className:"stigg-charge-list",style:{display:"flex",flexDirection:"column",gap:16,marginTop:32},children:c.map(({feature:l,price:u,blockSize:d,billingModel:h})=>{if(!l||!u)return null;const m=s[l.refId];return!m||!m.feature?null:r.jsx(kc,{entitlement:m,feature:m.feature,amount:u.amount,blockSize:d,currency:u.currency,hideChargePrice:h===P.BillingModel.PerUnit,onBuyMore:i,onManageSubscription:a,canUpgradeSubscription:o,hasCustomSubscription:t},l.refId)})}):null}function Vi({onManageSubscription:e,onBuyMore:n,onCancelScheduledUpdates:i,onContactSupport:a,hiddenSections:t,cancelScheduledUpdatesButtonTitle:o}){const{customerPortal:s,isLoading:c,textOverrides:l,theme:u}=fe(),d=c||!s,{subscriptions:h,entitlements:m,canUpgradeSubscription:f}=s||{},g=h==null?void 0:h.find(({status:I})=>I===P.SubscriptionStatus.Active),x=h==null?void 0:h.find(({status:I})=>I===P.SubscriptionStatus.InTrial),b=(g==null?void 0:g.pricingType)===P.PricingType.Custom,E=g||x;return r.jsxs(Xe,{className:"stigg-customer-portal-subscriptions-overview",$backgroundColor:u.backgroundColor,$borderColor:u.borderColor,children:[!d&&g&&g.scheduledUpdates&&r.jsx(mc,{theme:u,subscription:g,onCancelScheduledUpdates:i,cancelScheduledUpdatesButtonTitle:o}),d||!E?r.jsx(nc,{}):r.jsxs("div",{className:"stigg-overview-layout",style:{display:"flex",alignItems:"flex-start",gap:64,flexWrap:"wrap"},children:[r.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[r.jsx(Zs,{onManageSubscription:e,hideManageButton:b,textOverrides:l}),r.jsx(xc,{mainSubscription:E,trialSubscription:x,theme:u,onManageSubscription:e}),g&&m&&r.jsx(Nc,{subscription:g,entitlements:m,onBuyMore:n,onManageSubscription:e,canUpgradeSubscription:!!f,hasCustomSubscription:b}),r.jsx(Js,{customerPortal:s,hiddenSections:t,textOverrides:l,theme:u})]}),r.jsx("div",{style:{display:"flex",flexDirection:"column",width:319,gap:24},children:r.jsx(Cc,{subscription:E,theme:u,onContactSupport:a,textOverrides:l})})]})]})}const wc=p.div`
578
+ `;function ga({entitlement:e,feature:n,onManageSubscription:i,onBuyMore:r,canBuyMore:t,canUpgradeSubscription:a,hasCustomSubscription:s}){return s||e.hasUnlimitedUsage||Jn(e.currentUsage||0,e.usageLimit)<da?null:t?r?o.jsx(tr,{variant:"text",onClick:()=>r(n,e),children:o.jsx(C,{color:"primary.main",children:"Buy more"})}):null:a&&i?o.jsx(tr,{variant:"text",onClick:()=>i({intentionType:nn.UPGRADE_PLAN}),children:o.jsx(C,{color:"primary.main",children:"Upgrade"})}):null}function dd({amount:e,currency:n,blockSize:i,entitlement:r,feature:t,hideChargePrice:a,onBuyMore:s,onManageSubscription:c,canUpgradeSubscription:l,hasCustomSubscription:u}){var d,p,m;return o.jsxs("div",{className:`stigg-charge-list-item stigg-charge-list-item-${r.feature.refId}`,style:{display:"flex",flexDirection:"column",gap:12},children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:12},children:[o.jsxs("div",{style:{display:"flex",gap:12},children:[o.jsx(mt,{variant:"body1",color:"primary",children:t.displayName}),!a&&o.jsxs(mt,{variant:"body1",color:"secondary",children:[re({amount:e,currency:n})," per ",i?`${i} `:"",i?t.featureUnitsPlural:t.featureUnits]})]}),o.jsxs("div",{style:{display:"flex",gap:12},children:[o.jsx(ga,{entitlement:r,feature:t,canBuyMore:!0,onBuyMore:s,onManageSubscription:c,canUpgradeSubscription:l,hasCustomSubscription:u}),o.jsx(C,{variant:"body1",color:"primary",style:{whiteSpace:"nowrap"},children:r.hasUnlimitedUsage?(d=r.currentUsage)==null?void 0:d.toLocaleString():`${(p=r.currentUsage)==null?void 0:p.toLocaleString()} of ${(m=r.usageLimit)==null?void 0:m.toLocaleString()}`})]})]}),o.jsx(ma,{entitlement:r})]})}function md({subscription:e,entitlements:n,onBuyMore:i,onManageSubscription:r,hasCustomSubscription:t,canUpgradeSubscription:a}){const s=ee.keyBy(n,"feature.refId"),c=e.prices.filter(({feature:l,price:u})=>!!l&&s[l.refId]&&!!u);return c.length?o.jsx("div",{className:"stigg-charge-list",style:{display:"flex",flexDirection:"column",gap:16,marginTop:32},children:c.map(({feature:l,price:u,blockSize:d,billingModel:p})=>{if(!l||!u)return null;const m=s[l.refId];return!m||!m.feature?null:o.jsx(dd,{entitlement:m,feature:m.feature,amount:u.amount,blockSize:d,currency:u.currency,hideChargePrice:p===b.BillingModel.PerUnit,onBuyMore:i,onManageSubscription:r,canUpgradeSubscription:a,hasCustomSubscription:t},l.refId)})}):null}function pa({onManageSubscription:e,onBuyMore:n,onCancelScheduledUpdates:i,onContactSupport:r,hiddenSections:t,cancelScheduledUpdatesButtonTitle:a}){const{customerPortal:s,isLoading:c,textOverrides:l,theme:u}=ve(),d=c||!s,{subscriptions:p,entitlements:m,canUpgradeSubscription:f}=s||{},g=p==null?void 0:p.find(({status:v})=>v===b.SubscriptionStatus.Active),y=p==null?void 0:p.find(({status:v})=>v===b.SubscriptionStatus.InTrial),P=(g==null?void 0:g.pricingType)===b.PricingType.Custom,S=g||y;return o.jsxs(bt,{className:"stigg-customer-portal-subscriptions-overview",$backgroundColor:u.backgroundColor,$borderColor:u.borderColor,children:[!d&&g&&g.scheduledUpdates&&o.jsx(Zu,{theme:u,subscription:g,onCancelScheduledUpdates:i,cancelScheduledUpdatesButtonTitle:a}),d||!S?o.jsx(Lu,{}):o.jsxs("div",{className:"stigg-overview-layout",style:{display:"flex",alignItems:"flex-start",gap:64,flexWrap:"wrap"},children:[o.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[o.jsx(Nu,{onManageSubscription:e,hideManageButton:P,textOverrides:l}),o.jsx(od,{mainSubscription:S,trialSubscription:y,theme:u,onManageSubscription:e}),g&&m&&o.jsx(md,{subscription:g,entitlements:m,onBuyMore:n,onManageSubscription:e,canUpgradeSubscription:!!f,hasCustomSubscription:P}),o.jsx(Mu,{customerPortal:s,hiddenSections:t,textOverrides:l,theme:u})]}),o.jsx("div",{style:{display:"flex",flexDirection:"column",width:319,gap:24},children:o.jsx(ed,{subscription:S,theme:u,onContactSupport:r,textOverrides:l})})]})]})}const gd=h.div`
565
579
  display: flex;
566
580
  width: 100%;
567
581
  align-items: flex-end;
568
582
  justify-content: flex-end;
569
583
  margin-bottom: 24px;
570
- `;function Fc({showWatermark:e}){return r.jsx(wc,{className:"stigg-customer-portal-header-layout",children:r.jsx(Ue,{source:"customer_portal",showWatermark:e})})}const jc=p(y)`
584
+ `;function pd({showWatermark:e}){return o.jsx(gd,{className:"stigg-customer-portal-header-layout",children:o.jsx(Ke,{source:"customer_portal",showWatermark:e})})}const fd=h(C)`
571
585
  text-transform: none;
572
- `,Uc=p(Te.ExternalLink)`
586
+ `,hd=h(Oe.ExternalLink)`
573
587
  color: ${({theme:e})=>e.stigg.palette.primary};
574
- `;function Hi({text:e,url:n,className:i}){const a=()=>{window.open(n,"_blank")};return r.jsx(Et,{className:i,variant:"outlined",startIcon:r.jsx(Uc,{size:20,strokeWidth:2.5}),onClick:a,children:r.jsx(jc,{color:"primary.main",children:e})})}const Zt=p.div`
588
+ `;function fa({text:e,url:n,className:i}){const r=()=>{window.open(n,"_blank")};return o.jsx(tn,{className:i,variant:"outlined",startIcon:o.jsx(hd,{size:20,strokeWidth:2.5}),onClick:r,children:o.jsx(fd,{color:"primary.main",children:e})})}const Rn=h.div`
575
589
  display: flex;
576
590
  flex-direction: column;
577
591
  align-items: flex-start;
578
592
  gap: 16px;
579
593
  flex: 1 0 0;
580
- `,Mc=p.div`
594
+ `,yd=h.div`
581
595
  display: flex;
582
596
  align-items: flex-start;
583
597
  gap: 16px;
584
598
  align-self: stretch;
585
599
  flex-wrap: wrap;
586
- `;function Hn({title:e,rows:n}){return r.jsxs(Zt,{children:[r.jsx(y,{variant:"h6",color:"secondary",bold:!0,children:e}),n.map(({classNamePrefix:i,label:a,value:t,labelTypographyProps:o,valueTypographyProps:s})=>r.jsxs(Mc,{children:[r.jsx(y,O(T({className:`${i}-label`,variant:"body1",color:"secondary",style:{width:80}},o),{children:a})),r.jsx(y,O(T({className:`${i}-text`,variant:"body1",color:"secondary"},s),{children:t}))]},a))]})}function qi(){return r.jsx(V,{width:220,height:42})}const qn="-";function Wi(){const{customerPortal:e,isLoading:n,textOverrides:i,theme:a}=fe(),t=Ne("md"),{billingInformation:o}=e||{},s=!o||n,c=[];if(s?c.push(r.jsxs(Zt,{children:[r.jsx(V,{width:220,height:12}),r.jsx(V,{width:220,height:12}),r.jsx(V,{width:220,height:12})]},"information-loading-data-top"),r.jsx(je,{orientation:"vertical",style:{minHeight:93,display:t?"block":"none"}},"information-loading-data-divider"),r.jsxs(Zt,{children:[r.jsx(V,{width:220,height:12}),r.jsx(V,{width:220,height:12}),r.jsx(V,{width:220,height:12})]},"information-loading-data-bottom")):(c.push(r.jsx(Hn,{title:"Billed to",rows:[{classNamePrefix:"stigg-customer-name",label:"Name",value:(o==null?void 0:o.name)||qn,valueTypographyProps:o!=null&&o.name?{}:{color:"disabled"}},{classNamePrefix:"stigg-customer-email",label:"Email",value:(o==null?void 0:o.email)||qn,valueTypographyProps:o!=null&&o.email?{}:{color:"disabled"}}]},"information-billing-data-billed-to")),o!=null&&o.defaultPaymentMethodId&&o.defaultPaymentMethodLast4Digits&&o.defaultPaymentExpirationMonth&&o.defaultPaymentExpirationYear&&(c.unshift(r.jsx(je,{orientation:"vertical",style:{minHeight:93,display:t?"block":"none"}},"information-billing-data-divider")),c.unshift(r.jsx(Hn,{title:"Payment method",rows:[{classNamePrefix:"stigg-credit-card",label:"Card",value:`Ending in ${o.defaultPaymentMethodLast4Digits}`},{classNamePrefix:"stigg-credit-card-expiration",label:"Expires",value:`${K.padStart(o.defaultPaymentExpirationMonth.toString(),2,"0")}/${o.defaultPaymentExpirationYear}`}]},"information-billing-data-payment-method")))),!s&&!(o!=null&&o.name)&&!(o!=null&&o.email)&&!(o!=null&&o.defaultPaymentMethodId))return null;const l=s?r.jsx(qi,{}):e!=null&&e.billingPortalUrl?r.jsx(Hi,{url:e.billingPortalUrl,text:i.editPaymentDetails,className:"stigg-edit-payment-details-button"}):null;return r.jsxs(Xe,{className:"stigg-payment-details-section-layout",$backgroundColor:a.backgroundColor,$borderColor:a.borderColor,children:[r.jsxs(Ke,{className:"stigg-payment-details-section-header",children:[r.jsx(Qe,{isLoading:s,className:"stigg-payment-details-section-title",title:"Payment details"}),l]}),r.jsx("div",{style:{display:"flex",alignItems:"stretch",gap:t?64:32,flexWrap:"wrap"},children:c})]})}const Rc=p(Xe)`
600
+ `;function nr({title:e,rows:n}){return o.jsxs(Rn,{children:[o.jsx(C,{variant:"h6",color:"secondary",bold:!0,children:e}),n.map(({classNamePrefix:i,label:r,value:t,labelTypographyProps:a,valueTypographyProps:s})=>o.jsxs(yd,{children:[o.jsx(C,_(I({className:`${i}-label`,variant:"body1",color:"secondary",style:{width:80}},a),{children:r})),o.jsx(C,_(I({className:`${i}-text`,variant:"body1",color:"secondary"},s),{children:t}))]},r))]})}function ha(){return o.jsx(H,{width:220,height:42})}const ir="-";function ya(){const{customerPortal:e,isLoading:n,textOverrides:i,theme:r}=ve(),t=Ge("md"),{billingInformation:a}=e||{},s=!a||n,c=[];if(s?c.push(o.jsxs(Rn,{children:[o.jsx(H,{width:220,height:12}),o.jsx(H,{width:220,height:12}),o.jsx(H,{width:220,height:12})]},"information-loading-data-top"),o.jsx(We,{orientation:"vertical",style:{minHeight:93,display:t?"block":"none"}},"information-loading-data-divider"),o.jsxs(Rn,{children:[o.jsx(H,{width:220,height:12}),o.jsx(H,{width:220,height:12}),o.jsx(H,{width:220,height:12})]},"information-loading-data-bottom")):(c.push(o.jsx(nr,{title:"Billed to",rows:[{classNamePrefix:"stigg-customer-name",label:"Name",value:(a==null?void 0:a.name)||ir,valueTypographyProps:a!=null&&a.name?{}:{color:"disabled"}},{classNamePrefix:"stigg-customer-email",label:"Email",value:(a==null?void 0:a.email)||ir,valueTypographyProps:a!=null&&a.email?{}:{color:"disabled"}}]},"information-billing-data-billed-to")),a!=null&&a.defaultPaymentMethodId&&a.defaultPaymentMethodLast4Digits&&a.defaultPaymentExpirationMonth&&a.defaultPaymentExpirationYear&&(c.unshift(o.jsx(We,{orientation:"vertical",style:{minHeight:93,display:t?"block":"none"}},"information-billing-data-divider")),c.unshift(o.jsx(nr,{title:"Payment method",rows:[{classNamePrefix:"stigg-credit-card",label:"Card",value:`Ending in ${a.defaultPaymentMethodLast4Digits}`},{classNamePrefix:"stigg-credit-card-expiration",label:"Expires",value:`${ee.padStart(a.defaultPaymentExpirationMonth.toString(),2,"0")}/${a.defaultPaymentExpirationYear}`}]},"information-billing-data-payment-method")))),!s&&!(a!=null&&a.name)&&!(a!=null&&a.email)&&!(a!=null&&a.defaultPaymentMethodId))return null;const l=s?o.jsx(ha,{}):e!=null&&e.billingPortalUrl?o.jsx(fa,{url:e.billingPortalUrl,text:i.editPaymentDetails,className:"stigg-edit-payment-details-button"}):null;return o.jsxs(bt,{className:"stigg-payment-details-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor,children:[o.jsxs(yt,{className:"stigg-payment-details-section-header",children:[o.jsx(Ct,{isLoading:s,className:"stigg-payment-details-section-title",title:"Payment details"}),l]}),o.jsx("div",{style:{display:"flex",alignItems:"stretch",gap:t?64:32,flexWrap:"wrap"},children:c})]})}const Cd=h(bt)`
587
601
  position: relative;
588
602
 
589
603
  .stigg-paywall-layout {
@@ -605,10 +619,10 @@
605
619
  margin-right: auto;
606
620
  }
607
621
 
608
- .${Fi} {
622
+ .${ia} {
609
623
  display: none;
610
624
  }
611
- `,Yi=D.forwardRef(({paywallComponent:e,theme:n,title:i,isLoading:a},t)=>e?r.jsxs(Rc,{className:"stigg-customer-portal-paywall-section",ref:t,$backgroundColor:n.backgroundColor,$borderColor:n.borderColor,children:[r.jsx(Ke,{className:"stigg-customer-portal-paywall-header",children:r.jsx(Qe,{isLoading:a,className:"stigg-customer-portal-paywall-section-title",title:i})}),e]}):null);Yi.displayName="CustomerPortalPaywall";const Lc=p.div`
625
+ `,Ca=D.forwardRef(({paywallComponent:e,theme:n,title:i,isLoading:r},t)=>e?o.jsxs(Cd,{className:"stigg-customer-portal-paywall-section",ref:t,$backgroundColor:n.backgroundColor,$borderColor:n.borderColor,children:[o.jsx(yt,{className:"stigg-customer-portal-paywall-header",children:o.jsx(Ct,{isLoading:r,className:"stigg-customer-portal-paywall-section-title",title:i})}),e]}):null);Ca.displayName="CustomerPortalPaywall";const bd=h.div`
612
626
  width: 100%;
613
627
  display: flex;
614
628
  flex-direction: column;
@@ -617,13 +631,13 @@
617
631
  & * {
618
632
  box-sizing: border-box;
619
633
  }
620
- `,Bc=p.div`
634
+ `,Ed=h.div`
621
635
  width: 100%;
622
636
  display: flex;
623
637
  flex-direction: column;
624
638
  align-items: center;
625
639
  row-gap: 24px;
626
- `;function cn(e,n,i){if(!n&&!i)return e;const a=Nt(e);return a===Nt(n||"")||a===Nt(i||"")?e:`${e} (${i})`}function Oc(e){return cn(e.displayName,e.featureUnits,e.featureUnitsPlural)}const $c=p.div`
640
+ `;function ei(e,n,i){if(!n&&!i)return e;const r=dn(e);return r===dn(n||"")||r===dn(i||"")?e:`${e} (${i})`}function Pd(e){return ei(e.displayName,e.featureUnits,e.featureUnitsPlural)}const Sd=h.div`
627
641
  display: flex;
628
642
  flex-direction: column;
629
643
  padding: 24px;
@@ -633,15 +647,15 @@
633
647
  height: 100%;
634
648
 
635
649
  ${({theme:e,$highlight:n})=>n&&`background-color: ${e.stigg.palette.backgroundSection}`};
636
- `;function _c({entitlement:e,subscriptionPrice:n,onManageSubscription:i,onBuyMore:a,hasCustomSubscription:t,canUpgradeSubscription:o}){var l,u,d;const{theme:s}=fe(),c=!e.hasUnlimitedUsage&&e.currentUsage>e.usageLimit;return e.feature?r.jsxs($c,{$highlight:!!n,$borderColor:s.borderColor,children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16},children:[r.jsx(We,{variant:"body1",children:e.feature&&Oc(e.feature)}),n&&r.jsx(on,{title:r.jsx(y,{variant:"body1",children:n.billingModel===P.BillingModel.PerUnit?"Billed for committed usage":"Billed for actual usage"}),children:r.jsx(ce,{icon:"DollarCoin",svgStrokeColor:s.iconsColor})})]}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:[r.jsxs(We,{variant:"body1",color:c?"error":"primary","data-testid":`usage-data-${(l=e.feature)==null?void 0:l.refId}`,children:[(u=e.currentUsage)==null?void 0:u.toLocaleString(),!e.hasUnlimitedUsage&&` / ${(d=e.usageLimit)==null?void 0:d.toLocaleString()} (${sn(e.currentUsage||0,e.usageLimit)}%)`]}),r.jsx(Gi,{entitlement:e,feature:e.feature,onBuyMore:a,canBuyMore:!!n,onManageSubscription:i,canUpgradeSubscription:o,hasCustomSubscription:t})]}),r.jsx(_i,{entitlement:e}),!e.hasUnlimitedUsage&&!Fn(e.usageLimit)&&!Fn(e.currentUsage)&&e.resetPeriod&&e.usagePeriodEnd?r.jsx(y,{color:"secondary",children:Ic(e)}):null,e.hasUnlimitedUsage&&r.jsx(y,{color:"secondary",children:"In current billing period"})]}):null}const Gc=p.div`
650
+ `;function Dd({entitlement:e,subscriptionPrice:n,onManageSubscription:i,onBuyMore:r,hasCustomSubscription:t,canUpgradeSubscription:a}){var l,u,d;const{theme:s}=ve(),c=!e.hasUnlimitedUsage&&e.currentUsage>e.usageLimit;return e.feature?o.jsxs(Sd,{$highlight:!!n,$borderColor:s.borderColor,children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16},children:[o.jsx(mt,{variant:"body1",children:e.feature&&Pd(e.feature)}),n&&o.jsx(Xn,{title:o.jsx(C,{variant:"body1",children:n.billingModel===b.BillingModel.PerUnit?"Billed for committed usage":"Billed for actual usage"}),children:o.jsx(fe,{icon:"DollarCoin",svgStrokeColor:s.iconsColor})})]}),o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:[o.jsxs(mt,{variant:"body1",color:c?"error":"primary","data-testid":`usage-data-${(l=e.feature)==null?void 0:l.refId}`,children:[(u=e.currentUsage)==null?void 0:u.toLocaleString(),!e.hasUnlimitedUsage&&` / ${(d=e.usageLimit)==null?void 0:d.toLocaleString()} (${Jn(e.currentUsage||0,e.usageLimit)}%)`]}),o.jsx(ga,{entitlement:e,feature:e.feature,onBuyMore:r,canBuyMore:!!n,onManageSubscription:i,canUpgradeSubscription:a,hasCustomSubscription:t})]}),o.jsx(ma,{entitlement:e}),!e.hasUnlimitedUsage&&!xi(e.usageLimit)&&!xi(e.currentUsage)&&e.resetPeriod&&e.usagePeriodEnd?o.jsx(C,{color:"secondary",children:cd(e)}):null,e.hasUnlimitedUsage&&o.jsx(C,{color:"secondary",children:"In current billing period"})]}):null}const vd=h.div`
637
651
  margin-top: 32px;
638
- `;function Vc(){const e=Ne("md");return r.jsx(j,{container:!0,spacing:4,className:"stigg-subscription-usage-skeleton-layout",sx:{flexWrap:"wrap"},children:K.range(6).map(n=>r.jsx(j,{item:!0,xs:e?4:12,children:r.jsx(V,{width:280,height:120})},n))})}const Wn=6;function Zi({onManageSubscription:e,onBuyMore:n,filterEntitlements:i}){var $,w;const[a,t]=D.useState(!1),o=Ne("md"),{customerPortal:s,isLoading:c,textOverrides:l,theme:u}=fe(),d=c||!s,{entitlements:h,subscriptions:m}=s||{},f=h==null?void 0:h.filter(R=>{var W,J;return((W=R.feature)==null?void 0:W.meterType)===P.MeterType.Fluctuating||((J=R.feature)==null?void 0:J.meterType)===P.MeterType.Incremental}),g=m==null?void 0:m.find(({status:R})=>R===P.SubscriptionStatus.Active),x=(g==null?void 0:g.pricingType)===P.PricingType.Custom,b=!!(s!=null&&s.canUpgradeSubscription),E=K.keyBy(($=g==null?void 0:g.prices)!=null?$:[],"feature.refId"),I=K.keyBy(f!=null?f:[],"feature.refId"),N=K.compact(((w=g==null?void 0:g.prices)!=null?w:[]).map(R=>R.feature&&I[R.feature.refId]||void 0)),A=K.compact((f!=null?f:[]).filter(R=>!E[R.feature.refId])),F=[...N,...A].filter(R=>R.usageLimit!==0),v=i?i(F):F,U=o?v.length>2?4:6:12,k=a?v:v.slice(0,Wn),L=()=>t(R=>!R);return!d&&!(f!=null&&f.length)?null:r.jsxs(Xe,{className:"stigg-subscription-usage-layout",$backgroundColor:u.backgroundColor,$borderColor:u.borderColor,children:[r.jsx(Ke,{children:r.jsx(Qe,{title:l.usageTabTitle,className:"stigg-customer-portal-usage-section-title",isLoading:d})}),d?r.jsx(Vc,{}):r.jsxs(r.Fragment,{children:[r.jsx(j,{container:!0,spacing:4,children:k.map(R=>r.jsx(j,{className:`stigg-entitlement-usage-${R.feature.refId}`,item:!0,xs:U,children:r.jsx(_c,{subscriptionPrice:E[R.feature.refId],entitlement:R,onManageSubscription:e,onBuyMore:n,hasCustomSubscription:x,canUpgradeSubscription:b},R.feature.refId)},R.feature.refId))}),v.length>Wn&&r.jsx(Gc,{children:r.jsx(Et,{className:"stigg-usage-toggle-many-button",variant:"text",startIcon:a?r.jsx(Te.Minus,{}):r.jsx(Te.Plus,{}),onClick:L,children:a?"Show less":"Show more"})})]})]})}function Hc({onManageSubscription:e,onBuyMore:n,onCancelScheduledUpdates:i,onContactSupport:a,paywallComponent:t,hiddenSections:o,filterEntitlements:s}){const{stigg:c}=G(),{customerPortal:l,textOverrides:u,theme:d,isLoading:h}=fe(),m=D.useRef(null),f=({intentionType:E})=>{var I,N;e?e({intentionType:E,customerSubscriptions:(I=l==null?void 0:l.subscriptions)!=null?I:[]}):(N=m==null?void 0:m.current)==null||N.scrollIntoView({behavior:"smooth"})},g=!(o!=null&&o.some(E=>E==="usage")),x=!(o!=null&&o.some(E=>E==="paymentDetails"||E==="billingInformation")),b=!(o!=null&&o.some(E=>E==="invoices"||E==="billingInformation"));return r.jsxs(Lc,{className:"stigg-customer-portal-layout",children:[r.jsx(Fc,{showWatermark:c.isWidgetWatermarkEnabled&&!!l}),r.jsxs(Bc,{className:"stigg-customer-portal-sections",children:[r.jsx(Vi,{onCancelScheduledUpdates:i,onBuyMore:n,onManageSubscription:f,onContactSupport:a,hiddenSections:o,cancelScheduledUpdatesButtonTitle:u.cancelScheduledUpdatesButtonTitle}),g&&r.jsx(Zi,{onManageSubscription:f,onBuyMore:n,filterEntitlements:s}),r.jsx(Yi,{ref:m,paywallComponent:t,theme:d,title:u.paywallSectionTitle,isLoading:!l||h}),x&&r.jsx(Wi,{}),b&&r.jsx(zi,{})]})]})}function qc(o){var s=o,{textOverrides:e,theme:n,resourceId:i,productId:a}=s,t=ie(s,["textOverrides","theme","resourceId","productId"]);return r.jsx(Mi,{textOverrides:e,theme:n,resourceId:i,productId:a,children:r.jsx(Hc,T({},t))})}function zi(){const{customerPortal:e,isLoading:n,textOverrides:i,theme:a}=fe(),t=!e||n,o=t?r.jsx(qi,{}):e!=null&&e.billingPortalUrl?r.jsx(Hi,{url:e.billingPortalUrl,text:i.viewInvoiceHistory,className:"stigg-view-invoice-history-button"}):null;return!t&&!(e!=null&&e.billingPortalUrl)?null:r.jsx(Xe,{className:"stigg-invoices-section-layout",$backgroundColor:a.backgroundColor,$borderColor:a.borderColor,children:r.jsxs(Ke,{className:"stigg-invoices-section-header",children:[r.jsx(Qe,{isLoading:t,className:"stigg-invoices-section-title",title:i.invoicesTitle}),o]})})}const Wc=e=>ft(e,"displayName"),Ki=e=>ft(e,"addon.displayName");function Yc(e,n){return e.pricePoints.some(i=>i.billingPeriod===n)}function Qi({addon:e,currency:n,billingCountryCode:i}){return O(T({},e),{pricePoints:e.pricePoints.filter(a=>a.currency===n&&(i?a.billingCountryCode===i:!0))})}function Zc({addons:e,billingCountryCode:n,currency:i}){var a;return((a=e==null?void 0:e.filter(t=>{var o;return!((o=t.hiddenFromWidgets)!=null&&o.includes(P.WidgetType.Checkout))}))==null?void 0:a.map(t=>Qi({addon:t,currency:i,billingCountryCode:n})))||[]}function zc({addons:e,billingPeriod:n,billingCountryCode:i,currency:a}){var t;return((t=e==null?void 0:e.filter(o=>Yc(o.addon,n)))==null?void 0:t.map(o=>O(T({},o),{addon:Qi({addon:o.addon,currency:a,billingCountryCode:i})})))||[]}function Kc({activeSubscription:e,plan:n,billingCountryCode:i}){var c,l;let a=[];const t=((l=(c=n==null?void 0:n.pricePoints)==null?void 0:c[0])==null?void 0:l.currency)||P.Currency.Usd,o=Wc(Zc({addons:n==null?void 0:n.compatibleAddons,billingCountryCode:i,currency:t})),s=zc({addons:e==null?void 0:e.addons,billingCountryCode:i,currency:t});return s!=null&&s.length&&(o!=null&&o.length)&&(a=Ki(s.filter(u=>o.some(d=>d.id===u.addon.id)))),{addons:a,initialAddons:mr(a),availableAddons:o}}function Qc(){const[,e]=H();return(n,i)=>e(a=>{const t=a.addonsStep.addons.find(o=>o.addon.id===n.id);t?t.quantity=i:(a.addonsStep.addons.push({addon:n,quantity:i}),a.addonsStep.addons=Ki(a.addonsStep.addons))})}function Xc(){const[,e]=H();return n=>e(i=>{gr(i.addonsStep.addons,a=>a.addon.id===n)})}function Jc(){const[{addonsStep:e}]=H();return e}function el(){const e=Jc();return O(T({},e),{setAddon:Qc(),removeAddon:Xc()})}function tl(){const[{checkout:e,widgetState:n,checkoutLocalization:i,checkoutSuccess:a}]=H();return{checkoutState:e,widgetState:n,checkoutLocalization:i,checkoutSuccess:a}}function nl(){const[,e]=H();return n=>e(i=>{i.widgetState.readOnly=n})}function il(){const[,e]=H();return n=>e(i=>{i.widgetState.isValid=n})}function al(){const[,e]=H();return n=>e(i=>{i.checkoutSuccess=n})}function X(){const{checkoutState:e,widgetState:n,checkoutLocalization:i,checkoutSuccess:a}=tl();return{checkoutState:e,widgetState:n,checkoutLocalization:i,checkoutSuccess:a,setWidgetReadOnly:nl(),setIsValid:il(),setCheckoutSuccess:al()}}function rl({planId:e,resourceId:n,billingCountryCode:i,onMockCheckoutState:a}){const{stigg:t}=G(),[o,s]=D.useState(!0),[c,l]=D.useState();return D.useEffect(()=>{const u=()=>B(null,null,function*(){try{const d=yield t.getCheckoutState({planId:e,resourceId:n,billingCountryCode:i});l(d)}catch(d){yt.error(`Failed to load checkout ${d==null?void 0:d.message}`,d)}finally{s(!1)}});if(a){s(!1),l(a({planId:e,resourceId:n,billingCountryCode:i}));return}t.isCustomerLoaded&&(s(!0),u())},[t,t.isCustomerLoaded,n,e,i,a]),{checkout:c,isLoading:o,isWidgetWatermarkEnabled:t.isWidgetWatermarkEnabled}}function ol(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var i=function a(){var t=!1;try{t=this instanceof a}catch(o){}return t?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var t=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(i,a,t.get?t:{enumerable:!0,get:function(){return e[a]}})}),i}var Ot={},gt=function(){return gt=Object.assign||function(n){for(var i,a=1,t=arguments.length;a<t;a++){i=arguments[a];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},gt.apply(this,arguments)};function rt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rt=function(i){return typeof i}:rt=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},rt(e)}function sl(e){return rt(e)=="object"&&e!==null}var Xi=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";function zt(e,n){for(var i=/\r\n|[\n\r]/g,a=1,t=n+1,o;(o=i.exec(e.body))&&o.index<n;)a+=1,t=n+1-(o.index+o[0].length);return{line:a,column:t}}function cl(e){return Ji(e.source,zt(e.source,e.start))}function Ji(e,n){var i=e.locationOffset.column-1,a=ot(i)+e.body,t=n.line-1,o=e.locationOffset.line-1,s=n.line+o,c=n.line===1?i:0,l=n.column+c,u="".concat(e.name,":").concat(s,":").concat(l,`
639
- `),d=a.split(/\r\n|[\n\r]/g),h=d[t];if(h.length>120){for(var m=Math.floor(l/80),f=l%80,g=[],x=0;x<h.length;x+=80)g.push(h.slice(x,x+80));return u+Yn([["".concat(s),g[0]]].concat(g.slice(1,m+1).map(function(b){return["",b]}),[[" ",ot(f-1)+"^"],["",g[m+1]]]))}return u+Yn([["".concat(s-1),d[t-1]],["".concat(s),h],["",ot(l-1)+"^"],["".concat(s+1),d[t+1]]])}function Yn(e){var n=e.filter(function(a){var t=a[1];return t!==void 0}),i=Math.max.apply(Math,n.map(function(a){var t=a[0];return t.length}));return n.map(function(a){var t=a[0],o=a[1];return ll(i,t)+(o?" | "+o:" |")}).join(`
640
- `)}function ot(e){return Array(e+1).join(" ")}function ll(e,n){return ot(e-n.length)+n}function st(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?st=function(i){return typeof i}:st=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},st(e)}function Zn(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,a)}return i}function ul(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?Zn(Object(i),!0).forEach(function(a){dl(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Zn(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function dl(e,n,i){return n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function ml(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function gl(e,n){for(var i=0;i<n.length;i++){var a=n[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function pl(e,n,i){return n&&gl(e.prototype,n),e}function fl(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&Ye(e,n)}function hl(e){var n=ta();return function(){var a=Ze(e),t;if(n){var o=Ze(this).constructor;t=Reflect.construct(a,arguments,o)}else t=a.apply(this,arguments);return ea(this,t)}}function ea(e,n){return n&&(st(n)==="object"||typeof n=="function")?n:Ge(e)}function Ge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kt(e){var n=typeof Map=="function"?new Map:void 0;return Kt=function(a){if(a===null||!yl(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(a))return n.get(a);n.set(a,t)}function t(){return ct(a,arguments,Ze(this).constructor)}return t.prototype=Object.create(a.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Ye(t,a)},Kt(e)}function ct(e,n,i){return ta()?ct=Reflect.construct:ct=function(t,o,s){var c=[null];c.push.apply(c,o);var l=Function.bind.apply(t,c),u=new l;return s&&Ye(u,s.prototype),u},ct.apply(null,arguments)}function ta(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function yl(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Ye(e,n){return Ye=Object.setPrototypeOf||function(a,t){return a.__proto__=t,a},Ye(e,n)}function Ze(e){return Ze=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},Ze(e)}var Cl=(function(e){fl(i,e);var n=hl(i);function i(a,t,o,s,c,l,u){var d,h,m,f;ml(this,i),f=n.call(this,a),f.name="GraphQLError",f.originalError=l!=null?l:void 0,f.nodes=zn(Array.isArray(t)?t:t?[t]:void 0);for(var g=[],x=0,b=(E=f.nodes)!==null&&E!==void 0?E:[];x<b.length;x++){var E,I=b[x],N=I.loc;N!=null&&g.push(N)}g=zn(g),f.source=o!=null?o:(d=g)===null||d===void 0?void 0:d[0].source,f.positions=s!=null?s:(h=g)===null||h===void 0?void 0:h.map(function(F){return F.start}),f.locations=s&&o?s.map(function(F){return zt(o,F)}):(m=g)===null||m===void 0?void 0:m.map(function(F){return zt(F.source,F.start)}),f.path=c!=null?c:void 0;var A=l==null?void 0:l.extensions;return u==null&&sl(A)?f.extensions=ul({},A):f.extensions=u!=null?u:{},Object.defineProperties(Ge(f),{message:{enumerable:!0},locations:{enumerable:f.locations!=null},path:{enumerable:f.path!=null},extensions:{enumerable:f.extensions!=null&&Object.keys(f.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?(Object.defineProperty(Ge(f),"stack",{value:l.stack,writable:!0,configurable:!0}),ea(f)):(Error.captureStackTrace?Error.captureStackTrace(Ge(f),i):Object.defineProperty(Ge(f),"stack",{value:Error().stack,writable:!0,configurable:!0}),f)}return pl(i,[{key:"toString",value:function(){return Pl(this)}},{key:Xi,get:function(){return"Object"}}]),i})(Kt(Error));function zn(e){return e===void 0||e.length===0?void 0:e}function Pl(e){var n=e.message;if(e.nodes)for(var i=0,a=e.nodes;i<a.length;i++){var t=a[i];t.loc&&(n+=`
652
+ `;function xd(){const e=Ge("md");return o.jsx(R,{container:!0,spacing:4,className:"stigg-subscription-usage-skeleton-layout",sx:{flexWrap:"wrap"},children:ee.range(6).map(n=>o.jsx(R,{item:!0,xs:e?4:12,children:o.jsx(H,{width:280,height:120})},n))})}const rr=6;function ba({onManageSubscription:e,onBuyMore:n,filterEntitlements:i}){var L,j;const[r,t]=D.useState(!1),a=Ge("md"),{customerPortal:s,isLoading:c,textOverrides:l,theme:u}=ve(),d=c||!s,{entitlements:p,subscriptions:m}=s||{},f=p==null?void 0:p.filter(O=>{var z,X;return((z=O.feature)==null?void 0:z.meterType)===b.MeterType.Fluctuating||((X=O.feature)==null?void 0:X.meterType)===b.MeterType.Incremental}),g=m==null?void 0:m.find(({status:O})=>O===b.SubscriptionStatus.Active),y=(g==null?void 0:g.pricingType)===b.PricingType.Custom,P=!!(s!=null&&s.canUpgradeSubscription),S=ee.keyBy((L=g==null?void 0:g.prices)!=null?L:[],"feature.refId"),v=ee.keyBy(f!=null?f:[],"feature.refId"),A=ee.compact(((j=g==null?void 0:g.prices)!=null?j:[]).map(O=>O.feature&&v[O.feature.refId]||void 0)),k=ee.compact((f!=null?f:[]).filter(O=>!S[O.feature.refId])),w=[...A,...k].filter(O=>O.usageLimit!==0),T=i?i(w):w,N=a?T.length>2?4:6:12,F=r?T:T.slice(0,rr),U=()=>t(O=>!O);return!d&&!(f!=null&&f.length)?null:o.jsxs(bt,{className:"stigg-subscription-usage-layout",$backgroundColor:u.backgroundColor,$borderColor:u.borderColor,children:[o.jsx(yt,{children:o.jsx(Ct,{title:l.usageTabTitle,className:"stigg-customer-portal-usage-section-title",isLoading:d})}),d?o.jsx(xd,{}):o.jsxs(o.Fragment,{children:[o.jsx(R,{container:!0,spacing:4,children:F.map(O=>o.jsx(R,{className:`stigg-entitlement-usage-${O.feature.refId}`,item:!0,xs:N,children:o.jsx(Dd,{subscriptionPrice:S[O.feature.refId],entitlement:O,onManageSubscription:e,onBuyMore:n,hasCustomSubscription:y,canUpgradeSubscription:P},O.feature.refId)},O.feature.refId))}),T.length>rr&&o.jsx(vd,{children:o.jsx(tn,{className:"stigg-usage-toggle-many-button",variant:"text",startIcon:r?o.jsx(Oe.Minus,{}):o.jsx(Oe.Plus,{}),onClick:U,children:r?"Show less":"Show more"})})]})]})}function Id({onManageSubscription:e,onBuyMore:n,onCancelScheduledUpdates:i,onContactSupport:r,paywallComponent:t,hiddenSections:a,filterEntitlements:s}){const{customerPortal:c,textOverrides:l,theme:u,isLoading:d,showWatermark:p}=ve(),m=D.useRef(null),f=({intentionType:S})=>{var v,A;e?e({intentionType:S,customerSubscriptions:(v=c==null?void 0:c.subscriptions)!=null?v:[]}):(A=m==null?void 0:m.current)==null||A.scrollIntoView({behavior:"smooth"})},g=!(a!=null&&a.some(S=>S==="usage")),y=!(a!=null&&a.some(S=>S==="paymentDetails"||S==="billingInformation")),P=!(a!=null&&a.some(S=>S==="invoices"||S==="billingInformation"));return o.jsxs(bd,{className:"stigg-customer-portal-layout",children:[o.jsx(pd,{showWatermark:p}),o.jsxs(Ed,{className:"stigg-customer-portal-sections",children:[o.jsx(pa,{onCancelScheduledUpdates:i,onBuyMore:n,onManageSubscription:f,onContactSupport:r,hiddenSections:a,cancelScheduledUpdatesButtonTitle:l.cancelScheduledUpdatesButtonTitle}),g&&o.jsx(ba,{onManageSubscription:f,onBuyMore:n,filterEntitlements:s}),o.jsx(Ca,{ref:m,paywallComponent:t,theme:u,title:l.paywallSectionTitle,isLoading:!c||d}),y&&o.jsx(ya,{}),P&&o.jsx(Ea,{})]})]})}function Td(a){var s=a,{textOverrides:e,theme:n,resourceId:i,productId:r}=s,t=se(s,["textOverrides","theme","resourceId","productId"]);return o.jsx(oa,{textOverrides:e,theme:n,resourceId:i,productId:r,children:o.jsx(Id,I({},t))})}function Ea(){const{customerPortal:e,isLoading:n,textOverrides:i,theme:r}=ve(),t=!e||n,a=t?o.jsx(ha,{}):e!=null&&e.billingPortalUrl?o.jsx(fa,{url:e.billingPortalUrl,text:i.viewInvoiceHistory,className:"stigg-view-invoice-history-button"}):null;return!t&&!(e!=null&&e.billingPortalUrl)?null:o.jsx(bt,{className:"stigg-invoices-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor,children:o.jsxs(yt,{className:"stigg-invoices-section-header",children:[o.jsx(Ct,{isLoading:t,className:"stigg-invoices-section-title",title:i.invoicesTitle}),a]})})}const Ad=e=>Gt(e,"displayName"),Pa=e=>Gt(e,"addon.displayName");function kd(e,n){return e.pricePoints.some(i=>i.billingPeriod===n)}function Sa({addon:e,currency:n,billingCountryCode:i}){return _(I({},e),{pricePoints:e.pricePoints.filter(r=>r.currency===n&&(i?r.billingCountryCode===i:!0))})}function Nd({addons:e,billingCountryCode:n,currency:i}){var r;return((r=e==null?void 0:e.filter(t=>{var a;return!((a=t.hiddenFromWidgets)!=null&&a.includes(b.WidgetType.Checkout))}))==null?void 0:r.map(t=>Sa({addon:t,currency:i,billingCountryCode:n})))||[]}function wd({addons:e,billingPeriod:n,billingCountryCode:i,currency:r}){var t;return((t=e==null?void 0:e.filter(a=>kd(a.addon,n)))==null?void 0:t.map(a=>_(I({},a),{addon:Sa({addon:a.addon,currency:r,billingCountryCode:i})})))||[]}function Fd({activeSubscription:e,plan:n,billingCountryCode:i}){var c,l;let r=[];const t=((l=(c=n==null?void 0:n.pricePoints)==null?void 0:c[0])==null?void 0:l.currency)||b.Currency.Usd,a=Ad(Nd({addons:n==null?void 0:n.compatibleAddons,billingCountryCode:i,currency:t})),s=wd({addons:e==null?void 0:e.addons,billingCountryCode:i,currency:t});return s!=null&&s.length&&(a!=null&&a.length)&&(r=Pa(s.filter(u=>a.some(d=>d.id===u.addon.id)))),{addons:r,initialAddons:Lo(r),availableAddons:a}}function jd(){const[,e]=W();return(n,i)=>e(r=>{const t=r.addonsStep.addons.find(a=>a.addon.id===n.id);t?t.quantity=i:(r.addonsStep.addons.push({addon:n,quantity:i}),r.addonsStep.addons=Pa(r.addonsStep.addons))})}function Rd(){const[,e]=W();return n=>e(i=>{Bo(i.addonsStep.addons,r=>r.addon.id===n)})}function Md(){const[{addonsStep:e}]=W();return e}function Ud(){const e=Md();return _(I({},e),{setAddon:jd(),removeAddon:Rd()})}function Od(){const[{checkout:e,widgetState:n,checkoutLocalization:i,checkoutSuccess:r}]=W();return{checkoutState:e,widgetState:n,checkoutLocalization:i,checkoutSuccess:r}}function Ld(){const[,e]=W();return n=>e(i=>{i.widgetState.readOnly=n})}function Bd(){const[,e]=W();return n=>e(i=>{i.widgetState.isValid=n})}function _d(){const[,e]=W();return n=>e(i=>{i.checkoutSuccess=n})}function ne(){const{checkoutState:e,widgetState:n,checkoutLocalization:i,checkoutSuccess:r}=Od();return{checkoutState:e,widgetState:n,checkoutLocalization:i,checkoutSuccess:r,setWidgetReadOnly:Ld(),setIsValid:Bd(),setCheckoutSuccess:_d()}}function $d({planId:e,resourceId:n,billingCountryCode:i,onMockCheckoutState:r}){const{stigg:t}=q(),[a,s]=D.useState(!0),[c,l]=D.useState();return D.useEffect(()=>{const u=()=>B(null,null,function*(){try{const d=yield t.getCheckoutState({planId:e,resourceId:n,billingCountryCode:i});l(d)}catch(d){Qt.error(`Failed to load checkout ${d==null?void 0:d.message}`,d)}finally{s(!1)}});if(r){s(!1),l(r({planId:e,resourceId:n,billingCountryCode:i}));return}t.isCustomerLoaded&&(s(!0),u())},[t,t.isCustomerLoaded,n,e,i,r]),{checkout:c,isLoading:a,showWatermark:t.getShowWatermark()}}var Pn={},_t=function(){return _t=Object.assign||function(n){for(var i,r=1,t=arguments.length;r<t;r++){i=arguments[r];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])}return n},_t.apply(this,arguments)};function Nt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nt=function(i){return typeof i}:Nt=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Nt(e)}function Gd(e){return Nt(e)=="object"&&e!==null}var Da=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";function Mn(e,n){for(var i=/\r\n|[\n\r]/g,r=1,t=n+1,a;(a=i.exec(e.body))&&a.index<n;)r+=1,t=n+1-(a.index+a[0].length);return{line:r,column:t}}function Vd(e){return va(e.source,Mn(e.source,e.start))}function va(e,n){var i=e.locationOffset.column-1,r=wt(i)+e.body,t=n.line-1,a=e.locationOffset.line-1,s=n.line+a,c=n.line===1?i:0,l=n.column+c,u="".concat(e.name,":").concat(s,":").concat(l,`
653
+ `),d=r.split(/\r\n|[\n\r]/g),p=d[t];if(p.length>120){for(var m=Math.floor(l/80),f=l%80,g=[],y=0;y<p.length;y+=80)g.push(p.slice(y,y+80));return u+ar([["".concat(s),g[0]]].concat(g.slice(1,m+1).map(function(P){return["",P]}),[[" ",wt(f-1)+"^"],["",g[m+1]]]))}return u+ar([["".concat(s-1),d[t-1]],["".concat(s),p],["",wt(l-1)+"^"],["".concat(s+1),d[t+1]]])}function ar(e){var n=e.filter(function(r){var t=r[1];return t!==void 0}),i=Math.max.apply(Math,n.map(function(r){var t=r[0];return t.length}));return n.map(function(r){var t=r[0],a=r[1];return Hd(i,t)+(a?" | "+a:" |")}).join(`
654
+ `)}function wt(e){return Array(e+1).join(" ")}function Hd(e,n){return wt(e-n.length)+n}function Ft(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ft=function(i){return typeof i}:Ft=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ft(e)}function or(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,r)}return i}function qd(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?or(Object(i),!0).forEach(function(r){Wd(e,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):or(Object(i)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(i,r))})}return e}function Wd(e,n,i){return n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Yd(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Zd(e,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zd(e,n,i){return n&&Zd(e.prototype,n),e}function Kd(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&gt(e,n)}function Qd(e){var n=Ia();return function(){var r=pt(e),t;if(n){var a=pt(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return xa(this,t)}}function xa(e,n){return n&&(Ft(n)==="object"||typeof n=="function")?n:at(e)}function at(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Un(e){var n=typeof Map=="function"?new Map:void 0;return Un=function(r){if(r===null||!Xd(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(r))return n.get(r);n.set(r,t)}function t(){return jt(r,arguments,pt(this).constructor)}return t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),gt(t,r)},Un(e)}function jt(e,n,i){return Ia()?jt=Reflect.construct:jt=function(t,a,s){var c=[null];c.push.apply(c,a);var l=Function.bind.apply(t,c),u=new l;return s&&gt(u,s.prototype),u},jt.apply(null,arguments)}function Ia(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function Xd(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function gt(e,n){return gt=Object.setPrototypeOf||function(r,t){return r.__proto__=t,r},gt(e,n)}function pt(e){return pt=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},pt(e)}var Jd=(function(e){Kd(i,e);var n=Qd(i);function i(r,t,a,s,c,l,u){var d,p,m,f;Yd(this,i),f=n.call(this,r),f.name="GraphQLError",f.originalError=l!=null?l:void 0,f.nodes=sr(Array.isArray(t)?t:t?[t]:void 0);for(var g=[],y=0,P=(S=f.nodes)!==null&&S!==void 0?S:[];y<P.length;y++){var S,v=P[y],A=v.loc;A!=null&&g.push(A)}g=sr(g),f.source=a!=null?a:(d=g)===null||d===void 0?void 0:d[0].source,f.positions=s!=null?s:(p=g)===null||p===void 0?void 0:p.map(function(w){return w.start}),f.locations=s&&a?s.map(function(w){return Mn(a,w)}):(m=g)===null||m===void 0?void 0:m.map(function(w){return Mn(w.source,w.start)}),f.path=c!=null?c:void 0;var k=l==null?void 0:l.extensions;return u==null&&Gd(k)?f.extensions=qd({},k):f.extensions=u!=null?u:{},Object.defineProperties(at(f),{message:{enumerable:!0},locations:{enumerable:f.locations!=null},path:{enumerable:f.path!=null},extensions:{enumerable:f.extensions!=null&&Object.keys(f.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?(Object.defineProperty(at(f),"stack",{value:l.stack,writable:!0,configurable:!0}),xa(f)):(Error.captureStackTrace?Error.captureStackTrace(at(f),i):Object.defineProperty(at(f),"stack",{value:Error().stack,writable:!0,configurable:!0}),f)}return zd(i,[{key:"toString",value:function(){return em(this)}},{key:Da,get:function(){return"Object"}}]),i})(Un(Error));function sr(e){return e===void 0||e.length===0?void 0:e}function em(e){var n=e.message;if(e.nodes)for(var i=0,r=e.nodes;i<r.length;i++){var t=r[i];t.loc&&(n+=`
641
655
 
642
- `+cl(t.loc))}else if(e.source&&e.locations)for(var o=0,s=e.locations;o<s.length;o++){var c=s[o];n+=`
656
+ `+Vd(t.loc))}else if(e.source&&e.locations)for(var a=0,s=e.locations;a<s.length;a++){var c=s[a];n+=`
643
657
 
644
- `+Ji(e.source,c)}return n}function re(e,n,i){return new Cl("Syntax Error: ".concat(i),void 0,e,[n])}var M=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function bl(e,n){var i=!!e;if(!i)throw new Error("Unexpected invariant triggered.")}var Qt=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0;function na(e){var n=e.prototype.toJSON;typeof n=="function"||bl(0),e.prototype.inspect=n,Qt&&(e.prototype[Qt]=n)}var ia=(function(){function e(i,a,t){this.start=i.start,this.end=a.end,this.startToken=i,this.endToken=a,this.source=t}var n=e.prototype;return n.toJSON=function(){return{start:this.start,end:this.end}},e})();na(ia);var Y=(function(){function e(i,a,t,o,s,c,l){this.kind=i,this.start=a,this.end=t,this.line=o,this.column=s,this.value=l,this.prev=c,this.next=null}var n=e.prototype;return n.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e})();na(Y);var S=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function lt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?lt=function(i){return typeof i}:lt=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},lt(e)}var El=10,aa=2;function ra(e){return Dt(e,[])}function Dt(e,n){switch(lt(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return e===null?"null":Sl(e,n);default:return String(e)}}function Sl(e,n){if(n.indexOf(e)!==-1)return"[Circular]";var i=[].concat(n,[e]),a=Tl(e);if(a!==void 0){var t=a.call(e);if(t!==e)return typeof t=="string"?t:Dt(t,i)}else if(Array.isArray(e))return xl(e,i);return Dl(e,i)}function Dl(e,n){var i=Object.keys(e);if(i.length===0)return"{}";if(n.length>aa)return"["+Il(e)+"]";var a=i.map(function(t){var o=Dt(e[t],n);return t+": "+o});return"{ "+a.join(", ")+" }"}function xl(e,n){if(e.length===0)return"[]";if(n.length>aa)return"[Array]";for(var i=Math.min(El,e.length),a=e.length-i,t=[],o=0;o<i;++o)t.push(Dt(e[o],n));return a===1?t.push("... 1 more item"):a>1&&t.push("... ".concat(a," more items")),"["+t.join(", ")+"]"}function Tl(e){var n=e[String(Qt)];if(typeof n=="function")return n;if(typeof e.inspect=="function")return e.inspect}function Il(e){var n=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(n==="Object"&&typeof e.constructor=="function"){var i=e.constructor.name;if(typeof i=="string"&&i!=="")return i}return n}function $t(e,n){var i=!!e;if(!i)throw new Error(n)}function ut(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ut=function(i){return typeof i}:ut=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ut(e)}const vl=process.env.NODE_ENV==="production"?function(n,i){return n instanceof i}:function(n,i){if(n instanceof i)return!0;if(ut(n)==="object"&&n!==null){var a,t=i.prototype[Symbol.toStringTag],o=Symbol.toStringTag in n?n[Symbol.toStringTag]:(a=n.constructor)===null||a===void 0?void 0:a.name;if(t===o){var s=ra(n);throw new Error("Cannot use ".concat(t,' "').concat(s,`" from another module or realm.
658
+ `+va(e.source,c)}return n}function ue(e,n,i){return new Jd("Syntax Error: ".concat(i),void 0,e,[n])}var M=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function tm(e,n){var i=!!e;if(!i)throw new Error("Unexpected invariant triggered.")}var On=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0;function Ta(e){var n=e.prototype.toJSON;typeof n=="function"||tm(0),e.prototype.inspect=n,On&&(e.prototype[On]=n)}var Aa=(function(){function e(i,r,t){this.start=i.start,this.end=r.end,this.startToken=i,this.endToken=r,this.source=t}var n=e.prototype;return n.toJSON=function(){return{start:this.start,end:this.end}},e})();Ta(Aa);var Z=(function(){function e(i,r,t,a,s,c,l){this.kind=i,this.start=r,this.end=t,this.line=a,this.column=s,this.value=l,this.prev=c,this.next=null}var n=e.prototype;return n.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e})();Ta(Z);var x=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function Rt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rt=function(i){return typeof i}:Rt=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Rt(e)}var nm=10,ka=2;function Na(e){return rn(e,[])}function rn(e,n){switch(Rt(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return e===null?"null":im(e,n);default:return String(e)}}function im(e,n){if(n.indexOf(e)!==-1)return"[Circular]";var i=[].concat(n,[e]),r=om(e);if(r!==void 0){var t=r.call(e);if(t!==e)return typeof t=="string"?t:rn(t,i)}else if(Array.isArray(e))return am(e,i);return rm(e,i)}function rm(e,n){var i=Object.keys(e);if(i.length===0)return"{}";if(n.length>ka)return"["+sm(e)+"]";var r=i.map(function(t){var a=rn(e[t],n);return t+": "+a});return"{ "+r.join(", ")+" }"}function am(e,n){if(e.length===0)return"[]";if(n.length>ka)return"[Array]";for(var i=Math.min(nm,e.length),r=e.length-i,t=[],a=0;a<i;++a)t.push(rn(e[a],n));return r===1?t.push("... 1 more item"):r>1&&t.push("... ".concat(r," more items")),"["+t.join(", ")+"]"}function om(e){var n=e[String(On)];if(typeof n=="function")return n;if(typeof e.inspect=="function")return e.inspect}function sm(e){var n=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(n==="Object"&&typeof e.constructor=="function"){var i=e.constructor.name;if(typeof i=="string"&&i!=="")return i}return n}function Sn(e,n){var i=!!e;if(!i)throw new Error(n)}function Mt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mt=function(i){return typeof i}:Mt=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Mt(e)}const cm=process.env.NODE_ENV==="production"?function(n,i){return n instanceof i}:function(n,i){if(n instanceof i)return!0;if(Mt(n)==="object"&&n!==null){var r,t=i.prototype[Symbol.toStringTag],a=Symbol.toStringTag in n?n[Symbol.toStringTag]:(r=n.constructor)===null||r===void 0?void 0:r.name;if(t===a){var s=Na(n);throw new Error("Cannot use ".concat(t,' "').concat(s,`" from another module or realm.
645
659
 
646
660
  Ensure that there is only one instance of "graphql" in the node_modules
647
661
  directory. If different versions of "graphql" are the dependencies of other
@@ -652,11 +666,11 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
652
666
  Duplicate "graphql" modules cannot be used at the same time since different
653
667
  versions may have different capabilities and behavior. The data from one
654
668
  version used in the function from another could produce confusing and
655
- spurious results.`))}}return!1};function Al(e,n){for(var i=0;i<n.length;i++){var a=n[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function kl(e,n,i){return n&&Al(e.prototype,n),e}var oa=(function(){function e(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof n=="string"||$t(0,"Body must be a string. Received: ".concat(ra(n),".")),this.body=n,this.name=i,this.locationOffset=a,this.locationOffset.line>0||$t(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||$t(0,"column in locationOffset is 1-indexed and must be positive.")}return kl(e,[{key:Xi,get:function(){return"Source"}}]),e})();function Nl(e){return vl(e,oa)}var wl=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function Fl(e){var n=e.split(/\r\n|[\n\r]/g),i=jl(e);if(i!==0)for(var a=1;a<n.length;a++)n[a]=n[a].slice(i);for(var t=0;t<n.length&&Kn(n[t]);)++t;for(var o=n.length;o>t&&Kn(n[o-1]);)--o;return n.slice(t,o).join(`
656
- `)}function Kn(e){for(var n=0;n<e.length;++n)if(e[n]!==" "&&e[n]!==" ")return!1;return!0}function jl(e){for(var n,i=!0,a=!0,t=0,o=null,s=0;s<e.length;++s)switch(e.charCodeAt(s)){case 13:e.charCodeAt(s+1)===10&&++s;case 10:i=!1,a=!0,t=0;break;case 9:case 32:++t;break;default:a&&!i&&(o===null||t<o)&&(o=t),a=!1}return(n=o)!==null&&n!==void 0?n:0}var Ul=(function(){function e(i){var a=new Y(S.SOF,0,0,0,0,null);this.source=i,this.lastToken=a,this.token=a,this.line=1,this.lineStart=0}var n=e.prototype;return n.advance=function(){this.lastToken=this.token;var a=this.token=this.lookahead();return a},n.lookahead=function(){var a=this.token;if(a.kind!==S.EOF)do{var t;a=(t=a.next)!==null&&t!==void 0?t:a.next=Rl(this,a)}while(a.kind===S.COMMENT);return a},e})();function Ml(e){return e===S.BANG||e===S.DOLLAR||e===S.AMP||e===S.PAREN_L||e===S.PAREN_R||e===S.SPREAD||e===S.COLON||e===S.EQUALS||e===S.AT||e===S.BRACKET_L||e===S.BRACKET_R||e===S.BRACE_L||e===S.PIPE||e===S.BRACE_R}function ve(e){return isNaN(e)?S.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function Rl(e,n){for(var i=e.source,a=i.body,t=a.length,o=n.end;o<t;){var s=a.charCodeAt(o),c=e.line,l=1+o-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:a.charCodeAt(o+1)===10?o+=2:++o,++e.line,e.lineStart=o;continue;case 33:return new Y(S.BANG,o,o+1,c,l,n);case 35:return Bl(i,o,c,l,n);case 36:return new Y(S.DOLLAR,o,o+1,c,l,n);case 38:return new Y(S.AMP,o,o+1,c,l,n);case 40:return new Y(S.PAREN_L,o,o+1,c,l,n);case 41:return new Y(S.PAREN_R,o,o+1,c,l,n);case 46:if(a.charCodeAt(o+1)===46&&a.charCodeAt(o+2)===46)return new Y(S.SPREAD,o,o+3,c,l,n);break;case 58:return new Y(S.COLON,o,o+1,c,l,n);case 61:return new Y(S.EQUALS,o,o+1,c,l,n);case 64:return new Y(S.AT,o,o+1,c,l,n);case 91:return new Y(S.BRACKET_L,o,o+1,c,l,n);case 93:return new Y(S.BRACKET_R,o,o+1,c,l,n);case 123:return new Y(S.BRACE_L,o,o+1,c,l,n);case 124:return new Y(S.PIPE,o,o+1,c,l,n);case 125:return new Y(S.BRACE_R,o,o+1,c,l,n);case 34:return a.charCodeAt(o+1)===34&&a.charCodeAt(o+2)===34?_l(i,o,c,l,n,e):$l(i,o,c,l,n);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Ol(i,o,s,c,l,n);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return Vl(i,o,c,l,n)}throw re(i,o,Ll(s))}var u=e.line,d=1+o-e.lineStart;return new Y(S.EOF,t,t,u,d,n)}function Ll(e){return e<32&&e!==9&&e!==10&&e!==13?"Cannot contain the invalid character ".concat(ve(e),"."):e===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:"Cannot parse the unexpected character ".concat(ve(e),".")}function Bl(e,n,i,a,t){var o=e.body,s,c=n;do s=o.charCodeAt(++c);while(!isNaN(s)&&(s>31||s===9));return new Y(S.COMMENT,n,c,i,a,t,o.slice(n+1,c))}function Ol(e,n,i,a,t,o){var s=e.body,c=i,l=n,u=!1;if(c===45&&(c=s.charCodeAt(++l)),c===48){if(c=s.charCodeAt(++l),c>=48&&c<=57)throw re(e,l,"Invalid number, unexpected digit after 0: ".concat(ve(c),"."))}else l=_t(e,l,c),c=s.charCodeAt(l);if(c===46&&(u=!0,c=s.charCodeAt(++l),l=_t(e,l,c),c=s.charCodeAt(l)),(c===69||c===101)&&(u=!0,c=s.charCodeAt(++l),(c===43||c===45)&&(c=s.charCodeAt(++l)),l=_t(e,l,c),c=s.charCodeAt(l)),c===46||Hl(c))throw re(e,l,"Invalid number, expected digit but got: ".concat(ve(c),"."));return new Y(u?S.FLOAT:S.INT,n,l,a,t,o,s.slice(n,l))}function _t(e,n,i){var a=e.body,t=n,o=i;if(o>=48&&o<=57){do o=a.charCodeAt(++t);while(o>=48&&o<=57);return t}throw re(e,t,"Invalid number, expected digit but got: ".concat(ve(o),"."))}function $l(e,n,i,a,t){for(var o=e.body,s=n+1,c=s,l=0,u="";s<o.length&&!isNaN(l=o.charCodeAt(s))&&l!==10&&l!==13;){if(l===34)return u+=o.slice(c,s),new Y(S.STRING,n,s+1,i,a,t,u);if(l<32&&l!==9)throw re(e,s,"Invalid character within String: ".concat(ve(l),"."));if(++s,l===92){switch(u+=o.slice(c,s-1),l=o.charCodeAt(s),l){case 34:u+='"';break;case 47:u+="/";break;case 92:u+="\\";break;case 98:u+="\b";break;case 102:u+="\f";break;case 110:u+=`
657
- `;break;case 114:u+="\r";break;case 116:u+=" ";break;case 117:{var d=Gl(o.charCodeAt(s+1),o.charCodeAt(s+2),o.charCodeAt(s+3),o.charCodeAt(s+4));if(d<0){var h=o.slice(s+1,s+5);throw re(e,s,"Invalid character escape sequence: \\u".concat(h,"."))}u+=String.fromCharCode(d),s+=4;break}default:throw re(e,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(l),"."))}++s,c=s}}throw re(e,s,"Unterminated string.")}function _l(e,n,i,a,t,o){for(var s=e.body,c=n+3,l=c,u=0,d="";c<s.length&&!isNaN(u=s.charCodeAt(c));){if(u===34&&s.charCodeAt(c+1)===34&&s.charCodeAt(c+2)===34)return d+=s.slice(l,c),new Y(S.BLOCK_STRING,n,c+3,i,a,t,Fl(d));if(u<32&&u!==9&&u!==10&&u!==13)throw re(e,c,"Invalid character within String: ".concat(ve(u),"."));u===10?(++c,++o.line,o.lineStart=c):u===13?(s.charCodeAt(c+1)===10?c+=2:++c,++o.line,o.lineStart=c):u===92&&s.charCodeAt(c+1)===34&&s.charCodeAt(c+2)===34&&s.charCodeAt(c+3)===34?(d+=s.slice(l,c)+'"""',c+=4,l=c):++c}throw re(e,c,"Unterminated string.")}function Gl(e,n,i,a){return it(e)<<12|it(n)<<8|it(i)<<4|it(a)}function it(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Vl(e,n,i,a,t){for(var o=e.body,s=o.length,c=n+1,l=0;c!==s&&!isNaN(l=o.charCodeAt(c))&&(l===95||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++c;return new Y(S.NAME,n,c,i,a,t,o.slice(n,c))}function Hl(e){return e===95||e>=65&&e<=90||e>=97&&e<=122}function ql(e,n){var i=new Wl(e,n);return i.parseDocument()}var Wl=(function(){function e(i,a){var t=Nl(i)?i:new oa(i);this._lexer=new Ul(t),this._options=a}var n=e.prototype;return n.parseName=function(){var a=this.expectToken(S.NAME);return{kind:M.NAME,value:a.value,loc:this.loc(a)}},n.parseDocument=function(){var a=this._lexer.token;return{kind:M.DOCUMENT,definitions:this.many(S.SOF,this.parseDefinition,S.EOF),loc:this.loc(a)}},n.parseDefinition=function(){if(this.peek(S.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(S.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},n.parseOperationDefinition=function(){var a=this._lexer.token;if(this.peek(S.BRACE_L))return{kind:M.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(a)};var t=this.parseOperationType(),o;return this.peek(S.NAME)&&(o=this.parseName()),{kind:M.OPERATION_DEFINITION,operation:t,name:o,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(a)}},n.parseOperationType=function(){var a=this.expectToken(S.NAME);switch(a.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(a)},n.parseVariableDefinitions=function(){return this.optionalMany(S.PAREN_L,this.parseVariableDefinition,S.PAREN_R)},n.parseVariableDefinition=function(){var a=this._lexer.token;return{kind:M.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(S.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(S.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(a)}},n.parseVariable=function(){var a=this._lexer.token;return this.expectToken(S.DOLLAR),{kind:M.VARIABLE,name:this.parseName(),loc:this.loc(a)}},n.parseSelectionSet=function(){var a=this._lexer.token;return{kind:M.SELECTION_SET,selections:this.many(S.BRACE_L,this.parseSelection,S.BRACE_R),loc:this.loc(a)}},n.parseSelection=function(){return this.peek(S.SPREAD)?this.parseFragment():this.parseField()},n.parseField=function(){var a=this._lexer.token,t=this.parseName(),o,s;return this.expectOptionalToken(S.COLON)?(o=t,s=this.parseName()):s=t,{kind:M.FIELD,alias:o,name:s,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(S.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(a)}},n.parseArguments=function(a){var t=a?this.parseConstArgument:this.parseArgument;return this.optionalMany(S.PAREN_L,t,S.PAREN_R)},n.parseArgument=function(){var a=this._lexer.token,t=this.parseName();return this.expectToken(S.COLON),{kind:M.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(a)}},n.parseConstArgument=function(){var a=this._lexer.token;return{kind:M.ARGUMENT,name:this.parseName(),value:(this.expectToken(S.COLON),this.parseValueLiteral(!0)),loc:this.loc(a)}},n.parseFragment=function(){var a=this._lexer.token;this.expectToken(S.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(S.NAME)?{kind:M.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(a)}:{kind:M.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(a)}},n.parseFragmentDefinition=function(){var a,t=this._lexer.token;return this.expectKeyword("fragment"),((a=this._options)===null||a===void 0?void 0:a.experimentalFragmentVariables)===!0?{kind:M.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:M.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},n.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},n.parseValueLiteral=function(a){var t=this._lexer.token;switch(t.kind){case S.BRACKET_L:return this.parseList(a);case S.BRACE_L:return this.parseObject(a);case S.INT:return this._lexer.advance(),{kind:M.INT,value:t.value,loc:this.loc(t)};case S.FLOAT:return this._lexer.advance(),{kind:M.FLOAT,value:t.value,loc:this.loc(t)};case S.STRING:case S.BLOCK_STRING:return this.parseStringLiteral();case S.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:M.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:M.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:M.NULL,loc:this.loc(t)};default:return{kind:M.ENUM,value:t.value,loc:this.loc(t)}}case S.DOLLAR:if(!a)return this.parseVariable();break}throw this.unexpected()},n.parseStringLiteral=function(){var a=this._lexer.token;return this._lexer.advance(),{kind:M.STRING,value:a.value,block:a.kind===S.BLOCK_STRING,loc:this.loc(a)}},n.parseList=function(a){var t=this,o=this._lexer.token,s=function(){return t.parseValueLiteral(a)};return{kind:M.LIST,values:this.any(S.BRACKET_L,s,S.BRACKET_R),loc:this.loc(o)}},n.parseObject=function(a){var t=this,o=this._lexer.token,s=function(){return t.parseObjectField(a)};return{kind:M.OBJECT,fields:this.any(S.BRACE_L,s,S.BRACE_R),loc:this.loc(o)}},n.parseObjectField=function(a){var t=this._lexer.token,o=this.parseName();return this.expectToken(S.COLON),{kind:M.OBJECT_FIELD,name:o,value:this.parseValueLiteral(a),loc:this.loc(t)}},n.parseDirectives=function(a){for(var t=[];this.peek(S.AT);)t.push(this.parseDirective(a));return t},n.parseDirective=function(a){var t=this._lexer.token;return this.expectToken(S.AT),{kind:M.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(a),loc:this.loc(t)}},n.parseTypeReference=function(){var a=this._lexer.token,t;return this.expectOptionalToken(S.BRACKET_L)?(t=this.parseTypeReference(),this.expectToken(S.BRACKET_R),t={kind:M.LIST_TYPE,type:t,loc:this.loc(a)}):t=this.parseNamedType(),this.expectOptionalToken(S.BANG)?{kind:M.NON_NULL_TYPE,type:t,loc:this.loc(a)}:t},n.parseNamedType=function(){var a=this._lexer.token;return{kind:M.NAMED_TYPE,name:this.parseName(),loc:this.loc(a)}},n.parseTypeSystemDefinition=function(){var a=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(a.kind===S.NAME)switch(a.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(a)},n.peekDescription=function(){return this.peek(S.STRING)||this.peek(S.BLOCK_STRING)},n.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},n.parseSchemaDefinition=function(){var a=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var o=this.parseDirectives(!0),s=this.many(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);return{kind:M.SCHEMA_DEFINITION,description:t,directives:o,operationTypes:s,loc:this.loc(a)}},n.parseOperationTypeDefinition=function(){var a=this._lexer.token,t=this.parseOperationType();this.expectToken(S.COLON);var o=this.parseNamedType();return{kind:M.OPERATION_TYPE_DEFINITION,operation:t,type:o,loc:this.loc(a)}},n.parseScalarTypeDefinition=function(){var a=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var o=this.parseName(),s=this.parseDirectives(!0);return{kind:M.SCALAR_TYPE_DEFINITION,description:t,name:o,directives:s,loc:this.loc(a)}},n.parseObjectTypeDefinition=function(){var a=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var o=this.parseName(),s=this.parseImplementsInterfaces(),c=this.parseDirectives(!0),l=this.parseFieldsDefinition();return{kind:M.OBJECT_TYPE_DEFINITION,description:t,name:o,interfaces:s,directives:c,fields:l,loc:this.loc(a)}},n.parseImplementsInterfaces=function(){var a;if(!this.expectOptionalKeyword("implements"))return[];if(((a=this._options)===null||a===void 0?void 0:a.allowLegacySDLImplementsInterfaces)===!0){var t=[];this.expectOptionalToken(S.AMP);do t.push(this.parseNamedType());while(this.expectOptionalToken(S.AMP)||this.peek(S.NAME));return t}return this.delimitedMany(S.AMP,this.parseNamedType)},n.parseFieldsDefinition=function(){var a;return((a=this._options)===null||a===void 0?void 0:a.allowLegacySDLEmptyFields)===!0&&this.peek(S.BRACE_L)&&this._lexer.lookahead().kind===S.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(S.BRACE_L,this.parseFieldDefinition,S.BRACE_R)},n.parseFieldDefinition=function(){var a=this._lexer.token,t=this.parseDescription(),o=this.parseName(),s=this.parseArgumentDefs();this.expectToken(S.COLON);var c=this.parseTypeReference(),l=this.parseDirectives(!0);return{kind:M.FIELD_DEFINITION,description:t,name:o,arguments:s,type:c,directives:l,loc:this.loc(a)}},n.parseArgumentDefs=function(){return this.optionalMany(S.PAREN_L,this.parseInputValueDef,S.PAREN_R)},n.parseInputValueDef=function(){var a=this._lexer.token,t=this.parseDescription(),o=this.parseName();this.expectToken(S.COLON);var s=this.parseTypeReference(),c;this.expectOptionalToken(S.EQUALS)&&(c=this.parseValueLiteral(!0));var l=this.parseDirectives(!0);return{kind:M.INPUT_VALUE_DEFINITION,description:t,name:o,type:s,defaultValue:c,directives:l,loc:this.loc(a)}},n.parseInterfaceTypeDefinition=function(){var a=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var o=this.parseName(),s=this.parseImplementsInterfaces(),c=this.parseDirectives(!0),l=this.parseFieldsDefinition();return{kind:M.INTERFACE_TYPE_DEFINITION,description:t,name:o,interfaces:s,directives:c,fields:l,loc:this.loc(a)}},n.parseUnionTypeDefinition=function(){var a=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var o=this.parseName(),s=this.parseDirectives(!0),c=this.parseUnionMemberTypes();return{kind:M.UNION_TYPE_DEFINITION,description:t,name:o,directives:s,types:c,loc:this.loc(a)}},n.parseUnionMemberTypes=function(){return this.expectOptionalToken(S.EQUALS)?this.delimitedMany(S.PIPE,this.parseNamedType):[]},n.parseEnumTypeDefinition=function(){var a=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var o=this.parseName(),s=this.parseDirectives(!0),c=this.parseEnumValuesDefinition();return{kind:M.ENUM_TYPE_DEFINITION,description:t,name:o,directives:s,values:c,loc:this.loc(a)}},n.parseEnumValuesDefinition=function(){return this.optionalMany(S.BRACE_L,this.parseEnumValueDefinition,S.BRACE_R)},n.parseEnumValueDefinition=function(){var a=this._lexer.token,t=this.parseDescription(),o=this.parseName(),s=this.parseDirectives(!0);return{kind:M.ENUM_VALUE_DEFINITION,description:t,name:o,directives:s,loc:this.loc(a)}},n.parseInputObjectTypeDefinition=function(){var a=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var o=this.parseName(),s=this.parseDirectives(!0),c=this.parseInputFieldsDefinition();return{kind:M.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:o,directives:s,fields:c,loc:this.loc(a)}},n.parseInputFieldsDefinition=function(){return this.optionalMany(S.BRACE_L,this.parseInputValueDef,S.BRACE_R)},n.parseTypeSystemExtension=function(){var a=this._lexer.lookahead();if(a.kind===S.NAME)switch(a.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(a)},n.parseSchemaExtension=function(){var a=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),o=this.optionalMany(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);if(t.length===0&&o.length===0)throw this.unexpected();return{kind:M.SCHEMA_EXTENSION,directives:t,operationTypes:o,loc:this.loc(a)}},n.parseScalarTypeExtension=function(){var a=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),o=this.parseDirectives(!0);if(o.length===0)throw this.unexpected();return{kind:M.SCALAR_TYPE_EXTENSION,name:t,directives:o,loc:this.loc(a)}},n.parseObjectTypeExtension=function(){var a=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),c=this.parseFieldsDefinition();if(o.length===0&&s.length===0&&c.length===0)throw this.unexpected();return{kind:M.OBJECT_TYPE_EXTENSION,name:t,interfaces:o,directives:s,fields:c,loc:this.loc(a)}},n.parseInterfaceTypeExtension=function(){var a=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),c=this.parseFieldsDefinition();if(o.length===0&&s.length===0&&c.length===0)throw this.unexpected();return{kind:M.INTERFACE_TYPE_EXTENSION,name:t,interfaces:o,directives:s,fields:c,loc:this.loc(a)}},n.parseUnionTypeExtension=function(){var a=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),o=this.parseDirectives(!0),s=this.parseUnionMemberTypes();if(o.length===0&&s.length===0)throw this.unexpected();return{kind:M.UNION_TYPE_EXTENSION,name:t,directives:o,types:s,loc:this.loc(a)}},n.parseEnumTypeExtension=function(){var a=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),o=this.parseDirectives(!0),s=this.parseEnumValuesDefinition();if(o.length===0&&s.length===0)throw this.unexpected();return{kind:M.ENUM_TYPE_EXTENSION,name:t,directives:o,values:s,loc:this.loc(a)}},n.parseInputObjectTypeExtension=function(){var a=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),o=this.parseDirectives(!0),s=this.parseInputFieldsDefinition();if(o.length===0&&s.length===0)throw this.unexpected();return{kind:M.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:o,fields:s,loc:this.loc(a)}},n.parseDirectiveDefinition=function(){var a=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(S.AT);var o=this.parseName(),s=this.parseArgumentDefs(),c=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var l=this.parseDirectiveLocations();return{kind:M.DIRECTIVE_DEFINITION,description:t,name:o,arguments:s,repeatable:c,locations:l,loc:this.loc(a)}},n.parseDirectiveLocations=function(){return this.delimitedMany(S.PIPE,this.parseDirectiveLocation)},n.parseDirectiveLocation=function(){var a=this._lexer.token,t=this.parseName();if(wl[t.value]!==void 0)return t;throw this.unexpected(a)},n.loc=function(a){var t;if(((t=this._options)===null||t===void 0?void 0:t.noLocation)!==!0)return new ia(a,this._lexer.lastToken,this._lexer.source)},n.peek=function(a){return this._lexer.token.kind===a},n.expectToken=function(a){var t=this._lexer.token;if(t.kind===a)return this._lexer.advance(),t;throw re(this._lexer.source,t.start,"Expected ".concat(sa(a),", found ").concat(Gt(t),"."))},n.expectOptionalToken=function(a){var t=this._lexer.token;if(t.kind===a)return this._lexer.advance(),t},n.expectKeyword=function(a){var t=this._lexer.token;if(t.kind===S.NAME&&t.value===a)this._lexer.advance();else throw re(this._lexer.source,t.start,'Expected "'.concat(a,'", found ').concat(Gt(t),"."))},n.expectOptionalKeyword=function(a){var t=this._lexer.token;return t.kind===S.NAME&&t.value===a?(this._lexer.advance(),!0):!1},n.unexpected=function(a){var t=a!=null?a:this._lexer.token;return re(this._lexer.source,t.start,"Unexpected ".concat(Gt(t),"."))},n.any=function(a,t,o){this.expectToken(a);for(var s=[];!this.expectOptionalToken(o);)s.push(t.call(this));return s},n.optionalMany=function(a,t,o){if(this.expectOptionalToken(a)){var s=[];do s.push(t.call(this));while(!this.expectOptionalToken(o));return s}return[]},n.many=function(a,t,o){this.expectToken(a);var s=[];do s.push(t.call(this));while(!this.expectOptionalToken(o));return s},n.delimitedMany=function(a,t){this.expectOptionalToken(a);var o=[];do o.push(t.call(this));while(this.expectOptionalToken(a));return o},e})();function Gt(e){var n=e.value;return sa(e.kind)+(n!=null?' "'.concat(n,'"'):"")}function sa(e){return Ml(e)?'"'.concat(e,'"'):e}var dt=new Map,Xt=new Map,ca=!0,pt=!1;function la(e){return e.replace(/[\s,]+/g," ").trim()}function Yl(e){return la(e.source.body.substring(e.start,e.end))}function Zl(e){var n=new Set,i=[];return e.definitions.forEach(function(a){if(a.kind==="FragmentDefinition"){var t=a.name.value,o=Yl(a.loc),s=Xt.get(t);s&&!s.has(o)?ca&&console.warn("Warning: fragment with name "+t+` already exists.
669
+ spurious results.`))}}return!1};function lm(e,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function um(e,n,i){return n&&lm(e.prototype,n),e}var wa=(function(){function e(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof n=="string"||Sn(0,"Body must be a string. Received: ".concat(Na(n),".")),this.body=n,this.name=i,this.locationOffset=r,this.locationOffset.line>0||Sn(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Sn(0,"column in locationOffset is 1-indexed and must be positive.")}return um(e,[{key:Da,get:function(){return"Source"}}]),e})();function dm(e){return cm(e,wa)}var mm=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function gm(e){var n=e.split(/\r\n|[\n\r]/g),i=pm(e);if(i!==0)for(var r=1;r<n.length;r++)n[r]=n[r].slice(i);for(var t=0;t<n.length&&cr(n[t]);)++t;for(var a=n.length;a>t&&cr(n[a-1]);)--a;return n.slice(t,a).join(`
670
+ `)}function cr(e){for(var n=0;n<e.length;++n)if(e[n]!==" "&&e[n]!==" ")return!1;return!0}function pm(e){for(var n,i=!0,r=!0,t=0,a=null,s=0;s<e.length;++s)switch(e.charCodeAt(s)){case 13:e.charCodeAt(s+1)===10&&++s;case 10:i=!1,r=!0,t=0;break;case 9:case 32:++t;break;default:r&&!i&&(a===null||t<a)&&(a=t),r=!1}return(n=a)!==null&&n!==void 0?n:0}var fm=(function(){function e(i){var r=new Z(x.SOF,0,0,0,0,null);this.source=i,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}var n=e.prototype;return n.advance=function(){this.lastToken=this.token;var r=this.token=this.lookahead();return r},n.lookahead=function(){var r=this.token;if(r.kind!==x.EOF)do{var t;r=(t=r.next)!==null&&t!==void 0?t:r.next=ym(this,r)}while(r.kind===x.COMMENT);return r},e})();function hm(e){return e===x.BANG||e===x.DOLLAR||e===x.AMP||e===x.PAREN_L||e===x.PAREN_R||e===x.SPREAD||e===x.COLON||e===x.EQUALS||e===x.AT||e===x.BRACKET_L||e===x.BRACKET_R||e===x.BRACE_L||e===x.PIPE||e===x.BRACE_R}function Be(e){return isNaN(e)?x.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function ym(e,n){for(var i=e.source,r=i.body,t=r.length,a=n.end;a<t;){var s=r.charCodeAt(a),c=e.line,l=1+a-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++a;continue;case 10:++a,++e.line,e.lineStart=a;continue;case 13:r.charCodeAt(a+1)===10?a+=2:++a,++e.line,e.lineStart=a;continue;case 33:return new Z(x.BANG,a,a+1,c,l,n);case 35:return bm(i,a,c,l,n);case 36:return new Z(x.DOLLAR,a,a+1,c,l,n);case 38:return new Z(x.AMP,a,a+1,c,l,n);case 40:return new Z(x.PAREN_L,a,a+1,c,l,n);case 41:return new Z(x.PAREN_R,a,a+1,c,l,n);case 46:if(r.charCodeAt(a+1)===46&&r.charCodeAt(a+2)===46)return new Z(x.SPREAD,a,a+3,c,l,n);break;case 58:return new Z(x.COLON,a,a+1,c,l,n);case 61:return new Z(x.EQUALS,a,a+1,c,l,n);case 64:return new Z(x.AT,a,a+1,c,l,n);case 91:return new Z(x.BRACKET_L,a,a+1,c,l,n);case 93:return new Z(x.BRACKET_R,a,a+1,c,l,n);case 123:return new Z(x.BRACE_L,a,a+1,c,l,n);case 124:return new Z(x.PIPE,a,a+1,c,l,n);case 125:return new Z(x.BRACE_R,a,a+1,c,l,n);case 34:return r.charCodeAt(a+1)===34&&r.charCodeAt(a+2)===34?Sm(i,a,c,l,n,e):Pm(i,a,c,l,n);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Em(i,a,s,c,l,n);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return vm(i,a,c,l,n)}throw ue(i,a,Cm(s))}var u=e.line,d=1+a-e.lineStart;return new Z(x.EOF,t,t,u,d,n)}function Cm(e){return e<32&&e!==9&&e!==10&&e!==13?"Cannot contain the invalid character ".concat(Be(e),"."):e===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:"Cannot parse the unexpected character ".concat(Be(e),".")}function bm(e,n,i,r,t){var a=e.body,s,c=n;do s=a.charCodeAt(++c);while(!isNaN(s)&&(s>31||s===9));return new Z(x.COMMENT,n,c,i,r,t,a.slice(n+1,c))}function Em(e,n,i,r,t,a){var s=e.body,c=i,l=n,u=!1;if(c===45&&(c=s.charCodeAt(++l)),c===48){if(c=s.charCodeAt(++l),c>=48&&c<=57)throw ue(e,l,"Invalid number, unexpected digit after 0: ".concat(Be(c),"."))}else l=Dn(e,l,c),c=s.charCodeAt(l);if(c===46&&(u=!0,c=s.charCodeAt(++l),l=Dn(e,l,c),c=s.charCodeAt(l)),(c===69||c===101)&&(u=!0,c=s.charCodeAt(++l),(c===43||c===45)&&(c=s.charCodeAt(++l)),l=Dn(e,l,c),c=s.charCodeAt(l)),c===46||xm(c))throw ue(e,l,"Invalid number, expected digit but got: ".concat(Be(c),"."));return new Z(u?x.FLOAT:x.INT,n,l,r,t,a,s.slice(n,l))}function Dn(e,n,i){var r=e.body,t=n,a=i;if(a>=48&&a<=57){do a=r.charCodeAt(++t);while(a>=48&&a<=57);return t}throw ue(e,t,"Invalid number, expected digit but got: ".concat(Be(a),"."))}function Pm(e,n,i,r,t){for(var a=e.body,s=n+1,c=s,l=0,u="";s<a.length&&!isNaN(l=a.charCodeAt(s))&&l!==10&&l!==13;){if(l===34)return u+=a.slice(c,s),new Z(x.STRING,n,s+1,i,r,t,u);if(l<32&&l!==9)throw ue(e,s,"Invalid character within String: ".concat(Be(l),"."));if(++s,l===92){switch(u+=a.slice(c,s-1),l=a.charCodeAt(s),l){case 34:u+='"';break;case 47:u+="/";break;case 92:u+="\\";break;case 98:u+="\b";break;case 102:u+="\f";break;case 110:u+=`
671
+ `;break;case 114:u+="\r";break;case 116:u+=" ";break;case 117:{var d=Dm(a.charCodeAt(s+1),a.charCodeAt(s+2),a.charCodeAt(s+3),a.charCodeAt(s+4));if(d<0){var p=a.slice(s+1,s+5);throw ue(e,s,"Invalid character escape sequence: \\u".concat(p,"."))}u+=String.fromCharCode(d),s+=4;break}default:throw ue(e,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(l),"."))}++s,c=s}}throw ue(e,s,"Unterminated string.")}function Sm(e,n,i,r,t,a){for(var s=e.body,c=n+3,l=c,u=0,d="";c<s.length&&!isNaN(u=s.charCodeAt(c));){if(u===34&&s.charCodeAt(c+1)===34&&s.charCodeAt(c+2)===34)return d+=s.slice(l,c),new Z(x.BLOCK_STRING,n,c+3,i,r,t,gm(d));if(u<32&&u!==9&&u!==10&&u!==13)throw ue(e,c,"Invalid character within String: ".concat(Be(u),"."));u===10?(++c,++a.line,a.lineStart=c):u===13?(s.charCodeAt(c+1)===10?c+=2:++c,++a.line,a.lineStart=c):u===92&&s.charCodeAt(c+1)===34&&s.charCodeAt(c+2)===34&&s.charCodeAt(c+3)===34?(d+=s.slice(l,c)+'"""',c+=4,l=c):++c}throw ue(e,c,"Unterminated string.")}function Dm(e,n,i,r){return xt(e)<<12|xt(n)<<8|xt(i)<<4|xt(r)}function xt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function vm(e,n,i,r,t){for(var a=e.body,s=a.length,c=n+1,l=0;c!==s&&!isNaN(l=a.charCodeAt(c))&&(l===95||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++c;return new Z(x.NAME,n,c,i,r,t,a.slice(n,c))}function xm(e){return e===95||e>=65&&e<=90||e>=97&&e<=122}function Im(e,n){var i=new Tm(e,n);return i.parseDocument()}var Tm=(function(){function e(i,r){var t=dm(i)?i:new wa(i);this._lexer=new fm(t),this._options=r}var n=e.prototype;return n.parseName=function(){var r=this.expectToken(x.NAME);return{kind:M.NAME,value:r.value,loc:this.loc(r)}},n.parseDocument=function(){var r=this._lexer.token;return{kind:M.DOCUMENT,definitions:this.many(x.SOF,this.parseDefinition,x.EOF),loc:this.loc(r)}},n.parseDefinition=function(){if(this.peek(x.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(x.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},n.parseOperationDefinition=function(){var r=this._lexer.token;if(this.peek(x.BRACE_L))return{kind:M.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(r)};var t=this.parseOperationType(),a;return this.peek(x.NAME)&&(a=this.parseName()),{kind:M.OPERATION_DEFINITION,operation:t,name:a,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},n.parseOperationType=function(){var r=this.expectToken(x.NAME);switch(r.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(r)},n.parseVariableDefinitions=function(){return this.optionalMany(x.PAREN_L,this.parseVariableDefinition,x.PAREN_R)},n.parseVariableDefinition=function(){var r=this._lexer.token;return{kind:M.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(x.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(x.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(r)}},n.parseVariable=function(){var r=this._lexer.token;return this.expectToken(x.DOLLAR),{kind:M.VARIABLE,name:this.parseName(),loc:this.loc(r)}},n.parseSelectionSet=function(){var r=this._lexer.token;return{kind:M.SELECTION_SET,selections:this.many(x.BRACE_L,this.parseSelection,x.BRACE_R),loc:this.loc(r)}},n.parseSelection=function(){return this.peek(x.SPREAD)?this.parseFragment():this.parseField()},n.parseField=function(){var r=this._lexer.token,t=this.parseName(),a,s;return this.expectOptionalToken(x.COLON)?(a=t,s=this.parseName()):s=t,{kind:M.FIELD,alias:a,name:s,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(x.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},n.parseArguments=function(r){var t=r?this.parseConstArgument:this.parseArgument;return this.optionalMany(x.PAREN_L,t,x.PAREN_R)},n.parseArgument=function(){var r=this._lexer.token,t=this.parseName();return this.expectToken(x.COLON),{kind:M.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(r)}},n.parseConstArgument=function(){var r=this._lexer.token;return{kind:M.ARGUMENT,name:this.parseName(),value:(this.expectToken(x.COLON),this.parseValueLiteral(!0)),loc:this.loc(r)}},n.parseFragment=function(){var r=this._lexer.token;this.expectToken(x.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(x.NAME)?{kind:M.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(r)}:{kind:M.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},n.parseFragmentDefinition=function(){var r,t=this._lexer.token;return this.expectKeyword("fragment"),((r=this._options)===null||r===void 0?void 0:r.experimentalFragmentVariables)===!0?{kind:M.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:M.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},n.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},n.parseValueLiteral=function(r){var t=this._lexer.token;switch(t.kind){case x.BRACKET_L:return this.parseList(r);case x.BRACE_L:return this.parseObject(r);case x.INT:return this._lexer.advance(),{kind:M.INT,value:t.value,loc:this.loc(t)};case x.FLOAT:return this._lexer.advance(),{kind:M.FLOAT,value:t.value,loc:this.loc(t)};case x.STRING:case x.BLOCK_STRING:return this.parseStringLiteral();case x.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:M.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:M.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:M.NULL,loc:this.loc(t)};default:return{kind:M.ENUM,value:t.value,loc:this.loc(t)}}case x.DOLLAR:if(!r)return this.parseVariable();break}throw this.unexpected()},n.parseStringLiteral=function(){var r=this._lexer.token;return this._lexer.advance(),{kind:M.STRING,value:r.value,block:r.kind===x.BLOCK_STRING,loc:this.loc(r)}},n.parseList=function(r){var t=this,a=this._lexer.token,s=function(){return t.parseValueLiteral(r)};return{kind:M.LIST,values:this.any(x.BRACKET_L,s,x.BRACKET_R),loc:this.loc(a)}},n.parseObject=function(r){var t=this,a=this._lexer.token,s=function(){return t.parseObjectField(r)};return{kind:M.OBJECT,fields:this.any(x.BRACE_L,s,x.BRACE_R),loc:this.loc(a)}},n.parseObjectField=function(r){var t=this._lexer.token,a=this.parseName();return this.expectToken(x.COLON),{kind:M.OBJECT_FIELD,name:a,value:this.parseValueLiteral(r),loc:this.loc(t)}},n.parseDirectives=function(r){for(var t=[];this.peek(x.AT);)t.push(this.parseDirective(r));return t},n.parseDirective=function(r){var t=this._lexer.token;return this.expectToken(x.AT),{kind:M.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(r),loc:this.loc(t)}},n.parseTypeReference=function(){var r=this._lexer.token,t;return this.expectOptionalToken(x.BRACKET_L)?(t=this.parseTypeReference(),this.expectToken(x.BRACKET_R),t={kind:M.LIST_TYPE,type:t,loc:this.loc(r)}):t=this.parseNamedType(),this.expectOptionalToken(x.BANG)?{kind:M.NON_NULL_TYPE,type:t,loc:this.loc(r)}:t},n.parseNamedType=function(){var r=this._lexer.token;return{kind:M.NAMED_TYPE,name:this.parseName(),loc:this.loc(r)}},n.parseTypeSystemDefinition=function(){var r=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(r.kind===x.NAME)switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(r)},n.peekDescription=function(){return this.peek(x.STRING)||this.peek(x.BLOCK_STRING)},n.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},n.parseSchemaDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var a=this.parseDirectives(!0),s=this.many(x.BRACE_L,this.parseOperationTypeDefinition,x.BRACE_R);return{kind:M.SCHEMA_DEFINITION,description:t,directives:a,operationTypes:s,loc:this.loc(r)}},n.parseOperationTypeDefinition=function(){var r=this._lexer.token,t=this.parseOperationType();this.expectToken(x.COLON);var a=this.parseNamedType();return{kind:M.OPERATION_TYPE_DEFINITION,operation:t,type:a,loc:this.loc(r)}},n.parseScalarTypeDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var a=this.parseName(),s=this.parseDirectives(!0);return{kind:M.SCALAR_TYPE_DEFINITION,description:t,name:a,directives:s,loc:this.loc(r)}},n.parseObjectTypeDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var a=this.parseName(),s=this.parseImplementsInterfaces(),c=this.parseDirectives(!0),l=this.parseFieldsDefinition();return{kind:M.OBJECT_TYPE_DEFINITION,description:t,name:a,interfaces:s,directives:c,fields:l,loc:this.loc(r)}},n.parseImplementsInterfaces=function(){var r;if(!this.expectOptionalKeyword("implements"))return[];if(((r=this._options)===null||r===void 0?void 0:r.allowLegacySDLImplementsInterfaces)===!0){var t=[];this.expectOptionalToken(x.AMP);do t.push(this.parseNamedType());while(this.expectOptionalToken(x.AMP)||this.peek(x.NAME));return t}return this.delimitedMany(x.AMP,this.parseNamedType)},n.parseFieldsDefinition=function(){var r;return((r=this._options)===null||r===void 0?void 0:r.allowLegacySDLEmptyFields)===!0&&this.peek(x.BRACE_L)&&this._lexer.lookahead().kind===x.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(x.BRACE_L,this.parseFieldDefinition,x.BRACE_R)},n.parseFieldDefinition=function(){var r=this._lexer.token,t=this.parseDescription(),a=this.parseName(),s=this.parseArgumentDefs();this.expectToken(x.COLON);var c=this.parseTypeReference(),l=this.parseDirectives(!0);return{kind:M.FIELD_DEFINITION,description:t,name:a,arguments:s,type:c,directives:l,loc:this.loc(r)}},n.parseArgumentDefs=function(){return this.optionalMany(x.PAREN_L,this.parseInputValueDef,x.PAREN_R)},n.parseInputValueDef=function(){var r=this._lexer.token,t=this.parseDescription(),a=this.parseName();this.expectToken(x.COLON);var s=this.parseTypeReference(),c;this.expectOptionalToken(x.EQUALS)&&(c=this.parseValueLiteral(!0));var l=this.parseDirectives(!0);return{kind:M.INPUT_VALUE_DEFINITION,description:t,name:a,type:s,defaultValue:c,directives:l,loc:this.loc(r)}},n.parseInterfaceTypeDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var a=this.parseName(),s=this.parseImplementsInterfaces(),c=this.parseDirectives(!0),l=this.parseFieldsDefinition();return{kind:M.INTERFACE_TYPE_DEFINITION,description:t,name:a,interfaces:s,directives:c,fields:l,loc:this.loc(r)}},n.parseUnionTypeDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var a=this.parseName(),s=this.parseDirectives(!0),c=this.parseUnionMemberTypes();return{kind:M.UNION_TYPE_DEFINITION,description:t,name:a,directives:s,types:c,loc:this.loc(r)}},n.parseUnionMemberTypes=function(){return this.expectOptionalToken(x.EQUALS)?this.delimitedMany(x.PIPE,this.parseNamedType):[]},n.parseEnumTypeDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var a=this.parseName(),s=this.parseDirectives(!0),c=this.parseEnumValuesDefinition();return{kind:M.ENUM_TYPE_DEFINITION,description:t,name:a,directives:s,values:c,loc:this.loc(r)}},n.parseEnumValuesDefinition=function(){return this.optionalMany(x.BRACE_L,this.parseEnumValueDefinition,x.BRACE_R)},n.parseEnumValueDefinition=function(){var r=this._lexer.token,t=this.parseDescription(),a=this.parseName(),s=this.parseDirectives(!0);return{kind:M.ENUM_VALUE_DEFINITION,description:t,name:a,directives:s,loc:this.loc(r)}},n.parseInputObjectTypeDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var a=this.parseName(),s=this.parseDirectives(!0),c=this.parseInputFieldsDefinition();return{kind:M.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:a,directives:s,fields:c,loc:this.loc(r)}},n.parseInputFieldsDefinition=function(){return this.optionalMany(x.BRACE_L,this.parseInputValueDef,x.BRACE_R)},n.parseTypeSystemExtension=function(){var r=this._lexer.lookahead();if(r.kind===x.NAME)switch(r.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(r)},n.parseSchemaExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),a=this.optionalMany(x.BRACE_L,this.parseOperationTypeDefinition,x.BRACE_R);if(t.length===0&&a.length===0)throw this.unexpected();return{kind:M.SCHEMA_EXTENSION,directives:t,operationTypes:a,loc:this.loc(r)}},n.parseScalarTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),a=this.parseDirectives(!0);if(a.length===0)throw this.unexpected();return{kind:M.SCALAR_TYPE_EXTENSION,name:t,directives:a,loc:this.loc(r)}},n.parseObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),a=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),c=this.parseFieldsDefinition();if(a.length===0&&s.length===0&&c.length===0)throw this.unexpected();return{kind:M.OBJECT_TYPE_EXTENSION,name:t,interfaces:a,directives:s,fields:c,loc:this.loc(r)}},n.parseInterfaceTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),a=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),c=this.parseFieldsDefinition();if(a.length===0&&s.length===0&&c.length===0)throw this.unexpected();return{kind:M.INTERFACE_TYPE_EXTENSION,name:t,interfaces:a,directives:s,fields:c,loc:this.loc(r)}},n.parseUnionTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),a=this.parseDirectives(!0),s=this.parseUnionMemberTypes();if(a.length===0&&s.length===0)throw this.unexpected();return{kind:M.UNION_TYPE_EXTENSION,name:t,directives:a,types:s,loc:this.loc(r)}},n.parseEnumTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),a=this.parseDirectives(!0),s=this.parseEnumValuesDefinition();if(a.length===0&&s.length===0)throw this.unexpected();return{kind:M.ENUM_TYPE_EXTENSION,name:t,directives:a,values:s,loc:this.loc(r)}},n.parseInputObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),a=this.parseDirectives(!0),s=this.parseInputFieldsDefinition();if(a.length===0&&s.length===0)throw this.unexpected();return{kind:M.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:a,fields:s,loc:this.loc(r)}},n.parseDirectiveDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(x.AT);var a=this.parseName(),s=this.parseArgumentDefs(),c=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var l=this.parseDirectiveLocations();return{kind:M.DIRECTIVE_DEFINITION,description:t,name:a,arguments:s,repeatable:c,locations:l,loc:this.loc(r)}},n.parseDirectiveLocations=function(){return this.delimitedMany(x.PIPE,this.parseDirectiveLocation)},n.parseDirectiveLocation=function(){var r=this._lexer.token,t=this.parseName();if(mm[t.value]!==void 0)return t;throw this.unexpected(r)},n.loc=function(r){var t;if(((t=this._options)===null||t===void 0?void 0:t.noLocation)!==!0)return new Aa(r,this._lexer.lastToken,this._lexer.source)},n.peek=function(r){return this._lexer.token.kind===r},n.expectToken=function(r){var t=this._lexer.token;if(t.kind===r)return this._lexer.advance(),t;throw ue(this._lexer.source,t.start,"Expected ".concat(Fa(r),", found ").concat(vn(t),"."))},n.expectOptionalToken=function(r){var t=this._lexer.token;if(t.kind===r)return this._lexer.advance(),t},n.expectKeyword=function(r){var t=this._lexer.token;if(t.kind===x.NAME&&t.value===r)this._lexer.advance();else throw ue(this._lexer.source,t.start,'Expected "'.concat(r,'", found ').concat(vn(t),"."))},n.expectOptionalKeyword=function(r){var t=this._lexer.token;return t.kind===x.NAME&&t.value===r?(this._lexer.advance(),!0):!1},n.unexpected=function(r){var t=r!=null?r:this._lexer.token;return ue(this._lexer.source,t.start,"Unexpected ".concat(vn(t),"."))},n.any=function(r,t,a){this.expectToken(r);for(var s=[];!this.expectOptionalToken(a);)s.push(t.call(this));return s},n.optionalMany=function(r,t,a){if(this.expectOptionalToken(r)){var s=[];do s.push(t.call(this));while(!this.expectOptionalToken(a));return s}return[]},n.many=function(r,t,a){this.expectToken(r);var s=[];do s.push(t.call(this));while(!this.expectOptionalToken(a));return s},n.delimitedMany=function(r,t){this.expectOptionalToken(r);var a=[];do a.push(t.call(this));while(this.expectOptionalToken(r));return a},e})();function vn(e){var n=e.value;return Fa(e.kind)+(n!=null?' "'.concat(n,'"'):"")}function Fa(e){return hm(e)?'"'.concat(e,'"'):e}var Ut=new Map,Ln=new Map,ja=!0,$t=!1;function Ra(e){return e.replace(/[\s,]+/g," ").trim()}function Am(e){return Ra(e.source.body.substring(e.start,e.end))}function km(e){var n=new Set,i=[];return e.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var t=r.name.value,a=Am(r.loc),s=Ln.get(t);s&&!s.has(a)?ja&&console.warn("Warning: fragment with name "+t+` already exists.
658
672
  graphql-tag enforces all fragment names across your application to be unique; read more about
659
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Xt.set(t,s=new Set),s.add(o),n.has(o)||(n.add(o),i.push(a))}else i.push(a)}),gt(gt({},e),{definitions:i})}function zl(e){var n=new Set(e.definitions);n.forEach(function(a){a.loc&&delete a.loc,Object.keys(a).forEach(function(t){var o=a[t];o&&typeof o=="object"&&n.add(o)})});var i=e.loc;return i&&(delete i.startToken,delete i.endToken),e}function Kl(e){var n=la(e);if(!dt.has(n)){var i=ql(e,{experimentalFragmentVariables:pt,allowLegacyFragmentVariables:pt});if(!i||i.kind!=="Document")throw new Error("Not a valid GraphQL document.");dt.set(n,zl(Zl(i)))}return dt.get(n)}function Ae(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];typeof e=="string"&&(e=[e]);var a=e[0];return n.forEach(function(t,o){t&&t.kind==="Document"?a+=t.loc.source.body:a+=t,a+=e[o+1]}),Kl(a)}function ua(){dt.clear(),Xt.clear()}function da(){ca=!1}function ma(){pt=!0}function ga(){pt=!1}var $e={gql:Ae,resetCaches:ua,disableFragmentWarnings:da,enableExperimentalFragmentVariables:ma,disableExperimentalFragmentVariables:ga};(function(e){e.gql=$e.gql,e.resetCaches=$e.resetCaches,e.disableFragmentWarnings=$e.disableFragmentWarnings,e.enableExperimentalFragmentVariables=$e.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=$e.disableExperimentalFragmentVariables})(Ae||(Ae={}));Ae.default=Ae;const Ql=Ae,Xl=Object.freeze(Object.defineProperty({__proto__:null,default:Ql,disableExperimentalFragmentVariables:ga,disableFragmentWarnings:da,enableExperimentalFragmentVariables:ma,get gql(){return Ae},resetCaches:ua},Symbol.toStringTag,{value:"Module"})),Jl=ol(Xl);var Qn;function eu(){return Qn||(Qn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureStatus=e.FeatureSortFields=e.FeatureGroupStatus=e.FeatureGroupSortFields=e.ExperimentStatus=e.ExperimentSortFields=e.EventLogType=e.EventLogSortFields=e.EventEntityType=e.EventActor=e.ErrorCode=e.EnvironmentType=e.EnvironmentSortFields=e.EnvironmentProvisionStatus=e.EnvironmentAccessRole=e.EntitySelectionMode=e.EntitlementsStateAccessDeniedReason=e.EntitlementResetPeriod=e.EntitlementBehavior=e.DiscountType=e.DiscountDurationType=e.Department=e.CustomerSubscriptionSortFields=e.CustomerSortFields=e.CustomerResourceSortFields=e.Currency=e.CreditUsageTimeRange=e.CreditLedgerEventType=e.CreditGrantType=e.CouponType=e.CouponStatus=e.CouponSource=e.CouponSortFields=e.ConditionOperation=e.ChangeType=e.BillingVendorIdentifier=e.BillingPeriod=e.BillingModel=e.BillingCadence=e.BillingAnchor=e.Auth0ApplicationType=e.ApiKeyType=e.ApiKeySortFields=e.Alignment=e.AggregationFunction=e.AddonSortFields=e.AccountStatus=e.AccountAccessRole=e.AccountAccessMethod=e.AccessDeniedReason=void 0,e.SubscriptionPriceSortFields=e.SubscriptionMigrationTime=e.SubscriptionMigrationTaskSortFields=e.SubscriptionInvoiceStatus=e.SubscriptionInvoiceBillingReason=e.SubscriptionEntitlementSortFields=e.SubscriptionEndSetup=e.SubscriptionDecisionStrategy=e.SubscriptionCouponStatus=e.SubscriptionCancellationTime=e.SubscriptionCancellationAction=e.SubscriptionCancelReason=e.SubscriptionAddonSortFields=e.SourceType=e.SortNulls=e.SortDirection=e.ScheduleStrategy=e.PublishMigrationType=e.ProvisionSubscriptionStatus=e.ProrationBehavior=e.PromotionalEntitlementStatus=e.PromotionalEntitlementSortFields=e.PromotionalEntitlementPeriod=e.ProductSortFields=e.PricingType=e.PriceSortFields=e.PlanSortFields=e.PlanChangeType=e.PaymentMethodType=e.PaymentCollectionMethod=e.PaymentCollection=e.PackageStatus=e.PackageGroupStatus=e.PackageGroupSortFields=e.PackageEntitlementSortFields=e.PackageDtoSortFields=e.OverageBillingPeriod=e.OfferStatus=e.OfferSortFields=e.MonthlyAccordingTo=e.MeterType=e.MemberStatus=e.MemberSortFields=e.InvoiceLineItemType=e.IntegrationSortFields=e.ImportIntegrationTaskSortFields=e.HookStatus=e.HookSortFields=e.FontWeight=e.FeatureType=void 0,e.SubscriptionPreviewFragmentDoc=e.CustomerStatisticsFragmentDoc=e.CustomerWithSubscriptionsFragmentDoc=e.SubscriptionFragmentDoc=e.SubscriptionTrialConfigurationFragmentDoc=e.SubscriptionFutureUpdateDataFragmentDoc=e.SubscriptionScheduledUpdateDataFragmentDoc=e.ScheduleVariablesFragmentDoc=e.PlanFragmentDoc=e.PlanCompatiblePackageGroupsFragmentDoc=e.AddonFragmentDoc=e.AddonDependencyFragmentDoc=e.OveragePriceFragmentDoc=e.PackageEntitlementFragmentDoc=e.ProductFragmentDoc=e.TotalPriceFragmentDoc=e.PriceFragmentDoc=e.PriceTierFragmentDoc=e.CustomerResourceFragmentDoc=e.SubscriptionInvoiceFragmentDoc=e.CustomerFragmentDoc=e.PromotionalEntitlementFragmentDoc=e.CouponFragmentDoc=e.SlimCustomerFragmentDoc=e.SlimSubscriptionFragmentV2FragmentDoc=e.SubscriptionQueryFragmentDoc=e.PageInfoFragmentDoc=e.ExperimentGroupType=e.YearlyAccordingTo=e.WidgetType=e.WeeklyAccordingTo=e.VendorType=e.VendorIdentifier=e.UsageUpdateBehavior=e.UsageMeasurementSortFields=e.UsageMarkerType=e.UnitTransformationRound=e.TrialPeriodUnits=e.TrialEndBehavior=e.TiersMode=e.TaskType=e.TaskStatus=e.SyncStatus=e.SubscriptionUpdateUsageCutoffBehavior=e.SubscriptionStatus=e.SubscriptionStartSetup=e.SubscriptionScheduleType=e.SubscriptionScheduleStatus=e.SubscriptionQuerySortFields=e.SubscriptionProrationBehavior=void 0,e.CreditUsageFragmentDoc=e.SlimCustomCurrencyFragmentDoc=e.PaymentSessionFragmentDoc=e.CreditsBalanceSummaryFragmentDoc=e.CreditLedgerFragmentDoc=e.CreditGrantFragmentDoc=e.ReportUsageFragmentDoc=e.ProvisionSubscriptionFragmentDoc=e.ApplySubscriptionFragmentDoc=e.ProvisionCustomerFragmentDoc=e.SlimSubscriptionFragmentDoc=e.UsageHistoryV2FragmentDoc=e.UsageHistoryFragmentDoc=e.PaywallFragmentDoc=e.PaywallCalculatedPricePointsFragmentDoc=e.PaywallConfigurationFragmentDoc=e.LayoutConfigurationFragmentDoc=e.PaywallCurrencyFragmentDoc=e.MockPaywallPlanFragmentDoc=e.MockPaywallPlanCompatiblePackageGroupsFragmentDoc=e.MockPaywallAddonFragmentDoc=e.MockPaywallAddonDependencyFragmentDoc=e.MockPaywallPriceFragmentDoc=e.MockPaywallPackageEntitlementFragmentDoc=e.CheckoutStateFragmentDoc=e.ZuoraCheckoutCredentialsFragmentDoc=e.StripeCheckoutCredentialsFragmentDoc=e.CheckoutConfigurationFragmentDoc=e.CustomerPortalFragmentDoc=e.CustomerPortalConfigurationFragmentDoc=e.TypographyConfigurationFragmentDoc=e.FontVariantFragmentDoc=e.CustomerPortalBillingInformationFragmentDoc=e.CustomerPortalPromotionalEntitlementFragmentDoc=e.CustomerPortalEntitlementFragmentDoc=e.CustomerPortalSubscriptionFragmentDoc=e.CustomerPortalSubscriptionScheduledUpdateDataFragmentDoc=e.CustomerPortalSubscriptionAddonFragmentDoc=e.CustomerPortalSubscriptionPriceFragmentDoc=e.PackagePublishedPayloadFragmentDoc=e.EntitlementUsageUpdatedFragmentDoc=e.UsageUpdatedFragmentDoc=e.EntitlementsUpdatedPayloadFragmentDoc=e.EntitlementFragmentDoc=e.FeatureFragmentDoc=e.ResetPeriodConfigurationFragmentDoc=e.SubscriptionInvoicePreviewFragmentDoc=e.SubscriptionPreviewV2FragmentDoc=e.SubscriptionPreviewInvoiceFragmentDoc=e.ImmediateSubscriptionPreviewInvoiceFragmentDoc=void 0,e.GetUsageHistoryDocument=e.GetMockPaywallDocument=e.GetCheckoutStateDocument=e.GetCustomerPortalByRefIdDocument=e.GetSdkConfigurationDocument=e.GetProductsDocument=e.GetEntitlementDocument=e.GetEntitlementsStateDocument=e.GetEntitlementsDocument=e.GetPaywallDocument=e.GetCouponsDocument=e.GetSubscriptionDocument=e.GetSubscriptionsDocument=e.GetActiveSubscriptionsListDocument=e.GetActiveSubscriptionsDocument=e.GetCustomerStatisticsDocument=e.GetCustomerByIdDocument=e.CreatePaymentSessionDocument=e.UnlinkPromotionalEntitlementsGroupDocument=e.RevokePromotionalEntitlementsGroupDocument=e.GrantPromotionalEntitlementsGroupDocument=e.GrantCreditsDocument=e.TransferSubscriptionToResourceDocument=e.DelegateSubscriptionToCustomerDocument=e.TransferSubscriptionDocument=e.UnarchiveCustomerDocument=e.ArchiveCustomerDocument=e.MigrateSubscriptionToLatestDocument=e.CreateSubscriptionDocument=e.ReportEntitlementCheckRequestedDocument=e.ReportEventDocument=e.ReportUsageBulkDocument=e.ReportUsageDocument=e.CancelSubscriptionUpdatesDocument=e.PreviewNextInvoiceDocument=e.PreviewSubscriptionDocument=e.EstimateSubscriptionUpdateDocument=e.EstimateSubscriptionDocument=e.CancelSubscriptionDocument=e.UpdateSubscriptionDocument=e.ImportSubscriptionsBulkDocument=e.ApplySubscriptionDocument=e.ProvisionSubscriptionDocument=e.RevokePromotionalEntitlementDocument=e.GrantPromotionalEntitlementsDocument=e.DetachCustomerPaymentMethodDocument=e.UpdateCustomerDocument=e.ImportCustomerDocument=e.ImportCustomerBulkDocument=e.ProvisionCustomerDocument=void 0,e.getSdk=e.OnPackagePublishedDocument=e.OnUsageUpdatedDocument=e.OnEntitlementsUpdatedDocument=e.GetCreditUsageDocument=e.GetCreditLedgerDocument=e.GetCreditGrantsDocument=e.GetCreditBalanceDocument=e.GetUsageHistoryV2Document=void 0;const n=Jl;(function(t){t.BudgetExceeded="BudgetExceeded",t.CustomerIsArchived="CustomerIsArchived",t.CustomerNotFound="CustomerNotFound",t.CustomerResourceNotFound="CustomerResourceNotFound",t.FeatureNotFound="FeatureNotFound",t.FeatureTypeMismatch="FeatureTypeMismatch",t.InsufficientCredits="InsufficientCredits",t.NoActiveSubscription="NoActiveSubscription",t.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",t.RequestedUsageExceedingLimit="RequestedUsageExceedingLimit",t.RequestedValuesMismatch="RequestedValuesMismatch",t.Revoked="Revoked",t.Unknown="Unknown"})(e.AccessDeniedReason||(e.AccessDeniedReason={})),(function(t){t.AuthorizedDomain="AUTHORIZED_DOMAIN",t.InviteOnly="INVITE_ONLY",t.Sso="SSO"})(e.AccountAccessMethod||(e.AccountAccessMethod={})),(function(t){t.Member="MEMBER",t.Owner="OWNER"})(e.AccountAccessRole||(e.AccountAccessRole={})),(function(t){t.Active="ACTIVE",t.Blocked="BLOCKED"})(e.AccountStatus||(e.AccountStatus={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.AddonSortFields||(e.AddonSortFields={})),(function(t){t.Avg="AVG",t.Count="COUNT",t.Max="MAX",t.Min="MIN",t.Sum="SUM",t.Unique="UNIQUE"})(e.AggregationFunction||(e.AggregationFunction={})),(function(t){t.Center="CENTER",t.Left="LEFT",t.Right="RIGHT"})(e.Alignment||(e.Alignment={})),(function(t){t.Id="id"})(e.ApiKeySortFields||(e.ApiKeySortFields={})),(function(t){t.Client="CLIENT",t.Salesforce="SALESFORCE",t.Server="SERVER",t.Workflow="WORKFLOW"})(e.ApiKeyType||(e.ApiKeyType={})),(function(t){t.Both="BOTH",t.Individual="INDIVIDUAL",t.Organization="ORGANIZATION"})(e.Auth0ApplicationType||(e.Auth0ApplicationType={})),(function(t){t.StartOfTheMonth="START_OF_THE_MONTH",t.SubscriptionsConsolidateBilling="SUBSCRIPTIONS_CONSOLIDATE_BILLING",t.SubscriptionStart="SUBSCRIPTION_START"})(e.BillingAnchor||(e.BillingAnchor={})),(function(t){t.OneOff="ONE_OFF",t.Recurring="RECURRING"})(e.BillingCadence||(e.BillingCadence={})),(function(t){t.CreditBased="CREDIT_BASED",t.FlatFee="FLAT_FEE",t.MinimumSpend="MINIMUM_SPEND",t.PerUnit="PER_UNIT",t.UsageBased="USAGE_BASED"})(e.BillingModel||(e.BillingModel={})),(function(t){t.Annually="ANNUALLY",t.Monthly="MONTHLY"})(e.BillingPeriod||(e.BillingPeriod={})),(function(t){t.Stripe="STRIPE",t.Zuora="ZUORA"})(e.BillingVendorIdentifier||(e.BillingVendorIdentifier={})),(function(t){t.Added="ADDED",t.Deleted="DELETED",t.Modified="MODIFIED",t.Reordered="REORDERED"})(e.ChangeType||(e.ChangeType={})),(function(t){t.Equals="EQUALS",t.GreaterThan="GREATER_THAN",t.GreaterThanOrEqual="GREATER_THAN_OR_EQUAL",t.IsNotNull="IS_NOT_NULL",t.IsNull="IS_NULL",t.LessThan="LESS_THAN",t.LessThanOrEqual="LESS_THAN_OR_EQUAL",t.NotEquals="NOT_EQUALS"})(e.ConditionOperation||(e.ConditionOperation={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.RefId="refId",t.Source="source",t.Status="status",t.Type="type",t.UpdatedAt="updatedAt"})(e.CouponSortFields||(e.CouponSortFields={})),(function(t){t.Stigg="STIGG",t.StiggAdhoc="STIGG_ADHOC",t.Stripe="STRIPE"})(e.CouponSource||(e.CouponSource={})),(function(t){t.Active="ACTIVE",t.Archived="ARCHIVED"})(e.CouponStatus||(e.CouponStatus={})),(function(t){t.Fixed="FIXED",t.Percentage="PERCENTAGE"})(e.CouponType||(e.CouponType={})),(function(t){t.Paid="PAID",t.Promotional="PROMOTIONAL"})(e.CreditGrantType||(e.CreditGrantType={})),(function(t){t.CreditsConsumed="CREDITS_CONSUMED",t.CreditsExpired="CREDITS_EXPIRED",t.CreditsGranted="CREDITS_GRANTED"})(e.CreditLedgerEventType||(e.CreditLedgerEventType={})),(function(t){t.LastDay="LAST_DAY",t.LastMonth="LAST_MONTH",t.LastWeek="LAST_WEEK",t.LastYear="LAST_YEAR"})(e.CreditUsageTimeRange||(e.CreditUsageTimeRange={})),(function(t){t.Aed="AED",t.All="ALL",t.Amd="AMD",t.Ang="ANG",t.Aud="AUD",t.Awg="AWG",t.Azn="AZN",t.Bam="BAM",t.Bbd="BBD",t.Bdt="BDT",t.Bgn="BGN",t.Bif="BIF",t.Bmd="BMD",t.Bnd="BND",t.Brl="BRL",t.Bsd="BSD",t.Bwp="BWP",t.Byn="BYN",t.Bzd="BZD",t.Cad="CAD",t.Cdf="CDF",t.Chf="CHF",t.Clp="CLP",t.Cny="CNY",t.Czk="CZK",t.Djf="DJF",t.Dkk="DKK",t.Dop="DOP",t.Dzd="DZD",t.Egp="EGP",t.Etb="ETB",t.Eur="EUR",t.Fjd="FJD",t.Gbp="GBP",t.Gel="GEL",t.Gip="GIP",t.Gmd="GMD",t.Gnf="GNF",t.Gyd="GYD",t.Hkd="HKD",t.Hrk="HRK",t.Htg="HTG",t.Idr="IDR",t.Ils="ILS",t.Inr="INR",t.Isk="ISK",t.Jmd="JMD",t.Jpy="JPY",t.Kes="KES",t.Kgs="KGS",t.Khr="KHR",t.Kmf="KMF",t.Krw="KRW",t.Kyd="KYD",t.Kzt="KZT",t.Lbp="LBP",t.Lkr="LKR",t.Lrd="LRD",t.Lsl="LSL",t.Mad="MAD",t.Mdl="MDL",t.Mga="MGA",t.Mkd="MKD",t.Mmk="MMK",t.Mnt="MNT",t.Mop="MOP",t.Mro="MRO",t.Mvr="MVR",t.Mwk="MWK",t.Mxn="MXN",t.Myr="MYR",t.Mzn="MZN",t.Nad="NAD",t.Ngn="NGN",t.Nok="NOK",t.Npr="NPR",t.Nzd="NZD",t.Pgk="PGK",t.Php="PHP",t.Pkr="PKR",t.Pln="PLN",t.Pyg="PYG",t.Qar="QAR",t.Ron="RON",t.Rsd="RSD",t.Rub="RUB",t.Rwf="RWF",t.Sar="SAR",t.Sbd="SBD",t.Scr="SCR",t.Sek="SEK",t.Sgd="SGD",t.Sle="SLE",t.Sll="SLL",t.Sos="SOS",t.Szl="SZL",t.Thb="THB",t.Tjs="TJS",t.Top="TOP",t.Try="TRY",t.Ttd="TTD",t.Tzs="TZS",t.Uah="UAH",t.Ugx="UGX",t.Usd="USD",t.Uzs="UZS",t.Vnd="VND",t.Vuv="VUV",t.Wst="WST",t.Xaf="XAF",t.Xcd="XCD",t.Xof="XOF",t.Xpf="XPF",t.Yer="YER",t.Zar="ZAR",t.Zmw="ZMW"})(e.Currency||(e.Currency={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.ResourceId="resourceId"})(e.CustomerResourceSortFields||(e.CustomerResourceSortFields={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.CrmHubspotCompanyId="crmHubspotCompanyId",t.CrmHubspotCompanyUrl="crmHubspotCompanyUrl",t.CrmId="crmId",t.CustomerId="customerId",t.DeletedAt="deletedAt",t.Email="email",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.RefId="refId",t.SalesforceId="salesforceId",t.SearchQuery="searchQuery",t.UpdatedAt="updatedAt"})(e.CustomerSortFields||(e.CustomerSortFields={})),(function(t){t.BillingCycleAnchor="billingCycleAnchor",t.BillingId="billingId",t.CancelReason="cancelReason",t.CancellationDate="cancellationDate",t.CreatedAt="createdAt",t.CrmId="crmId",t.CrmLinkUrl="crmLinkUrl",t.CurrentBillingPeriodEnd="currentBillingPeriodEnd",t.CurrentBillingPeriodStart="currentBillingPeriodStart",t.CustomerId="customerId",t.EffectiveEndDate="effectiveEndDate",t.EndDate="endDate",t.EnvironmentId="environmentId",t.Id="id",t.OldBillingId="oldBillingId",t.PayingCustomerId="payingCustomerId",t.PaymentCollection="paymentCollection",t.PricingType="pricingType",t.RefId="refId",t.ResourceId="resourceId",t.SalesforceId="salesforceId",t.StartDate="startDate",t.Status="status",t.SubscriptionId="subscriptionId",t.TrialEndDate="trialEndDate"})(e.CustomerSubscriptionSortFields||(e.CustomerSubscriptionSortFields={})),(function(t){t.CeoOrFounder="CEO_OR_FOUNDER",t.Engineering="ENGINEERING",t.Growth="GROWTH",t.Marketing="MARKETING",t.Monetization="MONETIZATION",t.Other="OTHER",t.Product="PRODUCT"})(e.Department||(e.Department={})),(function(t){t.Forever="FOREVER",t.Once="ONCE",t.Repeating="REPEATING"})(e.DiscountDurationType||(e.DiscountDurationType={})),(function(t){t.Fixed="FIXED",t.Percentage="PERCENTAGE"})(e.DiscountType||(e.DiscountType={})),(function(t){t.Increment="Increment",t.Override="Override"})(e.EntitlementBehavior||(e.EntitlementBehavior={})),(function(t){t.Day="DAY",t.Hour="HOUR",t.Month="MONTH",t.Week="WEEK",t.Year="YEAR"})(e.EntitlementResetPeriod||(e.EntitlementResetPeriod={})),(function(t){t.CustomerNotFound="CustomerNotFound",t.NoActiveSubscription="NoActiveSubscription"})(e.EntitlementsStateAccessDeniedReason||(e.EntitlementsStateAccessDeniedReason={})),(function(t){t.BlackList="BLACK_LIST",t.WhiteList="WHITE_LIST"})(e.EntitySelectionMode||(e.EntitySelectionMode={})),(function(t){t.Admin="ADMIN",t.None="NONE",t.Support="SUPPORT",t.Viewer="VIEWER"})(e.EnvironmentAccessRole||(e.EnvironmentAccessRole={})),(function(t){t.Done="DONE",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.NotProvisioned="NOT_PROVISIONED"})(e.EnvironmentProvisionStatus||(e.EnvironmentProvisionStatus={})),(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.Id="id",t.PermanentDeletionDate="permanentDeletionDate",t.Slug="slug"})(e.EnvironmentSortFields||(e.EnvironmentSortFields={})),(function(t){t.Development="DEVELOPMENT",t.Production="PRODUCTION",t.Sandbox="SANDBOX"})(e.EnvironmentType||(e.EnvironmentType={})),(function(t){t.AccessDeniedError="AccessDeniedError",t.AccountNotFoundError="AccountNotFoundError",t.AddonDependencyMissingError="AddonDependencyMissingError",t.AddonHasToHavePriceError="AddonHasToHavePriceError",t.AddonIsCompatibleWithGroup="AddonIsCompatibleWithGroup",t.AddonIsCompatibleWithPlan="AddonIsCompatibleWithPlan",t.AddonNotFound="AddonNotFound",t.AddonQuantityExceedsLimitError="AddonQuantityExceedsLimitError",t.AddonWithDraftCannotBeDeletedError="AddonWithDraftCannotBeDeletedError",t.AddonsNotFound="AddonsNotFound",t.AmountTooLarge="AmountTooLarge",t.ArchivedCouponCantBeApplied="ArchivedCouponCantBeApplied",t.AuthCustomerMismatch="AuthCustomerMismatch",t.AuthCustomerReadonly="AuthCustomerReadonly",t.AwsMarketplaceIntegrationError="AwsMarketplaceIntegrationError",t.AwsMarketplaceIntegrationValidationError="AwsMarketplaceIntegrationValidationError",t.BadUserInput="BadUserInput",t.BillingIntegrationAlreadyExistsError="BillingIntegrationAlreadyExistsError",t.BillingIntegrationMissing="BillingIntegrationMissing",t.BillingPeriodMissingError="BillingPeriodMissingError",t.CanNotUpdateEntitlementsFeatureGroup="CanNotUpdateEntitlementsFeatureGroup",t.CannotAddOverrideEntitlementToPlan="CannotAddOverrideEntitlementToPlan",t.CannotArchiveFeatureError="CannotArchiveFeatureError",t.CannotArchiveFeatureGroupError="CannotArchiveFeatureGroupError",t.CannotChangeBillingIntegration="CannotChangeBillingIntegration",t.CannotDeleteCustomerError="CannotDeleteCustomerError",t.CannotDeleteDefaultIntegration="CannotDeleteDefaultIntegration",t.CannotDeleteFeatureError="CannotDeleteFeatureError",t.CannotDeleteProductError="CannotDeleteProductError",t.CannotEditPackageInNonDraftMode="CannotEditPackageInNonDraftMode",t.CannotRemovePaymentMethodFromCustomerError="CannotRemovePaymentMethodFromCustomerError",t.CannotReportUsageForEntitlementWithMeterError="CannotReportUsageForEntitlementWithMeterError",t.CannotUpdateExpireAtForExpiredCreditGrantError="CannotUpdateExpireAtForExpiredCreditGrantError",t.CannotUpdateUnitTransformationError="CannotUpdateUnitTransformationError",t.CannotUpsertToPackageThatHasDraft="CannotUpsertToPackageThatHasDraft",t.ChangingPayingCustomerIsNotSupportedError="ChangingPayingCustomerIsNotSupportedError",t.CheckoutIsNotSupported="CheckoutIsNotSupported",t.CouponNotFound="CouponNotFound",t.CreditGrantNotFound="CreditGrantNotFound",t.CustomCurrencyNotFound="CustomCurrencyNotFound",t.CustomerAlreadyHaveCustomerCoupon="CustomerAlreadyHaveCustomerCoupon",t.CustomerAlreadyUsesCoupon="CustomerAlreadyUsesCoupon",t.CustomerHasNoEmailAddress="CustomerHasNoEmailAddress",t.CustomerNoBillingId="CustomerNoBillingId",t.CustomerNotFound="CustomerNotFound",t.CustomerResourceNotFound="CustomerResourceNotFound",t.DeprecatedEstimateSubscriptionError="DeprecatedEstimateSubscriptionError",t.DowngradeBillingPeriodNotSupportedError="DowngradeBillingPeriodNotSupportedError",t.DraftAddonCantBeArchived="DraftAddonCantBeArchived",t.DraftAlreadyExists="DraftAlreadyExists",t.DraftPlanCantBeArchived="DraftPlanCantBeArchived",t.DuplicateAddonProvisionedError="DuplicateAddonProvisionedError",t.DuplicateIntegrationNotAllowed="DuplicateIntegrationNotAllowed",t.DuplicateProductValidationError="DuplicateProductValidationError",t.DuplicatedEntityNotAllowed="DuplicatedEntityNotAllowed",t.EditAllowedOnDraftPackageOnlyError="EditAllowedOnDraftPackageOnlyError",t.EntitlementBelongsToFeatureGroupError="EntitlementBelongsToFeatureGroupError",t.EntitlementLimitExceededError="EntitlementLimitExceededError",t.EntitlementUsageOutOfRangeError="EntitlementUsageOutOfRangeError",t.EntitlementsMustBelongToSamePackage="EntitlementsMustBelongToSamePackage",t.EntityIdDifferentFromRefIdError="EntityIdDifferentFromRefIdError",t.EntityIsArchivedError="EntityIsArchivedError",t.EnvironmentMissing="EnvironmentMissing",t.ExperimentAlreadyRunning="ExperimentAlreadyRunning",t.ExperimentNotFoundError="ExperimentNotFoundError",t.ExperimentStatusError="ExperimentStatusError",t.ExpireAtMustBeLaterThanEffectiveAtError="ExpireAtMustBeLaterThanEffectiveAtError",t.FailedToCreateCheckoutSessionError="FailedToCreateCheckoutSessionError",t.FailedToImportCustomer="FailedToImportCustomer",t.FailedToImportSubscriptions="FailedToImportSubscriptions",t.FailedToResolveBillingIntegration="FailedToResolveBillingIntegration",t.FeatureConfigurationExceededLimitError="FeatureConfigurationExceededLimitError",t.FeatureGroupMissingFeaturesError="FeatureGroupMissingFeaturesError",t.FeatureGroupNotFoundError="FeatureGroupNotFoundError",t.FeatureNotBelongToFeatureGroupError="FeatureNotBelongToFeatureGroupError",t.FeatureNotFound="FeatureNotFound",t.FetchAllCountriesPricesNotAllowed="FetchAllCountriesPricesNotAllowed",t.FreePlanCantHaveCompatiblePackageGroupError="FreePlanCantHaveCompatiblePackageGroupError",t.GraphQlAliasesLimitExceeded="GraphQLAliasesLimitExceeded",t.GraphQlBatchedOperationsLimitExceeded="GraphQLBatchedOperationsLimitExceeded",t.GraphQlUnsupportedDirective="GraphQLUnsupportedDirective",t.HubspotIntegrationError="HubspotIntegrationError",t.IdentityForbidden="IdentityForbidden",t.ImportAlreadyInProgress="ImportAlreadyInProgress",t.ImportSubscriptionsBulkError="ImportSubscriptionsBulkError",t.IncompatibleSubscriptionAddon="IncompatibleSubscriptionAddon",t.InitStripePaymentMethodError="InitStripePaymentMethodError",t.IntegrationNotFound="IntegrationNotFound",t.IntegrationValidationError="IntegrationValidationError",t.IntegrityViolation="IntegrityViolation",t.InvalidAddressError="InvalidAddressError",t.InvalidArgumentError="InvalidArgumentError",t.InvalidCancellationDate="InvalidCancellationDate",t.InvalidDoggoSignatureError="InvalidDoggoSignatureError",t.InvalidEntitlementResetPeriod="InvalidEntitlementResetPeriod",t.InvalidMemberDelete="InvalidMemberDelete",t.InvalidMetadataError="InvalidMetadataError",t.InvalidQuantity="InvalidQuantity",t.InvalidSubscriptionStatus="InvalidSubscriptionStatus",t.InvalidUpdatePriceUnitAmountError="InvalidUpdatePriceUnitAmountError",t.MemberInvitationError="MemberInvitationError",t.MemberNotFound="MemberNotFound",t.MergeEnvironmentValidationError="MergeEnvironmentValidationError",t.MeterMustBeAssociatedToMeteredFeature="MeterMustBeAssociatedToMeteredFeature",t.MeteringNotAvailableForFeatureType="MeteringNotAvailableForFeatureType",t.MissingEntityIdError="MissingEntityIdError",t.MissingSubscriptionInvoiceError="MissingSubscriptionInvoiceError",t.MultiSubscriptionCantBeAutoCancellationSourceError="MultiSubscriptionCantBeAutoCancellationSourceError",t.NoDraftOfferFound="NoDraftOfferFound",t.NoFeatureEntitlementError="NoFeatureEntitlementError",t.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",t.NoProductsAvailable="NoProductsAvailable",t.OfferAlreadyExists="OfferAlreadyExists",t.OfferNotFound="OfferNotFound",t.OperationNotAllowedDuringInProgressExperiment="OperationNotAllowedDuringInProgressExperiment",t.PackageAlreadyPublished="PackageAlreadyPublished",t.PackageGroupMinItemsError="PackageGroupMinItemsError",t.PackageGroupNotFound="PackageGroupNotFound",t.PackagePricingTypeNotSet="PackagePricingTypeNotSet",t.PaymentMethodNotFoundError="PaymentMethodNotFoundError",t.PlanCannotBePublishWhenBasePlanIsDraft="PlanCannotBePublishWhenBasePlanIsDraft",t.PlanCannotBePublishWhenCompatibleAddonIsDraft="PlanCannotBePublishWhenCompatibleAddonIsDraft",t.PlanIsUsedAsDefaultStartPlan="PlanIsUsedAsDefaultStartPlan",t.PlanIsUsedAsDowngradePlan="PlanIsUsedAsDowngradePlan",t.PlanNotFound="PlanNotFound",t.PlanWithChildCantBeDeleted="PlanWithChildCantBeDeleted",t.PlansCircularDependencyError="PlansCircularDependencyError",t.PreparePaymentMethodFormError="PreparePaymentMethodFormError",t.PriceNotFound="PriceNotFound",t.ProductNotFoundError="ProductNotFoundError",t.PromotionCodeCustomerNotFirstPurchase="PromotionCodeCustomerNotFirstPurchase",t.PromotionCodeMaxRedemptionsReached="PromotionCodeMaxRedemptionsReached",t.PromotionCodeMinimumAmountNotReached="PromotionCodeMinimumAmountNotReached",t.PromotionCodeNotActive="PromotionCodeNotActive",t.PromotionCodeNotForCustomer="PromotionCodeNotForCustomer",t.PromotionCodeNotFound="PromotionCodeNotFound",t.PromotionalEntitlementNotFoundError="PromotionalEntitlementNotFoundError",t.RateLimitExceeded="RateLimitExceeded",t.RecalculateEntitlementsError="RecalculateEntitlementsError",t.RequiredSsoAuthenticationError="RequiredSsoAuthenticationError",t.ResyncAlreadyInProgress="ResyncAlreadyInProgress",t.ScheduledMigrationAlreadyExistsError="ScheduledMigrationAlreadyExistsError",t.SelectedBillingModelDoesntMatchImportedItemError="SelectedBillingModelDoesntMatchImportedItemError",t.SingleSubscriptionCantBeAutoCancellationTargetError="SingleSubscriptionCantBeAutoCancellationTargetError",t.StripeCustomerIsDeleted="StripeCustomerIsDeleted",t.StripeError="StripeError",t.SubscriptionAlreadyCanceledOrExpired="SubscriptionAlreadyCanceledOrExpired",t.SubscriptionAlreadyOnLatestPlanError="SubscriptionAlreadyOnLatestPlanError",t.SubscriptionDoesNotHaveBillingPeriod="SubscriptionDoesNotHaveBillingPeriod",t.SubscriptionInvoiceStatusError="SubscriptionInvoiceStatusError",t.SubscriptionMustHaveSinglePlanError="SubscriptionMustHaveSinglePlanError",t.SubscriptionNoBillingId="SubscriptionNoBillingId",t.SubscriptionNotFound="SubscriptionNotFound",t.TooManyCustomCurrencies="TooManyCustomCurrencies",t.TooManySubscriptionsPerCustomer="TooManySubscriptionsPerCustomer",t.TrialMustBeCancelledImmediately="TrialMustBeCancelledImmediately",t.UnPublishedPackage="UnPublishedPackage",t.Unauthenticated="Unauthenticated",t.UnexpectedError="UnexpectedError",t.UnsupportedFeatureType="UnsupportedFeatureType",t.UnsupportedParameter="UnsupportedParameter",t.UnsupportedSubscriptionScheduleType="UnsupportedSubscriptionScheduleType",t.UnsupportedVendorIdentifier="UnsupportedVendorIdentifier",t.UsageMeasurementDiffOutOfRangeError="UsageMeasurementDiffOutOfRangeError",t.VersionExceedsMaxValueError="VersionExceedsMaxValueError",t.WorkflowTriggerNotFound="WorkflowTriggerNotFound"})(e.ErrorCode||(e.ErrorCode={})),(function(t){t.AppCustomer="APP_CUSTOMER",t.AppPublic="APP_PUBLIC",t.AppServer="APP_SERVER",t.Aws="AWS",t.Import="IMPORT",t.Migration="MIGRATION",t.Salesforce="SALESFORCE",t.Scheduler="SCHEDULER",t.Service="SERVICE",t.Stripe="STRIPE",t.Support="SUPPORT",t.System="SYSTEM",t.User="USER",t.Workflow="WORKFLOW"})(e.EventActor||(e.EventActor={})),(function(t){t.Addon="ADDON",t.Coupon="COUPON",t.Credit="CREDIT",t.Customer="CUSTOMER",t.Entitlement="ENTITLEMENT",t.Feature="FEATURE",t.FeatureGroup="FEATURE_GROUP",t.Import="IMPORT",t.Measurement="MEASUREMENT",t.Package="PACKAGE",t.PackageGroup="PACKAGE_GROUP",t.Plan="PLAN",t.Product="PRODUCT",t.PromotionalEntitlement="PROMOTIONAL_ENTITLEMENT",t.Subscription="SUBSCRIPTION"})(e.EventEntityType||(e.EventEntityType={})),(function(t){t.CreatedAt="createdAt",t.EntityId="entityId",t.EnvironmentId="environmentId",t.EventLogType="eventLogType",t.Id="id",t.ParentEntityId="parentEntityId"})(e.EventLogSortFields||(e.EventLogSortFields={})),(function(t){t.AddonCreated="ADDON_CREATED",t.AddonDeleted="ADDON_DELETED",t.AddonUpdated="ADDON_UPDATED",t.CouponArchived="COUPON_ARCHIVED",t.CouponCreated="COUPON_CREATED",t.CouponUpdated="COUPON_UPDATED",t.CreateSubscriptionFailed="CREATE_SUBSCRIPTION_FAILED",t.CreditsBalanceDepleted="CREDITS_BALANCE_DEPLETED",t.CreditsBalanceUsageLow="CREDITS_BALANCE_USAGE_LOW",t.CreditsGrantDepleted="CREDITS_GRANT_DEPLETED",t.CreditsGrantExpired="CREDITS_GRANT_EXPIRED",t.CreditsGrantGranted="CREDITS_GRANT_GRANTED",t.CreditsGrantUpdated="CREDITS_GRANT_UPDATED",t.CreditsGrantUsageLow="CREDITS_GRANT_USAGE_LOW",t.CustomerCreated="CUSTOMER_CREATED",t.CustomerDeleted="CUSTOMER_DELETED",t.CustomerEntitlementCalculationTriggered="CUSTOMER_ENTITLEMENT_CALCULATION_TRIGGERED",t.CustomerPaymentFailed="CUSTOMER_PAYMENT_FAILED",t.CustomerResourceEntitlementCalculationTriggered="CUSTOMER_RESOURCE_ENTITLEMENT_CALCULATION_TRIGGERED",t.CustomerUpdated="CUSTOMER_UPDATED",t.EdgeApiCustomerDataResync="EDGE_API_CUSTOMER_DATA_RESYNC",t.EdgeApiDataResync="EDGE_API_DATA_RESYNC",t.EdgeApiDoggoResync="EDGE_API_DOGGO_RESYNC",t.EdgeApiPackageEntitlementsDataResync="EDGE_API_PACKAGE_ENTITLEMENTS_DATA_RESYNC",t.EdgeApiSubscriptionsDataResync="EDGE_API_SUBSCRIPTIONS_DATA_RESYNC",t.EntitlementsUpdated="ENTITLEMENTS_UPDATED",t.EntitlementDenied="ENTITLEMENT_DENIED",t.EntitlementGranted="ENTITLEMENT_GRANTED",t.EntitlementRequested="ENTITLEMENT_REQUESTED",t.EntitlementUsageExceeded="ENTITLEMENT_USAGE_EXCEEDED",t.EnvironmentDeleted="ENVIRONMENT_DELETED",t.FeatureArchived="FEATURE_ARCHIVED",t.FeatureCreated="FEATURE_CREATED",t.FeatureDeleted="FEATURE_DELETED",t.FeatureGroupArchived="FEATURE_GROUP_ARCHIVED",t.FeatureGroupCreated="FEATURE_GROUP_CREATED",t.FeatureGroupUnArchived="FEATURE_GROUP_UN_ARCHIVED",t.FeatureGroupUpdated="FEATURE_GROUP_UPDATED",t.FeatureUpdated="FEATURE_UPDATED",t.ImportIntegrationCatalogTriggered="IMPORT_INTEGRATION_CATALOG_TRIGGERED",t.ImportIntegrationCustomersTriggered="IMPORT_INTEGRATION_CUSTOMERS_TRIGGERED",t.ImportSubscriptionsBulkTriggered="IMPORT_SUBSCRIPTIONS_BULK_TRIGGERED",t.MeasurementReported="MEASUREMENT_REPORTED",t.PackageGroupCreated="PACKAGE_GROUP_CREATED",t.PackageGroupUpdated="PACKAGE_GROUP_UPDATED",t.PackagePublished="PACKAGE_PUBLISHED",t.PlanCreated="PLAN_CREATED",t.PlanDeleted="PLAN_DELETED",t.PlanUpdated="PLAN_UPDATED",t.ProductCreated="PRODUCT_CREATED",t.ProductDeleted="PRODUCT_DELETED",t.ProductUpdated="PRODUCT_UPDATED",t.PromotionalEntitlementExpired="PROMOTIONAL_ENTITLEMENT_EXPIRED",t.PromotionalEntitlementGranted="PROMOTIONAL_ENTITLEMENT_GRANTED",t.PromotionalEntitlementRevoked="PROMOTIONAL_ENTITLEMENT_REVOKED",t.PromotionalEntitlementUpdated="PROMOTIONAL_ENTITLEMENT_UPDATED",t.RecalculateEntitlementsTriggered="RECALCULATE_ENTITLEMENTS_TRIGGERED",t.ResyncIntegrationTriggered="RESYNC_INTEGRATION_TRIGGERED",t.SubscriptionsMigrated="SUBSCRIPTIONS_MIGRATED",t.SubscriptionsMigrationTriggered="SUBSCRIPTIONS_MIGRATION_TRIGGERED",t.SubscriptionBillingMonthEndsSoon="SUBSCRIPTION_BILLING_MONTH_ENDS_SOON",t.SubscriptionCanceled="SUBSCRIPTION_CANCELED",t.SubscriptionCreated="SUBSCRIPTION_CREATED",t.SubscriptionExpired="SUBSCRIPTION_EXPIRED",t.SubscriptionSpentLimitExceeded="SUBSCRIPTION_SPENT_LIMIT_EXCEEDED",t.SubscriptionTrialConverted="SUBSCRIPTION_TRIAL_CONVERTED",t.SubscriptionTrialEndsSoon="SUBSCRIPTION_TRIAL_ENDS_SOON",t.SubscriptionTrialExpired="SUBSCRIPTION_TRIAL_EXPIRED",t.SubscriptionTrialStarted="SUBSCRIPTION_TRIAL_STARTED",t.SubscriptionUpdated="SUBSCRIPTION_UPDATED",t.SubscriptionUsageChargeTriggered="SUBSCRIPTION_USAGE_CHARGE_TRIGGERED",t.SubscriptionUsageUpdated="SUBSCRIPTION_USAGE_UPDATED",t.SyncFailed="SYNC_FAILED",t.WidgetConfigurationUpdated="WIDGET_CONFIGURATION_UPDATED"})(e.EventLogType||(e.EventLogType={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.ProductId="productId",t.RefId="refId",t.Status="status"})(e.ExperimentSortFields||(e.ExperimentSortFields={})),(function(t){t.Completed="COMPLETED",t.Draft="DRAFT",t.InProgress="IN_PROGRESS"})(e.ExperimentStatus||(e.ExperimentStatus={})),(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.FeatureGroupId="featureGroupId",t.Id="id",t.IsLatest="isLatest",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.FeatureGroupSortFields||(e.FeatureGroupSortFields={})),(function(t){t.Archived="ARCHIVED",t.Published="PUBLISHED"})(e.FeatureGroupStatus||(e.FeatureGroupStatus={})),(function(t){t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.FeatureStatus="featureStatus",t.FeatureType="featureType",t.Id="id",t.MeterType="meterType",t.RefId="refId",t.UpdatedAt="updatedAt"})(e.FeatureSortFields||(e.FeatureSortFields={})),(function(t){t.Active="ACTIVE",t.New="NEW",t.Suspended="SUSPENDED"})(e.FeatureStatus||(e.FeatureStatus={})),(function(t){t.Boolean="BOOLEAN",t.Enum="ENUM",t.Number="NUMBER"})(e.FeatureType||(e.FeatureType={})),(function(t){t.Bold="BOLD",t.Normal="NORMAL"})(e.FontWeight||(e.FontWeight={})),(function(t){t.CreatedAt="createdAt",t.Endpoint="endpoint",t.EnvironmentId="environmentId",t.Id="id",t.Status="status"})(e.HookSortFields||(e.HookSortFields={})),(function(t){t.Active="ACTIVE",t.Inactive="INACTIVE"})(e.HookStatus||(e.HookStatus={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.TaskType="taskType"})(e.ImportIntegrationTaskSortFields||(e.ImportIntegrationTaskSortFields={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.VendorIdentifier="vendorIdentifier",t.VendorType="vendorType"})(e.IntegrationSortFields||(e.IntegrationSortFields={})),(function(t){t.AddonCharge="AddonCharge",t.BaseCharge="BaseCharge",t.InAdvanceCommitmentCharge="InAdvanceCommitmentCharge",t.MinimumSpendAdjustmentCharge="MinimumSpendAdjustmentCharge",t.MinimumSpendCharge="MinimumSpendCharge",t.Other="Other",t.OverageCharge="OverageCharge",t.PayAsYouGoCharge="PayAsYouGoCharge",t.TierCharge="TierCharge",t.ZeroAmountBaseCharge="ZeroAmountBaseCharge"})(e.InvoiceLineItemType||(e.InvoiceLineItemType={})),(function(t){t.CreatedAt="createdAt",t.Email="email",t.Id="id"})(e.MemberSortFields||(e.MemberSortFields={})),(function(t){t.Invited="INVITED",t.Registered="REGISTERED"})(e.MemberStatus||(e.MemberStatus={})),(function(t){t.Fluctuating="Fluctuating",t.Incremental="Incremental",t.None="None"})(e.MeterType||(e.MeterType={})),(function(t){t.StartOfTheMonth="StartOfTheMonth",t.SubscriptionStart="SubscriptionStart"})(e.MonthlyAccordingTo||(e.MonthlyAccordingTo={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.IsDefault="isDefault",t.IsLatest="isLatest",t.OfferId="offerId",t.Status="status",t.Version="version"})(e.OfferSortFields||(e.OfferSortFields={})),(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED"})(e.OfferStatus||(e.OfferStatus={})),(function(t){t.Monthly="MONTHLY",t.OnSubscriptionRenewal="ON_SUBSCRIPTION_RENEWAL"})(e.OverageBillingPeriod||(e.OverageBillingPeriod={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.PackageDtoSortFields||(e.PackageDtoSortFields={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.PackageId="packageId",t.UpdatedAt="updatedAt"})(e.PackageEntitlementSortFields||(e.PackageEntitlementSortFields={})),(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.IsLatest="isLatest",t.PackageGroupId="packageGroupId",t.ProductId="productId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.PackageGroupSortFields||(e.PackageGroupSortFields={})),(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED"})(e.PackageGroupStatus||(e.PackageGroupStatus={})),(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED"})(e.PackageStatus||(e.PackageStatus={})),(function(t){t.ActionRequired="ACTION_REQUIRED",t.Failed="FAILED",t.NotRequired="NOT_REQUIRED",t.Processing="PROCESSING"})(e.PaymentCollection||(e.PaymentCollection={})),(function(t){t.Charge="CHARGE",t.Invoice="INVOICE",t.None="NONE"})(e.PaymentCollectionMethod||(e.PaymentCollectionMethod={})),(function(t){t.Bank="BANK",t.Card="CARD",t.CashApp="CASH_APP"})(e.PaymentMethodType||(e.PaymentMethodType={})),(function(t){t.Downgrade="DOWNGRADE",t.None="NONE",t.Upgrade="UPGRADE"})(e.PlanChangeType||(e.PlanChangeType={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.PlanSortFields||(e.PlanSortFields={})),(function(t){t.BillingCadence="billingCadence",t.BillingId="billingId",t.BillingModel="billingModel",t.BillingPeriod="billingPeriod",t.CreatedAt="createdAt",t.Id="id",t.TiersMode="tiersMode"})(e.PriceSortFields||(e.PriceSortFields={})),(function(t){t.Custom="CUSTOM",t.Free="FREE",t.Paid="PAID"})(e.PricingType||(e.PricingType={})),(function(t){t.AwsMarketplaceProductCode="awsMarketplaceProductCode",t.AwsMarketplaceProductId="awsMarketplaceProductId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsDefaultProduct="isDefaultProduct",t.MultipleSubscriptions="multipleSubscriptions",t.RefId="refId",t.UpdatedAt="updatedAt"})(e.ProductSortFields||(e.ProductSortFields={})),(function(t){t.Custom="CUSTOM",t.Lifetime="LIFETIME",t.OneMonth="ONE_MONTH",t.OneWeek="ONE_WEEK",t.OneYear="ONE_YEAR",t.SixMonth="SIX_MONTH"})(e.PromotionalEntitlementPeriod||(e.PromotionalEntitlementPeriod={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.UpdatedAt="updatedAt"})(e.PromotionalEntitlementSortFields||(e.PromotionalEntitlementSortFields={})),(function(t){t.Active="Active",t.Expired="Expired",t.Paused="Paused"})(e.PromotionalEntitlementStatus||(e.PromotionalEntitlementStatus={})),(function(t){t.CreateProrations="CREATE_PRORATIONS",t.InvoiceImmediately="INVOICE_IMMEDIATELY"})(e.ProrationBehavior||(e.ProrationBehavior={})),(function(t){t.PaymentRequired="PAYMENT_REQUIRED",t.Success="SUCCESS"})(e.ProvisionSubscriptionStatus||(e.ProvisionSubscriptionStatus={})),(function(t){t.AllCustomers="ALL_CUSTOMERS",t.NewCustomers="NEW_CUSTOMERS"})(e.PublishMigrationType||(e.PublishMigrationType={})),(function(t){t.EndOfBillingMonth="END_OF_BILLING_MONTH",t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE"})(e.ScheduleStrategy||(e.ScheduleStrategy={})),(function(t){t.Asc="ASC",t.Desc="DESC"})(e.SortDirection||(e.SortDirection={})),(function(t){t.NullsFirst="NULLS_FIRST",t.NullsLast="NULLS_LAST"})(e.SortNulls||(e.SortNulls={})),(function(t){t.JsClientSdk="JS_CLIENT_SDK",t.NodeServerSdk="NODE_SERVER_SDK",t.PersistentCacheService="PERSISTENT_CACHE_SERVICE"})(e.SourceType||(e.SourceType={})),(function(t){t.CreatedAt="createdAt",t.Id="id",t.Quantity="quantity",t.UpdatedAt="updatedAt"})(e.SubscriptionAddonSortFields||(e.SubscriptionAddonSortFields={})),(function(t){t.AutoCancellationRule="AutoCancellationRule",t.CancelledByBilling="CancelledByBilling",t.CustomerArchived="CustomerArchived",t.DetachBilling="DetachBilling",t.Expired="Expired",t.Immediate="Immediate",t.PendingPaymentExpired="PendingPaymentExpired",t.ScheduledCancellation="ScheduledCancellation",t.TrialConverted="TrialConverted",t.TrialEnded="TrialEnded",t.UpgradeOrDowngrade="UpgradeOrDowngrade"})(e.SubscriptionCancelReason||(e.SubscriptionCancelReason={})),(function(t){t.Default="DEFAULT",t.RevokeEntitlements="REVOKE_ENTITLEMENTS"})(e.SubscriptionCancellationAction||(e.SubscriptionCancellationAction={})),(function(t){t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE",t.SpecificDate="SPECIFIC_DATE"})(e.SubscriptionCancellationTime||(e.SubscriptionCancellationTime={})),(function(t){t.Active="ACTIVE",t.Expired="EXPIRED",t.Removed="REMOVED"})(e.SubscriptionCouponStatus||(e.SubscriptionCouponStatus={})),(function(t){t.PredefinedFreePlan="PREDEFINED_FREE_PLAN",t.PredefinedTrialPlan="PREDEFINED_TRIAL_PLAN",t.RequestedPlan="REQUESTED_PLAN",t.SkippedSubscriptionCreation="SKIPPED_SUBSCRIPTION_CREATION"})(e.SubscriptionDecisionStrategy||(e.SubscriptionDecisionStrategy={})),(function(t){t.CancelSubscription="CANCEL_SUBSCRIPTION",t.DowngradeToFree="DOWNGRADE_TO_FREE"})(e.SubscriptionEndSetup||(e.SubscriptionEndSetup={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.SubscriptionId="subscriptionId",t.UpdatedAt="updatedAt"})(e.SubscriptionEntitlementSortFields||(e.SubscriptionEntitlementSortFields={})),(function(t){t.BillingCycle="BILLING_CYCLE",t.Manual="MANUAL",t.MinimumInvoiceAmountExceeded="MINIMUM_INVOICE_AMOUNT_EXCEEDED",t.Other="OTHER",t.SubscriptionCreation="SUBSCRIPTION_CREATION",t.SubscriptionUpdate="SUBSCRIPTION_UPDATE"})(e.SubscriptionInvoiceBillingReason||(e.SubscriptionInvoiceBillingReason={})),(function(t){t.Canceled="CANCELED",t.Open="OPEN",t.Paid="PAID"})(e.SubscriptionInvoiceStatus||(e.SubscriptionInvoiceStatus={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.TaskType="taskType"})(e.SubscriptionMigrationTaskSortFields||(e.SubscriptionMigrationTaskSortFields={})),(function(t){t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE"})(e.SubscriptionMigrationTime||(e.SubscriptionMigrationTime={})),(function(t){t.BillingModel="billingModel",t.CreatedAt="createdAt",t.FeatureId="featureId",t.HasSoftLimit="hasSoftLimit",t.Id="id",t.UpdatedAt="updatedAt",t.UsageLimit="usageLimit"})(e.SubscriptionPriceSortFields||(e.SubscriptionPriceSortFields={})),(function(t){t.CreateProrations="CREATE_PRORATIONS",t.InvoiceImmediately="INVOICE_IMMEDIATELY",t.None="NONE"})(e.SubscriptionProrationBehavior||(e.SubscriptionProrationBehavior={})),(function(t){t.CreatedAt="createdAt",t.CustomerId="customerId",t.EnvironmentId="environmentId",t.ProductId="productId",t.ResourceId="resourceId",t.StartDate="startDate",t.Status="status"})(e.SubscriptionQuerySortFields||(e.SubscriptionQuerySortFields={})),(function(t){t.Canceled="Canceled",t.Done="Done",t.Failed="Failed",t.PendingPayment="PendingPayment",t.Scheduled="Scheduled"})(e.SubscriptionScheduleStatus||(e.SubscriptionScheduleStatus={})),(function(t){t.AdditionalMetaData="AdditionalMetaData",t.Addon="Addon",t.BillingInfoMetadata="BillingInfoMetadata",t.BillingPeriod="BillingPeriod",t.Coupon="Coupon",t.Downgrade="Downgrade",t.MigrateToLatest="MigrateToLatest",t.Plan="Plan",t.PriceOverride="PriceOverride",t.UnitAmount="UnitAmount"})(e.SubscriptionScheduleType||(e.SubscriptionScheduleType={})),(function(t){t.FreePlan="FREE_PLAN",t.PlanSelection="PLAN_SELECTION",t.TrialPeriod="TRIAL_PERIOD"})(e.SubscriptionStartSetup||(e.SubscriptionStartSetup={})),(function(t){t.Active="ACTIVE",t.Canceled="CANCELED",t.Expired="EXPIRED",t.InTrial="IN_TRIAL",t.NotStarted="NOT_STARTED",t.PaymentPending="PAYMENT_PENDING"})(e.SubscriptionStatus||(e.SubscriptionStatus={})),(function(t){t.AlwaysReset="ALWAYS_RESET",t.BillingPeriodChange="BILLING_PERIOD_CHANGE",t.NeverReset="NEVER_RESET"})(e.SubscriptionUpdateUsageCutoffBehavior||(e.SubscriptionUpdateUsageCutoffBehavior={})),(function(t){t.Error="ERROR",t.NoSyncRequired="NO_SYNC_REQUIRED",t.Pending="PENDING",t.Success="SUCCESS"})(e.SyncStatus||(e.SyncStatus={})),(function(t){t.Canceled="CANCELED",t.Completed="COMPLETED",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.PartiallyFailed="PARTIALLY_FAILED",t.Pending="PENDING"})(e.TaskStatus||(e.TaskStatus={})),(function(t){t.ImportIntegrationCatalog="IMPORT_INTEGRATION_CATALOG",t.ImportIntegrationCustomers="IMPORT_INTEGRATION_CUSTOMERS",t.ImportSubscriptionsBulk="IMPORT_SUBSCRIPTIONS_BULK",t.RecalculateBatchEntitlements="RECALCULATE_BATCH_ENTITLEMENTS",t.RecalculateEntitlements="RECALCULATE_ENTITLEMENTS",t.ResyncIntegration="RESYNC_INTEGRATION",t.SubscriptionMigration="SUBSCRIPTION_MIGRATION",t.SubscriptionMigrationV2="SUBSCRIPTION_MIGRATION_V2"})(e.TaskType||(e.TaskType={})),(function(t){t.Graduated="GRADUATED",t.Volume="VOLUME"})(e.TiersMode||(e.TiersMode={})),(function(t){t.CancelSubscription="CANCEL_SUBSCRIPTION",t.ConvertToPaid="CONVERT_TO_PAID"})(e.TrialEndBehavior||(e.TrialEndBehavior={})),(function(t){t.Day="DAY",t.Month="MONTH"})(e.TrialPeriodUnits||(e.TrialPeriodUnits={})),(function(t){t.Down="DOWN",t.Up="UP"})(e.UnitTransformationRound||(e.UnitTransformationRound={})),(function(t){t.PeriodicReset="PERIODIC_RESET",t.SubscriptionChangeReset="SUBSCRIPTION_CHANGE_RESET"})(e.UsageMarkerType||(e.UsageMarkerType={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id"})(e.UsageMeasurementSortFields||(e.UsageMeasurementSortFields={})),(function(t){t.Delta="DELTA",t.Set="SET"})(e.UsageUpdateBehavior||(e.UsageUpdateBehavior={})),(function(t){t.Auth0="AUTH0",t.AwsMarketplace="AWS_MARKETPLACE",t.BigQuery="BIG_QUERY",t.Hubspot="HUBSPOT",t.OpenFga="OPEN_FGA",t.Salesforce="SALESFORCE",t.Snowflake="SNOWFLAKE",t.Stripe="STRIPE",t.Zuora="ZUORA"})(e.VendorIdentifier||(e.VendorIdentifier={})),(function(t){t.Auth="AUTH",t.Billing="BILLING",t.Crm="CRM",t.DataExport="DATA_EXPORT",t.Marketplace="MARKETPLACE"})(e.VendorType||(e.VendorType={})),(function(t){t.EveryFriday="EveryFriday",t.EveryMonday="EveryMonday",t.EverySaturday="EverySaturday",t.EverySunday="EverySunday",t.EveryThursday="EveryThursday",t.EveryTuesday="EveryTuesday",t.EveryWednesday="EveryWednesday",t.SubscriptionStart="SubscriptionStart"})(e.WeeklyAccordingTo||(e.WeeklyAccordingTo={})),(function(t){t.Checkout="CHECKOUT",t.CustomerPortal="CUSTOMER_PORTAL",t.Paywall="PAYWALL"})(e.WidgetType||(e.WidgetType={})),(function(t){t.SubscriptionStart="SubscriptionStart"})(e.YearlyAccordingTo||(e.YearlyAccordingTo={})),(function(t){t.Control="CONTROL",t.Variant="VARIANT"})(e.ExperimentGroupType||(e.ExperimentGroupType={})),e.PageInfoFragmentDoc=(0,n.default)`
673
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Ln.set(t,s=new Set),s.add(a),n.has(a)||(n.add(a),i.push(r))}else i.push(r)}),_t(_t({},e),{definitions:i})}function Nm(e){var n=new Set(e.definitions);n.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(t){var a=r[t];a&&typeof a=="object"&&n.add(a)})});var i=e.loc;return i&&(delete i.startToken,delete i.endToken),e}function wm(e){var n=Ra(e);if(!Ut.has(n)){var i=Im(e,{experimentalFragmentVariables:$t,allowLegacyFragmentVariables:$t});if(!i||i.kind!=="Document")throw new Error("Not a valid GraphQL document.");Ut.set(n,Nm(km(i)))}return Ut.get(n)}function _e(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];typeof e=="string"&&(e=[e]);var r=e[0];return n.forEach(function(t,a){t&&t.kind==="Document"?r+=t.loc.source.body:r+=t,r+=e[a+1]}),wm(r)}function Ma(){Ut.clear(),Ln.clear()}function Ua(){ja=!1}function Oa(){$t=!0}function La(){$t=!1}var it={gql:_e,resetCaches:Ma,disableFragmentWarnings:Ua,enableExperimentalFragmentVariables:Oa,disableExperimentalFragmentVariables:La};(function(e){e.gql=it.gql,e.resetCaches=it.resetCaches,e.disableFragmentWarnings=it.disableFragmentWarnings,e.enableExperimentalFragmentVariables=it.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=it.disableExperimentalFragmentVariables})(_e||(_e={}));_e.default=_e;const Fm=_e,jm=Object.freeze(Object.defineProperty({__proto__:null,default:Fm,disableExperimentalFragmentVariables:La,disableFragmentWarnings:Ua,enableExperimentalFragmentVariables:Oa,get gql(){return _e},resetCaches:Ma},Symbol.toStringTag,{value:"Module"})),Rm=Fs(jm);var lr;function Mm(){return lr||(lr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureStatus=e.FeatureSortFields=e.FeatureGroupStatus=e.FeatureGroupSortFields=e.ExperimentStatus=e.ExperimentSortFields=e.EventLogType=e.EventLogSortFields=e.EventEntityType=e.EventActor=e.ErrorCode=e.EnvironmentType=e.EnvironmentSortFields=e.EnvironmentProvisionStatus=e.EnvironmentAccessRole=e.EntitySelectionMode=e.EntitlementsStateAccessDeniedReason=e.EntitlementResetPeriod=e.EntitlementBehavior=e.DiscountType=e.DiscountDurationType=e.Department=e.CustomerSubscriptionSortFields=e.CustomerSortFields=e.CustomerResourceSortFields=e.Currency=e.CreditUsageTimeRange=e.CreditLedgerEventType=e.CreditGrantType=e.CouponType=e.CouponStatus=e.CouponSource=e.CouponSortFields=e.ConditionOperation=e.ChangeType=e.BillingVendorIdentifier=e.BillingPeriod=e.BillingModel=e.BillingCadence=e.BillingAnchor=e.Auth0ApplicationType=e.ApiKeyType=e.ApiKeySortFields=e.Alignment=e.AggregationFunction=e.AddonSortFields=e.AccountStatus=e.AccountAccessRole=e.AccountAccessMethod=e.AccessDeniedReason=void 0,e.SubscriptionPriceSortFields=e.SubscriptionMigrationTime=e.SubscriptionMigrationTaskSortFields=e.SubscriptionInvoiceStatus=e.SubscriptionInvoiceBillingReason=e.SubscriptionEntitlementSortFields=e.SubscriptionEndSetup=e.SubscriptionDecisionStrategy=e.SubscriptionCouponStatus=e.SubscriptionCancellationTime=e.SubscriptionCancellationAction=e.SubscriptionCancelReason=e.SubscriptionAddonSortFields=e.SourceType=e.SortNulls=e.SortDirection=e.ScheduleStrategy=e.PublishMigrationType=e.ProvisionSubscriptionStatus=e.ProrationBehavior=e.PromotionalEntitlementStatus=e.PromotionalEntitlementSortFields=e.PromotionalEntitlementPeriod=e.ProductSortFields=e.PricingType=e.PriceSortFields=e.PlanSortFields=e.PlanChangeType=e.PaymentMethodType=e.PaymentCollectionMethod=e.PaymentCollection=e.PackageStatus=e.PackageGroupStatus=e.PackageGroupSortFields=e.PackageEntitlementSortFields=e.PackageDtoSortFields=e.OverageBillingPeriod=e.OfferStatus=e.OfferSortFields=e.MonthlyAccordingTo=e.MeterType=e.MemberStatus=e.MemberSortFields=e.InvoiceLineItemType=e.IntegrationSortFields=e.ImportIntegrationTaskSortFields=e.HookStatus=e.HookSortFields=e.FontWeight=e.FeatureType=void 0,e.SubscriptionPreviewFragmentDoc=e.CustomerStatisticsFragmentDoc=e.CustomerWithSubscriptionsFragmentDoc=e.SubscriptionFragmentDoc=e.SubscriptionTrialConfigurationFragmentDoc=e.SubscriptionFutureUpdateDataFragmentDoc=e.SubscriptionScheduledUpdateDataFragmentDoc=e.ScheduleVariablesFragmentDoc=e.PlanFragmentDoc=e.PlanCompatiblePackageGroupsFragmentDoc=e.AddonFragmentDoc=e.AddonDependencyFragmentDoc=e.OveragePriceFragmentDoc=e.PackageEntitlementFragmentDoc=e.ProductFragmentDoc=e.TotalPriceFragmentDoc=e.PriceFragmentDoc=e.PriceTierFragmentDoc=e.CustomerResourceFragmentDoc=e.SubscriptionInvoiceFragmentDoc=e.CustomerFragmentDoc=e.PromotionalEntitlementFragmentDoc=e.CouponFragmentDoc=e.SlimCustomerFragmentDoc=e.SlimSubscriptionFragmentV2FragmentDoc=e.SubscriptionQueryFragmentDoc=e.PageInfoFragmentDoc=e.ExperimentGroupType=e.YearlyAccordingTo=e.WidgetType=e.WeeklyAccordingTo=e.VendorType=e.VendorIdentifier=e.UsageUpdateBehavior=e.UsageMeasurementSortFields=e.UsageMarkerType=e.UnitTransformationRound=e.TrialPeriodUnits=e.TrialEndBehavior=e.TiersMode=e.TaskType=e.TaskStatus=e.SyncStatus=e.SubscriptionUpdateUsageCutoffBehavior=e.SubscriptionStatus=e.SubscriptionStartSetup=e.SubscriptionScheduleType=e.SubscriptionScheduleStatus=e.SubscriptionQuerySortFields=e.SubscriptionProrationBehavior=void 0,e.PaymentSessionFragmentDoc=e.CreditsBalanceSummaryFragmentDoc=e.CreditBalanceFragmentDoc=e.CreditLedgerFragmentDoc=e.CreditGrantFragmentDoc=e.ReportUsageFragmentDoc=e.ProvisionSubscriptionFragmentDoc=e.ApplySubscriptionFragmentDoc=e.ProvisionCustomerFragmentDoc=e.SlimSubscriptionFragmentDoc=e.UsageHistoryV2FragmentDoc=e.UsageHistoryFragmentDoc=e.PaywallFragmentDoc=e.PaywallCalculatedPricePointsFragmentDoc=e.PaywallConfigurationFragmentDoc=e.LayoutConfigurationFragmentDoc=e.PaywallCurrencyFragmentDoc=e.MockPaywallPlanFragmentDoc=e.MockPaywallPlanCompatiblePackageGroupsFragmentDoc=e.MockPaywallAddonFragmentDoc=e.MockPaywallAddonDependencyFragmentDoc=e.MockPaywallPriceFragmentDoc=e.MockPaywallPackageEntitlementFragmentDoc=e.CheckoutStateFragmentDoc=e.ZuoraCheckoutCredentialsFragmentDoc=e.StripeCheckoutCredentialsFragmentDoc=e.CheckoutConfigurationFragmentDoc=e.CustomerPortalFragmentDoc=e.CustomerPortalConfigurationFragmentDoc=e.TypographyConfigurationFragmentDoc=e.FontVariantFragmentDoc=e.CustomerPortalBillingInformationFragmentDoc=e.CustomerPortalPromotionalEntitlementFragmentDoc=e.CustomerPortalEntitlementFragmentDoc=e.CustomerPortalSubscriptionFragmentDoc=e.CustomerPortalSubscriptionScheduledUpdateDataFragmentDoc=e.CustomerPortalSubscriptionAddonFragmentDoc=e.CustomerPortalSubscriptionPriceFragmentDoc=e.CreditBalanceUpdatedPayloadFragmentDoc=e.PackagePublishedPayloadFragmentDoc=e.EntitlementUsageUpdatedFragmentDoc=e.UsageUpdatedFragmentDoc=e.EntitlementsUpdatedPayloadFragmentDoc=e.EntitlementFragmentDoc=e.FeatureFragmentDoc=e.ResetPeriodConfigurationFragmentDoc=e.SubscriptionInvoicePreviewFragmentDoc=e.SubscriptionPreviewV2FragmentDoc=e.SubscriptionPreviewInvoiceFragmentDoc=e.ImmediateSubscriptionPreviewInvoiceFragmentDoc=void 0,e.GetCustomerPortalByRefIdDocument=e.GetSdkConfigurationDocument=e.GetProductsDocument=e.GetEntitlementDocument=e.GetEntitlementsStateDocument=e.GetEntitlementsDocument=e.GetPaywallDocument=e.GetCouponsDocument=e.GetSubscriptionDocument=e.GetSubscriptionsDocument=e.GetActiveSubscriptionsListDocument=e.GetActiveSubscriptionsDocument=e.GetCustomerStatisticsDocument=e.GetCustomerByIdDocument=e.VoidCreditGrantDocument=e.CreatePaymentSessionDocument=e.UnlinkPromotionalEntitlementsGroupDocument=e.RevokePromotionalEntitlementsGroupDocument=e.GrantPromotionalEntitlementsGroupDocument=e.GrantCreditsDocument=e.TransferSubscriptionToResourceDocument=e.DelegateSubscriptionToCustomerDocument=e.TransferSubscriptionDocument=e.UnarchiveCustomerDocument=e.ArchiveCustomerDocument=e.MigrateSubscriptionToLatestDocument=e.CreateSubscriptionDocument=e.ReportEntitlementCheckRequestedDocument=e.ReportEventDocument=e.ReportUsageBulkDocument=e.ReportUsageDocument=e.CancelSubscriptionUpdatesDocument=e.PreviewNextInvoiceDocument=e.PreviewSubscriptionDocument=e.EstimateSubscriptionUpdateDocument=e.EstimateSubscriptionDocument=e.CancelSubscriptionDocument=e.UpdateSubscriptionDocument=e.ImportSubscriptionsBulkDocument=e.ApplySubscriptionDocument=e.ProvisionSubscriptionDocument=e.RevokePromotionalEntitlementDocument=e.GrantPromotionalEntitlementsDocument=e.DetachCustomerPaymentMethodDocument=e.UpdateCustomerDocument=e.ImportCustomerDocument=e.ImportCustomerBulkDocument=e.ProvisionCustomerDocument=e.CreditUsageFragmentDoc=e.SlimCustomCurrencyFragmentDoc=void 0,e.getSdk=e.OnCreditBalanceUpdatedDocument=e.OnPackagePublishedDocument=e.OnUsageUpdatedDocument=e.OnEntitlementsUpdatedDocument=e.GetCreditUsageDocument=e.GetCreditLedgerDocument=e.GetCreditGrantsDocument=e.GetCreditBalanceDocument=e.GetUsageHistoryV2Document=e.GetUsageHistoryDocument=e.GetMockPaywallDocument=e.GetCheckoutStateDocument=void 0;const n=Rm;(function(t){t.BudgetExceeded="BudgetExceeded",t.CustomerIsArchived="CustomerIsArchived",t.CustomerNotFound="CustomerNotFound",t.CustomerResourceNotFound="CustomerResourceNotFound",t.FeatureNotFound="FeatureNotFound",t.FeatureTypeMismatch="FeatureTypeMismatch",t.InsufficientCredits="InsufficientCredits",t.NoActiveSubscription="NoActiveSubscription",t.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",t.RequestedUsageExceedingLimit="RequestedUsageExceedingLimit",t.RequestedValuesMismatch="RequestedValuesMismatch",t.Revoked="Revoked",t.Unknown="Unknown"})(e.AccessDeniedReason||(e.AccessDeniedReason={})),(function(t){t.AuthorizedDomain="AUTHORIZED_DOMAIN",t.InviteOnly="INVITE_ONLY",t.Sso="SSO"})(e.AccountAccessMethod||(e.AccountAccessMethod={})),(function(t){t.Member="MEMBER",t.Owner="OWNER"})(e.AccountAccessRole||(e.AccountAccessRole={})),(function(t){t.Active="ACTIVE",t.Blocked="BLOCKED"})(e.AccountStatus||(e.AccountStatus={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.AddonSortFields||(e.AddonSortFields={})),(function(t){t.Avg="AVG",t.Count="COUNT",t.Max="MAX",t.Min="MIN",t.Sum="SUM",t.Unique="UNIQUE"})(e.AggregationFunction||(e.AggregationFunction={})),(function(t){t.Center="CENTER",t.Left="LEFT",t.Right="RIGHT"})(e.Alignment||(e.Alignment={})),(function(t){t.Id="id"})(e.ApiKeySortFields||(e.ApiKeySortFields={})),(function(t){t.Client="CLIENT",t.Salesforce="SALESFORCE",t.Server="SERVER",t.Workflow="WORKFLOW"})(e.ApiKeyType||(e.ApiKeyType={})),(function(t){t.Both="BOTH",t.Individual="INDIVIDUAL",t.Organization="ORGANIZATION"})(e.Auth0ApplicationType||(e.Auth0ApplicationType={})),(function(t){t.StartOfTheMonth="START_OF_THE_MONTH",t.SubscriptionsConsolidateBilling="SUBSCRIPTIONS_CONSOLIDATE_BILLING",t.SubscriptionStart="SUBSCRIPTION_START"})(e.BillingAnchor||(e.BillingAnchor={})),(function(t){t.OneOff="ONE_OFF",t.Recurring="RECURRING"})(e.BillingCadence||(e.BillingCadence={})),(function(t){t.CreditBased="CREDIT_BASED",t.FlatFee="FLAT_FEE",t.MinimumSpend="MINIMUM_SPEND",t.PerUnit="PER_UNIT",t.UsageBased="USAGE_BASED"})(e.BillingModel||(e.BillingModel={})),(function(t){t.Annually="ANNUALLY",t.Monthly="MONTHLY"})(e.BillingPeriod||(e.BillingPeriod={})),(function(t){t.Stripe="STRIPE",t.Zuora="ZUORA"})(e.BillingVendorIdentifier||(e.BillingVendorIdentifier={})),(function(t){t.Added="ADDED",t.Deleted="DELETED",t.Modified="MODIFIED",t.Reordered="REORDERED"})(e.ChangeType||(e.ChangeType={})),(function(t){t.Equals="EQUALS",t.GreaterThan="GREATER_THAN",t.GreaterThanOrEqual="GREATER_THAN_OR_EQUAL",t.IsNotNull="IS_NOT_NULL",t.IsNull="IS_NULL",t.LessThan="LESS_THAN",t.LessThanOrEqual="LESS_THAN_OR_EQUAL",t.NotEquals="NOT_EQUALS"})(e.ConditionOperation||(e.ConditionOperation={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.RefId="refId",t.Source="source",t.Status="status",t.Type="type",t.UpdatedAt="updatedAt"})(e.CouponSortFields||(e.CouponSortFields={})),(function(t){t.Stigg="STIGG",t.StiggAdhoc="STIGG_ADHOC",t.Stripe="STRIPE"})(e.CouponSource||(e.CouponSource={})),(function(t){t.Active="ACTIVE",t.Archived="ARCHIVED"})(e.CouponStatus||(e.CouponStatus={})),(function(t){t.Fixed="FIXED",t.Percentage="PERCENTAGE"})(e.CouponType||(e.CouponType={})),(function(t){t.Paid="PAID",t.Promotional="PROMOTIONAL"})(e.CreditGrantType||(e.CreditGrantType={})),(function(t){t.CreditsConsumed="CREDITS_CONSUMED",t.CreditsExpired="CREDITS_EXPIRED",t.CreditsGranted="CREDITS_GRANTED",t.CreditsVoided="CREDITS_VOIDED"})(e.CreditLedgerEventType||(e.CreditLedgerEventType={})),(function(t){t.LastDay="LAST_DAY",t.LastMonth="LAST_MONTH",t.LastWeek="LAST_WEEK",t.LastYear="LAST_YEAR"})(e.CreditUsageTimeRange||(e.CreditUsageTimeRange={})),(function(t){t.Aed="AED",t.All="ALL",t.Amd="AMD",t.Ang="ANG",t.Aud="AUD",t.Awg="AWG",t.Azn="AZN",t.Bam="BAM",t.Bbd="BBD",t.Bdt="BDT",t.Bgn="BGN",t.Bif="BIF",t.Bmd="BMD",t.Bnd="BND",t.Brl="BRL",t.Bsd="BSD",t.Bwp="BWP",t.Byn="BYN",t.Bzd="BZD",t.Cad="CAD",t.Cdf="CDF",t.Chf="CHF",t.Clp="CLP",t.Cny="CNY",t.Czk="CZK",t.Djf="DJF",t.Dkk="DKK",t.Dop="DOP",t.Dzd="DZD",t.Egp="EGP",t.Etb="ETB",t.Eur="EUR",t.Fjd="FJD",t.Gbp="GBP",t.Gel="GEL",t.Gip="GIP",t.Gmd="GMD",t.Gnf="GNF",t.Gyd="GYD",t.Hkd="HKD",t.Hrk="HRK",t.Htg="HTG",t.Idr="IDR",t.Ils="ILS",t.Inr="INR",t.Isk="ISK",t.Jmd="JMD",t.Jpy="JPY",t.Kes="KES",t.Kgs="KGS",t.Khr="KHR",t.Kmf="KMF",t.Krw="KRW",t.Kyd="KYD",t.Kzt="KZT",t.Lbp="LBP",t.Lkr="LKR",t.Lrd="LRD",t.Lsl="LSL",t.Mad="MAD",t.Mdl="MDL",t.Mga="MGA",t.Mkd="MKD",t.Mmk="MMK",t.Mnt="MNT",t.Mop="MOP",t.Mro="MRO",t.Mvr="MVR",t.Mwk="MWK",t.Mxn="MXN",t.Myr="MYR",t.Mzn="MZN",t.Nad="NAD",t.Ngn="NGN",t.Nok="NOK",t.Npr="NPR",t.Nzd="NZD",t.Pgk="PGK",t.Php="PHP",t.Pkr="PKR",t.Pln="PLN",t.Pyg="PYG",t.Qar="QAR",t.Ron="RON",t.Rsd="RSD",t.Rub="RUB",t.Rwf="RWF",t.Sar="SAR",t.Sbd="SBD",t.Scr="SCR",t.Sek="SEK",t.Sgd="SGD",t.Sle="SLE",t.Sll="SLL",t.Sos="SOS",t.Szl="SZL",t.Thb="THB",t.Tjs="TJS",t.Top="TOP",t.Try="TRY",t.Ttd="TTD",t.Tzs="TZS",t.Uah="UAH",t.Ugx="UGX",t.Usd="USD",t.Uzs="UZS",t.Vnd="VND",t.Vuv="VUV",t.Wst="WST",t.Xaf="XAF",t.Xcd="XCD",t.Xof="XOF",t.Xpf="XPF",t.Yer="YER",t.Zar="ZAR",t.Zmw="ZMW"})(e.Currency||(e.Currency={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.ResourceId="resourceId"})(e.CustomerResourceSortFields||(e.CustomerResourceSortFields={})),(function(t){t.AwsMarketplaceCustomerId="awsMarketplaceCustomerId",t.BillingId="billingId",t.CreatedAt="createdAt",t.CrmHubspotCompanyId="crmHubspotCompanyId",t.CrmHubspotCompanyUrl="crmHubspotCompanyUrl",t.CrmId="crmId",t.CustomerId="customerId",t.DeletedAt="deletedAt",t.Email="email",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.RefId="refId",t.SalesforceId="salesforceId",t.SearchQuery="searchQuery",t.UpdatedAt="updatedAt"})(e.CustomerSortFields||(e.CustomerSortFields={})),(function(t){t.BillingCycleAnchor="billingCycleAnchor",t.BillingId="billingId",t.CancelReason="cancelReason",t.CancellationDate="cancellationDate",t.CreatedAt="createdAt",t.CrmId="crmId",t.CrmLinkUrl="crmLinkUrl",t.CurrentBillingPeriodEnd="currentBillingPeriodEnd",t.CurrentBillingPeriodStart="currentBillingPeriodStart",t.CustomerId="customerId",t.EffectiveEndDate="effectiveEndDate",t.EndDate="endDate",t.EnvironmentId="environmentId",t.Id="id",t.OldBillingId="oldBillingId",t.PayingCustomerId="payingCustomerId",t.PaymentCollection="paymentCollection",t.PricingType="pricingType",t.RefId="refId",t.ResourceId="resourceId",t.SalesforceId="salesforceId",t.StartDate="startDate",t.Status="status",t.SubscriptionId="subscriptionId",t.TrialEndDate="trialEndDate"})(e.CustomerSubscriptionSortFields||(e.CustomerSubscriptionSortFields={})),(function(t){t.CeoOrFounder="CEO_OR_FOUNDER",t.Engineering="ENGINEERING",t.Growth="GROWTH",t.Marketing="MARKETING",t.Monetization="MONETIZATION",t.Other="OTHER",t.Product="PRODUCT"})(e.Department||(e.Department={})),(function(t){t.Forever="FOREVER",t.Once="ONCE",t.Repeating="REPEATING"})(e.DiscountDurationType||(e.DiscountDurationType={})),(function(t){t.Fixed="FIXED",t.Percentage="PERCENTAGE"})(e.DiscountType||(e.DiscountType={})),(function(t){t.Increment="Increment",t.Override="Override"})(e.EntitlementBehavior||(e.EntitlementBehavior={})),(function(t){t.Day="DAY",t.Hour="HOUR",t.Month="MONTH",t.Week="WEEK",t.Year="YEAR"})(e.EntitlementResetPeriod||(e.EntitlementResetPeriod={})),(function(t){t.CustomerNotFound="CustomerNotFound",t.NoActiveSubscription="NoActiveSubscription"})(e.EntitlementsStateAccessDeniedReason||(e.EntitlementsStateAccessDeniedReason={})),(function(t){t.BlackList="BLACK_LIST",t.WhiteList="WHITE_LIST"})(e.EntitySelectionMode||(e.EntitySelectionMode={})),(function(t){t.Admin="ADMIN",t.None="NONE",t.Support="SUPPORT",t.Viewer="VIEWER"})(e.EnvironmentAccessRole||(e.EnvironmentAccessRole={})),(function(t){t.Done="DONE",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.NotProvisioned="NOT_PROVISIONED"})(e.EnvironmentProvisionStatus||(e.EnvironmentProvisionStatus={})),(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.Id="id",t.PermanentDeletionDate="permanentDeletionDate",t.Slug="slug"})(e.EnvironmentSortFields||(e.EnvironmentSortFields={})),(function(t){t.Development="DEVELOPMENT",t.Production="PRODUCTION",t.Sandbox="SANDBOX"})(e.EnvironmentType||(e.EnvironmentType={})),(function(t){t.AccessDeniedError="AccessDeniedError",t.AccountNotFoundError="AccountNotFoundError",t.AddonDependencyMissingError="AddonDependencyMissingError",t.AddonHasToHavePriceError="AddonHasToHavePriceError",t.AddonIsCompatibleWithGroup="AddonIsCompatibleWithGroup",t.AddonIsCompatibleWithPlan="AddonIsCompatibleWithPlan",t.AddonNotFound="AddonNotFound",t.AddonQuantityExceedsLimitError="AddonQuantityExceedsLimitError",t.AddonWithDraftCannotBeDeletedError="AddonWithDraftCannotBeDeletedError",t.AddonsNotFound="AddonsNotFound",t.AmountTooLarge="AmountTooLarge",t.ArchivedCouponCantBeApplied="ArchivedCouponCantBeApplied",t.AuthCustomerMismatch="AuthCustomerMismatch",t.AuthCustomerReadonly="AuthCustomerReadonly",t.AwsMarketplaceIntegrationError="AwsMarketplaceIntegrationError",t.AwsMarketplaceIntegrationValidationError="AwsMarketplaceIntegrationValidationError",t.BadUserInput="BadUserInput",t.BillingIntegrationAlreadyExistsError="BillingIntegrationAlreadyExistsError",t.BillingIntegrationMissing="BillingIntegrationMissing",t.BillingPeriodMissingError="BillingPeriodMissingError",t.CanNotUpdateEntitlementsFeatureGroup="CanNotUpdateEntitlementsFeatureGroup",t.CannotAddOverrideEntitlementToPlan="CannotAddOverrideEntitlementToPlan",t.CannotArchiveFeatureError="CannotArchiveFeatureError",t.CannotArchiveFeatureGroupError="CannotArchiveFeatureGroupError",t.CannotChangeBillingIntegration="CannotChangeBillingIntegration",t.CannotDeleteCustomerError="CannotDeleteCustomerError",t.CannotDeleteDefaultIntegration="CannotDeleteDefaultIntegration",t.CannotDeleteFeatureError="CannotDeleteFeatureError",t.CannotDeleteProductError="CannotDeleteProductError",t.CannotEditPackageInNonDraftMode="CannotEditPackageInNonDraftMode",t.CannotRemovePaymentMethodFromCustomerError="CannotRemovePaymentMethodFromCustomerError",t.CannotReportUsageForEntitlementWithMeterError="CannotReportUsageForEntitlementWithMeterError",t.CannotUpdateExpireAtForExpiredCreditGrantError="CannotUpdateExpireAtForExpiredCreditGrantError",t.CannotUpdateUnitTransformationError="CannotUpdateUnitTransformationError",t.CannotUpsertToPackageThatHasDraft="CannotUpsertToPackageThatHasDraft",t.ChangingPayingCustomerIsNotSupportedError="ChangingPayingCustomerIsNotSupportedError",t.CheckoutIsNotSupported="CheckoutIsNotSupported",t.CouponNotFound="CouponNotFound",t.CreditGrantAlreadyVoided="CreditGrantAlreadyVoided",t.CreditGrantNotFound="CreditGrantNotFound",t.CustomCurrencyNotFound="CustomCurrencyNotFound",t.CustomerAlreadyHaveCustomerCoupon="CustomerAlreadyHaveCustomerCoupon",t.CustomerAlreadyUsesCoupon="CustomerAlreadyUsesCoupon",t.CustomerHasNoEmailAddress="CustomerHasNoEmailAddress",t.CustomerNoBillingId="CustomerNoBillingId",t.CustomerNotFound="CustomerNotFound",t.CustomerResourceNotFound="CustomerResourceNotFound",t.DeprecatedEstimateSubscriptionError="DeprecatedEstimateSubscriptionError",t.DowngradeBillingPeriodNotSupportedError="DowngradeBillingPeriodNotSupportedError",t.DraftAddonCantBeArchived="DraftAddonCantBeArchived",t.DraftAlreadyExists="DraftAlreadyExists",t.DraftPlanCantBeArchived="DraftPlanCantBeArchived",t.DuplicateAddonProvisionedError="DuplicateAddonProvisionedError",t.DuplicateIntegrationNotAllowed="DuplicateIntegrationNotAllowed",t.DuplicateProductValidationError="DuplicateProductValidationError",t.DuplicatedEntityNotAllowed="DuplicatedEntityNotAllowed",t.EditAllowedOnDraftPackageOnlyError="EditAllowedOnDraftPackageOnlyError",t.EntitlementBelongsToFeatureGroupError="EntitlementBelongsToFeatureGroupError",t.EntitlementLimitExceededError="EntitlementLimitExceededError",t.EntitlementUsageOutOfRangeError="EntitlementUsageOutOfRangeError",t.EntitlementsMustBelongToSamePackage="EntitlementsMustBelongToSamePackage",t.EntityIdDifferentFromRefIdError="EntityIdDifferentFromRefIdError",t.EntityIsArchivedError="EntityIsArchivedError",t.EnvironmentMissing="EnvironmentMissing",t.ExperimentAlreadyRunning="ExperimentAlreadyRunning",t.ExperimentNotFoundError="ExperimentNotFoundError",t.ExperimentStatusError="ExperimentStatusError",t.ExpireAtMustBeLaterThanEffectiveAtError="ExpireAtMustBeLaterThanEffectiveAtError",t.FailedToCreateCheckoutSessionError="FailedToCreateCheckoutSessionError",t.FailedToImportCustomer="FailedToImportCustomer",t.FailedToImportSubscriptions="FailedToImportSubscriptions",t.FailedToResolveBillingIntegration="FailedToResolveBillingIntegration",t.FeatureConfigurationExceededLimitError="FeatureConfigurationExceededLimitError",t.FeatureGroupMissingFeaturesError="FeatureGroupMissingFeaturesError",t.FeatureGroupNotFoundError="FeatureGroupNotFoundError",t.FeatureNotBelongToFeatureGroupError="FeatureNotBelongToFeatureGroupError",t.FeatureNotFound="FeatureNotFound",t.FetchAllCountriesPricesNotAllowed="FetchAllCountriesPricesNotAllowed",t.FreePlanCantHaveCompatiblePackageGroupError="FreePlanCantHaveCompatiblePackageGroupError",t.GraphQlAliasesLimitExceeded="GraphQLAliasesLimitExceeded",t.GraphQlBatchedOperationsLimitExceeded="GraphQLBatchedOperationsLimitExceeded",t.GraphQlUnsupportedDirective="GraphQLUnsupportedDirective",t.HubspotIntegrationError="HubspotIntegrationError",t.IdentityForbidden="IdentityForbidden",t.ImportAlreadyInProgress="ImportAlreadyInProgress",t.ImportSubscriptionsBulkError="ImportSubscriptionsBulkError",t.IncompatibleSubscriptionAddon="IncompatibleSubscriptionAddon",t.InitStripePaymentMethodError="InitStripePaymentMethodError",t.IntegrationNotFound="IntegrationNotFound",t.IntegrationValidationError="IntegrationValidationError",t.IntegrityViolation="IntegrityViolation",t.InvalidAddressError="InvalidAddressError",t.InvalidArgumentError="InvalidArgumentError",t.InvalidCancellationDate="InvalidCancellationDate",t.InvalidDoggoSignatureError="InvalidDoggoSignatureError",t.InvalidEntitlementResetPeriod="InvalidEntitlementResetPeriod",t.InvalidMemberDelete="InvalidMemberDelete",t.InvalidMetadataError="InvalidMetadataError",t.InvalidQuantity="InvalidQuantity",t.InvalidSubscriptionStatus="InvalidSubscriptionStatus",t.InvalidUpdatePriceUnitAmountError="InvalidUpdatePriceUnitAmountError",t.MemberInvitationError="MemberInvitationError",t.MemberNotFound="MemberNotFound",t.MergeEnvironmentValidationError="MergeEnvironmentValidationError",t.MeterMustBeAssociatedToMeteredFeature="MeterMustBeAssociatedToMeteredFeature",t.MeteringNotAvailableForFeatureType="MeteringNotAvailableForFeatureType",t.MissingEntityIdError="MissingEntityIdError",t.MissingSubscriptionInvoiceError="MissingSubscriptionInvoiceError",t.MultiSubscriptionCantBeAutoCancellationSourceError="MultiSubscriptionCantBeAutoCancellationSourceError",t.NoActiveSubscriptionForCustomer="NoActiveSubscriptionForCustomer",t.NoDraftOfferFound="NoDraftOfferFound",t.NoFeatureEntitlementError="NoFeatureEntitlementError",t.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",t.NoProductsAvailable="NoProductsAvailable",t.OfferAlreadyExists="OfferAlreadyExists",t.OfferNotFound="OfferNotFound",t.OperationNotAllowedDuringInProgressExperiment="OperationNotAllowedDuringInProgressExperiment",t.PackageAlreadyPublished="PackageAlreadyPublished",t.PackageGroupMinItemsError="PackageGroupMinItemsError",t.PackageGroupNotFound="PackageGroupNotFound",t.PackagePricingTypeNotSet="PackagePricingTypeNotSet",t.PaymentMethodNotFoundError="PaymentMethodNotFoundError",t.PlanCannotBePublishWhenBasePlanIsDraft="PlanCannotBePublishWhenBasePlanIsDraft",t.PlanCannotBePublishWhenCompatibleAddonIsDraft="PlanCannotBePublishWhenCompatibleAddonIsDraft",t.PlanIsUsedAsDefaultStartPlan="PlanIsUsedAsDefaultStartPlan",t.PlanIsUsedAsDowngradePlan="PlanIsUsedAsDowngradePlan",t.PlanNotFound="PlanNotFound",t.PlanWithChildCantBeDeleted="PlanWithChildCantBeDeleted",t.PlansCircularDependencyError="PlansCircularDependencyError",t.PreparePaymentMethodFormError="PreparePaymentMethodFormError",t.PriceNotFound="PriceNotFound",t.ProductNotFoundError="ProductNotFoundError",t.PromotionCodeCustomerNotFirstPurchase="PromotionCodeCustomerNotFirstPurchase",t.PromotionCodeMaxRedemptionsReached="PromotionCodeMaxRedemptionsReached",t.PromotionCodeMinimumAmountNotReached="PromotionCodeMinimumAmountNotReached",t.PromotionCodeNotActive="PromotionCodeNotActive",t.PromotionCodeNotForCustomer="PromotionCodeNotForCustomer",t.PromotionCodeNotFound="PromotionCodeNotFound",t.PromotionalEntitlementNotFoundError="PromotionalEntitlementNotFoundError",t.RateLimitExceeded="RateLimitExceeded",t.RecalculateEntitlementsError="RecalculateEntitlementsError",t.RequiredSsoAuthenticationError="RequiredSsoAuthenticationError",t.ResyncAlreadyInProgress="ResyncAlreadyInProgress",t.ScheduledMigrationAlreadyExistsError="ScheduledMigrationAlreadyExistsError",t.SelectedBillingModelDoesntMatchImportedItemError="SelectedBillingModelDoesntMatchImportedItemError",t.SingleSubscriptionCantBeAutoCancellationTargetError="SingleSubscriptionCantBeAutoCancellationTargetError",t.StripeCustomerIsDeleted="StripeCustomerIsDeleted",t.StripeError="StripeError",t.SubscriptionAlreadyCanceledOrExpired="SubscriptionAlreadyCanceledOrExpired",t.SubscriptionAlreadyOnLatestPlanError="SubscriptionAlreadyOnLatestPlanError",t.SubscriptionDoesNotHaveBillingPeriod="SubscriptionDoesNotHaveBillingPeriod",t.SubscriptionInvoiceStatusError="SubscriptionInvoiceStatusError",t.SubscriptionMustHaveSinglePlanError="SubscriptionMustHaveSinglePlanError",t.SubscriptionNoBillingId="SubscriptionNoBillingId",t.SubscriptionNotFound="SubscriptionNotFound",t.TooManyCustomCurrencies="TooManyCustomCurrencies",t.TooManySubscriptionsPerCustomer="TooManySubscriptionsPerCustomer",t.TrialMustBeCancelledImmediately="TrialMustBeCancelledImmediately",t.UnPublishedPackage="UnPublishedPackage",t.Unauthenticated="Unauthenticated",t.UnexpectedError="UnexpectedError",t.UnsupportedFeatureType="UnsupportedFeatureType",t.UnsupportedParameter="UnsupportedParameter",t.UnsupportedSubscriptionScheduleType="UnsupportedSubscriptionScheduleType",t.UnsupportedVendorIdentifier="UnsupportedVendorIdentifier",t.UsageMeasurementDiffOutOfRangeError="UsageMeasurementDiffOutOfRangeError",t.VersionExceedsMaxValueError="VersionExceedsMaxValueError",t.WorkflowTriggerNotFound="WorkflowTriggerNotFound"})(e.ErrorCode||(e.ErrorCode={})),(function(t){t.AppCustomer="APP_CUSTOMER",t.AppPublic="APP_PUBLIC",t.AppServer="APP_SERVER",t.Aws="AWS",t.Import="IMPORT",t.Migration="MIGRATION",t.Salesforce="SALESFORCE",t.Scheduler="SCHEDULER",t.Service="SERVICE",t.Stripe="STRIPE",t.Support="SUPPORT",t.System="SYSTEM",t.User="USER",t.Workflow="WORKFLOW"})(e.EventActor||(e.EventActor={})),(function(t){t.Addon="ADDON",t.Coupon="COUPON",t.Credit="CREDIT",t.Customer="CUSTOMER",t.Entitlement="ENTITLEMENT",t.Feature="FEATURE",t.FeatureGroup="FEATURE_GROUP",t.Import="IMPORT",t.Measurement="MEASUREMENT",t.Package="PACKAGE",t.PackageGroup="PACKAGE_GROUP",t.Plan="PLAN",t.Product="PRODUCT",t.PromotionalEntitlement="PROMOTIONAL_ENTITLEMENT",t.Subscription="SUBSCRIPTION"})(e.EventEntityType||(e.EventEntityType={})),(function(t){t.CreatedAt="createdAt",t.EntityId="entityId",t.EnvironmentId="environmentId",t.EventLogType="eventLogType",t.Id="id",t.ParentEntityId="parentEntityId"})(e.EventLogSortFields||(e.EventLogSortFields={})),(function(t){t.AddonCreated="ADDON_CREATED",t.AddonDeleted="ADDON_DELETED",t.AddonUpdated="ADDON_UPDATED",t.CouponArchived="COUPON_ARCHIVED",t.CouponCreated="COUPON_CREATED",t.CouponUpdated="COUPON_UPDATED",t.CreateSubscriptionFailed="CREATE_SUBSCRIPTION_FAILED",t.CreditsBalanceDepletedOld="CREDITS_BALANCE_DEPLETED_OLD",t.CreditsBalanceLowOld="CREDITS_BALANCE_LOW_OLD",t.CreditsGrantBalanceLowOld="CREDITS_GRANT_BALANCE_LOW_OLD",t.CreditsGrantDepletedOld="CREDITS_GRANT_DEPLETED_OLD",t.CreditsGrantExpiredOld="CREDITS_GRANT_EXPIRED_OLD",t.CreditsGrantGrantedOld="CREDITS_GRANT_GRANTED_OLD",t.CreditsGrantUpdatedOld="CREDITS_GRANT_UPDATED_OLD",t.CreditBalanceDepleted="CREDIT_BALANCE_DEPLETED",t.CreditBalanceLow="CREDIT_BALANCE_LOW",t.CreditGrantBalanceLow="CREDIT_GRANT_BALANCE_LOW",t.CreditGrantCreated="CREDIT_GRANT_CREATED",t.CreditGrantDepleted="CREDIT_GRANT_DEPLETED",t.CreditGrantExpired="CREDIT_GRANT_EXPIRED",t.CreditGrantUpdated="CREDIT_GRANT_UPDATED",t.CreditGrantVoided="CREDIT_GRANT_VOIDED",t.CustomerCreated="CUSTOMER_CREATED",t.CustomerDeleted="CUSTOMER_DELETED",t.CustomerEntitlementCalculationTriggered="CUSTOMER_ENTITLEMENT_CALCULATION_TRIGGERED",t.CustomerPaymentFailed="CUSTOMER_PAYMENT_FAILED",t.CustomerResourceEntitlementCalculationTriggered="CUSTOMER_RESOURCE_ENTITLEMENT_CALCULATION_TRIGGERED",t.CustomerUpdated="CUSTOMER_UPDATED",t.EdgeApiClientConfigurationDataResync="EDGE_API_CLIENT_CONFIGURATION_DATA_RESYNC",t.EdgeApiCustomerDataResync="EDGE_API_CUSTOMER_DATA_RESYNC",t.EdgeApiDataResync="EDGE_API_DATA_RESYNC",t.EdgeApiDoggoResync="EDGE_API_DOGGO_RESYNC",t.EdgeApiPackageEntitlementsDataResync="EDGE_API_PACKAGE_ENTITLEMENTS_DATA_RESYNC",t.EdgeApiSubscriptionsDataResync="EDGE_API_SUBSCRIPTIONS_DATA_RESYNC",t.EntitlementsUpdated="ENTITLEMENTS_UPDATED",t.EntitlementDenied="ENTITLEMENT_DENIED",t.EntitlementGranted="ENTITLEMENT_GRANTED",t.EntitlementRequested="ENTITLEMENT_REQUESTED",t.EntitlementUsageExceeded="ENTITLEMENT_USAGE_EXCEEDED",t.EnvironmentDeleted="ENVIRONMENT_DELETED",t.FeatureArchived="FEATURE_ARCHIVED",t.FeatureCreated="FEATURE_CREATED",t.FeatureDeleted="FEATURE_DELETED",t.FeatureGroupArchived="FEATURE_GROUP_ARCHIVED",t.FeatureGroupCreated="FEATURE_GROUP_CREATED",t.FeatureGroupUnArchived="FEATURE_GROUP_UN_ARCHIVED",t.FeatureGroupUpdated="FEATURE_GROUP_UPDATED",t.FeatureUpdated="FEATURE_UPDATED",t.ImportIntegrationCatalogTriggered="IMPORT_INTEGRATION_CATALOG_TRIGGERED",t.ImportIntegrationCustomersTriggered="IMPORT_INTEGRATION_CUSTOMERS_TRIGGERED",t.ImportSubscriptionsBulkTriggered="IMPORT_SUBSCRIPTIONS_BULK_TRIGGERED",t.MeasurementReported="MEASUREMENT_REPORTED",t.PackageGroupCreated="PACKAGE_GROUP_CREATED",t.PackageGroupUpdated="PACKAGE_GROUP_UPDATED",t.PackagePublished="PACKAGE_PUBLISHED",t.PlanCreated="PLAN_CREATED",t.PlanDeleted="PLAN_DELETED",t.PlanUpdated="PLAN_UPDATED",t.ProductCreated="PRODUCT_CREATED",t.ProductDeleted="PRODUCT_DELETED",t.ProductUpdated="PRODUCT_UPDATED",t.PromotionalEntitlementEndsSoon="PROMOTIONAL_ENTITLEMENT_ENDS_SOON",t.PromotionalEntitlementExpired="PROMOTIONAL_ENTITLEMENT_EXPIRED",t.PromotionalEntitlementGranted="PROMOTIONAL_ENTITLEMENT_GRANTED",t.PromotionalEntitlementRevoked="PROMOTIONAL_ENTITLEMENT_REVOKED",t.PromotionalEntitlementUpdated="PROMOTIONAL_ENTITLEMENT_UPDATED",t.RecalculateEntitlementsTriggered="RECALCULATE_ENTITLEMENTS_TRIGGERED",t.ResyncIntegrationTriggered="RESYNC_INTEGRATION_TRIGGERED",t.SubscriptionsMigrated="SUBSCRIPTIONS_MIGRATED",t.SubscriptionsMigrationTriggered="SUBSCRIPTIONS_MIGRATION_TRIGGERED",t.SubscriptionBillingMonthEndsSoon="SUBSCRIPTION_BILLING_MONTH_ENDS_SOON",t.SubscriptionCanceled="SUBSCRIPTION_CANCELED",t.SubscriptionCreated="SUBSCRIPTION_CREATED",t.SubscriptionExpired="SUBSCRIPTION_EXPIRED",t.SubscriptionSpentLimitExceeded="SUBSCRIPTION_SPENT_LIMIT_EXCEEDED",t.SubscriptionTrialConverted="SUBSCRIPTION_TRIAL_CONVERTED",t.SubscriptionTrialEndsSoon="SUBSCRIPTION_TRIAL_ENDS_SOON",t.SubscriptionTrialExpired="SUBSCRIPTION_TRIAL_EXPIRED",t.SubscriptionTrialStarted="SUBSCRIPTION_TRIAL_STARTED",t.SubscriptionUpdated="SUBSCRIPTION_UPDATED",t.SubscriptionUsageChargeTriggered="SUBSCRIPTION_USAGE_CHARGE_TRIGGERED",t.SubscriptionUsageUpdated="SUBSCRIPTION_USAGE_UPDATED",t.SyncFailed="SYNC_FAILED",t.WidgetConfigurationUpdated="WIDGET_CONFIGURATION_UPDATED"})(e.EventLogType||(e.EventLogType={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.ProductId="productId",t.RefId="refId",t.Status="status"})(e.ExperimentSortFields||(e.ExperimentSortFields={})),(function(t){t.Completed="COMPLETED",t.Draft="DRAFT",t.InProgress="IN_PROGRESS"})(e.ExperimentStatus||(e.ExperimentStatus={})),(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.FeatureGroupId="featureGroupId",t.Id="id",t.IsLatest="isLatest",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.FeatureGroupSortFields||(e.FeatureGroupSortFields={})),(function(t){t.Archived="ARCHIVED",t.Published="PUBLISHED"})(e.FeatureGroupStatus||(e.FeatureGroupStatus={})),(function(t){t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.FeatureStatus="featureStatus",t.FeatureType="featureType",t.Id="id",t.MeterType="meterType",t.RefId="refId",t.UpdatedAt="updatedAt"})(e.FeatureSortFields||(e.FeatureSortFields={})),(function(t){t.Active="ACTIVE",t.New="NEW",t.Suspended="SUSPENDED"})(e.FeatureStatus||(e.FeatureStatus={})),(function(t){t.Boolean="BOOLEAN",t.Enum="ENUM",t.Number="NUMBER"})(e.FeatureType||(e.FeatureType={})),(function(t){t.Bold="BOLD",t.Normal="NORMAL"})(e.FontWeight||(e.FontWeight={})),(function(t){t.CreatedAt="createdAt",t.Endpoint="endpoint",t.EnvironmentId="environmentId",t.Id="id",t.Status="status"})(e.HookSortFields||(e.HookSortFields={})),(function(t){t.Active="ACTIVE",t.Inactive="INACTIVE"})(e.HookStatus||(e.HookStatus={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.TaskType="taskType"})(e.ImportIntegrationTaskSortFields||(e.ImportIntegrationTaskSortFields={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.VendorIdentifier="vendorIdentifier",t.VendorType="vendorType"})(e.IntegrationSortFields||(e.IntegrationSortFields={})),(function(t){t.AddonCharge="AddonCharge",t.BaseCharge="BaseCharge",t.InAdvanceCommitmentCharge="InAdvanceCommitmentCharge",t.MinimumSpendAdjustmentCharge="MinimumSpendAdjustmentCharge",t.MinimumSpendCharge="MinimumSpendCharge",t.Other="Other",t.OverageCharge="OverageCharge",t.PayAsYouGoCharge="PayAsYouGoCharge",t.TierCharge="TierCharge",t.ZeroAmountBaseCharge="ZeroAmountBaseCharge"})(e.InvoiceLineItemType||(e.InvoiceLineItemType={})),(function(t){t.CreatedAt="createdAt",t.Email="email",t.Id="id"})(e.MemberSortFields||(e.MemberSortFields={})),(function(t){t.Invited="INVITED",t.Registered="REGISTERED"})(e.MemberStatus||(e.MemberStatus={})),(function(t){t.Fluctuating="Fluctuating",t.Incremental="Incremental",t.None="None"})(e.MeterType||(e.MeterType={})),(function(t){t.StartOfTheMonth="StartOfTheMonth",t.SubscriptionStart="SubscriptionStart"})(e.MonthlyAccordingTo||(e.MonthlyAccordingTo={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.IsDefault="isDefault",t.IsLatest="isLatest",t.OfferId="offerId",t.Status="status",t.Version="version"})(e.OfferSortFields||(e.OfferSortFields={})),(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED"})(e.OfferStatus||(e.OfferStatus={})),(function(t){t.Monthly="MONTHLY",t.OnSubscriptionRenewal="ON_SUBSCRIPTION_RENEWAL"})(e.OverageBillingPeriod||(e.OverageBillingPeriod={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.PackageDtoSortFields||(e.PackageDtoSortFields={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.PackageId="packageId",t.UpdatedAt="updatedAt"})(e.PackageEntitlementSortFields||(e.PackageEntitlementSortFields={})),(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.IsLatest="isLatest",t.PackageGroupId="packageGroupId",t.ProductId="productId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.PackageGroupSortFields||(e.PackageGroupSortFields={})),(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED"})(e.PackageGroupStatus||(e.PackageGroupStatus={})),(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED"})(e.PackageStatus||(e.PackageStatus={})),(function(t){t.ActionRequired="ACTION_REQUIRED",t.Failed="FAILED",t.NotRequired="NOT_REQUIRED",t.Processing="PROCESSING"})(e.PaymentCollection||(e.PaymentCollection={})),(function(t){t.Charge="CHARGE",t.Invoice="INVOICE",t.None="NONE"})(e.PaymentCollectionMethod||(e.PaymentCollectionMethod={})),(function(t){t.Bank="BANK",t.Card="CARD",t.CashApp="CASH_APP"})(e.PaymentMethodType||(e.PaymentMethodType={})),(function(t){t.Downgrade="DOWNGRADE",t.None="NONE",t.Upgrade="UPGRADE"})(e.PlanChangeType||(e.PlanChangeType={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.PlanSortFields||(e.PlanSortFields={})),(function(t){t.BillingCadence="billingCadence",t.BillingId="billingId",t.BillingModel="billingModel",t.BillingPeriod="billingPeriod",t.CreatedAt="createdAt",t.Id="id",t.TiersMode="tiersMode"})(e.PriceSortFields||(e.PriceSortFields={})),(function(t){t.Custom="CUSTOM",t.Free="FREE",t.Paid="PAID"})(e.PricingType||(e.PricingType={})),(function(t){t.AwsMarketplaceProductCode="awsMarketplaceProductCode",t.AwsMarketplaceProductId="awsMarketplaceProductId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsDefaultProduct="isDefaultProduct",t.MultipleSubscriptions="multipleSubscriptions",t.RefId="refId",t.UpdatedAt="updatedAt"})(e.ProductSortFields||(e.ProductSortFields={})),(function(t){t.Custom="CUSTOM",t.Lifetime="LIFETIME",t.OneMonth="ONE_MONTH",t.OneWeek="ONE_WEEK",t.OneYear="ONE_YEAR",t.SixMonth="SIX_MONTH"})(e.PromotionalEntitlementPeriod||(e.PromotionalEntitlementPeriod={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.UpdatedAt="updatedAt"})(e.PromotionalEntitlementSortFields||(e.PromotionalEntitlementSortFields={})),(function(t){t.Active="Active",t.Expired="Expired",t.Paused="Paused"})(e.PromotionalEntitlementStatus||(e.PromotionalEntitlementStatus={})),(function(t){t.CreateProrations="CREATE_PRORATIONS",t.InvoiceImmediately="INVOICE_IMMEDIATELY"})(e.ProrationBehavior||(e.ProrationBehavior={})),(function(t){t.PaymentRequired="PAYMENT_REQUIRED",t.Success="SUCCESS"})(e.ProvisionSubscriptionStatus||(e.ProvisionSubscriptionStatus={})),(function(t){t.AllCustomers="ALL_CUSTOMERS",t.NewCustomers="NEW_CUSTOMERS"})(e.PublishMigrationType||(e.PublishMigrationType={})),(function(t){t.EndOfBillingMonth="END_OF_BILLING_MONTH",t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE"})(e.ScheduleStrategy||(e.ScheduleStrategy={})),(function(t){t.Asc="ASC",t.Desc="DESC"})(e.SortDirection||(e.SortDirection={})),(function(t){t.NullsFirst="NULLS_FIRST",t.NullsLast="NULLS_LAST"})(e.SortNulls||(e.SortNulls={})),(function(t){t.JsClientSdk="JS_CLIENT_SDK",t.NodeServerSdk="NODE_SERVER_SDK",t.PersistentCacheService="PERSISTENT_CACHE_SERVICE"})(e.SourceType||(e.SourceType={})),(function(t){t.CreatedAt="createdAt",t.Id="id",t.Quantity="quantity",t.UpdatedAt="updatedAt"})(e.SubscriptionAddonSortFields||(e.SubscriptionAddonSortFields={})),(function(t){t.AutoCancellationRule="AutoCancellationRule",t.CancelledByBilling="CancelledByBilling",t.CustomerArchived="CustomerArchived",t.DetachBilling="DetachBilling",t.Expired="Expired",t.Immediate="Immediate",t.PendingPaymentExpired="PendingPaymentExpired",t.ScheduledCancellation="ScheduledCancellation",t.TrialConverted="TrialConverted",t.TrialEnded="TrialEnded",t.UpgradeOrDowngrade="UpgradeOrDowngrade"})(e.SubscriptionCancelReason||(e.SubscriptionCancelReason={})),(function(t){t.Default="DEFAULT",t.RevokeEntitlements="REVOKE_ENTITLEMENTS"})(e.SubscriptionCancellationAction||(e.SubscriptionCancellationAction={})),(function(t){t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE",t.SpecificDate="SPECIFIC_DATE"})(e.SubscriptionCancellationTime||(e.SubscriptionCancellationTime={})),(function(t){t.Active="ACTIVE",t.Expired="EXPIRED",t.Removed="REMOVED"})(e.SubscriptionCouponStatus||(e.SubscriptionCouponStatus={})),(function(t){t.PredefinedFreePlan="PREDEFINED_FREE_PLAN",t.PredefinedTrialPlan="PREDEFINED_TRIAL_PLAN",t.RequestedPlan="REQUESTED_PLAN",t.SkippedSubscriptionCreation="SKIPPED_SUBSCRIPTION_CREATION"})(e.SubscriptionDecisionStrategy||(e.SubscriptionDecisionStrategy={})),(function(t){t.CancelSubscription="CANCEL_SUBSCRIPTION",t.DowngradeToFree="DOWNGRADE_TO_FREE"})(e.SubscriptionEndSetup||(e.SubscriptionEndSetup={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.SubscriptionId="subscriptionId",t.UpdatedAt="updatedAt"})(e.SubscriptionEntitlementSortFields||(e.SubscriptionEntitlementSortFields={})),(function(t){t.BillingCycle="BILLING_CYCLE",t.Manual="MANUAL",t.MinimumInvoiceAmountExceeded="MINIMUM_INVOICE_AMOUNT_EXCEEDED",t.Other="OTHER",t.SubscriptionCreation="SUBSCRIPTION_CREATION",t.SubscriptionUpdate="SUBSCRIPTION_UPDATE"})(e.SubscriptionInvoiceBillingReason||(e.SubscriptionInvoiceBillingReason={})),(function(t){t.Canceled="CANCELED",t.Open="OPEN",t.Paid="PAID"})(e.SubscriptionInvoiceStatus||(e.SubscriptionInvoiceStatus={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.TaskType="taskType"})(e.SubscriptionMigrationTaskSortFields||(e.SubscriptionMigrationTaskSortFields={})),(function(t){t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE"})(e.SubscriptionMigrationTime||(e.SubscriptionMigrationTime={})),(function(t){t.BillingModel="billingModel",t.CreatedAt="createdAt",t.FeatureId="featureId",t.HasSoftLimit="hasSoftLimit",t.Id="id",t.UpdatedAt="updatedAt",t.UsageLimit="usageLimit"})(e.SubscriptionPriceSortFields||(e.SubscriptionPriceSortFields={})),(function(t){t.CreateProrations="CREATE_PRORATIONS",t.InvoiceImmediately="INVOICE_IMMEDIATELY",t.None="NONE"})(e.SubscriptionProrationBehavior||(e.SubscriptionProrationBehavior={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.CustomerId="customerId",t.EnvironmentId="environmentId",t.ProductId="productId",t.ResourceId="resourceId",t.SalesforceId="salesforceId",t.StartDate="startDate",t.Status="status",t.SubscriptionId="subscriptionId"})(e.SubscriptionQuerySortFields||(e.SubscriptionQuerySortFields={})),(function(t){t.Canceled="Canceled",t.Done="Done",t.Failed="Failed",t.PendingPayment="PendingPayment",t.Scheduled="Scheduled"})(e.SubscriptionScheduleStatus||(e.SubscriptionScheduleStatus={})),(function(t){t.AdditionalMetaData="AdditionalMetaData",t.Addon="Addon",t.BillingInfoMetadata="BillingInfoMetadata",t.BillingPeriod="BillingPeriod",t.Coupon="Coupon",t.Downgrade="Downgrade",t.MigrateToLatest="MigrateToLatest",t.Plan="Plan",t.PriceOverride="PriceOverride",t.UnitAmount="UnitAmount"})(e.SubscriptionScheduleType||(e.SubscriptionScheduleType={})),(function(t){t.FreePlan="FREE_PLAN",t.PlanSelection="PLAN_SELECTION",t.TrialPeriod="TRIAL_PERIOD"})(e.SubscriptionStartSetup||(e.SubscriptionStartSetup={})),(function(t){t.Active="ACTIVE",t.Canceled="CANCELED",t.Expired="EXPIRED",t.InTrial="IN_TRIAL",t.NotStarted="NOT_STARTED",t.PaymentPending="PAYMENT_PENDING"})(e.SubscriptionStatus||(e.SubscriptionStatus={})),(function(t){t.AlwaysReset="ALWAYS_RESET",t.BillingPeriodChange="BILLING_PERIOD_CHANGE",t.NeverReset="NEVER_RESET"})(e.SubscriptionUpdateUsageCutoffBehavior||(e.SubscriptionUpdateUsageCutoffBehavior={})),(function(t){t.Error="ERROR",t.NoSyncRequired="NO_SYNC_REQUIRED",t.Pending="PENDING",t.Success="SUCCESS"})(e.SyncStatus||(e.SyncStatus={})),(function(t){t.Canceled="CANCELED",t.Completed="COMPLETED",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.PartiallyFailed="PARTIALLY_FAILED",t.Pending="PENDING"})(e.TaskStatus||(e.TaskStatus={})),(function(t){t.ImportIntegrationCatalog="IMPORT_INTEGRATION_CATALOG",t.ImportIntegrationCustomers="IMPORT_INTEGRATION_CUSTOMERS",t.ImportSubscriptionsBulk="IMPORT_SUBSCRIPTIONS_BULK",t.RecalculateBatchEntitlements="RECALCULATE_BATCH_ENTITLEMENTS",t.RecalculateEntitlements="RECALCULATE_ENTITLEMENTS",t.ResyncIntegration="RESYNC_INTEGRATION",t.SubscriptionMigration="SUBSCRIPTION_MIGRATION",t.SubscriptionMigrationV2="SUBSCRIPTION_MIGRATION_V2"})(e.TaskType||(e.TaskType={})),(function(t){t.Graduated="GRADUATED",t.Volume="VOLUME"})(e.TiersMode||(e.TiersMode={})),(function(t){t.CancelSubscription="CANCEL_SUBSCRIPTION",t.ConvertToPaid="CONVERT_TO_PAID"})(e.TrialEndBehavior||(e.TrialEndBehavior={})),(function(t){t.Day="DAY",t.Month="MONTH"})(e.TrialPeriodUnits||(e.TrialPeriodUnits={})),(function(t){t.Down="DOWN",t.Up="UP"})(e.UnitTransformationRound||(e.UnitTransformationRound={})),(function(t){t.PeriodicReset="PERIODIC_RESET",t.SubscriptionChangeReset="SUBSCRIPTION_CHANGE_RESET"})(e.UsageMarkerType||(e.UsageMarkerType={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id"})(e.UsageMeasurementSortFields||(e.UsageMeasurementSortFields={})),(function(t){t.Delta="DELTA",t.Set="SET"})(e.UsageUpdateBehavior||(e.UsageUpdateBehavior={})),(function(t){t.Auth0="AUTH0",t.AwsMarketplace="AWS_MARKETPLACE",t.BigQuery="BIG_QUERY",t.Hubspot="HUBSPOT",t.OpenFga="OPEN_FGA",t.Salesforce="SALESFORCE",t.Snowflake="SNOWFLAKE",t.Stripe="STRIPE",t.Zuora="ZUORA"})(e.VendorIdentifier||(e.VendorIdentifier={})),(function(t){t.Auth="AUTH",t.Billing="BILLING",t.Crm="CRM",t.DataExport="DATA_EXPORT",t.Marketplace="MARKETPLACE"})(e.VendorType||(e.VendorType={})),(function(t){t.EveryFriday="EveryFriday",t.EveryMonday="EveryMonday",t.EverySaturday="EverySaturday",t.EverySunday="EverySunday",t.EveryThursday="EveryThursday",t.EveryTuesday="EveryTuesday",t.EveryWednesday="EveryWednesday",t.SubscriptionStart="SubscriptionStart"})(e.WeeklyAccordingTo||(e.WeeklyAccordingTo={})),(function(t){t.Checkout="CHECKOUT",t.CustomerPortal="CUSTOMER_PORTAL",t.Paywall="PAYWALL"})(e.WidgetType||(e.WidgetType={})),(function(t){t.SubscriptionStart="SubscriptionStart"})(e.YearlyAccordingTo||(e.YearlyAccordingTo={})),(function(t){t.Control="CONTROL",t.Variant="VARIANT"})(e.ExperimentGroupType||(e.ExperimentGroupType={})),e.PageInfoFragmentDoc=(0,n.default)`
660
674
  fragment PageInfoFragment on PageInfo {
661
675
  startCursor
662
676
  endCursor
@@ -871,6 +885,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
871
885
  creditRate {
872
886
  amount
873
887
  customCurrencyId
888
+ currencyId
874
889
  }
875
890
  tiersMode
876
891
  tiers {
@@ -1578,6 +1593,11 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
1578
1593
  feature {
1579
1594
  ...FeatureFragment
1580
1595
  }
1596
+ creditRate {
1597
+ amount
1598
+ currencyId
1599
+ }
1600
+ validUntil
1581
1601
  }
1582
1602
  `,e.EntitlementsUpdatedPayloadFragmentDoc=(0,n.default)`
1583
1603
  fragment EntitlementsUpdatedPayload on EntitlementsUpdated {
@@ -1614,6 +1634,25 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
1614
1634
  packageRefId
1615
1635
  packageVersion
1616
1636
  migrationType
1637
+ }
1638
+ `,e.CreditBalanceUpdatedPayloadFragmentDoc=(0,n.default)`
1639
+ fragment CreditBalanceUpdatedPayload on CreditBalanceUpdated {
1640
+ currency {
1641
+ currencyId
1642
+ displayName
1643
+ symbol
1644
+ units {
1645
+ singular
1646
+ plural
1647
+ }
1648
+ }
1649
+ currencyId
1650
+ currentBalance
1651
+ customerId
1652
+ validUntil
1653
+ resourceId
1654
+ totalConsumed
1655
+ totalGranted
1617
1656
  }
1618
1657
  `,e.CustomerPortalSubscriptionPriceFragmentDoc=(0,n.default)`
1619
1658
  fragment CustomerPortalSubscriptionPriceFragment on CustomerPortalSubscriptionPrice {
@@ -1626,7 +1665,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
1626
1665
  }
1627
1666
  creditRate {
1628
1667
  amount
1629
- customCurrencyId
1668
+ currencyId
1630
1669
  }
1631
1670
  feature {
1632
1671
  id
@@ -1679,7 +1718,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
1679
1718
  }
1680
1719
  creditRate {
1681
1720
  amount
1682
- customCurrencyId
1721
+ currencyId
1683
1722
  }
1684
1723
  feature {
1685
1724
  featureUnits
@@ -1912,7 +1951,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
1912
1951
  }
1913
1952
  creditRate {
1914
1953
  amount
1915
- customCurrencyId
1954
+ currencyId
1916
1955
  }
1917
1956
  tiersMode
1918
1957
  tiers {
@@ -2250,23 +2289,30 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
2250
2289
  amount
2251
2290
  creditGrantId
2252
2291
  creditCurrencyId
2292
+ }
2293
+ `,e.CreditBalanceFragmentDoc=(0,n.default)`
2294
+ fragment CreditBalanceFragment on CreditBalance {
2295
+ customerId
2296
+ currency {
2297
+ currencyId
2298
+ displayName
2299
+ symbol
2300
+ units {
2301
+ singular
2302
+ plural
2303
+ }
2304
+ }
2305
+ currentBalance
2306
+ totalConsumed
2307
+ totalGranted
2308
+ resourceId
2309
+ validUntil
2253
2310
  }
2254
2311
  `,e.CreditsBalanceSummaryFragmentDoc=(0,n.default)`
2255
2312
  fragment CreditsBalanceSummaryFragment on CreditBalanceSummary {
2256
2313
  customerId
2257
2314
  balances {
2258
- currency {
2259
- currencyId
2260
- displayName
2261
- symbol
2262
- units {
2263
- singular
2264
- plural
2265
- }
2266
- }
2267
- currentBalance
2268
- totalConsumed
2269
- totalGranted
2315
+ ...CreditBalanceFragment
2270
2316
  }
2271
2317
  }
2272
2318
  `,e.PaymentSessionFragmentDoc=(0,n.default)`
@@ -2561,7 +2607,13 @@ ${e.TotalPriceFragmentDoc}`,e.GrantCreditsDocument=(0,n.default)`
2561
2607
  ...PaymentSessionFragment
2562
2608
  }
2563
2609
  }
2564
- ${e.PaymentSessionFragmentDoc}`,e.GetCustomerByIdDocument=(0,n.default)`
2610
+ ${e.PaymentSessionFragmentDoc}`,e.VoidCreditGrantDocument=(0,n.default)`
2611
+ mutation VoidCreditGrant($input: VoidCreditGrantInput!) {
2612
+ voidCreditGrant(input: $input) {
2613
+ ...CreditGrantFragment
2614
+ }
2615
+ }
2616
+ ${e.CreditGrantFragmentDoc}`,e.GetCustomerByIdDocument=(0,n.default)`
2565
2617
  query GetCustomerById($input: GetCustomerByRefIdInput!) {
2566
2618
  getCustomerByRefId(input: $input) {
2567
2619
  ...CustomerWithSubscriptionsFragment
@@ -2745,6 +2797,7 @@ ${e.FeatureFragmentDoc}`,e.GetProductsDocument=(0,n.default)`
2745
2797
  sdkConfiguration {
2746
2798
  sentryDsn
2747
2799
  isWidgetWatermarkEnabled
2800
+ showWatermark
2748
2801
  }
2749
2802
  }
2750
2803
  `,e.GetCustomerPortalByRefIdDocument=(0,n.default)`
@@ -2838,7 +2891,8 @@ ${e.LayoutConfigurationFragmentDoc}`,e.GetUsageHistoryDocument=(0,n.default)`
2838
2891
  ...CreditsBalanceSummaryFragment
2839
2892
  }
2840
2893
  }
2841
- ${e.CreditsBalanceSummaryFragmentDoc}`,e.GetCreditGrantsDocument=(0,n.default)`
2894
+ ${e.CreditsBalanceSummaryFragmentDoc}
2895
+ ${e.CreditBalanceFragmentDoc}`,e.GetCreditGrantsDocument=(0,n.default)`
2842
2896
  query GetCreditGrants($input: GetCreditGrantsInput!) {
2843
2897
  creditGrants(input: $input) {
2844
2898
  pageInfo {
@@ -2893,7 +2947,13 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
2893
2947
  ...PackagePublishedPayload
2894
2948
  }
2895
2949
  }
2896
- ${e.PackagePublishedPayloadFragmentDoc}`;const i=(t,o,s)=>t();function a(t,o=i){return{ProvisionCustomer(s,c){return o(l=>t.request(e.ProvisionCustomerDocument,s,Object.assign(Object.assign({},c),l)),"ProvisionCustomer","mutation")},ImportCustomerBulk(s,c){return o(l=>t.request(e.ImportCustomerBulkDocument,s,Object.assign(Object.assign({},c),l)),"ImportCustomerBulk","mutation")},ImportCustomer(s,c){return o(l=>t.request(e.ImportCustomerDocument,s,Object.assign(Object.assign({},c),l)),"ImportCustomer","mutation")},UpdateCustomer(s,c){return o(l=>t.request(e.UpdateCustomerDocument,s,Object.assign(Object.assign({},c),l)),"UpdateCustomer","mutation")},DetachCustomerPaymentMethod(s,c){return o(l=>t.request(e.DetachCustomerPaymentMethodDocument,s,Object.assign(Object.assign({},c),l)),"DetachCustomerPaymentMethod","mutation")},GrantPromotionalEntitlements(s,c){return o(l=>t.request(e.GrantPromotionalEntitlementsDocument,s,Object.assign(Object.assign({},c),l)),"GrantPromotionalEntitlements","mutation")},RevokePromotionalEntitlement(s,c){return o(l=>t.request(e.RevokePromotionalEntitlementDocument,s,Object.assign(Object.assign({},c),l)),"RevokePromotionalEntitlement","mutation")},ProvisionSubscription(s,c){return o(l=>t.request(e.ProvisionSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"ProvisionSubscription","mutation")},ApplySubscription(s,c){return o(l=>t.request(e.ApplySubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"ApplySubscription","mutation")},ImportSubscriptionsBulk(s,c){return o(l=>t.request(e.ImportSubscriptionsBulkDocument,s,Object.assign(Object.assign({},c),l)),"ImportSubscriptionsBulk","mutation")},UpdateSubscription(s,c){return o(l=>t.request(e.UpdateSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"UpdateSubscription","mutation")},CancelSubscription(s,c){return o(l=>t.request(e.CancelSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"CancelSubscription","mutation")},EstimateSubscription(s,c){return o(l=>t.request(e.EstimateSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"EstimateSubscription","mutation")},EstimateSubscriptionUpdate(s,c){return o(l=>t.request(e.EstimateSubscriptionUpdateDocument,s,Object.assign(Object.assign({},c),l)),"EstimateSubscriptionUpdate","mutation")},PreviewSubscription(s,c){return o(l=>t.request(e.PreviewSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"PreviewSubscription","mutation")},PreviewNextInvoice(s,c){return o(l=>t.request(e.PreviewNextInvoiceDocument,s,Object.assign(Object.assign({},c),l)),"PreviewNextInvoice","mutation")},CancelSubscriptionUpdates(s,c){return o(l=>t.request(e.CancelSubscriptionUpdatesDocument,s,Object.assign(Object.assign({},c),l)),"CancelSubscriptionUpdates","mutation")},ReportUsage(s,c){return o(l=>t.request(e.ReportUsageDocument,s,Object.assign(Object.assign({},c),l)),"ReportUsage","mutation")},ReportUsageBulk(s,c){return o(l=>t.request(e.ReportUsageBulkDocument,s,Object.assign(Object.assign({},c),l)),"ReportUsageBulk","mutation")},ReportEvent(s,c){return o(l=>t.request(e.ReportEventDocument,s,Object.assign(Object.assign({},c),l)),"ReportEvent","mutation")},ReportEntitlementCheckRequested(s,c){return o(l=>t.request(e.ReportEntitlementCheckRequestedDocument,s,Object.assign(Object.assign({},c),l)),"ReportEntitlementCheckRequested","mutation")},CreateSubscription(s,c){return o(l=>t.request(e.CreateSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"CreateSubscription","mutation")},MigrateSubscriptionToLatest(s,c){return o(l=>t.request(e.MigrateSubscriptionToLatestDocument,s,Object.assign(Object.assign({},c),l)),"MigrateSubscriptionToLatest","mutation")},ArchiveCustomer(s,c){return o(l=>t.request(e.ArchiveCustomerDocument,s,Object.assign(Object.assign({},c),l)),"ArchiveCustomer","mutation")},UnarchiveCustomer(s,c){return o(l=>t.request(e.UnarchiveCustomerDocument,s,Object.assign(Object.assign({},c),l)),"UnarchiveCustomer","mutation")},TransferSubscription(s,c){return o(l=>t.request(e.TransferSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"TransferSubscription","mutation")},DelegateSubscriptionToCustomer(s,c){return o(l=>t.request(e.DelegateSubscriptionToCustomerDocument,s,Object.assign(Object.assign({},c),l)),"DelegateSubscriptionToCustomer","mutation")},TransferSubscriptionToResource(s,c){return o(l=>t.request(e.TransferSubscriptionToResourceDocument,s,Object.assign(Object.assign({},c),l)),"TransferSubscriptionToResource","mutation")},GrantCredits(s,c){return o(l=>t.request(e.GrantCreditsDocument,s,Object.assign(Object.assign({},c),l)),"GrantCredits","mutation")},GrantPromotionalEntitlementsGroup(s,c){return o(l=>t.request(e.GrantPromotionalEntitlementsGroupDocument,s,Object.assign(Object.assign({},c),l)),"GrantPromotionalEntitlementsGroup","mutation")},RevokePromotionalEntitlementsGroup(s,c){return o(l=>t.request(e.RevokePromotionalEntitlementsGroupDocument,s,Object.assign(Object.assign({},c),l)),"RevokePromotionalEntitlementsGroup","mutation")},UnlinkPromotionalEntitlementsGroup(s,c){return o(l=>t.request(e.UnlinkPromotionalEntitlementsGroupDocument,s,Object.assign(Object.assign({},c),l)),"UnlinkPromotionalEntitlementsGroup","mutation")},CreatePaymentSession(s,c){return o(l=>t.request(e.CreatePaymentSessionDocument,s,Object.assign(Object.assign({},c),l)),"CreatePaymentSession","mutation")},GetCustomerById(s,c){return o(l=>t.request(e.GetCustomerByIdDocument,s,Object.assign(Object.assign({},c),l)),"GetCustomerById","query")},GetCustomerStatistics(s,c){return o(l=>t.request(e.GetCustomerStatisticsDocument,s,Object.assign(Object.assign({},c),l)),"GetCustomerStatistics","query")},GetActiveSubscriptions(s,c){return o(l=>t.request(e.GetActiveSubscriptionsDocument,s,Object.assign(Object.assign({},c),l)),"GetActiveSubscriptions","query")},GetActiveSubscriptionsList(s,c){return o(l=>t.request(e.GetActiveSubscriptionsListDocument,s,Object.assign(Object.assign({},c),l)),"GetActiveSubscriptionsList","query")},GetSubscriptions(s,c){return o(l=>t.request(e.GetSubscriptionsDocument,s,Object.assign(Object.assign({},c),l)),"GetSubscriptions","query")},GetSubscription(s,c){return o(l=>t.request(e.GetSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"GetSubscription","query")},GetCoupons(s,c){return o(l=>t.request(e.GetCouponsDocument,s,Object.assign(Object.assign({},c),l)),"GetCoupons","query")},GetPaywall(s,c){return o(l=>t.request(e.GetPaywallDocument,s,Object.assign(Object.assign({},c),l)),"GetPaywall","query")},GetEntitlements(s,c){return o(l=>t.request(e.GetEntitlementsDocument,s,Object.assign(Object.assign({},c),l)),"GetEntitlements","query")},GetEntitlementsState(s,c){return o(l=>t.request(e.GetEntitlementsStateDocument,s,Object.assign(Object.assign({},c),l)),"GetEntitlementsState","query")},GetEntitlement(s,c){return o(l=>t.request(e.GetEntitlementDocument,s,Object.assign(Object.assign({},c),l)),"GetEntitlement","query")},GetProducts(s,c){return o(l=>t.request(e.GetProductsDocument,s,Object.assign(Object.assign({},c),l)),"GetProducts","query")},GetSdkConfiguration(s,c){return o(l=>t.request(e.GetSdkConfigurationDocument,s,Object.assign(Object.assign({},c),l)),"GetSdkConfiguration","query")},GetCustomerPortalByRefId(s,c){return o(l=>t.request(e.GetCustomerPortalByRefIdDocument,s,Object.assign(Object.assign({},c),l)),"GetCustomerPortalByRefId","query")},GetCheckoutState(s,c){return o(l=>t.request(e.GetCheckoutStateDocument,s,Object.assign(Object.assign({},c),l)),"GetCheckoutState","query")},GetMockPaywall(s,c){return o(l=>t.request(e.GetMockPaywallDocument,s,Object.assign(Object.assign({},c),l)),"GetMockPaywall","query")},GetUsageHistory(s,c){return o(l=>t.request(e.GetUsageHistoryDocument,s,Object.assign(Object.assign({},c),l)),"GetUsageHistory","query")},GetUsageHistoryV2(s,c){return o(l=>t.request(e.GetUsageHistoryV2Document,s,Object.assign(Object.assign({},c),l)),"GetUsageHistoryV2","query")},GetCreditBalance(s,c){return o(l=>t.request(e.GetCreditBalanceDocument,s,Object.assign(Object.assign({},c),l)),"GetCreditBalance","query")},GetCreditGrants(s,c){return o(l=>t.request(e.GetCreditGrantsDocument,s,Object.assign(Object.assign({},c),l)),"GetCreditGrants","query")},GetCreditLedger(s,c){return o(l=>t.request(e.GetCreditLedgerDocument,s,Object.assign(Object.assign({},c),l)),"GetCreditLedger","query")},GetCreditUsage(s,c){return o(l=>t.request(e.GetCreditUsageDocument,s,Object.assign(Object.assign({},c),l)),"GetCreditUsage","query")},OnEntitlementsUpdated(s,c){return o(l=>t.request(e.OnEntitlementsUpdatedDocument,s,Object.assign(Object.assign({},c),l)),"OnEntitlementsUpdated","subscription")},OnUsageUpdated(s,c){return o(l=>t.request(e.OnUsageUpdatedDocument,s,Object.assign(Object.assign({},c),l)),"OnUsageUpdated","subscription")},OnPackagePublished(s,c){return o(l=>t.request(e.OnPackagePublishedDocument,s,Object.assign(Object.assign({},c),l)),"OnPackagePublished","subscription")}}}e.getSdk=a})(Ot)),Ot}var De=eu();const pa=(e,n)=>e.minUnitQuantity&&n<e.minUnitQuantity?e.minUnitQuantity:e.maxUnitQuantity&&n>e.maxUnitQuantity?e.maxUnitQuantity:n,fa=e=>!!(e!=null&&e.pricePoints.some(n=>n.billingPeriod===De.BillingPeriod.Monthly)),ha=e=>!!(e!=null&&e.pricePoints.some(n=>n.billingPeriod===De.BillingPeriod.Annually)),tu=e=>fa(e)&&ha(e),Xn=(e,n,i)=>e===De.BillingPeriod.Monthly&&n||e===De.BillingPeriod.Annually&&i?e:null,Jn=({pricingModel:e})=>e===P.BillingModel.PerUnit;function nu(e,n,i){var o;if(!n)return[];const a=kn(e,"featureId"),t=kn(Nn((o=i==null?void 0:i.prices)==null?void 0:o.map(s=>{const{feature:c}=s;return!c||!Jn(s)?null:{featureId:c.featureId,quantity:c.unitQuantity||null}})),"featureId");return Nn(n==null?void 0:n.map(s=>{var d,h,m;const c=(d=s.feature)==null?void 0:d.featureId;if(!c||!Jn(s))return null;let l;const u=((h=a[c])==null?void 0:h.quantity)||((m=t[c])==null?void 0:m.quantity);return l=pa(s,u||1),s.isTieredPrice&&!nn(s.tiers)&&(l=Ii(s.tiers,l).upTo),{featureId:c,quantity:l}}))}function iu({plan:e,activeSubscription:n,preferredBillingPeriod:i}){var s,c;const a=fa(e),t=ha(e);if(i){const l=Xn(i,a,t);if(l)return l}if(((s=n==null?void 0:n.plan)==null?void 0:s.id)===(e==null?void 0:e.id))return((c=n==null?void 0:n.price)==null?void 0:c.billingPeriod)||De.BillingPeriod.Monthly;if(n!=null&&n.prices&&(n==null?void 0:n.prices.length)>0){const l=Xn(n==null?void 0:n.prices[0].billingPeriod,a,t);if(l)return l}return t?De.BillingPeriod.Annually:De.BillingPeriod.Monthly}function au({preferredBillingPeriod:e,plan:n,activeSubscription:i,billingCountryCode:a,preconfiguredBillableFeatures:t}){const o=iu({plan:n,activeSubscription:i,preferredBillingPeriod:e}),s=n==null?void 0:n.pricePoints.filter(l=>l.billingPeriod===o),c=nu(t,s,i);return{billingPeriod:o,billableFeatures:c,billingCountryCode:a}}function ru(){const[{planStep:e}]=H();return e}function ou(){const[,e]=H();return(n,i)=>e(a=>{const t=a.planStep.billableFeatures.find(o=>o.featureId===n);t?t.quantity=i:a.planStep.billableFeatures.push({featureId:n,quantity:i})})}function su(){const[,e]=H();return n=>e(i=>{i.planStep.billingPeriod=n,i.addonsStep.addons=i.addonsStep.addons.filter(a=>a.addon.pricePoints.some(t=>t.billingPeriod===n))})}function Re(){const e=ru();return O(T({},e),{setBillingPeriod:su(),setBillableFeature:ou()})}var mt=(e=>(e.PLAN="PLAN",e.ADDONS="ADDONS",e.PAYMENT="PAYMENT",e))(mt||{});const ya=[{key:"PLAN",label:"Plan"},{key:"ADDONS",label:"Add-ons"},{key:"PAYMENT",label:"Payment details"}],ei={activeStep:0,completedSteps:[],steps:ya,isDisabled:!1},cu=(e,n,i,a)=>{if(tu(e)&&!a)return!1;const t=n.map(s=>s.featureId),o=i.map(s=>s.featureId);return!(t.length!==o.length||!t.every(s=>o.includes(s)))};function lu({isLoading:e,skipCheckoutSteps:n,plan:i,availableAddons:a,availableCharges:t,preferredBillingPeriod:o,preconfiguredBillableFeatures:s}){if(e||!i)return ei;const c=[];return n.includes("PLAN")&&cu(i,t,s,o)&&c.push("PLAN"),((a==null?void 0:a.length)===0||n.includes("ADDONS"))&&c.push("ADDONS"),O(T({},ei),{steps:ya.filter(l=>!c.includes(l.key))})}function uu(){const[{progressBar:e}]=H();return e}function du(){const[e,n]=H();return i=>B(null,null,function*(){const{progressBar:a,planStep:t,addonsStep:o,paymentStep:s,onBeforeStepChange:c}=e;if(i!==a.activeStep&&c){const l=a.steps[a.activeStep],u=a.steps[i];if(l&&u){const d={planStep:t,addonsStep:o,paymentStep:s};if(!(yield c({from:l.key,to:u.key,state:d})))return}}n(({progressBar:l})=>{l.activeStep=i})})}function mu(){const[,e]=H();return n=>e(({progressBar:i})=>{i.completedSteps.push(n)})}function gu(e){return e.completedSteps.length>=e.steps.length-1}function pu(){const[e,n]=H();return()=>B(null,null,function*(){const{progressBar:i,planStep:a,addonsStep:t,paymentStep:o,onBeforeStepChange:s}=e;if(i.isDisabled)return;const c=i.steps[i.activeStep],l=i.steps[i.activeStep+1];if(l&&s){const u={planStep:a,addonsStep:t,paymentStep:o};if(!(yield s({from:c.key,to:l.key,state:u})))return}n(({progressBar:u})=>{u.completedSteps.includes(u.activeStep)||u.completedSteps.push(u.activeStep),u.activeStep<u.steps.length-1&&(u.activeStep+=1)})})}function fu(){const[,e]=H();return n=>e(({progressBar:i})=>{i.isDisabled=!!n})}function Je(){const e=uu();return{currentStep:e.steps[e.activeStep],progressBarState:e,isLastStep:e.activeStep===e.steps.length-1,isCheckoutComplete:gu(e),setActiveStep:du(),markStepAsCompleted:mu(),goNext:pu(),setIsDisabled:fu()}}function ln(){const[{planStep:e,addonsStep:n,promotionCode:i,paymentStep:a}]=H();return O(T({},e),{addons:n.addons,promotionCode:i,billingAddress:a.billingAddress,taxPercentage:a.taxPercentage})}function hu({billingAddress:e,taxPercentage:n}){return!e&&!n?{}:{billingInformation:T(T({},e?{billingAddress:e}:{}),n?{taxPercentage:n}:{})}}const yu=m=>B(null,[m],function*({stigg:e,customerId:n,planId:i,resourceId:a,promotionCode:t,addons:o,billableFeatures:s,billingCountryCode:c,billingPeriod:l,billingAddress:u,taxPercentage:d,onMockCheckoutPreview:h}){var b;const f=o.map(({addon:E,quantity:I})=>({addonId:E.id,quantity:I}));let g=null,x=null;try{if(n&&i){const E=T({customerId:n,planId:i,resourceId:a,billingCountryCode:c,addons:f,billingPeriod:l,promotionCode:t,billableFeatures:en(s)?void 0:s},hu({billingAddress:u,taxPercentage:d}));g=h?h(E):yield e.previewSubscription(E)}}catch(E){const[,I]=((b=E==null?void 0:E.message)==null?void 0:b.split("Error:"))||[];x=I==null?void 0:I.trim()}return{subscriptionPreview:g,errorMessage:x}}),Ca=({onMockCheckoutPreview:e}={})=>{const{stigg:n}=G(),i=ln(),[{resourceId:a}]=H(),{checkoutState:t,widgetState:o}=X(),{plan:s,customer:c}=t||{};return{previewSubscriptionAction:D.useCallback((...d)=>B(null,[...d],function*({promotionCode:u}={}){return o.isValid?yu({stigg:n,customerId:c==null?void 0:c.id,planId:s==null?void 0:s.id,resourceId:a,addons:i.addons,billableFeatures:i.billableFeatures,billingCountryCode:i.billingCountryCode,billingPeriod:i.billingPeriod,billingAddress:i.billingAddress,taxPercentage:i.taxPercentage,promotionCode:u!=null?u:i.promotionCode,onMockCheckoutPreview:e}):{subscriptionPreview:null,errorMessage:null}}),[n,c==null?void 0:c.id,s==null?void 0:s.id,a,i.addons,i.billableFeatures,i.billingCountryCode,i.billingPeriod,i.billingAddress,i.taxPercentage,i.promotionCode,o.isValid,e])}},Cu=500,Pu=({onMockCheckoutPreview:e}={})=>{const[n,i]=D.useState(null),[a,t]=D.useState(!1),{previewSubscriptionAction:o}=Ca({onMockCheckoutPreview:e});return D.useEffect(()=>{const s=()=>B(null,null,function*(){const{subscriptionPreview:l}=yield o();l&&i(l),t(!1)});t(!0);const c=setTimeout(()=>{t(!0),s()},Cu);return()=>{clearTimeout(c)}},[o]),{subscriptionPreview:n,isFetchingSubscriptionPreview:a}};function bu({customer:e,taxPercentage:n}){return{useNewPaymentMethod:!(e!=null&&e.paymentMethodDetails),taxPercentage:n}}function Eu(){const[,e]=H();return n=>e(i=>{i.paymentStep.useNewPaymentMethod=n})}function Su(){const[,e]=H();return n=>e(i=>{i.paymentStep.errorMessage=n})}function Du(){const[,e]=H();return n=>e(i=>{i.paymentStep.billingAddress=n})}function xu(){const[{paymentStep:e}]=H();return e}function we(){const e=xu();return O(T({},e),{setUseNewPaymentMethod:Eu(),setErrorMessage:Su(),setBillingAddress:Du()})}function Tu(e){return ze({changePlan:"Change",billingPeriodsTitle:"Billing cycle",addAddonText:"Add",addonBillingPeriodNotAvailableText:({planBillingPeriod:i})=>i===P.BillingPeriod.Monthly?"Exclusively available on annual plans":"Exclusively available on monthly plans",newPaymentMethodText:"New payment method",newPaymentMethodBillingAddressTitle:"Billing address",newPaymentMethodCardTitle:"Payment method",summary:{title:"Order summary",planName:({plan:i})=>`${i.displayName} plan`,addCouponCodeText:"Add promotion code",couponCodeTitle:"Promotion code",addonsSectionTitle:"Add-ons",discountsSectionTitle:"Discounts",onlyPayAsYouGoText:"Varies by usage",startsAtText:"Starts at ",proratedTotalDueText:"Prorated charge today",baseChargeText:()=>"Base charge",totalText:"Total",totalDueText:"Total due today",totalBillingPeriodText:({billingPeriod:i})=>`Billed ${i.toLowerCase()}`,appliedCreditsTitle:"Applied credits",creditsForUnusedTimeText:({credits:i})=>`Your account will be granted credits worth ${i} for unused time, which will be automatically applied to future payments.`,discountText:({discountDetails:i,currency:a})=>{let t="";i.type===P.DiscountType.Percentage?t=`${i.value}% off`:t=`${ee({amount:i.value,currency:a})}`;let o="";switch(i.durationType){case P.DiscountDurationType.Once:{o=" once";break}case P.DiscountDurationType.Repeating:{o=`${i.type===P.DiscountType.Fixed?" per month":""} for ${i.durationInMonths} months`;break}case P.DiscountDurationType.Forever:default:o=""}return`${t}${o}`},taxTitle:({taxDetails:i})=>`Tax (${i==null?void 0:i.percentage}%)`,changesWillApplyAtEndOfBillingPeriod:({billingPeriodEnd:i})=>`Your changes will take effect at the end of your current billing cycle on ${te(i).format("MMMM D, YYYY")}.`,checkoutSuccessText:"Changes applied",payAsYouGoTooltipText:"Billed according to actual usage"},checkoutButton:{nextText:"Next",noChangesText:"No changes",updateText:"Update subscription",downgradeToFreeText:"Cancel subscription",upgradeText:"Subscribe"},downgradeToFree:{alertText:()=>"We’re sorry to see you cancel your paid subscription 😭",freePlanHeader:()=>"New plan",freePlanName:({plan:i})=>`${i.displayName}`,freePlanPriceText:()=>"Free",paidPlanHeader:()=>"Current plan",paidPlanName:({plan:i})=>`${i.displayName}`,paidPlanPriceText:({billingPeriod:i})=>`Paid plan${i?`, billed ${i.toLowerCase()}`:""}`}},e)}const _e={primary:"rgb(50, 126, 238)",textColor:"rgb(0, 30, 108)",backgroundColor:"rgb(255, 255, 255)",borderColor:"rgb(235, 237, 243)",summaryBackgroundColor:"rgb(109, 121, 144)"};function Iu(e,n,i){const{palette:a}=e||{};return{primary:(n==null?void 0:n.primary)||(a==null?void 0:a.primary)||_e.primary,textColor:(n==null?void 0:n.textColor)||(a==null?void 0:a.text.primary)||_e.textColor,backgroundColor:(n==null?void 0:n.backgroundColor)||(a==null?void 0:a.backgroundPaper)||_e.backgroundColor,borderColor:(n==null?void 0:n.borderColor)||(a==null?void 0:a.outlinedBorder)||_e.borderColor,summaryBackgroundColor:(n==null?void 0:n.summaryBackgroundColor)||(a==null?void 0:a.backgroundHighlight)||_e.summaryBackgroundColor,paymentInputBackgroundColor:n==null?void 0:n.paymentInputBackgroundColor,paymentInputBorderColor:n==null?void 0:n.paymentInputBorderColor,paymentInputBorderRadius:n==null?void 0:n.paymentInputBorderRadius}}const un=D.createContext(null);un.displayName="CheckoutContext";const H=()=>{const e=D.useContext(un);if(!e)throw new Error("Could not find Checkout context; You need to wrap your checkout components in an <CheckoutProvider> component.");return e},vu=({children:e,initialState:n})=>{const[i,a]=D.useState(n);D.useEffect(()=>{a(n)},[n]);const t=D.useCallback(c=>a(l=>dr.produce(l,u=>c(u))),[a]),[o,s]=D.useMemo(()=>[i,t],[t,i]);return r.jsx(un.Provider,{value:[o,s],children:e})};function Au({children:e,textOverrides:n,theme:i,preferredBillingPeriod:a,billableFeatures:t,resourceId:o,planId:s,billingCountryCode:c,billingInformation:l,onMockCheckoutState:u,skipCheckoutSteps:d,onBeforeStepChange:h}){var I;const{checkout:m,isLoading:f,isWidgetWatermarkEnabled:g}=rl({resourceId:o,planId:s,billingCountryCode:c,onMockCheckoutState:u}),x=m!=null&&m.configuration?Ds(m.configuration):{typography:Ct(null,Ui)},b=bt(x),E=D.useMemo(()=>{var $,w;const N=Iu(b,i),A=Tu(n),F=au({preferredBillingPeriod:a,plan:m==null?void 0:m.plan,activeSubscription:m==null?void 0:m.activeSubscription,billingCountryCode:c,preconfiguredBillableFeatures:t!=null?t:[]}),v=Kc({plan:m==null?void 0:m.plan,activeSubscription:m==null?void 0:m.activeSubscription}),U=bu({customer:m==null?void 0:m.customer,taxPercentage:($=l==null?void 0:l.taxDetails)==null?void 0:$.taxPercentage}),k=lu({isLoading:f,skipCheckoutSteps:d!=null?d:[],plan:m==null?void 0:m.plan,availableAddons:v.availableAddons,availableCharges:F.billableFeatures,preferredBillingPeriod:a,preconfiguredBillableFeatures:t!=null?t:[]});return{checkout:m,checkoutLocalization:A,stiggTheme:b,theme:N,progressBar:k,planStep:F,addonsStep:v,paymentStep:U,resourceId:(w=m==null?void 0:m.resource)==null?void 0:w.id,widgetState:{readOnly:!1,isValid:!0,isLoadingCheckoutData:f},isWidgetWatermarkEnabled:g,checkoutSuccess:!1,onBeforeStepChange:h}},[a,c,m,f,d,(I=l==null?void 0:l.taxDetails)==null?void 0:I.taxPercentage,h]);return r.jsx(ke,{componentTheme:x,children:r.jsx(vu,{initialState:E,children:e})},m==null?void 0:m.plan.id)}const ku=p.div`
2950
+ ${e.PackagePublishedPayloadFragmentDoc}`,e.OnCreditBalanceUpdatedDocument=(0,n.default)`
2951
+ subscription OnCreditBalanceUpdated {
2952
+ creditBalanceUpdated {
2953
+ ...CreditBalanceUpdatedPayload
2954
+ }
2955
+ }
2956
+ ${e.CreditBalanceUpdatedPayloadFragmentDoc}`;const i=(t,a,s)=>t();function r(t,a=i){return{ProvisionCustomer(s,c){return a(l=>t.request(e.ProvisionCustomerDocument,s,Object.assign(Object.assign({},c),l)),"ProvisionCustomer","mutation")},ImportCustomerBulk(s,c){return a(l=>t.request(e.ImportCustomerBulkDocument,s,Object.assign(Object.assign({},c),l)),"ImportCustomerBulk","mutation")},ImportCustomer(s,c){return a(l=>t.request(e.ImportCustomerDocument,s,Object.assign(Object.assign({},c),l)),"ImportCustomer","mutation")},UpdateCustomer(s,c){return a(l=>t.request(e.UpdateCustomerDocument,s,Object.assign(Object.assign({},c),l)),"UpdateCustomer","mutation")},DetachCustomerPaymentMethod(s,c){return a(l=>t.request(e.DetachCustomerPaymentMethodDocument,s,Object.assign(Object.assign({},c),l)),"DetachCustomerPaymentMethod","mutation")},GrantPromotionalEntitlements(s,c){return a(l=>t.request(e.GrantPromotionalEntitlementsDocument,s,Object.assign(Object.assign({},c),l)),"GrantPromotionalEntitlements","mutation")},RevokePromotionalEntitlement(s,c){return a(l=>t.request(e.RevokePromotionalEntitlementDocument,s,Object.assign(Object.assign({},c),l)),"RevokePromotionalEntitlement","mutation")},ProvisionSubscription(s,c){return a(l=>t.request(e.ProvisionSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"ProvisionSubscription","mutation")},ApplySubscription(s,c){return a(l=>t.request(e.ApplySubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"ApplySubscription","mutation")},ImportSubscriptionsBulk(s,c){return a(l=>t.request(e.ImportSubscriptionsBulkDocument,s,Object.assign(Object.assign({},c),l)),"ImportSubscriptionsBulk","mutation")},UpdateSubscription(s,c){return a(l=>t.request(e.UpdateSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"UpdateSubscription","mutation")},CancelSubscription(s,c){return a(l=>t.request(e.CancelSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"CancelSubscription","mutation")},EstimateSubscription(s,c){return a(l=>t.request(e.EstimateSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"EstimateSubscription","mutation")},EstimateSubscriptionUpdate(s,c){return a(l=>t.request(e.EstimateSubscriptionUpdateDocument,s,Object.assign(Object.assign({},c),l)),"EstimateSubscriptionUpdate","mutation")},PreviewSubscription(s,c){return a(l=>t.request(e.PreviewSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"PreviewSubscription","mutation")},PreviewNextInvoice(s,c){return a(l=>t.request(e.PreviewNextInvoiceDocument,s,Object.assign(Object.assign({},c),l)),"PreviewNextInvoice","mutation")},CancelSubscriptionUpdates(s,c){return a(l=>t.request(e.CancelSubscriptionUpdatesDocument,s,Object.assign(Object.assign({},c),l)),"CancelSubscriptionUpdates","mutation")},ReportUsage(s,c){return a(l=>t.request(e.ReportUsageDocument,s,Object.assign(Object.assign({},c),l)),"ReportUsage","mutation")},ReportUsageBulk(s,c){return a(l=>t.request(e.ReportUsageBulkDocument,s,Object.assign(Object.assign({},c),l)),"ReportUsageBulk","mutation")},ReportEvent(s,c){return a(l=>t.request(e.ReportEventDocument,s,Object.assign(Object.assign({},c),l)),"ReportEvent","mutation")},ReportEntitlementCheckRequested(s,c){return a(l=>t.request(e.ReportEntitlementCheckRequestedDocument,s,Object.assign(Object.assign({},c),l)),"ReportEntitlementCheckRequested","mutation")},CreateSubscription(s,c){return a(l=>t.request(e.CreateSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"CreateSubscription","mutation")},MigrateSubscriptionToLatest(s,c){return a(l=>t.request(e.MigrateSubscriptionToLatestDocument,s,Object.assign(Object.assign({},c),l)),"MigrateSubscriptionToLatest","mutation")},ArchiveCustomer(s,c){return a(l=>t.request(e.ArchiveCustomerDocument,s,Object.assign(Object.assign({},c),l)),"ArchiveCustomer","mutation")},UnarchiveCustomer(s,c){return a(l=>t.request(e.UnarchiveCustomerDocument,s,Object.assign(Object.assign({},c),l)),"UnarchiveCustomer","mutation")},TransferSubscription(s,c){return a(l=>t.request(e.TransferSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"TransferSubscription","mutation")},DelegateSubscriptionToCustomer(s,c){return a(l=>t.request(e.DelegateSubscriptionToCustomerDocument,s,Object.assign(Object.assign({},c),l)),"DelegateSubscriptionToCustomer","mutation")},TransferSubscriptionToResource(s,c){return a(l=>t.request(e.TransferSubscriptionToResourceDocument,s,Object.assign(Object.assign({},c),l)),"TransferSubscriptionToResource","mutation")},GrantCredits(s,c){return a(l=>t.request(e.GrantCreditsDocument,s,Object.assign(Object.assign({},c),l)),"GrantCredits","mutation")},GrantPromotionalEntitlementsGroup(s,c){return a(l=>t.request(e.GrantPromotionalEntitlementsGroupDocument,s,Object.assign(Object.assign({},c),l)),"GrantPromotionalEntitlementsGroup","mutation")},RevokePromotionalEntitlementsGroup(s,c){return a(l=>t.request(e.RevokePromotionalEntitlementsGroupDocument,s,Object.assign(Object.assign({},c),l)),"RevokePromotionalEntitlementsGroup","mutation")},UnlinkPromotionalEntitlementsGroup(s,c){return a(l=>t.request(e.UnlinkPromotionalEntitlementsGroupDocument,s,Object.assign(Object.assign({},c),l)),"UnlinkPromotionalEntitlementsGroup","mutation")},CreatePaymentSession(s,c){return a(l=>t.request(e.CreatePaymentSessionDocument,s,Object.assign(Object.assign({},c),l)),"CreatePaymentSession","mutation")},VoidCreditGrant(s,c){return a(l=>t.request(e.VoidCreditGrantDocument,s,Object.assign(Object.assign({},c),l)),"VoidCreditGrant","mutation")},GetCustomerById(s,c){return a(l=>t.request(e.GetCustomerByIdDocument,s,Object.assign(Object.assign({},c),l)),"GetCustomerById","query")},GetCustomerStatistics(s,c){return a(l=>t.request(e.GetCustomerStatisticsDocument,s,Object.assign(Object.assign({},c),l)),"GetCustomerStatistics","query")},GetActiveSubscriptions(s,c){return a(l=>t.request(e.GetActiveSubscriptionsDocument,s,Object.assign(Object.assign({},c),l)),"GetActiveSubscriptions","query")},GetActiveSubscriptionsList(s,c){return a(l=>t.request(e.GetActiveSubscriptionsListDocument,s,Object.assign(Object.assign({},c),l)),"GetActiveSubscriptionsList","query")},GetSubscriptions(s,c){return a(l=>t.request(e.GetSubscriptionsDocument,s,Object.assign(Object.assign({},c),l)),"GetSubscriptions","query")},GetSubscription(s,c){return a(l=>t.request(e.GetSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"GetSubscription","query")},GetCoupons(s,c){return a(l=>t.request(e.GetCouponsDocument,s,Object.assign(Object.assign({},c),l)),"GetCoupons","query")},GetPaywall(s,c){return a(l=>t.request(e.GetPaywallDocument,s,Object.assign(Object.assign({},c),l)),"GetPaywall","query")},GetEntitlements(s,c){return a(l=>t.request(e.GetEntitlementsDocument,s,Object.assign(Object.assign({},c),l)),"GetEntitlements","query")},GetEntitlementsState(s,c){return a(l=>t.request(e.GetEntitlementsStateDocument,s,Object.assign(Object.assign({},c),l)),"GetEntitlementsState","query")},GetEntitlement(s,c){return a(l=>t.request(e.GetEntitlementDocument,s,Object.assign(Object.assign({},c),l)),"GetEntitlement","query")},GetProducts(s,c){return a(l=>t.request(e.GetProductsDocument,s,Object.assign(Object.assign({},c),l)),"GetProducts","query")},GetSdkConfiguration(s,c){return a(l=>t.request(e.GetSdkConfigurationDocument,s,Object.assign(Object.assign({},c),l)),"GetSdkConfiguration","query")},GetCustomerPortalByRefId(s,c){return a(l=>t.request(e.GetCustomerPortalByRefIdDocument,s,Object.assign(Object.assign({},c),l)),"GetCustomerPortalByRefId","query")},GetCheckoutState(s,c){return a(l=>t.request(e.GetCheckoutStateDocument,s,Object.assign(Object.assign({},c),l)),"GetCheckoutState","query")},GetMockPaywall(s,c){return a(l=>t.request(e.GetMockPaywallDocument,s,Object.assign(Object.assign({},c),l)),"GetMockPaywall","query")},GetUsageHistory(s,c){return a(l=>t.request(e.GetUsageHistoryDocument,s,Object.assign(Object.assign({},c),l)),"GetUsageHistory","query")},GetUsageHistoryV2(s,c){return a(l=>t.request(e.GetUsageHistoryV2Document,s,Object.assign(Object.assign({},c),l)),"GetUsageHistoryV2","query")},GetCreditBalance(s,c){return a(l=>t.request(e.GetCreditBalanceDocument,s,Object.assign(Object.assign({},c),l)),"GetCreditBalance","query")},GetCreditGrants(s,c){return a(l=>t.request(e.GetCreditGrantsDocument,s,Object.assign(Object.assign({},c),l)),"GetCreditGrants","query")},GetCreditLedger(s,c){return a(l=>t.request(e.GetCreditLedgerDocument,s,Object.assign(Object.assign({},c),l)),"GetCreditLedger","query")},GetCreditUsage(s,c){return a(l=>t.request(e.GetCreditUsageDocument,s,Object.assign(Object.assign({},c),l)),"GetCreditUsage","query")},OnEntitlementsUpdated(s,c){return a(l=>t.request(e.OnEntitlementsUpdatedDocument,s,Object.assign(Object.assign({},c),l)),"OnEntitlementsUpdated","subscription")},OnUsageUpdated(s,c){return a(l=>t.request(e.OnUsageUpdatedDocument,s,Object.assign(Object.assign({},c),l)),"OnUsageUpdated","subscription")},OnPackagePublished(s,c){return a(l=>t.request(e.OnPackagePublishedDocument,s,Object.assign(Object.assign({},c),l)),"OnPackagePublished","subscription")},OnCreditBalanceUpdated(s,c){return a(l=>t.request(e.OnCreditBalanceUpdatedDocument,s,Object.assign(Object.assign({},c),l)),"OnCreditBalanceUpdated","subscription")}}}e.getSdk=r})(Pn)),Pn}var Me=Mm();const Ba=(e,n)=>e.minUnitQuantity&&n<e.minUnitQuantity?e.minUnitQuantity:e.maxUnitQuantity&&n>e.maxUnitQuantity?e.maxUnitQuantity:n,_a=e=>!!(e!=null&&e.pricePoints.some(n=>n.billingPeriod===Me.BillingPeriod.Monthly)),$a=e=>!!(e!=null&&e.pricePoints.some(n=>n.billingPeriod===Me.BillingPeriod.Annually)),Um=e=>_a(e)&&$a(e),ur=(e,n,i)=>e===Me.BillingPeriod.Monthly&&n||e===Me.BillingPeriod.Annually&&i?e:null,dr=({pricingModel:e})=>e===b.BillingModel.PerUnit;function Om(e,n,i){var a;if(!n)return[];const r=Pi(e,"featureId"),t=Pi(Si((a=i==null?void 0:i.prices)==null?void 0:a.map(s=>{const{feature:c}=s;return!c||!dr(s)?null:{featureId:c.featureId,quantity:c.unitQuantity||null}})),"featureId");return Si(n==null?void 0:n.map(s=>{var d,p,m;const c=(d=s.feature)==null?void 0:d.featureId;if(!c||!dr(s))return null;let l;const u=((p=r[c])==null?void 0:p.quantity)||((m=t[c])==null?void 0:m.quantity);return l=Ba(s,u||1),s.isTieredPrice&&!zn(s.tiers)&&(l=Qr(s.tiers,l).upTo),{featureId:c,quantity:l}}))}function Lm({plan:e,activeSubscription:n,preferredBillingPeriod:i}){var s,c;const r=_a(e),t=$a(e);if(i){const l=ur(i,r,t);if(l)return l}if(((s=n==null?void 0:n.plan)==null?void 0:s.id)===(e==null?void 0:e.id))return((c=n==null?void 0:n.price)==null?void 0:c.billingPeriod)||Me.BillingPeriod.Monthly;if(n!=null&&n.prices&&(n==null?void 0:n.prices.length)>0){const l=ur(n==null?void 0:n.prices[0].billingPeriod,r,t);if(l)return l}return t?Me.BillingPeriod.Annually:Me.BillingPeriod.Monthly}function Bm({preferredBillingPeriod:e,plan:n,activeSubscription:i,billingCountryCode:r,preconfiguredBillableFeatures:t}){const a=Lm({plan:n,activeSubscription:i,preferredBillingPeriod:e}),s=n==null?void 0:n.pricePoints.filter(l=>l.billingPeriod===a),c=Om(t,s,i);return{billingPeriod:a,billableFeatures:c,billingCountryCode:r}}function _m(){const[{planStep:e}]=W();return e}function $m(){const[,e]=W();return(n,i)=>e(r=>{const t=r.planStep.billableFeatures.find(a=>a.featureId===n);t?t.quantity=i:r.planStep.billableFeatures.push({featureId:n,quantity:i})})}function Gm(){const[,e]=W();return n=>e(i=>{i.planStep.billingPeriod=n,i.addonsStep.addons=i.addonsStep.addons.filter(r=>r.addon.pricePoints.some(t=>t.billingPeriod===n))})}function Xe(){const e=_m();return _(I({},e),{setBillingPeriod:Gm(),setBillableFeature:$m()})}var Te=(e=>(e.PLAN="PLAN",e.ADDONS="ADDONS",e.PAYMENT="PAYMENT",e))(Te||{});const Ga=[{key:Te.PLAN,label:"Plan"},{key:Te.ADDONS,label:"Add-ons"},{key:Te.PAYMENT,label:"Payment details"}],mr={activeStep:0,completedSteps:[],steps:Ga,isDisabled:!1},Vm=(e,n,i,r)=>{if(Um(e)&&!r)return!1;const t=n.map(s=>s.featureId),a=i.map(s=>s.featureId);return!(t.length!==a.length||!t.every(s=>a.includes(s)))};function Hm({isLoading:e,skipCheckoutSteps:n,plan:i,availableAddons:r,availableCharges:t,preferredBillingPeriod:a,preconfiguredBillableFeatures:s}){if(e||!i)return mr;const c=[];return n.includes("PLAN")&&Vm(i,t,s,a)&&c.push(Te.PLAN),((r==null?void 0:r.length)===0||n.includes("ADDONS"))&&c.push(Te.ADDONS),_(I({},mr),{steps:Ga.filter(l=>!c.includes(l.key))})}function qm(){const[{progressBar:e}]=W();return e}function Wm(){const[e,n]=W();return i=>B(null,null,function*(){const{progressBar:r,planStep:t,addonsStep:a,paymentStep:s,onBeforeStepChange:c}=e;if(i!==r.activeStep&&c){const l=r.steps[r.activeStep],u=r.steps[i];if(l&&u){const d={planStep:t,addonsStep:a,paymentStep:s};if(!(yield c({from:l.key,to:u.key,state:d})))return}}n(({progressBar:l})=>{l.activeStep=i})})}function Ym(){const[,e]=W();return n=>e(({progressBar:i})=>{i.completedSteps.push(n)})}function Zm(e){return e.completedSteps.length>=e.steps.length-1}function zm(){const[e,n]=W();return()=>B(null,null,function*(){const{progressBar:i,planStep:r,addonsStep:t,paymentStep:a,onBeforeStepChange:s}=e;if(i.isDisabled)return;const c=i.steps[i.activeStep],l=i.steps[i.activeStep+1];if(l&&s){const u={planStep:r,addonsStep:t,paymentStep:a};if(!(yield s({from:c.key,to:l.key,state:u})))return}n(({progressBar:u})=>{u.completedSteps.includes(u.activeStep)||u.completedSteps.push(u.activeStep),u.activeStep<u.steps.length-1&&(u.activeStep+=1)})})}function Km(){const[,e]=W();return n=>e(({progressBar:i})=>{i.isDisabled=!!n})}function Et(){const e=qm();return{currentStep:e.steps[e.activeStep],progressBarState:e,isLastStep:e.activeStep===e.steps.length-1,isCheckoutComplete:Zm(e),setActiveStep:Wm(),markStepAsCompleted:Ym(),goNext:zm(),setIsDisabled:Km()}}function ti(){const[{planStep:e,addonsStep:n,promotionCode:i,paymentStep:r}]=W();return _(I({},e),{addons:n.addons,promotionCode:i,billingAddress:r.billingAddress,taxPercentage:r.taxPercentage})}function Qm({billingAddress:e,taxPercentage:n}){return!e&&!n?{}:{billingInformation:I(I({},e?{billingAddress:e}:{}),n?{taxPercentage:n}:{})}}const Xm=m=>B(null,[m],function*({stigg:e,customerId:n,planId:i,resourceId:r,promotionCode:t,addons:a,billableFeatures:s,billingCountryCode:c,billingPeriod:l,billingAddress:u,taxPercentage:d,onMockCheckoutPreview:p}){var P;const f=a.map(({addon:S,quantity:v})=>({addonId:S.id,quantity:v}));let g=null,y=null;try{if(n&&i){const S=I({customerId:n,planId:i,resourceId:r,billingCountryCode:c,addons:f,billingPeriod:l,promotionCode:t,billableFeatures:_n(s)?void 0:s},Qm({billingAddress:u,taxPercentage:d}));g=p?p(S):yield e.previewSubscription(S)}}catch(S){const[,v]=((P=S==null?void 0:S.message)==null?void 0:P.split("Error:"))||[];y=v==null?void 0:v.trim()}return{subscriptionPreview:g,errorMessage:y}}),Va=({onMockCheckoutPreview:e}={})=>{const{stigg:n}=q(),i=ti(),[{resourceId:r}]=W(),{checkoutState:t,widgetState:a}=ne(),{plan:s,customer:c}=t||{};return{previewSubscriptionAction:D.useCallback((...d)=>B(null,[...d],function*({promotionCode:u}={}){return a.isValid?Xm({stigg:n,customerId:c==null?void 0:c.id,planId:s==null?void 0:s.id,resourceId:r,addons:i.addons,billableFeatures:i.billableFeatures,billingCountryCode:i.billingCountryCode,billingPeriod:i.billingPeriod,billingAddress:i.billingAddress,taxPercentage:i.taxPercentage,promotionCode:u!=null?u:i.promotionCode,onMockCheckoutPreview:e}):{subscriptionPreview:null,errorMessage:null}}),[n,c==null?void 0:c.id,s==null?void 0:s.id,r,i.addons,i.billableFeatures,i.billingCountryCode,i.billingPeriod,i.billingAddress,i.taxPercentage,i.promotionCode,a.isValid,e])}},Jm=500,eg=({onMockCheckoutPreview:e}={})=>{const[n,i]=D.useState(null),[r,t]=D.useState(!1),{previewSubscriptionAction:a}=Va({onMockCheckoutPreview:e});return D.useEffect(()=>{const s=()=>B(null,null,function*(){const{subscriptionPreview:l}=yield a();l&&i(l),t(!1)});t(!0);const c=setTimeout(()=>{t(!0),s()},Jm);return()=>{clearTimeout(c)}},[a]),{subscriptionPreview:n,isFetchingSubscriptionPreview:r}};function tg({customer:e,taxPercentage:n}){return{useNewPaymentMethod:!(e!=null&&e.paymentMethodDetails),taxPercentage:n}}function ng(){const[,e]=W();return n=>e(i=>{i.paymentStep.useNewPaymentMethod=n})}function ig(){const[,e]=W();return n=>e(i=>{i.paymentStep.errorMessage=n})}function rg(){const[,e]=W();return n=>e(i=>{i.paymentStep.billingAddress=n})}function ag(){const[{paymentStep:e}]=W();return e}function Ve(){const e=ag();return _(I({},e),{setUseNewPaymentMethod:ng(),setErrorMessage:ig(),setBillingAddress:rg()})}function og(e){return ft({changePlan:"Change",billingPeriodsTitle:"Billing cycle",addAddonText:"Add",addonBillingPeriodNotAvailableText:({planBillingPeriod:i})=>i===b.BillingPeriod.Monthly?"Exclusively available on annual plans":"Exclusively available on monthly plans",newPaymentMethodText:"New payment method",newPaymentMethodBillingAddressTitle:"Billing address",newPaymentMethodCardTitle:"Payment method",summary:{title:"Order summary",planName:({plan:i})=>`${i.displayName} plan`,addCouponCodeText:"Add promotion code",couponCodeTitle:"Promotion code",addonsSectionTitle:"Add-ons",discountsSectionTitle:"Discounts",onlyPayAsYouGoText:"Varies by usage",startsAtText:"Starts at ",proratedTotalDueText:"Prorated charge today",baseChargeText:()=>"Base charge",totalText:"Total",totalDueText:"Total due today",totalBillingPeriodText:({billingPeriod:i})=>`Billed ${i.toLowerCase()}`,appliedCreditsTitle:"Applied credits",creditsForUnusedTimeText:({credits:i})=>`Your account will be granted credits worth ${i} for unused time, which will be automatically applied to future payments.`,discountText:({discountDetails:i,currency:r})=>{let t="";i.type===b.DiscountType.Percentage?t=`${i.value}% off`:t=`${re({amount:i.value,currency:r})}`;let a="";switch(i.durationType){case b.DiscountDurationType.Once:{a=" once";break}case b.DiscountDurationType.Repeating:{a=`${i.type===b.DiscountType.Fixed?" per month":""} for ${i.durationInMonths} months`;break}case b.DiscountDurationType.Forever:default:a=""}return`${t}${a}`},taxTitle:({taxDetails:i})=>`Tax (${i==null?void 0:i.percentage}%)`,changesWillApplyAtEndOfBillingPeriod:({billingPeriodEnd:i})=>`Your changes will take effect at the end of your current billing cycle on ${oe(i).format("MMMM D, YYYY")}.`,checkoutSuccessText:"Changes applied",payAsYouGoTooltipText:"Billed according to actual usage"},checkoutButton:{nextText:"Next",noChangesText:"No changes",updateText:"Update subscription",downgradeToFreeText:"Cancel subscription",upgradeText:"Subscribe"},downgradeToFree:{alertText:()=>"We’re sorry to see you cancel your paid subscription 😭",freePlanHeader:()=>"New plan",freePlanName:({plan:i})=>`${i.displayName}`,freePlanPriceText:()=>"Free",paidPlanHeader:()=>"Current plan",paidPlanName:({plan:i})=>`${i.displayName}`,paidPlanPriceText:({billingPeriod:i})=>`Paid plan${i?`, billed ${i.toLowerCase()}`:""}`}},e)}const rt={primary:"rgb(50, 126, 238)",textColor:"rgb(0, 30, 108)",backgroundColor:"rgb(255, 255, 255)",borderColor:"rgb(235, 237, 243)",summaryBackgroundColor:"rgb(109, 121, 144)"};function sg(e,n,i){const{palette:r}=e||{};return{primary:(n==null?void 0:n.primary)||(r==null?void 0:r.primary)||rt.primary,textColor:(n==null?void 0:n.textColor)||(r==null?void 0:r.text.primary)||rt.textColor,backgroundColor:(n==null?void 0:n.backgroundColor)||(r==null?void 0:r.backgroundPaper)||rt.backgroundColor,borderColor:(n==null?void 0:n.borderColor)||(r==null?void 0:r.outlinedBorder)||rt.borderColor,summaryBackgroundColor:(n==null?void 0:n.summaryBackgroundColor)||(r==null?void 0:r.backgroundHighlight)||rt.summaryBackgroundColor,paymentInputBackgroundColor:n==null?void 0:n.paymentInputBackgroundColor,paymentInputBorderColor:n==null?void 0:n.paymentInputBorderColor,paymentInputBorderRadius:n==null?void 0:n.paymentInputBorderRadius}}const ni=D.createContext(null);ni.displayName="CheckoutContext";const W=()=>{const e=D.useContext(ni);if(!e)throw new Error("Could not find Checkout context; You need to wrap your checkout components in an <CheckoutProvider> component.");return e},cg=({children:e,initialState:n})=>{const[i,r]=D.useState(n);D.useEffect(()=>{r(n)},[n]);const t=D.useCallback(c=>r(l=>Oo.produce(l,u=>c(u))),[r]),[a,s]=D.useMemo(()=>[i,t],[t,i]);return o.jsx(ni.Provider,{value:[a,s],children:e})};function lg({children:e,textOverrides:n,theme:i,preferredBillingPeriod:r,billableFeatures:t,resourceId:a,planId:s,billingCountryCode:c,billingInformation:l,onMockCheckoutState:u,skipCheckoutSteps:d,onBeforeStepChange:p}){var v;const{checkout:m,isLoading:f,showWatermark:g}=$d({resourceId:a,planId:s,billingCountryCode:c,onMockCheckoutState:u}),y=m!=null&&m.configuration?au(m.configuration):{typography:Xt(null,aa)},P=en(y),S=D.useMemo(()=>{var L,j;const A=sg(P,i),k=og(n),w=Bm({preferredBillingPeriod:r,plan:m==null?void 0:m.plan,activeSubscription:m==null?void 0:m.activeSubscription,billingCountryCode:c,preconfiguredBillableFeatures:t!=null?t:[]}),T=Fd({plan:m==null?void 0:m.plan,activeSubscription:m==null?void 0:m.activeSubscription}),N=tg({customer:m==null?void 0:m.customer,taxPercentage:(L=l==null?void 0:l.taxDetails)==null?void 0:L.taxPercentage}),F=Hm({isLoading:f,skipCheckoutSteps:d!=null?d:[],plan:m==null?void 0:m.plan,availableAddons:T.availableAddons,availableCharges:w.billableFeatures,preferredBillingPeriod:r,preconfiguredBillableFeatures:t!=null?t:[]});return{checkout:m,checkoutLocalization:k,stiggTheme:P,theme:A,progressBar:F,planStep:w,addonsStep:T,paymentStep:N,resourceId:(j=m==null?void 0:m.resource)==null?void 0:j.id,widgetState:{readOnly:!1,isValid:!0,isLoadingCheckoutData:f},showWatermark:g,checkoutSuccess:!1,onBeforeStepChange:p}},[r,c,m,f,d,(v=l==null?void 0:l.taxDetails)==null?void 0:v.taxPercentage,p]);return o.jsx($e,{componentTheme:y,children:o.jsx(cg,{initialState:S,children:e})},m==null?void 0:m.plan.id)}const ug=h.div`
2897
2957
  margin: auto;
2898
2958
  min-height: 760px;
2899
2959
  max-width: 920px;
@@ -2910,12 +2970,12 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
2910
2970
  }
2911
2971
 
2912
2972
  padding: 16px 16px;
2913
- ${ge.md} {
2973
+ ${Se.md} {
2914
2974
  padding: 32px;
2915
2975
  width: calc(100% - 64px);
2916
2976
  border-radius: 10px;
2917
2977
  }
2918
- `,Nu=p(z)`
2978
+ `,dg=h(Q)`
2919
2979
  display: flex;
2920
2980
  align-items: flex-start;
2921
2981
  gap: 32px;
@@ -2923,31 +2983,31 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
2923
2983
  width: 100%;
2924
2984
 
2925
2985
  flex-direction: column;
2926
- ${ge.md} {
2986
+ ${Se.md} {
2927
2987
  flex-direction: row;
2928
2988
  }
2929
- `,wu=p(z)`
2989
+ `,mg=h(Q)`
2930
2990
  display: flex;
2931
2991
  flex-direction: column;
2932
2992
  gap: 0;
2933
2993
  flex: 2;
2934
2994
 
2935
2995
  width: 100%;
2936
- ${ge.md} {
2996
+ ${Se.md} {
2937
2997
  width: auto;
2938
2998
  }
2939
- `,Fu=p(at)(({theme:e,$disabled:n})=>({[`&.${at.linearProgressClasses.root}`]:{borderRadius:e.stigg.border.radius,backgroundColor:e.stigg.palette.outlinedBorder},[`& .${at.linearProgressClasses.bar}`]:{backgroundColor:n?e.stigg.palette.primaryLight:e.stigg.palette.primary}})),ju=p(be)(()=>({[`&.${be.buttonClasses.root}`]:{textTransform:"none",lineHeight:"inherit",justifyContent:"flex-start",padding:"8px 4px"}})),Uu=p(ce)(({theme:e,$disabled:n,$shouldFill:i})=>({circle:{stroke:n?e.stigg.palette.primaryLight:e.stigg.palette.primary,fill:i?n?e.stigg.palette.primaryLight:e.stigg.palette.primary:void 0}})),Mu=()=>{const{progressBarState:e,setActiveStep:n,currentStep:i}=Je(),{widgetState:a}=X(),t=Ne("md"),o=D.useRef(),{readOnly:s,isLoadingCheckoutData:c}=a,{activeStep:l,completedSteps:u,steps:d}=e||{},h=(l+1)*100/d.length,[m,f]=D.useState(i);return D.useEffect(()=>{t||o.current&&i!==m&&o.current.scrollIntoView({behavior:"smooth"}),f(i)},[i,t,m,f]),e.steps.length===1?null:r.jsxs(z,{className:"stigg-checkout-progress-container",sx:{width:"100%",mb:3},ref:o,children:[r.jsx(Fu,{variant:"determinate",value:h,$disabled:s}),r.jsx(j,{container:!0,display:"flex",children:d.map(({key:g,label:x},b)=>{const E=u.includes(b),I=s||b>l&&!E&&!u.includes(b-1)||l!==b&&e.isDisabled,N=I?"OutlinedCheckedCircleDisabled":"OutlinedCheckedCircle";return r.jsx(j,{item:!0,display:"flex",flexDirection:"row",flex:t?1:"auto",justifyContent:"flex-start",children:c?r.jsx(Q,{width:120,height:20,style:{marginTop:8}}):r.jsx(ju,{onClick:()=>n(b),fullWidth:!0,disabled:I,children:r.jsxs(j,{item:!0,display:"flex",flexDirection:"row",alignItems:"center",gap:1,children:[r.jsx(Dr,{icon:r.jsx(Uu,{icon:E?N:"OutlinedCircle",$disabled:I,$shouldFill:E})}),r.jsx(y,{variant:"h6",color:I?"primary.main.light":"primary.main",children:x})]})})},g)})})]})},Ru=[P.BillingModel.FlatFee,P.BillingModel.PerUnit,P.BillingModel.UsageBased],Lu=e=>ft(e,[n=>Ru.indexOf(n.pricingModel),n=>{var i;return(i=n.feature)==null?void 0:i.displayName}]),Pa=e=>D.useMemo(()=>Lu(e),[e]);function Bu(){const[{promotionCode:e}]=H();return e}function Ou(){const[,e]=H();return n=>e(i=>{i.promotionCode=n})}function ba(){return{promotionCode:Bu(),setPromotionCode:Ou()}}const $u=e=>C.createElement("svg",T({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("g",{id:"plus"},C.createElement("path",{id:"Shape",d:"M10 4.16666V15.8333",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{id:"Shape_2",d:"M4.16699 10H15.8337",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),_u=p($u)`
2999
+ `,gg=h(It)(({theme:e,$disabled:n})=>({[`&.${It.linearProgressClasses.root}`]:{borderRadius:e.stigg.border.radius,backgroundColor:e.stigg.palette.outlinedBorder},[`& .${It.linearProgressClasses.bar}`]:{backgroundColor:n?e.stigg.palette.primaryLight:e.stigg.palette.primary}})),pg=h(we)(()=>({[`&.${we.buttonClasses.root}`]:{textTransform:"none",lineHeight:"inherit",justifyContent:"flex-start",padding:"8px 4px"}})),fg=h(fe)(({theme:e,$disabled:n,$shouldFill:i})=>({circle:{stroke:n?e.stigg.palette.primaryLight:e.stigg.palette.primary,fill:i?n?e.stigg.palette.primaryLight:e.stigg.palette.primary:void 0}})),hg=()=>{const{progressBarState:e,setActiveStep:n,currentStep:i}=Et(),{widgetState:r}=ne(),t=Ge("md"),a=D.useRef(),{readOnly:s,isLoadingCheckoutData:c}=r,{activeStep:l,completedSteps:u,steps:d}=e||{},p=(l+1)*100/d.length,[m,f]=D.useState(i);return D.useEffect(()=>{t||a.current&&i!==m&&a.current.scrollIntoView({behavior:"smooth"}),f(i)},[i,t,m,f]),e.steps.length===1?null:o.jsxs(Q,{className:"stigg-checkout-progress-container",sx:{width:"100%",mb:3},ref:a,children:[o.jsx(gg,{variant:"determinate",value:p,$disabled:s}),o.jsx(R,{container:!0,display:"flex",children:d.map(({key:g,label:y},P)=>{const S=u.includes(P),v=s||P>l&&!S&&!u.includes(P-1)||l!==P&&e.isDisabled,A=v?"OutlinedCheckedCircleDisabled":"OutlinedCheckedCircle";return o.jsx(R,{item:!0,display:"flex",flexDirection:"row",flex:t?1:"auto",justifyContent:"flex-start",children:c?o.jsx(te,{width:120,height:20,style:{marginTop:8}}):o.jsx(pg,{onClick:()=>n(P),fullWidth:!0,disabled:v,children:o.jsxs(R,{item:!0,display:"flex",flexDirection:"row",alignItems:"center",gap:1,children:[o.jsx(zo,{icon:o.jsx(fg,{icon:S?A:"OutlinedCircle",$disabled:v,$shouldFill:S})}),o.jsx(C,{variant:"h6",color:v?"primary.main.light":"primary.main",children:y})]})})},g)})})]})},yg=[b.BillingModel.FlatFee,b.BillingModel.PerUnit,b.BillingModel.UsageBased],Cg=e=>Gt(e,[n=>yg.indexOf(n.pricingModel),n=>{var i;return(i=n.feature)==null?void 0:i.displayName}]),Ha=e=>D.useMemo(()=>Cg(e),[e]);function bg(){const[{promotionCode:e}]=W();return e}function Eg(){const[,e]=W();return n=>e(i=>{i.promotionCode=n})}function qa(){return{promotionCode:bg(),setPromotionCode:Eg()}}const Pg=e=>E.createElement("svg",I({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"plus"},E.createElement("path",{id:"Shape",d:"M10 4.16666V15.8333",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{id:"Shape_2",d:"M4.16699 10H15.8337",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),Sg=h(Pg)`
2940
3000
  margin-right: 8px;
2941
3001
  path {
2942
3002
  stroke: ${({theme:e,$disabled:n})=>n?e.stigg.palette.text.disabled:e.stigg.palette.primary};
2943
3003
  }
2944
- `,Gu=({onAddClick:e,checkoutLocalization:n,disabled:i})=>r.jsxs(Ie,{disabled:i,fullWidth:!0,className:"stigg-checkout-summary-add-coupon-code-button",sx:{textTransform:"none",justifyContent:"flex-start",color:i?"text.disabled":"primary.main"},variant:"text",size:"medium",onClick:e,children:[r.jsx(_u,{$disabled:i,className:"stigg-checkout-summary-add-coupon-code-button-icon"}),r.jsx(y,{className:"stigg-checkout-change-plan-button-text",color:i?"disabled":"primary.main",style:{lineHeight:"24px"},variant:"h3",children:n.summary.addCouponCodeText})]}),Vu=p(Ie)`
3004
+ `,Dg=({onAddClick:e,checkoutLocalization:n,disabled:i})=>o.jsxs(Le,{disabled:i,fullWidth:!0,className:"stigg-checkout-summary-add-coupon-code-button",sx:{textTransform:"none",justifyContent:"flex-start",color:i?"text.disabled":"primary.main"},variant:"text",size:"medium",onClick:e,children:[o.jsx(Sg,{$disabled:i,className:"stigg-checkout-summary-add-coupon-code-button-icon"}),o.jsx(C,{className:"stigg-checkout-change-plan-button-text",color:i?"disabled":"primary.main",style:{lineHeight:"24px"},variant:"h3",children:n.summary.addCouponCodeText})]}),vg=h(Le)`
2945
3005
  padding: 4px 10px;
2946
3006
  min-width: unset;
2947
3007
  border-radius: ${({theme:e})=>e.stigg.border.radius};
2948
3008
  display: flex;
2949
3009
  align-items: center;
2950
- `,Hu=({disabled:e,checkoutLocalization:n,onMockCheckoutPreview:i})=>{const{setPromotionCode:a}=ba(),[t,o]=D.useState(!1),[s,c]=D.useState(""),[l,u]=D.useState(!1),[d,h]=D.useState(""),{previewSubscriptionAction:m}=Ca({onMockCheckoutPreview:i}),f=()=>B(null,null,function*(){var b;u(!0),h("");const{subscriptionPreview:g,errorMessage:x}=yield m({promotionCode:s});!x&&((b=g==null?void 0:g.immediateInvoice)!=null&&b.discountDetails)?(a(s.toUpperCase()),o(!1)):x&&h(x),u(!1)});return t?r.jsxs(j,{children:[r.jsx(y,{variant:"body1",color:d?"error":e?"disabled":"primary.main",children:n.summary.couponCodeTitle}),r.jsx(ht,{disabled:e,autoFocus:!0,variant:"outlined",fullWidth:!0,error:!!d,value:s,onChange:g=>{c(g.target.value)},inputProps:{maxLength:20},onKeyDown:g=>{g.key==="Enter"&&(f(),g.preventDefault())},InputProps:{endAdornment:r.jsx(Vu,{variant:"contained",disabled:e,onClick:()=>{f()},children:l?r.jsx(Jt,{size:18,sx:{color:"white"}}):r.jsx(ce,{style:{display:"flex"},icon:"ArrowForward"})})}}),!!d&&r.jsx(y,{variant:"body1",color:"error",children:d})]}):r.jsx(Gu,{disabled:e,onAddClick:()=>o(!0),checkoutLocalization:n})},qu=p(j)`
3010
+ `,xg=({disabled:e,checkoutLocalization:n,onMockCheckoutPreview:i})=>{const{setPromotionCode:r}=qa(),[t,a]=D.useState(!1),[s,c]=D.useState(""),[l,u]=D.useState(!1),[d,p]=D.useState(""),{previewSubscriptionAction:m}=Va({onMockCheckoutPreview:i}),f=()=>B(null,null,function*(){var P;u(!0),p("");const{subscriptionPreview:g,errorMessage:y}=yield m({promotionCode:s});!y&&((P=g==null?void 0:g.immediateInvoice)!=null&&P.discountDetails)?(r(s.toUpperCase()),a(!1)):y&&p(y),u(!1)});return t?o.jsxs(R,{children:[o.jsx(C,{variant:"body1",color:d?"error":e?"disabled":"primary.main",children:n.summary.couponCodeTitle}),o.jsx(Kt,{disabled:e,autoFocus:!0,variant:"outlined",fullWidth:!0,error:!!d,value:s,onChange:g=>{c(g.target.value)},inputProps:{maxLength:20},onKeyDown:g=>{g.key==="Enter"&&(f(),g.preventDefault())},InputProps:{endAdornment:o.jsx(vg,{variant:"contained",disabled:e,onClick:()=>{f()},children:l?o.jsx(Bn,{size:18,sx:{color:"white"}}):o.jsx(fe,{style:{display:"flex"},icon:"ArrowForward"})})}}),!!d&&o.jsx(C,{variant:"body1",color:"error",children:d})]}):o.jsx(Dg,{disabled:e,onAddClick:()=>a(!0),checkoutLocalization:n})},Ig=h(R)`
2951
3011
  width: auto;
2952
3012
  display: inline-flex;
2953
3013
  align-items: center;
@@ -2956,7 +3016,7 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
2956
3016
  padding: 6px 8px;
2957
3017
  border-radius: ${({theme:e})=>e.stigg.border.radius};
2958
3018
  border: 1px solid ${({theme:e})=>e.stigg.palette.primary};
2959
- `,ti=p(ce)`
3019
+ `,gr=h(fe)`
2960
3020
  display: flex;
2961
3021
 
2962
3022
  g {
@@ -2966,16 +3026,16 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
2966
3026
  path {
2967
3027
  fill: ${({theme:e,$shouldFill:n})=>n?e.stigg.palette.primary:void 0};
2968
3028
  }
2969
- `,Wu=({promotionCode:e,onClearPromotionCode:n})=>r.jsxs(qu,{container:!0,children:[r.jsxs(j,{item:!0,display:"flex",gap:1,alignItems:"center",children:[r.jsx(ti,{icon:"Coupon"}),r.jsx(y,{variant:"body1",color:"primary.main",lineHeight:"auto",children:e})]}),r.jsx(j,{item:!0,children:r.jsx(Ie,{variant:"text",sx:{minWidth:"unset",padding:0},onClick:n,children:r.jsx(ti,{icon:"Close",$shouldFill:!0})})})]}),Yu=p.div`
3029
+ `,Tg=({promotionCode:e,onClearPromotionCode:n})=>o.jsxs(Ig,{container:!0,children:[o.jsxs(R,{item:!0,display:"flex",gap:1,alignItems:"center",children:[o.jsx(gr,{icon:"Coupon"}),o.jsx(C,{variant:"body1",color:"primary.main",lineHeight:"auto",children:e})]}),o.jsx(R,{item:!0,children:o.jsx(Le,{variant:"text",sx:{minWidth:"unset",padding:0},onClick:n,children:o.jsx(gr,{icon:"Close",$shouldFill:!0})})})]}),Ag=h.div`
2970
3030
  margin: 16px 0;
2971
- `,Zu=({disabled:e,checkoutLocalization:n,onMockCheckoutPreview:i})=>{const{promotionCode:a,setPromotionCode:t}=ba(),o=()=>{t("")},s=a?r.jsx(Wu,{promotionCode:a,onClearPromotionCode:o}):r.jsx(Hu,{disabled:e,checkoutLocalization:n,onMockCheckoutPreview:i});return r.jsx(Yu,{children:s})};function zu({onBillingAddressChange:e,collectPhoneNumber:n}){var m;const{checkoutState:i,checkoutLocalization:a,widgetState:t,setWidgetReadOnly:o}=X(),{setBillingAddress:s}=we(),{customer:c,configuration:l}=i||{},{readOnly:u}=t,d=!!(n!=null?n:(m=l==null?void 0:l.content)!=null&&m.collectPhoneNumber),h=f=>{if(!f.complete)return;const E=f.value.address,{postal_code:g}=E,x=ie(E,["postal_code"]),b=T({postalCode:g},x);o(!0),s(b),e?B(null,null,function*(){yield e({billingAddress:b}),o(!1)}):o(!1)};return r.jsxs(j,{flexDirection:"column",container:!0,gap:3,padding:"16px",sx:{pointerEvents:u?"none":void 0},children:[r.jsxs(j,{flexDirection:"column",container:!0,gap:2,children:[r.jsx(y,{variant:"h6",children:a.newPaymentMethodBillingAddressTitle}),r.jsx(He.AddressElement,{onChange:h,options:{mode:"billing",fields:{phone:d?"always":"auto"},defaultValues:T({},(c==null?void 0:c.name)&&{name:c.name})}})]}),r.jsxs(j,{flexDirection:"column",container:!0,gap:2,children:[r.jsx(y,{variant:"h6",children:a.newPaymentMethodCardTitle}),r.jsx(He.PaymentElement,{onChange:()=>{},onReady:()=>{},options:{readOnly:u,terms:{card:"never"},defaultValues:{billingDetails:T(T({},(c==null?void 0:c.name)&&{name:c.name}),(c==null?void 0:c.email)&&{email:c.email})}}})]})]})}function Ku(){const[e,n]=D.useState(null),{checkoutState:i}=X(),{billingIntegration:a,setupSecret:t}=i||{};return D.useEffect(()=>{if(a){const{billingIdentifier:o,credentials:s}=a;if(o!==P.BillingVendorIdentifier.Stripe)return;const{accountId:c,publicKey:l}=s;if(!c||!l){console.error("Stripe account ID or public key is missing");return}import("@stripe/stripe-js").then(({loadStripe:u})=>{n(u(l,{stripeAccount:c}))})}},[a]),{stripePromise:e,setupIntentClientSecret:t}}function Ea(e){var a;const n=G({optional:!0}),i=n==null?void 0:n.stigg;return i?i.getBooleanEntitlement(e):T(T({},P.BOOLEAN_DEFAULT_FALLBACK_ENTITLEMENT),(a=e.options)==null?void 0:a.fallback)}function Sa(e){var a;const n=G({optional:!0}),i=n==null?void 0:n.stigg;return i?i.getNumericEntitlement(e):T(T({},P.NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT),(a=e.options)==null?void 0:a.fallback)}function Da(e){var a;const n=G({optional:!0}),i=n==null?void 0:n.stigg;return i?i.getMeteredEntitlement(e):T(T({},P.METERED_DEFAULT_FALLBACK_ENTITLEMENT),(a=e.options)==null?void 0:a.fallback)}function xa(e){var a;const n=G({optional:!0}),i=n==null?void 0:n.stigg;return i?i.getEnumEntitlement(e):T(T({},P.ENUM_DEFAULT_FALLBACK_ENTITLEMENT),(a=e.options)==null?void 0:a.fallback)}function Le({func:e}){const[n,i]=D.useState(!0),[a,t]=D.useState(null),[o,s]=D.useState(null);return D.useEffect(()=>{B(null,null,function*(){i(!0);try{const l=yield e();s(l),t(null)}catch(l){t(l)}finally{i(!1)}})},[e]),{isLoading:n,error:a,data:o}}function Qu(e){const n=G({optional:!0}),i=n==null?void 0:n.stigg,a=D.useCallback(()=>i?i.getActiveSubscriptions(e):Promise.resolve([]),[e,i]),{data:t,error:o,isLoading:s}=Le({func:a});return D.useMemo(()=>({activeSubscriptions:t,isLoading:s,error:o}),[t,o,s])}function Xu(e){const n=G({optional:!0}),i=n==null?void 0:n.stigg,a=D.useCallback(()=>i?i.getPaywall(e):Promise.resolve(null),[e,i]),{data:t,error:o,isLoading:s}=Le({func:a});return D.useMemo(()=>({paywall:t,isLoading:s,error:o}),[t,o,s])}function Ju(e){const n=G({optional:!0}),i=n==null?void 0:n.stigg,a=D.useCallback(()=>i?i.getCustomerPortal(e):Promise.resolve(null),[e,i]),{data:t,error:o,isLoading:s}=Le({func:a});return D.useMemo(()=>({customerPortal:t,isLoading:s,error:o}),[t,o,s])}function Ta(){const e=ln(),[{resourceId:n}]=H(),{checkoutState:i}=X(),{plan:a}=i||{},t=e.addons.map(({addon:o,quantity:s})=>({addonId:o.id,quantity:s}));if(a!=null&&a.id)return{resourceId:n,planId:a.id,billingPeriod:e.billingPeriod,billableFeatures:e.billableFeatures,addons:t,promotionCode:e.promotionCode,billingCountryCode:e.billingCountryCode}}const ed=[P.PaymentCollection.Failed,P.PaymentCollection.Processing];function td(n){return B(this,arguments,function*({elements:e}){if(!e){const a="Stripe elements not initialized";return console.error(a),{success:!1,errorMessage:a}}const{error:i}=yield e.submit();return i?(console.log(i.message),{success:!1,errorMessage:i.message||""}):{success:!0}})}function ni(i){return B(this,arguments,function*({applySubscriptionResults:e,stripe:n}){var s,c;const a=e==null?void 0:e.subscription,t=(s=a==null?void 0:a.latestInvoice)==null?void 0:s.paymentSecret,o=a==null?void 0:a.paymentCollection;if(n&&t&&o===P.PaymentCollection.ActionRequired){const{error:l}=yield n.handleNextAction({clientSecret:t});if(l)return{errorMessage:l.message||""}}else if(o&&ed.includes(o))return{errorMessage:((c=a==null?void 0:a.latestInvoice)==null?void 0:c.errorMessage)||"An error occurred - try again later"};return{subscription:a}})}function nd(a){return B(this,arguments,function*({stripe:e,elements:n,clientSecret:i}){let t,o;const{error:s}=yield e.confirmSetup({elements:n,confirmParams:{return_url:window.location.href},redirect:"if_required"});if(s)s.type==="card_error"||s.type==="validation_error"?s.type==="card_error"&&(o=s.message||""):o="An unexpected error occurred.";else try{const{setupIntent:c}=yield e.retrieveSetupIntent(i);c!=null&&c.payment_method&&(t=c.payment_method)}catch(c){o="An unexpected error occurred.",console.error(c)}return{newPaymentMethodId:t,setupErrorMessage:o}})}function id(a){return B(this,arguments,function*({stripe:e,elements:n,setupIntentClientSecret:i}){if(!e||!n||!i)return{success:!1};const t=yield td({elements:n});if(!t.success)return{success:!1,errorMessage:t.errorMessage};const{newPaymentMethodId:o,setupErrorMessage:s}=yield nd({stripe:e,elements:n,clientSecret:i});return s||!o?{success:!1,errorMessage:s}:{success:!0,paymentMethodId:o}})}const ad="5.12.1",rd=30,od=0,sd=201,cd=700,ld=700,ud="Check",dd=0,md=[],gd=JSON.parse('[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 8","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":315,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 7","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":270,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 6","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":225,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Shape Layer 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":135,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Shape Layer 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":45,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"Check v","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-1.9,"ix":10},"p":{"a":0,"k":[352,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-120.265,116.765,0],"ix":1,"l":2},"s":{"a":0,"k":[278,278,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-161,123],[-137,148],[-79.531,85.531]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":5.5,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[0]},{"t":148,"s":[100]}],"ix":1},"e":{"a":0,"k":0,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":135,"op":201,"st":-35,"ct":1,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"Circle Stroke","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":7,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[4,-6,0],"ix":1,"l":2},"s":{"a":0,"k":[132,132,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[306,306],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[1,1,1,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30,"s":[1,1,1,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":61,"s":[1,1,1,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":87,"s":[1,1,1,1]},{"t":136,"s":[1,1,1,1]}],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":8,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[4,-6],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.338],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":87,"s":[50]},{"t":122,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.338],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":87,"s":[45]},{"t":122,"s":[0]}],"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.474],"y":[1]},"o":{"x":[0.43],"y":[0]},"t":0,"s":[-170.4]},{"t":111,"s":[-1250.4]}],"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":201,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":13,"ty":1,"nm":"Dark Gray Solid 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[350,350,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"sw":700,"sh":700,"sc":"#2d2d2d","ip":0,"op":201,"st":0,"bm":0}]'),pd=[],fd={},hd={v:ad,fr:rd,ip:od,op:sd,w:cd,h:ld,nm:ud,ddd:dd,assets:md,layers:gd,markers:pd,props:fd},Ia=5e3,yd=p(z)`
3031
+ `,kg=({disabled:e,checkoutLocalization:n,onMockCheckoutPreview:i})=>{const{promotionCode:r,setPromotionCode:t}=qa(),a=()=>{t("")},s=r?o.jsx(Tg,{promotionCode:r,onClearPromotionCode:a}):o.jsx(xg,{disabled:e,checkoutLocalization:n,onMockCheckoutPreview:i});return o.jsx(Ag,{children:s})};function Ng({onBillingAddressChange:e,collectPhoneNumber:n}){var m;const{checkoutState:i,checkoutLocalization:r,widgetState:t,setWidgetReadOnly:a}=ne(),{setBillingAddress:s}=Ve(),{customer:c,configuration:l}=i||{},{readOnly:u}=t,d=!!(n!=null?n:(m=l==null?void 0:l.content)!=null&&m.collectPhoneNumber),p=f=>{if(!f.complete)return;const S=f.value.address,{postal_code:g}=S,y=se(S,["postal_code"]),P=I({postalCode:g},y);a(!0),s(P),e?B(null,null,function*(){yield e({billingAddress:P}),a(!1)}):a(!1)};return o.jsxs(R,{flexDirection:"column",container:!0,gap:3,padding:"16px",sx:{pointerEvents:u?"none":void 0},children:[o.jsxs(R,{flexDirection:"column",container:!0,gap:2,children:[o.jsx(C,{variant:"h6",children:r.newPaymentMethodBillingAddressTitle}),o.jsx(st.AddressElement,{onChange:p,options:{mode:"billing",fields:{phone:d?"always":"auto"},defaultValues:I({},(c==null?void 0:c.name)&&{name:c.name})}})]}),o.jsxs(R,{flexDirection:"column",container:!0,gap:2,children:[o.jsx(C,{variant:"h6",children:r.newPaymentMethodCardTitle}),o.jsx(st.PaymentElement,{onChange:()=>{},onReady:()=>{},options:{readOnly:u,terms:{card:"never"},defaultValues:{billingDetails:I(I({},(c==null?void 0:c.name)&&{name:c.name}),(c==null?void 0:c.email)&&{email:c.email})}}})]})]})}function wg(){const[e,n]=D.useState(null),{checkoutState:i}=ne(),{billingIntegration:r,setupSecret:t}=i||{};return D.useEffect(()=>{if(r){const{billingIdentifier:a,credentials:s}=r;if(a!==b.BillingVendorIdentifier.Stripe)return;const{accountId:c,publicKey:l}=s;if(!c||!l){console.error("Stripe account ID or public key is missing");return}import("@stripe/stripe-js").then(({loadStripe:u})=>{n(u(l,{stripeAccount:c}))})}},[r]),{stripePromise:e,setupIntentClientSecret:t}}function Wa(e){var r;const n=q({optional:!0}),i=n==null?void 0:n.stigg;return i?i.getBooleanEntitlement(e):I(I({},b.BOOLEAN_DEFAULT_FALLBACK_ENTITLEMENT),(r=e.options)==null?void 0:r.fallback)}function Ya(e){var r;const n=q({optional:!0}),i=n==null?void 0:n.stigg;return i?i.getNumericEntitlement(e):I(I({},b.NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT),(r=e.options)==null?void 0:r.fallback)}function Za(e){var r;const n=q({optional:!0}),i=n==null?void 0:n.stigg;return i?i.getMeteredEntitlement(e):I(I({},b.METERED_DEFAULT_FALLBACK_ENTITLEMENT),(r=e.options)==null?void 0:r.fallback)}function za(e){var r;const n=q({optional:!0}),i=n==null?void 0:n.stigg;return i?i.getEnumEntitlement(e):I(I({},b.ENUM_DEFAULT_FALLBACK_ENTITLEMENT),(r=e.options)==null?void 0:r.fallback)}function Je({func:e}){const[n,i]=D.useState(!0),[r,t]=D.useState(null),[a,s]=D.useState(null);return D.useEffect(()=>{B(null,null,function*(){i(!0);try{const l=yield e();s(l),t(null)}catch(l){t(l)}finally{i(!1)}})},[e]),{isLoading:n,error:r,data:a}}function Fg(e){const n=q({optional:!0}),i=n==null?void 0:n.stigg,r=D.useCallback(()=>i?i.getActiveSubscriptions(e):Promise.resolve([]),[e,i]),{data:t,error:a,isLoading:s}=Je({func:r});return D.useMemo(()=>({activeSubscriptions:t,isLoading:s,error:a}),[t,a,s])}function jg(e){const n=q({optional:!0}),i=n==null?void 0:n.stigg,r=D.useCallback(()=>i?i.getPaywall(e):Promise.resolve(null),[e,i]),{data:t,error:a,isLoading:s}=Je({func:r});return D.useMemo(()=>({paywall:t,isLoading:s,error:a}),[t,a,s])}function Rg(e){const n=q({optional:!0}),i=n==null?void 0:n.stigg,r=D.useCallback(()=>i?i.getCustomerPortal(e):Promise.resolve(null),[e,i]),{data:t,error:a,isLoading:s}=Je({func:r});return D.useMemo(()=>({customerPortal:t,isLoading:s,error:a}),[t,a,s])}function Ka(){const e=ti(),[{resourceId:n}]=W(),{checkoutState:i}=ne(),{plan:r}=i||{},t=e.addons.map(({addon:a,quantity:s})=>({addonId:a.id,quantity:s}));if(r!=null&&r.id)return{resourceId:n,planId:r.id,billingPeriod:e.billingPeriod,billableFeatures:e.billableFeatures,addons:t,promotionCode:e.promotionCode,billingCountryCode:e.billingCountryCode}}const Mg=[b.PaymentCollection.Failed,b.PaymentCollection.Processing];function Ug(n){return B(this,arguments,function*({elements:e}){if(!e){const r="Stripe elements not initialized";return console.error(r),{success:!1,errorMessage:r}}const{error:i}=yield e.submit();return i?(console.log(i.message),{success:!1,errorMessage:i.message||""}):{success:!0}})}function pr(i){return B(this,arguments,function*({applySubscriptionResults:e,stripe:n}){var s,c;const r=e==null?void 0:e.subscription,t=(s=r==null?void 0:r.latestInvoice)==null?void 0:s.paymentSecret,a=r==null?void 0:r.paymentCollection;if(n&&t&&a===b.PaymentCollection.ActionRequired){const{error:l}=yield n.handleNextAction({clientSecret:t});if(l)return{errorMessage:l.message||""}}else if(a&&Mg.includes(a))return{errorMessage:((c=r==null?void 0:r.latestInvoice)==null?void 0:c.errorMessage)||"An error occurred - try again later"};return{subscription:r}})}function Og(r){return B(this,arguments,function*({stripe:e,elements:n,clientSecret:i}){let t,a;const{error:s}=yield e.confirmSetup({elements:n,confirmParams:{return_url:window.location.href},redirect:"if_required"});if(s)s.type==="card_error"||s.type==="validation_error"?s.type==="card_error"&&(a=s.message||""):a="An unexpected error occurred.";else try{const{setupIntent:c}=yield e.retrieveSetupIntent(i);c!=null&&c.payment_method&&(t=c.payment_method)}catch(c){a="An unexpected error occurred.",console.error(c)}return{newPaymentMethodId:t,setupErrorMessage:a}})}function Lg(r){return B(this,arguments,function*({stripe:e,elements:n,setupIntentClientSecret:i}){if(!e||!n||!i)return{success:!1};const t=yield Ug({elements:n});if(!t.success)return{success:!1,errorMessage:t.errorMessage};const{newPaymentMethodId:a,setupErrorMessage:s}=yield Og({stripe:e,elements:n,clientSecret:i});return s||!a?{success:!1,errorMessage:s}:{success:!0,paymentMethodId:a}})}const Bg="5.12.1",_g=30,$g=0,Gg=201,Vg=700,Hg=700,qg="Check",Wg=0,Yg=[],Zg=JSON.parse('[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 8","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":315,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 7","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":270,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 6","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":225,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Shape Layer 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":135,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Shape Layer 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":45,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"Check v","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-1.9,"ix":10},"p":{"a":0,"k":[352,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-120.265,116.765,0],"ix":1,"l":2},"s":{"a":0,"k":[278,278,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-161,123],[-137,148],[-79.531,85.531]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":5.5,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[0]},{"t":148,"s":[100]}],"ix":1},"e":{"a":0,"k":0,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":135,"op":201,"st":-35,"ct":1,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"Circle Stroke","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":7,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[4,-6,0],"ix":1,"l":2},"s":{"a":0,"k":[132,132,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[306,306],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[1,1,1,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30,"s":[1,1,1,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":61,"s":[1,1,1,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":87,"s":[1,1,1,1]},{"t":136,"s":[1,1,1,1]}],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":8,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[4,-6],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.338],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":87,"s":[50]},{"t":122,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.338],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":87,"s":[45]},{"t":122,"s":[0]}],"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.474],"y":[1]},"o":{"x":[0.43],"y":[0]},"t":0,"s":[-170.4]},{"t":111,"s":[-1250.4]}],"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":201,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":13,"ty":1,"nm":"Dark Gray Solid 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[350,350,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"sw":700,"sh":700,"sc":"#2d2d2d","ip":0,"op":201,"st":0,"bm":0}]'),zg=[],Kg={},Qg={v:Bg,fr:_g,ip:$g,op:Gg,w:Vg,h:Hg,nm:qg,ddd:Wg,assets:Yg,layers:Zg,markers:zg,props:Kg},Qa=5e3,Xg=h(Q)`
2972
3032
  @keyframes blurFade {
2973
3033
  0% {
2974
- background-color: ${({theme:e})=>ae(e.stigg.palette.backgroundPaper).alpha(0).toString()};
3034
+ background-color: ${({theme:e})=>le(e.stigg.palette.backgroundPaper).alpha(0).toString()};
2975
3035
  backdrop-filter: blur(0px);
2976
3036
  }
2977
3037
  100% {
2978
- background-color: ${({theme:e})=>ae(e.stigg.palette.backgroundPaper).alpha(.9).toString()};
3038
+ background-color: ${({theme:e})=>le(e.stigg.palette.backgroundPaper).alpha(.9).toString()};
2979
3039
  backdrop-filter: blur(6.5px);
2980
3040
  }
2981
3041
  }
@@ -2986,7 +3046,7 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
2986
3046
  bottom: 0;
2987
3047
  right: 0;
2988
3048
  z-index: 5;
2989
- background-color: ${({theme:e})=>ae(e.stigg.palette.backgroundPaper).alpha(.9).toString()};
3049
+ background-color: ${({theme:e})=>le(e.stigg.palette.backgroundPaper).alpha(.9).toString()};
2990
3050
  animation: blurFade 2s ease-in forwards;
2991
3051
  display: flex;
2992
3052
  flex-direction: column;
@@ -2999,7 +3059,7 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
2999
3059
  & path {
3000
3060
  stroke: ${({theme:e})=>e.stigg.palette.primary};
3001
3061
  }
3002
- `,Cd=p(y)`
3062
+ `,Jg=h(C)`
3003
3063
  @keyframes fadeIn {
3004
3064
  0% {
3005
3065
  opacity: 0;
@@ -3014,56 +3074,56 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3014
3074
 
3015
3075
  align-self: center;
3016
3076
  animation: fadeIn 5s ease-in forwards;
3017
- `;function Pd({checkoutLocalization:e}){const n=D.useRef();return D.useEffect(()=>{n.current&&n.current.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},[]),r.jsxs(yd,{className:"stigg-checkout-success-container",ref:n,children:[r.jsx(hr,{options:{animationData:hd,loop:!1,autoplay:!0},width:350,height:"auto",style:{display:"flex",justifyContent:"center"}}),r.jsx(Cd,{variant:"h1",color:"primary.main",children:e.summary.checkoutSuccessText})]})}const bd=e=>new Promise(n=>setTimeout(n,e));function Ed({isMocked:e=!1,onCheckout:n,onCheckoutCompleted:i,onSuccess:a,disableSuccessAnimation:t}){const{stigg:o}=G(),{useNewPaymentMethod:s}=we(),c=Ta(),{checkoutState:l,widgetState:u,setWidgetReadOnly:d}=X(),{setupSecret:h,customer:m}=l||{},f=He.useStripe(),g=He.useElements();return{handleSubmit:b=>B(null,null,function*(){if(b.preventDefault(),!c)return{success:!1,errorMessage:"Unexpected error, please contact support."};let E=!0,I,N=!1,A;if(d(!0),!e&&s){const k=yield id({elements:g,stripe:f,setupIntentClientSecret:h});k.success?A=k.paymentMethodId:(I=k.errorMessage,E=!1)}const F=O(T({},c),{paymentMethodId:A}),v=k=>B(null,null,function*(){N=!0;try{const L=yield o.applySubscription(k),$=yield ni({applySubscriptionResults:L,stripe:f});return{success:!$.errorMessage,errorMessage:$.errorMessage,results:L}}catch(L){return console.error(L),I=L==null?void 0:L.message,{success:!1,errorMessage:I}}});let U;if(E)if(n){const k=yield n({customerId:m.id,checkoutParams:F,checkoutAction:v});if(k.errorMessage&&(I=k.errorMessage),!N&&k.results&&k.success){const L=yield ni({applySubscriptionResults:k.results,stripe:f});L.errorMessage&&(I=L.errorMessage,E=!1)}E=E&&k.success&&!I,U=k.results}else{const k=yield v(F);!k.success&&k.errorMessage&&(I=k.errorMessage),E=k.success&&!I,U=k.results}return d(!1),E&&a&&(a(),t||(yield bd(Ia))),yield i({success:E,error:I}),{results:U,success:!I,errorMessage:I}}),isLoading:!!(u!=null&&u.readOnly)}}function Sd(){return!!window.Zuora}function Dd(){const e=document.createElement("script");e.type="text/javascript",e.src="https://js.zuora.com/payment/v3/zuora.js",e.async=!0,e.onerror=()=>{throw new Error("Failed to load Zuora library")},document.head.appendChild(e)}function xd(e,n,i,a){return{locale:a||"en",region:(a==null?void 0:a.toUpperCase())||"US",currency:i,amount:"1",createPaymentSession:e,onComplete:n}}function dn(){const{stigg:e}=G(),{setErrorMessage:n}=we(),{billingCountryCode:i}=Re(),[a,t]=D.useState(!1),{checkoutState:o}=X(),{billingIntegration:s}=o||{},c=D.useCallback(()=>B(null,null,function*(){if(!(o!=null&&o.customer.id)||!(o!=null&&o.plan.id))throw new Error("Customer and plan are required");const{token:d}=yield e.createPaymentSession({planId:o.plan.id,billingCountryCode:i});return d}),[o,e,i]),l=D.useCallback(()=>{try{Sd()||Dd(),t(!0)}catch(d){n("Failed to initialize Zuora")}},[t,n]);return D.useEffect(()=>{if(s){const{billingIdentifier:d}=s;d===P.BillingVendorIdentifier.Zuora&&l()}},[s,l]),{isZuoraIntegration:(s==null?void 0:s.billingIdentifier)===P.BillingVendorIdentifier.Zuora,isInitialized:a,createPaymentSession:c}}const Td=e=>new Promise(n=>setTimeout(n,e));function va({onCheckout:e,onCheckoutCompleted:n,onSuccess:i,disableSuccessAnimation:a}){const{stigg:t}=G(),o=Ta(),{checkoutState:s,setWidgetReadOnly:c,setCheckoutSuccess:l}=X(),{setErrorMessage:u}=we();return{handleZuoraSubmit:D.useCallback(h=>B(null,null,function*(){c(!0);let m=!0,f;const g=o;if(!g)m=!1,f="Unexpected error, please contact support.";else{const x=O(T({},g),{paymentMethodId:h}),b=E=>B(null,null,function*(){try{return{success:!0,results:yield t.applySubscription(E)}}catch(I){return console.error(I),{success:!1,errorMessage:(I==null?void 0:I.message)||"Failed to apply subscription"}}});try{if(e){const E=yield e({customerId:s.customer.id,checkoutParams:x,checkoutAction:b});E.errorMessage&&(f=E.errorMessage),m=m&&E.success&&!f}else{const E=yield b(x);!E.success&&E.errorMessage&&(f=E.errorMessage),m=E.success&&!f}}catch(E){m=!1,f=E.message||"Failed to process checkout"}}return m?(l(!0),i&&(i(),a||(yield Td(Ia)))):u(f),c(!1),yield n({success:m,error:f}),{success:m,errorMessage:f}}),[t,o,s,e,n,i,a,c,l,u])}}const Pe=({isLoading:e,width:n=50,height:i=16,children:a})=>e?r.jsx(Q,{width:n,height:i}):r.jsx(r.Fragment,{children:a}),Id=({subscriptionPreview:e,isFetchingSubscriptionPreview:n,checkoutLocalization:i})=>{var s,c,l,u;const{immediateInvoice:a}=e||{};if(!((c=(s=a==null?void 0:a.proration)==null?void 0:s.netAmount)!=null&&c.amount)||((u=(l=a==null?void 0:a.proration)==null?void 0:l.netAmount)==null?void 0:u.amount)>=0)return null;const t=a.proration.netAmount.amount*-1,o=ee({amount:t,currency:a.proration.netAmount.currency,minimumFractionDigits:2});return r.jsx(y,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-remaining-credits",children:r.jsx(Pe,{isLoading:n,width:"100%",children:i.summary.creditsForUnusedTimeText({credits:o})})})},vd=({subscriptionPreview:e,activeSubscription:n,isFetchingSubscriptionPreview:i,checkoutLocalization:a})=>{if(!(e!=null&&e.hasScheduledUpdates)||!(n!=null&&n.currentBillingPeriodEnd))return null;const{currentBillingPeriodEnd:t}=n,o=typeof a.summary.changesWillApplyAtEndOfBillingPeriod=="function"?a.summary.changesWillApplyAtEndOfBillingPeriod({billingPeriodEnd:t}):a.summary.changesWillApplyAtEndOfBillingPeriod;return r.jsx(y,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-scheduled-updates",children:r.jsx(Pe,{isLoading:i,width:"100%",children:o})})},Ad=({subscriptionPreview:e,activeSubscription:n,plan:i,isFetchingSubscriptionPreview:a,billingPeriod:t})=>{const{recurringInvoice:o}=e||{};if(!e||!(o!=null&&o.total.amount))return null;const s=e.hasScheduledUpdates?n==null?void 0:n.currentBillingPeriodEnd:e==null?void 0:e.billingPeriodRange.end,c=ee(O(T({},o.total),{minimumFractionDigits:2})),l=i==null?void 0:i.pricePoints.some(g=>g.pricingModel===P.BillingModel.UsageBased),u=i==null?void 0:i.pricePoints.some(g=>g.pricingModel!==P.BillingModel.UsageBased);let d="We will bill you ",h=`${c} `;l&&(u?h+="+":h="for",h+=" applicable usage-based charges for this subscription ");let m,f;switch(t){case P.BillingPeriod.Monthly:f="month",m=`the ${te(s).format("Do")}`;break;case P.BillingPeriod.Annually:f="year",m=te(s).format("MMMM Do");break}return d+=`${h}for this subscription every ${f} on ${m}, unless you cancel.`,r.jsx(y,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-next-billing",children:r.jsx(Pe,{isLoading:a,width:"100%",children:d})})};function kd(e){return r.jsxs(Z.Box,{className:"stigg-checkout-summary-captions",children:[r.jsx(Id,T({},e)),r.jsx(vd,T({},e)),r.jsx(Ad,T({},e))]})}function Aa({quantity:e,totalAmount:n,pricingModel:i,billingPeriod:a,currency:t,blockSize:o,priceAmount:s,availableBillingPeriods:c}){const l=c==null?void 0:c.has(P.BillingPeriod.Monthly),u=i===P.BillingModel.PerUnit,d=o||1,h=a===P.BillingPeriod.Annually&&l,m=e&&(u||e>1)?`${se(e)} ${d>1?"for":"x"} `:"",f=h?" x 12 months":"",g=(s||n/e)/(h?12:1),x=ee({amount:g,currency:t,minimumFractionDigits:2}),b=ee({amount:n,currency:t,minimumFractionDigits:2});return`${m}${x}${f} ${f||m?` = ${b}`:""}`}function Nd(e){const{totalAmount:n,quantity:i,tiersMode:a,tiers:t,currency:o}=e;if(lo(t)||a===P.TiersMode.Graduated&&!uo(t,i)){const s=ee({amount:n,currency:o,minimumFractionDigits:2});return`${se(i)} for ${s}`}return Aa(e)}function wd(e,n){const{unitPrice:i,upTo:a}=e[n];if(!i)return"";if(n===0)return`First ${a}`;const o=(e[n-1].upTo||0)+1;return pe(a)?`${se(o)} and above`:`Next ${se(o)} to ${se(a)}`}function Fd({price:e,unitQuantity:n}){const i=e.tiers||[],{checkoutState:a}=X(),t=a==null?void 0:a.plan,{breakdown:o}=vi(i,n);return o.length===1?null:r.jsx(r.Fragment,{children:o.map(({unitQuantity:s,amount:c},l)=>r.jsx(Ee,{children:r.jsxs(ye,{style:{alignItems:"flex-start"},children:[r.jsx(y,{variant:"body1",color:"tertiary",style:{whiteSpace:"nowrap"},children:wd(i,l)}),r.jsx(y,{variant:"body1",color:"tertiary",style:{whiteSpace:"nowrap"},children:Aa({quantity:s,totalAmount:c,currency:e.currency,pricingModel:e.pricingModel,billingPeriod:e.billingPeriod,blockSize:e.blockSize,priceAmount:e.amount,availableBillingPeriods:new Set(t==null?void 0:t.pricePoints.map(u=>u.billingPeriod))})})]})},l))})}const jd=p(Te.ChevronRight)`
3077
+ `;function e1({checkoutLocalization:e}){const n=D.useRef();return D.useEffect(()=>{n.current&&n.current.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},[]),o.jsxs(Xg,{className:"stigg-checkout-success-container",ref:n,children:[o.jsx(Go,{options:{animationData:Qg,loop:!1,autoplay:!0},width:350,height:"auto",style:{display:"flex",justifyContent:"center"}}),o.jsx(Jg,{variant:"h1",color:"primary.main",children:e.summary.checkoutSuccessText})]})}const t1=e=>new Promise(n=>setTimeout(n,e));function n1({isMocked:e=!1,onCheckout:n,onCheckoutCompleted:i,onSuccess:r,disableSuccessAnimation:t}){const{stigg:a}=q(),{useNewPaymentMethod:s}=Ve(),c=Ka(),{checkoutState:l,widgetState:u,setWidgetReadOnly:d}=ne(),{setupSecret:p,customer:m}=l||{},f=st.useStripe(),g=st.useElements();return{handleSubmit:P=>B(null,null,function*(){if(P.preventDefault(),!c)return{success:!1,errorMessage:"Unexpected error, please contact support."};let S=!0,v,A=!1,k;if(d(!0),!e&&s){const F=yield Lg({elements:g,stripe:f,setupIntentClientSecret:p});F.success?k=F.paymentMethodId:(v=F.errorMessage,S=!1)}const w=_(I({},c),{paymentMethodId:k}),T=F=>B(null,null,function*(){A=!0;try{const U=yield a.applySubscription(F),L=yield pr({applySubscriptionResults:U,stripe:f});return{success:!L.errorMessage,errorMessage:L.errorMessage,results:U}}catch(U){return console.error(U),v=U==null?void 0:U.message,{success:!1,errorMessage:v}}});let N;if(S)if(n){const F=yield n({customerId:m.id,checkoutParams:w,checkoutAction:T});if(F.errorMessage&&(v=F.errorMessage),!A&&F.results&&F.success){const U=yield pr({applySubscriptionResults:F.results,stripe:f});U.errorMessage&&(v=U.errorMessage,S=!1)}S=S&&F.success&&!v,N=F.results}else{const F=yield T(w);!F.success&&F.errorMessage&&(v=F.errorMessage),S=F.success&&!v,N=F.results}return d(!1),S&&r&&(r(),t||(yield t1(Qa))),yield i({success:S,error:v}),{results:N,success:!v,errorMessage:v}}),isLoading:!!(u!=null&&u.readOnly)}}function i1(){return!!window.Zuora}function r1(){const e=document.createElement("script");e.type="text/javascript",e.src="https://js.zuora.com/payment/v3/zuora.js",e.async=!0,e.onerror=()=>{throw new Error("Failed to load Zuora library")},document.head.appendChild(e)}function a1(e,n,i,r){return{locale:r||"en",region:(r==null?void 0:r.toUpperCase())||"US",currency:i,amount:"1",createPaymentSession:e,onComplete:n}}function ii(){const{stigg:e}=q(),{setErrorMessage:n}=Ve(),{billingCountryCode:i}=Xe(),[r,t]=D.useState(!1),{checkoutState:a}=ne(),{billingIntegration:s}=a||{},c=D.useCallback(()=>B(null,null,function*(){if(!(a!=null&&a.customer.id)||!(a!=null&&a.plan.id))throw new Error("Customer and plan are required");const{token:d}=yield e.createPaymentSession({planId:a.plan.id,billingCountryCode:i});return d}),[a,e,i]),l=D.useCallback(()=>{try{i1()||r1(),t(!0)}catch(d){n("Failed to initialize Zuora")}},[t,n]);return D.useEffect(()=>{if(s){const{billingIdentifier:d}=s;d===b.BillingVendorIdentifier.Zuora&&l()}},[s,l]),{isZuoraIntegration:(s==null?void 0:s.billingIdentifier)===b.BillingVendorIdentifier.Zuora,isInitialized:r,createPaymentSession:c}}const o1=e=>new Promise(n=>setTimeout(n,e));function Xa({onCheckout:e,onCheckoutCompleted:n,onSuccess:i,disableSuccessAnimation:r}){const{stigg:t}=q(),a=Ka(),{checkoutState:s,setWidgetReadOnly:c,setCheckoutSuccess:l}=ne(),{setErrorMessage:u}=Ve();return{handleZuoraSubmit:D.useCallback(p=>B(null,null,function*(){c(!0);let m=!0,f;const g=a;if(!g)m=!1,f="Unexpected error, please contact support.";else{const y=_(I({},g),{paymentMethodId:p}),P=S=>B(null,null,function*(){try{return{success:!0,results:yield t.applySubscription(S)}}catch(v){return console.error(v),{success:!1,errorMessage:(v==null?void 0:v.message)||"Failed to apply subscription"}}});try{if(e){const S=yield e({customerId:s.customer.id,checkoutParams:y,checkoutAction:P});S.errorMessage&&(f=S.errorMessage),m=m&&S.success&&!f}else{const S=yield P(y);!S.success&&S.errorMessage&&(f=S.errorMessage),m=S.success&&!f}}catch(S){m=!1,f=S.message||"Failed to process checkout"}}return m?(l(!0),i&&(i(),r||(yield o1(Qa)))):u(f),c(!1),yield n({success:m,error:f}),{success:m,errorMessage:f}}),[t,a,s,e,n,i,r,c,l,u])}}const Ne=({isLoading:e,width:n=50,height:i=16,children:r})=>e?o.jsx(te,{width:n,height:i}):o.jsx(o.Fragment,{children:r}),s1=({subscriptionPreview:e,isFetchingSubscriptionPreview:n,checkoutLocalization:i})=>{var s,c,l,u;const{immediateInvoice:r}=e||{};if(!((c=(s=r==null?void 0:r.proration)==null?void 0:s.netAmount)!=null&&c.amount)||((u=(l=r==null?void 0:r.proration)==null?void 0:l.netAmount)==null?void 0:u.amount)>=0)return null;const t=r.proration.netAmount.amount*-1,a=re({amount:t,currency:r.proration.netAmount.currency,minimumFractionDigits:2});return o.jsx(C,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-remaining-credits",children:o.jsx(Ne,{isLoading:n,width:"100%",children:i.summary.creditsForUnusedTimeText({credits:a})})})},c1=({subscriptionPreview:e,activeSubscription:n,isFetchingSubscriptionPreview:i,checkoutLocalization:r})=>{if(!(e!=null&&e.hasScheduledUpdates)||!(n!=null&&n.currentBillingPeriodEnd))return null;const{currentBillingPeriodEnd:t}=n,a=typeof r.summary.changesWillApplyAtEndOfBillingPeriod=="function"?r.summary.changesWillApplyAtEndOfBillingPeriod({billingPeriodEnd:t}):r.summary.changesWillApplyAtEndOfBillingPeriod;return o.jsx(C,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-scheduled-updates",children:o.jsx(Ne,{isLoading:i,width:"100%",children:a})})},l1=({subscriptionPreview:e,activeSubscription:n,plan:i,isFetchingSubscriptionPreview:r,billingPeriod:t})=>{const{recurringInvoice:a}=e||{};if(!e||!(a!=null&&a.total.amount))return null;const s=e.hasScheduledUpdates?n==null?void 0:n.currentBillingPeriodEnd:e==null?void 0:e.billingPeriodRange.end,c=re(_(I({},a.total),{minimumFractionDigits:2})),l=i==null?void 0:i.pricePoints.some(g=>g.pricingModel===b.BillingModel.UsageBased),u=i==null?void 0:i.pricePoints.some(g=>g.pricingModel!==b.BillingModel.UsageBased);let d="We will bill you ",p=`${c} `;l&&(u?p+="+":p="for",p+=" applicable usage-based charges for this subscription ");let m,f;switch(t){case b.BillingPeriod.Monthly:f="month",m=`the ${oe(s).format("Do")}`;break;case b.BillingPeriod.Annually:f="year",m=oe(s).format("MMMM Do");break}return d+=`${p}for this subscription every ${f} on ${m}, unless you cancel.`,o.jsx(C,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-next-billing",children:o.jsx(Ne,{isLoading:r,width:"100%",children:d})})};function u1(e){return o.jsxs(K.Box,{className:"stigg-checkout-summary-captions",children:[o.jsx(s1,I({},e)),o.jsx(c1,I({},e)),o.jsx(l1,I({},e))]})}function Ja({quantity:e,totalAmount:n,pricingModel:i,billingPeriod:r,currency:t,blockSize:a,priceAmount:s,availableBillingPeriods:c}){const l=c==null?void 0:c.has(b.BillingPeriod.Monthly),u=i===b.BillingModel.PerUnit,d=a||1,p=r===b.BillingPeriod.Annually&&l,m=e&&(u||e>1)?`${pe(e)} ${d>1?"for":"x"} `:"",f=p?" x 12 months":"",g=(s||n/e)/(p?12:1),y=re({amount:g,currency:t,minimumFractionDigits:2}),P=re({amount:n,currency:t,minimumFractionDigits:2});return`${m}${y}${f} ${f||m?` = ${P}`:""}`}function d1(e){const{totalAmount:n,quantity:i,tiersMode:r,tiers:t,currency:a}=e;if(Wc(t)||r===b.TiersMode.Graduated&&!Yc(t,i)){const s=re({amount:n,currency:a,minimumFractionDigits:2});return`${pe(i)} for ${s}`}return Ja(e)}function m1(e,n){const{unitPrice:i,upTo:r}=e[n];if(!i)return"";if(n===0)return`First ${r}`;const a=(e[n-1].upTo||0)+1;return De(r)?`${pe(a)} and above`:`Next ${pe(a)} to ${pe(r)}`}function g1({price:e,unitQuantity:n}){const i=e.tiers||[],{checkoutState:r}=ne(),t=r==null?void 0:r.plan,{breakdown:a}=Xr(i,n);return a.length===1?null:o.jsx(o.Fragment,{children:a.map(({unitQuantity:s,amount:c},l)=>o.jsx(je,{children:o.jsxs(Ae,{style:{alignItems:"flex-start"},children:[o.jsx(C,{variant:"body1",color:"tertiary",style:{whiteSpace:"nowrap"},children:m1(i,l)}),o.jsx(C,{variant:"body1",color:"tertiary",style:{whiteSpace:"nowrap"},children:Ja({quantity:s,totalAmount:c,currency:e.currency,pricingModel:e.pricingModel,billingPeriod:e.billingPeriod,blockSize:e.blockSize,priceAmount:e.amount,availableBillingPeriods:new Set(t==null?void 0:t.pricePoints.map(u=>u.billingPeriod))})})]})},l))})}const p1=h(Oe.ChevronRight)`
3018
3078
  height: ${({$size:e=24})=>`${e}px`};
3019
3079
  width: ${({$size:e=24})=>`${e}px`};
3020
3080
  transition: all 0.2s ease-in;
3021
3081
  ${({$isOpen:e})=>e&&"transform: rotate(90deg)"}
3022
- `,Ee=p.div`
3082
+ `,je=h.div`
3023
3083
  & + & {
3024
3084
  margin-top: 16px;
3025
3085
  }
3026
- `,Ud=p.div`
3086
+ `,f1=h.div`
3027
3087
  margin-top: 16px;
3028
3088
  margin-left: 16px;
3029
- `,ye=p.div`
3089
+ `,Ae=h.div`
3030
3090
  display: flex;
3031
3091
  flex-direction: column;
3032
3092
  gap: 16px;
3033
3093
 
3034
- ${ge.lg} {
3094
+ ${Se.lg} {
3035
3095
  flex-direction: row;
3036
3096
  align-items: center;
3037
3097
  justify-content: space-between;
3038
3098
  }
3039
- `,Md=({checkoutLocalization:e})=>{const n=r.jsx(y,{variant:"body1",children:e.summary.payAsYouGoTooltipText});return r.jsx(on,{placement:"left",title:n,children:r.jsx(ce,{icon:"PayAsYouGoCharge",style:{display:"flex"}})})},Vt=({checkoutLocalization:e,label:n,quantity:i,price:a})=>{const{checkoutState:t}=X(),o=t==null?void 0:t.plan,s=Ne("lg"),[c,l]=D.useState(!1),u=()=>l(x=>!x),d=a.pricingModel===P.BillingModel.UsageBased,h=a.isTieredPrice?tn(a,i):(a.amount||0)*Math.ceil(i/(a.blockSize||1));let m;a.tiersMode===P.TiersMode.Graduated&&!!a.tiers&&!en(a.tiers)&&!pe(a.tiers[0].upTo)&&i>a.tiers[0].upTo&&(m=r.jsx(Fd,{price:a,unitQuantity:i}));let g=r.jsx(y,{variant:"body1",color:"secondary",children:n});return m&&(g=r.jsx(pi,{onClick:u,underline:"none",style:{cursor:"pointer"},children:g})),r.jsxs(Ee,{className:"stigg-checkout-summary-base-charges-container",children:[r.jsxs(ye,{style:{alignItems:"flex-start"},children:[r.jsxs(j,{item:!0,display:"flex",gap:.5,style:{whiteSpace:s?"nowrap":"break-spaces"},children:[g,m&&r.jsx(Z.IconButton,{onClick:u,sx:{padding:0},children:r.jsx(jd,{$isOpen:c,$size:16})})]}),r.jsxs(j,{item:!0,display:"flex",gap:1,alignItems:"center",children:[d&&r.jsx(Md,{checkoutLocalization:e}),r.jsxs(y,{variant:"body1",color:"secondary",style:{whiteSpace:s?"nowrap":"break-spaces"},children:[Nd({totalAmount:h,quantity:i,currency:a.currency,pricingModel:a.pricingModel,billingPeriod:a.billingPeriod,tiers:a.tiers,tiersMode:a.tiersMode,blockSize:a.blockSize,priceAmount:a.amount,availableBillingPeriods:new Set(o==null?void 0:o.pricePoints.map(x=>x.billingPeriod))}),d&&" / unit"]})]})]}),m&&r.jsx(fi,{in:c,children:r.jsx(Ud,{children:m})})]})},Rd=({label:e})=>r.jsx(Ee,{children:r.jsxs(ye,{style:{alignItems:"flex-end"},children:[r.jsx(j,{item:!0,children:r.jsx(y,{variant:"body1",color:"secondary",children:e})}),r.jsx(j,{item:!0,display:"flex",gap:1,alignItems:"center",children:r.jsx(y,{variant:"body1",color:"secondary",style:{wordBreak:"break-word"},children:"Free"})})]})}),Ld=({subscriptionPreview:e,isFetchingSubscriptionPreview:n,checkoutLocalization:i})=>{const{immediateInvoice:a,recurringInvoice:t}=e,{discount:o,discountDetails:s}=t||{};return!o||!s?null:r.jsx(Ee,{children:r.jsxs(ye,{children:[r.jsx(y,{variant:"body1",color:"secondary",children:i.summary.discountText({discountDetails:s,currency:a.total.currency})}),r.jsx(y,{variant:"body1",color:"secondary",children:n?r.jsx(Q,{width:50,height:16}):ee({amount:o.amount,currency:o.currency,minimumFractionDigits:2})})]})})},Bd=({subscriptionPreview:e,isFetchingSubscriptionPreview:n,checkoutLocalization:i})=>{const{immediateInvoice:a}=e||{},{credits:t}=a||{};return!t||!t.used||t.used.amount<=0?null:r.jsx(Ee,{children:r.jsxs(ye,{children:[r.jsx(y,{variant:"body1",color:"secondary",children:i.summary.appliedCreditsTitle}),r.jsx(y,{variant:"body1",color:"secondary",children:r.jsx(Pe,{isLoading:n,children:ee({amount:-1*t.used.amount,currency:t.used.currency,minimumFractionDigits:2})})})]})})},Od=({tax:e,taxDetails:n,isFetchingSubscriptionPreview:i,checkoutLocalization:a})=>!n||!e||(e==null?void 0:e.amount)<=0?null:r.jsx(Ee,{children:r.jsxs(ye,{children:[r.jsx(y,{variant:"body1",color:"secondary",children:a.summary.taxTitle({taxDetails:n})}),r.jsx(y,{variant:"body1",color:"secondary",children:r.jsx(Pe,{isLoading:i,children:ee({amount:e==null?void 0:e.amount,currency:e==null?void 0:e.currency,minimumFractionDigits:2})})})]})}),ka=p(z)`
3099
+ `,h1=({checkoutLocalization:e})=>{const n=o.jsx(C,{variant:"body1",children:e.summary.payAsYouGoTooltipText});return o.jsx(Xn,{placement:"left",title:n,children:o.jsx(fe,{icon:"PayAsYouGoCharge",style:{display:"flex"}})})},xn=({checkoutLocalization:e,label:n,quantity:i,price:r})=>{const{checkoutState:t}=ne(),a=t==null?void 0:t.plan,s=Ge("lg"),[c,l]=D.useState(!1),u=()=>l(y=>!y),d=r.pricingModel===b.BillingModel.UsageBased,p=r.isTieredPrice?Zn(r,i):(r.amount||0)*Math.ceil(i/(r.blockSize||1));let m;r.tiersMode===b.TiersMode.Graduated&&!!r.tiers&&!_n(r.tiers)&&!De(r.tiers[0].upTo)&&i>r.tiers[0].upTo&&(m=o.jsx(g1,{price:r,unitQuantity:i}));let g=o.jsx(C,{variant:"body1",color:"secondary",children:n});return m&&(g=o.jsx(xr,{onClick:u,underline:"none",style:{cursor:"pointer"},children:g})),o.jsxs(je,{className:"stigg-checkout-summary-base-charges-container",children:[o.jsxs(Ae,{style:{alignItems:"flex-start"},children:[o.jsxs(R,{item:!0,display:"flex",gap:.5,style:{whiteSpace:s?"nowrap":"break-spaces"},children:[g,m&&o.jsx(K.IconButton,{onClick:u,sx:{padding:0},children:o.jsx(p1,{$isOpen:c,$size:16})})]}),o.jsxs(R,{item:!0,display:"flex",gap:1,alignItems:"center",children:[d&&o.jsx(h1,{checkoutLocalization:e}),o.jsxs(C,{variant:"body1",color:"secondary",style:{whiteSpace:s?"nowrap":"break-spaces"},children:[d1({totalAmount:p,quantity:i,currency:r.currency,pricingModel:r.pricingModel,billingPeriod:r.billingPeriod,tiers:r.tiers,tiersMode:r.tiersMode,blockSize:r.blockSize,priceAmount:r.amount,availableBillingPeriods:new Set(a==null?void 0:a.pricePoints.map(y=>y.billingPeriod))}),d&&" / unit"]})]})]}),m&&o.jsx(Ir,{in:c,children:o.jsx(f1,{children:m})})]})},y1=({label:e})=>o.jsx(je,{children:o.jsxs(Ae,{style:{alignItems:"flex-end"},children:[o.jsx(R,{item:!0,children:o.jsx(C,{variant:"body1",color:"secondary",children:e})}),o.jsx(R,{item:!0,display:"flex",gap:1,alignItems:"center",children:o.jsx(C,{variant:"body1",color:"secondary",style:{wordBreak:"break-word"},children:"Free"})})]})}),C1=({subscriptionPreview:e,isFetchingSubscriptionPreview:n,checkoutLocalization:i})=>{const{immediateInvoice:r,recurringInvoice:t}=e,{discount:a,discountDetails:s}=t||{};return!a||!s?null:o.jsx(je,{children:o.jsxs(Ae,{children:[o.jsx(C,{variant:"body1",color:"secondary",children:i.summary.discountText({discountDetails:s,currency:r.total.currency})}),o.jsx(C,{variant:"body1",color:"secondary",children:n?o.jsx(te,{width:50,height:16}):re({amount:a.amount,currency:a.currency,minimumFractionDigits:2})})]})})},b1=({subscriptionPreview:e,isFetchingSubscriptionPreview:n,checkoutLocalization:i})=>{const{immediateInvoice:r}=e||{},{credits:t}=r||{};return!t||!t.used||t.used.amount<=0?null:o.jsx(je,{children:o.jsxs(Ae,{children:[o.jsx(C,{variant:"body1",color:"secondary",children:i.summary.appliedCreditsTitle}),o.jsx(C,{variant:"body1",color:"secondary",children:o.jsx(Ne,{isLoading:n,children:re({amount:-1*t.used.amount,currency:t.used.currency,minimumFractionDigits:2})})})]})})},E1=({tax:e,taxDetails:n,isFetchingSubscriptionPreview:i,checkoutLocalization:r})=>!n||!e||(e==null?void 0:e.amount)<=0?null:o.jsx(je,{children:o.jsxs(Ae,{children:[o.jsx(C,{variant:"body1",color:"secondary",children:r.summary.taxTitle({taxDetails:n})}),o.jsx(C,{variant:"body1",color:"secondary",children:o.jsx(Ne,{isLoading:i,children:re({amount:e==null?void 0:e.amount,currency:e==null?void 0:e.currency,minimumFractionDigits:2})})})]})}),eo=h(Q)`
3040
3100
  width: 100%;
3041
3101
  max-width: 470px;
3042
3102
  flex: 1.5;
3043
- `,mn=p(fr)`
3103
+ `,ri=h($o)`
3044
3104
  background: ${({theme:e})=>e.stigg.palette.backgroundHighlight};
3045
3105
  padding: 16px;
3046
3106
 
3047
- ${ge.md} {
3107
+ ${Se.md} {
3048
3108
  border-radius: 10px;
3049
3109
  }
3050
- `;mn.defaultProps={elevation:0};const $d=p(y)`
3110
+ `;ri.defaultProps={elevation:0};const P1=h(C)`
3051
3111
  margin-bottom: 16px;
3052
3112
  font-weight: 500;
3053
- `,Fe=p(je)`
3113
+ `,He=h(We)`
3054
3114
  margin: 16px 0;
3055
- `,ii=p(y)`
3115
+ `,fr=h(C)`
3056
3116
  margin-bottom: 8px;
3057
- `;function _d({isLastStep:e,checkoutHasChanges:n,isFreeDowngrade:i,checkoutLocalization:a,isPlanUpdate:t}){return e?n?t?a.checkoutButton.updateText:i?a.checkoutButton.downgradeToFreeText:a.checkoutButton.upgradeText:a.checkoutButton.noChangesText:a.checkoutButton.nextText}const Gd=({onCheckout:e,onCheckoutCompleted:n,disablePromotionCode:i,disableSuccessAnimation:a,isFreeDowngrade:t,onMockCheckoutPreview:o,isWidgetWatermarkEnabled:s})=>{var bn,En,Sn,Dn,xn;const[c,l]=D.useState(!1),{setErrorMessage:u,useNewPaymentMethod:d}=we(),h=Je(),m=ln(),{checkoutState:f,checkoutLocalization:g,checkoutSuccess:x,widgetState:b}=X(),{plan:E,activeSubscription:I}=f||{},N=Pa(((bn=E==null?void 0:E.pricePoints)==null?void 0:bn.filter(_=>_.billingPeriod===m.billingPeriod))||[]),[A,F]=pr(N,_=>_.pricingModel===P.BillingModel.FlatFee),v=A[0],U=t||h.isCheckoutComplete&&h.isLastStep,{isZuoraIntegration:k}=dn(),L=c||x,{subscriptionPreview:$,isFetchingSubscriptionPreview:w}=Pu({onMockCheckoutPreview:o}),{handleSubmit:R,isLoading:W}=Ed({isMocked:!!o,disableSuccessAnimation:a,onCheckout:e,onCheckoutCompleted:n,onSuccess:()=>{l(!0),h.markStepAsCompleted(h.progressBarState.activeStep)}}),{handleZuoraSubmit:J}=va({onCheckout:e,onCheckoutCompleted:n,disableSuccessAnimation:a,onSuccess:()=>{h.markStepAsCompleted(h.progressBarState.activeStep)}}),de=_=>B(null,null,function*(){if(L)return;let me;k&&!d?me=yield J():me=yield R(_);const{errorMessage:Se}=me||{};Se?(u(Se),l(!1)):u(void 0)}),he=k&&!d?b.readOnly:W,Ya=_=>B(null,null,function*(){he||(U?yield de(_):h.goNext())}),{immediateInvoice:q,recurringInvoice:oe}=$||{},fn=!!$&&(!!(q!=null&&q.proration)||!!$.hasScheduledUpdates),hn=!i&&!t&&!k,yn=!!(oe!=null&&oe.discountDetails)&&!t,xt=hn||yn,Cn=F.some(_=>_.pricingModel===P.BillingModel.UsageBased),Tt=Cn&&!v&&F.every(_=>_.pricingModel===P.BillingModel.UsageBased),Pn=typeof g.summary.baseChargeText=="function"?g.summary.baseChargeText({billingPeriod:m.billingPeriod}):g.summary.baseChargeText;return r.jsxs(ka,{children:[r.jsxs(mn,{children:[r.jsx($d,{variant:"h3",children:g.summary.title}),r.jsxs(j,{className:"stigg-checkout-summary-plan-title-container",display:"flex",flexDirection:"row",alignItems:"center",marginY:2,children:[r.jsx(y,{variant:"h6",color:"primary",style:{paddingRight:"8px"},children:g.summary.planName({plan:E})}),r.jsx(Fe,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})]}),v&&r.jsx(Vt,{checkoutLocalization:g,label:Pn,quantity:1,price:v}),!v&&t?r.jsx(Rd,{label:Pn}):null,r.jsx(j,{item:!0,className:"stigg-checkout-summary-usage-charges-container",children:F.map(_=>{var Se,Be,Oe,et,Tn;const me=(Se=m.billableFeatures)==null?void 0:Se.find(Za=>{var In;return Za.featureId===((In=_.feature)==null?void 0:In.featureId)});return r.jsx(Vt,{checkoutLocalization:g,label:cn(((Be=_.feature)==null?void 0:Be.displayName)||"",(Oe=_.feature)==null?void 0:Oe.units,(et=_.feature)==null?void 0:et.unitsPlural),quantity:(me==null?void 0:me.quantity)||1,price:_},(Tn=_.feature)==null?void 0:Tn.featureId)})}),!!((En=m.addons)!=null&&En.length)&&r.jsxs(r.Fragment,{children:[r.jsxs(j,{display:"flex",flexDirection:"row",alignItems:"center",marginY:2,children:[r.jsx(y,{variant:"h6",color:"primary",style:{paddingRight:"8px"},children:g.summary.addonsSectionTitle}),r.jsx(Fe,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})]}),m.addons.map(_=>{var Be,Oe;const me=(Be=_.addon.pricePoints)==null?void 0:Be.find(et=>et.billingPeriod===m.billingPeriod);if(!me)return null;const Se=_.quantity&&_.quantity>0?_.quantity:1;return r.jsx(Vt,{checkoutLocalization:g,label:_.addon.displayName,quantity:Se,price:me},(Oe=_==null?void 0:_.addon)==null?void 0:Oe.id)})]}),!xt&&r.jsx(Fe,{className:"stigg-checkout-summary-divider"}),xt&&r.jsxs(j,{display:"flex",flexDirection:"row",alignItems:"center",marginY:2,children:[r.jsx(y,{variant:"h6",color:"primary",style:{paddingRight:"8px"},children:g.summary.discountsSectionTitle}),r.jsx(Fe,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})]}),hn&&r.jsx(Zu,{disabled:he||w,checkoutLocalization:g,onMockCheckoutPreview:o}),yn&&r.jsx(Ld,{subscriptionPreview:$,isFetchingSubscriptionPreview:w,checkoutLocalization:g}),xt&&r.jsx(Fe,{className:"stigg-checkout-summary-divider"}),r.jsx(Od,{tax:oe==null?void 0:oe.tax,taxDetails:oe==null?void 0:oe.taxDetails,isFetchingSubscriptionPreview:w,checkoutLocalization:g}),t?null:r.jsxs(r.Fragment,{children:[r.jsx(ye,{style:{marginTop:16},children:r.jsxs(j,{display:"flex",flexDirection:"column",container:!0,children:[r.jsxs(j,{item:!0,display:"flex",justifyContent:"space-between",children:[r.jsx(y,{variant:"h6",children:g.summary.totalText}),r.jsx(y,{variant:"h6",children:r.jsxs(Pe,{isLoading:w,children:[Tt?g.summary.onlyPayAsYouGoText:null,!Tt&&Cn?g.summary.startsAtText:null,Tt?null:ee(O(T({amount:0},oe==null?void 0:oe.total),{minimumFractionDigits:2}))]})})]}),r.jsx(j,{item:!0,children:r.jsx(y,{variant:"body1",color:"secondary",children:g.summary.totalBillingPeriodText({billingPeriod:m.billingPeriod})})})]})}),r.jsx(Fe,{className:"stigg-checkout-summary-divider"})]}),(Sn=q==null?void 0:q.proration)!=null&&Sn.hasProrations&&(q!=null&&q.subTotal)&&(q==null?void 0:q.subTotal.amount)>0?r.jsx(Ee,{children:r.jsxs(ye,{children:[r.jsx(y,{variant:"body1",color:"secondary",children:g.summary.proratedTotalDueText}),r.jsx(y,{variant:"body1",color:"secondary",children:r.jsx(Pe,{isLoading:w,children:ee({amount:((Dn=q==null?void 0:q.subTotal)==null?void 0:Dn.amount)+(((xn=q==null?void 0:q.tax)==null?void 0:xn.amount)||0),currency:q==null?void 0:q.subTotal.currency,minimumFractionDigits:2})})})]})}):null,r.jsx(Bd,{subscriptionPreview:$,isFetchingSubscriptionPreview:w,checkoutLocalization:g}),r.jsx(Ee,{children:r.jsxs(ye,{children:[r.jsx(ii,{variant:"h6",children:g.summary.totalDueText}),r.jsx(ii,{variant:"h6",children:r.jsx(Pe,{isLoading:w,children:ee(O(T({amount:0},q==null?void 0:q.total),{minimumFractionDigits:2}))})})]})}),r.jsx(kd,{plan:E,activeSubscription:I,subscriptionPreview:$,isFetchingSubscriptionPreview:w,checkoutLocalization:g,billingPeriod:m.billingPeriod}),(!U||!k||k&&!d)&&r.jsx(Ie,{$success:L,$error:U&&t,disabled:he||w||h.progressBarState.isDisabled||U&&!fn,className:"stigg-checkout-summary-cta-button",sx:{textTransform:"none",borderRadius:"10px",marginTop:"24px",height:"36px"},variant:"contained",size:"medium",onClick:_=>{Ya(_)},fullWidth:!0,children:r.jsx(y,{className:"stigg-checkout-summary-cta-button-text",variant:"h3",color:"white",style:{display:"flex"},children:L?r.jsx(ce,{icon:"Check",style:{display:"contents"}}):he||w?r.jsx(Jt,{size:20,sx:{color:"white"}}):_d({isLastStep:U,checkoutHasChanges:fn,isFreeDowngrade:t,checkoutLocalization:g,isPlanUpdate:!!I&&(I==null?void 0:I.plan.id)===(E==null?void 0:E.id)})})})]}),r.jsx(Ue,{source:"checkout",showWatermark:s,style:{marginTop:8,display:"flex",justifyContent:"center"}}),!a&&L&&r.jsx(Pd,{checkoutLocalization:g})]})},Vd=({isWidgetWatermarkEnabled:e})=>r.jsxs(ka,{children:[r.jsxs(mn,{children:[r.jsxs(qe,{$flexDirection:"column",$gap:24,children:[r.jsx(Q,{width:120,height:20}),r.jsx(Q,{width:120,height:20}),r.jsx(Q,{width:120,height:20}),r.jsx(Q,{width:120,height:20})]}),r.jsxs(qe,{$flexDirection:"column",$gap:24,marginTop:5,children:[r.jsx(Q,{height:20}),r.jsx(Q,{height:20}),r.jsx(Q,{height:20})]}),r.jsx(Yt,{flex:1,marginTop:5,children:r.jsx(Q,{height:34})})]}),r.jsx(Ue,{source:"checkout",showWatermark:e,style:{marginTop:8,display:"flex",justifyContent:"center"}})]}),Hd=p(j)`
3117
+ `;function S1({isLastStep:e,checkoutHasChanges:n,isFreeDowngrade:i,checkoutLocalization:r,isPlanUpdate:t}){return e?n?t?r.checkoutButton.updateText:i?r.checkoutButton.downgradeToFreeText:r.checkoutButton.upgradeText:r.checkoutButton.noChangesText:r.checkoutButton.nextText}const D1=({onCheckout:e,onCheckoutCompleted:n,disablePromotionCode:i,disableSuccessAnimation:r,isFreeDowngrade:t,onMockCheckoutPreview:a,showWatermark:s})=>{var mi,gi,pi,fi,hi;const[c,l]=D.useState(!1),{setErrorMessage:u,useNewPaymentMethod:d}=Ve(),p=Et(),m=ti(),{checkoutState:f,checkoutLocalization:g,checkoutSuccess:y,widgetState:P}=ne(),{plan:S,activeSubscription:v}=f||{},A=Ha(((mi=S==null?void 0:S.pricePoints)==null?void 0:mi.filter(V=>V.billingPeriod===m.billingPeriod))||[]),[k,w]=_o(A,V=>V.pricingModel===b.BillingModel.FlatFee),T=k[0],N=t||p.isCheckoutComplete&&p.isLastStep,{isZuoraIntegration:F}=ii(),U=c||y,{subscriptionPreview:L,isFetchingSubscriptionPreview:j}=eg({onMockCheckoutPreview:a}),{handleSubmit:O,isLoading:z}=n1({isMocked:!!a,disableSuccessAnimation:r,onCheckout:e,onCheckoutCompleted:n,onSuccess:()=>{l(!0),p.markStepAsCompleted(p.progressBarState.activeStep)}}),{handleZuoraSubmit:X}=Xa({onCheckout:e,onCheckoutCompleted:n,disableSuccessAnimation:r,onSuccess:()=>{p.markStepAsCompleted(p.progressBarState.activeStep)}}),me=V=>B(null,null,function*(){if(U)return;let be;F&&!d?be=yield X():be=yield O(V);const{errorMessage:Re}=be||{};Re?(u(Re),l(!1)):u(void 0)}),xe=F&&!d?P.readOnly:z,bo=V=>B(null,null,function*(){xe||(N?yield me(V):p.goNext())}),{immediateInvoice:Y,recurringInvoice:ge}=L||{},si=!!L&&(!!(Y!=null&&Y.proration)||!!L.hasScheduledUpdates),ci=!i&&!t&&!F,li=!!(ge!=null&&ge.discountDetails)&&!t,an=ci||li,ui=w.some(V=>V.pricingModel===b.BillingModel.UsageBased),on=ui&&!T&&w.every(V=>V.pricingModel===b.BillingModel.UsageBased),di=typeof g.summary.baseChargeText=="function"?g.summary.baseChargeText({billingPeriod:m.billingPeriod}):g.summary.baseChargeText;return o.jsxs(eo,{children:[o.jsxs(ri,{children:[o.jsx(P1,{variant:"h3",children:g.summary.title}),o.jsxs(R,{className:"stigg-checkout-summary-plan-title-container",display:"flex",flexDirection:"row",alignItems:"center",marginY:2,children:[o.jsx(C,{variant:"h6",color:"primary",style:{paddingRight:"8px"},children:g.summary.planName({plan:S})}),o.jsx(He,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})]}),T&&o.jsx(xn,{checkoutLocalization:g,label:di,quantity:1,price:T}),!T&&t?o.jsx(y1,{label:di}):null,o.jsx(R,{item:!0,className:"stigg-checkout-summary-usage-charges-container",children:w.map(V=>{var Re,et,tt,Pt,yi;const be=(Re=m.billableFeatures)==null?void 0:Re.find(Eo=>{var Ci;return Eo.featureId===((Ci=V.feature)==null?void 0:Ci.featureId)});return o.jsx(xn,{checkoutLocalization:g,label:ei(((et=V.feature)==null?void 0:et.displayName)||"",(tt=V.feature)==null?void 0:tt.units,(Pt=V.feature)==null?void 0:Pt.unitsPlural),quantity:(be==null?void 0:be.quantity)||1,price:V},(yi=V.feature)==null?void 0:yi.featureId)})}),!!((gi=m.addons)!=null&&gi.length)&&o.jsxs(o.Fragment,{children:[o.jsxs(R,{display:"flex",flexDirection:"row",alignItems:"center",marginY:2,children:[o.jsx(C,{variant:"h6",color:"primary",style:{paddingRight:"8px"},children:g.summary.addonsSectionTitle}),o.jsx(He,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})]}),m.addons.map(V=>{var et,tt;const be=(et=V.addon.pricePoints)==null?void 0:et.find(Pt=>Pt.billingPeriod===m.billingPeriod);if(!be)return null;const Re=V.quantity&&V.quantity>0?V.quantity:1;return o.jsx(xn,{checkoutLocalization:g,label:V.addon.displayName,quantity:Re,price:be},(tt=V==null?void 0:V.addon)==null?void 0:tt.id)})]}),!an&&o.jsx(He,{className:"stigg-checkout-summary-divider"}),an&&o.jsxs(R,{display:"flex",flexDirection:"row",alignItems:"center",marginY:2,children:[o.jsx(C,{variant:"h6",color:"primary",style:{paddingRight:"8px"},children:g.summary.discountsSectionTitle}),o.jsx(He,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})]}),ci&&o.jsx(kg,{disabled:xe||j,checkoutLocalization:g,onMockCheckoutPreview:a}),li&&L&&o.jsx(C1,{subscriptionPreview:L,isFetchingSubscriptionPreview:j,checkoutLocalization:g}),an&&o.jsx(He,{className:"stigg-checkout-summary-divider"}),o.jsx(E1,{tax:ge==null?void 0:ge.tax,taxDetails:ge==null?void 0:ge.taxDetails,isFetchingSubscriptionPreview:j,checkoutLocalization:g}),t?null:o.jsxs(o.Fragment,{children:[o.jsx(Ae,{style:{marginTop:16},children:o.jsxs(R,{display:"flex",flexDirection:"column",container:!0,children:[o.jsxs(R,{item:!0,display:"flex",justifyContent:"space-between",children:[o.jsx(C,{variant:"h6",children:g.summary.totalText}),o.jsx(C,{variant:"h6",children:o.jsxs(Ne,{isLoading:j,children:[on?g.summary.onlyPayAsYouGoText:null,!on&&ui?g.summary.startsAtText:null,on?null:re(_(I({amount:0},ge==null?void 0:ge.total),{minimumFractionDigits:2}))]})})]}),o.jsx(R,{item:!0,children:o.jsx(C,{variant:"body1",color:"secondary",children:g.summary.totalBillingPeriodText({billingPeriod:m.billingPeriod})})})]})}),o.jsx(He,{className:"stigg-checkout-summary-divider"})]}),(pi=Y==null?void 0:Y.proration)!=null&&pi.hasProrations&&(Y!=null&&Y.subTotal)&&(Y==null?void 0:Y.subTotal.amount)>0?o.jsx(je,{children:o.jsxs(Ae,{children:[o.jsx(C,{variant:"body1",color:"secondary",children:g.summary.proratedTotalDueText}),o.jsx(C,{variant:"body1",color:"secondary",children:o.jsx(Ne,{isLoading:j,children:re({amount:Number(((fi=Y==null?void 0:Y.subTotal)==null?void 0:fi.amount)||0)+Number(((hi=Y==null?void 0:Y.tax)==null?void 0:hi.amount)||0),currency:Y==null?void 0:Y.subTotal.currency,minimumFractionDigits:2})})})]})}):null,o.jsx(b1,{subscriptionPreview:L,isFetchingSubscriptionPreview:j,checkoutLocalization:g}),o.jsx(je,{children:o.jsxs(Ae,{children:[o.jsx(fr,{variant:"h6",children:g.summary.totalDueText}),o.jsx(fr,{variant:"h6",children:o.jsx(Ne,{isLoading:j,children:re(_(I({amount:0},Y==null?void 0:Y.total),{minimumFractionDigits:2}))})})]})}),o.jsx(u1,{plan:S,activeSubscription:v,subscriptionPreview:L,isFetchingSubscriptionPreview:j,checkoutLocalization:g,billingPeriod:m.billingPeriod}),(!N||!F||F&&!d)&&o.jsx(Le,{$success:U,$error:N&&t,disabled:xe||j||p.progressBarState.isDisabled||N&&!si,className:"stigg-checkout-summary-cta-button",sx:{textTransform:"none",borderRadius:"10px",marginTop:"24px",height:"36px"},variant:"contained",size:"medium",onClick:V=>{bo(V)},fullWidth:!0,children:o.jsx(C,{className:"stigg-checkout-summary-cta-button-text",variant:"h3",color:"white",style:{display:"flex"},children:U?o.jsx(fe,{icon:"Check",style:{display:"contents"}}):xe||j?o.jsx(Bn,{size:20,sx:{color:"white"}}):S1({isLastStep:N,checkoutHasChanges:si,isFreeDowngrade:t,checkoutLocalization:g,isPlanUpdate:!!v&&(v==null?void 0:v.plan.id)===(S==null?void 0:S.id)})})})]}),o.jsx(Ke,{source:"checkout",showWatermark:s,style:{marginTop:8,display:"flex",justifyContent:"center"}}),!r&&U&&o.jsx(e1,{checkoutLocalization:g})]})},v1=({showWatermark:e})=>o.jsxs(eo,{children:[o.jsxs(ri,{children:[o.jsxs(dt,{$flexDirection:"column",$gap:24,children:[o.jsx(te,{width:120,height:20}),o.jsx(te,{width:120,height:20}),o.jsx(te,{width:120,height:20}),o.jsx(te,{width:120,height:20})]}),o.jsxs(dt,{$flexDirection:"column",$gap:24,marginTop:5,children:[o.jsx(te,{height:20}),o.jsx(te,{height:20}),o.jsx(te,{height:20})]}),o.jsx(jn,{flex:1,marginTop:5,children:o.jsx(te,{height:34})})]}),o.jsx(Ke,{source:"checkout",showWatermark:e,style:{marginTop:8,display:"flex",justifyContent:"center"}})]}),x1=h(R)`
3058
3118
  width: 100%;
3059
3119
  gap: 8px;
3060
- `,qd=p(j)`
3120
+ `,I1=h(R)`
3061
3121
  display: flex;
3062
3122
  flex-direction: column;
3063
3123
  gap: 16px;
3064
3124
  width: 100%;
3065
3125
 
3066
- ${ge.md} {
3126
+ ${Se.md} {
3067
3127
  gap: 0;
3068
3128
  flex-direction: row;
3069
3129
  justify-content: space-between;
@@ -3072,51 +3132,51 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3072
3132
  padding-top: 16px;
3073
3133
  padding-bottom: 16px;
3074
3134
  }
3075
- `,Wd=p(Ie)`
3135
+ `,T1=h(Le)`
3076
3136
  min-width: unset;
3077
3137
  width: 41px;
3078
3138
  height: 41px;
3079
3139
  padding: 0;
3080
- `,Yd=Z.styled(Z.Grid)`
3140
+ `,A1=K.styled(K.Grid)`
3081
3141
  display: flex;
3082
3142
  flex-direction: row;
3083
3143
  align-items: center;
3084
3144
  width: 100%;
3085
3145
  justify-content: flex-end;
3086
- `;function Zd({addon:e,addonState:n,hasChanges:i,errorMessage:a,isPriceForBillingPeriodAvailable:t,checkoutLocalization:o,handleQuantityChange:s,handleUndo:c,handleRemoveAddon:l}){var h;const u=Ne("lg"),d=!!n;return r.jsxs(Yd,{item:!0,sx:{gap:"16px"},container:!u,children:[i&&r.jsx(Ie,{variant:"text",size:"small",sx:{padding:"8px",minWidth:"unset"},onClick:c,children:r.jsx(y,{color:"primary.main",variant:"body1",children:"Undo"})}),d&&r.jsxs(Z.Grid,{sx:{display:"flex",width:"100%"},children:[r.jsx(ht,{id:`${e.id}-input`,type:"number",onWheel:an,sx:u?{marginX:2,width:"100%"}:{flex:1},value:(h=n==null?void 0:n.quantity)!=null?h:"",error:!!a,helperText:a,FormHelperTextProps:{sx:{margin:"4px"}},onChange:m=>{var f,g;return s((f=m==null?void 0:m.target)!=null&&f.value?Number((g=m==null?void 0:m.target)==null?void 0:g.value):null)}}),r.jsx(Wd,{color:"error",onClick:l,children:r.jsx(ce,{icon:"Trash",style:{display:"flex",padding:"8px"}})})]}),!d&&r.jsx(Ie,{sx:{paddingX:"22px",paddingY:"8px"},onClick:()=>s(1),disabled:!t,children:r.jsx(y,{color:t?"primary.main":"disabled",variant:"body1",children:o.addAddonText})})]})}const zd=p(Z.Grid)`
3146
+ `;function k1({addon:e,addonState:n,hasChanges:i,errorMessage:r,isPriceForBillingPeriodAvailable:t,checkoutLocalization:a,handleQuantityChange:s,handleUndo:c,handleRemoveAddon:l}){var p;const u=Ge("lg"),d=!!n;return o.jsxs(A1,{item:!0,sx:{gap:"16px"},container:!u,children:[i&&o.jsx(Le,{variant:"text",size:"small",sx:{padding:"8px",minWidth:"unset"},onClick:c,children:o.jsx(C,{color:"primary.main",variant:"body1",children:"Undo"})}),d&&o.jsxs(K.Grid,{sx:{display:"flex",width:"100%"},children:[o.jsx(Kt,{id:`${e.id}-input`,type:"number",onWheel:Kn,sx:u?{marginX:2,width:"100%"}:{flex:1},value:(p=n==null?void 0:n.quantity)!=null?p:"",error:!!r,helperText:r,FormHelperTextProps:{sx:{margin:"4px"}},onChange:m=>{var f,g;return s((f=m==null?void 0:m.target)!=null&&f.value?Number((g=m==null?void 0:m.target)==null?void 0:g.value):null)}}),o.jsx(T1,{color:"error",onClick:l,children:o.jsx(fe,{icon:"Trash",style:{display:"flex",padding:"8px"}})})]}),!d&&o.jsx(Le,{sx:{paddingX:"22px",paddingY:"8px"},onClick:()=>s(1),disabled:!t,children:o.jsx(C,{color:t?"primary.main":"disabled",variant:"body1",children:a.addAddonText})})]})}const N1=h(K.Grid)`
3087
3147
  display: flex;
3088
3148
  flex-direction: column;
3089
3149
  justify-content: center;
3090
3150
  width: 100%;
3091
3151
  height: 42px;
3092
- `;function Kd({addon:e,billingPeriod:n,checkoutLocalization:i}){const a=e.pricePoints.find(t=>t.billingPeriod===n);return r.jsxs(zd,{item:!0,children:[r.jsx(y,{variant:"h6",lineHeight:"24px",children:e.displayName}),a?r.jsx(y,{variant:"body1",lineHeight:"20px",color:"secondary",children:`${ee({amount:a.amount,currency:a.currency,minimumFractionDigits:2})}/${n===P.BillingPeriod.Annually?"year":"month"}`}):r.jsx(y,{variant:"body1",lineHeight:"20px",color:"secondary",children:i.addonBillingPeriodNotAvailableText({planBillingPeriod:n})})]})}function Qd({addon:e,billingPeriod:n,addonState:i,initialAddonState:a,setAddon:t,removeAddon:o,checkoutLocalization:s,onAddonsValidationChange:c,onAddonChange:l}){const[u,d]=D.useState(void 0),h=!!i&&!!a&&i.quantity!==a.quantity||!!a&&!i,m=e.pricePoints.some(b=>b.billingPeriod===n),f=b=>B(null,null,function*(){if(!b||b<=0){c({addonId:e.id,isValid:!1}),d("Minimum 1"),t(e,b!=null?b:null);return}const E=yield l==null?void 0:l({addon:e,quantity:b});d(E==null?void 0:E.errorMessage),c({addonId:e.id,isValid:!(E!=null&&E.disableNextStep)}),t(e,b)}),g=()=>B(null,null,function*(){yield l==null?void 0:l({addon:e,quantity:0}),o(e.id),c({addonId:e.id,isValid:!0})}),x=()=>B(null,null,function*(){if(a){const b=yield l==null?void 0:l({addon:e,quantity:a.quantity});c({addonId:e.id,isValid:!(b!=null&&b.disableNextStep)}),t(e,a.quantity)}else yield g();c({addonId:e.id,isValid:!0})});return r.jsxs(qd,{children:[r.jsx(Kd,{addon:e,billingPeriod:n,checkoutLocalization:s}),r.jsx(Zd,{addon:e,addonState:i,hasChanges:h,handleUndo:x,errorMessage:u,handleQuantityChange:f,isPriceForBillingPeriodAvailable:m,checkoutLocalization:s,handleRemoveAddon:g})]})}function Xd({onAddonChange:e}){const{checkoutLocalization:n,setIsValid:i}=X(),{billingPeriod:a}=Re(),{setIsDisabled:t}=Je(),{initialAddons:o,addons:s,availableAddons:c,setAddon:l,removeAddon:u}=el(),[d,h]=D.useState((c==null?void 0:c.reduce((m,f)=>(m[f.id]=!0,m),{}))||{});return D.useEffect(()=>{const m=Object.values(d).some(f=>!f);t(m),i(!m)},[d,t,i]),r.jsx(Hd,{container:!0,children:c==null?void 0:c.map(m=>{const f=s.find(x=>x.addon.id===m.id),g=o==null?void 0:o.find(x=>x.addon.id===m.id);return r.jsx(Qd,{addon:m,billingPeriod:a,addonState:f,initialAddonState:g,setAddon:l,removeAddon:u,checkoutLocalization:n,onAddonsValidationChange:({addonId:x,isValid:b})=>h(O(T({},d),{[x]:b})),onAddonChange:e},m.id)})})}const Na=p(j)`
3152
+ `;function w1({addon:e,billingPeriod:n,checkoutLocalization:i}){const r=e.pricePoints.find(t=>t.billingPeriod===n);return o.jsxs(N1,{item:!0,children:[o.jsx(C,{variant:"h6",lineHeight:"24px",children:e.displayName}),r?o.jsx(C,{variant:"body1",lineHeight:"20px",color:"secondary",children:`${re({amount:r.amount,currency:r.currency,minimumFractionDigits:2})}/${n===b.BillingPeriod.Annually?"year":"month"}`}):o.jsx(C,{variant:"body1",lineHeight:"20px",color:"secondary",children:i.addonBillingPeriodNotAvailableText({planBillingPeriod:n})})]})}function F1({addon:e,billingPeriod:n,addonState:i,initialAddonState:r,setAddon:t,removeAddon:a,checkoutLocalization:s,onAddonsValidationChange:c,onAddonChange:l}){const[u,d]=D.useState(void 0),p=!!i&&!!r&&i.quantity!==r.quantity||!!r&&!i,m=e.pricePoints.some(P=>P.billingPeriod===n),f=P=>B(null,null,function*(){if(!P||P<=0){c({addonId:e.id,isValid:!1}),d("Minimum 1"),t(e,P!=null?P:null);return}const S=yield l==null?void 0:l({addon:e,quantity:P});d(S==null?void 0:S.errorMessage),c({addonId:e.id,isValid:!(S!=null&&S.disableNextStep)}),t(e,P)}),g=()=>B(null,null,function*(){yield l==null?void 0:l({addon:e,quantity:0}),a(e.id),c({addonId:e.id,isValid:!0})}),y=()=>B(null,null,function*(){if(r){const P=yield l==null?void 0:l({addon:e,quantity:r.quantity});c({addonId:e.id,isValid:!(P!=null&&P.disableNextStep)}),t(e,r.quantity)}else yield g();c({addonId:e.id,isValid:!0})});return o.jsxs(I1,{children:[o.jsx(w1,{addon:e,billingPeriod:n,checkoutLocalization:s}),o.jsx(k1,{addon:e,addonState:i,hasChanges:p,handleUndo:y,errorMessage:u,handleQuantityChange:f,isPriceForBillingPeriodAvailable:m,checkoutLocalization:s,handleRemoveAddon:g})]})}function j1({onAddonChange:e}){const{checkoutLocalization:n,setIsValid:i}=ne(),{billingPeriod:r}=Xe(),{setIsDisabled:t}=Et(),{initialAddons:a,addons:s,availableAddons:c,setAddon:l,removeAddon:u}=Ud(),[d,p]=D.useState((c==null?void 0:c.reduce((m,f)=>(m[f.id]=!0,m),{}))||{});return D.useEffect(()=>{const m=Object.values(d).some(f=>!f);t(m),i(!m)},[d,t,i]),o.jsx(x1,{container:!0,children:c==null?void 0:c.map(m=>{const f=s.find(y=>y.addon.id===m.id),g=a==null?void 0:a.find(y=>y.addon.id===m.id);return o.jsx(F1,{addon:m,billingPeriod:r,addonState:f,initialAddonState:g,setAddon:l,removeAddon:u,checkoutLocalization:n,onAddonsValidationChange:({addonId:y,isValid:P})=>p(_(I({},d),{[y]:P})),onAddonChange:e},m.id)})})}const to=h(R)`
3093
3153
  padding: 8px;
3094
3154
  border-radius: 10px;
3095
3155
  border: 1px solid ${({theme:e})=>e.stigg.palette.outlinedBorder};
3096
3156
  cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
3097
3157
  opacity: ${({$disabled:e})=>e?.6:1};
3098
- `,Jd=p(Na)`
3158
+ `,R1=h(to)`
3099
3159
  flex-direction: column;
3100
3160
  align-items: unset;
3101
- ${({$hideBorders:e})=>e&&ne.css`
3161
+ ${({$hideBorders:e})=>e&&Ie`
3102
3162
  border: none;
3103
3163
  padding: 0;
3104
3164
  `}
3105
- `,em=p(j)`
3165
+ `,M1=h(R)`
3106
3166
  display: flex;
3107
3167
  align-items: center;
3108
3168
  flex: 1;
3109
3169
  gap: 12px;
3110
- `,tm=p(j)`
3170
+ `,U1=h(R)`
3111
3171
  display: flex;
3112
3172
  flex-direction: column;
3113
- `,nm=p(z)`
3173
+ `,O1=h(Q)`
3114
3174
  position: relative;
3115
3175
  max-width: 500px;
3116
- `,im=p(z)`
3176
+ `,L1=h(Q)`
3117
3177
  opacity: ${({$showLoading:e})=>e?.6:1};
3118
3178
  pointer-events: ${({$showLoading:e})=>e?"none":"auto"};
3119
- `,am=p(z)`
3179
+ `,B1=h(Q)`
3120
3180
  position: absolute;
3121
3181
  top: 40px;
3122
3182
  left: 0;
@@ -3128,18 +3188,18 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3128
3188
  justify-content: center;
3129
3189
  border-radius: 4px;
3130
3190
  z-index: 10;
3131
- `,rm=p(z)`
3191
+ `,_1=h(Q)`
3132
3192
  display: flex;
3133
3193
  flex-direction: column;
3134
3194
  align-items: center;
3135
3195
  gap: 12px;
3136
- `;function om({onCheckout:e,onCheckoutCompleted:n}){var b,E,I;const{isZuoraIntegration:i,isInitialized:a,createPaymentSession:t}=dn(),{setErrorMessage:o}=we(),{billingCountryCode:s}=Re(),{checkoutState:c,widgetState:l}=X(),{handleZuoraSubmit:u}=va({onCheckout:e,onCheckoutCompleted:n}),d=D.useRef(!1),[h,m]=D.useState(!1),f=((I=(E=(b=c==null?void 0:c.plan)==null?void 0:b.pricePoints)==null?void 0:E[0])==null?void 0:I.currency)||P.Currency.Usd,{publishableKey:g}=c==null?void 0:c.billingIntegration.billingCredentials,x=D.useCallback(N=>B(null,null,function*(){var A;if(!N.success||!N.paymentMethodId){const F=((A=N.error)==null?void 0:A.message)||"Payment failed";o(F),yield n({success:!1,error:F});return}yield u(N.paymentMethodId)}),[u,o,n]);return D.useEffect(()=>(B(null,null,function*(){if(!(!a||d.current)){m(!0),o(void 0);try{d.current=!0;const A=window.Zuora(g),F=xd(t,x,f,s);(yield A.createPaymentForm(F)).mount("#zuora_payment")}catch(A){d.current=!1,o("Failed to render Zuora payment form")}finally{m(!1)}}}),()=>{d.current=!1}),[a]),i?r.jsxs(nm,{children:[r.jsx(im,{id:"zuora_payment",$showLoading:l.readOnly||h}),(l.readOnly||h)&&r.jsx(am,{children:r.jsx(rm,{children:r.jsx(Jt,{size:28})})})]}):null}function wa({checked:e,text:n,subtitle:i,readOnly:a}){return r.jsxs(em,{children:[r.jsx(yi,{checked:e,disabled:a}),r.jsxs(tm,{container:!0,children:[r.jsx(j,{item:!0,children:n}),i&&r.jsx(j,{item:!0,children:i})]})]})}function sm({checked:e,paymentMethodDetails:n,readOnly:i,onSelect:a}){if(!n)return null;const{last4Digits:t,expirationMonth:o,expirationYear:s}=n;return r.jsx(Na,{item:!0,onClick:a,$disabled:i,children:r.jsx(wa,{checked:e,readOnly:i,text:r.jsx(y,{variant:"h6",children:`Card ending in ${t}`}),subtitle:!!o&&!!s&&r.jsx(y,{variant:"body1",children:`Expires ${o.toString().padStart(2,"0")}/${s}`})})})}function cm({hasExistingPaymentMethod:e,checked:n,onSelect:i,readOnly:a,checkoutLocalization:t,onBillingAddressChange:o,collectPhoneNumber:s,onCheckout:c,onCheckoutCompleted:l}){const{isZuoraIntegration:u}=dn();return r.jsxs(Jd,{item:!0,$hideBorders:!e,onClick:i,$disabled:a,children:[e&&r.jsx(wa,{checked:n,readOnly:a,text:r.jsx(y,{variant:"h6",children:t.newPaymentMethodText})}),r.jsx(fi,{in:n,children:u?r.jsx(om,{onCheckout:c,onCheckoutCompleted:l}):r.jsx(zu,{onBillingAddressChange:o,collectPhoneNumber:s})})]})}const lm=p(j)`
3196
+ `;function $1({onCheckout:e,onCheckoutCompleted:n}){var P,S,v;const{isZuoraIntegration:i,isInitialized:r,createPaymentSession:t}=ii(),{setErrorMessage:a}=Ve(),{billingCountryCode:s}=Xe(),{checkoutState:c,widgetState:l}=ne(),{handleZuoraSubmit:u}=Xa({onCheckout:e,onCheckoutCompleted:n}),d=D.useRef(!1),[p,m]=D.useState(!1),f=((v=(S=(P=c==null?void 0:c.plan)==null?void 0:P.pricePoints)==null?void 0:S[0])==null?void 0:v.currency)||b.Currency.Usd,{publishableKey:g}=c==null?void 0:c.billingIntegration.billingCredentials,y=D.useCallback(A=>B(null,null,function*(){var k;if(!A.success||!A.paymentMethodId){const w=((k=A.error)==null?void 0:k.message)||"Payment failed";a(w),yield n({success:!1,error:w});return}yield u(A.paymentMethodId)}),[u,a,n]);return D.useEffect(()=>(B(null,null,function*(){if(!(!r||d.current)){m(!0),a(void 0);try{d.current=!0;const k=window.Zuora(g),w=a1(t,y,f,s);(yield k.createPaymentForm(w)).mount("#zuora_payment")}catch(k){d.current=!1,a("Failed to render Zuora payment form")}finally{m(!1)}}}),()=>{d.current=!1}),[r]),i?o.jsxs(O1,{children:[o.jsx(L1,{id:"zuora_payment",$showLoading:l.readOnly||p}),(l.readOnly||p)&&o.jsx(B1,{children:o.jsx(_1,{children:o.jsx(Bn,{size:28})})})]}):null}function no({checked:e,text:n,subtitle:i,readOnly:r}){return o.jsxs(M1,{children:[o.jsx(Ar,{checked:e,disabled:r}),o.jsxs(U1,{container:!0,children:[o.jsx(R,{item:!0,children:n}),i&&o.jsx(R,{item:!0,children:i})]})]})}function G1({checked:e,paymentMethodDetails:n,readOnly:i,onSelect:r}){if(!n)return null;const{last4Digits:t,expirationMonth:a,expirationYear:s}=n;return o.jsx(to,{item:!0,onClick:r,$disabled:i,children:o.jsx(no,{checked:e,readOnly:i,text:o.jsx(C,{variant:"h6",children:`Card ending in ${t}`}),subtitle:!!a&&!!s&&o.jsx(C,{variant:"body1",children:`Expires ${a.toString().padStart(2,"0")}/${s}`})})})}function V1({hasExistingPaymentMethod:e,checked:n,onSelect:i,readOnly:r,checkoutLocalization:t,onBillingAddressChange:a,collectPhoneNumber:s,onCheckout:c,onCheckoutCompleted:l}){const{isZuoraIntegration:u}=ii();return o.jsxs(R1,{item:!0,$hideBorders:!e,onClick:i,$disabled:r,children:[e&&o.jsx(no,{checked:n,readOnly:r,text:o.jsx(C,{variant:"h6",children:t.newPaymentMethodText})}),o.jsx(Ir,{in:n,children:u?o.jsx($1,{onCheckout:c,onCheckoutCompleted:l}):o.jsx(Ng,{onBillingAddressChange:a,collectPhoneNumber:s})})]})}const H1=h(R)`
3137
3197
  display: flex;
3138
3198
  flex-direction: column;
3139
3199
  gap: 24px;
3140
- `;function um({onBillingAddressChange:e,collectPhoneNumber:n,onCheckout:i,onCheckoutCompleted:a}){const{checkoutState:t,checkoutLocalization:o,widgetState:s}=X(),{customer:c}=t||{},{errorMessage:l,useNewPaymentMethod:u,setUseNewPaymentMethod:d}=we(),{readOnly:h}=s,m=f=>{h||d(f)};return r.jsxs(lm,{container:!0,children:[!!l&&r.jsx(hi,{severity:"error",sx:{alignItems:"center"},children:r.jsx(y,{overrideColor:"inherit",children:l})}),r.jsx(sm,{readOnly:h,checked:!u,paymentMethodDetails:c==null?void 0:c.paymentMethodDetails,onSelect:()=>m(!1)}),r.jsx(cm,{hasExistingPaymentMethod:!!(c!=null&&c.paymentMethodDetails),readOnly:h,checked:u,checkoutLocalization:o,onSelect:()=>m(!0),onBillingAddressChange:e,collectPhoneNumber:n,onCheckout:i,onCheckoutCompleted:a})]})}const Fa=({onClick:e,checkoutLocalization:n,size:i})=>r.jsx(be,{className:"stigg-checkout-change-plan-button",sx:{textTransform:"none"},variant:"text",size:i,onClick:e,children:r.jsx(y,{className:"stigg-checkout-change-plan-button-text",color:"primary.main",variant:"h3",style:{lineHeight:"24px"},children:n.changePlan})});function dm({allowChangePlan:e=!1,onChangePlan:n}){const{checkoutState:i,checkoutLocalization:a}=X(),{plan:t}=i||{};return r.jsxs(r.Fragment,{children:[r.jsxs(z,{sx:{marginBottom:"16px"},children:[r.jsx(y,{variant:"body1",color:"disabled",style:{opacity:.6,marginBottom:"8px"},children:"Selected plan"}),r.jsxs(z,{sx:{display:"flex",justifyContent:"space-between"},children:[r.jsx(y,{variant:"h1",children:t==null?void 0:t.displayName}),e&&n&&r.jsx(Fa,{onClick:()=>{n({currentPlan:t})},checkoutLocalization:a,size:"medium"})]})]}),r.jsx(je,{className:"stigg-checkout-plan-header-divider"})]})}function ai(e){switch(e){case P.BillingPeriod.Annually:return"Annual";case P.BillingPeriod.Monthly:return"Monthly";default:return""}}const mm=p(z)`
3200
+ `;function q1({onBillingAddressChange:e,collectPhoneNumber:n,onCheckout:i,onCheckoutCompleted:r}){const{checkoutState:t,checkoutLocalization:a,widgetState:s}=ne(),{customer:c}=t||{},{errorMessage:l,useNewPaymentMethod:u,setUseNewPaymentMethod:d}=Ve(),{readOnly:p}=s,m=f=>{p||d(f)};return o.jsxs(H1,{container:!0,children:[!!l&&o.jsx(Tr,{severity:"error",sx:{alignItems:"center"},children:o.jsx(C,{overrideColor:"inherit",children:l})}),o.jsx(G1,{readOnly:p,checked:!u,paymentMethodDetails:c==null?void 0:c.paymentMethodDetails,onSelect:()=>m(!1)}),o.jsx(V1,{hasExistingPaymentMethod:!!(c!=null&&c.paymentMethodDetails),readOnly:p,checked:u,checkoutLocalization:a,onSelect:()=>m(!0),onBillingAddressChange:e,collectPhoneNumber:n,onCheckout:i,onCheckoutCompleted:r})]})}const io=({onClick:e,checkoutLocalization:n,size:i})=>o.jsx(we,{className:"stigg-checkout-change-plan-button",sx:{textTransform:"none"},variant:"text",size:i,onClick:e,children:o.jsx(C,{className:"stigg-checkout-change-plan-button-text",color:"primary.main",variant:"h3",style:{lineHeight:"24px"},children:n.changePlan})});function W1({allowChangePlan:e=!1,onChangePlan:n}){const{checkoutState:i,checkoutLocalization:r}=ne(),{plan:t}=i||{};return o.jsxs(o.Fragment,{children:[o.jsxs(Q,{sx:{marginBottom:"16px"},children:[o.jsx(C,{variant:"body1",color:"disabled",style:{opacity:.6,marginBottom:"8px"},children:"Selected plan"}),o.jsxs(Q,{sx:{display:"flex",justifyContent:"space-between"},children:[o.jsx(C,{variant:"h1",children:t==null?void 0:t.displayName}),e&&n&&o.jsx(io,{onClick:()=>{n({currentPlan:t})},checkoutLocalization:r,size:"medium"})]})]}),o.jsx(We,{className:"stigg-checkout-plan-header-divider"})]})}function hr(e){switch(e){case b.BillingPeriod.Annually:return"Annual";case b.BillingPeriod.Monthly:return"Monthly";default:return""}}const Y1=h(Q)`
3141
3201
  margin: 16px 0;
3142
- `,gm=p.button`
3202
+ `,Z1=h.button`
3143
3203
  cursor: ${({$disabled:e,$isOnlyBillingPeriod:n})=>e||n?"default":"pointer"};
3144
3204
  flex: 1;
3145
3205
  display: flex;
@@ -3147,8 +3207,8 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3147
3207
  justify-content: flex-start;
3148
3208
  padding: 2px 8px;
3149
3209
  border-radius: 10px;
3150
- border: ${({theme:e,$isActive:n,$isOnlyBillingPeriod:i})=>{let a=e.stigg.palette.outlinedBorder;return i?a="transparent":n&&(a=e.stigg.palette.outlinedRestingBorder),`1px solid ${a}`}};
3151
- background: ${({theme:e,$isActive:n,$isOnlyBillingPeriod:i})=>i?"transparent":n?ae(e.stigg.palette.primary).alpha(.15).toString():"transparent"};
3210
+ border: ${({theme:e,$isActive:n,$isOnlyBillingPeriod:i})=>{let r=e.stigg.palette.outlinedBorder;return i?r="transparent":n&&(r=e.stigg.palette.outlinedRestingBorder),`1px solid ${r}`}};
3211
+ background: ${({theme:e,$isActive:n,$isOnlyBillingPeriod:i})=>i?"transparent":n?le(e.stigg.palette.primary).alpha(.15).toString():"transparent"};
3152
3212
  text-transform: none;
3153
3213
  text-align: start;
3154
3214
  height: 36px;
@@ -3159,67 +3219,67 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3159
3219
  background: none;
3160
3220
  }
3161
3221
  }
3162
- `,pm=p(z)`
3222
+ `,z1=h(Q)`
3163
3223
  display: flex;
3164
3224
  gap: 16px;
3165
3225
  margin-top: 16px;
3166
- `;p.div`
3226
+ `;h.div`
3167
3227
  display: flex;
3168
3228
  align-items: baseline;
3169
3229
  gap: 8px;
3170
- `;p(yr)`
3230
+ `;h(Vo)`
3171
3231
  & .MuiChip-label {
3172
3232
  font-size: 12px;
3173
3233
  }
3174
- `;const ri=({billingPeriod:e,isOnlyBillingPeriod:n})=>{const{billingPeriod:i,setBillingPeriod:a}=Re(),t=i===e;return r.jsxs(gm,{onClick:()=>a(e),$isActive:t,$isOnlyBillingPeriod:n,children:[r.jsx(yi,{checked:t,onChange:()=>a(e),value:e,disabled:n,inputProps:{"aria-label":ai(e)},sx:{padding:0,marginRight:"8px"}}),r.jsx(z,{children:r.jsx(y,{variant:"h3",color:"primary",children:ai(e)})})]})};function fm({plan:e,checkoutLocalization:n}){const[i,a]=K.partition(e==null?void 0:e.pricePoints,o=>o.billingPeriod===P.BillingPeriod.Monthly),t=!!(i!=null&&i.length)&&!!(a!=null&&a.length);return t?r.jsxs(mm,{children:[r.jsx(y,{variant:"h6",color:"primary",children:n.billingPeriodsTitle}),r.jsxs(pm,{children:[!!(i!=null&&i.length)&&r.jsx(ri,{billingPeriod:P.BillingPeriod.Monthly,isOnlyBillingPeriod:!t},P.BillingPeriod.Monthly),!!(a!=null&&a.length)&&r.jsx(ri,{billingPeriod:P.BillingPeriod.Annually,isOnlyBillingPeriod:!t},P.BillingPeriod.Annually)]})]}):null}const hm=p.div`
3234
+ `;const yr=({billingPeriod:e,isOnlyBillingPeriod:n})=>{const{billingPeriod:i,setBillingPeriod:r}=Xe(),t=i===e;return o.jsxs(Z1,{onClick:()=>r(e),$isActive:t,$isOnlyBillingPeriod:n,children:[o.jsx(Ar,{checked:t,onChange:()=>r(e),value:e,disabled:n,inputProps:{"aria-label":hr(e)},sx:{padding:0,marginRight:"8px"}}),o.jsx(Q,{children:o.jsx(C,{variant:"h3",color:"primary",children:hr(e)})})]})};function K1({plan:e,checkoutLocalization:n}){const[i,r]=ee.partition(e==null?void 0:e.pricePoints,a=>a.billingPeriod===b.BillingPeriod.Monthly),t=!!(i!=null&&i.length)&&!!(r!=null&&r.length);return t?o.jsxs(Y1,{children:[o.jsx(C,{variant:"h6",color:"primary",children:n.billingPeriodsTitle}),o.jsxs(z1,{children:[!!(i!=null&&i.length)&&o.jsx(yr,{billingPeriod:b.BillingPeriod.Monthly,isOnlyBillingPeriod:!t},b.BillingPeriod.Monthly),!!(r!=null&&r.length)&&o.jsx(yr,{billingPeriod:b.BillingPeriod.Annually,isOnlyBillingPeriod:!t},b.BillingPeriod.Annually)]})]}):null}const Q1=h.div`
3175
3235
  display: flex;
3176
3236
  min-height: 60px;
3177
3237
  margin-top: 16px;
3178
3238
  flex-direction: column;
3179
3239
 
3180
- ${ge.md} {
3240
+ ${Se.md} {
3181
3241
  flex-direction: row;
3182
3242
  align-items: flex-start;
3183
3243
  justify-content: space-between;
3184
3244
  }
3185
- `,ym=p(z)`
3245
+ `,X1=h(Q)`
3186
3246
  display: flex;
3187
3247
  flex-direction: column;
3188
3248
  justify-content: center;
3189
3249
  width: 100%;
3190
3250
  height: 42px;
3191
- `,Cm=p(y)`
3251
+ `,J1=h(C)`
3192
3252
  display: flex;
3193
3253
  align-items: center;
3194
3254
  justify-content: flex-end;
3195
3255
  width: 100%;
3196
3256
  min-height: 42px;
3197
- `,Pm=(e,n)=>{const{minUnitQuantity:i,maxUnitQuantity:a}=e;return!n||n<(i||1)?`Minimum ${i||1}`:a&&n>a?`Maximum ${a}`:""};function bm({charge:e,setBillableFeature:n,billableFeature:i,onValidationChange:a,onBillableFeatureChange:t}){var g,x,b,E,I,N;const[o,s]=D.useState(void 0),c=(g=e.feature)==null?void 0:g.featureId,l=!c,u=e.pricingModel===P.BillingModel.UsageBased,d=l?"Base charge":cn(((x=e.feature)==null?void 0:x.displayName)||"",(b=e.feature)==null?void 0:b.units,(E=e.feature)==null?void 0:E.unitsPlural),h=!!(e!=null&&e.minUnitQuantity||e!=null&&e.maxUnitQuantity),m=A=>B(null,null,function*(){var $,w;if(l||!c)return;const{minUnitQuantity:F,maxUnitQuantity:v}=e,U=($=A==null?void 0:A.target)!=null&&$.value?Number((w=A==null?void 0:A.target)==null?void 0:w.value):null;if(!U||U<=0||F&&U<F||v&&U>v){a({featureId:c,isValid:!1}),s(Pm(e,U!=null?U:void 0)),n(c,U!=null?U:null);return}const k=pa(e,U),L=yield t==null?void 0:t({feature:e.feature,quantity:k});s(L==null?void 0:L.errorMessage),a({featureId:c,isValid:!(L!=null&&L.disableNextStep)}),n(c,k)});let f;if(l||u)f=`${ee({amount:e.amount,currency:e.currency,locale:"en-us",minimumFractionDigits:2})}`,u&&(f+=" / unit");else if(e.isTieredPrice&&e.tiersMode&&c){const A=(i==null?void 0:i.quantity)||1;f=r.jsx(Ni,{componentId:`${c}-tiers`,tiers:e.tiers,tiersMode:e.tiersMode,value:A,errorMessage:o,handleChange:F=>B(null,null,function*(){const v=yield t==null?void 0:t({feature:e.feature,quantity:F});s(v==null?void 0:v.errorMessage),a({featureId:c,isValid:!(v!=null&&v.disableNextStep)}),n(c,F)}),width:"100%"})}else f=r.jsx(ht,{sx:{width:"100%"},id:`${c}-input`,type:"number",onWheel:an,error:!!o,helperText:o,FormHelperTextProps:{sx:{margin:"4px"}},value:(I=i==null?void 0:i.quantity)!=null?I:"",onChange:m});return r.jsxs(hm,{children:[r.jsxs(ym,{children:[r.jsx(y,{variant:"h6",color:"primary",lineHeight:"24px",children:d}),h&&r.jsx(y,{variant:"body1",color:"secondary",lineHeight:"20px",children:bi(e.minUnitQuantity,e.maxUnitQuantity,(N=e.feature)==null?void 0:N.unitsPlural)})]}),r.jsx(Cm,{variant:"h6",color:"primary",children:f})]})}function Em({plan:e,billingPeriod:n,onBillableFeatureChange:i}){var d;const{billableFeatures:a,setBillableFeature:t}=Re(),{setIsDisabled:o}=Je(),{setIsValid:s}=X(),c=Pa(((d=e==null?void 0:e.pricePoints)==null?void 0:d.filter(h=>h.billingPeriod===n))||[]),[l,u]=D.useState(c==null?void 0:c.reduce((h,m)=>{var f;return h[((f=m.feature)==null?void 0:f.featureId)||"base-charge"]=!0,h},{}));return D.useEffect(()=>{const h=Object.values(l).some(m=>!m);o(h),s(!h)},[l,o,s]),r.jsx(r.Fragment,{children:c==null?void 0:c.map(h=>{var f;const m=a.find(g=>{var x;return g.featureId===((x=h.feature)==null?void 0:x.featureId)});return r.jsx(bm,{charge:h,setBillableFeature:t,billableFeature:m,onValidationChange:({featureId:g,isValid:x})=>u(b=>O(T({},b),{[g]:x})),onBillableFeatureChange:i},((f=h.feature)==null?void 0:f.featureId)||"base-charge")})})}const Sm=p(z)`
3257
+ `,ep=(e,n)=>{const{minUnitQuantity:i,maxUnitQuantity:r}=e;return!n||n<(i||1)?`Minimum ${i||1}`:r&&n>r?`Maximum ${r}`:""};function tp({charge:e,setBillableFeature:n,billableFeature:i,onValidationChange:r,onBillableFeatureChange:t}){var g,y,P,S,v,A;const[a,s]=D.useState(void 0),c=(g=e.feature)==null?void 0:g.featureId,l=!c,u=e.pricingModel===b.BillingModel.UsageBased,d=l?"Base charge":ei(((y=e.feature)==null?void 0:y.displayName)||"",(P=e.feature)==null?void 0:P.units,(S=e.feature)==null?void 0:S.unitsPlural),p=!!(e!=null&&e.minUnitQuantity||e!=null&&e.maxUnitQuantity),m=k=>B(null,null,function*(){var L,j;if(l||!c)return;const{minUnitQuantity:w,maxUnitQuantity:T}=e,N=(L=k==null?void 0:k.target)!=null&&L.value?Number((j=k==null?void 0:k.target)==null?void 0:j.value):null;if(!N||N<=0||w&&N<w||T&&N>T){r({featureId:c,isValid:!1}),s(ep(e,N!=null?N:void 0)),n(c,N!=null?N:null);return}const F=Ba(e,N),U=yield t==null?void 0:t({feature:e.feature,quantity:F});s(U==null?void 0:U.errorMessage),r({featureId:c,isValid:!(U!=null&&U.disableNextStep)}),n(c,F)});let f;if(l||u)f=`${re({amount:e.amount,currency:e.currency,locale:"en-us",minimumFractionDigits:2})}`,u&&(f+=" / unit");else if(e.isTieredPrice&&e.tiersMode&&c){const k=(i==null?void 0:i.quantity)||1;f=o.jsx(ta,{componentId:`${c}-tiers`,tiers:e.tiers,tiersMode:e.tiersMode,value:k,errorMessage:a,handleChange:w=>B(null,null,function*(){const T=yield t==null?void 0:t({feature:e.feature,quantity:w});s(T==null?void 0:T.errorMessage),r({featureId:c,isValid:!(T!=null&&T.disableNextStep)}),n(c,w)}),width:"100%"})}else f=o.jsx(Kt,{sx:{width:"100%"},id:`${c}-input`,type:"number",onWheel:Kn,error:!!a,helperText:a,FormHelperTextProps:{sx:{margin:"4px"}},value:(v=i==null?void 0:i.quantity)!=null?v:"",onChange:m});return o.jsxs(Q1,{children:[o.jsxs(X1,{children:[o.jsx(C,{variant:"h6",color:"primary",lineHeight:"24px",children:d}),p&&o.jsx(C,{variant:"body1",color:"secondary",lineHeight:"20px",children:qr(e.minUnitQuantity,e.maxUnitQuantity,(A=e.feature)==null?void 0:A.unitsPlural)})]}),o.jsx(J1,{variant:"h6",color:"primary",children:f})]})}function np({plan:e,billingPeriod:n,onBillableFeatureChange:i}){var d;const{billableFeatures:r,setBillableFeature:t}=Xe(),{setIsDisabled:a}=Et(),{setIsValid:s}=ne(),c=Ha(((d=e==null?void 0:e.pricePoints)==null?void 0:d.filter(p=>p.billingPeriod===n))||[]),[l,u]=D.useState(c==null?void 0:c.reduce((p,m)=>{var f;return p[((f=m.feature)==null?void 0:f.featureId)||"base-charge"]=!0,p},{}));return D.useEffect(()=>{const p=Object.values(l).some(m=>!m);a(p),s(!p)},[l,a,s]),o.jsx(o.Fragment,{children:c==null?void 0:c.map(p=>{var f;const m=r.find(g=>{var y;return g.featureId===((y=p.feature)==null?void 0:y.featureId)});return o.jsx(tp,{charge:p,setBillableFeature:t,billableFeature:m,onValidationChange:({featureId:g,isValid:y})=>u(P=>_(I({},P),{[g]:y})),onBillableFeatureChange:i},((f=p.feature)==null?void 0:f.featureId)||"base-charge")})})}const ip=h(Q)`
3198
3258
  width: 100%;
3199
- `,Dm=({onChangePlan:e,onBillableFeatureChange:n})=>{const{checkoutState:i,checkoutLocalization:a}=X(),{plan:t}=i||{},{billingPeriod:o}=Re();return r.jsxs(r.Fragment,{children:[r.jsx(dm,{allowChangePlan:!0,onChangePlan:e}),r.jsxs(Sm,{children:[r.jsx(fm,{plan:t,checkoutLocalization:a}),r.jsx(Em,{plan:t,billingPeriod:o,onBillableFeatureChange:n})]})]})},xm=e=>C.createElement("svg",T({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),C.createElement("g",{id:"arrow-right"},C.createElement("path",{id:"Shape",d:"M2.66699 8H13.3337",stroke:"#7586B0",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{id:"Shape_2",d:"M9.33301 4L13.333 8L9.33301 12",stroke:"#7586B0",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}))),Tm=p(xm)`
3259
+ `,rp=({onChangePlan:e,onBillableFeatureChange:n})=>{const{checkoutState:i,checkoutLocalization:r}=ne(),{plan:t}=i||{},{billingPeriod:a}=Xe();return o.jsxs(o.Fragment,{children:[o.jsx(W1,{allowChangePlan:!0,onChangePlan:e}),o.jsxs(ip,{children:[o.jsx(K1,{plan:t,checkoutLocalization:r}),o.jsx(np,{plan:t,billingPeriod:a,onBillableFeatureChange:n})]})]})},ap=e=>E.createElement("svg",I({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"arrow-right"},E.createElement("path",{id:"Shape",d:"M2.66699 8H13.3337",stroke:"#7586B0",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{id:"Shape_2",d:"M9.33301 4L13.333 8L9.33301 12",stroke:"#7586B0",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}))),op=h(ap)`
3200
3260
  path {
3201
3261
  stroke: ${({theme:e})=>e.stigg.palette.text.secondary};
3202
3262
  }
3203
- `,Im=p(z)`
3263
+ `,sp=h(Q)`
3204
3264
  display: flex;
3205
- `,vm=p(hi)`
3265
+ `,cp=h(Tr)`
3206
3266
  margin-bottom: 16px;
3207
- `,Am=p(z)`
3267
+ `,lp=h(Q)`
3208
3268
  padding: 16px;
3209
3269
  border-radius: 10px;
3210
3270
  width: 100%;
3211
3271
  border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedBorder}`};
3212
- `,oi=({headerText:e,planName:n,priceText:i})=>r.jsxs(Am,{className:"stigg-checkout-downgrade-to-free-container",children:[r.jsx(y,{className:"stigg-checkout-downgrade-to-free-text-header",style:{opacity:.8},variant:"caption",color:"disabled",children:e}),r.jsx(y,{className:"stigg-checkout-downgrade-to-free-plan-name",bold:!0,variant:"h3",color:"primary",children:n}),r.jsx(y,{className:"stigg-checkout-downgrade-to-free-price-text",color:"secondary",children:i})]}),km=({checkoutLocalization:e,activeSubscription:n,freePlan:i,allowChangePlan:a=!1,onChangePlan:t})=>{let o;a&&t&&(o=r.jsx(Fa,{onClick:()=>{t({currentPlan:i})},checkoutLocalization:e,size:"small"}));const s=n.prices.length>0?n.prices[0].billingPeriod:void 0;return r.jsxs(r.Fragment,{children:[r.jsx(vm,{action:o,className:"stigg-checkout-downgrade-to-free-alert",severity:"info",children:r.jsx(y,{as:"span",color:"secondary",children:e.downgradeToFree.alertText({plan:n.plan})})}),r.jsxs(Im,{className:"stigg-checkout-downgrade-to-free-plans-container",children:[r.jsx(oi,{headerText:e.downgradeToFree.paidPlanHeader({plan:n.plan}),planName:e.downgradeToFree.paidPlanName({plan:n.plan}),priceText:e.downgradeToFree.paidPlanPriceText({plan:n.plan,billingPeriod:s})}),r.jsx(Tm,{className:"stigg-checkout-downgrade-to-free-arrow",style:{margin:"auto 16px",minWidth:"16px"}}),r.jsx(oi,{headerText:e.downgradeToFree.freePlanHeader({plan:i}),planName:e.downgradeToFree.freePlanName({plan:i}),priceText:e.downgradeToFree.freePlanPriceText({plan:i})})]})]})},Nm=(e,{onBillingAddressChange:n,onChangePlan:i,onBillableFeatureChange:a,onAddonChange:t,collectPhoneNumber:o,onCheckout:s,onCheckoutCompleted:c})=>{switch(e.key){case mt.PLAN:return{content:r.jsx(Dm,{onChangePlan:i,onBillableFeatureChange:a})};case mt.ADDONS:return{content:r.jsx(Xd,{onAddonChange:t})};case mt.PAYMENT:return{content:r.jsx(um,{onBillingAddressChange:n,collectPhoneNumber:o,onCheckout:s,onCheckoutCompleted:c})};default:return{content:null}}};function wm({onCheckout:e,onCheckoutCompleted:n,onChangePlan:i,onBillingAddressChange:a,onBillableFeatureChange:t,onAddonChange:o,collectPhoneNumber:s,disablePromotionCode:c,disableSuccessAnimation:l,onMockCheckoutPreview:u}){const{stripePromise:d,setupIntentClientSecret:h}=Ku(),[{stiggTheme:m,widgetState:f,theme:g,isWidgetWatermarkEnabled:x}]=H(),{currentStep:b}=Je(),{isLoadingCheckoutData:E}=f,{checkoutState:I,checkoutLocalization:N}=X(),{plan:A,activeSubscription:F}=I||{},v=!!A&&A.pricingType===P.PricingType.Free&&!!F&&F.pricingType!==P.PricingType.Free,{content:U}=Nm(b,{onBillingAddressChange:a,onChangePlan:i,onBillableFeatureChange:t,onAddonChange:o,collectPhoneNumber:s,onCheckout:e,onCheckoutCompleted:n}),k=r.jsx(r.Fragment,{children:v?r.jsx(km,{freePlan:A,activeSubscription:F,allowChangePlan:!0,checkoutLocalization:N,onChangePlan:i}):r.jsx(r.Fragment,{children:U})}),L=D.useMemo(()=>h?{clientSecret:h}:{mode:"setup",currency:"usd"},[h]);return r.jsx(He.Elements,{stripe:d,options:O(T({},L),{appearance:{theme:"stripe",variables:{colorText:m.palette.text.primary,colorPrimaryText:m.palette.text.primary,colorTextPlaceholder:m.palette.text.disabled,fontFamily:m.typography.fontFamily,colorBackground:g==null?void 0:g.paymentInputBackgroundColor,borderRadius:g==null?void 0:g.paymentInputBorderRadius},rules:g!=null&&g.paymentInputBorderColor?{".Input":{borderColor:g==null?void 0:g.paymentInputBorderColor}}:void 0}}),children:r.jsxs(ku,{className:"stigg-checkout-layout",children:[!v&&r.jsx(Mu,{}),r.jsxs(Nu,{children:[r.jsx(wu,{children:E?r.jsx(xo,{}):k}),E?r.jsx(Vd,{isWidgetWatermarkEnabled:x}):r.jsx(Gd,{disablePromotionCode:c,disableSuccessAnimation:l,onCheckout:e,onCheckoutCompleted:n,isFreeDowngrade:v,onMockCheckoutPreview:u,isWidgetWatermarkEnabled:x})]})]})},h)}const Fm=m=>{var f=m,{textOverrides:e,theme:n,resourceId:i,planId:a,preferredBillingPeriod:t,billingCountryCode:o,billableFeatures:s,billingInformation:c,onMockCheckoutState:l,skipCheckoutSteps:u,onBeforeStepChange:d}=f,h=ie(f,["textOverrides","theme","resourceId","planId","preferredBillingPeriod","billingCountryCode","billableFeatures","billingInformation","onMockCheckoutState","skipCheckoutSteps","onBeforeStepChange"]);return r.jsx(Au,{textOverrides:e,theme:n,resourceId:i,planId:a,preferredBillingPeriod:t,billingCountryCode:o,billableFeatures:s,billingInformation:c,onMockCheckoutState:l,skipCheckoutSteps:u,onBeforeStepChange:d,children:r.jsx(wm,T({},h))})};function jm(e){return D.useMemo(()=>new URLSearchParams(window.location.search).get(e),[e,window.location.search])}var ja=(e=>(e.IN_PROGRESS="IN_PROGRESS",e.SUCCEEDED="SUCCEEDED",e.FAILED="FAILED",e))(ja||{});const Um=({onProvisionStart:e,onProvisionSucceeded:n,onProvisionFailed:i}={})=>{const{stigg:a}=G(),[t,o]=D.useState("IN_PROGRESS"),[s,c]=D.useState(!1),l=jm("checkoutCompleted");return D.useEffect(()=>{B(null,null,function*(){if(!(!l||l.toLowerCase()==="false"||s)){c(!0),e&&e();try{const d=yield a.waitForCheckoutCompleted();o("SUCCEEDED"),n&&n(d)}catch(d){console.error("Failed to wait for checkout to complete",d),o("FAILED"),i&&i(d)}finally{c(!1)}}})},[a,l]),{isAwaitingCheckout:s,provisionStatus:t}};function Mm(a){var t=a,{noAccessComponent:e,children:n}=t,i=ie(t,["noAccessComponent","children"]);const{hasAccess:o}=Ea(i);return o?n:r.jsx(r.Fragment,{children:e!=null?e:null})}function Rm(a){var t=a,{noAccessComponent:e,children:n}=t,i=ie(t,["noAccessComponent","children"]);const{hasAccess:o}=Sa(i);return o?n:r.jsx(r.Fragment,{children:e!=null?e:null})}function Lm(a){var t=a,{noAccessComponent:e,children:n}=t,i=ie(t,["noAccessComponent","children"]);const{hasAccess:o}=Da(i);return o?n:r.jsx(r.Fragment,{children:e!=null?e:null})}function Bm(a){var t=a,{noAccessComponent:e,children:n}=t,i=ie(t,["noAccessComponent","children"]);const{hasAccess:o}=xa(i);return o?n:r.jsx(r.Fragment,{children:e!=null?e:null})}function gn(e){const n=G(),i=n==null?void 0:n.stigg,a=n==null?void 0:n.updatedAt,t=D.useCallback(()=>B(null,null,function*(){if(!i||!i.isCustomerLoaded)return null;try{const l={currencyId:e.currencyId},u=yield i.getCreditBalance(l);if(u.balances&&u.balances.length>0){const{currentBalance:d,totalConsumed:h,totalGranted:m,currency:{currencyId:f,displayName:g,units:x,symbol:b}}=u.balances[0];return{currentBalance:d,totalConsumed:h,totalGranted:m,currencyId:f,displayName:g,units:x,symbol:b}}return{currencyId:e.currencyId,currentBalance:0,totalConsumed:0,totalGranted:0}}catch(l){throw console.error(l),l}}),[i,e.currencyId,a]),{data:o,error:s,isLoading:c}=Le({func:t});return D.useMemo(()=>({balance:o,isLoading:c,error:s}),[o,s,c])}const Ve=(e,n)=>e?se(e,{maximumFractionDigits:n!=null?n:void 0}):0,Ua=(e,n=!0,i=!1)=>{const{currentBalance:a,displayName:t,units:o,symbol:s}=e,c=i&&s,l=o?a===1?o.singular:o.plural:t;return[c,n?l:""].filter(Boolean).join(" ")},Om=(e,n)=>n===0?0:Math.min(e/n*100,100),$m=p.div`
3272
+ `,Cr=({headerText:e,planName:n,priceText:i})=>o.jsxs(lp,{className:"stigg-checkout-downgrade-to-free-container",children:[o.jsx(C,{className:"stigg-checkout-downgrade-to-free-text-header",style:{opacity:.8},variant:"caption",color:"disabled",children:e}),o.jsx(C,{className:"stigg-checkout-downgrade-to-free-plan-name",bold:!0,variant:"h3",color:"primary",children:n}),o.jsx(C,{className:"stigg-checkout-downgrade-to-free-price-text",color:"secondary",children:i})]}),up=({checkoutLocalization:e,activeSubscription:n,freePlan:i,allowChangePlan:r=!1,onChangePlan:t})=>{let a;r&&t&&(a=o.jsx(io,{onClick:()=>{t({currentPlan:i})},checkoutLocalization:e,size:"small"}));const s=n.prices.length>0?n.prices[0].billingPeriod:void 0;return o.jsxs(o.Fragment,{children:[o.jsx(cp,{action:a,className:"stigg-checkout-downgrade-to-free-alert",severity:"info",children:o.jsx(C,{as:"span",color:"secondary",children:e.downgradeToFree.alertText({plan:n.plan})})}),o.jsxs(sp,{className:"stigg-checkout-downgrade-to-free-plans-container",children:[o.jsx(Cr,{headerText:e.downgradeToFree.paidPlanHeader({plan:n.plan}),planName:e.downgradeToFree.paidPlanName({plan:n.plan}),priceText:e.downgradeToFree.paidPlanPriceText({plan:n.plan,billingPeriod:s})}),o.jsx(op,{className:"stigg-checkout-downgrade-to-free-arrow",style:{margin:"auto 16px",minWidth:"16px"}}),o.jsx(Cr,{headerText:e.downgradeToFree.freePlanHeader({plan:i}),planName:e.downgradeToFree.freePlanName({plan:i}),priceText:e.downgradeToFree.freePlanPriceText({plan:i})})]})]})},dp=(e,{onBillingAddressChange:n,onChangePlan:i,onBillableFeatureChange:r,onAddonChange:t,collectPhoneNumber:a,onCheckout:s,onCheckoutCompleted:c})=>{switch(e.key){case Te.PLAN:return{content:o.jsx(rp,{onChangePlan:i,onBillableFeatureChange:r})};case Te.ADDONS:return{content:o.jsx(j1,{onAddonChange:t})};case Te.PAYMENT:return{content:o.jsx(q1,{onBillingAddressChange:n,collectPhoneNumber:a,onCheckout:s,onCheckoutCompleted:c})};default:return{content:null}}};function mp({onCheckout:e,onCheckoutCompleted:n,onChangePlan:i,onBillingAddressChange:r,onBillableFeatureChange:t,onAddonChange:a,collectPhoneNumber:s,disablePromotionCode:c,disableSuccessAnimation:l,onMockCheckoutPreview:u}){const{stripePromise:d,setupIntentClientSecret:p}=wg(),[{stiggTheme:m,widgetState:f,theme:g,showWatermark:y}]=W(),{currentStep:P}=Et(),{isLoadingCheckoutData:S}=f,{checkoutState:v,checkoutLocalization:A}=ne(),{plan:k,activeSubscription:w}=v||{},T=!!k&&k.pricingType===b.PricingType.Free&&!!w&&w.pricingType!==b.PricingType.Free,{content:N}=dp(P,{onBillingAddressChange:r,onChangePlan:i,onBillableFeatureChange:t,onAddonChange:a,collectPhoneNumber:s,onCheckout:e,onCheckoutCompleted:n}),F=o.jsx(o.Fragment,{children:T?o.jsx(up,{freePlan:k,activeSubscription:w,allowChangePlan:!0,checkoutLocalization:A,onChangePlan:i}):o.jsx(o.Fragment,{children:N})}),U=D.useMemo(()=>p?{clientSecret:p}:{mode:"setup",currency:"usd"},[p]);return o.jsx(st.Elements,{stripe:d,options:_(I({},U),{appearance:{theme:"stripe",variables:{colorText:m.palette.text.primary,colorPrimaryText:m.palette.text.primary,colorTextPlaceholder:m.palette.text.disabled,fontFamily:m.typography.fontFamily,colorBackground:g==null?void 0:g.paymentInputBackgroundColor,borderRadius:g==null?void 0:g.paymentInputBorderRadius},rules:g!=null&&g.paymentInputBorderColor?{".Input":{borderColor:g==null?void 0:g.paymentInputBorderColor}}:void 0}}),children:o.jsxs(ug,{className:"stigg-checkout-layout",children:[!T&&o.jsx(hg,{}),o.jsxs(dg,{children:[o.jsx(mg,{children:S?o.jsx(ol,{}):F}),S?o.jsx(v1,{showWatermark:y}):o.jsx(D1,{disablePromotionCode:c,disableSuccessAnimation:l,onCheckout:e,onCheckoutCompleted:n,isFreeDowngrade:T,onMockCheckoutPreview:u,showWatermark:y})]})]})},p)}const gp=m=>{var f=m,{textOverrides:e,theme:n,resourceId:i,planId:r,preferredBillingPeriod:t,billingCountryCode:a,billableFeatures:s,billingInformation:c,onMockCheckoutState:l,skipCheckoutSteps:u,onBeforeStepChange:d}=f,p=se(f,["textOverrides","theme","resourceId","planId","preferredBillingPeriod","billingCountryCode","billableFeatures","billingInformation","onMockCheckoutState","skipCheckoutSteps","onBeforeStepChange"]);return o.jsx(lg,{textOverrides:e,theme:n,resourceId:i,planId:r,preferredBillingPeriod:t,billingCountryCode:a,billableFeatures:s,billingInformation:c,onMockCheckoutState:l,skipCheckoutSteps:u,onBeforeStepChange:d,children:o.jsx(mp,I({},p))})};function pp(e){return D.useMemo(()=>new URLSearchParams(window.location.search).get(e),[e,window.location.search])}var ro=(e=>(e.IN_PROGRESS="IN_PROGRESS",e.SUCCEEDED="SUCCEEDED",e.FAILED="FAILED",e))(ro||{});const fp=({onProvisionStart:e,onProvisionSucceeded:n,onProvisionFailed:i}={})=>{const{stigg:r}=q(),[t,a]=D.useState("IN_PROGRESS"),[s,c]=D.useState(!1),l=pp("checkoutCompleted");return D.useEffect(()=>{B(null,null,function*(){if(!(!l||l.toLowerCase()==="false"||s)){c(!0),e&&e();try{const d=yield r.waitForCheckoutCompleted();a("SUCCEEDED"),n&&n(d)}catch(d){console.error("Failed to wait for checkout to complete",d),a("FAILED"),i&&i(d)}finally{c(!1)}}})},[r,l]),{isAwaitingCheckout:s,provisionStatus:t}};function hp(r){var t=r,{noAccessComponent:e,children:n}=t,i=se(t,["noAccessComponent","children"]);const{hasAccess:a}=Wa(i);return a?n:o.jsx(o.Fragment,{children:e!=null?e:null})}function yp(r){var t=r,{noAccessComponent:e,children:n}=t,i=se(t,["noAccessComponent","children"]);const{hasAccess:a}=Ya(i);return a?n:o.jsx(o.Fragment,{children:e!=null?e:null})}function Cp(r){var t=r,{noAccessComponent:e,children:n}=t,i=se(t,["noAccessComponent","children"]);const{hasAccess:a}=Za(i);return a?n:o.jsx(o.Fragment,{children:e!=null?e:null})}function bp(r){var t=r,{noAccessComponent:e,children:n}=t,i=se(t,["noAccessComponent","children"]);const{hasAccess:a}=za(i);return a?n:o.jsx(o.Fragment,{children:e!=null?e:null})}function ai(e){const n=q(),i=n==null?void 0:n.stigg,r=n==null?void 0:n.updatedAt,t=D.useCallback(()=>B(null,null,function*(){if(!i||!i.isCustomerLoaded)return null;try{const l={currencyId:e.currencyId},u=yield i.getCreditBalance(l);if(u.balances&&u.balances.length>0){const{currentBalance:d,totalConsumed:p,totalGranted:m,currency:{currencyId:f,displayName:g,units:y,symbol:P}}=u.balances[0];return{currentBalance:d,totalConsumed:p,totalGranted:m,currencyId:f,displayName:g,units:y,symbol:P}}return{currencyId:e.currencyId,currentBalance:0,totalConsumed:0,totalGranted:0}}catch(l){throw console.error(l),l}}),[i,e.currencyId,r]),{data:a,error:s,isLoading:c}=Je({func:t});return D.useMemo(()=>({balance:a,isLoading:c,error:s}),[a,s,c])}const ot=(e,n)=>e?pe(e,{maximumFractionDigits:n!=null?n:void 0}):0,ao=(e,n=!0,i=!1)=>{const{currentBalance:r,displayName:t,units:a,symbol:s}=e,c=i&&s,l=a?r===1?a.singular:a.plural:t;return[c,n?l:""].filter(Boolean).join(" ")},Ep=(e,n)=>n===0?0:Math.min(e/n*100,100),Pp=h.div`
3213
3273
  display: flex;
3214
3274
  flex-direction: row;
3215
3275
  gap: 4px;
3216
3276
  align-items: baseline;
3217
- `;function _m({currencyId:e,decimalPlaces:n=null,showUnits:i=!0,showSymbol:a=!1}){const{balance:t,isLoading:o,error:s}=gn({currencyId:e});if(s)return r.jsx(y,{variant:"body1",color:"error",className:"stigg-credit-balance-value-error",children:s.message||"Failed to load balance"});if(o)return r.jsx(V,{width:120,height:24,className:"stigg-credit-balance-value-loading"});if(t){const c=Ua(t,i,a);return r.jsxs($m,{children:[r.jsx(y,{variant:"h3",color:"primary",bold:!0,className:"stigg-credit-balance-value-amount",children:Ve(t.currentBalance,n)}),r.jsx(y,{variant:"caption",color:"secondary",className:"stigg-credit-balance-value-suffix",children:c})]})}return r.jsx(y,{variant:"body1",color:"disabled",className:"stigg-credit-balance-value-no-balance",children:"No balance data available"})}const Gm={title:"Credit balance"},Ma={title:"Credit utilization",remaining:"Remaining"},Vm={receivedAt:"Received",effectiveAt:"Effective At",grantType:"Grant Type",status:"State",balance:"Balance",expiryDate:"Expires",emptyState:"No credit grants found",loadingState:"Loading credit grants...",errorState:"Failed to load credit grants"},Hm={title:"Usage",totalSpend:"Total spend"},qm=p.div`
3277
+ `;function Sp({currencyId:e,decimalPlaces:n=null,showUnits:i=!0,showSymbol:r=!1}){const{balance:t,isLoading:a,error:s}=ai({currencyId:e});if(s)return o.jsx(C,{variant:"body1",color:"error",className:"stigg-credit-balance-value-error",children:s.message||"Failed to load balance"});if(a)return o.jsx(H,{width:120,height:24,className:"stigg-credit-balance-value-loading"});if(t){const c=ao(t,i,r);return o.jsxs(Pp,{children:[o.jsx(C,{variant:"h3",color:"primary",bold:!0,className:"stigg-credit-balance-value-amount",children:ot(t.currentBalance,n)}),o.jsx(C,{variant:"caption",color:"secondary",className:"stigg-credit-balance-value-suffix",children:c})]})}return o.jsx(C,{variant:"body1",color:"disabled",className:"stigg-credit-balance-value-no-balance",children:"No balance data available"})}const Dp={title:"Credit balance"},oo={title:"Credit utilization",remaining:"Remaining"},vp={receivedAt:"Received",effectiveAt:"Effective At",grantType:"Grant Type",status:"State",balance:"Balance",expiryDate:"Expires",emptyState:"No credit grants found",loadingState:"Loading credit grants...",errorState:"Failed to load credit grants"},xp={title:"Usage",totalSpend:"Total spend"},Ip=h.div`
3218
3278
  display: flex;
3219
3279
  flex-direction: column;
3220
3280
  gap: 8px;
3221
3281
  width: 100%;
3222
- `,Wm=p.div`
3282
+ `,Tp=h.div`
3223
3283
  display: flex;
3224
3284
  flex-direction: column;
3225
3285
  gap: 8px;
@@ -3227,9 +3287,9 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3227
3287
  border-radius: 8px;
3228
3288
  border: 1px solid ${({theme:e})=>{var n,i;return(i=(n=e.stigg)==null?void 0:n.palette)==null?void 0:i.outlinedBorder}};
3229
3289
  background-color: ${({theme:e})=>{var n,i;return(i=(n=e==null?void 0:e.stigg)==null?void 0:n.palette)==null?void 0:i.backgroundPaper}};
3230
- `;function Ym({currencyId:e,localization:n,decimalPlaces:i,showUnits:a=!0,showSymbol:t=!1}){var d;const o=rn(Me),s=G({optional:!0}),c=s==null?void 0:s.theme,l=(d=n==null?void 0:n.title)!=null?d:Gm.title,u=r.jsx(qm,{className:"stigg-credit-balance-container",children:r.jsxs(Wm,{className:"stigg-credit-balance-card",children:[r.jsx(y,{variant:"h6",color:"primary",className:"stigg-credit-balance-title",children:l}),r.jsx(_m,{currencyId:e,decimalPlaces:i,showUnits:a,showSymbol:t})]})});return o?u:r.jsx(ke,{componentTheme:c,children:u})}const Zm=[le.CategoryScale,le.LinearScale,le.BarElement,le.Title,le.Tooltip,le.Legend,Cr,le.PointElement,le.LineElement,le.Filler,le.ArcElement,Pr,br];le.Chart.register(...Zm);function Ra(e){const n=G(),i=n==null?void 0:n.stigg,a=n==null?void 0:n.updatedAt,t=D.useCallback(()=>B(null,null,function*(){if(!i||!i.isCustomerLoaded)return null;try{const l={currencyId:e.currencyId,timeRange:e.timeRange};return yield i.getCreditUsage(l)}catch(l){throw console.error(l),l}}),[i,e.currencyId,e.timeRange,a]),{data:o,error:s,isLoading:c}=Le({func:t});return D.useMemo(()=>({creditUsage:o,isLoading:c,error:s}),[o,s,c])}const zm={id:"redrawBeforeFirstDrawPlugin",beforeDraw(e){e.$rendered||(e.$rendered=!0,e.update("none"))}},La=(e,n=1)=>{const i=Math.round(n*255).toString(16).padStart(2,"0");return`${e}${i}`},si=e=>e.palette.text.secondary,ci=e=>e.palette.outlinedBorder,li=e=>({family:e.typography.fontFamily,size:parseInt(e.typography.body.fontSize)});function Ba(e){const n=["#4caf50","#2196f3","#ff5722","#ff9800","#e91e63","#3f51b5","#00bcd4","#81c784","#64b5f6","#ff8a65","#ffb74d","#f06292","#7986cb","#4dd0e1","#a5d6a7","#90caf9","#ffab91","#ffcc80","#f48fb1","#9fa8da","#80deea"];return n[e%n.length]}function Km(e){const n=[],i=new Date;switch(e){case P.CreditUsageTimeRange.LastDay:{const a=new Date(i);a.setHours(a.getHours()-23),a.setMinutes(0,0,0);for(let t=0;t<24;t++){const o=new Date(a);o.setHours(o.getHours()+t),n.push(o.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}))}break}case P.CreditUsageTimeRange.LastWeek:{for(let a=6;a>=0;a--){const t=new Date(i);t.setDate(t.getDate()-a),n.push(t.toLocaleDateString("en-US",{month:"short",day:"2-digit"}))}break}case P.CreditUsageTimeRange.LastYear:{for(let a=11;a>=0;a--){const t=new Date(i);t.setMonth(t.getMonth()-a),n.push(t.toLocaleDateString("en-US",{month:"short",year:"2-digit"}))}break}case P.CreditUsageTimeRange.LastMonth:default:{for(let a=29;a>=0;a--){const t=new Date(i);t.setDate(t.getDate()-a),n.push(t.toLocaleDateString("en-US",{month:"short",day:"2-digit"}))}break}}return n}function Qm(e,n){const i=new Date(e);switch(i.setMinutes(0,0,0),n){case P.CreditUsageTimeRange.LastDay:return i.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});case P.CreditUsageTimeRange.LastYear:return e.toLocaleDateString("en-US",{month:"short",year:"2-digit"});case P.CreditUsageTimeRange.LastWeek:case P.CreditUsageTimeRange.LastMonth:default:return e.toLocaleDateString("en-US",{month:"short",day:"2-digit"})}}function Xm(e,n){return{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"point",intersect:!0},elements:{bar:{borderRadius:4,borderSkipped:"bottom"}},plugins:{legend:{display:!1},tooltip:{enabled:!1,external:n},datalabels:{display:!1}},scales:{x:{type:"category",stacked:!0,ticks:{color:si(e),font:li(e),maxRotation:45,maxTicksLimit:15},grid:{color:ci(e),drawOnChartArea:!1,drawTicks:!1}},y:{type:"linear",stacked:!0,beginAtZero:!0,ticks:{color:si(e),font:li(e),callback:i=>se(Number(i))},grid:{color:La(ci(e),.5),drawOnChartArea:!0,drawTicks:!1,borderDash:[5,5]}}}}}function Jm(e,n,i,a){const t=Km(a);if(!e||!e.series||e.series.length===0)return{data:null,options:null};const o=e.series.map((l,u)=>{const d=l.featureName,h=new Map;l.points.forEach(g=>{const x=Qm(new Date(g.timestamp),a),b=h.get(x)||0;h.set(x,b+g.value)});const m=t.map(g=>h.get(g)||0),f=Ba(u);return{label:d,data:m,backgroundColor:La(f,.8),borderColor:f,borderWidth:1}}).reverse(),s={labels:t,datasets:o},c=Xm(n,i);return{data:s,options:c}}const eg=300;function tg(e,n){const i=n.dataPoints[0],a=i.parsed.y,t=e.scales.y,o=a/t.max*(t.bottom-t.top),s=n.caretY+o/2,c=e.getDatasetMeta(i.datasetIndex).data[i.dataIndex],l=c.x-c.width/2,u=e.canvas.offsetTop+s,d=e.canvas.offsetLeft+l;return{top:u,left:d}}function ng(e,n){const i=e.canvas.offsetTop+n.caretY,a=e.canvas.offsetLeft+n.caretX;return{top:i,left:a}}function ig(e,n=ng){const[i,a]=D.useState(0),[t,o]=D.useState(0),[s,c]=D.useState(!1),[l,u]=D.useState(),d=D.useCallback(m=>{const{chart:f,tooltip:g}=m;if(g.opacity===0){c(!1);return}const{top:x,left:b}=n(f,g);o(b),a(x),u(e(g)),c(!0)},[e,n]);return{tooltipInfo:{positionTop:i,positionLeft:t,isOpen:s,payload:l},tooltipHandler:d}}const ag=p(Z.Box)`
3290
+ `;function Ap({currencyId:e,localization:n,decimalPlaces:i,showUnits:r=!0,showSymbol:t=!1}){var d;const a=Qn(Qe),s=q({optional:!0}),c=s==null?void 0:s.theme,l=(d=n==null?void 0:n.title)!=null?d:Dp.title,u=o.jsx(Ip,{className:"stigg-credit-balance-container",children:o.jsxs(Tp,{className:"stigg-credit-balance-card",children:[o.jsx(C,{variant:"h6",color:"primary",className:"stigg-credit-balance-title",children:l}),o.jsx(Sp,{currencyId:e,decimalPlaces:i,showUnits:r,showSymbol:t})]})});return a?u:o.jsx($e,{componentTheme:c,children:u})}const kp=[he.CategoryScale,he.LinearScale,he.BarElement,he.Title,he.Tooltip,he.Legend,Ho,he.PointElement,he.LineElement,he.Filler,he.ArcElement,qo,Wo];he.Chart.register(...kp);function so(e){const n=q(),i=n==null?void 0:n.stigg,r=n==null?void 0:n.updatedAt,t=D.useCallback(()=>B(null,null,function*(){if(!i||!i.isCustomerLoaded)return null;try{const l={currencyId:e.currencyId,timeRange:e.timeRange};return yield i.getCreditUsage(l)}catch(l){throw console.error(l),l}}),[i,e.currencyId,e.timeRange,r]),{data:a,error:s,isLoading:c}=Je({func:t});return D.useMemo(()=>({creditUsage:a,isLoading:c,error:s}),[a,s,c])}const Np={id:"redrawBeforeFirstDrawPlugin",beforeDraw(e){e.$rendered||(e.$rendered=!0,e.update("none"))}},co=(e,n=1)=>{const i=Math.round(n*255).toString(16).padStart(2,"0");return`${e}${i}`},br=e=>e.palette.text.secondary,Er=e=>e.palette.outlinedBorder,Pr=e=>({family:e.typography.fontFamily,size:parseInt(e.typography.body.fontSize)});function lo(e){const n=["#4caf50","#2196f3","#ff5722","#ff9800","#e91e63","#3f51b5","#00bcd4","#81c784","#64b5f6","#ff8a65","#ffb74d","#f06292","#7986cb","#4dd0e1","#a5d6a7","#90caf9","#ffab91","#ffcc80","#f48fb1","#9fa8da","#80deea"];return n[e%n.length]}function wp(e){const n=[],i=new Date;switch(e){case b.CreditUsageTimeRange.LastDay:{const r=new Date(i);r.setHours(r.getHours()-23),r.setMinutes(0,0,0);for(let t=0;t<24;t++){const a=new Date(r);a.setHours(a.getHours()+t),n.push(a.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}))}break}case b.CreditUsageTimeRange.LastWeek:{for(let r=6;r>=0;r--){const t=new Date(i);t.setDate(t.getDate()-r),n.push(t.toLocaleDateString("en-US",{month:"short",day:"2-digit"}))}break}case b.CreditUsageTimeRange.LastYear:{for(let r=11;r>=0;r--){const t=new Date(i);t.setMonth(t.getMonth()-r),n.push(t.toLocaleDateString("en-US",{month:"short",year:"2-digit"}))}break}case b.CreditUsageTimeRange.LastMonth:default:{for(let r=29;r>=0;r--){const t=new Date(i);t.setDate(t.getDate()-r),n.push(t.toLocaleDateString("en-US",{month:"short",day:"2-digit"}))}break}}return n}function Fp(e,n){const i=new Date(e);switch(i.setMinutes(0,0,0),n){case b.CreditUsageTimeRange.LastDay:return i.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});case b.CreditUsageTimeRange.LastYear:return e.toLocaleDateString("en-US",{month:"short",year:"2-digit"});case b.CreditUsageTimeRange.LastWeek:case b.CreditUsageTimeRange.LastMonth:default:return e.toLocaleDateString("en-US",{month:"short",day:"2-digit"})}}function jp(e,n){return{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"point",intersect:!0},elements:{bar:{borderRadius:4,borderSkipped:"bottom"}},plugins:{legend:{display:!1},tooltip:{enabled:!1,external:n},datalabels:{display:!1}},scales:{x:{type:"category",stacked:!0,ticks:{color:br(e),font:Pr(e),maxRotation:45,maxTicksLimit:15},grid:{color:Er(e),drawOnChartArea:!1,drawTicks:!1}},y:{type:"linear",stacked:!0,beginAtZero:!0,ticks:{color:br(e),font:Pr(e),callback:i=>pe(Number(i))},grid:{color:co(Er(e),.5),drawOnChartArea:!0,drawTicks:!1,borderDash:[5,5]}}}}}function Rp(e,n,i,r){const t=wp(r);if(!e||!e.series||e.series.length===0)return{data:null,options:null};const a=e.series.map((l,u)=>{const d=l.featureName,p=new Map;l.points.forEach(g=>{const y=Fp(new Date(g.timestamp),r),P=p.get(y)||0;p.set(y,P+g.value)});const m=t.map(g=>p.get(g)||0),f=lo(u);return{label:d,data:m,backgroundColor:co(f,.8),borderColor:f,borderWidth:1}}).reverse(),s={labels:t,datasets:a},c=jp(n,i);return{data:s,options:c}}const Mp=300;function Up(e,n){const i=n.dataPoints[0],r=i.parsed.y,t=e.scales.y,a=r/t.max*(t.bottom-t.top),s=n.caretY+a/2,c=e.getDatasetMeta(i.datasetIndex).data[i.dataIndex],l=c.x-c.width/2,u=e.canvas.offsetTop+s,d=e.canvas.offsetLeft+l;return{top:u,left:d}}function Op(e,n){const i=e.canvas.offsetTop+n.caretY,r=e.canvas.offsetLeft+n.caretX;return{top:i,left:r}}function Lp(e,n=Op){const[i,r]=D.useState(0),[t,a]=D.useState(0),[s,c]=D.useState(!1),[l,u]=D.useState(),d=D.useCallback(m=>{const{chart:f,tooltip:g}=m;if(g.opacity===0){c(!1);return}const{top:y,left:P}=n(f,g);a(P),r(y),u(e(g)),c(!0)},[e,n]);return{tooltipInfo:{positionTop:i,positionLeft:t,isOpen:s,payload:l},tooltipHandler:d}}const Bp=h(K.Box)`
3231
3291
  position: absolute;
3232
- `,rg=p.div`
3292
+ `,_p=h.div`
3233
3293
  position: absolute;
3234
3294
  background-color: white;
3235
3295
  border-radius: 8px;
@@ -3254,23 +3314,23 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3254
3314
  transform: translateY(-50%);
3255
3315
  filter: drop-shadow(2px 0 2px rgba(0, 0, 0, 0.1));
3256
3316
  }
3257
- `,og=({children:e,tooltipInfo:{positionTop:n,positionLeft:i,payload:a,isOpen:t},$padding:o})=>{const[s,c]=D.useState(!1),[l,u]=D.useState(!1),d=D.useRef(Sr(()=>u(!1),eg));return D.useEffect(()=>{a&&(s||t)?(d.current.cancel(),u(!0)):d.current()},[a,s,t]),r.jsxs(r.Fragment,{children:[r.jsx(ag,{style:{top:n,left:i}}),r.jsx(rg,{$isOpen:l,$padding:o,style:{top:n,left:i-140},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:e})]})},sg=p.div`
3317
+ `,$p=({children:e,tooltipInfo:{positionTop:n,positionLeft:i,payload:r,isOpen:t},$padding:a})=>{const[s,c]=D.useState(!1),[l,u]=D.useState(!1),d=D.useRef(Zo(()=>u(!1),Mp));return D.useEffect(()=>{r&&(s||t)?(d.current.cancel(),u(!0)):d.current()},[r,s,t]),o.jsxs(o.Fragment,{children:[o.jsx(Bp,{style:{top:n,left:i}}),o.jsx(_p,{$isOpen:l,$padding:a,style:{top:n,left:i-140},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:e})]})},Gp=h.div`
3258
3318
  width: 3px;
3259
3319
  margin-right: 15px;
3260
- `;function cg({tooltipInfo:e}){if(!e.payload)return r.jsx(r.Fragment,{});const{featureName:n,usage:i,date:a,color:t}=e.payload;return r.jsx(og,{tooltipInfo:e,placement:"top",$padding:16,children:r.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:8},className:"stigg-credit-usage-chart-tooltip",children:[r.jsx(sg,{style:{backgroundColor:t,marginTop:2}}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[r.jsx(y,{variant:"body1",color:"secondary",children:a}),r.jsx(y,{variant:"body1",color:"primary",children:n}),r.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"},children:[r.jsx(y,{variant:"body1",color:"primary",children:se(i)}),r.jsx(y,{variant:"body1",color:"primary",children:"Credits"})]})]})]})})}function lg(){const e=D.useCallback(n=>{if(K.isEmpty(n.dataPoints)||K.isEmpty(n.labelColors))return;const i=n.dataPoints[0],a=n.labelColors[0];if(!i||!a)return;const t=i.dataset.label||"Unknown Feature",o=i.parsed.y||0,s=i.label||"",c=a.backgroundColor;return{featureName:t,usage:o,date:s,color:c}},[]);return ig(e,tg)}const ug=p.div`
3320
+ `;function Vp({tooltipInfo:e}){if(!e.payload)return o.jsx(o.Fragment,{});const{featureName:n,usage:i,date:r,color:t}=e.payload;return o.jsx($p,{tooltipInfo:e,placement:"top",$padding:16,children:o.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:8},className:"stigg-credit-usage-chart-tooltip",children:[o.jsx(Gp,{style:{backgroundColor:t,marginTop:2}}),o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[o.jsx(C,{variant:"body1",color:"secondary",children:r}),o.jsx(C,{variant:"body1",color:"primary",children:n}),o.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"},children:[o.jsx(C,{variant:"body1",color:"primary",children:pe(i)}),o.jsx(C,{variant:"body1",color:"primary",children:"Credits"})]})]})]})})}function Hp(){const e=D.useCallback(n=>{if(ee.isEmpty(n.dataPoints)||ee.isEmpty(n.labelColors))return;const i=n.dataPoints[0],r=n.labelColors[0];if(!i||!r)return;const t=i.dataset.label||"Unknown Feature",a=i.parsed.y||0,s=i.label||"",c=r.backgroundColor;return{featureName:t,usage:a,date:s,color:c}},[]);return Lp(e,Up)}const qp=h.div`
3261
3321
  padding: 8px;
3262
3322
  margin: 0 12px;
3263
- `,dg=p.div`
3323
+ `,Wp=h.div`
3264
3324
  display: flex;
3265
3325
  align-items: center;
3266
- `,mg=p.div`
3326
+ `,Yp=h.div`
3267
3327
  flex: 1;
3268
3328
  position: relative;
3269
3329
  align-items: center;
3270
3330
  display: flex;
3271
- `,gg=p.div`
3331
+ `,Zp=h.div`
3272
3332
  height: 24px;
3273
- width: ${({$width:e,$minContentWidth:n})=>{const i=Math.min(e,100),a=Math.max(n,80);return`max(${i}%, ${a}px)`}};
3333
+ width: ${({$width:e,$minContentWidth:n})=>{const i=Math.min(e,100),r=Math.max(n,80);return`max(${i}%, ${r}px)`}};
3274
3334
  background-color: #f5f6f9;
3275
3335
  border-radius: 4px;
3276
3336
  position: relative;
@@ -3278,36 +3338,36 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3278
3338
  align-items: center;
3279
3339
  justify-content: space-between;
3280
3340
  padding: 0 8px;
3281
- `,pg=p.div`
3341
+ `,zp=h.div`
3282
3342
  width: 12px;
3283
3343
  height: 12px;
3284
3344
  border-radius: 2px;
3285
3345
  background-color: ${({$color:e})=>e};
3286
3346
  margin-right: 8px;
3287
3347
  flex-shrink: 0;
3288
- `,fg=p.div`
3348
+ `,Kp=h.div`
3289
3349
  margin-right: 24px;
3290
3350
  flex-shrink: 0;
3291
3351
  overflow: hidden;
3292
3352
  text-overflow: ellipsis;
3293
3353
  white-space: nowrap;
3294
- `;function hg({creditUsageData:e}){var t,o;if(!e||!e.series||e.series.length===0)return null;const n=e.series.map((s,c)=>{const l=s.featureId,u=s.featureName,d=s.totalCredits,h=Ba(c);return{featureId:l,featureName:u,totalCredits:d,color:h}}).sort((s,c)=>c.totalCredits-s.totalCredits),i=Math.max(...n.map(s=>s.totalCredits)),a=(s,c)=>{const l=Math.min(s.length*7,200),u=se(c).length*8;return 20+l+16+u+16};return r.jsxs(ug,{className:"stigg-credit-usage-chart-legend",children:[r.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[r.jsx(y,{style:{marginBottom:12},variant:"body1",color:"secondary",className:"stigg-credit-usage-chart-legend-title",children:"Top sources"}),r.jsx(y,{variant:"caption",color:"disabled",className:"stigg-credit-usage-chart-legend-title-currency-units",children:(o=(t=e.currency)==null?void 0:t.units)==null?void 0:o.plural})]}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:n.map(s=>{const c=i>0?s.totalCredits/i*100:0,l=a(s.featureName,s.totalCredits);return r.jsx(dg,{className:`stigg-credit-usage-chart-legend-item stigg-credit-usage-chart-legend-item-${s.featureId}`,children:r.jsx(mg,{className:"stigg-credit-usage-chart-legend-bar-container",children:r.jsxs(gg,{$width:c,$minContentWidth:l,children:[r.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[r.jsx(pg,{$color:s.color}),r.jsx(fg,{className:"stigg-credit-usage-chart-legend-feature-name",children:r.jsx(y,{variant:"body1",color:"primary",className:"stigg-credit-usage-chart-legend-feature-name-text",children:s.featureName})})]}),r.jsx(y,{variant:"caption",color:"primary",bold:!0,className:"stigg-credit-usage-chart-legend-value",children:se(s.totalCredits)})]})})},s.featureId)})})]})}const yg=p.div`
3354
+ `;function Qp({creditUsageData:e}){var t,a;if(!e||!e.series||e.series.length===0)return null;const n=e.series.map((s,c)=>{const l=s.featureId,u=s.featureName,d=s.totalCredits,p=lo(c);return{featureId:l,featureName:u,totalCredits:d,color:p}}).sort((s,c)=>c.totalCredits-s.totalCredits),i=Math.max(...n.map(s=>s.totalCredits)),r=(s,c)=>{const l=Math.min(s.length*7,200),u=pe(c).length*8;return 20+l+16+u+16};return o.jsxs(qp,{className:"stigg-credit-usage-chart-legend",children:[o.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(C,{style:{marginBottom:12},variant:"body1",color:"secondary",className:"stigg-credit-usage-chart-legend-title",children:"Top sources"}),o.jsx(C,{variant:"caption",color:"disabled",className:"stigg-credit-usage-chart-legend-title-currency-units",children:(a=(t=e.currency)==null?void 0:t.units)==null?void 0:a.plural})]}),o.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:n.map(s=>{const c=i>0?s.totalCredits/i*100:0,l=r(s.featureName,s.totalCredits);return o.jsx(Wp,{className:`stigg-credit-usage-chart-legend-item stigg-credit-usage-chart-legend-item-${s.featureId}`,children:o.jsx(Yp,{className:"stigg-credit-usage-chart-legend-bar-container",children:o.jsxs(Zp,{$width:c,$minContentWidth:l,children:[o.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[o.jsx(zp,{$color:s.color}),o.jsx(Kp,{className:"stigg-credit-usage-chart-legend-feature-name",children:o.jsx(C,{variant:"body1",color:"primary",className:"stigg-credit-usage-chart-legend-feature-name-text",children:s.featureName})})]}),o.jsx(C,{variant:"caption",color:"primary",bold:!0,className:"stigg-credit-usage-chart-legend-value",children:pe(s.totalCredits)})]})})},s.featureId)})})]})}const Xp=h.div`
3295
3355
  display: flex;
3296
3356
  flex-direction: column;
3297
3357
  justify-content: center;
3298
3358
  align-items: center;
3299
3359
  height: 100%;
3300
- `,Cg=p(ce)`
3360
+ `,Jp=h(fe)`
3301
3361
  svg {
3302
3362
  width: 32px;
3303
3363
  height: 32px;
3304
3364
  }
3305
- `;function Pg(){return r.jsxs(yg,{className:"stigg-credit-usage-chart-empty-state",children:[r.jsx(Cg,{icon:"PayAsYouGoCharge",style:{display:"flex"}}),r.jsx(y,{variant:"body1",color:"primary",bold:!0,children:"No Usage Recorded"})]})}const bg=p.div`
3365
+ `;function ef(){return o.jsxs(Xp,{className:"stigg-credit-usage-chart-empty-state",children:[o.jsx(Jp,{icon:"PayAsYouGoCharge",style:{display:"flex"}}),o.jsx(C,{variant:"body1",color:"primary",bold:!0,children:"No Usage Recorded"})]})}const tf=h.div`
3306
3366
  display: flex;
3307
3367
  justify-content: center;
3308
3368
  align-items: center;
3309
3369
  height: 100%;
3310
- `;function Eg(){return r.jsx(bg,{className:"stigg-credit-usage-chart-error-state",children:r.jsx(y,{variant:"body1",color:"error",children:"Failed to load credit usage"})})}const ui=[{value:P.CreditUsageTimeRange.LastDay,label:"Last 24 Hours"},{value:P.CreditUsageTimeRange.LastWeek,label:"Last 7 Days"},{value:P.CreditUsageTimeRange.LastMonth,label:"Last 30 Days"},{value:P.CreditUsageTimeRange.LastYear,label:"Last 12 Months"}],Sg=p(Z.Select)`
3370
+ `;function nf(){return o.jsx(tf,{className:"stigg-credit-usage-chart-error-state",children:o.jsx(C,{variant:"body1",color:"error",children:"Failed to load credit usage"})})}const Sr=[{value:b.CreditUsageTimeRange.LastDay,label:"Last 24 Hours"},{value:b.CreditUsageTimeRange.LastWeek,label:"Last 7 Days"},{value:b.CreditUsageTimeRange.LastMonth,label:"Last 30 Days"},{value:b.CreditUsageTimeRange.LastYear,label:"Last 12 Months"}],rf=h(K.Select)`
3311
3371
  border-radius: 10px;
3312
3372
  height: 38px;
3313
3373
  min-width: 150px;
@@ -3315,7 +3375,7 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3315
3375
  &:hover .MuiOutlinedInput-notchedOutline {
3316
3376
  border-color: ${({theme:e})=>e.stigg.palette.outlinedBorder};
3317
3377
  }
3318
- `,Dg=p(Z.OutlinedInput)`
3378
+ `,af=h(K.OutlinedInput)`
3319
3379
  & .MuiInputBase-input {
3320
3380
  padding: 10px 12px;
3321
3381
  }
@@ -3323,11 +3383,11 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3323
3383
  &.Mui-focused .MuiOutlinedInput-notchedOutline {
3324
3384
  border-color: ${({theme:e})=>e.stigg.palette.primary} !important;
3325
3385
  }
3326
- `;function xg({isLoading:e,totalCredits:n,selectedTimeRange:i,setSelectedTimeRange:a,error:t,localization:o,currencyUnit:s}){return r.jsxs("div",{className:"stigg-credit-usage-chart-header",style:{display:"flex",flexDirection:"row",marginBottom:16,justifyContent:"space-between"},children:[r.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:8,alignItems:"center"},children:[r.jsx(y,{variant:"h3",color:"primary",className:"stigg-credit-usage-chart-title",children:o.title}),e?r.jsx(Q,{width:100,height:24}):r.jsxs(r.Fragment,{children:[r.jsx(y,{variant:"h6",color:"secondary",className:"stigg-credit-usage-chart-total",children:"|"}),r.jsxs(y,{variant:"h6",color:"secondary",className:"stigg-credit-usage-chart-total",children:[o.totalSpend,": ",se(n||0)," ",s||""]})]})]}),!e&&!t&&r.jsx(Sg,{className:"stigg-credit-usage-chart-time-range-select",value:i,input:r.jsx(Dg,{}),onChange:c=>a(c.target.value),renderValue:c=>{var l;return r.jsxs(y,{variant:"body1",color:"primary",children:[((l=ui.find(u=>u.value===c))==null?void 0:l.label)||""," "]})},children:ui.map(c=>r.jsx(Z.MenuItem,{value:c.value,children:r.jsx(y,{variant:"body1",color:"primary",children:c.label})},c.value))})]})}const Tg=p.div`
3386
+ `;function of({isLoading:e,totalCredits:n,selectedTimeRange:i,setSelectedTimeRange:r,error:t,localization:a,currencyUnit:s}){return o.jsxs("div",{className:"stigg-credit-usage-chart-header",style:{display:"flex",flexDirection:"row",marginBottom:16,justifyContent:"space-between"},children:[o.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:8,alignItems:"center"},children:[o.jsx(C,{variant:"h3",color:"primary",className:"stigg-credit-usage-chart-title",children:a.title}),e?o.jsx(te,{width:100,height:24}):o.jsxs(o.Fragment,{children:[o.jsx(C,{variant:"h6",color:"secondary",className:"stigg-credit-usage-chart-total",children:"|"}),o.jsxs(C,{variant:"h6",color:"secondary",className:"stigg-credit-usage-chart-total",children:[a.totalSpend,": ",pe(n||0)," ",s||""]})]})]}),!e&&!t&&o.jsx(rf,{className:"stigg-credit-usage-chart-time-range-select",value:i,input:o.jsx(af,{}),onChange:c=>r(c.target.value),renderValue:c=>{var l;return o.jsxs(C,{variant:"body1",color:"primary",children:[((l=Sr.find(u=>u.value===c))==null?void 0:l.label)||""," "]})},children:Sr.map(c=>o.jsx(K.MenuItem,{value:c.value,children:o.jsx(C,{variant:"body1",color:"primary",children:c.label})},c.value))})]})}const sf=h.div`
3327
3387
  display: flex;
3328
3388
  flex-direction: column;
3329
3389
  gap: 8px;
3330
- `,Ig=p.div`
3390
+ `,cf=h.div`
3331
3391
  align-items: center;
3332
3392
  justify-content: center;
3333
3393
  min-height: 480px;
@@ -3338,44 +3398,44 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3338
3398
  border-radius: 8px;
3339
3399
  border: 1px solid ${({theme:e})=>{var n,i;return((i=(n=e==null?void 0:e.stigg)==null?void 0:n.palette)==null?void 0:i.outlinedBorder)||"#e0e0e0"}};
3340
3400
  background-color: ${({theme:e})=>{var n,i;return((i=(n=e==null?void 0:e.stigg)==null?void 0:n.palette)==null?void 0:i.backgroundPaper)||"#ffffff"}};
3341
- `,vg=p(V)`
3401
+ `,lf=h(H)`
3342
3402
  border-radius: 4px;
3343
3403
  height: 400px;
3344
3404
  width: 100%;
3345
- `;function Ag({currencyId:e,timeRange:n,localization:i}){var I,N;const a=bt(),t=G({optional:!0}),o=t==null?void 0:t.stigg,s=T(T({},Hm),i),[c,l]=D.useState(n),{creditUsage:u,isLoading:d,error:h}=Ra({currencyId:e,timeRange:c}),{tooltipInfo:m,tooltipHandler:f}=lg(),{data:g,options:x}=D.useMemo(()=>Jm(u||null,a,f,c),[u,a,f,c]),b=D.useMemo(()=>(u==null?void 0:u.series.reduce((A,F)=>A+F.totalCredits,0))||0,[u]),E=(N=(I=u==null?void 0:u.currency)==null?void 0:I.units)==null?void 0:N.plural;return r.jsx(ke,{componentTheme:a,children:r.jsxs(Tg,{className:"stigg-credit-usage-chart-container",children:[r.jsx(Ig,{className:"stigg-credit-usage-chart-card",children:r.jsxs("div",{style:{width:"100%"},children:[r.jsx(xg,{isLoading:d,totalCredits:b,selectedTimeRange:c,setSelectedTimeRange:l,error:h,localization:s,currencyUnit:E}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[r.jsx("div",{style:{height:"400px",position:"relative"},children:d?r.jsx(vg,{className:"stigg-credit-usage-chart-skeleton"}):h?r.jsx(Eg,{}):(u==null?void 0:u.series.length)===0?r.jsx(Pg,{}):r.jsxs(r.Fragment,{children:[r.jsx(cg,{tooltipInfo:m}),r.jsx(Er.Bar,{className:"stigg-credit-usage-chart-bar",data:g!=null?g:{labels:[],datasets:[]},options:x!=null?x:{},plugins:[zm]})]})}),!d&&r.jsx(hg,{creditUsageData:u})]})]})}),r.jsx(Ue,{source:"credit_usage_chart",align:"end",smallScreenAlign:"end",style:{marginTop:0},showWatermark:o==null?void 0:o.isWidgetWatermarkEnabled})]})})}const kg=(e,n)=>e>=100?n.palette.progress.high:e>=75?n.palette.progress.medium:n.palette.progress.low,Ng=p.div`
3405
+ `;function uf({currencyId:e,timeRange:n,localization:i}){var v,A;const r=en(),t=q({optional:!0}),a=t==null?void 0:t.stigg,s=I(I({},xp),i),[c,l]=D.useState(n),{creditUsage:u,isLoading:d,error:p}=so({currencyId:e,timeRange:c}),{tooltipInfo:m,tooltipHandler:f}=Hp(),{data:g,options:y}=D.useMemo(()=>Rp(u||null,r,f,c),[u,r,f,c]),P=D.useMemo(()=>(u==null?void 0:u.series.reduce((k,w)=>k+w.totalCredits,0))||0,[u]),S=(A=(v=u==null?void 0:u.currency)==null?void 0:v.units)==null?void 0:A.plural;return o.jsx($e,{componentTheme:r,children:o.jsxs(sf,{className:"stigg-credit-usage-chart-container",children:[o.jsx(cf,{className:"stigg-credit-usage-chart-card",children:o.jsxs("div",{style:{width:"100%"},children:[o.jsx(of,{isLoading:d,totalCredits:P,selectedTimeRange:c,setSelectedTimeRange:l,error:p,localization:s,currencyUnit:S}),o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[o.jsx("div",{style:{height:"400px",position:"relative"},children:d?o.jsx(lf,{className:"stigg-credit-usage-chart-skeleton"}):p?o.jsx(nf,{}):(u==null?void 0:u.series.length)===0?o.jsx(ef,{}):o.jsxs(o.Fragment,{children:[o.jsx(Vp,{tooltipInfo:m}),o.jsx(Yo.Bar,{className:"stigg-credit-usage-chart-bar",data:g!=null?g:{labels:[],datasets:[]},options:y!=null?y:{},plugins:[Np]})]})}),!d&&o.jsx(Qp,{creditUsageData:u})]})]})}),o.jsx(Ke,{source:"credit_usage_chart",align:"end",smallScreenAlign:"end",style:{marginTop:0},showWatermark:a==null?void 0:a.getShowWatermark()})]})})}const df=(e,n)=>e>=100?n.palette.progress.high:e>=75?n.palette.progress.medium:n.palette.progress.low,mf=h.div`
3346
3406
  width: 100%;
3347
3407
  height: 8px;
3348
3408
  background-color: ${({theme:e})=>e.stigg.palette.progress.background};
3349
3409
  border-radius: 4px;
3350
3410
  overflow: hidden;
3351
- `,wg=p.div`
3411
+ `,gf=h.div`
3352
3412
  height: 100%;
3353
3413
  width: ${({percentage:e})=>Math.max(0,Math.min(100,e))}%;
3354
- background-color: ${({theme:e,percentage:n})=>kg(n,e.stigg)};
3414
+ background-color: ${({theme:e,percentage:n})=>df(n,e.stigg)};
3355
3415
  border-radius: 4px;
3356
3416
  transition: width 0.3s ease-in-out;
3357
- `;function Fg({percentage:e,className:n}){return r.jsx(Ng,{className:n,children:r.jsx(wg,{percentage:e})})}const jg=p.div`
3417
+ `;function pf({percentage:e,className:n}){return o.jsx(mf,{className:n,children:o.jsx(gf,{percentage:e})})}const ff=h.div`
3358
3418
  display: flex;
3359
3419
  flex-direction: row;
3360
3420
  justify-content: space-between;
3361
3421
  align-items: baseline;
3362
3422
  width: 100%;
3363
- `,Ug=p.div`
3423
+ `,hf=h.div`
3364
3424
  display: flex;
3365
3425
  flex-direction: row;
3366
3426
  gap: 4px;
3367
3427
  align-items: baseline;
3368
- `,Mg=p.div`
3428
+ `,yf=h.div`
3369
3429
  display: flex;
3370
3430
  flex-direction: row;
3371
3431
  gap: 4px;
3372
3432
  align-items: baseline;
3373
- `,Rg=({totalConsumed:e,totalGranted:n})=>{const i=Om(e!=null?e:0,n!=null?n:0);return r.jsx(Fg,{percentage:i,className:"stigg-credit-utilization-progress"})};function Lg({currencyId:e,decimalPlaces:n=null,showUnits:i=!0,showSymbol:a=!1,remainingLabel:t=Ma.remaining}){const{balance:o,isLoading:s,error:c}=gn({currencyId:e});if(c)return r.jsx(y,{variant:"body1",color:"error",className:"stigg-credit-utilization-value-error",children:c.message||"Failed to load balance"});if(s)return r.jsx(V,{width:280,height:24,className:"stigg-credit-utilization-value-loading"});if(o){const{currentBalance:l,totalConsumed:u,totalGranted:d}=o,h=Ua(o,i,a);return r.jsxs(r.Fragment,{children:[r.jsxs(jg,{children:[r.jsxs(Ug,{children:[r.jsx(y,{variant:"h3",color:"primary",bold:!0,className:"stigg-credit-utilization-usage",children:Ve(u,n)}),r.jsx(y,{variant:"h3",color:"primary",className:"stigg-credit-utilization-separator",children:"/"}),r.jsx(y,{variant:"h3",color:"primary",className:"stigg-credit-utilization-total",children:Ve(d,n)}),r.jsx(y,{variant:"caption",color:"secondary",className:"stigg-credit-utilization-suffix",children:h})]}),r.jsxs(Mg,{children:[r.jsx(y,{variant:"caption",color:"secondary",className:"stigg-credit-utilization-remaining-label",children:t}),r.jsx(y,{variant:"caption",color:"primary",bold:!0,className:"stigg-credit-utilization-remaining-value",children:Ve(l,n)})]})]}),r.jsx(Rg,{totalConsumed:o.totalConsumed,totalGranted:o.totalGranted})]})}return r.jsx(y,{variant:"body1",color:"disabled",className:"stigg-credit-utilization-value-no-balance",children:"No balance data available"})}const Bg=p.div`
3433
+ `,Cf=({totalConsumed:e,totalGranted:n})=>{const i=Ep(e!=null?e:0,n!=null?n:0);return o.jsx(pf,{percentage:i,className:"stigg-credit-utilization-progress"})};function bf({currencyId:e,decimalPlaces:n=null,showUnits:i=!0,showSymbol:r=!1,remainingLabel:t=oo.remaining}){const{balance:a,isLoading:s,error:c}=ai({currencyId:e});if(c)return o.jsx(C,{variant:"body1",color:"error",className:"stigg-credit-utilization-value-error",children:c.message||"Failed to load balance"});if(s)return o.jsx(H,{width:280,height:24,className:"stigg-credit-utilization-value-loading"});if(a){const{currentBalance:l,totalConsumed:u,totalGranted:d}=a,p=ao(a,i,r);return o.jsxs(o.Fragment,{children:[o.jsxs(ff,{children:[o.jsxs(hf,{children:[o.jsx(C,{variant:"h3",color:"primary",bold:!0,className:"stigg-credit-utilization-usage",children:ot(u,n)}),o.jsx(C,{variant:"h3",color:"primary",className:"stigg-credit-utilization-separator",children:"/"}),o.jsx(C,{variant:"h3",color:"primary",className:"stigg-credit-utilization-total",children:ot(d,n)}),o.jsx(C,{variant:"caption",color:"secondary",className:"stigg-credit-utilization-suffix",children:p})]}),o.jsxs(yf,{children:[o.jsx(C,{variant:"caption",color:"secondary",className:"stigg-credit-utilization-remaining-label",children:t}),o.jsx(C,{variant:"caption",color:"primary",bold:!0,className:"stigg-credit-utilization-remaining-value",children:ot(l,n)})]})]}),o.jsx(Cf,{totalConsumed:a.totalConsumed,totalGranted:a.totalGranted})]})}return o.jsx(C,{variant:"body1",color:"disabled",className:"stigg-credit-utilization-value-no-balance",children:"No balance data available"})}const Ef=h.div`
3374
3434
  display: flex;
3375
3435
  flex-direction: column;
3376
3436
  gap: 8px;
3377
3437
  width: 100%;
3378
- `,Og=p.div`
3438
+ `,Pf=h.div`
3379
3439
  display: flex;
3380
3440
  flex-direction: column;
3381
3441
  gap: 16px;
@@ -3384,7 +3444,7 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3384
3444
  border: 1px solid ${({theme:e})=>{var n,i;return(i=(n=e.stigg)==null?void 0:n.palette)==null?void 0:i.outlinedBorder}};
3385
3445
  background-color: ${({theme:e})=>{var n,i;return(i=(n=e==null?void 0:e.stigg)==null?void 0:n.palette)==null?void 0:i.backgroundPaper}};
3386
3446
  min-height: 90px;
3387
- `;function $g({currencyId:e,localization:n,decimalPlaces:i,showUnits:a=!0,showSymbol:t=!1}){const o=rn(Me),s=G({optional:!0}),c=s==null?void 0:s.theme,{title:l,remaining:u}=T(T({},Ma),n),d=r.jsx(Bg,{className:"stigg-credit-utilization-container",children:r.jsxs(Og,{className:"stigg-credit-utilization-card",children:[r.jsx(y,{variant:"h6",color:"primary",className:"stigg-credit-utilization-title",children:l}),r.jsx(Lg,{currencyId:e,decimalPlaces:i,showUnits:a,showSymbol:t,remainingLabel:u})]})});return o?d:r.jsx(ke,{componentTheme:c,children:d})}function Oa(e){const n=G(),i=n==null?void 0:n.stigg,a=n==null?void 0:n.updatedAt,t=D.useCallback(()=>B(null,null,function*(){if(!i||!i.isCustomerLoaded)return null;try{return i.getCreditGrants({currencyId:e.currencyId})}catch(l){throw console.error("Error fetching credit grants:",l),l}}),[i,e.currencyId,a]),{data:o,error:s,isLoading:c}=Le({func:t});return D.useMemo(()=>({creditGrants:(o==null?void 0:o.data)||[],isLoading:c,error:s}),[o,s,c])}function _g({skeletonRows:e,visibleHeadCells:n,hideLastRowBorder:i}){return r.jsx(r.Fragment,{children:[...Array(e)].map((a,t)=>r.jsx(Z.TableRow,{children:n.map(o=>r.jsx(pn,{$alignment:o.alignment,$width:o.width,$maxWidth:o.maxWidth,$minWidth:o.minWidth,$isLastRow:t===e-1,$hideLastRowBorder:i,children:r.jsx(V,{width:o.width?parseInt(o.width.replace("px",""))-40:100,height:20})},String(o.id)))},t))})}function Gg({data:e,visibleHeadCells:n,onRowClick:i,hideLastRowBorder:a}){return r.jsx(r.Fragment,{children:e.map((t,o)=>r.jsx(Wg,{$clickable:!!i,onClick:()=>i&&i(t),children:n.map(s=>r.jsx(pn,{$alignment:s.alignment,$width:s.width,$maxWidth:s.maxWidth,$minWidth:s.minWidth,$isLastRow:o===e.length-1,$hideLastRowBorder:a,onClick:s.disableClick?c=>c.stopPropagation():void 0,children:r.jsx(Yg,{$alignment:s.alignment,children:s.render(t)})},String(s.id)))},o))})}function $a({errorMessage:e,className:n}){return e===void 0||typeof e=="string"?r.jsx(y,{variant:"body1",color:"error",className:n,children:e||"An error occurred"}):r.jsx(r.Fragment,{children:e})}function _a({message:e,className:n}){return e===void 0||typeof e=="string"?r.jsx(y,{variant:"body1",color:"secondary",className:n,children:e||"No data available"}):r.jsx(r.Fragment,{children:e})}const Vg=p(Z.TableContainer)`
3447
+ `;function Sf({currencyId:e,localization:n,decimalPlaces:i,showUnits:r=!0,showSymbol:t=!1}){const a=Qn(Qe),s=q({optional:!0}),c=s==null?void 0:s.theme,{title:l,remaining:u}=I(I({},oo),n),d=o.jsx(Ef,{className:"stigg-credit-utilization-container",children:o.jsxs(Pf,{className:"stigg-credit-utilization-card",children:[o.jsx(C,{variant:"h6",color:"primary",className:"stigg-credit-utilization-title",children:l}),o.jsx(bf,{currencyId:e,decimalPlaces:i,showUnits:r,showSymbol:t,remainingLabel:u})]})});return a?d:o.jsx($e,{componentTheme:c,children:d})}function uo(e){const n=q(),i=n==null?void 0:n.stigg,r=n==null?void 0:n.updatedAt,t=D.useCallback(()=>B(null,null,function*(){if(!i||!i.isCustomerLoaded)return null;try{return i.getCreditGrants({currencyId:e.currencyId})}catch(l){throw console.error("Error fetching credit grants:",l),l}}),[i,e.currencyId,r]),{data:a,error:s,isLoading:c}=Je({func:t});return D.useMemo(()=>({creditGrants:(a==null?void 0:a.data)||[],isLoading:c,error:s}),[a,s,c])}function Df({skeletonRows:e,visibleHeadCells:n,hideLastRowBorder:i}){return o.jsx(o.Fragment,{children:Array.from({length:e}).map((r,t)=>o.jsx(K.TableRow,{children:n.map(a=>o.jsx(oi,{$alignment:a.alignment,$width:a.width,$maxWidth:a.maxWidth,$minWidth:a.minWidth,$isLastRow:t===e-1,$hideLastRowBorder:i,children:o.jsx(H,{width:a.width?parseInt(a.width.replace("px",""))-40:100,height:20})},String(a.id)))},t))})}function vf({data:e,visibleHeadCells:n,onRowClick:i,hideLastRowBorder:r}){return o.jsx(o.Fragment,{children:e.map((t,a)=>o.jsx(Af,{$clickable:!!i,onClick:()=>i&&i(t),children:n.map(s=>o.jsx(oi,{$alignment:s.alignment,$width:s.width,$maxWidth:s.maxWidth,$minWidth:s.minWidth,$isLastRow:a===e.length-1,$hideLastRowBorder:r,onClick:s.disableClick?c=>c.stopPropagation():void 0,children:o.jsx(kf,{$alignment:s.alignment,children:s.render(t)})},String(s.id)))},a))})}function mo({errorMessage:e,className:n}){return e===void 0||typeof e=="string"?o.jsx(C,{variant:"body1",color:"error",className:n,children:e||"An error occurred"}):o.jsx(o.Fragment,{children:e})}function go({message:e,className:n}){return e===void 0||typeof e=="string"?o.jsx(C,{variant:"body1",color:"secondary",className:n,children:e||"No data available"}):o.jsx(o.Fragment,{children:e})}const xf=h(K.TableContainer)`
3388
3448
  border-radius: 8px;
3389
3449
  border: 1px solid ${({theme:e})=>e.stigg.palette.outlinedBorder};
3390
3450
  background-color: ${({theme:e})=>e.stigg.palette.backgroundPaper};
@@ -3397,11 +3457,11 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3397
3457
  align-items: center;
3398
3458
  justify-content: center;
3399
3459
  `}
3400
- `,Hg=p(Z.Table)`
3460
+ `,If=h(K.Table)`
3401
3461
  min-width: 600px;
3402
3462
  table-layout: auto;
3403
3463
  width: 100%;
3404
- `,pn=p(Z.TableCell)`
3464
+ `,oi=h(K.TableCell)`
3405
3465
  padding: 8px 12px;
3406
3466
  border-bottom: 1px solid ${({theme:e})=>e.stigg.palette.outlinedBorder};
3407
3467
  text-align: ${({$alignment:e})=>e||"left"};
@@ -3414,33 +3474,33 @@ ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
3414
3474
  ${({$minWidth:e})=>e&&`min-width: ${e};`}
3415
3475
 
3416
3476
  ${({$isLastRow:e,$hideLastRowBorder:n})=>e&&n&&"border-bottom: none;"}
3417
- `,qg=p(pn)`
3477
+ `,Tf=h(oi)`
3418
3478
  background-color: transparent;
3419
- `,Wg=p(Z.TableRow)`
3479
+ `,Af=h(K.TableRow)`
3420
3480
  ${({$clickable:e,theme:n})=>e&&`
3421
3481
  cursor: pointer;
3422
3482
  &:hover {
3423
3483
  background-color: ${n.stigg.palette.backgroundHighlight};
3424
3484
  }
3425
3485
  `}
3426
- `,Yg=p.div`
3486
+ `,kf=h.div`
3427
3487
  display: flex;
3428
3488
  align-items: center;
3429
3489
  justify-content: ${({$alignment:e})=>{switch(e){case"center":return"center";case"right":return"flex-end";default:return"flex-start"}}};
3430
3490
  width: 100%;
3431
- `;function Zg({visibleHeadCells:e}){return r.jsx(Z.TableHead,{children:r.jsx(Z.TableRow,{children:e.map(n=>r.jsx(qg,{$alignment:n.alignment,$width:n.width,$maxWidth:n.maxWidth,$minWidth:n.minWidth,children:r.jsx(y,{variant:"caption",children:n.label})},String(n.id)))})})}function Ga({data:e,headCells:n,isLoading:i=!1,error:a=null,emptyMessage:t,errorMessage:o,onRowClick:s,className:c,skeletonRows:l=3,hideLastRowBorder:u=!0}){const d=n.filter(m=>m.visible!==!1),h=!!a||!i&&e.length===0;return r.jsx(Vg,{className:c,$hasMinHeight:h,children:a?r.jsx($a,{errorMessage:o,className:`${c}-error`}):!i&&e.length===0?r.jsx(_a,{message:t,className:`${c}-empty`}):r.jsxs(Hg,{children:[r.jsx(Zg,{visibleHeadCells:d}),r.jsx(Z.TableBody,{children:i?r.jsx(_g,{skeletonRows:l,visibleHeadCells:d,hideLastRowBorder:u}):r.jsx(Gg,{data:e,visibleHeadCells:d,onRowClick:s,hideLastRowBorder:u})})]})})}const zg=p(Z.Chip)`
3491
+ `;function Nf({visibleHeadCells:e}){return o.jsx(K.TableHead,{children:o.jsx(K.TableRow,{children:e.map(n=>o.jsx(Tf,{$alignment:n.alignment,$width:n.width,$maxWidth:n.maxWidth,$minWidth:n.minWidth,children:o.jsx(C,{variant:"caption",children:n.label})},String(n.id)))})})}function po({data:e,headCells:n,isLoading:i=!1,error:r=null,emptyMessage:t,errorMessage:a,onRowClick:s,className:c,skeletonRows:l=3,hideLastRowBorder:u=!0}){const d=n.filter(m=>m.visible!==!1),p=!!r||!i&&e.length===0;return o.jsx(xf,{className:c,$hasMinHeight:p,children:r?o.jsx(mo,{errorMessage:a,className:`${c}-error`}):!i&&e.length===0?o.jsx(go,{message:t,className:`${c}-empty`}):o.jsxs(If,{children:[o.jsx(Nf,{visibleHeadCells:d}),o.jsx(K.TableBody,{children:i?o.jsx(Df,{skeletonRows:l,visibleHeadCells:d,hideLastRowBorder:u}):o.jsx(vf,{data:e,visibleHeadCells:d,onRowClick:s,hideLastRowBorder:u})})]})})}const wf=h(K.Chip)`
3432
3492
  font-size: 0.75rem;
3433
3493
  height: 24px;
3434
3494
  border-radius: 4px;
3435
3495
  border: none;
3436
- background-color: ${({theme:e,$variant:n})=>{var i,a,t,o;return(o=(t=(a=(i=e==null?void 0:e.stigg)==null?void 0:i.palette)==null?void 0:a.statusChips)==null?void 0:t[n])==null?void 0:o.background}};
3437
- color: ${({theme:e,$variant:n})=>{var i,a,t,o;return(o=(t=(a=(i=e==null?void 0:e.stigg)==null?void 0:i.palette)==null?void 0:a.statusChips)==null?void 0:t[n])==null?void 0:o.text}};
3438
- `;function Va(o){var s=o,{variant:e,label:n,className:i,size:a="small"}=s,t=ie(s,["variant","label","className","size"]);return r.jsx(zg,T({label:n,size:a,$variant:e,className:i},t))}var xe=(e=>(e.SCHEDULED="SCHEDULED",e.AVAILABLE="AVAILABLE",e.EXPIRED="EXPIRED",e))(xe||{});function Kg(e){const n=te(),i=te(e.effectiveAt),a=e.expireAt?te(e.expireAt):null;return i.isAfter(n)?xe.SCHEDULED:a&&a.isBefore(n)?xe.EXPIRED:xe.AVAILABLE}function Qg(e,n){return console.log("decimalPlaces",n),`${Ve(e.consumedAmount,n)} / ${e.amount}`}function Ha(e){return te(e).format("MMM D, YYYY h:mmA")}function qa(e){return te(e).format("MMM D, YYYY")}const Wa=e=>{switch(e){case xe.AVAILABLE:return"success";case xe.SCHEDULED:return"warning";case xe.EXPIRED:return"error";default:return"neutral"}},Xg=e=>{switch(e){case P.CreditGrantType.Promotional:return"Promotional";case P.CreditGrantType.Paid:return"Top-up"}};function Jg({creditGrants:e,isLoading:n,error:i,localization:a,decimalPlaces:t}){const o=e.map(c=>O(T({},c),{status:Kg(c)})),s=[{id:"effectiveAt",label:a.receivedAt,width:"205px",render:({effectiveAt:c})=>r.jsx(y,{variant:"body1",className:"stigg-credit-grants-effective-date",children:Ha(c)})},{id:"grantType",label:a.grantType,width:"205px",render:({grantType:c})=>r.jsx(y,{variant:"body1",className:"stigg-credit-grants-grant-type",children:Xg(c)})},{id:"status",label:a.status,width:"205px",render:({status:c})=>{const l=K.capitalize(c),u=Wa(c);return r.jsx(Va,{label:l,variant:u,className:"stigg-credit-grants-status-chip"})}},{id:"amount",label:a.balance,width:"205px",render:c=>r.jsx(y,{variant:"body1",className:"stigg-credit-grants-balance",children:Qg(c,t)})},{id:"expireAt",label:a.expiryDate,width:"205px",render:({expireAt:c})=>r.jsx(y,{variant:"body1",className:"stigg-credit-grants-expiry-date",children:c?qa(c):"-"})}];return r.jsx(Ga,{data:o,headCells:s,isLoading:n,error:i,emptyMessage:a.emptyState,loadingMessage:a.loadingState,errorMessage:a.errorState,className:"stigg-credit-grants-table",skeletonRows:3})}const e1=p.div`
3496
+ background-color: ${({theme:e,$variant:n})=>{var i,r,t,a;return(a=(t=(r=(i=e==null?void 0:e.stigg)==null?void 0:i.palette)==null?void 0:r.statusChips)==null?void 0:t[n])==null?void 0:a.background}};
3497
+ color: ${({theme:e,$variant:n})=>{var i,r,t,a;return(a=(t=(r=(i=e==null?void 0:e.stigg)==null?void 0:i.palette)==null?void 0:r.statusChips)==null?void 0:t[n])==null?void 0:a.text}};
3498
+ `;function fo(a){var s=a,{variant:e,label:n,className:i,size:r="small"}=s,t=se(s,["variant","label","className","size"]);return o.jsx(wf,I({label:n,size:r,$variant:e,className:i},t))}var Ue=(e=>(e.SCHEDULED="SCHEDULED",e.AVAILABLE="AVAILABLE",e.EXPIRED="EXPIRED",e))(Ue||{});function Ff(e){const n=oe(),i=oe(e.effectiveAt),r=e.expireAt?oe(e.expireAt):null;return i.isAfter(n)?Ue.SCHEDULED:r&&r.isBefore(n)?Ue.EXPIRED:Ue.AVAILABLE}function jf(e,n){return console.log("decimalPlaces",n),`${ot(e.consumedAmount,n)} / ${e.amount}`}function ho(e){return oe(e).format("MMM D, YYYY h:mmA")}function yo(e){return oe(e).format("MMM D, YYYY")}const Co=e=>{switch(e){case Ue.AVAILABLE:return"success";case Ue.SCHEDULED:return"warning";case Ue.EXPIRED:return"error";default:return"neutral"}},Rf=e=>{switch(e){case b.CreditGrantType.Promotional:return"Promotional";case b.CreditGrantType.Paid:return"Top-up"}};function Mf({creditGrants:e,isLoading:n,error:i,localization:r,decimalPlaces:t}){const a=e.map(c=>_(I({},c),{status:Ff(c)})),s=[{id:"effectiveAt",label:r.receivedAt,width:"205px",render:({effectiveAt:c})=>o.jsx(C,{variant:"body1",className:"stigg-credit-grants-effective-date",children:ho(c)})},{id:"grantType",label:r.grantType,width:"205px",render:({grantType:c})=>o.jsx(C,{variant:"body1",className:"stigg-credit-grants-grant-type",children:Rf(c)})},{id:"status",label:r.status,width:"205px",render:({status:c})=>{const l=ee.capitalize(c),u=Co(c);return o.jsx(fo,{label:l,variant:u,className:"stigg-credit-grants-status-chip"})}},{id:"amount",label:r.balance,width:"205px",render:c=>o.jsx(C,{variant:"body1",className:"stigg-credit-grants-balance",children:jf(c,t)})},{id:"expireAt",label:r.expiryDate,width:"205px",render:({expireAt:c})=>o.jsx(C,{variant:"body1",className:"stigg-credit-grants-expiry-date",children:c?yo(c):"-"})}];return o.jsx(po,{data:a,headCells:s,isLoading:n,error:i,emptyMessage:r.emptyState,loadingMessage:r.loadingState,errorMessage:r.errorState,className:"stigg-credit-grants-table",skeletonRows:3})}const Uf=h.div`
3439
3499
  display: flex;
3440
3500
  flex-direction: column;
3441
3501
  gap: 8px;
3442
- `,t1=p.div`
3502
+ `,Of=h.div`
3443
3503
  display: flex;
3444
3504
  flex-direction: column;
3445
3505
  gap: 16px;
3446
- `;function n1({currencyId:e,localization:n,decimalPlaces:i}){const a=G({optional:!0}),t=a==null?void 0:a.stigg,o=a==null?void 0:a.theme,s=T(T({},Vm),n),{creditGrants:c,isLoading:l,error:u}=Oa({currencyId:e});return r.jsx(ke,{componentTheme:o,children:r.jsxs(e1,{className:"stigg-credit-grants-container",children:[r.jsx(t1,{className:"stigg-credit-grants-card",children:r.jsx(Jg,{creditGrants:c,isLoading:l,error:u,localization:s,decimalPlaces:i})}),r.jsx(Ue,{source:"grant_list",align:"end",smallScreenAlign:"end",style:{marginTop:0},showWatermark:t==null?void 0:t.isWidgetWatermarkEnabled})]})})}exports.AddonsList=Ri;exports.BooleanEntitlementGuard=Mm;exports.Checkout=Fm;exports.CreditBalance=Ym;exports.CreditGrants=n1;exports.CreditUsageChart=Ag;exports.CreditUtilization=$g;exports.CustomerPortal=qc;exports.CustomerPortalProvider=Mi;exports.CustomerUsageData=Zi;exports.EmptyState=_a;exports.EnumEntitlementGuard=Bm;exports.ErrorState=$a;exports.GenericTable=Ga;exports.InvoicesSection=zi;exports.MeteredEntitlementGuard=Lm;exports.NumericEntitlementGuard=Rm;exports.PaymentDetailsSection=Wi;exports.Paywall=Gs;exports.Promotions=Li;exports.ProvisionStatus=ja;exports.StatusChip=Va;exports.StiggContext=Pt;exports.StiggProvider=ks;exports.SubscribeIntentionType=ue;exports.SubscriptionsOverview=Vi;exports.formatDateOnly=qa;exports.formatDateTime=Ha;exports.mapCreditGrantStatusToVariant=Wa;exports.useActiveSubscriptions=Qu;exports.useBooleanEntitlement=Ea;exports.useCreditBalance=gn;exports.useCreditGrants=Oa;exports.useCreditUsage=Ra;exports.useCustomerPortal=Ju;exports.useEnumEntitlement=xa;exports.useMeteredEntitlement=Da;exports.useNumericEntitlement=Sa;exports.usePaywall=Xu;exports.useStiggContext=G;exports.useWaitForCheckoutCompleted=Um;Object.keys(P).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>P[e]})});
3506
+ `;function Lf({currencyId:e,localization:n,decimalPlaces:i}){const r=q({optional:!0}),t=r==null?void 0:r.stigg,a=r==null?void 0:r.theme,s=I(I({},vp),n),{creditGrants:c,isLoading:l,error:u}=uo({currencyId:e});return o.jsx($e,{componentTheme:a,children:o.jsxs(Uf,{className:"stigg-credit-grants-container",children:[o.jsx(Of,{className:"stigg-credit-grants-card",children:o.jsx(Mf,{creditGrants:c,isLoading:l,error:u,localization:s,decimalPlaces:i})}),o.jsx(Ke,{source:"grant_list",align:"end",smallScreenAlign:"end",style:{marginTop:0},showWatermark:t==null?void 0:t.getShowWatermark()})]})})}exports.AddonsList=sa;exports.BooleanEntitlementGuard=hp;exports.Checkout=gp;exports.CreditBalance=Ap;exports.CreditGrants=Lf;exports.CreditUsageChart=uf;exports.CreditUtilization=Sf;exports.CustomerPortal=Td;exports.CustomerPortalProvider=oa;exports.CustomerUsageData=ba;exports.EmptyState=go;exports.EnumEntitlementGuard=bp;exports.ErrorState=mo;exports.GenericTable=po;exports.InvoicesSection=Ea;exports.MeteredEntitlementGuard=Cp;exports.NumericEntitlementGuard=yp;exports.PaymentDetailsSection=ya;exports.Paywall=vu;exports.Promotions=ca;exports.ProvisionStatus=ro;exports.StatusChip=fo;exports.StiggContext=Jt;exports.StiggProvider=du;exports.SubscribeIntentionType=ye;exports.SubscriptionsOverview=pa;exports.formatDateOnly=yo;exports.formatDateTime=ho;exports.mapCreditGrantStatusToVariant=Co;exports.useActiveSubscriptions=Fg;exports.useBooleanEntitlement=Wa;exports.useCreditBalance=ai;exports.useCreditGrants=uo;exports.useCreditUsage=so;exports.useCustomerPortal=Rg;exports.useEnumEntitlement=za;exports.useMeteredEntitlement=Za;exports.useNumericEntitlement=Ya;exports.usePaywall=jg;exports.useStiggContext=q;exports.useWaitForCheckoutCompleted=fp;Object.keys(b).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>b[e]})});