@stigg/react-sdk 7.7.1-beta.0 → 7.8.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +829 -0
- package/dist/index.d.ts +829 -935
- package/dist/stigg-sdk.cjs.js +5915 -0
- package/dist/stigg-sdk.esm.js +5915 -0
- package/package.json +18 -21
- package/dist/react-sdk.cjs.js +0 -3446
- package/dist/react-sdk.esm.js +0 -12191
- package/src/assets/add.svg +0 -3
- package/src/assets/addons.svg +0 -12
- package/src/assets/arrow-forward.svg +0 -3
- package/src/assets/arrow-right.svg +0 -6
- package/src/assets/billing-info-customer.svg +0 -11
- package/src/assets/check-stigg.svg +0 -3
- package/src/assets/check.svg +0 -5
- package/src/assets/close.svg +0 -3
- package/src/assets/contact-support.svg +0 -13
- package/src/assets/coupon.svg +0 -6
- package/src/assets/credit-card.svg +0 -10
- package/src/assets/dollar-coin.svg +0 -13
- package/src/assets/edit-icon.svg +0 -3
- package/src/assets/entitlement-check.svg +0 -3
- package/src/assets/lottie/checkout-success.json +0 -1
- package/src/assets/mini-schedule.svg +0 -3
- package/src/assets/outlined-checked-circle-disabled.svg +0 -6
- package/src/assets/outlined-checked-circle.svg +0 -6
- package/src/assets/outlined-circle.svg +0 -3
- package/src/assets/pay-as-you-go-charge.svg +0 -11
- package/src/assets/payment-method.svg +0 -4
- package/src/assets/plus-icon.svg +0 -6
- package/src/assets/powered-by-stigg.svg +0 -13
- package/src/assets/promotions.svg +0 -13
- package/src/assets/remove.svg +0 -3
- package/src/assets/restore.svg +0 -3
- package/src/assets/sand-clock.svg +0 -4
- package/src/assets/schedule-box.svg +0 -9
- package/src/assets/schedule.svg +0 -3
- package/src/assets/subscription-renews-icon.svg +0 -14
- package/src/assets/trash.svg +0 -8
- package/src/components/StiggProvider.tsx +0 -170
- package/src/components/checkout/Checkout.tsx +0 -37
- package/src/components/checkout/CheckoutContainer.style.ts +0 -51
- package/src/components/checkout/CheckoutContainer.tsx +0 -193
- package/src/components/checkout/CheckoutProvider.tsx +0 -181
- package/src/components/checkout/components/Button.tsx +0 -35
- package/src/components/checkout/components/ChangePlanButton.tsx +0 -30
- package/src/components/checkout/components/ContentLoadingSkeleton.tsx +0 -41
- package/src/components/checkout/components/DowngradeToFreeContainer.tsx +0 -115
- package/src/components/checkout/components/InputField.tsx +0 -26
- package/src/components/checkout/components/Skeletons.style.ts +0 -30
- package/src/components/checkout/components/StyledArrow.tsx +0 -9
- package/src/components/checkout/components/index.ts +0 -3
- package/src/components/checkout/configurations/steps.ts +0 -1
- package/src/components/checkout/configurations/textOverrides.ts +0 -150
- package/src/components/checkout/configurations/theme.ts +0 -46
- package/src/components/checkout/configurations/typography.ts +0 -30
- package/src/components/checkout/formatting.ts +0 -12
- package/src/components/checkout/hooks/index.ts +0 -8
- package/src/components/checkout/hooks/useAddonsStepModel.ts +0 -92
- package/src/components/checkout/hooks/useCheckoutModel.ts +0 -53
- package/src/components/checkout/hooks/useCouponModel.ts +0 -28
- package/src/components/checkout/hooks/useLoadCheckout.ts +0 -48
- package/src/components/checkout/hooks/usePaymentStepModel.ts +0 -68
- package/src/components/checkout/hooks/usePlanStepModel.ts +0 -184
- package/src/components/checkout/hooks/usePreviewSubscription.ts +0 -165
- package/src/components/checkout/hooks/useProgressBarModel.ts +0 -211
- package/src/components/checkout/hooks/useSubscriptionModel.ts +0 -22
- package/src/components/checkout/hooks/useSubscriptionState.ts +0 -26
- package/src/components/checkout/index.ts +0 -8
- package/src/components/checkout/planHeader/PlanHeader.tsx +0 -41
- package/src/components/checkout/planHeader/index.ts +0 -1
- package/src/components/checkout/progressBar/CheckoutProgressBar.style.ts +0 -35
- package/src/components/checkout/progressBar/CheckoutProgressBar.tsx +0 -82
- package/src/components/checkout/promotionCode/AddPromotionCode.tsx +0 -107
- package/src/components/checkout/promotionCode/AddPromotionCodeButton.tsx +0 -43
- package/src/components/checkout/promotionCode/AppliedPromotionCode.tsx +0 -49
- package/src/components/checkout/promotionCode/PromotionCodeSection.tsx +0 -40
- package/src/components/checkout/promotionCode/index.ts +0 -1
- package/src/components/checkout/steps/addons/CheckoutAddonsStep.style.tsx +0 -34
- package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +0 -144
- package/src/components/checkout/steps/addons/addon.utils.ts +0 -67
- package/src/components/checkout/steps/addons/components/AddonInputContainer.tsx +0 -84
- package/src/components/checkout/steps/addons/components/AddonTextContainer.tsx +0 -45
- package/src/components/checkout/steps/addons/index.ts +0 -1
- package/src/components/checkout/steps/payment/PaymentMethods.style.ts +0 -36
- package/src/components/checkout/steps/payment/PaymentMethods.tsx +0 -106
- package/src/components/checkout/steps/payment/PaymentStep.tsx +0 -63
- package/src/components/checkout/steps/payment/index.ts +0 -1
- package/src/components/checkout/steps/payment/stripe/StripePaymentForm.tsx +0 -79
- package/src/components/checkout/steps/payment/stripe/index.ts +0 -3
- package/src/components/checkout/steps/payment/stripe/stripe.utils.ts +0 -122
- package/src/components/checkout/steps/payment/stripe/useStripeIntegration.ts +0 -33
- package/src/components/checkout/steps/payment/stripe/useSubmit.ts +0 -135
- package/src/components/checkout/steps/payment/zuora/ZuoraPaymentForm.tsx +0 -128
- package/src/components/checkout/steps/payment/zuora/index.ts +0 -9
- package/src/components/checkout/steps/payment/zuora/useZuoraIntegration.ts +0 -57
- package/src/components/checkout/steps/payment/zuora/useZuoraSubmit.ts +0 -125
- package/src/components/checkout/steps/payment/zuora/zuora.utils.ts +0 -72
- package/src/components/checkout/steps/plan/BillingPeriodPicker.style.tsx +0 -69
- package/src/components/checkout/steps/plan/BillingPeriodPicker.tsx +0 -86
- package/src/components/checkout/steps/plan/CheckoutChargeList.tsx +0 -223
- package/src/components/checkout/steps/plan/CheckoutPlanStep.style.tsx +0 -6
- package/src/components/checkout/steps/plan/CheckoutPlanStep.tsx +0 -31
- package/src/components/checkout/steps/plan/index.ts +0 -1
- package/src/components/checkout/summary/CheckoutSuccess.tsx +0 -82
- package/src/components/checkout/summary/CheckoutSummary.tsx +0 -458
- package/src/components/checkout/summary/CheckoutSummarySkeleton.tsx +0 -38
- package/src/components/checkout/summary/components/CheckoutCaptions.tsx +0 -145
- package/src/components/checkout/summary/components/GraduatedPriceBreakdown.tsx +0 -70
- package/src/components/checkout/summary/components/LineItems.tsx +0 -275
- package/src/components/checkout/summary/components/WithSkeleton.tsx +0 -16
- package/src/components/checkout/summary/components/getPriceBreakdownString.ts +0 -66
- package/src/components/checkout/summary/index.ts +0 -2
- package/src/components/checkout/types.ts +0 -82
- package/src/components/common/CollapsableSectionIcon.tsx +0 -9
- package/src/components/common/Icon.tsx +0 -61
- package/src/components/common/InformationTooltip.tsx +0 -28
- package/src/components/common/LongText.tsx +0 -100
- package/src/components/common/PoweredByStigg.tsx +0 -59
- package/src/components/common/ProgressBar.tsx +0 -41
- package/src/components/common/StatusChip.tsx +0 -29
- package/src/components/common/TiersSelectContainer.tsx +0 -39
- package/src/components/common/Typography.tsx +0 -117
- package/src/components/common/VolumeBulkSelect.tsx +0 -74
- package/src/components/common/VolumePerUnitInput.tsx +0 -42
- package/src/components/common/chart/chartjs.helpers.ts +0 -17
- package/src/components/common/chart/chartjs.plugins.ts +0 -34
- package/src/components/common/chart/chartjs.theme.ts +0 -41
- package/src/components/common/chart/chartjs.tooltip.plugin.tsx +0 -224
- package/src/components/common/customIcons.ts +0 -24
- package/src/components/common/iconColor.ts +0 -15
- package/src/components/common/mapExternalTheme.ts +0 -147
- package/src/components/common/mediaQuery.ts +0 -19
- package/src/components/common/table/DataRows.tsx +0 -33
- package/src/components/common/table/EmptyState.tsx +0 -19
- package/src/components/common/table/ErrorState.tsx +0 -19
- package/src/components/common/table/GenericTable.tsx +0 -155
- package/src/components/common/table/LoadingRows.tsx +0 -33
- package/src/components/common/table/index.ts +0 -6
- package/src/components/common/table/types.ts +0 -30
- package/src/components/credits/balance/CreditBalance.tsx +0 -70
- package/src/components/credits/balance/CreditBalanceValue.tsx +0 -60
- package/src/components/credits/creditUsageChart/CreditUsage.chartjs.ts +0 -223
- package/src/components/credits/creditUsageChart/CreditUsageChart.tsx +0 -128
- package/src/components/credits/creditUsageChart/CreditUsageChartEmptyState.tsx +0 -29
- package/src/components/credits/creditUsageChart/CreditUsageChartErrorState.tsx +0 -19
- package/src/components/credits/creditUsageChart/CreditUsageChartHeader.tsx +0 -104
- package/src/components/credits/creditUsageChart/CreditUsageChartTooltip.tsx +0 -93
- package/src/components/credits/creditUsageChart/CreditUsageLegend.tsx +0 -141
- package/src/components/credits/creditUsageChart/types.ts +0 -4
- package/src/components/credits/grants/CreditGrants.tsx +0 -64
- package/src/components/credits/grants/CreditGrantsTable.tsx +0 -101
- package/src/components/credits/grants/types.ts +0 -38
- package/src/components/credits/grants/utils.ts +0 -25
- package/src/components/credits/hooks/useCreditBalance.ts +0 -75
- package/src/components/credits/hooks/useCreditGrants.ts +0 -40
- package/src/components/credits/hooks/useCreditUsage.ts +0 -50
- package/src/components/credits/index.ts +0 -15
- package/src/components/credits/localization.ts +0 -25
- package/src/components/credits/utilization/CreditUtilization.tsx +0 -74
- package/src/components/credits/utilization/CreditUtilizationValue.tsx +0 -113
- package/src/components/credits/utils/creditBalanceUtils.ts +0 -31
- package/src/components/credits/utils/creditGrantUtils.ts +0 -27
- package/src/components/customerPortal/CustomerPortal.style.ts +0 -20
- package/src/components/customerPortal/CustomerPortal.tsx +0 -37
- package/src/components/customerPortal/CustomerPortalContainer.tsx +0 -77
- package/src/components/customerPortal/CustomerPortalContext.ts +0 -32
- package/src/components/customerPortal/CustomerPortalHeader.tsx +0 -18
- package/src/components/customerPortal/CustomerPortalProvider.tsx +0 -49
- package/src/components/customerPortal/billing/InformationGrid.tsx +0 -54
- package/src/components/customerPortal/billing/InvoicesSection.tsx +0 -41
- package/src/components/customerPortal/billing/PaymentDetailsSection.tsx +0 -140
- package/src/components/customerPortal/common/ExternalLinkButton.tsx +0 -34
- package/src/components/customerPortal/common/SectionContainer.tsx +0 -22
- package/src/components/customerPortal/common/SectionHeader.ts +0 -15
- package/src/components/customerPortal/common/SectionTitle.tsx +0 -23
- package/src/components/customerPortal/common/SkeletonButton.tsx +0 -5
- package/src/components/customerPortal/common/StyledButton.tsx +0 -13
- package/src/components/customerPortal/customerPortalTextOverrides.ts +0 -39
- package/src/components/customerPortal/customerPortalTheme.ts +0 -35
- package/src/components/customerPortal/hooks/useCustomerPortal.ts +0 -39
- package/src/components/customerPortal/index.ts +0 -16
- package/src/components/customerPortal/paywall/CustomerPortalPaywall.style.ts +0 -33
- package/src/components/customerPortal/paywall/CustomerPortalPaywall.tsx +0 -36
- package/src/components/customerPortal/subscriptionOverview/ContactCustomerSupport.tsx +0 -50
- package/src/components/customerPortal/subscriptionOverview/SubscriptionOverviewLoader.tsx +0 -28
- package/src/components/customerPortal/subscriptionOverview/SubscriptionsOverview.tsx +0 -106
- package/src/components/customerPortal/subscriptionOverview/SubscriptionsOverviewHeader.tsx +0 -48
- package/src/components/customerPortal/subscriptionOverview/charges/ChargeItem.tsx +0 -74
- package/src/components/customerPortal/subscriptionOverview/charges/ChargeList.tsx +0 -65
- package/src/components/customerPortal/subscriptionOverview/subscriptionScheduledUpdates/SubscriptionScheduledUpdateRow.tsx +0 -110
- package/src/components/customerPortal/subscriptionOverview/subscriptionScheduledUpdates/SubscriptionScheduledUpdatesAlert.tsx +0 -158
- package/src/components/customerPortal/subscriptionOverview/subscriptionView/SubscriptionView.style.ts +0 -6
- package/src/components/customerPortal/subscriptionOverview/subscriptionView/SubscriptionView.tsx +0 -37
- package/src/components/customerPortal/subscriptionOverview/subscriptionView/TrialPanel.tsx +0 -58
- package/src/components/customerPortal/subscriptionOverview/tabs/AddonsList.tsx +0 -28
- package/src/components/customerPortal/subscriptionOverview/tabs/Promotions.tsx +0 -62
- package/src/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.style.tsx +0 -32
- package/src/components/customerPortal/subscriptionOverview/tabs/SubscriptionTabs.tsx +0 -100
- package/src/components/customerPortal/subscriptionOverview/types/customerPortal.types.ts +0 -4
- package/src/components/customerPortal/subscriptionOverview/upcomingBilling/NextEstimatedBill.tsx +0 -29
- package/src/components/customerPortal/subscriptionOverview/upcomingBilling/NoUpcomingBilling.tsx +0 -18
- package/src/components/customerPortal/subscriptionOverview/upcomingBilling/UpcomingBilling.tsx +0 -89
- package/src/components/customerPortal/types.ts +0 -20
- package/src/components/customerPortal/usage/CustomerUsageData.style.tsx +0 -22
- package/src/components/customerPortal/usage/CustomerUsageData.tsx +0 -124
- package/src/components/customerPortal/usage/featureUsage/EntitlementCTAButton.tsx +0 -62
- package/src/components/customerPortal/usage/featureUsage/FeatureUsage.helper.ts +0 -45
- package/src/components/customerPortal/usage/featureUsage/FeatureUsage.style.ts +0 -13
- package/src/components/customerPortal/usage/featureUsage/FeatureUsage.tsx +0 -96
- package/src/components/customerPortal/usage/featureUsage/FeatureUsageProgressBar.tsx +0 -56
- package/src/components/guards/BooleanEntitlementGuard.tsx +0 -21
- package/src/components/guards/EnumEntitlementGuard.tsx +0 -17
- package/src/components/guards/MeteredEntitlementGuard.tsx +0 -21
- package/src/components/guards/NumericEntitlementGuard.tsx +0 -21
- package/src/components/hooks/index.ts +0 -1
- package/src/components/hooks/useChargeSort.ts +0 -17
- package/src/components/hooks/useIsScreenWiderThan.ts +0 -6
- package/src/components/hooks/useWaitForCheckoutCompleted.ts +0 -65
- package/src/components/paywall/BillingPeriodPicker.tsx +0 -90
- package/src/components/paywall/EntitlementRow.tsx +0 -127
- package/src/components/paywall/Paywall.tsx +0 -189
- package/src/components/paywall/PaywallContainer.tsx +0 -119
- package/src/components/paywall/PaywallLoader.tsx +0 -96
- package/src/components/paywall/PlanCompatibleAddons.tsx +0 -127
- package/src/components/paywall/PlanEntitlements.tsx +0 -75
- package/src/components/paywall/PlanOffering.tsx +0 -256
- package/src/components/paywall/PlanOfferingButton.tsx +0 -232
- package/src/components/paywall/PlanPrice.tsx +0 -154
- package/src/components/paywall/hooks/useLoadPaywallData.ts +0 -75
- package/src/components/paywall/index.ts +0 -5
- package/src/components/paywall/paywallTextOverrides.ts +0 -79
- package/src/components/paywall/types.ts +0 -80
- package/src/components/paywall/utils/calculateTrialDaysLeft.ts +0 -5
- package/src/components/paywall/utils/calculateUnitQuantityText.ts +0 -23
- package/src/components/paywall/utils/computeDefaultBillingPeriod.ts +0 -36
- package/src/components/paywall/utils/getPlansToDisplay.ts +0 -13
- package/src/components/paywall/utils/hasPricePoints.ts +0 -10
- package/src/components/paywall/utils/mapPaywallData.ts +0 -126
- package/src/components/utils/calculateDiscountRate.ts +0 -49
- package/src/components/utils/currencyUtils.ts +0 -38
- package/src/components/utils/dateUtils.ts +0 -17
- package/src/components/utils/fixtures/price.fixtures.ts +0 -42
- package/src/components/utils/formatNumber.ts +0 -5
- package/src/components/utils/getFeatureName.ts +0 -26
- package/src/components/utils/getPaidPriceText.ts +0 -77
- package/src/components/utils/getPlanPrice.ts +0 -62
- package/src/components/utils/getSubscriptionScheduleUpdateTexts.tsx +0 -88
- package/src/components/utils/numberUtils.ts +0 -6
- package/src/components/utils/onWheelBlur.ts +0 -3
- package/src/components/utils/planPrices.ts +0 -10
- package/src/components/utils/priceTierUtils.spec.ts +0 -84
- package/src/components/utils/priceTierUtils.ts +0 -250
- package/src/components/utils/priceUtils.ts +0 -11
- package/src/custom.d.ts +0 -6
- package/src/hooks/index.ts +0 -8
- package/src/hooks/useActiveSubscriptions.ts +0 -21
- package/src/hooks/useBooleanEntitlement.ts +0 -20
- package/src/hooks/useCustomerPortal.ts +0 -21
- package/src/hooks/useEnumEntitlement.ts +0 -20
- package/src/hooks/useFetch.ts +0 -32
- package/src/hooks/useMeteredEntitlement.ts +0 -20
- package/src/hooks/useNumericEntitlement.ts +0 -20
- package/src/hooks/usePaywall.ts +0 -21
- package/src/hooks/useStiggContext.ts +0 -13
- package/src/index.ts +0 -103
- package/src/services/logger.ts +0 -22
- package/src/stories/Checkout.stories.tsx +0 -123
- package/src/stories/CreditBalance.stories.tsx +0 -248
- package/src/stories/CreditGrants.stories.tsx +0 -210
- package/src/stories/CreditUsageChart.stories.tsx +0 -347
- package/src/stories/CreditUtilization.stories.tsx +0 -287
- package/src/stories/CustomTheme.ts +0 -57
- package/src/stories/CustomerPortal.stories.tsx +0 -265
- package/src/stories/GenericTable.stories.tsx +0 -263
- package/src/stories/Paywall.stories.tsx +0 -147
- package/src/stories/ProgressBar.stories.tsx +0 -103
- package/src/stories/StatusChip.stories.tsx +0 -154
- package/src/stories/baseArgs.ts +0 -10
- package/src/stories/mocks/checkout/consts.ts +0 -15
- package/src/stories/mocks/checkout/mockCheckoutPreview.ts +0 -152
- package/src/stories/mocks/checkout/mockCheckoutState.ts +0 -212
- package/src/styles.css +0 -46
- package/src/theme/Fonts.tsx +0 -80
- package/src/theme/Theme.tsx +0 -64
- package/src/theme/emotion.d.ts +0 -17
- package/src/theme/getResolvedTheme.ts +0 -135
- package/src/theme/types.ts +0 -85
- package/src/types.ts +0 -22
- package/src/utils/styledUtils.ts +0 -64
package/dist/react-sdk.cjs.js
DELETED
|
@@ -1,3446 +0,0 @@
|
|
|
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`
|
|
2
|
-
margin: 0;
|
|
3
|
-
${({$isInline:e})=>e&&"display: inline"};
|
|
4
|
-
|
|
5
|
-
/* Apply typography styles from theme */
|
|
6
|
-
font-family: ${({theme:e})=>e.stigg.typography.fontFamily};
|
|
7
|
-
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};
|
|
10
|
-
${({$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`
|
|
13
|
-
path {
|
|
14
|
-
fill: ${e};
|
|
15
|
-
}
|
|
16
|
-
`}
|
|
17
|
-
|
|
18
|
-
${({$rectColor:e})=>e&&ne.css`
|
|
19
|
-
svg rect {
|
|
20
|
-
fill: ${e};
|
|
21
|
-
}
|
|
22
|
-
`}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
${({$strokeColor:e})=>e&&ne.css`
|
|
26
|
-
g {
|
|
27
|
-
stroke: ${e};
|
|
28
|
-
}
|
|
29
|
-
`}
|
|
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)`
|
|
31
|
-
margin: 0;
|
|
32
|
-
`,Jr=p.div`
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
gap: 16px;
|
|
36
|
-
`,eo=p.div`
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
flex-shrink: 0;
|
|
40
|
-
`,to=p(ce)`
|
|
41
|
-
width: 24px;
|
|
42
|
-
height: 24px;
|
|
43
|
-
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`
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
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)`
|
|
49
|
-
margin-left: 10px;
|
|
50
|
-
`,po=p.button`
|
|
51
|
-
cursor: ${({$disabled:e})=>e?"default":"pointer"};
|
|
52
|
-
padding: 8px 12px;
|
|
53
|
-
background-color: ${({theme:e})=>e.stigg.palette.backgroundButton};
|
|
54
|
-
border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedRestingBorder}`};
|
|
55
|
-
border-radius: 10px;
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
justify-content: center;
|
|
59
|
-
min-height: 42px;
|
|
60
|
-
min-width: 120px;
|
|
61
|
-
|
|
62
|
-
${({$disabled:e})=>e&&ne.css`
|
|
63
|
-
opacity: 0.5;
|
|
64
|
-
`}
|
|
65
|
-
|
|
66
|
-
&:hover {
|
|
67
|
-
background-color: ${({theme:e,$disabled:n})=>n?e.stigg.palette.backgroundButton:e.stigg.palette.outlinedHoverBackground};
|
|
68
|
-
}
|
|
69
|
-
`,fo=p(y)`
|
|
70
|
-
margin: 0;
|
|
71
|
-
font-size: 15px;
|
|
72
|
-
`,ho=p(y)`
|
|
73
|
-
min-height: 87px;
|
|
74
|
-
`,yo=p.button`
|
|
75
|
-
background: none;
|
|
76
|
-
border: none;
|
|
77
|
-
padding: 0;
|
|
78
|
-
color: ${({theme:e})=>e.stigg.palette.text.secondary};
|
|
79
|
-
|
|
80
|
-
text-decoration: underline;
|
|
81
|
-
cursor: pointer;
|
|
82
|
-
`,Co=p(y)`
|
|
83
|
-
margin-top: 8px;
|
|
84
|
-
margin-bottom: 17px;
|
|
85
|
-
min-height: 20px;
|
|
86
|
-
`,Po=p.div`
|
|
87
|
-
display: flex;
|
|
88
|
-
flex-direction: column;
|
|
89
|
-
margin-top: 4px;
|
|
90
|
-
align-self: ${({theme:e})=>xi(e.stigg.layout.ctaAlignment)};
|
|
91
|
-
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)`
|
|
93
|
-
border-radius: 10px;
|
|
94
|
-
text-transform: none;
|
|
95
|
-
|
|
96
|
-
background-color: ${({theme:e,$success:n,$error:i})=>n?e.stigg.palette.success:i?e.stigg.palette.error:""};
|
|
97
|
-
|
|
98
|
-
&:hover {
|
|
99
|
-
background-color: ${({theme:e,$success:n,$error:i})=>n?e.stigg.palette.successDark:i?e.stigg.palette.errorDark:""};
|
|
100
|
-
}
|
|
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)`
|
|
102
|
-
display: flex;
|
|
103
|
-
flex-direction: ${({$flexDirection:e})=>e||"row"};
|
|
104
|
-
gap: ${({$gap:e})=>e}px;
|
|
105
|
-
`,Do=p(qe)`
|
|
106
|
-
span {
|
|
107
|
-
display: flex;
|
|
108
|
-
flex: 1;
|
|
109
|
-
}
|
|
110
|
-
`,Yt=p(j)`
|
|
111
|
-
span {
|
|
112
|
-
display: flex;
|
|
113
|
-
flex: ${({flex:e})=>e};
|
|
114
|
-
}
|
|
115
|
-
`,Q=p(V)`
|
|
116
|
-
border-radius: 4px;
|
|
117
|
-
`,Mn=p(j)`
|
|
118
|
-
display: flex;
|
|
119
|
-
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)`
|
|
121
|
-
border-radius: 10px;
|
|
122
|
-
min-height: 42px;
|
|
123
|
-
min-width: 120px;
|
|
124
|
-
|
|
125
|
-
&:hover .MuiOutlinedInput-notchedOutline {
|
|
126
|
-
border-color: ${({theme:e})=>e.stigg.palette.outlinedBorder};
|
|
127
|
-
}
|
|
128
|
-
`,vo=p(or)`
|
|
129
|
-
& .MuiInputBase-input {
|
|
130
|
-
padding: 10px 12px;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&.Mui-focused .MuiOutlinedInput-notchedOutline {
|
|
134
|
-
border-color: ${({theme:e})=>e.stigg.palette.primary} !important;
|
|
135
|
-
}
|
|
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)`
|
|
137
|
-
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)`
|
|
139
|
-
word-break: break-word;
|
|
140
|
-
width: 100%;
|
|
141
|
-
`,wo=p(y)`
|
|
142
|
-
white-space: nowrap;
|
|
143
|
-
`,Fo=p(y)`
|
|
144
|
-
white-space: normal;
|
|
145
|
-
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)`
|
|
147
|
-
padding: 0px;
|
|
148
|
-
text-transform: none;
|
|
149
|
-
margin-left: 0px;
|
|
150
|
-
`,Ro=p(y)`
|
|
151
|
-
font-size: 14px;
|
|
152
|
-
font-weight: 500;
|
|
153
|
-
`,Lo=p.div`
|
|
154
|
-
width: 100%;
|
|
155
|
-
gap: 10px;
|
|
156
|
-
`,Bo=p.div`
|
|
157
|
-
margin-top: 10px;
|
|
158
|
-
overflow: hidden;
|
|
159
|
-
display: flex;
|
|
160
|
-
flex-direction: column;
|
|
161
|
-
gap: 4px;
|
|
162
|
-
width: 100%;
|
|
163
|
-
`,Oo=p.div`
|
|
164
|
-
display: flex;
|
|
165
|
-
flex-direction: row;
|
|
166
|
-
flex-wrap: nowrap;
|
|
167
|
-
align-items: center;
|
|
168
|
-
justify-content: space-between;
|
|
169
|
-
padding: 8px 0px;
|
|
170
|
-
max-height: 44px;
|
|
171
|
-
gap: 16px;
|
|
172
|
-
`,$o=p(y)`
|
|
173
|
-
overflow: hidden;
|
|
174
|
-
font-feature-settings: 'liga' off, 'clig' off;
|
|
175
|
-
text-overflow: ellipsis;
|
|
176
|
-
font-family: 'DM Sans';
|
|
177
|
-
letter-spacing: 0.15px;
|
|
178
|
-
white-space: nowrap;
|
|
179
|
-
min-width: 0;
|
|
180
|
-
flex-shrink: 1;
|
|
181
|
-
`,_o=p(ce)`
|
|
182
|
-
width: 24px;
|
|
183
|
-
height: 24px;
|
|
184
|
-
color: ${({theme:e})=>e.stigg.palette.primary};
|
|
185
|
-
`,Go=p.div`
|
|
186
|
-
flex: 1;
|
|
187
|
-
min-width: 0;
|
|
188
|
-
`,Vo=p.div`
|
|
189
|
-
margin-top: 16px;
|
|
190
|
-
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`
|
|
192
|
-
position: relative;
|
|
193
|
-
background-color: ${({theme:e,$isCurrentPlan:n})=>n?e.stigg.palette.backgroundHighlight:e.stigg.palette.backgroundPaper};
|
|
194
|
-
border: ${({theme:e,$isHighlighted:n})=>n?`3px solid ${e.stigg.palette.primary}`:`1px solid ${e.stigg.palette.outlinedBorder}`};
|
|
195
|
-
border-radius: 10px;
|
|
196
|
-
padding: ${({theme:e})=>e.stigg.layout.planPadding};
|
|
197
|
-
display: flex;
|
|
198
|
-
min-width: ${({theme:e})=>e.stigg.layout.planMinWidth};
|
|
199
|
-
max-width: ${({theme:e})=>e.stigg.layout.planMaxWidth};
|
|
200
|
-
flex-direction: column;
|
|
201
|
-
align-items: flex-start;
|
|
202
|
-
justify-content: flex-start;
|
|
203
|
-
position: relative;
|
|
204
|
-
`,Yo=p.div`
|
|
205
|
-
margin-top: ${({$planHasEntitlements:e})=>e?"32px":"0px"};
|
|
206
|
-
`,Zo=p(y)`
|
|
207
|
-
padding-bottom: 8px;
|
|
208
|
-
`,zo=p.div`
|
|
209
|
-
height: 2px;
|
|
210
|
-
width: 100%;
|
|
211
|
-
background-color: ${({theme:e})=>e.stigg.palette.outlinedBorder};
|
|
212
|
-
margin-bottom: 40px;
|
|
213
|
-
`,Ko=p(y)`
|
|
214
|
-
text-align: ${({theme:e})=>e.stigg.layout.descriptionAlignment};
|
|
215
|
-
min-height: ${({theme:e})=>e.stigg.layout.descriptionMinHeight};
|
|
216
|
-
`,Qo=p.div`
|
|
217
|
-
background-color: ${({theme:e})=>e.stigg.palette.primary};
|
|
218
|
-
border-radius: 40px;
|
|
219
|
-
position: absolute;
|
|
220
|
-
top: -12px;
|
|
221
|
-
`,Xo=p(y)`
|
|
222
|
-
margin: 0;
|
|
223
|
-
padding: 2px 8px;
|
|
224
|
-
`,Jo=p.div`
|
|
225
|
-
width: 100%;
|
|
226
|
-
display: flex;
|
|
227
|
-
flex-direction: column;
|
|
228
|
-
align-items: ${({theme:e})=>xi(e.stigg.layout.headerAlignment)};
|
|
229
|
-
`,es=p.div`
|
|
230
|
-
position: absolute;
|
|
231
|
-
top: 0;
|
|
232
|
-
background-color: ${({theme:e})=>e.stigg.palette.outlinedBorder};
|
|
233
|
-
border-radius: 0px 0px 10px 10px;
|
|
234
|
-
padding: 3px 12px;
|
|
235
|
-
`,ts=p(Si)`
|
|
236
|
-
display: flex;
|
|
237
|
-
height: 100%;
|
|
238
|
-
margin-right: 4px;
|
|
239
|
-
|
|
240
|
-
path {
|
|
241
|
-
fill: ${({theme:e})=>e.stigg.palette.text.primary};
|
|
242
|
-
}
|
|
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`
|
|
244
|
-
height: 40px;
|
|
245
|
-
padding: 0 20px;
|
|
246
|
-
margin-bottom: ${({theme:e})=>e.stigg.layout.switchBottomSpacing};
|
|
247
|
-
border-radius: 10px;
|
|
248
|
-
border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedBorder}`};
|
|
249
|
-
background-color: ${({theme:e})=>e.stigg.palette.backgroundPaper};
|
|
250
|
-
display: flex;
|
|
251
|
-
align-items: center;
|
|
252
|
-
justify-content: center;
|
|
253
|
-
`,Rn=p(y)`
|
|
254
|
-
margin: 0 8px;
|
|
255
|
-
`,rs=p(lr)`
|
|
256
|
-
& .react-switch-bg {
|
|
257
|
-
border: ${({theme:e})=>`1px solid ${e.stigg.palette.switchBorder}`};
|
|
258
|
-
background: ${({theme:e})=>e.stigg.palette.switchFill} !important;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
& .react-switch-handle {
|
|
262
|
-
box-shadow: ${({theme:e})=>e.stigg.shadows.light};
|
|
263
|
-
background: ${({theme:e})=>e.stigg.palette.switchHandle} !important;
|
|
264
|
-
top: 0.5px !important;
|
|
265
|
-
}
|
|
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)`
|
|
267
|
-
* {
|
|
268
|
-
fill: ${({theme:e})=>e.stigg.palette.text.secondary};
|
|
269
|
-
}
|
|
270
|
-
`,ms=p.div`
|
|
271
|
-
align-self: ${({$alignSelf:e})=>e||"unset"};
|
|
272
|
-
|
|
273
|
-
@media (max-width: 1040px) {
|
|
274
|
-
${({$smallScreenAlign:e})=>e&&`align-self: ${e};`}
|
|
275
|
-
}
|
|
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`
|
|
277
|
-
color: ${({theme:e})=>e.stigg.palette.text.primary};
|
|
278
|
-
display: flex;
|
|
279
|
-
align-items: stretch;
|
|
280
|
-
justify-content: center;
|
|
281
|
-
flex-wrap: wrap;
|
|
282
|
-
padding: 10px 0;
|
|
283
|
-
gap: ${({theme:e})=>e.stigg.layout.planMargin};
|
|
284
|
-
`,fs=p.div`
|
|
285
|
-
display: flex;
|
|
286
|
-
flex-direction: column;
|
|
287
|
-
align-items: center;
|
|
288
|
-
|
|
289
|
-
& * {
|
|
290
|
-
box-sizing: border-box;
|
|
291
|
-
}
|
|
292
|
-
`,hs=p.div`
|
|
293
|
-
display: flex;
|
|
294
|
-
flex-direction: column;
|
|
295
|
-
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`
|
|
297
|
-
display: flex;
|
|
298
|
-
flex-direction: column;
|
|
299
|
-
align-items: center;
|
|
300
|
-
`,Mt=p(Fs)`
|
|
301
|
-
margin-right: 16px;
|
|
302
|
-
`,Us=p.div`
|
|
303
|
-
display: flex;
|
|
304
|
-
flex-direction: column;
|
|
305
|
-
align-items: flex-start;
|
|
306
|
-
gap: 20px;
|
|
307
|
-
border-radius: 10px;
|
|
308
|
-
padding: ${({theme:e})=>e.stigg.layout.planPadding};
|
|
309
|
-
background-color: ${({theme:e})=>e.stigg.palette.backgroundPaper};
|
|
310
|
-
min-width: ${({theme:e})=>e.stigg.layout.planMinWidth};
|
|
311
|
-
max-width: ${({theme:e})=>e.stigg.layout.planMaxWidth};
|
|
312
|
-
min-height: 450px;
|
|
313
|
-
border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedBorder}`};
|
|
314
|
-
`,Ms=p.div`
|
|
315
|
-
display: flex;
|
|
316
|
-
gap: ${({theme:e})=>e.stigg.layout.planMargin};
|
|
317
|
-
flex-wrap: wrap;
|
|
318
|
-
justify-content: center;
|
|
319
|
-
`,Rt=p.div`
|
|
320
|
-
display: flex;
|
|
321
|
-
align-items: center;
|
|
322
|
-
margin-bottom: 12px;
|
|
323
|
-
`,Rs=p.div`
|
|
324
|
-
margin-top: auto;
|
|
325
|
-
`,Ls=p.div`
|
|
326
|
-
width: 150px;
|
|
327
|
-
margin-bottom: ${({theme:e})=>e.stigg.layout.switchBottomSpacing};
|
|
328
|
-
padding: 12px 12px;
|
|
329
|
-
border-radius: 10px;
|
|
330
|
-
background-color: white;
|
|
331
|
-
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`
|
|
333
|
-
${e&&`
|
|
334
|
-
@font-face {
|
|
335
|
-
font-family: 'custom-font';
|
|
336
|
-
font-style: normal;
|
|
337
|
-
font-weight: normal;
|
|
338
|
-
src: local('custom-font'), url(${e}) format('woff');
|
|
339
|
-
}
|
|
340
|
-
`}
|
|
341
|
-
|
|
342
|
-
/* latin-ext */
|
|
343
|
-
@font-face {
|
|
344
|
-
font-family: 'DM Sans';
|
|
345
|
-
font-style: normal;
|
|
346
|
-
font-weight: 400;
|
|
347
|
-
font-display: swap;
|
|
348
|
-
src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZ2IHTWEBlwu8Q.woff2) format('woff2');
|
|
349
|
-
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,
|
|
350
|
-
U+A720-A7FF;
|
|
351
|
-
}
|
|
352
|
-
/* latin */
|
|
353
|
-
@font-face {
|
|
354
|
-
font-family: 'DM Sans';
|
|
355
|
-
font-style: normal;
|
|
356
|
-
font-weight: 400;
|
|
357
|
-
font-display: swap;
|
|
358
|
-
src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZOIHTWEBlw.woff2) format('woff2');
|
|
359
|
-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,
|
|
360
|
-
U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
361
|
-
}
|
|
362
|
-
/* latin-ext */
|
|
363
|
-
@font-face {
|
|
364
|
-
font-family: 'DM Sans';
|
|
365
|
-
font-style: normal;
|
|
366
|
-
font-weight: 500;
|
|
367
|
-
font-display: swap;
|
|
368
|
-
src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriAWCrCBamC3YU-CnE6Q.woff2) format('woff2');
|
|
369
|
-
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,
|
|
370
|
-
U+A720-A7FF;
|
|
371
|
-
}
|
|
372
|
-
/* latin */
|
|
373
|
-
@font-face {
|
|
374
|
-
font-family: 'DM Sans';
|
|
375
|
-
font-style: normal;
|
|
376
|
-
font-weight: 500;
|
|
377
|
-
font-display: swap;
|
|
378
|
-
src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriAWCrCBimC3YU-Ck.woff2) format('woff2');
|
|
379
|
-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,
|
|
380
|
-
U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
381
|
-
}
|
|
382
|
-
/* latin-ext */
|
|
383
|
-
@font-face {
|
|
384
|
-
font-family: 'DM Sans';
|
|
385
|
-
font-style: normal;
|
|
386
|
-
font-weight: 700;
|
|
387
|
-
font-display: swap;
|
|
388
|
-
src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriASitCBamC3YU-CnE6Q.woff2) format('woff2');
|
|
389
|
-
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,
|
|
390
|
-
U+A720-A7FF;
|
|
391
|
-
}
|
|
392
|
-
/* latin */
|
|
393
|
-
@font-face {
|
|
394
|
-
font-family: 'DM Sans';
|
|
395
|
-
font-style: normal;
|
|
396
|
-
font-weight: 700;
|
|
397
|
-
font-display: swap;
|
|
398
|
-
src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriASitCBimC3YU-Ck.woff2) format('woff2');
|
|
399
|
-
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
|
-
U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
401
|
-
}
|
|
402
|
-
`}),$s=p.div`
|
|
403
|
-
${({$customCss:e})=>e&&ne.css`
|
|
404
|
-
${e}
|
|
405
|
-
`}
|
|
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)`
|
|
407
|
-
border-radius: 10px;
|
|
408
|
-
padding: 8px 16px;
|
|
409
|
-
text-transform: none;
|
|
410
|
-
|
|
411
|
-
&,
|
|
412
|
-
&:hover {
|
|
413
|
-
border-color: ${({theme:e})=>e.stigg.palette.outlinedRestingBorder};
|
|
414
|
-
}
|
|
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`
|
|
416
|
-
display: flex;
|
|
417
|
-
align-items: center;
|
|
418
|
-
justify-content: space-between;
|
|
419
|
-
|
|
420
|
-
${({$disableMargin:e})=>!e&&`
|
|
421
|
-
&:not(:last-child) {
|
|
422
|
-
margin-bottom: 32px;
|
|
423
|
-
}
|
|
424
|
-
`};
|
|
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)`
|
|
426
|
-
path {
|
|
427
|
-
stroke: ${({theme:e})=>e.stigg.palette.primary};
|
|
428
|
-
}
|
|
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`
|
|
430
|
-
display: flex;
|
|
431
|
-
justify-content: space-between;
|
|
432
|
-
align-items: center;
|
|
433
|
-
gap: 64px;
|
|
434
|
-
border-bottom: ${({$borderColor:e})=>`1px solid ${e}`};
|
|
435
|
-
padding: 16px 0;
|
|
436
|
-
|
|
437
|
-
& > *:first-of-type {
|
|
438
|
-
max-width: 60%;
|
|
439
|
-
}
|
|
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)`
|
|
441
|
-
.MuiTabs-indicator {
|
|
442
|
-
background-color: #001e6c;
|
|
443
|
-
}
|
|
444
|
-
`,Qs=p.div`
|
|
445
|
-
width: 100%;
|
|
446
|
-
flex: 1;
|
|
447
|
-
margin-top: 16px;
|
|
448
|
-
`,Xs=p(z)`
|
|
449
|
-
margin-top: 16px;
|
|
450
|
-
max-height: ${({$maxHeight:e})=>e};
|
|
451
|
-
overflow-y: auto;
|
|
452
|
-
`;p.div`
|
|
453
|
-
display: flex;
|
|
454
|
-
flex-direction: column;
|
|
455
|
-
padding: 24px;
|
|
456
|
-
border: ${({$borderColor:e})=>`1px solid ${e}`};
|
|
457
|
-
border-radius: 10px;
|
|
458
|
-
margin-bottom: 16px;
|
|
459
|
-
row-gap: 16px;
|
|
460
|
-
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`
|
|
462
|
-
display: flex;
|
|
463
|
-
justify-content: space-between;
|
|
464
|
-
flex-wrap: wrap;
|
|
465
|
-
`,tc=p.div`
|
|
466
|
-
display: flex;
|
|
467
|
-
flex-direction: column;
|
|
468
|
-
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)`
|
|
470
|
-
border-bottom: ${({$borderColor:e})=>`1px solid ${e}`};
|
|
471
|
-
border-top-left-radius: 10px;
|
|
472
|
-
border-top-right-radius: 10px;
|
|
473
|
-
margin: -64px -64px 64px -64px;
|
|
474
|
-
padding: 24px 32px;
|
|
475
|
-
`,cc=p(gi)`
|
|
476
|
-
margin-left: 4px;
|
|
477
|
-
`,lc=p(Di)`
|
|
478
|
-
color: ${({theme:e})=>e.stigg.palette.primary};
|
|
479
|
-
path {
|
|
480
|
-
fill: ${({theme:e})=>e.stigg.palette.primary};
|
|
481
|
-
}
|
|
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`
|
|
483
|
-
width: 100%;
|
|
484
|
-
display: flex;
|
|
485
|
-
flex-direction: column;
|
|
486
|
-
border-radius: 10px;
|
|
487
|
-
background-color: ${({$backgroundColor:e})=>e};
|
|
488
|
-
border: ${({$borderColor:e})=>`1px solid ${e}`};
|
|
489
|
-
|
|
490
|
-
padding: 16px;
|
|
491
|
-
${ge.sm} {
|
|
492
|
-
padding: 32px;
|
|
493
|
-
}
|
|
494
|
-
${ge.md} {
|
|
495
|
-
padding: 48px;
|
|
496
|
-
}
|
|
497
|
-
${ge.lg} {
|
|
498
|
-
padding: 64px;
|
|
499
|
-
}
|
|
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`
|
|
501
|
-
display: flex;
|
|
502
|
-
flex-direction: column;
|
|
503
|
-
align-items: left;
|
|
504
|
-
gap: 8px;
|
|
505
|
-
`,fc=p(be)`
|
|
506
|
-
width: fit-content;
|
|
507
|
-
&.MuiButton-root {
|
|
508
|
-
padding: 0;
|
|
509
|
-
&:hover {
|
|
510
|
-
background: none;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
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`
|
|
514
|
-
max-height: 278px;
|
|
515
|
-
display: flex;
|
|
516
|
-
flex-direction: column;
|
|
517
|
-
border-radius: 10px;
|
|
518
|
-
background-color: ${({theme:e})=>e.stigg.palette.backgroundSection};
|
|
519
|
-
border: ${({$borderColor:e})=>`1px solid ${e}`};
|
|
520
|
-
padding: 32px;
|
|
521
|
-
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)`
|
|
523
|
-
display: ${({$display:e})=>e};
|
|
524
|
-
-webkit-line-clamp: ${({$maxLines:e})=>e};
|
|
525
|
-
-webkit-box-orient: vertical;
|
|
526
|
-
text-overflow: ellipsis;
|
|
527
|
-
overflow: hidden;
|
|
528
|
-
white-space: normal;
|
|
529
|
-
${({$wordBreak:e})=>e&&ne.css`
|
|
530
|
-
word-break: break-word;
|
|
531
|
-
`}
|
|
532
|
-
|
|
533
|
-
${({$bold:e})=>e&&ne.css`
|
|
534
|
-
font-weight: bold;
|
|
535
|
-
`}
|
|
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`
|
|
537
|
-
width: 100%;
|
|
538
|
-
display: flex;
|
|
539
|
-
align-items: center;
|
|
540
|
-
gap: 4px;
|
|
541
|
-
background-color: ${({theme:e})=>e.stigg.palette.warning};
|
|
542
|
-
border-radius: 10px;
|
|
543
|
-
padding: 8px 16px;
|
|
544
|
-
margin-top: 16px;
|
|
545
|
-
`,Sc=p(pi)`
|
|
546
|
-
text-decoration-color: white;
|
|
547
|
-
color: white;
|
|
548
|
-
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)`
|
|
550
|
-
height: 4px;
|
|
551
|
-
background-color: ${({theme:e})=>ae(e.stigg.palette.primary).alpha(.4).string()};
|
|
552
|
-
|
|
553
|
-
span {
|
|
554
|
-
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
|
-
}
|
|
556
|
-
`,Ac=p(je)`
|
|
557
|
-
border-style: dotted;
|
|
558
|
-
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)`
|
|
561
|
-
text-transform: none;
|
|
562
|
-
padding: 0;
|
|
563
|
-
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`
|
|
565
|
-
display: flex;
|
|
566
|
-
width: 100%;
|
|
567
|
-
align-items: flex-end;
|
|
568
|
-
justify-content: flex-end;
|
|
569
|
-
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)`
|
|
571
|
-
text-transform: none;
|
|
572
|
-
`,Uc=p(Te.ExternalLink)`
|
|
573
|
-
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`
|
|
575
|
-
display: flex;
|
|
576
|
-
flex-direction: column;
|
|
577
|
-
align-items: flex-start;
|
|
578
|
-
gap: 16px;
|
|
579
|
-
flex: 1 0 0;
|
|
580
|
-
`,Mc=p.div`
|
|
581
|
-
display: flex;
|
|
582
|
-
align-items: flex-start;
|
|
583
|
-
gap: 16px;
|
|
584
|
-
align-self: stretch;
|
|
585
|
-
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)`
|
|
587
|
-
position: relative;
|
|
588
|
-
|
|
589
|
-
.stigg-paywall-layout {
|
|
590
|
-
width: 100%;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
.stigg-paywall-plans-layout {
|
|
594
|
-
flex-wrap: nowrap;
|
|
595
|
-
width: 100%;
|
|
596
|
-
overflow-x: auto;
|
|
597
|
-
justify-content: unset;
|
|
598
|
-
padding: 10px 0px 0px 0px;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
.stigg-paywall-plans-layout .stigg-plan-offering-container:first-of-type {
|
|
602
|
-
margin-left: auto;
|
|
603
|
-
}
|
|
604
|
-
.stigg-paywall-plans-layout .stigg-plan-offering-container:last-child {
|
|
605
|
-
margin-right: auto;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
.${Fi} {
|
|
609
|
-
display: none;
|
|
610
|
-
}
|
|
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`
|
|
612
|
-
width: 100%;
|
|
613
|
-
display: flex;
|
|
614
|
-
flex-direction: column;
|
|
615
|
-
align-items: center;
|
|
616
|
-
|
|
617
|
-
& * {
|
|
618
|
-
box-sizing: border-box;
|
|
619
|
-
}
|
|
620
|
-
`,Bc=p.div`
|
|
621
|
-
width: 100%;
|
|
622
|
-
display: flex;
|
|
623
|
-
flex-direction: column;
|
|
624
|
-
align-items: center;
|
|
625
|
-
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`
|
|
627
|
-
display: flex;
|
|
628
|
-
flex-direction: column;
|
|
629
|
-
padding: 24px;
|
|
630
|
-
border: ${({$borderColor:e})=>`1px solid ${e}`};
|
|
631
|
-
border-radius: 10px;
|
|
632
|
-
row-gap: 16px;
|
|
633
|
-
height: 100%;
|
|
634
|
-
|
|
635
|
-
${({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`
|
|
637
|
-
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+=`
|
|
641
|
-
|
|
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+=`
|
|
643
|
-
|
|
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.
|
|
645
|
-
|
|
646
|
-
Ensure that there is only one instance of "graphql" in the node_modules
|
|
647
|
-
directory. If different versions of "graphql" are the dependencies of other
|
|
648
|
-
relied on modules, use "resolutions" to ensure only one version is installed.
|
|
649
|
-
|
|
650
|
-
https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
651
|
-
|
|
652
|
-
Duplicate "graphql" modules cannot be used at the same time since different
|
|
653
|
-
versions may have different capabilities and behavior. The data from one
|
|
654
|
-
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.
|
|
658
|
-
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)`
|
|
660
|
-
fragment PageInfoFragment on PageInfo {
|
|
661
|
-
startCursor
|
|
662
|
-
endCursor
|
|
663
|
-
hasNextPage
|
|
664
|
-
hasPreviousPage
|
|
665
|
-
}
|
|
666
|
-
`,e.SubscriptionQueryFragmentDoc=(0,n.default)`
|
|
667
|
-
fragment SubscriptionQueryFragment on SubscriptionQuery {
|
|
668
|
-
subscriptionId
|
|
669
|
-
status
|
|
670
|
-
pricingType
|
|
671
|
-
startDate
|
|
672
|
-
currentBillingPeriodEnd
|
|
673
|
-
customer {
|
|
674
|
-
customerId
|
|
675
|
-
}
|
|
676
|
-
payingCustomer {
|
|
677
|
-
customerId
|
|
678
|
-
}
|
|
679
|
-
resource {
|
|
680
|
-
resourceId
|
|
681
|
-
}
|
|
682
|
-
plan {
|
|
683
|
-
planId: refId
|
|
684
|
-
displayName
|
|
685
|
-
}
|
|
686
|
-
addons {
|
|
687
|
-
quantity
|
|
688
|
-
addon {
|
|
689
|
-
addonId: refId
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
trialConfiguration {
|
|
693
|
-
trialEndBehavior
|
|
694
|
-
}
|
|
695
|
-
trialEndDate
|
|
696
|
-
}
|
|
697
|
-
`,e.SlimSubscriptionFragmentV2FragmentDoc=(0,n.default)`
|
|
698
|
-
fragment SlimSubscriptionFragmentV2 on CustomerSubscription {
|
|
699
|
-
subscriptionId
|
|
700
|
-
status
|
|
701
|
-
pricingType
|
|
702
|
-
startDate
|
|
703
|
-
cancellationDate
|
|
704
|
-
currentBillingPeriodEnd
|
|
705
|
-
customer {
|
|
706
|
-
customerId
|
|
707
|
-
}
|
|
708
|
-
payingCustomer {
|
|
709
|
-
customerId
|
|
710
|
-
}
|
|
711
|
-
resource {
|
|
712
|
-
resourceId
|
|
713
|
-
}
|
|
714
|
-
plan {
|
|
715
|
-
planId: refId
|
|
716
|
-
displayName
|
|
717
|
-
}
|
|
718
|
-
addons {
|
|
719
|
-
quantity
|
|
720
|
-
addon {
|
|
721
|
-
addonId: refId
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
trialConfiguration {
|
|
725
|
-
trialEndBehavior
|
|
726
|
-
}
|
|
727
|
-
trialEndDate
|
|
728
|
-
}
|
|
729
|
-
`,e.SlimCustomerFragmentDoc=(0,n.default)`
|
|
730
|
-
fragment SlimCustomerFragment on Customer {
|
|
731
|
-
id
|
|
732
|
-
name
|
|
733
|
-
email
|
|
734
|
-
createdAt
|
|
735
|
-
updatedAt
|
|
736
|
-
refId
|
|
737
|
-
customerId
|
|
738
|
-
billingId
|
|
739
|
-
additionalMetaData
|
|
740
|
-
awsMarketplaceCustomerId
|
|
741
|
-
}
|
|
742
|
-
`,e.CouponFragmentDoc=(0,n.default)`
|
|
743
|
-
fragment CouponFragment on Coupon {
|
|
744
|
-
id
|
|
745
|
-
discountValue
|
|
746
|
-
percentOff
|
|
747
|
-
amountsOff {
|
|
748
|
-
amount
|
|
749
|
-
currency
|
|
750
|
-
}
|
|
751
|
-
type
|
|
752
|
-
additionalMetaData
|
|
753
|
-
refId
|
|
754
|
-
name
|
|
755
|
-
description
|
|
756
|
-
createdAt
|
|
757
|
-
updatedAt
|
|
758
|
-
billingId
|
|
759
|
-
billingLinkUrl
|
|
760
|
-
status
|
|
761
|
-
syncStates {
|
|
762
|
-
vendorIdentifier
|
|
763
|
-
status
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
`,e.PromotionalEntitlementFragmentDoc=(0,n.default)`
|
|
767
|
-
fragment PromotionalEntitlementFragment on PromotionalEntitlement {
|
|
768
|
-
status
|
|
769
|
-
usageLimit
|
|
770
|
-
featureId
|
|
771
|
-
hasUnlimitedUsage
|
|
772
|
-
hasSoftLimit
|
|
773
|
-
resetPeriod
|
|
774
|
-
endDate
|
|
775
|
-
isVisible
|
|
776
|
-
feature {
|
|
777
|
-
featureType
|
|
778
|
-
meterType
|
|
779
|
-
featureUnits
|
|
780
|
-
featureUnitsPlural
|
|
781
|
-
displayName
|
|
782
|
-
description
|
|
783
|
-
refId
|
|
784
|
-
additionalMetaData
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
`,e.CustomerFragmentDoc=(0,n.default)`
|
|
788
|
-
fragment CustomerFragment on Customer {
|
|
789
|
-
...SlimCustomerFragment
|
|
790
|
-
hasPaymentMethod
|
|
791
|
-
hasActiveSubscription
|
|
792
|
-
defaultPaymentExpirationMonth
|
|
793
|
-
defaultPaymentExpirationYear
|
|
794
|
-
defaultPaymentMethodLast4Digits
|
|
795
|
-
defaultPaymentMethodType
|
|
796
|
-
trialedPlans {
|
|
797
|
-
productId
|
|
798
|
-
productRefId
|
|
799
|
-
planRefId
|
|
800
|
-
planId
|
|
801
|
-
}
|
|
802
|
-
experimentInfo {
|
|
803
|
-
groupType
|
|
804
|
-
groupName
|
|
805
|
-
id
|
|
806
|
-
name
|
|
807
|
-
}
|
|
808
|
-
coupon {
|
|
809
|
-
...CouponFragment
|
|
810
|
-
}
|
|
811
|
-
eligibleForTrial {
|
|
812
|
-
productId
|
|
813
|
-
productRefId
|
|
814
|
-
eligible
|
|
815
|
-
}
|
|
816
|
-
promotionalEntitlements {
|
|
817
|
-
...PromotionalEntitlementFragment
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
`,e.SubscriptionInvoiceFragmentDoc=(0,n.default)`
|
|
821
|
-
fragment SubscriptionInvoiceFragment on SubscriptionInvoice {
|
|
822
|
-
billingId
|
|
823
|
-
status
|
|
824
|
-
createdAt
|
|
825
|
-
dueDate
|
|
826
|
-
updatedAt
|
|
827
|
-
errorMessage
|
|
828
|
-
requiresAction
|
|
829
|
-
paymentSecret
|
|
830
|
-
paymentUrl
|
|
831
|
-
pdfUrl
|
|
832
|
-
billingReason
|
|
833
|
-
currency
|
|
834
|
-
subTotal
|
|
835
|
-
subTotalExcludingTax
|
|
836
|
-
total
|
|
837
|
-
totalExcludingTax
|
|
838
|
-
tax
|
|
839
|
-
amountDue
|
|
840
|
-
attemptCount
|
|
841
|
-
}
|
|
842
|
-
`,e.CustomerResourceFragmentDoc=(0,n.default)`
|
|
843
|
-
fragment CustomerResourceFragment on CustomerResource {
|
|
844
|
-
resourceId
|
|
845
|
-
}
|
|
846
|
-
`,e.PriceTierFragmentDoc=(0,n.default)`
|
|
847
|
-
fragment PriceTierFragment on PriceTier {
|
|
848
|
-
upTo
|
|
849
|
-
unitPrice {
|
|
850
|
-
amount
|
|
851
|
-
currency
|
|
852
|
-
}
|
|
853
|
-
flatPrice {
|
|
854
|
-
amount
|
|
855
|
-
currency
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
`,e.PriceFragmentDoc=(0,n.default)`
|
|
859
|
-
fragment PriceFragment on Price {
|
|
860
|
-
billingModel
|
|
861
|
-
billingPeriod
|
|
862
|
-
billingCadence
|
|
863
|
-
billingId
|
|
864
|
-
minUnitQuantity
|
|
865
|
-
maxUnitQuantity
|
|
866
|
-
billingCountryCode
|
|
867
|
-
price {
|
|
868
|
-
amount
|
|
869
|
-
currency
|
|
870
|
-
}
|
|
871
|
-
creditRate {
|
|
872
|
-
amount
|
|
873
|
-
customCurrencyId
|
|
874
|
-
}
|
|
875
|
-
tiersMode
|
|
876
|
-
tiers {
|
|
877
|
-
...PriceTierFragment
|
|
878
|
-
}
|
|
879
|
-
feature {
|
|
880
|
-
refId
|
|
881
|
-
featureUnits
|
|
882
|
-
featureUnitsPlural
|
|
883
|
-
displayName
|
|
884
|
-
description
|
|
885
|
-
}
|
|
886
|
-
blockSize
|
|
887
|
-
}
|
|
888
|
-
`,e.TotalPriceFragmentDoc=(0,n.default)`
|
|
889
|
-
fragment TotalPriceFragment on CustomerSubscriptionTotalPrice {
|
|
890
|
-
subTotal {
|
|
891
|
-
amount
|
|
892
|
-
currency
|
|
893
|
-
}
|
|
894
|
-
total {
|
|
895
|
-
amount
|
|
896
|
-
currency
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
`,e.ProductFragmentDoc=(0,n.default)`
|
|
900
|
-
fragment ProductFragment on Product {
|
|
901
|
-
refId
|
|
902
|
-
displayName
|
|
903
|
-
description
|
|
904
|
-
additionalMetaData
|
|
905
|
-
productSettings {
|
|
906
|
-
downgradePlan {
|
|
907
|
-
refId
|
|
908
|
-
displayName
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
`,e.PackageEntitlementFragmentDoc=(0,n.default)`
|
|
913
|
-
fragment PackageEntitlementFragment on PackageEntitlement {
|
|
914
|
-
usageLimit
|
|
915
|
-
hasUnlimitedUsage
|
|
916
|
-
hasSoftLimit
|
|
917
|
-
featureId
|
|
918
|
-
resetPeriod
|
|
919
|
-
hiddenFromWidgets
|
|
920
|
-
isCustom
|
|
921
|
-
displayNameOverride
|
|
922
|
-
enumValues
|
|
923
|
-
isGranted
|
|
924
|
-
feature {
|
|
925
|
-
featureType
|
|
926
|
-
meterType
|
|
927
|
-
featureUnits
|
|
928
|
-
featureUnitsPlural
|
|
929
|
-
displayName
|
|
930
|
-
description
|
|
931
|
-
refId
|
|
932
|
-
additionalMetaData
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
`,e.OveragePriceFragmentDoc=(0,n.default)`
|
|
936
|
-
fragment OveragePriceFragment on Price {
|
|
937
|
-
billingModel
|
|
938
|
-
billingPeriod
|
|
939
|
-
billingId
|
|
940
|
-
billingCountryCode
|
|
941
|
-
price {
|
|
942
|
-
amount
|
|
943
|
-
currency
|
|
944
|
-
}
|
|
945
|
-
tiersMode
|
|
946
|
-
tiers {
|
|
947
|
-
...PriceTierFragment
|
|
948
|
-
}
|
|
949
|
-
feature {
|
|
950
|
-
refId
|
|
951
|
-
featureUnits
|
|
952
|
-
featureUnitsPlural
|
|
953
|
-
displayName
|
|
954
|
-
description
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
`,e.AddonDependencyFragmentDoc=(0,n.default)`
|
|
958
|
-
fragment AddonDependencyFragment on Addon {
|
|
959
|
-
id
|
|
960
|
-
refId
|
|
961
|
-
displayName
|
|
962
|
-
description
|
|
963
|
-
}
|
|
964
|
-
`,e.AddonFragmentDoc=(0,n.default)`
|
|
965
|
-
fragment AddonFragment on Addon {
|
|
966
|
-
id
|
|
967
|
-
refId
|
|
968
|
-
billingId
|
|
969
|
-
displayName
|
|
970
|
-
description
|
|
971
|
-
additionalMetaData
|
|
972
|
-
hiddenFromWidgets
|
|
973
|
-
entitlements {
|
|
974
|
-
...PackageEntitlementFragment
|
|
975
|
-
}
|
|
976
|
-
prices {
|
|
977
|
-
...PriceFragment
|
|
978
|
-
}
|
|
979
|
-
overagePrices {
|
|
980
|
-
...OveragePriceFragment
|
|
981
|
-
}
|
|
982
|
-
pricingType
|
|
983
|
-
maxQuantity
|
|
984
|
-
dependencies {
|
|
985
|
-
...AddonDependencyFragment
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
`,e.PlanCompatiblePackageGroupsFragmentDoc=(0,n.default)`
|
|
989
|
-
fragment PlanCompatiblePackageGroupsFragment on PlanCompatiblePackageGroups {
|
|
990
|
-
packageGroupId
|
|
991
|
-
displayName
|
|
992
|
-
addons {
|
|
993
|
-
...AddonFragment
|
|
994
|
-
}
|
|
995
|
-
options {
|
|
996
|
-
minItems
|
|
997
|
-
freeItems
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
`,e.PlanFragmentDoc=(0,n.default)`
|
|
1001
|
-
fragment PlanFragment on Plan {
|
|
1002
|
-
id
|
|
1003
|
-
refId
|
|
1004
|
-
displayName
|
|
1005
|
-
description
|
|
1006
|
-
billingId
|
|
1007
|
-
versionNumber
|
|
1008
|
-
additionalMetaData
|
|
1009
|
-
hiddenFromWidgets
|
|
1010
|
-
product {
|
|
1011
|
-
...ProductFragment
|
|
1012
|
-
}
|
|
1013
|
-
basePlan {
|
|
1014
|
-
refId
|
|
1015
|
-
displayName
|
|
1016
|
-
}
|
|
1017
|
-
entitlements {
|
|
1018
|
-
...PackageEntitlementFragment
|
|
1019
|
-
}
|
|
1020
|
-
inheritedEntitlements {
|
|
1021
|
-
...PackageEntitlementFragment
|
|
1022
|
-
}
|
|
1023
|
-
compatibleAddons {
|
|
1024
|
-
...AddonFragment
|
|
1025
|
-
}
|
|
1026
|
-
compatiblePackageGroups {
|
|
1027
|
-
...PlanCompatiblePackageGroupsFragment
|
|
1028
|
-
}
|
|
1029
|
-
prices {
|
|
1030
|
-
...PriceFragment
|
|
1031
|
-
}
|
|
1032
|
-
overagePrices {
|
|
1033
|
-
...OveragePriceFragment
|
|
1034
|
-
}
|
|
1035
|
-
pricingType
|
|
1036
|
-
defaultTrialConfig {
|
|
1037
|
-
duration
|
|
1038
|
-
units
|
|
1039
|
-
budget {
|
|
1040
|
-
limit
|
|
1041
|
-
}
|
|
1042
|
-
trialEndBehavior
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
`,e.ScheduleVariablesFragmentDoc=(0,n.default)`
|
|
1046
|
-
fragment ScheduleVariablesFragment on ScheduleVariables {
|
|
1047
|
-
__typename
|
|
1048
|
-
... on PlanChangeVariables {
|
|
1049
|
-
planRefId
|
|
1050
|
-
changeType
|
|
1051
|
-
billingPeriod
|
|
1052
|
-
billableFeatures {
|
|
1053
|
-
featureId
|
|
1054
|
-
quantity
|
|
1055
|
-
}
|
|
1056
|
-
addons {
|
|
1057
|
-
addonRefId
|
|
1058
|
-
quantity
|
|
1059
|
-
}
|
|
1060
|
-
priceOverrides {
|
|
1061
|
-
planRefId
|
|
1062
|
-
addonRefId
|
|
1063
|
-
featureId
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1066
|
-
... on DowngradeChangeVariables {
|
|
1067
|
-
downgradePlanRefId
|
|
1068
|
-
billingPeriod
|
|
1069
|
-
billableFeatures {
|
|
1070
|
-
featureId
|
|
1071
|
-
quantity
|
|
1072
|
-
}
|
|
1073
|
-
addons {
|
|
1074
|
-
addonRefId
|
|
1075
|
-
quantity
|
|
1076
|
-
}
|
|
1077
|
-
priceOverrides {
|
|
1078
|
-
planRefId
|
|
1079
|
-
addonRefId
|
|
1080
|
-
featureId
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
... on BillingPeriodChangeVariables {
|
|
1084
|
-
billingPeriod
|
|
1085
|
-
}
|
|
1086
|
-
... on UnitAmountChangeVariables {
|
|
1087
|
-
newUnitAmount
|
|
1088
|
-
featureId
|
|
1089
|
-
}
|
|
1090
|
-
... on AddonChangeVariables {
|
|
1091
|
-
addonRefId
|
|
1092
|
-
newQuantity
|
|
1093
|
-
}
|
|
1094
|
-
... on PlanPriceOverrideChangeVariables {
|
|
1095
|
-
planRefId
|
|
1096
|
-
featureId
|
|
1097
|
-
}
|
|
1098
|
-
... on AddonPriceOverrideChangeVariables {
|
|
1099
|
-
addonRefId
|
|
1100
|
-
featureId
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
`,e.SubscriptionScheduledUpdateDataFragmentDoc=(0,n.default)`
|
|
1104
|
-
fragment SubscriptionScheduledUpdateData on SubscriptionScheduledUpdate {
|
|
1105
|
-
subscriptionScheduleType
|
|
1106
|
-
scheduleStatus
|
|
1107
|
-
scheduledExecutionTime
|
|
1108
|
-
targetPackage {
|
|
1109
|
-
id
|
|
1110
|
-
refId
|
|
1111
|
-
displayName
|
|
1112
|
-
}
|
|
1113
|
-
scheduleVariables {
|
|
1114
|
-
...ScheduleVariablesFragment
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
|
-
`,e.SubscriptionFutureUpdateDataFragmentDoc=(0,n.default)`
|
|
1118
|
-
fragment SubscriptionFutureUpdateData on SubscriptionFutureUpdate {
|
|
1119
|
-
subscriptionScheduleType
|
|
1120
|
-
scheduleStatus
|
|
1121
|
-
scheduledExecutionTime
|
|
1122
|
-
targetPackage {
|
|
1123
|
-
id
|
|
1124
|
-
refId
|
|
1125
|
-
displayName
|
|
1126
|
-
}
|
|
1127
|
-
scheduleVariables {
|
|
1128
|
-
...ScheduleVariablesFragment
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
`,e.SubscriptionTrialConfigurationFragmentDoc=(0,n.default)`
|
|
1132
|
-
fragment SubscriptionTrialConfigurationFragment on TrialConfiguration {
|
|
1133
|
-
trialEndBehavior
|
|
1134
|
-
}
|
|
1135
|
-
`,e.SubscriptionFragmentDoc=(0,n.default)`
|
|
1136
|
-
fragment SubscriptionFragment on CustomerSubscription {
|
|
1137
|
-
id
|
|
1138
|
-
subscriptionId
|
|
1139
|
-
payingCustomer {
|
|
1140
|
-
...SlimCustomerFragment
|
|
1141
|
-
}
|
|
1142
|
-
startDate
|
|
1143
|
-
endDate
|
|
1144
|
-
trialEndDate
|
|
1145
|
-
cancellationDate
|
|
1146
|
-
effectiveEndDate
|
|
1147
|
-
status
|
|
1148
|
-
refId
|
|
1149
|
-
currentBillingPeriodEnd
|
|
1150
|
-
additionalMetaData
|
|
1151
|
-
billingId
|
|
1152
|
-
billingLinkUrl
|
|
1153
|
-
latestInvoice {
|
|
1154
|
-
...SubscriptionInvoiceFragment
|
|
1155
|
-
}
|
|
1156
|
-
paymentCollection
|
|
1157
|
-
paymentCollectionMethod
|
|
1158
|
-
billingSyncError
|
|
1159
|
-
resource {
|
|
1160
|
-
...CustomerResourceFragment
|
|
1161
|
-
}
|
|
1162
|
-
experimentInfo {
|
|
1163
|
-
name
|
|
1164
|
-
groupType
|
|
1165
|
-
groupName
|
|
1166
|
-
id
|
|
1167
|
-
}
|
|
1168
|
-
prices {
|
|
1169
|
-
usageLimit
|
|
1170
|
-
price {
|
|
1171
|
-
...PriceFragment
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
totalPrice {
|
|
1175
|
-
...TotalPriceFragment
|
|
1176
|
-
}
|
|
1177
|
-
pricingType
|
|
1178
|
-
plan {
|
|
1179
|
-
...PlanFragment
|
|
1180
|
-
}
|
|
1181
|
-
addons {
|
|
1182
|
-
id
|
|
1183
|
-
quantity
|
|
1184
|
-
addon {
|
|
1185
|
-
...AddonFragment
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
scheduledUpdates {
|
|
1189
|
-
...SubscriptionScheduledUpdateData
|
|
1190
|
-
}
|
|
1191
|
-
futureUpdates {
|
|
1192
|
-
...SubscriptionFutureUpdateData
|
|
1193
|
-
}
|
|
1194
|
-
trialConfiguration {
|
|
1195
|
-
...SubscriptionTrialConfigurationFragment
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
`,e.CustomerWithSubscriptionsFragmentDoc=(0,n.default)`
|
|
1199
|
-
fragment CustomerWithSubscriptionsFragment on Customer {
|
|
1200
|
-
...CustomerFragment
|
|
1201
|
-
subscriptions {
|
|
1202
|
-
...SubscriptionFragment
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
`,e.CustomerStatisticsFragmentDoc=(0,n.default)`
|
|
1206
|
-
fragment CustomerStatisticsFragment on Customer {
|
|
1207
|
-
statistics {
|
|
1208
|
-
activeSubscriptionsByPricingType {
|
|
1209
|
-
pricingType
|
|
1210
|
-
totalCount
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
`,e.SubscriptionPreviewFragmentDoc=(0,n.default)`
|
|
1215
|
-
fragment SubscriptionPreviewFragment on SubscriptionPreview {
|
|
1216
|
-
subTotal {
|
|
1217
|
-
amount
|
|
1218
|
-
currency
|
|
1219
|
-
}
|
|
1220
|
-
totalExcludingTax {
|
|
1221
|
-
amount
|
|
1222
|
-
currency
|
|
1223
|
-
}
|
|
1224
|
-
total {
|
|
1225
|
-
amount
|
|
1226
|
-
currency
|
|
1227
|
-
}
|
|
1228
|
-
discountAmount {
|
|
1229
|
-
amount
|
|
1230
|
-
currency
|
|
1231
|
-
}
|
|
1232
|
-
taxDetails {
|
|
1233
|
-
displayName
|
|
1234
|
-
percentage
|
|
1235
|
-
inclusive
|
|
1236
|
-
}
|
|
1237
|
-
tax {
|
|
1238
|
-
amount
|
|
1239
|
-
currency
|
|
1240
|
-
}
|
|
1241
|
-
billingPeriodRange {
|
|
1242
|
-
start
|
|
1243
|
-
end
|
|
1244
|
-
}
|
|
1245
|
-
discount {
|
|
1246
|
-
name
|
|
1247
|
-
type
|
|
1248
|
-
value
|
|
1249
|
-
durationType
|
|
1250
|
-
durationInMonths
|
|
1251
|
-
}
|
|
1252
|
-
subscription {
|
|
1253
|
-
subTotal {
|
|
1254
|
-
amount
|
|
1255
|
-
currency
|
|
1256
|
-
}
|
|
1257
|
-
totalExcludingTax {
|
|
1258
|
-
amount
|
|
1259
|
-
currency
|
|
1260
|
-
}
|
|
1261
|
-
total {
|
|
1262
|
-
amount
|
|
1263
|
-
currency
|
|
1264
|
-
}
|
|
1265
|
-
tax {
|
|
1266
|
-
amount
|
|
1267
|
-
currency
|
|
1268
|
-
}
|
|
1269
|
-
discountAmount {
|
|
1270
|
-
amount
|
|
1271
|
-
currency
|
|
1272
|
-
}
|
|
1273
|
-
taxDetails {
|
|
1274
|
-
displayName
|
|
1275
|
-
percentage
|
|
1276
|
-
inclusive
|
|
1277
|
-
}
|
|
1278
|
-
discount {
|
|
1279
|
-
name
|
|
1280
|
-
type
|
|
1281
|
-
value
|
|
1282
|
-
durationType
|
|
1283
|
-
durationInMonths
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
proration {
|
|
1287
|
-
prorationDate
|
|
1288
|
-
credit {
|
|
1289
|
-
amount
|
|
1290
|
-
currency
|
|
1291
|
-
}
|
|
1292
|
-
debit {
|
|
1293
|
-
amount
|
|
1294
|
-
currency
|
|
1295
|
-
}
|
|
1296
|
-
netAmount {
|
|
1297
|
-
amount
|
|
1298
|
-
currency
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
isPlanDowngrade
|
|
1302
|
-
hasScheduledUpdates
|
|
1303
|
-
credits {
|
|
1304
|
-
initial {
|
|
1305
|
-
amount
|
|
1306
|
-
currency
|
|
1307
|
-
}
|
|
1308
|
-
used {
|
|
1309
|
-
amount
|
|
1310
|
-
currency
|
|
1311
|
-
}
|
|
1312
|
-
remaining {
|
|
1313
|
-
amount
|
|
1314
|
-
currency
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
`,e.ImmediateSubscriptionPreviewInvoiceFragmentDoc=(0,n.default)`
|
|
1319
|
-
fragment ImmediateSubscriptionPreviewInvoiceFragment on ImmediateSubscriptionPreviewInvoice {
|
|
1320
|
-
total {
|
|
1321
|
-
amount
|
|
1322
|
-
currency
|
|
1323
|
-
}
|
|
1324
|
-
subTotal {
|
|
1325
|
-
amount
|
|
1326
|
-
currency
|
|
1327
|
-
}
|
|
1328
|
-
totalExcludingTax {
|
|
1329
|
-
amount
|
|
1330
|
-
currency
|
|
1331
|
-
}
|
|
1332
|
-
tax {
|
|
1333
|
-
amount
|
|
1334
|
-
currency
|
|
1335
|
-
}
|
|
1336
|
-
discount {
|
|
1337
|
-
amount
|
|
1338
|
-
currency
|
|
1339
|
-
}
|
|
1340
|
-
taxDetails {
|
|
1341
|
-
displayName
|
|
1342
|
-
percentage
|
|
1343
|
-
inclusive
|
|
1344
|
-
}
|
|
1345
|
-
discountDetails {
|
|
1346
|
-
type
|
|
1347
|
-
value
|
|
1348
|
-
durationType
|
|
1349
|
-
durationInMonths
|
|
1350
|
-
}
|
|
1351
|
-
credits {
|
|
1352
|
-
initial {
|
|
1353
|
-
amount
|
|
1354
|
-
currency
|
|
1355
|
-
}
|
|
1356
|
-
used {
|
|
1357
|
-
amount
|
|
1358
|
-
currency
|
|
1359
|
-
}
|
|
1360
|
-
remaining {
|
|
1361
|
-
amount
|
|
1362
|
-
currency
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
proration {
|
|
1366
|
-
prorationDate
|
|
1367
|
-
hasProrations
|
|
1368
|
-
credit {
|
|
1369
|
-
amount
|
|
1370
|
-
currency
|
|
1371
|
-
}
|
|
1372
|
-
debit {
|
|
1373
|
-
amount
|
|
1374
|
-
currency
|
|
1375
|
-
}
|
|
1376
|
-
netAmount {
|
|
1377
|
-
amount
|
|
1378
|
-
currency
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
`,e.SubscriptionPreviewInvoiceFragmentDoc=(0,n.default)`
|
|
1383
|
-
fragment SubscriptionPreviewInvoiceFragment on SubscriptionPreviewInvoice {
|
|
1384
|
-
total {
|
|
1385
|
-
amount
|
|
1386
|
-
currency
|
|
1387
|
-
}
|
|
1388
|
-
subTotal {
|
|
1389
|
-
amount
|
|
1390
|
-
currency
|
|
1391
|
-
}
|
|
1392
|
-
totalExcludingTax {
|
|
1393
|
-
amount
|
|
1394
|
-
currency
|
|
1395
|
-
}
|
|
1396
|
-
tax {
|
|
1397
|
-
amount
|
|
1398
|
-
currency
|
|
1399
|
-
}
|
|
1400
|
-
discount {
|
|
1401
|
-
amount
|
|
1402
|
-
currency
|
|
1403
|
-
}
|
|
1404
|
-
taxDetails {
|
|
1405
|
-
displayName
|
|
1406
|
-
percentage
|
|
1407
|
-
inclusive
|
|
1408
|
-
}
|
|
1409
|
-
discountDetails {
|
|
1410
|
-
type
|
|
1411
|
-
value
|
|
1412
|
-
durationType
|
|
1413
|
-
durationInMonths
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
`,e.SubscriptionPreviewV2FragmentDoc=(0,n.default)`
|
|
1417
|
-
fragment SubscriptionPreviewV2Fragment on SubscriptionPreviewV2 {
|
|
1418
|
-
immediateInvoice {
|
|
1419
|
-
...ImmediateSubscriptionPreviewInvoiceFragment
|
|
1420
|
-
}
|
|
1421
|
-
recurringInvoice {
|
|
1422
|
-
...SubscriptionPreviewInvoiceFragment
|
|
1423
|
-
}
|
|
1424
|
-
billingPeriodRange {
|
|
1425
|
-
start
|
|
1426
|
-
end
|
|
1427
|
-
}
|
|
1428
|
-
isPlanDowngrade
|
|
1429
|
-
hasScheduledUpdates
|
|
1430
|
-
}
|
|
1431
|
-
`,e.SubscriptionInvoicePreviewFragmentDoc=(0,n.default)`
|
|
1432
|
-
fragment SubscriptionInvoicePreviewFragment on SubscriptionInvoicePreview {
|
|
1433
|
-
amountDue {
|
|
1434
|
-
amount
|
|
1435
|
-
currency
|
|
1436
|
-
}
|
|
1437
|
-
minimumSpendAdjustment {
|
|
1438
|
-
amount
|
|
1439
|
-
currency
|
|
1440
|
-
}
|
|
1441
|
-
total {
|
|
1442
|
-
amount
|
|
1443
|
-
currency
|
|
1444
|
-
}
|
|
1445
|
-
totalExcludingTax {
|
|
1446
|
-
amount
|
|
1447
|
-
currency
|
|
1448
|
-
}
|
|
1449
|
-
subTotal {
|
|
1450
|
-
amount
|
|
1451
|
-
currency
|
|
1452
|
-
}
|
|
1453
|
-
subTotalExcludingTax {
|
|
1454
|
-
amount
|
|
1455
|
-
currency
|
|
1456
|
-
}
|
|
1457
|
-
tax {
|
|
1458
|
-
amount
|
|
1459
|
-
currency
|
|
1460
|
-
}
|
|
1461
|
-
taxDetails {
|
|
1462
|
-
displayName
|
|
1463
|
-
percentage
|
|
1464
|
-
inclusive
|
|
1465
|
-
}
|
|
1466
|
-
discount {
|
|
1467
|
-
amount
|
|
1468
|
-
currency
|
|
1469
|
-
}
|
|
1470
|
-
discountDetails {
|
|
1471
|
-
name
|
|
1472
|
-
type
|
|
1473
|
-
value
|
|
1474
|
-
durationType
|
|
1475
|
-
durationInMonths
|
|
1476
|
-
}
|
|
1477
|
-
credits {
|
|
1478
|
-
initial {
|
|
1479
|
-
amount
|
|
1480
|
-
currency
|
|
1481
|
-
}
|
|
1482
|
-
used {
|
|
1483
|
-
amount
|
|
1484
|
-
currency
|
|
1485
|
-
}
|
|
1486
|
-
remaining {
|
|
1487
|
-
amount
|
|
1488
|
-
currency
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
lastUpdatedAt
|
|
1492
|
-
lines {
|
|
1493
|
-
type
|
|
1494
|
-
description
|
|
1495
|
-
costDescription
|
|
1496
|
-
amount {
|
|
1497
|
-
amount
|
|
1498
|
-
currency
|
|
1499
|
-
}
|
|
1500
|
-
unitPrice {
|
|
1501
|
-
amount
|
|
1502
|
-
currency
|
|
1503
|
-
}
|
|
1504
|
-
quantity
|
|
1505
|
-
proration
|
|
1506
|
-
price {
|
|
1507
|
-
...PriceFragment
|
|
1508
|
-
}
|
|
1509
|
-
usageLimit
|
|
1510
|
-
period {
|
|
1511
|
-
start
|
|
1512
|
-
end
|
|
1513
|
-
}
|
|
1514
|
-
hasSoftLimit
|
|
1515
|
-
lines {
|
|
1516
|
-
type
|
|
1517
|
-
description
|
|
1518
|
-
costDescription
|
|
1519
|
-
quantity
|
|
1520
|
-
proration
|
|
1521
|
-
usageLimit
|
|
1522
|
-
hasSoftLimit
|
|
1523
|
-
}
|
|
1524
|
-
}
|
|
1525
|
-
}
|
|
1526
|
-
`,e.ResetPeriodConfigurationFragmentDoc=(0,n.default)`
|
|
1527
|
-
fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {
|
|
1528
|
-
__typename
|
|
1529
|
-
... on YearlyResetPeriodConfig {
|
|
1530
|
-
yearlyAccordingTo
|
|
1531
|
-
}
|
|
1532
|
-
... on MonthlyResetPeriodConfig {
|
|
1533
|
-
monthlyAccordingTo
|
|
1534
|
-
}
|
|
1535
|
-
... on WeeklyResetPeriodConfig {
|
|
1536
|
-
weeklyAccordingTo
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
`,e.FeatureFragmentDoc=(0,n.default)`
|
|
1540
|
-
fragment FeatureFragment on EntitlementFeature {
|
|
1541
|
-
__typename
|
|
1542
|
-
featureType
|
|
1543
|
-
meterType
|
|
1544
|
-
featureUnits
|
|
1545
|
-
featureUnitsPlural
|
|
1546
|
-
description
|
|
1547
|
-
displayName
|
|
1548
|
-
refId
|
|
1549
|
-
unitTransformation {
|
|
1550
|
-
divide
|
|
1551
|
-
round
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
`,e.EntitlementFragmentDoc=(0,n.default)`
|
|
1555
|
-
fragment EntitlementFragment on Entitlement {
|
|
1556
|
-
__typename
|
|
1557
|
-
isGranted
|
|
1558
|
-
accessDeniedReason
|
|
1559
|
-
customerId
|
|
1560
|
-
resourceId
|
|
1561
|
-
usageLimit
|
|
1562
|
-
hasUnlimitedUsage
|
|
1563
|
-
hasSoftLimit
|
|
1564
|
-
currentUsage
|
|
1565
|
-
requestedUsage
|
|
1566
|
-
requestedValues
|
|
1567
|
-
enumValues
|
|
1568
|
-
entitlementUpdatedAt
|
|
1569
|
-
usageUpdatedAt
|
|
1570
|
-
usagePeriodAnchor
|
|
1571
|
-
usagePeriodStart
|
|
1572
|
-
usagePeriodEnd
|
|
1573
|
-
nextResetDate
|
|
1574
|
-
resetPeriod
|
|
1575
|
-
resetPeriodConfiguration {
|
|
1576
|
-
...ResetPeriodConfigurationFragment
|
|
1577
|
-
}
|
|
1578
|
-
feature {
|
|
1579
|
-
...FeatureFragment
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
`,e.EntitlementsUpdatedPayloadFragmentDoc=(0,n.default)`
|
|
1583
|
-
fragment EntitlementsUpdatedPayload on EntitlementsUpdated {
|
|
1584
|
-
customerId
|
|
1585
|
-
resourceId
|
|
1586
|
-
entitlements {
|
|
1587
|
-
...EntitlementFragment
|
|
1588
|
-
}
|
|
1589
|
-
}
|
|
1590
|
-
`,e.UsageUpdatedFragmentDoc=(0,n.default)`
|
|
1591
|
-
fragment UsageUpdatedFragment on UsageMeasurementUpdated {
|
|
1592
|
-
customerId
|
|
1593
|
-
resourceId
|
|
1594
|
-
featureId
|
|
1595
|
-
currentUsage
|
|
1596
|
-
usagePeriodStart
|
|
1597
|
-
usagePeriodEnd
|
|
1598
|
-
nextResetDate
|
|
1599
|
-
}
|
|
1600
|
-
`,e.EntitlementUsageUpdatedFragmentDoc=(0,n.default)`
|
|
1601
|
-
fragment EntitlementUsageUpdated on UsageUpdated {
|
|
1602
|
-
usage {
|
|
1603
|
-
...UsageUpdatedFragment
|
|
1604
|
-
}
|
|
1605
|
-
entitlement {
|
|
1606
|
-
...EntitlementFragment
|
|
1607
|
-
}
|
|
1608
|
-
}
|
|
1609
|
-
`,e.PackagePublishedPayloadFragmentDoc=(0,n.default)`
|
|
1610
|
-
fragment PackagePublishedPayload on PackagePublished {
|
|
1611
|
-
accountId
|
|
1612
|
-
environmentId
|
|
1613
|
-
packageType
|
|
1614
|
-
packageRefId
|
|
1615
|
-
packageVersion
|
|
1616
|
-
migrationType
|
|
1617
|
-
}
|
|
1618
|
-
`,e.CustomerPortalSubscriptionPriceFragmentDoc=(0,n.default)`
|
|
1619
|
-
fragment CustomerPortalSubscriptionPriceFragment on CustomerPortalSubscriptionPrice {
|
|
1620
|
-
billingPeriod
|
|
1621
|
-
billingModel
|
|
1622
|
-
blockSize
|
|
1623
|
-
price {
|
|
1624
|
-
amount
|
|
1625
|
-
currency
|
|
1626
|
-
}
|
|
1627
|
-
creditRate {
|
|
1628
|
-
amount
|
|
1629
|
-
customCurrencyId
|
|
1630
|
-
}
|
|
1631
|
-
feature {
|
|
1632
|
-
id
|
|
1633
|
-
refId
|
|
1634
|
-
displayName
|
|
1635
|
-
featureUnits
|
|
1636
|
-
featureUnitsPlural
|
|
1637
|
-
}
|
|
1638
|
-
}
|
|
1639
|
-
`,e.CustomerPortalSubscriptionAddonFragmentDoc=(0,n.default)`
|
|
1640
|
-
fragment CustomerPortalSubscriptionAddonFragment on CustomerPortalAddon {
|
|
1641
|
-
addonId
|
|
1642
|
-
description
|
|
1643
|
-
displayName
|
|
1644
|
-
quantity
|
|
1645
|
-
}
|
|
1646
|
-
`,e.CustomerPortalSubscriptionScheduledUpdateDataFragmentDoc=(0,n.default)`
|
|
1647
|
-
fragment CustomerPortalSubscriptionScheduledUpdateDataFragment on SubscriptionScheduledUpdate {
|
|
1648
|
-
subscriptionScheduleType
|
|
1649
|
-
scheduleStatus
|
|
1650
|
-
scheduledExecutionTime
|
|
1651
|
-
targetPackage {
|
|
1652
|
-
id
|
|
1653
|
-
refId
|
|
1654
|
-
displayName
|
|
1655
|
-
pricingType
|
|
1656
|
-
}
|
|
1657
|
-
scheduleVariables {
|
|
1658
|
-
...ScheduleVariablesFragment
|
|
1659
|
-
}
|
|
1660
|
-
}
|
|
1661
|
-
`,e.CustomerPortalSubscriptionFragmentDoc=(0,n.default)`
|
|
1662
|
-
fragment CustomerPortalSubscriptionFragment on CustomerPortalSubscription {
|
|
1663
|
-
subscriptionId
|
|
1664
|
-
planId
|
|
1665
|
-
planName
|
|
1666
|
-
pricingType
|
|
1667
|
-
prices {
|
|
1668
|
-
...CustomerPortalSubscriptionPriceFragment
|
|
1669
|
-
}
|
|
1670
|
-
pricing {
|
|
1671
|
-
unitQuantity
|
|
1672
|
-
billingPeriod
|
|
1673
|
-
billingModel
|
|
1674
|
-
pricingType
|
|
1675
|
-
usageBasedEstimatedBill
|
|
1676
|
-
price {
|
|
1677
|
-
amount
|
|
1678
|
-
currency
|
|
1679
|
-
}
|
|
1680
|
-
creditRate {
|
|
1681
|
-
amount
|
|
1682
|
-
customCurrencyId
|
|
1683
|
-
}
|
|
1684
|
-
feature {
|
|
1685
|
-
featureUnits
|
|
1686
|
-
featureUnitsPlural
|
|
1687
|
-
displayName
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1690
|
-
status
|
|
1691
|
-
trialRemainingDays
|
|
1692
|
-
billingPeriodRange {
|
|
1693
|
-
start
|
|
1694
|
-
end
|
|
1695
|
-
}
|
|
1696
|
-
totalPrice {
|
|
1697
|
-
subTotal {
|
|
1698
|
-
amount
|
|
1699
|
-
currency
|
|
1700
|
-
}
|
|
1701
|
-
total {
|
|
1702
|
-
amount
|
|
1703
|
-
currency
|
|
1704
|
-
}
|
|
1705
|
-
addonsTotal {
|
|
1706
|
-
amount
|
|
1707
|
-
currency
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
addons {
|
|
1711
|
-
...CustomerPortalSubscriptionAddonFragment
|
|
1712
|
-
}
|
|
1713
|
-
scheduledUpdates {
|
|
1714
|
-
...CustomerPortalSubscriptionScheduledUpdateDataFragment
|
|
1715
|
-
}
|
|
1716
|
-
}
|
|
1717
|
-
`,e.CustomerPortalEntitlementFragmentDoc=(0,n.default)`
|
|
1718
|
-
fragment CustomerPortalEntitlementFragment on Entitlement {
|
|
1719
|
-
isGranted
|
|
1720
|
-
usageLimit
|
|
1721
|
-
currentUsage
|
|
1722
|
-
hasUnlimitedUsage
|
|
1723
|
-
hasSoftLimit
|
|
1724
|
-
usagePeriodStart
|
|
1725
|
-
usagePeriodEnd
|
|
1726
|
-
nextResetDate
|
|
1727
|
-
resetPeriod
|
|
1728
|
-
resetPeriodConfiguration {
|
|
1729
|
-
...ResetPeriodConfigurationFragment
|
|
1730
|
-
}
|
|
1731
|
-
feature {
|
|
1732
|
-
...FeatureFragment
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
`,e.CustomerPortalPromotionalEntitlementFragmentDoc=(0,n.default)`
|
|
1736
|
-
fragment CustomerPortalPromotionalEntitlementFragment on CustomerPortalPromotionalEntitlement {
|
|
1737
|
-
displayName
|
|
1738
|
-
hasUnlimitedUsage
|
|
1739
|
-
hasSoftLimit
|
|
1740
|
-
usageLimit
|
|
1741
|
-
period
|
|
1742
|
-
startDate
|
|
1743
|
-
endDate
|
|
1744
|
-
}
|
|
1745
|
-
`,e.CustomerPortalBillingInformationFragmentDoc=(0,n.default)`
|
|
1746
|
-
fragment CustomerPortalBillingInformationFragment on CustomerPortalBillingInformation {
|
|
1747
|
-
email
|
|
1748
|
-
name
|
|
1749
|
-
defaultPaymentMethodLast4Digits
|
|
1750
|
-
defaultPaymentMethodId
|
|
1751
|
-
defaultPaymentExpirationMonth
|
|
1752
|
-
defaultPaymentExpirationYear
|
|
1753
|
-
defaultPaymentMethodType
|
|
1754
|
-
}
|
|
1755
|
-
`,e.FontVariantFragmentDoc=(0,n.default)`
|
|
1756
|
-
fragment FontVariantFragment on FontVariant {
|
|
1757
|
-
fontSize
|
|
1758
|
-
fontWeight
|
|
1759
|
-
}
|
|
1760
|
-
`,e.TypographyConfigurationFragmentDoc=(0,n.default)`
|
|
1761
|
-
fragment TypographyConfigurationFragment on TypographyConfiguration {
|
|
1762
|
-
fontFamily
|
|
1763
|
-
h1 {
|
|
1764
|
-
...FontVariantFragment
|
|
1765
|
-
}
|
|
1766
|
-
h2 {
|
|
1767
|
-
...FontVariantFragment
|
|
1768
|
-
}
|
|
1769
|
-
h3 {
|
|
1770
|
-
...FontVariantFragment
|
|
1771
|
-
}
|
|
1772
|
-
body {
|
|
1773
|
-
...FontVariantFragment
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
|
-
`,e.CustomerPortalConfigurationFragmentDoc=(0,n.default)`
|
|
1777
|
-
fragment CustomerPortalConfigurationFragment on CustomerPortalConfiguration {
|
|
1778
|
-
palette {
|
|
1779
|
-
primary
|
|
1780
|
-
textColor
|
|
1781
|
-
backgroundColor
|
|
1782
|
-
borderColor
|
|
1783
|
-
currentPlanBackground
|
|
1784
|
-
iconsColor
|
|
1785
|
-
paywallBackgroundColor
|
|
1786
|
-
}
|
|
1787
|
-
typography {
|
|
1788
|
-
...TypographyConfigurationFragment
|
|
1789
|
-
}
|
|
1790
|
-
customCss
|
|
1791
|
-
}
|
|
1792
|
-
`,e.CustomerPortalFragmentDoc=(0,n.default)`
|
|
1793
|
-
fragment CustomerPortalFragment on CustomerPortal {
|
|
1794
|
-
subscriptions {
|
|
1795
|
-
...CustomerPortalSubscriptionFragment
|
|
1796
|
-
}
|
|
1797
|
-
entitlements {
|
|
1798
|
-
...CustomerPortalEntitlementFragment
|
|
1799
|
-
}
|
|
1800
|
-
promotionalEntitlements {
|
|
1801
|
-
...CustomerPortalPromotionalEntitlementFragment
|
|
1802
|
-
}
|
|
1803
|
-
billingInformation {
|
|
1804
|
-
...CustomerPortalBillingInformationFragment
|
|
1805
|
-
}
|
|
1806
|
-
showWatermark
|
|
1807
|
-
billingPortalUrl
|
|
1808
|
-
canUpgradeSubscription
|
|
1809
|
-
configuration {
|
|
1810
|
-
...CustomerPortalConfigurationFragment
|
|
1811
|
-
}
|
|
1812
|
-
resource {
|
|
1813
|
-
...CustomerResourceFragment
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
`,e.CheckoutConfigurationFragmentDoc=(0,n.default)`
|
|
1817
|
-
fragment CheckoutConfigurationFragment on CheckoutConfiguration {
|
|
1818
|
-
palette {
|
|
1819
|
-
primary
|
|
1820
|
-
textColor
|
|
1821
|
-
backgroundColor
|
|
1822
|
-
borderColor
|
|
1823
|
-
summaryBackgroundColor
|
|
1824
|
-
__typename
|
|
1825
|
-
}
|
|
1826
|
-
typography {
|
|
1827
|
-
...TypographyConfigurationFragment
|
|
1828
|
-
__typename
|
|
1829
|
-
}
|
|
1830
|
-
customCss
|
|
1831
|
-
content {
|
|
1832
|
-
collectPhoneNumber
|
|
1833
|
-
}
|
|
1834
|
-
__typename
|
|
1835
|
-
}
|
|
1836
|
-
`,e.StripeCheckoutCredentialsFragmentDoc=(0,n.default)`
|
|
1837
|
-
fragment StripeCheckoutCredentialsFragment on StripeCheckoutCredentials {
|
|
1838
|
-
accountId
|
|
1839
|
-
setupSecret
|
|
1840
|
-
publicKey
|
|
1841
|
-
}
|
|
1842
|
-
`,e.ZuoraCheckoutCredentialsFragmentDoc=(0,n.default)`
|
|
1843
|
-
fragment ZuoraCheckoutCredentialsFragment on ZuoraCheckoutCredentials {
|
|
1844
|
-
publishableKey
|
|
1845
|
-
}
|
|
1846
|
-
`,e.CheckoutStateFragmentDoc=(0,n.default)`
|
|
1847
|
-
fragment CheckoutStateFragment on CheckoutState {
|
|
1848
|
-
configuration {
|
|
1849
|
-
...CheckoutConfigurationFragment
|
|
1850
|
-
}
|
|
1851
|
-
setupSecret
|
|
1852
|
-
customer {
|
|
1853
|
-
...CustomerFragment
|
|
1854
|
-
}
|
|
1855
|
-
activeSubscription {
|
|
1856
|
-
...SubscriptionFragment
|
|
1857
|
-
}
|
|
1858
|
-
resource {
|
|
1859
|
-
...CustomerResourceFragment
|
|
1860
|
-
}
|
|
1861
|
-
plan {
|
|
1862
|
-
...PlanFragment
|
|
1863
|
-
}
|
|
1864
|
-
billingIntegration {
|
|
1865
|
-
billingIdentifier
|
|
1866
|
-
billingCredentials {
|
|
1867
|
-
... on StripeCheckoutCredentials {
|
|
1868
|
-
...StripeCheckoutCredentialsFragment
|
|
1869
|
-
}
|
|
1870
|
-
... on ZuoraCheckoutCredentials {
|
|
1871
|
-
...ZuoraCheckoutCredentialsFragment
|
|
1872
|
-
}
|
|
1873
|
-
}
|
|
1874
|
-
credentials {
|
|
1875
|
-
accountId
|
|
1876
|
-
publicKey
|
|
1877
|
-
}
|
|
1878
|
-
}
|
|
1879
|
-
}
|
|
1880
|
-
`,e.MockPaywallPackageEntitlementFragmentDoc=(0,n.default)`
|
|
1881
|
-
fragment MockPaywallPackageEntitlementFragment on Entitlement {
|
|
1882
|
-
usageLimit
|
|
1883
|
-
hasUnlimitedUsage
|
|
1884
|
-
hasSoftLimit
|
|
1885
|
-
resetPeriod
|
|
1886
|
-
hiddenFromWidgets
|
|
1887
|
-
displayNameOverride
|
|
1888
|
-
enumValues
|
|
1889
|
-
isGranted
|
|
1890
|
-
feature {
|
|
1891
|
-
featureType
|
|
1892
|
-
meterType
|
|
1893
|
-
featureUnits
|
|
1894
|
-
featureUnitsPlural
|
|
1895
|
-
displayName
|
|
1896
|
-
description
|
|
1897
|
-
refId
|
|
1898
|
-
additionalMetaData
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
`,e.MockPaywallPriceFragmentDoc=(0,n.default)`
|
|
1902
|
-
fragment MockPaywallPriceFragment on PaywallPrice {
|
|
1903
|
-
billingModel
|
|
1904
|
-
billingPeriod
|
|
1905
|
-
billingId
|
|
1906
|
-
minUnitQuantity
|
|
1907
|
-
maxUnitQuantity
|
|
1908
|
-
billingCountryCode
|
|
1909
|
-
price {
|
|
1910
|
-
amount
|
|
1911
|
-
currency
|
|
1912
|
-
}
|
|
1913
|
-
creditRate {
|
|
1914
|
-
amount
|
|
1915
|
-
customCurrencyId
|
|
1916
|
-
}
|
|
1917
|
-
tiersMode
|
|
1918
|
-
tiers {
|
|
1919
|
-
...PriceTierFragment
|
|
1920
|
-
}
|
|
1921
|
-
feature {
|
|
1922
|
-
refId
|
|
1923
|
-
featureUnits
|
|
1924
|
-
featureUnitsPlural
|
|
1925
|
-
displayName
|
|
1926
|
-
}
|
|
1927
|
-
blockSize
|
|
1928
|
-
}
|
|
1929
|
-
`,e.MockPaywallAddonDependencyFragmentDoc=(0,n.default)`
|
|
1930
|
-
fragment MockPaywallAddonDependencyFragment on PaywallAddon {
|
|
1931
|
-
refId
|
|
1932
|
-
displayName
|
|
1933
|
-
description
|
|
1934
|
-
}
|
|
1935
|
-
`,e.MockPaywallAddonFragmentDoc=(0,n.default)`
|
|
1936
|
-
fragment MockPaywallAddonFragment on PaywallAddon {
|
|
1937
|
-
refId
|
|
1938
|
-
displayName
|
|
1939
|
-
description
|
|
1940
|
-
additionalMetaData
|
|
1941
|
-
billingId
|
|
1942
|
-
maxQuantity
|
|
1943
|
-
hiddenFromWidgets
|
|
1944
|
-
dependencies {
|
|
1945
|
-
...MockPaywallAddonDependencyFragment
|
|
1946
|
-
}
|
|
1947
|
-
entitlements {
|
|
1948
|
-
...MockPaywallPackageEntitlementFragment
|
|
1949
|
-
}
|
|
1950
|
-
prices {
|
|
1951
|
-
...MockPaywallPriceFragment
|
|
1952
|
-
}
|
|
1953
|
-
pricingType
|
|
1954
|
-
}
|
|
1955
|
-
`,e.MockPaywallPlanCompatiblePackageGroupsFragmentDoc=(0,n.default)`
|
|
1956
|
-
fragment MockPaywallPlanCompatiblePackageGroupsFragment on PaywallPlanCompatiblePackageGroup {
|
|
1957
|
-
packageGroupId
|
|
1958
|
-
displayName
|
|
1959
|
-
description
|
|
1960
|
-
addons {
|
|
1961
|
-
...MockPaywallAddonFragment
|
|
1962
|
-
}
|
|
1963
|
-
options {
|
|
1964
|
-
minItems
|
|
1965
|
-
freeItems
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
`,e.MockPaywallPlanFragmentDoc=(0,n.default)`
|
|
1969
|
-
fragment MockPaywallPlanFragment on PaywallPlan {
|
|
1970
|
-
refId
|
|
1971
|
-
description
|
|
1972
|
-
displayName
|
|
1973
|
-
billingId
|
|
1974
|
-
additionalMetaData
|
|
1975
|
-
product {
|
|
1976
|
-
refId
|
|
1977
|
-
displayName
|
|
1978
|
-
description
|
|
1979
|
-
additionalMetaData
|
|
1980
|
-
}
|
|
1981
|
-
basePlan {
|
|
1982
|
-
refId
|
|
1983
|
-
displayName
|
|
1984
|
-
}
|
|
1985
|
-
entitlements {
|
|
1986
|
-
...MockPaywallPackageEntitlementFragment
|
|
1987
|
-
}
|
|
1988
|
-
inheritedEntitlements {
|
|
1989
|
-
...MockPaywallPackageEntitlementFragment
|
|
1990
|
-
}
|
|
1991
|
-
prices {
|
|
1992
|
-
...MockPaywallPriceFragment
|
|
1993
|
-
}
|
|
1994
|
-
pricingType
|
|
1995
|
-
defaultTrialConfig {
|
|
1996
|
-
duration
|
|
1997
|
-
units
|
|
1998
|
-
budget {
|
|
1999
|
-
limit
|
|
2000
|
-
}
|
|
2001
|
-
trialEndBehavior
|
|
2002
|
-
}
|
|
2003
|
-
compatibleAddons {
|
|
2004
|
-
...MockPaywallAddonFragment
|
|
2005
|
-
}
|
|
2006
|
-
compatiblePackageGroups {
|
|
2007
|
-
...MockPaywallPlanCompatiblePackageGroupsFragment
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
2010
|
-
`,e.PaywallCurrencyFragmentDoc=(0,n.default)`
|
|
2011
|
-
fragment PaywallCurrencyFragment on PaywallCurrency {
|
|
2012
|
-
code
|
|
2013
|
-
symbol
|
|
2014
|
-
}
|
|
2015
|
-
`,e.LayoutConfigurationFragmentDoc=(0,n.default)`
|
|
2016
|
-
fragment LayoutConfigurationFragment on PaywallLayoutConfiguration {
|
|
2017
|
-
alignment
|
|
2018
|
-
planWidth
|
|
2019
|
-
planMargin
|
|
2020
|
-
planPadding
|
|
2021
|
-
}
|
|
2022
|
-
`,e.PaywallConfigurationFragmentDoc=(0,n.default)`
|
|
2023
|
-
fragment PaywallConfigurationFragment on PaywallConfiguration {
|
|
2024
|
-
palette {
|
|
2025
|
-
primary
|
|
2026
|
-
textColor
|
|
2027
|
-
backgroundColor
|
|
2028
|
-
borderColor
|
|
2029
|
-
currentPlanBackground
|
|
2030
|
-
}
|
|
2031
|
-
typography {
|
|
2032
|
-
...TypographyConfigurationFragment
|
|
2033
|
-
}
|
|
2034
|
-
layout {
|
|
2035
|
-
...LayoutConfigurationFragment
|
|
2036
|
-
}
|
|
2037
|
-
customCss
|
|
2038
|
-
}
|
|
2039
|
-
`,e.PaywallCalculatedPricePointsFragmentDoc=(0,n.default)`
|
|
2040
|
-
fragment PaywallCalculatedPricePointsFragment on PaywallPricePoint {
|
|
2041
|
-
planId
|
|
2042
|
-
additionalChargesMayApply
|
|
2043
|
-
billingPeriod
|
|
2044
|
-
amount
|
|
2045
|
-
currency
|
|
2046
|
-
billingCountryCode
|
|
2047
|
-
feature {
|
|
2048
|
-
refId
|
|
2049
|
-
featureUnits
|
|
2050
|
-
featureUnitsPlural
|
|
2051
|
-
displayName
|
|
2052
|
-
description
|
|
2053
|
-
}
|
|
2054
|
-
}
|
|
2055
|
-
`,e.PaywallFragmentDoc=(0,n.default)`
|
|
2056
|
-
fragment PaywallFragment on Paywall {
|
|
2057
|
-
plans {
|
|
2058
|
-
...PlanFragment
|
|
2059
|
-
}
|
|
2060
|
-
currency {
|
|
2061
|
-
...PaywallCurrencyFragment
|
|
2062
|
-
}
|
|
2063
|
-
configuration {
|
|
2064
|
-
...PaywallConfigurationFragment
|
|
2065
|
-
}
|
|
2066
|
-
customer {
|
|
2067
|
-
...CustomerFragment
|
|
2068
|
-
}
|
|
2069
|
-
activeSubscriptions {
|
|
2070
|
-
...SubscriptionFragment
|
|
2071
|
-
}
|
|
2072
|
-
resource {
|
|
2073
|
-
...CustomerResourceFragment
|
|
2074
|
-
}
|
|
2075
|
-
paywallCalculatedPricePoints {
|
|
2076
|
-
...PaywallCalculatedPricePointsFragment
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
`,e.UsageHistoryFragmentDoc=(0,n.default)`
|
|
2080
|
-
fragment UsageHistoryFragment on UsageHistory {
|
|
2081
|
-
startDate
|
|
2082
|
-
endDate
|
|
2083
|
-
markers {
|
|
2084
|
-
type
|
|
2085
|
-
timestamp
|
|
2086
|
-
}
|
|
2087
|
-
usageMeasurements {
|
|
2088
|
-
date
|
|
2089
|
-
value
|
|
2090
|
-
isResetPoint
|
|
2091
|
-
}
|
|
2092
|
-
groups {
|
|
2093
|
-
groupInfo {
|
|
2094
|
-
key
|
|
2095
|
-
value
|
|
2096
|
-
}
|
|
2097
|
-
usageMeasurements {
|
|
2098
|
-
date
|
|
2099
|
-
value
|
|
2100
|
-
isResetPoint
|
|
2101
|
-
}
|
|
2102
|
-
}
|
|
2103
|
-
}
|
|
2104
|
-
`,e.UsageHistoryV2FragmentDoc=(0,n.default)`
|
|
2105
|
-
fragment UsageHistoryV2Fragment on UsageHistoryV2 {
|
|
2106
|
-
markers {
|
|
2107
|
-
type
|
|
2108
|
-
timestamp
|
|
2109
|
-
}
|
|
2110
|
-
series {
|
|
2111
|
-
tags {
|
|
2112
|
-
key
|
|
2113
|
-
value
|
|
2114
|
-
}
|
|
2115
|
-
points {
|
|
2116
|
-
timestamp
|
|
2117
|
-
value
|
|
2118
|
-
isResetPoint
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
`,e.SlimSubscriptionFragmentDoc=(0,n.default)`
|
|
2123
|
-
fragment SlimSubscriptionFragment on CustomerSubscription {
|
|
2124
|
-
id
|
|
2125
|
-
subscriptionId
|
|
2126
|
-
refId
|
|
2127
|
-
status
|
|
2128
|
-
additionalMetaData
|
|
2129
|
-
billingId
|
|
2130
|
-
billingLinkUrl
|
|
2131
|
-
effectiveEndDate
|
|
2132
|
-
cancellationDate
|
|
2133
|
-
currentBillingPeriodEnd
|
|
2134
|
-
pricingType
|
|
2135
|
-
latestInvoice {
|
|
2136
|
-
...SubscriptionInvoiceFragment
|
|
2137
|
-
}
|
|
2138
|
-
paymentCollection
|
|
2139
|
-
billingSyncError
|
|
2140
|
-
resource {
|
|
2141
|
-
...CustomerResourceFragment
|
|
2142
|
-
}
|
|
2143
|
-
experimentInfo {
|
|
2144
|
-
name
|
|
2145
|
-
id
|
|
2146
|
-
groupType
|
|
2147
|
-
groupName
|
|
2148
|
-
}
|
|
2149
|
-
prices {
|
|
2150
|
-
usageLimit
|
|
2151
|
-
price {
|
|
2152
|
-
...PriceFragment
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
totalPrice {
|
|
2156
|
-
...TotalPriceFragment
|
|
2157
|
-
}
|
|
2158
|
-
plan {
|
|
2159
|
-
id
|
|
2160
|
-
refId
|
|
2161
|
-
}
|
|
2162
|
-
addons {
|
|
2163
|
-
quantity
|
|
2164
|
-
addon {
|
|
2165
|
-
id
|
|
2166
|
-
refId
|
|
2167
|
-
}
|
|
2168
|
-
}
|
|
2169
|
-
customer {
|
|
2170
|
-
id
|
|
2171
|
-
refId
|
|
2172
|
-
}
|
|
2173
|
-
}
|
|
2174
|
-
`,e.ProvisionCustomerFragmentDoc=(0,n.default)`
|
|
2175
|
-
fragment ProvisionCustomerFragment on ProvisionedCustomer {
|
|
2176
|
-
customer {
|
|
2177
|
-
...SlimCustomerFragment
|
|
2178
|
-
}
|
|
2179
|
-
subscriptionDecisionStrategy
|
|
2180
|
-
subscription {
|
|
2181
|
-
...SlimSubscriptionFragment
|
|
2182
|
-
}
|
|
2183
|
-
entitlements {
|
|
2184
|
-
...EntitlementFragment
|
|
2185
|
-
}
|
|
2186
|
-
}
|
|
2187
|
-
`,e.ApplySubscriptionFragmentDoc=(0,n.default)`
|
|
2188
|
-
fragment ApplySubscriptionFragment on ApplySubscription {
|
|
2189
|
-
subscription {
|
|
2190
|
-
...SubscriptionFragment
|
|
2191
|
-
}
|
|
2192
|
-
entitlements {
|
|
2193
|
-
...EntitlementFragment
|
|
2194
|
-
}
|
|
2195
|
-
}
|
|
2196
|
-
`,e.ProvisionSubscriptionFragmentDoc=(0,n.default)`
|
|
2197
|
-
fragment ProvisionSubscriptionFragment on ProvisionSubscriptionResult {
|
|
2198
|
-
status
|
|
2199
|
-
checkoutUrl
|
|
2200
|
-
checkoutBillingId
|
|
2201
|
-
subscription {
|
|
2202
|
-
...SlimSubscriptionFragment
|
|
2203
|
-
}
|
|
2204
|
-
entitlements {
|
|
2205
|
-
...EntitlementFragment
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
`,e.ReportUsageFragmentDoc=(0,n.default)`
|
|
2209
|
-
fragment ReportUsageFragment on UsageMeasurementWithCurrentUsage {
|
|
2210
|
-
id
|
|
2211
|
-
featureId
|
|
2212
|
-
customerId
|
|
2213
|
-
resourceId
|
|
2214
|
-
currentUsage
|
|
2215
|
-
usagePeriodStart
|
|
2216
|
-
usagePeriodEnd
|
|
2217
|
-
nextResetDate
|
|
2218
|
-
timestamp
|
|
2219
|
-
}
|
|
2220
|
-
`,e.CreditGrantFragmentDoc=(0,n.default)`
|
|
2221
|
-
fragment CreditGrantFragment on CreditGrant {
|
|
2222
|
-
grantId
|
|
2223
|
-
amount
|
|
2224
|
-
comment
|
|
2225
|
-
currencyId
|
|
2226
|
-
customerId
|
|
2227
|
-
displayName
|
|
2228
|
-
effectiveAt
|
|
2229
|
-
expireAt
|
|
2230
|
-
grantType
|
|
2231
|
-
priority
|
|
2232
|
-
consumedAmount
|
|
2233
|
-
cost {
|
|
2234
|
-
amount
|
|
2235
|
-
currency
|
|
2236
|
-
}
|
|
2237
|
-
createdAt
|
|
2238
|
-
updatedAt
|
|
2239
|
-
resourceId
|
|
2240
|
-
additionalMetaData
|
|
2241
|
-
}
|
|
2242
|
-
`,e.CreditLedgerFragmentDoc=(0,n.default)`
|
|
2243
|
-
fragment CreditLedgerFragment on CreditLedgerEvent {
|
|
2244
|
-
timestamp
|
|
2245
|
-
eventType
|
|
2246
|
-
customerId
|
|
2247
|
-
resourceId
|
|
2248
|
-
eventId
|
|
2249
|
-
featureId
|
|
2250
|
-
amount
|
|
2251
|
-
creditGrantId
|
|
2252
|
-
creditCurrencyId
|
|
2253
|
-
}
|
|
2254
|
-
`,e.CreditsBalanceSummaryFragmentDoc=(0,n.default)`
|
|
2255
|
-
fragment CreditsBalanceSummaryFragment on CreditBalanceSummary {
|
|
2256
|
-
customerId
|
|
2257
|
-
balances {
|
|
2258
|
-
currency {
|
|
2259
|
-
currencyId
|
|
2260
|
-
displayName
|
|
2261
|
-
symbol
|
|
2262
|
-
units {
|
|
2263
|
-
singular
|
|
2264
|
-
plural
|
|
2265
|
-
}
|
|
2266
|
-
}
|
|
2267
|
-
currentBalance
|
|
2268
|
-
totalConsumed
|
|
2269
|
-
totalGranted
|
|
2270
|
-
}
|
|
2271
|
-
}
|
|
2272
|
-
`,e.PaymentSessionFragmentDoc=(0,n.default)`
|
|
2273
|
-
fragment PaymentSessionFragment on PaymentSession {
|
|
2274
|
-
token
|
|
2275
|
-
}
|
|
2276
|
-
`,e.SlimCustomCurrencyFragmentDoc=(0,n.default)`
|
|
2277
|
-
fragment SlimCustomCurrencyFragment on SlimCustomCurrency {
|
|
2278
|
-
currencyId
|
|
2279
|
-
displayName
|
|
2280
|
-
units {
|
|
2281
|
-
singular
|
|
2282
|
-
plural
|
|
2283
|
-
}
|
|
2284
|
-
}
|
|
2285
|
-
`,e.CreditUsageFragmentDoc=(0,n.default)`
|
|
2286
|
-
fragment CreditUsageFragment on CreditUsage {
|
|
2287
|
-
series {
|
|
2288
|
-
featureId
|
|
2289
|
-
featureName
|
|
2290
|
-
totalCredits
|
|
2291
|
-
points {
|
|
2292
|
-
timestamp
|
|
2293
|
-
value
|
|
2294
|
-
}
|
|
2295
|
-
}
|
|
2296
|
-
currency {
|
|
2297
|
-
...SlimCustomCurrencyFragment
|
|
2298
|
-
}
|
|
2299
|
-
}
|
|
2300
|
-
`,e.ProvisionCustomerDocument=(0,n.default)`
|
|
2301
|
-
mutation ProvisionCustomer($input: ProvisionCustomerInput!) {
|
|
2302
|
-
provisionCustomer(input: $input) {
|
|
2303
|
-
...ProvisionCustomerFragment
|
|
2304
|
-
}
|
|
2305
|
-
}
|
|
2306
|
-
${e.ProvisionCustomerFragmentDoc}
|
|
2307
|
-
${e.SlimCustomerFragmentDoc}
|
|
2308
|
-
${e.SlimSubscriptionFragmentDoc}
|
|
2309
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2310
|
-
${e.CustomerResourceFragmentDoc}
|
|
2311
|
-
${e.PriceFragmentDoc}
|
|
2312
|
-
${e.PriceTierFragmentDoc}
|
|
2313
|
-
${e.TotalPriceFragmentDoc}
|
|
2314
|
-
${e.EntitlementFragmentDoc}
|
|
2315
|
-
${e.ResetPeriodConfigurationFragmentDoc}
|
|
2316
|
-
${e.FeatureFragmentDoc}`,e.ImportCustomerBulkDocument=(0,n.default)`
|
|
2317
|
-
mutation ImportCustomerBulk($input: ImportCustomerBulkInput!) {
|
|
2318
|
-
importCustomersBulk(input: $input)
|
|
2319
|
-
}
|
|
2320
|
-
`,e.ImportCustomerDocument=(0,n.default)`
|
|
2321
|
-
mutation ImportCustomer($input: ImportCustomerInput!) {
|
|
2322
|
-
importCustomer: importOneCustomer(input: $input) {
|
|
2323
|
-
...SlimCustomerFragment
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2326
|
-
${e.SlimCustomerFragmentDoc}`,e.UpdateCustomerDocument=(0,n.default)`
|
|
2327
|
-
mutation UpdateCustomer($input: UpdateCustomerInput!) {
|
|
2328
|
-
updateCustomer: updateOneCustomer(input: $input) {
|
|
2329
|
-
...SlimCustomerFragment
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
${e.SlimCustomerFragmentDoc}`,e.DetachCustomerPaymentMethodDocument=(0,n.default)`
|
|
2333
|
-
mutation DetachCustomerPaymentMethod($input: DetachCustomerPaymentMethodInput!) {
|
|
2334
|
-
detachCustomerPaymentMethod(input: $input) {
|
|
2335
|
-
...SlimCustomerFragment
|
|
2336
|
-
}
|
|
2337
|
-
}
|
|
2338
|
-
${e.SlimCustomerFragmentDoc}`,e.GrantPromotionalEntitlementsDocument=(0,n.default)`
|
|
2339
|
-
mutation GrantPromotionalEntitlements($input: GrantPromotionalEntitlementsInput!) {
|
|
2340
|
-
grantPromotionalEntitlements(input: $input) {
|
|
2341
|
-
...PromotionalEntitlementFragment
|
|
2342
|
-
}
|
|
2343
|
-
}
|
|
2344
|
-
${e.PromotionalEntitlementFragmentDoc}`,e.RevokePromotionalEntitlementDocument=(0,n.default)`
|
|
2345
|
-
mutation RevokePromotionalEntitlement($input: RevokePromotionalEntitlementInput!) {
|
|
2346
|
-
revokePromotionalEntitlement(input: $input) {
|
|
2347
|
-
id
|
|
2348
|
-
}
|
|
2349
|
-
}
|
|
2350
|
-
`,e.ProvisionSubscriptionDocument=(0,n.default)`
|
|
2351
|
-
mutation ProvisionSubscription($input: ProvisionSubscriptionInput!) {
|
|
2352
|
-
provisionSubscription: provisionSubscriptionV2(input: $input) {
|
|
2353
|
-
...ProvisionSubscriptionFragment
|
|
2354
|
-
}
|
|
2355
|
-
}
|
|
2356
|
-
${e.ProvisionSubscriptionFragmentDoc}
|
|
2357
|
-
${e.SlimSubscriptionFragmentDoc}
|
|
2358
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2359
|
-
${e.CustomerResourceFragmentDoc}
|
|
2360
|
-
${e.PriceFragmentDoc}
|
|
2361
|
-
${e.PriceTierFragmentDoc}
|
|
2362
|
-
${e.TotalPriceFragmentDoc}
|
|
2363
|
-
${e.EntitlementFragmentDoc}
|
|
2364
|
-
${e.ResetPeriodConfigurationFragmentDoc}
|
|
2365
|
-
${e.FeatureFragmentDoc}`,e.ApplySubscriptionDocument=(0,n.default)`
|
|
2366
|
-
mutation ApplySubscription($input: ApplySubscriptionInput!) {
|
|
2367
|
-
applySubscription(input: $input) {
|
|
2368
|
-
...ApplySubscriptionFragment
|
|
2369
|
-
}
|
|
2370
|
-
}
|
|
2371
|
-
${e.ApplySubscriptionFragmentDoc}
|
|
2372
|
-
${e.SubscriptionFragmentDoc}
|
|
2373
|
-
${e.SlimCustomerFragmentDoc}
|
|
2374
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2375
|
-
${e.CustomerResourceFragmentDoc}
|
|
2376
|
-
${e.PriceFragmentDoc}
|
|
2377
|
-
${e.PriceTierFragmentDoc}
|
|
2378
|
-
${e.TotalPriceFragmentDoc}
|
|
2379
|
-
${e.PlanFragmentDoc}
|
|
2380
|
-
${e.ProductFragmentDoc}
|
|
2381
|
-
${e.PackageEntitlementFragmentDoc}
|
|
2382
|
-
${e.AddonFragmentDoc}
|
|
2383
|
-
${e.OveragePriceFragmentDoc}
|
|
2384
|
-
${e.AddonDependencyFragmentDoc}
|
|
2385
|
-
${e.PlanCompatiblePackageGroupsFragmentDoc}
|
|
2386
|
-
${e.SubscriptionScheduledUpdateDataFragmentDoc}
|
|
2387
|
-
${e.ScheduleVariablesFragmentDoc}
|
|
2388
|
-
${e.SubscriptionFutureUpdateDataFragmentDoc}
|
|
2389
|
-
${e.SubscriptionTrialConfigurationFragmentDoc}
|
|
2390
|
-
${e.EntitlementFragmentDoc}
|
|
2391
|
-
${e.ResetPeriodConfigurationFragmentDoc}
|
|
2392
|
-
${e.FeatureFragmentDoc}`,e.ImportSubscriptionsBulkDocument=(0,n.default)`
|
|
2393
|
-
mutation ImportSubscriptionsBulk($input: ImportSubscriptionsBulkInput!) {
|
|
2394
|
-
importSubscriptionsBulk(input: $input)
|
|
2395
|
-
}
|
|
2396
|
-
`,e.UpdateSubscriptionDocument=(0,n.default)`
|
|
2397
|
-
mutation UpdateSubscription($input: UpdateSubscriptionInput!) {
|
|
2398
|
-
updateSubscription: updateOneSubscription(input: $input) {
|
|
2399
|
-
...SlimSubscriptionFragment
|
|
2400
|
-
}
|
|
2401
|
-
}
|
|
2402
|
-
${e.SlimSubscriptionFragmentDoc}
|
|
2403
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2404
|
-
${e.CustomerResourceFragmentDoc}
|
|
2405
|
-
${e.PriceFragmentDoc}
|
|
2406
|
-
${e.PriceTierFragmentDoc}
|
|
2407
|
-
${e.TotalPriceFragmentDoc}`,e.CancelSubscriptionDocument=(0,n.default)`
|
|
2408
|
-
mutation CancelSubscription($input: SubscriptionCancellationInput!) {
|
|
2409
|
-
cancelSubscription(input: $input) {
|
|
2410
|
-
...SlimSubscriptionFragment
|
|
2411
|
-
}
|
|
2412
|
-
}
|
|
2413
|
-
${e.SlimSubscriptionFragmentDoc}
|
|
2414
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2415
|
-
${e.CustomerResourceFragmentDoc}
|
|
2416
|
-
${e.PriceFragmentDoc}
|
|
2417
|
-
${e.PriceTierFragmentDoc}
|
|
2418
|
-
${e.TotalPriceFragmentDoc}`,e.EstimateSubscriptionDocument=(0,n.default)`
|
|
2419
|
-
mutation EstimateSubscription($input: EstimateSubscriptionInput!) {
|
|
2420
|
-
estimateSubscription(input: $input) {
|
|
2421
|
-
...SubscriptionPreviewFragment
|
|
2422
|
-
}
|
|
2423
|
-
}
|
|
2424
|
-
${e.SubscriptionPreviewFragmentDoc}`,e.EstimateSubscriptionUpdateDocument=(0,n.default)`
|
|
2425
|
-
mutation EstimateSubscriptionUpdate($input: EstimateSubscriptionUpdateInput!) {
|
|
2426
|
-
estimateSubscriptionUpdate(input: $input) {
|
|
2427
|
-
...SubscriptionPreviewFragment
|
|
2428
|
-
}
|
|
2429
|
-
}
|
|
2430
|
-
${e.SubscriptionPreviewFragmentDoc}`,e.PreviewSubscriptionDocument=(0,n.default)`
|
|
2431
|
-
mutation PreviewSubscription($input: PreviewSubscriptionInput!) {
|
|
2432
|
-
previewSubscription(input: $input) {
|
|
2433
|
-
...SubscriptionPreviewV2Fragment
|
|
2434
|
-
}
|
|
2435
|
-
}
|
|
2436
|
-
${e.SubscriptionPreviewV2FragmentDoc}
|
|
2437
|
-
${e.ImmediateSubscriptionPreviewInvoiceFragmentDoc}
|
|
2438
|
-
${e.SubscriptionPreviewInvoiceFragmentDoc}`,e.PreviewNextInvoiceDocument=(0,n.default)`
|
|
2439
|
-
mutation PreviewNextInvoice($input: PreviewNextInvoiceInput!) {
|
|
2440
|
-
previewNextInvoice(input: $input) {
|
|
2441
|
-
...SubscriptionInvoicePreviewFragment
|
|
2442
|
-
}
|
|
2443
|
-
}
|
|
2444
|
-
${e.SubscriptionInvoicePreviewFragmentDoc}
|
|
2445
|
-
${e.PriceFragmentDoc}
|
|
2446
|
-
${e.PriceTierFragmentDoc}`,e.CancelSubscriptionUpdatesDocument=(0,n.default)`
|
|
2447
|
-
mutation CancelSubscriptionUpdates($input: SubscriptionUpdateScheduleCancellationInput!) {
|
|
2448
|
-
cancelSchedule(input: $input)
|
|
2449
|
-
}
|
|
2450
|
-
`,e.ReportUsageDocument=(0,n.default)`
|
|
2451
|
-
mutation ReportUsage($input: ReportUsageInput!) {
|
|
2452
|
-
reportUsage(input: $input) {
|
|
2453
|
-
...ReportUsageFragment
|
|
2454
|
-
}
|
|
2455
|
-
}
|
|
2456
|
-
${e.ReportUsageFragmentDoc}`,e.ReportUsageBulkDocument=(0,n.default)`
|
|
2457
|
-
mutation ReportUsageBulk($input: ReportUsageBulkInput!) {
|
|
2458
|
-
reportUsageBulk(input: $input) {
|
|
2459
|
-
...ReportUsageFragment
|
|
2460
|
-
}
|
|
2461
|
-
}
|
|
2462
|
-
${e.ReportUsageFragmentDoc}`,e.ReportEventDocument=(0,n.default)`
|
|
2463
|
-
mutation ReportEvent($input: UsageEventsReportInput!) {
|
|
2464
|
-
reportEvent(events: $input)
|
|
2465
|
-
}
|
|
2466
|
-
`,e.ReportEntitlementCheckRequestedDocument=(0,n.default)`
|
|
2467
|
-
mutation ReportEntitlementCheckRequested($entitlementCheckRequested: EntitlementCheckRequested!) {
|
|
2468
|
-
reportEntitlementCheckRequested(
|
|
2469
|
-
entitlementCheckRequested: $entitlementCheckRequested
|
|
2470
|
-
)
|
|
2471
|
-
}
|
|
2472
|
-
`,e.CreateSubscriptionDocument=(0,n.default)`
|
|
2473
|
-
mutation CreateSubscription($input: SubscriptionInput!) {
|
|
2474
|
-
createSubscription(subscription: $input) {
|
|
2475
|
-
...SlimSubscriptionFragment
|
|
2476
|
-
}
|
|
2477
|
-
}
|
|
2478
|
-
${e.SlimSubscriptionFragmentDoc}
|
|
2479
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2480
|
-
${e.CustomerResourceFragmentDoc}
|
|
2481
|
-
${e.PriceFragmentDoc}
|
|
2482
|
-
${e.PriceTierFragmentDoc}
|
|
2483
|
-
${e.TotalPriceFragmentDoc}`,e.MigrateSubscriptionToLatestDocument=(0,n.default)`
|
|
2484
|
-
mutation MigrateSubscriptionToLatest($input: SubscriptionMigrationInput!) {
|
|
2485
|
-
migrateSubscriptionToLatest(input: $input) {
|
|
2486
|
-
subscriptionId
|
|
2487
|
-
}
|
|
2488
|
-
}
|
|
2489
|
-
`,e.ArchiveCustomerDocument=(0,n.default)`
|
|
2490
|
-
mutation ArchiveCustomer($input: ArchiveCustomerInput!) {
|
|
2491
|
-
archiveCustomer(input: $input) {
|
|
2492
|
-
customerId
|
|
2493
|
-
}
|
|
2494
|
-
}
|
|
2495
|
-
`,e.UnarchiveCustomerDocument=(0,n.default)`
|
|
2496
|
-
mutation UnarchiveCustomer($input: UnarchiveCustomerInput!) {
|
|
2497
|
-
unarchiveCustomer(input: $input) {
|
|
2498
|
-
...SlimCustomerFragment
|
|
2499
|
-
}
|
|
2500
|
-
}
|
|
2501
|
-
${e.SlimCustomerFragmentDoc}`,e.TransferSubscriptionDocument=(0,n.default)`
|
|
2502
|
-
mutation TransferSubscription($input: TransferSubscriptionInput!) {
|
|
2503
|
-
transferSubscription(input: $input) {
|
|
2504
|
-
...SlimSubscriptionFragment
|
|
2505
|
-
}
|
|
2506
|
-
}
|
|
2507
|
-
${e.SlimSubscriptionFragmentDoc}
|
|
2508
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2509
|
-
${e.CustomerResourceFragmentDoc}
|
|
2510
|
-
${e.PriceFragmentDoc}
|
|
2511
|
-
${e.PriceTierFragmentDoc}
|
|
2512
|
-
${e.TotalPriceFragmentDoc}`,e.DelegateSubscriptionToCustomerDocument=(0,n.default)`
|
|
2513
|
-
mutation DelegateSubscriptionToCustomer($input: DelegateSubscriptionToCustomerInput!) {
|
|
2514
|
-
delegateSubscriptionToCustomer(input: $input) {
|
|
2515
|
-
...SlimSubscriptionFragment
|
|
2516
|
-
}
|
|
2517
|
-
}
|
|
2518
|
-
${e.SlimSubscriptionFragmentDoc}
|
|
2519
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2520
|
-
${e.CustomerResourceFragmentDoc}
|
|
2521
|
-
${e.PriceFragmentDoc}
|
|
2522
|
-
${e.PriceTierFragmentDoc}
|
|
2523
|
-
${e.TotalPriceFragmentDoc}`,e.TransferSubscriptionToResourceDocument=(0,n.default)`
|
|
2524
|
-
mutation TransferSubscriptionToResource($input: TransferSubscriptionToResourceInput!) {
|
|
2525
|
-
transferSubscriptionToResource(input: $input) {
|
|
2526
|
-
...SlimSubscriptionFragment
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
${e.SlimSubscriptionFragmentDoc}
|
|
2530
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2531
|
-
${e.CustomerResourceFragmentDoc}
|
|
2532
|
-
${e.PriceFragmentDoc}
|
|
2533
|
-
${e.PriceTierFragmentDoc}
|
|
2534
|
-
${e.TotalPriceFragmentDoc}`,e.GrantCreditsDocument=(0,n.default)`
|
|
2535
|
-
mutation GrantCredits($input: CreditGrantInput!) {
|
|
2536
|
-
createCreditGrant(input: $input) {
|
|
2537
|
-
...CreditGrantFragment
|
|
2538
|
-
}
|
|
2539
|
-
}
|
|
2540
|
-
${e.CreditGrantFragmentDoc}`,e.GrantPromotionalEntitlementsGroupDocument=(0,n.default)`
|
|
2541
|
-
mutation GrantPromotionalEntitlementsGroup($input: GrantPromotionalEntitlementsGroupInput!) {
|
|
2542
|
-
grantPromotionalEntitlementsGroup(input: $input) {
|
|
2543
|
-
...PromotionalEntitlementFragment
|
|
2544
|
-
}
|
|
2545
|
-
}
|
|
2546
|
-
${e.PromotionalEntitlementFragmentDoc}`,e.RevokePromotionalEntitlementsGroupDocument=(0,n.default)`
|
|
2547
|
-
mutation RevokePromotionalEntitlementsGroup($input: RevokePromotionalEntitlementsGroupInput!) {
|
|
2548
|
-
revokePromotionalEntitlementsGroup(input: $input) {
|
|
2549
|
-
...PromotionalEntitlementFragment
|
|
2550
|
-
}
|
|
2551
|
-
}
|
|
2552
|
-
${e.PromotionalEntitlementFragmentDoc}`,e.UnlinkPromotionalEntitlementsGroupDocument=(0,n.default)`
|
|
2553
|
-
mutation UnlinkPromotionalEntitlementsGroup($input: UnlinkPromotionalEntitlementsGroupInput!) {
|
|
2554
|
-
unlinkPromotionalEntitlementsGroup(input: $input) {
|
|
2555
|
-
...PromotionalEntitlementFragment
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
|
-
${e.PromotionalEntitlementFragmentDoc}`,e.CreatePaymentSessionDocument=(0,n.default)`
|
|
2559
|
-
mutation CreatePaymentSession($input: PaymentSessionInput!) {
|
|
2560
|
-
createPaymentSession(input: $input) {
|
|
2561
|
-
...PaymentSessionFragment
|
|
2562
|
-
}
|
|
2563
|
-
}
|
|
2564
|
-
${e.PaymentSessionFragmentDoc}`,e.GetCustomerByIdDocument=(0,n.default)`
|
|
2565
|
-
query GetCustomerById($input: GetCustomerByRefIdInput!) {
|
|
2566
|
-
getCustomerByRefId(input: $input) {
|
|
2567
|
-
...CustomerWithSubscriptionsFragment
|
|
2568
|
-
}
|
|
2569
|
-
}
|
|
2570
|
-
${e.CustomerWithSubscriptionsFragmentDoc}
|
|
2571
|
-
${e.CustomerFragmentDoc}
|
|
2572
|
-
${e.SlimCustomerFragmentDoc}
|
|
2573
|
-
${e.CouponFragmentDoc}
|
|
2574
|
-
${e.PromotionalEntitlementFragmentDoc}
|
|
2575
|
-
${e.SubscriptionFragmentDoc}
|
|
2576
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2577
|
-
${e.CustomerResourceFragmentDoc}
|
|
2578
|
-
${e.PriceFragmentDoc}
|
|
2579
|
-
${e.PriceTierFragmentDoc}
|
|
2580
|
-
${e.TotalPriceFragmentDoc}
|
|
2581
|
-
${e.PlanFragmentDoc}
|
|
2582
|
-
${e.ProductFragmentDoc}
|
|
2583
|
-
${e.PackageEntitlementFragmentDoc}
|
|
2584
|
-
${e.AddonFragmentDoc}
|
|
2585
|
-
${e.OveragePriceFragmentDoc}
|
|
2586
|
-
${e.AddonDependencyFragmentDoc}
|
|
2587
|
-
${e.PlanCompatiblePackageGroupsFragmentDoc}
|
|
2588
|
-
${e.SubscriptionScheduledUpdateDataFragmentDoc}
|
|
2589
|
-
${e.ScheduleVariablesFragmentDoc}
|
|
2590
|
-
${e.SubscriptionFutureUpdateDataFragmentDoc}
|
|
2591
|
-
${e.SubscriptionTrialConfigurationFragmentDoc}`,e.GetCustomerStatisticsDocument=(0,n.default)`
|
|
2592
|
-
query GetCustomerStatistics($input: GetCustomerByRefIdInput!) {
|
|
2593
|
-
getCustomerByRefId(input: $input) {
|
|
2594
|
-
...CustomerStatisticsFragment
|
|
2595
|
-
}
|
|
2596
|
-
}
|
|
2597
|
-
${e.CustomerStatisticsFragmentDoc}`,e.GetActiveSubscriptionsDocument=(0,n.default)`
|
|
2598
|
-
query GetActiveSubscriptions($input: GetActiveSubscriptionsInput!) {
|
|
2599
|
-
getActiveSubscriptions(input: $input) {
|
|
2600
|
-
...SubscriptionFragment
|
|
2601
|
-
}
|
|
2602
|
-
}
|
|
2603
|
-
${e.SubscriptionFragmentDoc}
|
|
2604
|
-
${e.SlimCustomerFragmentDoc}
|
|
2605
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2606
|
-
${e.CustomerResourceFragmentDoc}
|
|
2607
|
-
${e.PriceFragmentDoc}
|
|
2608
|
-
${e.PriceTierFragmentDoc}
|
|
2609
|
-
${e.TotalPriceFragmentDoc}
|
|
2610
|
-
${e.PlanFragmentDoc}
|
|
2611
|
-
${e.ProductFragmentDoc}
|
|
2612
|
-
${e.PackageEntitlementFragmentDoc}
|
|
2613
|
-
${e.AddonFragmentDoc}
|
|
2614
|
-
${e.OveragePriceFragmentDoc}
|
|
2615
|
-
${e.AddonDependencyFragmentDoc}
|
|
2616
|
-
${e.PlanCompatiblePackageGroupsFragmentDoc}
|
|
2617
|
-
${e.SubscriptionScheduledUpdateDataFragmentDoc}
|
|
2618
|
-
${e.ScheduleVariablesFragmentDoc}
|
|
2619
|
-
${e.SubscriptionFutureUpdateDataFragmentDoc}
|
|
2620
|
-
${e.SubscriptionTrialConfigurationFragmentDoc}`,e.GetActiveSubscriptionsListDocument=(0,n.default)`
|
|
2621
|
-
query GetActiveSubscriptionsList($input: GetActiveSubscriptionsInput!) {
|
|
2622
|
-
getActiveSubscriptions(input: $input) {
|
|
2623
|
-
...SlimSubscriptionFragmentV2
|
|
2624
|
-
}
|
|
2625
|
-
}
|
|
2626
|
-
${e.SlimSubscriptionFragmentV2FragmentDoc}`,e.GetSubscriptionsDocument=(0,n.default)`
|
|
2627
|
-
query GetSubscriptions($filter: SubscriptionQueryFilter, $paging: CursorPaging, $sorting: [SubscriptionQuerySort!]) {
|
|
2628
|
-
subscriptions(filter: $filter, paging: $paging, sorting: $sorting) {
|
|
2629
|
-
edges {
|
|
2630
|
-
node {
|
|
2631
|
-
...SubscriptionQueryFragment
|
|
2632
|
-
}
|
|
2633
|
-
}
|
|
2634
|
-
pageInfo {
|
|
2635
|
-
...PageInfoFragment
|
|
2636
|
-
}
|
|
2637
|
-
}
|
|
2638
|
-
}
|
|
2639
|
-
${e.SubscriptionQueryFragmentDoc}
|
|
2640
|
-
${e.PageInfoFragmentDoc}`,e.GetSubscriptionDocument=(0,n.default)`
|
|
2641
|
-
query GetSubscription($input: GetSubscriptionInput!) {
|
|
2642
|
-
getSubscription(input: $input) {
|
|
2643
|
-
...SubscriptionFragment
|
|
2644
|
-
}
|
|
2645
|
-
}
|
|
2646
|
-
${e.SubscriptionFragmentDoc}
|
|
2647
|
-
${e.SlimCustomerFragmentDoc}
|
|
2648
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2649
|
-
${e.CustomerResourceFragmentDoc}
|
|
2650
|
-
${e.PriceFragmentDoc}
|
|
2651
|
-
${e.PriceTierFragmentDoc}
|
|
2652
|
-
${e.TotalPriceFragmentDoc}
|
|
2653
|
-
${e.PlanFragmentDoc}
|
|
2654
|
-
${e.ProductFragmentDoc}
|
|
2655
|
-
${e.PackageEntitlementFragmentDoc}
|
|
2656
|
-
${e.AddonFragmentDoc}
|
|
2657
|
-
${e.OveragePriceFragmentDoc}
|
|
2658
|
-
${e.AddonDependencyFragmentDoc}
|
|
2659
|
-
${e.PlanCompatiblePackageGroupsFragmentDoc}
|
|
2660
|
-
${e.SubscriptionScheduledUpdateDataFragmentDoc}
|
|
2661
|
-
${e.ScheduleVariablesFragmentDoc}
|
|
2662
|
-
${e.SubscriptionFutureUpdateDataFragmentDoc}
|
|
2663
|
-
${e.SubscriptionTrialConfigurationFragmentDoc}`,e.GetCouponsDocument=(0,n.default)`
|
|
2664
|
-
query GetCoupons {
|
|
2665
|
-
coupons(filter: {status: {eq: ACTIVE}}, paging: {first: 50}) {
|
|
2666
|
-
edges {
|
|
2667
|
-
node {
|
|
2668
|
-
...CouponFragment
|
|
2669
|
-
}
|
|
2670
|
-
}
|
|
2671
|
-
}
|
|
2672
|
-
}
|
|
2673
|
-
${e.CouponFragmentDoc}`,e.GetPaywallDocument=(0,n.default)`
|
|
2674
|
-
query GetPaywall($input: GetPaywallInput!) {
|
|
2675
|
-
paywall(input: $input) {
|
|
2676
|
-
...PaywallFragment
|
|
2677
|
-
}
|
|
2678
|
-
}
|
|
2679
|
-
${e.PaywallFragmentDoc}
|
|
2680
|
-
${e.PlanFragmentDoc}
|
|
2681
|
-
${e.ProductFragmentDoc}
|
|
2682
|
-
${e.PackageEntitlementFragmentDoc}
|
|
2683
|
-
${e.AddonFragmentDoc}
|
|
2684
|
-
${e.PriceFragmentDoc}
|
|
2685
|
-
${e.PriceTierFragmentDoc}
|
|
2686
|
-
${e.OveragePriceFragmentDoc}
|
|
2687
|
-
${e.AddonDependencyFragmentDoc}
|
|
2688
|
-
${e.PlanCompatiblePackageGroupsFragmentDoc}
|
|
2689
|
-
${e.PaywallCurrencyFragmentDoc}
|
|
2690
|
-
${e.PaywallConfigurationFragmentDoc}
|
|
2691
|
-
${e.TypographyConfigurationFragmentDoc}
|
|
2692
|
-
${e.FontVariantFragmentDoc}
|
|
2693
|
-
${e.LayoutConfigurationFragmentDoc}
|
|
2694
|
-
${e.CustomerFragmentDoc}
|
|
2695
|
-
${e.SlimCustomerFragmentDoc}
|
|
2696
|
-
${e.CouponFragmentDoc}
|
|
2697
|
-
${e.PromotionalEntitlementFragmentDoc}
|
|
2698
|
-
${e.SubscriptionFragmentDoc}
|
|
2699
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2700
|
-
${e.CustomerResourceFragmentDoc}
|
|
2701
|
-
${e.TotalPriceFragmentDoc}
|
|
2702
|
-
${e.SubscriptionScheduledUpdateDataFragmentDoc}
|
|
2703
|
-
${e.ScheduleVariablesFragmentDoc}
|
|
2704
|
-
${e.SubscriptionFutureUpdateDataFragmentDoc}
|
|
2705
|
-
${e.SubscriptionTrialConfigurationFragmentDoc}
|
|
2706
|
-
${e.PaywallCalculatedPricePointsFragmentDoc}`,e.GetEntitlementsDocument=(0,n.default)`
|
|
2707
|
-
query GetEntitlements($query: FetchEntitlementsQuery!) {
|
|
2708
|
-
entitlements: cachedEntitlements(query: $query) {
|
|
2709
|
-
...EntitlementFragment
|
|
2710
|
-
}
|
|
2711
|
-
}
|
|
2712
|
-
${e.EntitlementFragmentDoc}
|
|
2713
|
-
${e.ResetPeriodConfigurationFragmentDoc}
|
|
2714
|
-
${e.FeatureFragmentDoc}`,e.GetEntitlementsStateDocument=(0,n.default)`
|
|
2715
|
-
query GetEntitlementsState($query: FetchEntitlementsQuery!) {
|
|
2716
|
-
entitlementsState(query: $query) {
|
|
2717
|
-
entitlements {
|
|
2718
|
-
...EntitlementFragment
|
|
2719
|
-
}
|
|
2720
|
-
accessDeniedReason
|
|
2721
|
-
}
|
|
2722
|
-
}
|
|
2723
|
-
${e.EntitlementFragmentDoc}
|
|
2724
|
-
${e.ResetPeriodConfigurationFragmentDoc}
|
|
2725
|
-
${e.FeatureFragmentDoc}`,e.GetEntitlementDocument=(0,n.default)`
|
|
2726
|
-
query GetEntitlement($query: FetchEntitlementQuery!) {
|
|
2727
|
-
entitlement(query: $query) {
|
|
2728
|
-
...EntitlementFragment
|
|
2729
|
-
}
|
|
2730
|
-
}
|
|
2731
|
-
${e.EntitlementFragmentDoc}
|
|
2732
|
-
${e.ResetPeriodConfigurationFragmentDoc}
|
|
2733
|
-
${e.FeatureFragmentDoc}`,e.GetProductsDocument=(0,n.default)`
|
|
2734
|
-
query GetProducts {
|
|
2735
|
-
products(paging: {first: 20}) {
|
|
2736
|
-
edges {
|
|
2737
|
-
node {
|
|
2738
|
-
...ProductFragment
|
|
2739
|
-
}
|
|
2740
|
-
}
|
|
2741
|
-
}
|
|
2742
|
-
}
|
|
2743
|
-
${e.ProductFragmentDoc}`,e.GetSdkConfigurationDocument=(0,n.default)`
|
|
2744
|
-
query GetSdkConfiguration {
|
|
2745
|
-
sdkConfiguration {
|
|
2746
|
-
sentryDsn
|
|
2747
|
-
isWidgetWatermarkEnabled
|
|
2748
|
-
}
|
|
2749
|
-
}
|
|
2750
|
-
`,e.GetCustomerPortalByRefIdDocument=(0,n.default)`
|
|
2751
|
-
query GetCustomerPortalByRefId($input: CustomerPortalInput!) {
|
|
2752
|
-
customerPortal(input: $input) {
|
|
2753
|
-
...CustomerPortalFragment
|
|
2754
|
-
}
|
|
2755
|
-
}
|
|
2756
|
-
${e.CustomerPortalFragmentDoc}
|
|
2757
|
-
${e.CustomerPortalSubscriptionFragmentDoc}
|
|
2758
|
-
${e.CustomerPortalSubscriptionPriceFragmentDoc}
|
|
2759
|
-
${e.CustomerPortalSubscriptionAddonFragmentDoc}
|
|
2760
|
-
${e.CustomerPortalSubscriptionScheduledUpdateDataFragmentDoc}
|
|
2761
|
-
${e.ScheduleVariablesFragmentDoc}
|
|
2762
|
-
${e.CustomerPortalEntitlementFragmentDoc}
|
|
2763
|
-
${e.ResetPeriodConfigurationFragmentDoc}
|
|
2764
|
-
${e.FeatureFragmentDoc}
|
|
2765
|
-
${e.CustomerPortalPromotionalEntitlementFragmentDoc}
|
|
2766
|
-
${e.CustomerPortalBillingInformationFragmentDoc}
|
|
2767
|
-
${e.CustomerPortalConfigurationFragmentDoc}
|
|
2768
|
-
${e.TypographyConfigurationFragmentDoc}
|
|
2769
|
-
${e.FontVariantFragmentDoc}
|
|
2770
|
-
${e.CustomerResourceFragmentDoc}`,e.GetCheckoutStateDocument=(0,n.default)`
|
|
2771
|
-
query GetCheckoutState($input: CheckoutStateInput!) {
|
|
2772
|
-
checkoutState(input: $input) {
|
|
2773
|
-
...CheckoutStateFragment
|
|
2774
|
-
}
|
|
2775
|
-
}
|
|
2776
|
-
${e.CheckoutStateFragmentDoc}
|
|
2777
|
-
${e.CheckoutConfigurationFragmentDoc}
|
|
2778
|
-
${e.TypographyConfigurationFragmentDoc}
|
|
2779
|
-
${e.FontVariantFragmentDoc}
|
|
2780
|
-
${e.CustomerFragmentDoc}
|
|
2781
|
-
${e.SlimCustomerFragmentDoc}
|
|
2782
|
-
${e.CouponFragmentDoc}
|
|
2783
|
-
${e.PromotionalEntitlementFragmentDoc}
|
|
2784
|
-
${e.SubscriptionFragmentDoc}
|
|
2785
|
-
${e.SubscriptionInvoiceFragmentDoc}
|
|
2786
|
-
${e.CustomerResourceFragmentDoc}
|
|
2787
|
-
${e.PriceFragmentDoc}
|
|
2788
|
-
${e.PriceTierFragmentDoc}
|
|
2789
|
-
${e.TotalPriceFragmentDoc}
|
|
2790
|
-
${e.PlanFragmentDoc}
|
|
2791
|
-
${e.ProductFragmentDoc}
|
|
2792
|
-
${e.PackageEntitlementFragmentDoc}
|
|
2793
|
-
${e.AddonFragmentDoc}
|
|
2794
|
-
${e.OveragePriceFragmentDoc}
|
|
2795
|
-
${e.AddonDependencyFragmentDoc}
|
|
2796
|
-
${e.PlanCompatiblePackageGroupsFragmentDoc}
|
|
2797
|
-
${e.SubscriptionScheduledUpdateDataFragmentDoc}
|
|
2798
|
-
${e.ScheduleVariablesFragmentDoc}
|
|
2799
|
-
${e.SubscriptionFutureUpdateDataFragmentDoc}
|
|
2800
|
-
${e.SubscriptionTrialConfigurationFragmentDoc}
|
|
2801
|
-
${e.StripeCheckoutCredentialsFragmentDoc}
|
|
2802
|
-
${e.ZuoraCheckoutCredentialsFragmentDoc}`,e.GetMockPaywallDocument=(0,n.default)`
|
|
2803
|
-
query GetMockPaywall($input: GetPaywallInput!) {
|
|
2804
|
-
mockPaywall(input: $input) {
|
|
2805
|
-
plans {
|
|
2806
|
-
...MockPaywallPlanFragment
|
|
2807
|
-
}
|
|
2808
|
-
configuration {
|
|
2809
|
-
...PaywallConfigurationFragment
|
|
2810
|
-
}
|
|
2811
|
-
}
|
|
2812
|
-
}
|
|
2813
|
-
${e.MockPaywallPlanFragmentDoc}
|
|
2814
|
-
${e.MockPaywallPackageEntitlementFragmentDoc}
|
|
2815
|
-
${e.MockPaywallPriceFragmentDoc}
|
|
2816
|
-
${e.PriceTierFragmentDoc}
|
|
2817
|
-
${e.MockPaywallAddonFragmentDoc}
|
|
2818
|
-
${e.MockPaywallAddonDependencyFragmentDoc}
|
|
2819
|
-
${e.MockPaywallPlanCompatiblePackageGroupsFragmentDoc}
|
|
2820
|
-
${e.PaywallConfigurationFragmentDoc}
|
|
2821
|
-
${e.TypographyConfigurationFragmentDoc}
|
|
2822
|
-
${e.FontVariantFragmentDoc}
|
|
2823
|
-
${e.LayoutConfigurationFragmentDoc}`,e.GetUsageHistoryDocument=(0,n.default)`
|
|
2824
|
-
query GetUsageHistory($usageHistoryInput: UsageHistoryInput!) {
|
|
2825
|
-
usageHistory(usageHistoryInput: $usageHistoryInput) {
|
|
2826
|
-
...UsageHistoryFragment
|
|
2827
|
-
}
|
|
2828
|
-
}
|
|
2829
|
-
${e.UsageHistoryFragmentDoc}`,e.GetUsageHistoryV2Document=(0,n.default)`
|
|
2830
|
-
query GetUsageHistoryV2($input: UsageHistoryV2Input!) {
|
|
2831
|
-
usageHistoryV2(input: $input) {
|
|
2832
|
-
...UsageHistoryV2Fragment
|
|
2833
|
-
}
|
|
2834
|
-
}
|
|
2835
|
-
${e.UsageHistoryV2FragmentDoc}`,e.GetCreditBalanceDocument=(0,n.default)`
|
|
2836
|
-
query GetCreditBalance($input: CreditBalanceSummaryInput!) {
|
|
2837
|
-
creditBalanceSummary(input: $input) {
|
|
2838
|
-
...CreditsBalanceSummaryFragment
|
|
2839
|
-
}
|
|
2840
|
-
}
|
|
2841
|
-
${e.CreditsBalanceSummaryFragmentDoc}`,e.GetCreditGrantsDocument=(0,n.default)`
|
|
2842
|
-
query GetCreditGrants($input: GetCreditGrantsInput!) {
|
|
2843
|
-
creditGrants(input: $input) {
|
|
2844
|
-
pageInfo {
|
|
2845
|
-
...PageInfoFragment
|
|
2846
|
-
}
|
|
2847
|
-
edges {
|
|
2848
|
-
node {
|
|
2849
|
-
...CreditGrantFragment
|
|
2850
|
-
}
|
|
2851
|
-
}
|
|
2852
|
-
totalCount
|
|
2853
|
-
}
|
|
2854
|
-
}
|
|
2855
|
-
${e.PageInfoFragmentDoc}
|
|
2856
|
-
${e.CreditGrantFragmentDoc}`,e.GetCreditLedgerDocument=(0,n.default)`
|
|
2857
|
-
query GetCreditLedger($input: CreditLedgerInput!) {
|
|
2858
|
-
creditsLedger(input: $input) {
|
|
2859
|
-
events {
|
|
2860
|
-
...CreditLedgerFragment
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
}
|
|
2864
|
-
${e.CreditLedgerFragmentDoc}`,e.GetCreditUsageDocument=(0,n.default)`
|
|
2865
|
-
query GetCreditUsage($input: CreditUsageInput!) {
|
|
2866
|
-
creditUsage(input: $input) {
|
|
2867
|
-
...CreditUsageFragment
|
|
2868
|
-
}
|
|
2869
|
-
}
|
|
2870
|
-
${e.CreditUsageFragmentDoc}
|
|
2871
|
-
${e.SlimCustomCurrencyFragmentDoc}`,e.OnEntitlementsUpdatedDocument=(0,n.default)`
|
|
2872
|
-
subscription OnEntitlementsUpdated {
|
|
2873
|
-
entitlementsUpdated {
|
|
2874
|
-
...EntitlementsUpdatedPayload
|
|
2875
|
-
}
|
|
2876
|
-
}
|
|
2877
|
-
${e.EntitlementsUpdatedPayloadFragmentDoc}
|
|
2878
|
-
${e.EntitlementFragmentDoc}
|
|
2879
|
-
${e.ResetPeriodConfigurationFragmentDoc}
|
|
2880
|
-
${e.FeatureFragmentDoc}`,e.OnUsageUpdatedDocument=(0,n.default)`
|
|
2881
|
-
subscription OnUsageUpdated {
|
|
2882
|
-
usageUpdated {
|
|
2883
|
-
...EntitlementUsageUpdated
|
|
2884
|
-
}
|
|
2885
|
-
}
|
|
2886
|
-
${e.EntitlementUsageUpdatedFragmentDoc}
|
|
2887
|
-
${e.UsageUpdatedFragmentDoc}
|
|
2888
|
-
${e.EntitlementFragmentDoc}
|
|
2889
|
-
${e.ResetPeriodConfigurationFragmentDoc}
|
|
2890
|
-
${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
|
|
2891
|
-
subscription OnPackagePublished {
|
|
2892
|
-
packagePublished {
|
|
2893
|
-
...PackagePublishedPayload
|
|
2894
|
-
}
|
|
2895
|
-
}
|
|
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`
|
|
2897
|
-
margin: auto;
|
|
2898
|
-
min-height: 760px;
|
|
2899
|
-
max-width: 920px;
|
|
2900
|
-
display: flex;
|
|
2901
|
-
position: relative;
|
|
2902
|
-
flex-direction: column;
|
|
2903
|
-
align-items: center;
|
|
2904
|
-
|
|
2905
|
-
background-color: ${({theme:e})=>e.stigg.palette.backgroundPaper};
|
|
2906
|
-
border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedBorder}`};
|
|
2907
|
-
|
|
2908
|
-
& * {
|
|
2909
|
-
box-sizing: border-box;
|
|
2910
|
-
}
|
|
2911
|
-
|
|
2912
|
-
padding: 16px 16px;
|
|
2913
|
-
${ge.md} {
|
|
2914
|
-
padding: 32px;
|
|
2915
|
-
width: calc(100% - 64px);
|
|
2916
|
-
border-radius: 10px;
|
|
2917
|
-
}
|
|
2918
|
-
`,Nu=p(z)`
|
|
2919
|
-
display: flex;
|
|
2920
|
-
align-items: flex-start;
|
|
2921
|
-
gap: 32px;
|
|
2922
|
-
flex-wrap: wrap;
|
|
2923
|
-
width: 100%;
|
|
2924
|
-
|
|
2925
|
-
flex-direction: column;
|
|
2926
|
-
${ge.md} {
|
|
2927
|
-
flex-direction: row;
|
|
2928
|
-
}
|
|
2929
|
-
`,wu=p(z)`
|
|
2930
|
-
display: flex;
|
|
2931
|
-
flex-direction: column;
|
|
2932
|
-
gap: 0;
|
|
2933
|
-
flex: 2;
|
|
2934
|
-
|
|
2935
|
-
width: 100%;
|
|
2936
|
-
${ge.md} {
|
|
2937
|
-
width: auto;
|
|
2938
|
-
}
|
|
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)`
|
|
2940
|
-
margin-right: 8px;
|
|
2941
|
-
path {
|
|
2942
|
-
stroke: ${({theme:e,$disabled:n})=>n?e.stigg.palette.text.disabled:e.stigg.palette.primary};
|
|
2943
|
-
}
|
|
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)`
|
|
2945
|
-
padding: 4px 10px;
|
|
2946
|
-
min-width: unset;
|
|
2947
|
-
border-radius: ${({theme:e})=>e.stigg.border.radius};
|
|
2948
|
-
display: flex;
|
|
2949
|
-
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)`
|
|
2951
|
-
width: auto;
|
|
2952
|
-
display: inline-flex;
|
|
2953
|
-
align-items: center;
|
|
2954
|
-
flex-direction: row;
|
|
2955
|
-
gap: 8px;
|
|
2956
|
-
padding: 6px 8px;
|
|
2957
|
-
border-radius: ${({theme:e})=>e.stigg.border.radius};
|
|
2958
|
-
border: 1px solid ${({theme:e})=>e.stigg.palette.primary};
|
|
2959
|
-
`,ti=p(ce)`
|
|
2960
|
-
display: flex;
|
|
2961
|
-
|
|
2962
|
-
g {
|
|
2963
|
-
stroke: ${({theme:e})=>e.stigg.palette.primary};
|
|
2964
|
-
}
|
|
2965
|
-
|
|
2966
|
-
path {
|
|
2967
|
-
fill: ${({theme:e,$shouldFill:n})=>n?e.stigg.palette.primary:void 0};
|
|
2968
|
-
}
|
|
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`
|
|
2970
|
-
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)`
|
|
2972
|
-
@keyframes blurFade {
|
|
2973
|
-
0% {
|
|
2974
|
-
background-color: ${({theme:e})=>ae(e.stigg.palette.backgroundPaper).alpha(0).toString()};
|
|
2975
|
-
backdrop-filter: blur(0px);
|
|
2976
|
-
}
|
|
2977
|
-
100% {
|
|
2978
|
-
background-color: ${({theme:e})=>ae(e.stigg.palette.backgroundPaper).alpha(.9).toString()};
|
|
2979
|
-
backdrop-filter: blur(6.5px);
|
|
2980
|
-
}
|
|
2981
|
-
}
|
|
2982
|
-
|
|
2983
|
-
position: absolute;
|
|
2984
|
-
top: 0;
|
|
2985
|
-
left: 0;
|
|
2986
|
-
bottom: 0;
|
|
2987
|
-
right: 0;
|
|
2988
|
-
z-index: 5;
|
|
2989
|
-
background-color: ${({theme:e})=>ae(e.stigg.palette.backgroundPaper).alpha(.9).toString()};
|
|
2990
|
-
animation: blurFade 2s ease-in forwards;
|
|
2991
|
-
display: flex;
|
|
2992
|
-
flex-direction: column;
|
|
2993
|
-
justify-content: center;
|
|
2994
|
-
|
|
2995
|
-
* rect {
|
|
2996
|
-
fill: transparent;
|
|
2997
|
-
}
|
|
2998
|
-
|
|
2999
|
-
& path {
|
|
3000
|
-
stroke: ${({theme:e})=>e.stigg.palette.primary};
|
|
3001
|
-
}
|
|
3002
|
-
`,Cd=p(y)`
|
|
3003
|
-
@keyframes fadeIn {
|
|
3004
|
-
0% {
|
|
3005
|
-
opacity: 0;
|
|
3006
|
-
}
|
|
3007
|
-
75% {
|
|
3008
|
-
opacity: 0;
|
|
3009
|
-
}
|
|
3010
|
-
100% {
|
|
3011
|
-
opacity: 1;
|
|
3012
|
-
}
|
|
3013
|
-
}
|
|
3014
|
-
|
|
3015
|
-
align-self: center;
|
|
3016
|
-
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)`
|
|
3018
|
-
height: ${({$size:e=24})=>`${e}px`};
|
|
3019
|
-
width: ${({$size:e=24})=>`${e}px`};
|
|
3020
|
-
transition: all 0.2s ease-in;
|
|
3021
|
-
${({$isOpen:e})=>e&&"transform: rotate(90deg)"}
|
|
3022
|
-
`,Ee=p.div`
|
|
3023
|
-
& + & {
|
|
3024
|
-
margin-top: 16px;
|
|
3025
|
-
}
|
|
3026
|
-
`,Ud=p.div`
|
|
3027
|
-
margin-top: 16px;
|
|
3028
|
-
margin-left: 16px;
|
|
3029
|
-
`,ye=p.div`
|
|
3030
|
-
display: flex;
|
|
3031
|
-
flex-direction: column;
|
|
3032
|
-
gap: 16px;
|
|
3033
|
-
|
|
3034
|
-
${ge.lg} {
|
|
3035
|
-
flex-direction: row;
|
|
3036
|
-
align-items: center;
|
|
3037
|
-
justify-content: space-between;
|
|
3038
|
-
}
|
|
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)`
|
|
3040
|
-
width: 100%;
|
|
3041
|
-
max-width: 470px;
|
|
3042
|
-
flex: 1.5;
|
|
3043
|
-
`,mn=p(fr)`
|
|
3044
|
-
background: ${({theme:e})=>e.stigg.palette.backgroundHighlight};
|
|
3045
|
-
padding: 16px;
|
|
3046
|
-
|
|
3047
|
-
${ge.md} {
|
|
3048
|
-
border-radius: 10px;
|
|
3049
|
-
}
|
|
3050
|
-
`;mn.defaultProps={elevation:0};const $d=p(y)`
|
|
3051
|
-
margin-bottom: 16px;
|
|
3052
|
-
font-weight: 500;
|
|
3053
|
-
`,Fe=p(je)`
|
|
3054
|
-
margin: 16px 0;
|
|
3055
|
-
`,ii=p(y)`
|
|
3056
|
-
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)`
|
|
3058
|
-
width: 100%;
|
|
3059
|
-
gap: 8px;
|
|
3060
|
-
`,qd=p(j)`
|
|
3061
|
-
display: flex;
|
|
3062
|
-
flex-direction: column;
|
|
3063
|
-
gap: 16px;
|
|
3064
|
-
width: 100%;
|
|
3065
|
-
|
|
3066
|
-
${ge.md} {
|
|
3067
|
-
gap: 0;
|
|
3068
|
-
flex-direction: row;
|
|
3069
|
-
justify-content: space-between;
|
|
3070
|
-
min-height: 80px;
|
|
3071
|
-
align-items: flex-start;
|
|
3072
|
-
padding-top: 16px;
|
|
3073
|
-
padding-bottom: 16px;
|
|
3074
|
-
}
|
|
3075
|
-
`,Wd=p(Ie)`
|
|
3076
|
-
min-width: unset;
|
|
3077
|
-
width: 41px;
|
|
3078
|
-
height: 41px;
|
|
3079
|
-
padding: 0;
|
|
3080
|
-
`,Yd=Z.styled(Z.Grid)`
|
|
3081
|
-
display: flex;
|
|
3082
|
-
flex-direction: row;
|
|
3083
|
-
align-items: center;
|
|
3084
|
-
width: 100%;
|
|
3085
|
-
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)`
|
|
3087
|
-
display: flex;
|
|
3088
|
-
flex-direction: column;
|
|
3089
|
-
justify-content: center;
|
|
3090
|
-
width: 100%;
|
|
3091
|
-
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)`
|
|
3093
|
-
padding: 8px;
|
|
3094
|
-
border-radius: 10px;
|
|
3095
|
-
border: 1px solid ${({theme:e})=>e.stigg.palette.outlinedBorder};
|
|
3096
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
3097
|
-
opacity: ${({$disabled:e})=>e?.6:1};
|
|
3098
|
-
`,Jd=p(Na)`
|
|
3099
|
-
flex-direction: column;
|
|
3100
|
-
align-items: unset;
|
|
3101
|
-
${({$hideBorders:e})=>e&&ne.css`
|
|
3102
|
-
border: none;
|
|
3103
|
-
padding: 0;
|
|
3104
|
-
`}
|
|
3105
|
-
`,em=p(j)`
|
|
3106
|
-
display: flex;
|
|
3107
|
-
align-items: center;
|
|
3108
|
-
flex: 1;
|
|
3109
|
-
gap: 12px;
|
|
3110
|
-
`,tm=p(j)`
|
|
3111
|
-
display: flex;
|
|
3112
|
-
flex-direction: column;
|
|
3113
|
-
`,nm=p(z)`
|
|
3114
|
-
position: relative;
|
|
3115
|
-
max-width: 500px;
|
|
3116
|
-
`,im=p(z)`
|
|
3117
|
-
opacity: ${({$showLoading:e})=>e?.6:1};
|
|
3118
|
-
pointer-events: ${({$showLoading:e})=>e?"none":"auto"};
|
|
3119
|
-
`,am=p(z)`
|
|
3120
|
-
position: absolute;
|
|
3121
|
-
top: 40px;
|
|
3122
|
-
left: 0;
|
|
3123
|
-
right: 0;
|
|
3124
|
-
bottom: 0;
|
|
3125
|
-
background-color: rgba(255, 255, 255, 0.8);
|
|
3126
|
-
display: flex;
|
|
3127
|
-
align-items: center;
|
|
3128
|
-
justify-content: center;
|
|
3129
|
-
border-radius: 4px;
|
|
3130
|
-
z-index: 10;
|
|
3131
|
-
`,rm=p(z)`
|
|
3132
|
-
display: flex;
|
|
3133
|
-
flex-direction: column;
|
|
3134
|
-
align-items: center;
|
|
3135
|
-
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)`
|
|
3137
|
-
display: flex;
|
|
3138
|
-
flex-direction: column;
|
|
3139
|
-
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)`
|
|
3141
|
-
margin: 16px 0;
|
|
3142
|
-
`,gm=p.button`
|
|
3143
|
-
cursor: ${({$disabled:e,$isOnlyBillingPeriod:n})=>e||n?"default":"pointer"};
|
|
3144
|
-
flex: 1;
|
|
3145
|
-
display: flex;
|
|
3146
|
-
align-items: center;
|
|
3147
|
-
justify-content: flex-start;
|
|
3148
|
-
padding: 2px 8px;
|
|
3149
|
-
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"};
|
|
3152
|
-
text-transform: none;
|
|
3153
|
-
text-align: start;
|
|
3154
|
-
height: 36px;
|
|
3155
|
-
|
|
3156
|
-
&.MuiButton-root {
|
|
3157
|
-
padding: 0 16px 0 8px;
|
|
3158
|
-
&:hover {
|
|
3159
|
-
background: none;
|
|
3160
|
-
}
|
|
3161
|
-
}
|
|
3162
|
-
`,pm=p(z)`
|
|
3163
|
-
display: flex;
|
|
3164
|
-
gap: 16px;
|
|
3165
|
-
margin-top: 16px;
|
|
3166
|
-
`;p.div`
|
|
3167
|
-
display: flex;
|
|
3168
|
-
align-items: baseline;
|
|
3169
|
-
gap: 8px;
|
|
3170
|
-
`;p(yr)`
|
|
3171
|
-
& .MuiChip-label {
|
|
3172
|
-
font-size: 12px;
|
|
3173
|
-
}
|
|
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`
|
|
3175
|
-
display: flex;
|
|
3176
|
-
min-height: 60px;
|
|
3177
|
-
margin-top: 16px;
|
|
3178
|
-
flex-direction: column;
|
|
3179
|
-
|
|
3180
|
-
${ge.md} {
|
|
3181
|
-
flex-direction: row;
|
|
3182
|
-
align-items: flex-start;
|
|
3183
|
-
justify-content: space-between;
|
|
3184
|
-
}
|
|
3185
|
-
`,ym=p(z)`
|
|
3186
|
-
display: flex;
|
|
3187
|
-
flex-direction: column;
|
|
3188
|
-
justify-content: center;
|
|
3189
|
-
width: 100%;
|
|
3190
|
-
height: 42px;
|
|
3191
|
-
`,Cm=p(y)`
|
|
3192
|
-
display: flex;
|
|
3193
|
-
align-items: center;
|
|
3194
|
-
justify-content: flex-end;
|
|
3195
|
-
width: 100%;
|
|
3196
|
-
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)`
|
|
3198
|
-
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)`
|
|
3200
|
-
path {
|
|
3201
|
-
stroke: ${({theme:e})=>e.stigg.palette.text.secondary};
|
|
3202
|
-
}
|
|
3203
|
-
`,Im=p(z)`
|
|
3204
|
-
display: flex;
|
|
3205
|
-
`,vm=p(hi)`
|
|
3206
|
-
margin-bottom: 16px;
|
|
3207
|
-
`,Am=p(z)`
|
|
3208
|
-
padding: 16px;
|
|
3209
|
-
border-radius: 10px;
|
|
3210
|
-
width: 100%;
|
|
3211
|
-
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`
|
|
3213
|
-
display: flex;
|
|
3214
|
-
flex-direction: row;
|
|
3215
|
-
gap: 4px;
|
|
3216
|
-
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`
|
|
3218
|
-
display: flex;
|
|
3219
|
-
flex-direction: column;
|
|
3220
|
-
gap: 8px;
|
|
3221
|
-
width: 100%;
|
|
3222
|
-
`,Wm=p.div`
|
|
3223
|
-
display: flex;
|
|
3224
|
-
flex-direction: column;
|
|
3225
|
-
gap: 8px;
|
|
3226
|
-
padding: 16px;
|
|
3227
|
-
border-radius: 8px;
|
|
3228
|
-
border: 1px solid ${({theme:e})=>{var n,i;return(i=(n=e.stigg)==null?void 0:n.palette)==null?void 0:i.outlinedBorder}};
|
|
3229
|
-
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)`
|
|
3231
|
-
position: absolute;
|
|
3232
|
-
`,rg=p.div`
|
|
3233
|
-
position: absolute;
|
|
3234
|
-
background-color: white;
|
|
3235
|
-
border-radius: 8px;
|
|
3236
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
3237
|
-
padding: ${({$padding:e=16})=>e}px;
|
|
3238
|
-
max-width: 500px;
|
|
3239
|
-
z-index: 1000;
|
|
3240
|
-
pointer-events: none;
|
|
3241
|
-
opacity: ${({$isOpen:e})=>e?1:0};
|
|
3242
|
-
transition: opacity 0.2s ease-in-out;
|
|
3243
|
-
transform: translateY(-50%); /* Center vertically on the anchor point */
|
|
3244
|
-
|
|
3245
|
-
&::before {
|
|
3246
|
-
content: '';
|
|
3247
|
-
position: absolute;
|
|
3248
|
-
width: 0;
|
|
3249
|
-
height: 0;
|
|
3250
|
-
border: 8px solid transparent;
|
|
3251
|
-
border-left-color: white;
|
|
3252
|
-
right: -16px;
|
|
3253
|
-
top: 50%;
|
|
3254
|
-
transform: translateY(-50%);
|
|
3255
|
-
filter: drop-shadow(2px 0 2px rgba(0, 0, 0, 0.1));
|
|
3256
|
-
}
|
|
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`
|
|
3258
|
-
width: 3px;
|
|
3259
|
-
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`
|
|
3261
|
-
padding: 8px;
|
|
3262
|
-
margin: 0 12px;
|
|
3263
|
-
`,dg=p.div`
|
|
3264
|
-
display: flex;
|
|
3265
|
-
align-items: center;
|
|
3266
|
-
`,mg=p.div`
|
|
3267
|
-
flex: 1;
|
|
3268
|
-
position: relative;
|
|
3269
|
-
align-items: center;
|
|
3270
|
-
display: flex;
|
|
3271
|
-
`,gg=p.div`
|
|
3272
|
-
height: 24px;
|
|
3273
|
-
width: ${({$width:e,$minContentWidth:n})=>{const i=Math.min(e,100),a=Math.max(n,80);return`max(${i}%, ${a}px)`}};
|
|
3274
|
-
background-color: #f5f6f9;
|
|
3275
|
-
border-radius: 4px;
|
|
3276
|
-
position: relative;
|
|
3277
|
-
display: flex;
|
|
3278
|
-
align-items: center;
|
|
3279
|
-
justify-content: space-between;
|
|
3280
|
-
padding: 0 8px;
|
|
3281
|
-
`,pg=p.div`
|
|
3282
|
-
width: 12px;
|
|
3283
|
-
height: 12px;
|
|
3284
|
-
border-radius: 2px;
|
|
3285
|
-
background-color: ${({$color:e})=>e};
|
|
3286
|
-
margin-right: 8px;
|
|
3287
|
-
flex-shrink: 0;
|
|
3288
|
-
`,fg=p.div`
|
|
3289
|
-
margin-right: 24px;
|
|
3290
|
-
flex-shrink: 0;
|
|
3291
|
-
overflow: hidden;
|
|
3292
|
-
text-overflow: ellipsis;
|
|
3293
|
-
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`
|
|
3295
|
-
display: flex;
|
|
3296
|
-
flex-direction: column;
|
|
3297
|
-
justify-content: center;
|
|
3298
|
-
align-items: center;
|
|
3299
|
-
height: 100%;
|
|
3300
|
-
`,Cg=p(ce)`
|
|
3301
|
-
svg {
|
|
3302
|
-
width: 32px;
|
|
3303
|
-
height: 32px;
|
|
3304
|
-
}
|
|
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`
|
|
3306
|
-
display: flex;
|
|
3307
|
-
justify-content: center;
|
|
3308
|
-
align-items: center;
|
|
3309
|
-
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)`
|
|
3311
|
-
border-radius: 10px;
|
|
3312
|
-
height: 38px;
|
|
3313
|
-
min-width: 150px;
|
|
3314
|
-
|
|
3315
|
-
&:hover .MuiOutlinedInput-notchedOutline {
|
|
3316
|
-
border-color: ${({theme:e})=>e.stigg.palette.outlinedBorder};
|
|
3317
|
-
}
|
|
3318
|
-
`,Dg=p(Z.OutlinedInput)`
|
|
3319
|
-
& .MuiInputBase-input {
|
|
3320
|
-
padding: 10px 12px;
|
|
3321
|
-
}
|
|
3322
|
-
|
|
3323
|
-
&.Mui-focused .MuiOutlinedInput-notchedOutline {
|
|
3324
|
-
border-color: ${({theme:e})=>e.stigg.palette.primary} !important;
|
|
3325
|
-
}
|
|
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`
|
|
3327
|
-
display: flex;
|
|
3328
|
-
flex-direction: column;
|
|
3329
|
-
gap: 8px;
|
|
3330
|
-
`,Ig=p.div`
|
|
3331
|
-
align-items: center;
|
|
3332
|
-
justify-content: center;
|
|
3333
|
-
min-height: 480px;
|
|
3334
|
-
display: flex;
|
|
3335
|
-
flex-direction: column;
|
|
3336
|
-
gap: 8px;
|
|
3337
|
-
padding: 16px;
|
|
3338
|
-
border-radius: 8px;
|
|
3339
|
-
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
|
-
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)`
|
|
3342
|
-
border-radius: 4px;
|
|
3343
|
-
height: 400px;
|
|
3344
|
-
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`
|
|
3346
|
-
width: 100%;
|
|
3347
|
-
height: 8px;
|
|
3348
|
-
background-color: ${({theme:e})=>e.stigg.palette.progress.background};
|
|
3349
|
-
border-radius: 4px;
|
|
3350
|
-
overflow: hidden;
|
|
3351
|
-
`,wg=p.div`
|
|
3352
|
-
height: 100%;
|
|
3353
|
-
width: ${({percentage:e})=>Math.max(0,Math.min(100,e))}%;
|
|
3354
|
-
background-color: ${({theme:e,percentage:n})=>kg(n,e.stigg)};
|
|
3355
|
-
border-radius: 4px;
|
|
3356
|
-
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`
|
|
3358
|
-
display: flex;
|
|
3359
|
-
flex-direction: row;
|
|
3360
|
-
justify-content: space-between;
|
|
3361
|
-
align-items: baseline;
|
|
3362
|
-
width: 100%;
|
|
3363
|
-
`,Ug=p.div`
|
|
3364
|
-
display: flex;
|
|
3365
|
-
flex-direction: row;
|
|
3366
|
-
gap: 4px;
|
|
3367
|
-
align-items: baseline;
|
|
3368
|
-
`,Mg=p.div`
|
|
3369
|
-
display: flex;
|
|
3370
|
-
flex-direction: row;
|
|
3371
|
-
gap: 4px;
|
|
3372
|
-
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`
|
|
3374
|
-
display: flex;
|
|
3375
|
-
flex-direction: column;
|
|
3376
|
-
gap: 8px;
|
|
3377
|
-
width: 100%;
|
|
3378
|
-
`,Og=p.div`
|
|
3379
|
-
display: flex;
|
|
3380
|
-
flex-direction: column;
|
|
3381
|
-
gap: 16px;
|
|
3382
|
-
padding: 16px;
|
|
3383
|
-
border-radius: 8px;
|
|
3384
|
-
border: 1px solid ${({theme:e})=>{var n,i;return(i=(n=e.stigg)==null?void 0:n.palette)==null?void 0:i.outlinedBorder}};
|
|
3385
|
-
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
|
-
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)`
|
|
3388
|
-
border-radius: 8px;
|
|
3389
|
-
border: 1px solid ${({theme:e})=>e.stigg.palette.outlinedBorder};
|
|
3390
|
-
background-color: ${({theme:e})=>e.stigg.palette.backgroundPaper};
|
|
3391
|
-
min-width: 100%;
|
|
3392
|
-
overflow-x: auto;
|
|
3393
|
-
|
|
3394
|
-
${({$hasMinHeight:e})=>e&&`
|
|
3395
|
-
min-height: 160px;
|
|
3396
|
-
display: flex;
|
|
3397
|
-
align-items: center;
|
|
3398
|
-
justify-content: center;
|
|
3399
|
-
`}
|
|
3400
|
-
`,Hg=p(Z.Table)`
|
|
3401
|
-
min-width: 600px;
|
|
3402
|
-
table-layout: auto;
|
|
3403
|
-
width: 100%;
|
|
3404
|
-
`,pn=p(Z.TableCell)`
|
|
3405
|
-
padding: 8px 12px;
|
|
3406
|
-
border-bottom: 1px solid ${({theme:e})=>e.stigg.palette.outlinedBorder};
|
|
3407
|
-
text-align: ${({$alignment:e})=>e||"left"};
|
|
3408
|
-
white-space: nowrap;
|
|
3409
|
-
overflow: hidden;
|
|
3410
|
-
text-overflow: ellipsis;
|
|
3411
|
-
|
|
3412
|
-
${({$width:e})=>e&&`width: ${e};`}
|
|
3413
|
-
${({$maxWidth:e})=>e&&`max-width: ${e};`}
|
|
3414
|
-
${({$minWidth:e})=>e&&`min-width: ${e};`}
|
|
3415
|
-
|
|
3416
|
-
${({$isLastRow:e,$hideLastRowBorder:n})=>e&&n&&"border-bottom: none;"}
|
|
3417
|
-
`,qg=p(pn)`
|
|
3418
|
-
background-color: transparent;
|
|
3419
|
-
`,Wg=p(Z.TableRow)`
|
|
3420
|
-
${({$clickable:e,theme:n})=>e&&`
|
|
3421
|
-
cursor: pointer;
|
|
3422
|
-
&:hover {
|
|
3423
|
-
background-color: ${n.stigg.palette.backgroundHighlight};
|
|
3424
|
-
}
|
|
3425
|
-
`}
|
|
3426
|
-
`,Yg=p.div`
|
|
3427
|
-
display: flex;
|
|
3428
|
-
align-items: center;
|
|
3429
|
-
justify-content: ${({$alignment:e})=>{switch(e){case"center":return"center";case"right":return"flex-end";default:return"flex-start"}}};
|
|
3430
|
-
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)`
|
|
3432
|
-
font-size: 0.75rem;
|
|
3433
|
-
height: 24px;
|
|
3434
|
-
border-radius: 4px;
|
|
3435
|
-
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`
|
|
3439
|
-
display: flex;
|
|
3440
|
-
flex-direction: column;
|
|
3441
|
-
gap: 8px;
|
|
3442
|
-
`,t1=p.div`
|
|
3443
|
-
display: flex;
|
|
3444
|
-
flex-direction: column;
|
|
3445
|
-
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]})});
|