@stigg/react-sdk 4.4.0-beta.5 → 4.4.0-beta.6
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/components/checkout/components/Button.d.ts +0 -1
- package/dist/components/checkout/components/ChangePlanButton.d.ts +8 -0
- package/dist/components/checkout/components/DowngradeToFreeContainer.d.ts +6 -2
- package/dist/components/checkout/progressBar/CheckoutProgressBar.style.d.ts +2 -2
- package/dist/components/checkout/steps/plan/BillingPeriodPicker.style.d.ts +1 -0
- package/dist/react-sdk.cjs.development.js +261 -125
- package/dist/react-sdk.cjs.development.js.map +1 -1
- package/dist/react-sdk.cjs.production.min.js +1 -1
- package/dist/react-sdk.cjs.production.min.js.map +1 -1
- package/dist/react-sdk.esm.js +274 -129
- package/dist/react-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/checkout/CheckoutContainer.style.ts +1 -0
- package/src/components/checkout/CheckoutContainer.tsx +2 -0
- package/src/components/checkout/components/Button.tsx +3 -14
- package/src/components/checkout/components/ChangePlanButton.tsx +32 -0
- package/src/components/checkout/components/DowngradeToFreeContainer.tsx +27 -7
- package/src/components/checkout/components/Skeletons.style.ts +4 -1
- package/src/components/checkout/hooks/usePreviewSubscription.ts +2 -1
- package/src/components/checkout/planHeader/PlanHeader.style.tsx +1 -1
- package/src/components/checkout/planHeader/PlanHeader.tsx +7 -15
- package/src/components/checkout/progressBar/CheckoutProgressBar.style.ts +3 -1
- package/src/components/checkout/progressBar/CheckoutProgressBar.tsx +5 -2
- package/src/components/checkout/promotionCode/AddPromotionCode.tsx +6 -7
- package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +47 -8
- package/src/components/checkout/steps/plan/BillingPeriodPicker.style.tsx +26 -6
- package/src/components/checkout/steps/plan/BillingPeriodPicker.tsx +28 -7
- package/src/components/checkout/steps/plan/CheckoutChargeList.tsx +5 -4
- package/src/components/checkout/summary/CheckoutSummary.tsx +7 -7
- package/src/components/checkout/summary/components/CheckoutCaptions.tsx +2 -2
- package/src/components/checkout/textOverrides.ts +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t,n=require("@stigg/js-client-sdk"),r=e(n),i=require("react"),a=e(i),o=e(require("@emotion/styled/base")),l=require("styled-typography"),c=require("@emotion/react"),s=e(require("color")),u=e(require("lodash/merge")),d=e(require("react-spinners/ClipLoader")),p=e(require("moment")),m=e(require("lodash/isNil")),g=require("lodash"),h=e(require("classnames")),f=require("@mui/material"),y=e(require("currency-symbol-map")),v=e(require("react-switch")),b=require("react-loading-skeleton"),x=e(b),E=e(require("lodash/sortBy")),w=require("styled-components"),k=e(w),P=require("@mui/material/styles"),C=e(require("@mui/material/Button")),S=e(require("lodash/flatMap")),T=e(require("@mui/material/Box")),B=e(require("@mui/material/Tab")),A=e(require("lodash/isEmpty")),M=e(require("@mui/material/Tabs")),U=require("react-feather"),L=e(require("@mui/material/LinearProgress")),N=e(require("lodash/isUndefined")),F=e(require("lodash/lowerCase")),D=require("immer"),I=e(require("lodash/cloneDeep")),O=e(require("lodash/remove")),j=e(require("lodash/keyBy")),R=e(require("lodash/compact")),q=require("@stigg/api-client-js/src/generated/sdk"),G=require("@stripe/react-stripe-js"),_=e(require("lodash/partition")),W=e(require("@emotion/styled")),H=require("@stripe/stripe-js"),V=e(require("react-lottie"));function z(e,t,n,r,i,a,o){try{var l=e[a](o),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,i)}function $(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){z(a,r,i,o,l,"next",e)}function l(e){z(a,r,i,o,l,"throw",e)}o(void 0)}))}}function Z(){return(Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Y(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}function Q(e,t){return t||(t=e.slice(0)),e.raw=t,e}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function X(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return K(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function J(){return(J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ee=function(e){return i.createElement("svg",J({width:15,height:11,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=i.createElement("path",{d:"M5.59 7.99 2.125 4.525A1 1 0 1 0 .71 5.94l4.88 4.88 8.705-8.705a.997.997 0 0 0-1.41-1.41L5.59 7.99Z",fill:"#B2BBD3"})))};function te(e,t,n){var r=n?" "+n:"";return e&&1!==e||!t?e&&e>1&&t?e+"-"+t+r:e&&e>1?"Minimum "+e+r:"":"Up to "+t+r}var ne=["children","span","style","fontWeight","variant","color","overrideColor","bold"];function re(e,t){switch(t){case"white":return"white";case"primary.main":return e.stigg.palette.primary;case"warning":return e.stigg.palette.warning;case"error":return e.stigg.palette.error;default:return e.stigg.palette.text[t]}}var ie=o(l.Text,{target:"ewjez2x0"})("margin:0;",(function(e){return e.$span&&"display: inline"}),";");function ae(e){switch(e){case"bold":return l.FontWeight.Bold;case"normal":default:return l.FontWeight.Normal}}function oe(e,t){var n=e.stigg.typography;switch(t){case"h1":return ae(n.h1.fontWeight);case"h3":return ae(n.h2.fontWeight);case"h6":return ae(n.h3.fontWeight);case"body1":return ae(n.body.fontWeight);case"caption":return ae(n.caption.fontWeight);default:return l.FontWeight.Normal}}var le=i.forwardRef((function(e,t){var n=e.children,r=e.span,i=e.style,o=e.fontWeight,s=e.variant,u=void 0===s?"body1":s,d=e.color,p=void 0===d?"primary":d,m=e.overrideColor,g=e.bold,h=Y(e,ne),f=c.useTheme(),y=function(e){switch(e){case"h1":return 1;case"h3":return 2;case"h6":return 3;case"body1":return 4;case"caption":return 5;default:return 3}}(u),v="typography-level-"+y;return a.createElement(ie,Object.assign({ref:t},h,{className:e.className?e.className+" "+v:v,style:i,level:y,color:m||re(f,p),fontWeight:null!=o?o:g?l.FontWeight.Bold:oe(f,u),$span:r}),n)})),ce=["displayNameOverride"],se=o(le,{target:"e1mddeqb2"})({name:"ti75j2",styles:"margin:0"}),ue=o("div",{target:"e1mddeqb1"})({name:"s5xdrg",styles:"display:flex;align-items:center"}),de=o(ee,{target:"e1mddeqb0"})("margin-right:16px;flex-shrink:0;*{fill:",(function(e){return e.theme.stigg.palette.text.disabled}),";}");function pe(e){var t=e.displayNameOverride,r=function(e){var t=e.hasUnlimitedUsage,r=e.feature,i=e.resetPeriod,a=e.usageLimit,o=e.minUnitQuantity,l=e.maxUnitQuantity,c=e.isCustom,s=o||l,u=i&&a?""+function(e){if(!e)return"";switch(e){case n.EntitlementResetPeriod.Day:return"per day";case n.EntitlementResetPeriod.Hour:return"per hour";case n.EntitlementResetPeriod.Week:return"per week";case n.EntitlementResetPeriod.Month:return"per month"}}(i):"";if(t)return"Unlimited "+(null==r?void 0:r.unitsPlural);if(c)return"Custom "+(null==r?void 0:r.unitsPlural);if(a){var d=1===a?null==r?void 0:r.units:null==r?void 0:r.unitsPlural;return function(e){return e.toLocaleString("en-US",{maximumFractionDigits:0})}(a)+" "+d+" "+u}return s?te(o,l,null==r?void 0:r.unitsPlural):null==r?void 0:r.displayName}(Y(e,ce));return a.createElement(ue,{className:"stigg-entitlement-row-container"},a.createElement(de,{className:"stigg-entitlement-row-icon"}),a.createElement(se,{className:"stigg-entitlement-name",variant:"h6",color:"secondary"},t||r))}var me,ge=o("div",{target:"e1yz7zcg0"})({name:"budh8k",styles:"display:flex;flex-direction:column;gap:16px"});function he(e){var t,r=e.plan,i=e.billingPeriod,o=e.paywallLocale,l=null==(t=r.pricePoints)?void 0:t.filter((function(e){return e.billingPeriod===i})),c=null==l?void 0:l.map((function(e){var t;return(null==e?void 0:e.minUnitQuantity)&&(null==e?void 0:e.minUnitQuantity)>1||(null==e?void 0:e.maxUnitQuantity)?a.createElement(pe,{key:"priceUnitEntitlement-"+(null==e||null==(t=e.feature)?void 0:t.displayName),feature:null==e?void 0:e.feature,minUnitQuantity:null==e?void 0:e.minUnitQuantity,maxUnitQuantity:null==e?void 0:e.maxUnitQuantity}):null}));return a.createElement(ge,{className:"stigg-plan-entitlements-container"},a.createElement(le,{className:"stigg-plan-entitlements-title",color:"secondary",variant:"h6",bold:!0},function(e,t){if(t.entitlementsTitle)return t.entitlementsTitle(e);var n=e.displayName+" includes";return e.basePlan&&(n="Everything in "+e.basePlan.displayName+", plus:"),n}(r,o)),c,r.entitlements.filter((function(e){return!(e.hiddenFromWidgets||[]).includes(n.WidgetType.Paywall)})).map((function(e){var t;return a.createElement(pe,{key:null==(t=e.feature)?void 0:t.id,displayNameOverride:e.displayNameOverride,feature:e.feature,resetPeriod:e.resetPeriod,hasUnlimitedUsage:e.hasUnlimitedUsage,usageLimit:e.usageLimit,isCustom:e.isCustom})})))}(me=exports.SubscribeIntentionType||(exports.SubscribeIntentionType={})).START_TRIAL="START_TRIAL",me.UPGRADE_TRIAL_TO_PAID="UPGRADE_TRIAL_TO_PAID",me.REQUEST_CUSTOM_PLAN_ACCESS="REQUEST_CUSTOM_PLAN_ACCESS",me.CHANGE_BILLING_PERIOD="CHANGE_BILLING_PERIOD",me.CHANGE_UNIT_QUANTITY="CHANGE_UNIT_QUANTITY",me.UPGRADE_PLAN="UPGRADE_PLAN",me.DOWNGRADE_PLAN="DOWNGRADE_PLAN",me.CANCEL_SCHEDULED_UPDATES="CANCEL_SCHEDULED_UPDATES";var fe,ye,ve=function(e){return{left:"flex-start",center:"center",right:"flex-end"}[e]},be=function(e){return p.utc(e).format("MMMM Do, yyyy")};function xe(e){var t=e.scheduledUpdate,r=e.subscriptionPrices,i=e.billingPeriodRange,o=e.options,l=void 0===o?{}:o;if(!t)return{};var c=l.withDate,s=l.postfix,u=void 0===s?"":s;switch(t.subscriptionScheduleType){case n.SubscriptionScheduleType.Downgrade:var d,h=c;return m(h)&&null!=i&&i.end&&(h=!p(t.scheduledExecutionTime).isSame(null==i?void 0:i.end,"day")),{line1:a.createElement(a.Fragment,null,"Your subscription will be downgraded to the ",a.createElement("b",null,null==(d=t.targetPackage)?void 0:d.displayName," plan")," ",h?a.createElement(a.Fragment,null,"on ",be(t.scheduledExecutionTime)):u,"."),line2:"Until then you still have access to your current plan."};case n.SubscriptionScheduleType.BillingPeriod:var f;return{line1:a.createElement(a.Fragment,null,"Your billing cycle will change to ",a.createElement("b",null,null==(f=t.scheduleVariables.billingPeriod)?void 0:f.toLocaleLowerCase())," ",c?a.createElement(a.Fragment,null,"on ",be(t.scheduledExecutionTime)):u,".")};case n.SubscriptionScheduleType.UnitAmount:var y=t.scheduleVariables,v=g.compact(g.map(r,"feature")).find((function(e){return e.id===y.featureId}))||{},b=v.featureUnits,x=1===y.newUnitAmount?b:v.featureUnitsPlural;return{line1:a.createElement(a.Fragment,null,"Your subscription will be updated to ",a.createElement("b",null,y.newUnitAmount)," ",x," ",c?a.createElement(a.Fragment,null,"on ",be(t.scheduledExecutionTime)):u,"."),line2:"Until then you still have access to your current "+b+" count."};default:return{}}}function Ee(e){return e.feature&&(1!=e.feature.unitQuantity?e.feature.unitsPlural:e.feature.units)||""}function we(e,t){if(e){var n=[].concat(e);n.sort((function(e,t){return e.upTo-t.upTo}));for(var r,i=X(n);!(r=i()).done;){var a=r.value;if(t<=a.upTo)return a}return n[n.length-1]}}function ke(e,t,r,i){switch(e.tiersMode){case n.TiersMode.Volume:return(r===n.BillingPeriod.Annually&&i?t.unitPrice.amount/12:t.unitPrice.amount)*t.upTo}return 0}function Pe(e,t,r,i){var a=e.pricePoints.filter((function(e){return e.billingPeriod===t&&e.isTieredPrice}));if(1==a.length){var o,l=a[0],c=l.feature.featureId,s=l.tiers[0];if(i[c])s=(null==(o=l.tiers)?void 0:o.find((function(e){return e.upTo===i[c].upTo})))||s;else if(r){var u=r.prices.find((function(e){var t;return e.pricingModel==n.BillingModel.PerUnit&&e.tiersMode&&(null==(t=e.feature)?void 0:t.featureId)===c}));u&&(s=we(l.tiers,u.feature.unitQuantity||1))}var d={};return d[c]=s,d}return{}}!function(e){e[e.Lower=-1]="Lower",e[e.Equal=0]="Equal",e[e.Higher=1]="Higher"}(fe||(fe={}));var Ce,Se=o(d,{target:"e199qof96"})({name:"1a2afmv",styles:"margin-left:10px"}),Te=o("button",{target:"e199qof95"})("cursor:",(function(e){return e.$disabled?"default":"pointer"}),";padding:8px 12px;background-color:",(function(e){return e.theme.stigg.palette.backgroundButton}),";border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedRestingBorder}),";border-radius:10px;display:flex;align-items:center;justify-content:center;min-height:42px;min-width:120px;",(function(e){return e.$disabled&&c.css(ye||(ye=Q(["\n opacity: 0.5;\n "])))})," &:hover{background-color:",(function(e){var t=e.theme;return e.$disabled?t.stigg.palette.backgroundButton:t.stigg.palette.outlinedHoverBackground}),";}"),Be=o(le,{target:"e199qof94"})({name:"h05omw",styles:"margin:0;font-size:15px"}),Ae=o(le,{target:"e199qof93"})({name:"1cnls12",styles:"min-height:87px"}),Me=o("button",{target:"e199qof92"})("background:none;border:none;padding:0;color:",(function(e){return e.theme.stigg.palette.text.secondary}),";text-decoration:underline;cursor:pointer;"),Ue=o(le,{target:"e199qof91"})({name:"1etgg0o",styles:"margin-top:8px;margin-bottom:17px;min-height:20px"}),Le=o("div",{target:"e199qof90"})("display:flex;flex-direction:column;margin-top:4px;align-self:",(function(e){return ve(e.theme.stigg.layout.ctaAlignment)}),";width:100%;");function Ne(e){var t=e.isNextPlan,r=e.customer,o=e.plan,l=e.billingPeriod,s=e.isCustomerOnTrial,u=e.onPlanSelected,d=e.paywallLocale,p=e.hasTiersRow,m=e.withTrialLeftRow,h=e.currentSubscription,f=e.selectedTierByFeature,y=c.useTheme(),v=i.useState(!1),b=v[0],x=v[1],E=d.planCTAButton,w=E.currentPlan,k=E.custom,P=E.downgrade,C=E.startTrial,S=E.upgrade,T=E.startNew,B=E.switchToBillingPeriod,A=E.cancelScheduledUpdate,M=g.isFunction(P)?P(o):P,U=g.isFunction(S)?S(o):S,L={title:r?o.isLowerThanCurrentPlan?M:U:T,disabled:!1,intentionType:o.isLowerThanCurrentPlan?exports.SubscribeIntentionType.DOWNGRADE_PLAN:s?exports.SubscribeIntentionType.UPGRADE_TRIAL_TO_PAID:exports.SubscribeIntentionType.UPGRADE_PLAN},N=o.pricingType===n.PricingType.Custom,F=xe({scheduledUpdate:o.scheduledUpdate,options:{withDate:!0}}).line1;if(!o.isTriable||o.isCurrentCustomerPlan||s)if(o.isCurrentCustomerPlan&&!s)if(l===o.currentCustomerPlanBillingPeriod||o.pricingType&&[n.PricingType.Free,n.PricingType.Custom].includes(o.pricingType))switch(function(e,t){if(!t||!e)return fe.Equal;var r=t.prices.find((function(e){return e.pricingModel==n.BillingModel.PerUnit&&e.tiersMode}));if(!r)return fe.Equal;var i=r.feature,a=i.unitQuantity;if(!a)return fe.Equal;var o=e[i.featureId];return o?o.upTo<a?fe.Lower:o.upTo>a?fe.Higher:fe.Equal:fe.Equal}(f,h)){case fe.Lower:L.intentionType=exports.SubscribeIntentionType.CHANGE_UNIT_QUANTITY,L.title=M;break;case fe.Higher:L.intentionType=exports.SubscribeIntentionType.CHANGE_UNIT_QUANTITY,L.title=U;break;default:L.title=w,L.disabled=!0}else L.title=B(l),L.intentionType=exports.SubscribeIntentionType.CHANGE_BILLING_PERIOD;else N&&(L.title=k,L.intentionType=exports.SubscribeIntentionType.REQUEST_CUSTOM_PLAN_ACCESS);else L.title=C(o),L.intentionType=exports.SubscribeIntentionType.START_TRIAL;t&&o.scheduledUpdate&&(L.disabled=!1,L.title=A,L.intentionType=exports.SubscribeIntentionType.CANCEL_SCHEDULED_UPDATES);var D=b||L.disabled;return a.createElement(a.Fragment,null,a.createElement(Le,{className:"stigg-paywall-plan-button-layout"},t&&F?a.createElement(Ae,{color:"secondary",variant:"body1",className:"stigg-paywall-schedule-update-text"},F," ",a.createElement(Me,{color:"secondary",onClick:function(){x(!0),Promise.resolve(u(L.intentionType)).finally((function(){return x(!1)}))}},L.title)):a.createElement(a.Fragment,null,a.createElement(Te,{className:"stigg-paywall-plan-button","data-testid":"paywall-card-cta-"+o.displayName,disabled:D,$disabled:D,onClick:function(){x(!0),Promise.resolve(u(L.intentionType)).finally((function(){return x(!1)}))}},a.createElement(Be,{className:"stigg-paywall-plan-button-text",variant:"h6",color:"primary.main"},L.title),b&&a.createElement(Se,{color:y.stigg.palette.text.disabled,loading:!0,size:16})),p&&!m?a.createElement("div",{style:{height:"20px"}}):a.createElement(Ue,{className:"stigg-trial-days-left-text",variant:"h6",color:"secondary"},o.isCurrentCustomerPlan&&o.trialDaysLeft&&a.createElement(a.Fragment,null,a.createElement("b",null,o.trialDaysLeft," days")," left on your free trial")))))}function Fe(){return(Fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var De=function(e){return i.createElement("svg",Fe({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ce||(Ce=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.954 1.034A1 1 0 0 1 6.3 2.287a5.666 5.666 0 1 0 7.367 5.406 1 1 0 0 1 2 0c0 .23-.01.458-.03.684.01.072.012.147.006.223l-.004.049a1 1 0 0 1-.078.312A7.668 7.668 0 1 1 5.7.38a1 1 0 0 1 1.254.654Zm.614.239A1 1 0 0 1 8.648.36l.05.004a1 1 0 1 1-.182 1.992l-.037-.003a1 1 0 0 1-.911-1.081Zm4.85 1.636a1 1 0 0 1 1.41.11l.064.076a1 1 0 1 1-1.537 1.28 4.154 4.154 0 0 0-.047-.056 1 1 0 0 1 .11-1.41ZM9 5.334a1 1 0 0 0-2 0V8a1 1 0 0 0 1 1h2.667a1 1 0 1 0 0-2H9V5.334Z",fill:"#7586B0"})))},Ie=function(e){var t=e.amount,r=e.currency,i=e.locale,a=e.maximumFractionDigits,o=void 0===a?5:a,l=(void 0===r?n.Currency.Usd:r).toString(),c=y(l),s=new Intl.NumberFormat(i,Z({maximumFractionDigits:o,minimumFractionDigits:0,style:"currency",currency:l},c?{currencyDisplay:"code"}:{})).format(t||0);return c&&(s=s.replace(l,c)),s.replace(/\s/g,"")};function Oe(e,t,r,i,a,o){switch(e.pricingType){case n.PricingType.Free:return"function"==typeof r.price.free?r.price.free(e.paywallCurrency):r.price.free;case n.PricingType.Custom:return{price:r.price.custom};case n.PricingType.Paid:var l,c=e.pricePoints.filter((function(e){return e.billingPeriod===t})),s=null==(l=e.paywallCalculatedPricePoints)?void 0:l.find((function(e){return e.billingPeriod===t}));if(!(null!=c&&c.length||s))return{price:r.price.priceNotSet};var u={planPrices:c,paywallCalculatedPrice:s,selectedBillingPeriod:t,selectedTierByFeature:o||{}};return r.price.paid?r.price.paid(Z({},u,{plan:e})):function(e){for(var t,r,i,a=e.planPrices,o=e.selectedBillingPeriod,l=e.locale,c=e.shouldShowMonthlyPriceAmount,s=e.selectedTierByFeature,u=e.paywallCalculatedPrice||a[0],d=u.currency,p=u.amount||0,m=1===a.length,g=o===n.BillingPeriod.Annually&&c?p/12:p,h=e.paywallLocale.price.pricePeriod(c?n.BillingPeriod.Monthly:n.BillingPeriod.Annually),f=h,y=X(a);!(i=y()).done;){var v=i.value;if(v.isTieredPrice){var b=v.tiers[0];s[v.feature.featureId]&&(b=s[v.feature.featureId]||b,t=v.tiers,r=Ee(v)),g+=ke(v,b,o,c)}}if(m){var x,E=a[0],w=(null==(x=E.feature)?void 0:x.units)||"";E.pricingModel!==n.BillingModel.PerUnit||E.isTieredPrice?E.pricingModel===n.BillingModel.UsageBased&&(f="per "+w):f="per "+w+" "+h}return{price:Ie({amount:g,currency:d,locale:l}),unit:f,tiers:t,tierUnits:r}}(Z({},u,{locale:i,shouldShowMonthlyPriceAmount:a,paywallLocale:r}));default:return{price:""}}}var je=o(f.Select,{target:"eeq8l4e1"})("border-radius:10px;&:hover .MuiOutlinedInput-notchedOutline{border-color:",(function(e){return e.theme.stigg.palette.outlinedBorder}),";}"),Re=o(f.OutlinedInput,{target:"eeq8l4e0"})("& .MuiInputBase-input{padding:7px 12px;}&.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:",(function(e){return e.theme.stigg.palette.primary}),"!important;}");function qe(e){var t=e.componentId,n=e.tiers,r=e.tierUnits,i=e.selectedTier,o=e.handleTierChange;return a.createElement(le,{className:"stigg-price-tier-select",style:{minHeight:"46px"}},n?a.createElement(je,{value:i?i.upTo.toString():n[0].upTo.toString(),fullWidth:!0,onChange:function(e,t){n&&o(we(n,e.target.value))},id:t,input:a.createElement(Re,null),MenuProps:{MenuListProps:{disablePadding:!0},PaperProps:{sx:{marginTop:"4px",borderRadius:"10px"}}}},g.map(n,(function(e){return a.createElement(f.MenuItem,{className:"stigg-price-tier-menu-item-text",key:e.upTo,value:e.upTo.toString()},a.createElement(le,{variant:"body1",color:"primary"},e.upTo," ",r))}))):a.createElement("div",null))}var Ge=o(le,{target:"e1gsqbi12"})({name:"bfvx8c",styles:"word-break:break-word;width:100%"}),_e=o(le,{target:"e1gsqbi11"})({name:"1bmnxg7",styles:"white-space:nowrap"}),We=o(le,{target:"e1gsqbi10"})({name:"nurf5y",styles:"white-space:normal;min-height:39px"});function He(e){var t=e.billingPeriod,n=e.hasMonthlyPrice,r=e.hasAnnuallyPrice,i=e.paywallLocale,o="";return e.plan.pricePoints.find((function(e){return e.billingPeriod===t}))&&n&&r&&(o=(null==i.price.billingPeriod?void 0:i.price.billingPeriod(t))||", billed "+t.toLowerCase()),a.createElement(le,{span:!0,className:"stigg-price-billing-period-text",variant:"h6",color:"secondary"},o)}var Ve=function(e){var t=e.showStartingAt,n=e.withUnitPriceRow,r=e.withStartingAtRow,o=e.withTiersRow,l=e.selectedTierByFeature,c=e.setSelectedTierByFeature,s=e.plan,u=e.billingPeriod,d=e.paywallLocale,p=e.hasMonthlyPrice,m=e.hasAnnuallyPrice,g=Oe(s,u,d,e.locale,p,l),h=g.price,f=g.unit,y=g.tiers,v=g.tierUnits,b=i.useState(),x=b[0],E=b[1];i.useEffect((function(){E(l[k])}),[l]);var w=s.pricePoints.find((function(e){return e.billingPeriod===u&&e.isTieredPrice})),k=w?w.feature.featureId:void 0,P=function(e){var t={};t[k]=e,c(t)};return i.useEffect((function(){y&&P(l[k])}),[]),a.createElement(Ge,{className:"stigg-price-text"},a.createElement(a.Fragment,null,r&&a.createElement(le,{style:{minHeight:"20px"},className:"stigg-starting-at-text",variant:"body1",color:"secondary"},t?d.price.startingAtCaption:""),a.createElement(We,{variant:"h1"},h),n&&a.createElement(le,{className:"stigg-price-unit-and-billing-period-text",style:{minHeight:"48px"}},a.createElement(_e,{span:!0,variant:"h6",color:"secondary"},f),a.createElement(He,{plan:s,billingPeriod:u,hasAnnuallyPrice:m,hasMonthlyPrice:p,paywallLocale:d})),o&&a.createElement(qe,{componentId:s.id+"_"+k+"_tier",tiers:y,tierUnits:v,selectedTier:x,handleTierChange:P})))},ze=o("div",{target:"eacdu8d8"})("position:relative;background-color:",(function(e){var t=e.theme;return e.$isCurrentPlan?t.stigg.palette.backgroundHighlight:t.stigg.palette.backgroundPaper}),";border:",(function(e){var t=e.theme;return e.$isHighlighted?"3px solid "+t.stigg.palette.primary:"1px solid "+t.stigg.palette.outlinedBorder}),";border-radius:10px;padding:",(function(e){return e.theme.stigg.layout.planPadding}),";display:flex;min-width:",(function(e){return e.theme.stigg.layout.planMinWidth}),";max-width:",(function(e){return e.theme.stigg.layout.planMaxWidth}),";flex-direction:column;align-items:flex-start;justify-content:flex-start;position:relative;"),$e=o(le,{target:"eacdu8d7"})({name:"mpkj0c",styles:"padding-bottom:8px"}),Ze=o("div",{target:"eacdu8d6"})("height:2px;width:100%;background-color:",(function(e){return e.theme.stigg.palette.outlinedBorder}),";margin-bottom:40px;"),Ye=o(le,{target:"eacdu8d5"})("text-align:",(function(e){return e.theme.stigg.layout.descriptionAlignment}),";min-height:",(function(e){return e.theme.stigg.layout.descriptionMinHeight}),";"),Qe=o("div",{target:"eacdu8d4"})("background-color:",(function(e){return e.theme.stigg.palette.primary}),";border-radius:40px;position:absolute;top:-12px;"),Ke=o(le,{target:"eacdu8d3"})({name:"a8c38r",styles:"margin:0;padding:2px 8px"}),Xe=o("div",{target:"eacdu8d2"})("width:100%;display:flex;flex-direction:column;align-items:",(function(e){return ve(e.theme.stigg.layout.headerAlignment)}),";"),Je=o("div",{target:"eacdu8d1"})("position:absolute;top:0;background-color:",(function(e){return e.theme.stigg.palette.outlinedBorder}),";border-radius:0px 0px 10px 10px;padding:3px 12px;"),et=o(De,{target:"eacdu8d0"})("display:flex;height:100%;margin-right:4px;path{fill:",(function(e){return e.theme.stigg.palette.text.primary}),";}");function tt(e){var t=e.text,n=void 0===t?"Next":t;return a.createElement(Je,null,a.createElement(f.Grid,{display:"flex",alignItems:"center",gap:1},a.createElement(et,{$iconsColor:e.iconsColor}),a.createElement(le,{color:"primary",variant:"body1"},n)))}function nt(e){var t,n=e.withUnitPriceRow,r=e.withTiersRow,o=e.withTrialLeftRow,l=e.customer,c=e.plan,s=e.billingPeriod,u=e.isHighlighted,d=e.currentSubscription,p=e.shouldShowDescriptionSection,m=e.hasMonthlyPrice,g=e.hasAnnuallyPrice,f=e.isCustomerOnTrial,y=e.onPlanSelected,v=e.paywallLocale,b=e.locale,x=e.withStartingAtRow,E=c.isNextPlan&&c.isNextPlan(s),w=c.pricePoints.filter((function(e){return e.billingPeriod===s})),k=null==(t=c.paywallCalculatedPricePoints)?void 0:t.find((function(e){return e.billingPeriod===s})),P=w.length>1&&!(null==k||!k.additionalChargesMayApply),C=null;E?C=a.createElement(tt,{text:"Next plan"}):u&&v.highlightChip&&(C=a.createElement(Qe,{className:"stigg-highlight-badge"},a.createElement(Ke,{className:"stigg-highlight-badge-text",color:"white",bold:!0},v.highlightChip)));var S=a.useState(Pe(c,s,d,{})),T=S[0],B=S[1];return i.useEffect((function(){B(Pe(c,s,d,T))}),[s]),a.createElement(ze,{className:h("stigg-plan-offering-container",{"stigg-current-plan":c.isCurrentCustomerPlan}),$isHighlighted:u,$isCurrentPlan:c.isCurrentCustomerPlan},C,a.createElement(Xe,{className:"stigg-header-wrapper"},a.createElement($e,{className:"stigg-plan-header",variant:"h3"},c.displayName),p&&a.createElement(Ye,{className:"stigg-plan-description",variant:"h6",color:"secondary"},c.description),a.createElement(Ve,{showStartingAt:P,withUnitPriceRow:n,withStartingAtRow:x,withTiersRow:r,selectedTierByFeature:T,setSelectedTierByFeature:B,plan:c,billingPeriod:s,paywallLocale:v,locale:b,hasAnnuallyPrice:g,hasMonthlyPrice:m}),a.createElement(Ne,{isNextPlan:E,customer:l,plan:c,currentSubscription:d,billingPeriod:s,isCustomerOnTrial:f,onPlanSelected:function(e){var t=Object.keys(T).map((function(e){return{featureId:e,quantity:T[e].upTo}}));return y(e,t)},paywallLocale:v,hasTiersRow:r,withTrialLeftRow:o,selectedTierByFeature:T}),a.createElement(Ze,{className:"stigg-plan-header-divider"})),a.createElement(he,{plan:c,billingPeriod:s,paywallLocale:v}))}var rt,it=o("div",{target:"esqa6i42"})("height:40px;padding:0 20px;margin-bottom:",(function(e){return e.theme.stigg.layout.switchBottomSpacing}),";border-radius:10px;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";background-color:",(function(e){return e.theme.stigg.palette.backgroundPaper}),";display:flex;align-items:center;justify-content:center;"),at=o(le,{target:"esqa6i41"})({name:"zvmrfm",styles:"margin:0 8px"}),ot=o(v,{target:"esqa6i40"})("& .react-switch-bg{border:",(function(e){return"1px solid "+e.theme.stigg.palette.switchBorder}),";background:",(function(e){return e.theme.stigg.palette.switchFill}),"!important;}& .react-switch-handle{box-shadow:",(function(e){return e.theme.stigg.shadows.light}),";background:",(function(e){return e.theme.stigg.palette.switchHandle}),"!important;top:0.5px!important;}");function lt(e){return a.createElement(le,{variant:"h6",color:e.disabled?"disabled":"primary",className:"stigg-discount-rate-text"},e.discount,"% off")}function ct(e){var t=e.discountRate,r=e.onBillingPeriodChanged;if(e.availableBillingPeriods.length<=1)return null;var i=e.selectedBillingPeriod===n.BillingPeriod.Monthly;return a.createElement(it,{className:"stigg-period-picker-container"},a.createElement(at,{variant:"h6",className:"stigg-monthly-period-text",color:i?"primary":"disabled"},"Monthly"),a.createElement(ot,{className:"stigg-period-switch",uncheckedIcon:!1,checkedIcon:!1,height:16,width:33,onChange:function(e){return r(e?n.BillingPeriod.Annually:n.BillingPeriod.Monthly)},checked:!i,borderRadius:10,handleDiameter:19}),a.createElement(at,{variant:"h6",className:"stigg-annual-period-text",color:i?"disabled":"primary"},"Annual"),0!==t&&a.createElement(lt,{discount:t,disabled:i}))}function st(e,t){var n,r,i,a;if((a=null==(n=e.paywallCalculatedPricePoints)?void 0:n.find((function(e){return e.billingPeriod===t})))||(a=e.pricePoints.find((function(e){return e.billingPeriod===t}))),null==(r=a)||!r.amount){var o=e.pricePoints.find((function(e){return e.isTieredPrice&&e.billingPeriod===t}));if(o)return o.tiers[0].unitPrice.amount}return null==(i=a)?void 0:i.amount}function ut(){return(ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var dt=o((function(e){return i.createElement("svg",ut({width:135,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),rt||(rt=i.createElement("path",{d:"M.099 3.43v9.558h1.057V9.527h2.81c1.983 0 3.323-1.275 3.323-3.049 0-1.773-1.34-3.048-3.324-3.048H.1Zm1.057 5.127v-4.15h2.889c1.289 0 2.143.855 2.143 2.071 0 1.217-.854 2.079-2.143 2.079h-2.89ZM11.779 13.162c2.129 0 3.873-1.622 3.873-3.78 0-2.165-1.715-3.758-3.844-3.758-2.158 0-3.874 1.622-3.874 3.787 0 2.158 1.687 3.75 3.845 3.75Zm.014-.934c-1.556 0-2.773-1.202-2.773-2.832 0-1.629 1.216-2.83 2.773-2.83 1.528 0 2.773 1.201 2.773 2.83 0 1.63-1.245 2.832-2.773 2.832ZM19.905 12.988l1.572-6.046h.029l1.556 6.046h1.34l2.194-7.183h-1.18l-1.622 6.104h-.03l-1.549-6.104h-1.433l-1.55 6.104h-.029l-1.65-6.104h-1.195l2.208 7.183h1.34ZM34.983 9.425c0-2.121-1.578-3.8-3.83-3.8-2.1 0-3.845 1.556-3.845 3.786 0 2.143 1.6 3.75 3.874 3.75 1.586 0 2.875-.767 3.497-1.969l-.897-.485c-.413.898-1.412 1.528-2.585 1.528-1.673 0-2.694-1.246-2.795-2.513h6.567c.014-.13.014-.18.014-.297ZM31.14 6.551c1.404 0 2.527.948 2.715 2.259h-5.423a2.745 2.745 0 0 1 2.708-2.26ZM39.592 5.682c-1.028 0-1.774.521-2.1 1.253l-.101-1.13h-.905v7.183h1.057V8.564c0-1.115.615-1.789 1.774-1.789h.68V5.682h-.405ZM48.249 9.425c0-2.121-1.579-3.8-3.83-3.8-2.1 0-3.845 1.556-3.845 3.786 0 2.143 1.6 3.75 3.873 3.75 1.586 0 2.875-.767 3.497-1.969l-.897-.485c-.413.898-1.412 1.528-2.585 1.528-1.673 0-2.694-1.246-2.795-2.513h6.567c.015-.13.015-.18.015-.297Zm-3.845-2.874c1.404 0 2.527.948 2.715 2.259h-5.423a2.745 2.745 0 0 1 2.708-2.26ZM55.846 7.029c-.63-.89-1.644-1.398-2.831-1.398-2.093 0-3.773 1.586-3.773 3.765 0 2.18 1.651 3.766 3.744 3.766 1.195 0 2.23-.522 2.867-1.42l.145 1.246h.905V2.56l-1.057.116V7.03Zm-2.817 5.199c-1.498 0-2.7-1.188-2.7-2.832 0-1.643 1.202-2.83 2.7-2.83a2.787 2.787 0 0 1 2.817 2.83 2.787 2.787 0 0 1-2.817 2.832ZM65.731 5.631c-1.194 0-2.222.514-2.86 1.412V2.561l-1.057.116v10.31h.905l.145-1.237c.63.898 1.644 1.412 2.838 1.412 2.093 0 3.773-1.586 3.773-3.766 0-2.179-1.651-3.765-3.744-3.765Zm-.043 6.597a2.787 2.787 0 0 1-2.817-2.832 2.787 2.787 0 0 1 2.817-2.83c1.499 0 2.7 1.187 2.7 2.83 0 1.644-1.201 2.832-2.7 2.832ZM76.219 5.805v4.113c0 1.412-.905 2.266-2.172 2.266-1.26 0-1.97-.738-1.97-2.07V5.804H71.02v4.468c0 1.694 1.115 2.824 2.744 2.824 1.079 0 1.926-.42 2.455-1.116v.913c0 1.267-.956 2.186-2.346 2.186-1.123 0-2.05-.6-2.288-1.65l-.927.477C71.1 15.16 72.308 16 73.858 16c1.955 0 3.418-1.405 3.418-3.208V5.805h-1.057ZM108.672 10.487c0 1.42-1.261 2.3-3.181 2.3-1.027 0-1.857-.184-2.651-.578.074-.449.142-.99.16-1.618.738.43 1.575.64 2.381.64.959 0 1.458-.221 1.458-.689.018-.461-.339-.67-1.772-.947-1.661-.332-2.399-1.021-2.399-2.24 0-1.377 1.261-2.27 3.18-2.27.849 0 1.692.16 2.338.437l-.32 1.544a4.803 4.803 0 0 0-2.018-.43c-.898 0-1.341.221-1.341.658 0 .381.308.541 1.71.83 1.79.382 2.461 1.07 2.461 2.35l-.006.013Zm4.207.609c-.719 0-1.298-.382-1.298-1.39V6.887h1.827l.339-1.63h-2.166v-2.32a9.976 9.976 0 0 1-1.9.345l-.019 6.748c0 1.84 1.101 2.769 2.75 2.769.375 0 .701-.037.978-.105l.363-1.729c-.228.08-.517.136-.874.136v-.006Zm2.086 1.593h1.919V5.258h-1.919v7.43Zm.965-10.47c-.621-.006-1.101.45-1.107 1.052 0 .621.455 1.089 1.071 1.095.621 0 1.082-.437 1.095-1.04.012-.62-.443-1.095-1.052-1.107h-.007Zm10.126 3.039v6.268c0 2.369-1.6 3.999-4.3 3.999-.972 0-2.042-.216-2.762-.628.498-.51.837-.953 1.052-1.273.486.166.996.252 1.519.252 1.71 0 2.578-.947 2.578-2.14v-.24c-.609.7-1.489 1.138-2.541 1.138-2.018 0-3.537-1.501-3.537-3.728 0-2.227 1.661-3.808 3.691-3.808 1.052 0 1.968.381 2.577 1.101l.062-.947h1.667l-.006.006Zm-1.901 3.648c0-1.181-.861-2.08-2.048-2.08-1.188 0-2.061.899-2.061 2.08 0 1.18.861 2.048 2.061 2.048 1.199 0 2.048-.898 2.048-2.048Zm10.839-3.648v6.268c0 2.369-1.6 3.999-4.3 3.999-.972 0-2.042-.216-2.762-.628.498-.51.837-.953 1.052-1.273.486.166.996.252 1.519.252 1.71 0 2.578-.947 2.578-2.14v-.24c-.609.7-1.489 1.138-2.541 1.138-2.017 0-3.537-1.501-3.537-3.728 0-2.227 1.661-3.808 3.691-3.808 1.052 0 1.968.381 2.577 1.101l.062-.947H135l-.006.006Zm-1.901 3.648c0-1.181-.861-2.08-2.048-2.08-1.188 0-2.061.899-2.061 2.08 0 1.18.861 2.048 2.061 2.048 1.199 0 2.048-.898 2.048-2.048ZM95.71 14.982c-.075.037-1.483.659-3.975.542A14.827 14.827 0 0 1 88.512 15l4.312-5.007c.77.197 1.76.381 2.885.436 2.492.123 3.9-.504 3.974-.541l-3.974 5.1v-.007Zm-6.441-9.62c-.708-2.393-.431-3.907-.413-3.987l-4.01 5.07c-.013.08-.29 1.592.412 3.985a14.98 14.98 0 0 0 1.273 3.008l3.845-5.37a15.042 15.042 0 0 1-1.107-2.7v-.006Zm9.996.529a14.561 14.561 0 0 0-1.815-3.882l-3.568 4.546.67 3.217c.4.056.794.092 1.194.117.203.006.406.012.603.012 1.931 0 3.008-.455 3.125-.51l.277-.123c.024-.665-.019-1.84-.48-3.384l-.006.007Zm-2.24-4.208A14.43 14.43 0 0 0 92.83.834c-1.605-.08-2.756.154-3.395.338l-.056.296c-.012.061-.258 1.494.4 3.74.11.381.246.756.394 1.132l3.285-.111 3.574-4.54-.006-.006Z",fill:"#001E6C"})))}),{target:"ee5i8qp1"})("*{fill:",(function(e){return e.theme.stigg.palette.text.secondary}),";}"),pt=o("div",{target:"ee5i8qp0"})("align-self:",(function(e){return e.$alignSelf||"unset"}),";@media (max-width: 1040px){align-self:center;}");function mt(e){var t=e.source,n=e.style;return e.showWatermark?a.createElement(pt,{$alignSelf:e.align,className:"stigg-watermark",style:Z({cursor:"pointer"},void 0===n?{}:n),onClick:function(){var e=window.location.hostname.replace("www.","");window.open("https://www.stigg.io/?utm_source="+e+"&utm_medium=referral&utm_campaign="+t,"_blank")}},a.createElement(dt,null)):null}function gt(e,t){return e.some((function(e){return ht(e,t)}))}function ht(e,t){return e.pricePoints.some((function(e){return e.billingPeriod===t}))}var ft,yt=o("div",{target:"e19kubi82"})("color:",(function(e){return e.theme.stigg.palette.text.primary}),";display:flex;align-items:stretch;justify-content:center;flex-wrap:wrap;padding:10px 0;gap:",(function(e){return e.theme.stigg.layout.planMargin}),";"),vt=o("div",{target:"e19kubi81"})({name:"1rdsyw8",styles:"display:flex;flex-direction:column;align-items:center;& *{box-sizing:border-box;}"}),bt=o("div",{target:"e19kubi80"})({name:"zigog8",styles:"display:flex;flex-direction:column;align-items:center"}),xt=function(e){var t=e.plans,r=e.customer,o=e.currentSubscription,l=e.highlightedPlanId,c=e.selectedBillingPeriod,s=e.onBillingPeriodChanged,u=e.availableBillingPeriods,d=e.isCustomerOnTrial,p=e.onPlanSelected,g=e.paywallLocale,h=e.locale,f=Pt().stigg,y=function(e){return e.reduce((function(e,t){var r,i,a=st(t,n.BillingPeriod.Monthly),o=(i=st(t,n.BillingPeriod.Annually),m(r=a)||m(i)?null:Math.round((r-i/12)/r*100));return o&&(e=Math.max(e,o)),e}),0)}(t),v=t.some((function(e){return!!e.description})),b=gt(t,n.BillingPeriod.Monthly),x=gt(t,n.BillingPeriod.Annually),E=function(e,t){return e.filter((function(e){return e.pricingType!==n.PricingType.Paid||ht(e,t)}))}(t,c),w=i.useCallback((function(e,t,n){return p({plan:e,customer:r,subscription:o,intentionType:t,selectedBillingPeriod:c,billableFeatures:n})}),[r,c]),k=E.some((function(e){var t,n=e.pricePoints.filter((function(e){return e.billingPeriod===c})),r=null==(t=e.paywallCalculatedPricePoints)?void 0:t.find((function(e){return e.billingPeriod===c}));return n.length>1&&!(null==r||!r.additionalChargesMayApply)})),P=E.some((function(e){return!!Oe(e,c,g,h,b).unit})),C=E.some((function(e){return!!Pe(e,c,o,{})})),S=E.some((function(e){return e.isCurrentCustomerPlan&&e.trialDaysLeft}));return a.createElement(vt,{className:"stigg-paywall-container"},a.createElement(bt,{className:"stigg-paywall-layout"},a.createElement(ct,{onBillingPeriodChanged:s,selectedBillingPeriod:c,availableBillingPeriods:u,discountRate:y}),a.createElement(yt,{className:"stigg-paywall-plans-layout"},E.map((function(e){return a.createElement(nt,{withUnitPriceRow:P,withTiersRow:C,withTrialLeftRow:S,key:e.id,shouldShowDescriptionSection:v,hasMonthlyPrice:b,hasAnnuallyPrice:x,plan:e,withStartingAtRow:k,currentSubscription:o,billingPeriod:c,isHighlighted:e.id===l,isCustomerOnTrial:d,onPlanSelected:function(t,n){return w(e,t,n)},paywallLocale:g,locale:h,customer:r})}))),a.createElement(mt,{source:"paywall",align:"end",style:{marginTop:16},showWatermark:f.isWidgetWatermarkEnabled})))},Et=(function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=Object.create((t&&t.prototype instanceof d?t:d).prototype),a=new k(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return{value:void 0,done:!0}}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var l=x(o,n);if(l){if(l===u)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u={};function d(){}function p(){}function m(){}var g={};l(g,i,(function(){return this}));var h=Object.getPrototypeOf,f=h&&h(h(P([])));f&&f!==t&&n.call(f,i)&&(g=f);var y=m.prototype=d.prototype=Object.create(g);function v(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,a){function o(){return new t((function(r,o){!function r(i,a,o,l){var c=s(e[i],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(d).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(c.arg)}(i,a,r,o)}))}return r=r?r.then(o,o):o()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=m,l(y,"constructor",m),l(m,"constructor",p),p.displayName=l(m,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,l(e,o,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),l(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new b(c(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},v(y),l(y,o,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,u):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(ft={exports:{}}),ft.exports),wt=new(function(){function e(){}var t=e.prototype;return t.error=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];console.error(e,t||{},r)},t.log=function(e,t){console.log(e,t||{})},t.debug=function(e,t){console.debug(e,t||{})},e}()),kt=a.createContext(null);kt.displayName="StiggContext";var Pt=function(){var e=i.useContext(kt);if(!e)throw new Error("Could not find Stigg context; You need to wrap your app in an <StiggProvider> component.");return e};function Ct(e,t,r){var i,a=e.flatMap((function(e){return e.pricePoints})).map((function(e){return e.billingPeriod})),o=g.countBy(a),l=g.uniq(a);if(r&&l.includes(r))i=r;else if(t){var c=t.find((function(e){return e.status==n.SubscriptionStatus.Active}));c&&c.prices.length>0&&(i=null==c?void 0:c.prices[0].billingPeriod)}return i||(i=(o[n.BillingPeriod.Monthly]||0)>(o[n.BillingPeriod.Annually]||0)?n.BillingPeriod.Monthly:n.BillingPeriod.Annually),{defaultBillingPeriod:i,availableBillingPeriods:l}}function St(e,t){if(void 0===t&&(t="px"),e)return""+e+t}function Tt(e,t){if(!t)return e;switch(t){case n.FontWeight.Normal:return"normal";case n.FontWeight.Bold:return"bold";default:return"normal"}}function Bt(e){var t,n,r,i,a,o,l,c;return{fontFamilyUrl:(null==e?void 0:e.fontFamily)||void 0,h1:{fontSize:St(null==e||null==(t=e.h1)?void 0:t.fontSize),fontWeight:Tt("bold",null==e||null==(n=e.h1)?void 0:n.fontWeight)},h2:{fontSize:St(null==e||null==(r=e.h2)?void 0:r.fontSize),fontWeight:Tt("normal",null==e||null==(i=e.h2)?void 0:i.fontWeight)},h3:{fontSize:St(null==e||null==(a=e.h3)?void 0:a.fontSize),fontWeight:Tt("normal",null==e||null==(o=e.h3)?void 0:o.fontWeight)},body:{fontSize:St(null==e||null==(l=e.body)?void 0:l.fontSize),fontWeight:Tt("normal",null==e||null==(c=e.body)?void 0:c.fontWeight)}}}function At(e){if(e)switch(e){case n.Alignment.Left:return"left";case n.Alignment.Center:return"center";case n.Alignment.Right:return"right";default:return}}var Mt,Ut=o("div",{target:"e1f7khji6"})({name:"zigog8",styles:"display:flex;flex-direction:column;align-items:center"}),Lt=o(ee,{target:"e1f7khji5"})({name:"o7nnmj",styles:"margin-right:16px"}),Nt=o("div",{target:"e1f7khji4"})("display:flex;flex-direction:column;align-items:flex-start;gap:20px;border-radius:10px;padding:",(function(e){return e.theme.stigg.layout.planPadding}),";background-color:",(function(e){return e.theme.stigg.palette.backgroundPaper}),";min-width:",(function(e){return e.theme.stigg.layout.planMinWidth}),";max-width:",(function(e){return e.theme.stigg.layout.planMaxWidth}),";min-height:450px;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";"),Ft=o("div",{target:"e1f7khji3"})("display:flex;gap:",(function(e){return e.theme.stigg.layout.planMargin}),";flex-wrap:wrap;justify-content:center;"),Dt=o("div",{target:"e1f7khji2"})({name:"k8xojc",styles:"display:flex;align-items:center;margin-bottom:12px"}),It=o("div",{target:"e1f7khji1"})({name:"xdvdnl",styles:"margin-top:auto"}),Ot=o("div",{target:"e1f7khji0"})("width:150px;margin-bottom:",(function(e){return e.theme.stigg.layout.switchBottomSpacing}),";padding:12px 12px;border-radius:10px;background-color:white;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";");function jt(){return a.createElement(Nt,null,a.createElement(x,{width:120,borderRadius:4}),a.createElement(x,{circle:!0,width:40,height:40}),a.createElement(x,{style:{marginBottom:33},width:120,borderRadius:4}),a.createElement(Dt,null,a.createElement(Lt,null),a.createElement(x,{width:120,borderRadius:4})),a.createElement(Dt,null,a.createElement(Lt,null),a.createElement(x,{width:120,borderRadius:4})),a.createElement(Dt,null,a.createElement(Lt,null),a.createElement(x,{width:120,borderRadius:4})),a.createElement(It,null,a.createElement(x,{height:50,borderRadius:4})))}function Rt(){return a.createElement(Ut,{className:"stigg-skeleton-loader-container"},a.createElement(Ot,{className:"stigg-skeleton-loader-billing-period"},a.createElement(x,{borderRadius:4})),a.createElement(Ft,{className:"stigg-skeleton-loader-plans-container"},a.createElement(jt,null),a.createElement(jt,null),a.createElement(jt,null)))}var qt,Gt=function(e){var t=e.externalFontUrl;return a.createElement(c.Global,{styles:c.css(Mt||(Mt=Q(["\n ","\n\n /* latin-ext */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZ2IHTWEBlwu8Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZOIHTWEBlw.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,\n U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriAWCrCBamC3YU-CnE6Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriAWCrCBimC3YU-Ck.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,\n U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriASitCBamC3YU-CnE6Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriASitCBimC3YU-Ck.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,\n U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n "])),t&&"\n @font-face {\n font-family: 'custom-font';\n font-style: normal;\n font-weight: normal;\n src: local('custom-font'), url("+t+") format('woff');\n }\n ")})},_t=o("div",{target:"emcdfp60"})((function(e){var t=e.customCss;return t&&c.css(qt||(qt=Q(["\n ","\n "])),t)}),";");function Wt(e){var t,n,r,i,a,o,l,c,d,p=Pt(),m=g.merge(e,p.theme);return a=s((null==(t=m)||null==(n=t.palette)?void 0:n.primary)||"#327EEE"),o=s((null==t||null==(r=t.palette)||null==(i=r.text)?void 0:i.primary)||"#001E6C"),l=s("#4CAF50"),c=s("#f44336"),d={palette:{primary:a.hex(),primaryDark:a.darken(.3).hex(),backgroundPaper:"#FFFFFF",backgroundHighlight:"#F5F6F9",backgroundSection:a.alpha(.1).toString(),backgroundButton:a.alpha(.08).toString(),outlinedBorder:"#C4CBDD",outlinedRestingBorder:a.alpha(.5).toString(),outlinedHoverBackground:a.lightness(95).hex(),switchBorder:a.lighten(.1).hex(),switchFill:a.lighten(.5).hex(),switchHandle:a.hex(),warning:"#ed6c02",error:c.hex(),errorDark:c.darken(.3).hex(),success:l.hex(),successDark:l.darken(.3).hex(),white:"#FFFFFF",text:{primary:o.hex(),secondary:o.alpha(.75).toString(),disabled:o.alpha(.5).toString()}},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"},h2:{fontSize:"24px",fontWeight:"normal"},h3:{fontSize:"16px",fontWeight:"normal"},body:{fontSize:"14px",fontWeight:"normal"},caption:{fontSize:"12px",fontWeight:"normal"}},customCss:""},u(d,t)}function Ht(e){var t=e.typography,n=Number(t.body.fontSize.replace("px",""))/14;return{pxToRem:function(e){return e/16*n+"rem"},bodyFontFamily:t.fontFamily,headingFontFamily:t.fontFamily,fontSizes:[t.h1.fontSize,t.h2.fontSize,t.h3.fontSize,t.body.fontSize,"12px","10px"]}}var Vt=function(e){var t=e.children,n=Wt(e.componentTheme);return a.createElement(P.ThemeProvider,{theme:P.createTheme({stigg:n})},a.createElement(c.ThemeProvider,{theme:{stigg:n}},a.createElement(_t,{customCss:n.customCss},a.createElement(Gt,{externalFontUrl:n.typography.fontFamilyUrl}),a.createElement(w.ThemeProvider,{theme:{typography:Ht(n)}},t))))},zt=a.createContext(null);zt.displayName="CustomerPortalContext";var $t=function(){var e=i.useContext(zt);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 Zt(e){var t,n,r,o,l,c,s,d=e.children,p=e.textOverrides,m=e.theme,g=e.resourceId,h=e.productId,f=Pt().customerPortalUpdatedAt,y=function(e){var t=e.resourceId,n=e.productId,r=Pt(),a=r.stigg,o=r.customerPortalUpdatedAt,l=i.useState(!1),c=l[0],s=l[1],u=i.useState(),d=u[0],p=u[1];return i.useEffect((function(){!function(){var e=$(Et.mark((function e(){return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isCustomerLoaded){e.next=15;break}return e.prev=1,s(!0),e.next=5,a.getCustomerPortal({resourceId:t,productId:n});case 5:p(e.sent),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),wt.error("Failed to load customer portal "+(null==e.t0?void 0:e.t0.message),e.t0);case 12:return e.prev=12,s(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,9,12,15]])})));return function(){return e.apply(this,arguments)}}()()}),[a,a.isCustomerLoaded,o,t]),{customerPortal:d,isLoading:c}}({resourceId:g,productId:h}),v=y.customerPortal,b=y.isLoading,x=null!=v&&v.configuration?function(e){var t=e.palette;return{palette:{primary:(null==t?void 0:t.primary)||void 0,backgroundPaper:(null==t?void 0:t.paywallBackgroundColor)||void 0,outlinedBorder:(null==t?void 0:t.borderColor)||void 0,backgroundHighlight:(null==t?void 0:t.currentPlanBackground)||void 0,text:{primary:(null==t?void 0:t.textColor)||void 0}},typography:Bt(e.typography)}}(v.configuration):void 0,E=(t=Wt(x),r=null==v?void 0:v.configuration,{sectionTitleColor:(null==(n=m)?void 0:n.sectionTitleColor)||t.palette.text.secondary,planNameColor:(null==n?void 0:n.planNameColor)||t.palette.text.primary,backgroundColor:(null==n?void 0:n.backgroundColor)||(null==r||null==(o=r.palette)?void 0:o.backgroundColor)||"white",borderColor:(null==n?void 0:n.borderColor)||(null==r||null==(l=r.palette)?void 0:l.borderColor)||"rgba(0, 30, 108, 0.15)",listItemBackgroundColor:(null==n?void 0:n.backgroundColor)||(null==r||null==(c=r.palette)?void 0:c.backgroundColor)||"white",tabMaxHeight:(null==n?void 0:n.tabMaxHeight)||"380px",iconsColor:(null==n?void 0:n.iconsColor)||(null==r||null==(s=r.palette)?void 0:s.iconsColor)||void 0,iconsBackgroundColor:null==n?void 0:n.iconsBackgroundColor}),w=u({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"},p);return a.createElement(Vt,{componentTheme:x},a.createElement(zt.Provider,{key:null==f?void 0:f.toString(),value:{customerPortal:v,isLoading:b,textOverrides:w,theme:E,resourceId:g}},d))}var Yt,Qt=o(C,{target:"emvioms0"})("border-radius:10px;padding:8px 16px;text-transform:none;&,&:hover{border-color:",(function(e){return e.theme.stigg.palette.outlinedRestingBorder}),";}");function Kt(){return(Kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Xt=function(e){return i.createElement("svg",Kt({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Yt||(Yt=i.createElement("path",{clipRule:"evenodd",d:"M13.333 2.5 17.5 6.667 6.667 17.5H2.5v-4.167L13.333 2.5v0Z",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},Jt=o("div",{target:"ewz8krb0"})("display:flex;align-items:center;justify-content:space-between;",(function(e){return!e.$disableMargin&&"\n &:not(:last-child) {\n margin-bottom: 32px;\n }\n "}),";");function en(e){var t=e.title,n=e.className,r=e.isLoading,i=$t().theme;return r?a.createElement(x,{width:120}):a.createElement(le,{className:n,overrideColor:i.sectionTitleColor,variant:"h3",bold:!0},t)}var tn=o(Xt,{target:"e1fjw26b0"})("path{stroke:",(function(e){return e.theme.stigg.palette.primary}),";}");function nn(e){var t=e.onManageSubscription,n=e.hideManageButton,r=e.textOverrides;return a.createElement(Jt,{className:"stigg-customer-portal-overview-header",$disableMargin:!0},a.createElement(en,{title:"Subscription",className:"stigg-overview-title"}),!n&&a.createElement(Qt,{className:"stigg-manage-subscription-button",variant:"outlined",onClick:t},a.createElement(tn,{className:"stigg-manage-subscription-button-image"}),a.createElement(le,{className:"stigg-manage-subscription-button-text",color:"primary.main",style:{marginLeft:"8px"},variant:"body1"},null==r?void 0:r.manageSubscription)))}function rn(){var e=$t().customerPortal,t=S(null==e?void 0:e.subscriptions,(function(e){return e.addons}));return A(t)?null:a.createElement("div",{className:"stigg-addons-list-layout"},t.map((function(e,n){return a.createElement(le,{key:e.addonId,span:!0,className:"stigg-addon-list-item-text",variant:"body1"},e.quantity>1&&e.quantity+" X ",e.displayName,n===t.length-1?"":", ")})))}var an=o("div",{target:"e1g6q2f50"})("display:flex;justify-content:space-between;align-items:center;gap:64px;border-bottom:",(function(e){return"1px solid "+e.$borderColor}),";padding:16px 0;&>*:first-child{max-width:60%;}");function on(){var e=$t(),t=e.customerPortal,n=e.theme,r=null==t?void 0:t.promotionalEntitlements;return a.createElement("div",{style:{display:"flex",flexDirection:"column"}},a.createElement(le,{color:"secondary"},e.textOverrides.promotionsSubtitle),a.createElement("div",{style:{display:"flex",flexDirection:"column"}},a.createElement(an,{$borderColor:n.borderColor},a.createElement(le,{variant:"body1",bold:!0},"Feature"),a.createElement(le,{variant:"body1",bold:!0},"Expiration date")),null==r?void 0:r.map((function(e){return a.createElement(an,{$borderColor:n.borderColor},a.createElement(le,{variant:"body1"},function(e){var t,n=e.displayName;return e.hasUnlimitedUsage?"Unlimited "+n:e.usageLimit?n+" x "+(null==(t=e.usageLimit)?void 0:t.toLocaleString()):n}(e)),a.createElement(le,{variant:"body1",color:"disabled"},e.endDate?p.utc(e.endDate).format("MMM Do, YYYY"):"None"))}))))}var ln,cn,sn,un,dn,pn,mn,gn,hn,fn,yn,vn,bn,xn,En,wn,kn=o(M,{target:"exlfw3j3"})({name:"jlwfj4",styles:".MuiTabs-indicator{background-color:#001e6c;}"}),Pn=o("div",{target:"exlfw3j2"})({name:"1dqkbz0",styles:"width:100%;flex:1;margin-top:16px"}),Cn=o(T,{target:"exlfw3j1"})("margin-top:16px;max-height:",(function(e){return e.$maxHeight}),";overflow-y:auto;"),Sn=function(e,t){switch(e){case"primary":return t.stigg.palette.text.primary;case"secondary":return t.stigg.palette.text.secondary;default:return e}};function Tn(){return(Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Bn(){return(Bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function An(){return(An=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Mn(){return(Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Un(){return(Un=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ln(){return(Ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Nn(){return(Nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Fn,Dn,In,On,jn,Rn,qn,Gn,_n,Wn,Hn,Vn,zn,$n,Zn,Yn,Qn,Kn,Xn,Jn,er,tr=function(e){return i.createElement("svg",Nn({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),wn||(wn=i.createElement("path",{d:"M10.833 2.5a7.5 7.5 0 0 0-7.5 7.5h-2.5l3.242 3.242.058.116L7.5 10H5a5.829 5.829 0 0 1 5.833-5.833A5.83 5.83 0 0 1 16.667 10a5.83 5.83 0 0 1-5.834 5.833 5.786 5.786 0 0 1-4.116-1.716L5.533 15.3a7.462 7.462 0 0 0 5.3 2.2 7.5 7.5 0 0 0 0-15ZM10 6.667v4.166l3.567 2.117.6-1.008-2.917-1.734V6.667H10Z",fill:"#6678A7"})))};function nr(){return(nr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function rr(){return(rr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ir(){return(ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ar(){return(ar=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function or(){return(or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function lr(){return(lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function cr(){return(cr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function sr(){return(sr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ur(){return(ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function dr(){return(dr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function pr(){return(pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var mr,gr,hr,fr={__proto__:null,Addons:function(e){return i.createElement("svg",Tn({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ln||(ln=i.createElement("g",{clipPath:"url(#addons_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M12 6.857v10.286M6.857 12h10.286M18 .857H6A5.143 5.143 0 0 0 .857 6v12A5.143 5.143 0 0 0 6 23.143h12A5.143 5.143 0 0 0 23.143 18V6A5.143 5.143 0 0 0 18 .857Z"}))),cn||(cn=i.createElement("defs",null,i.createElement("clipPath",{id:"addons_svg__a"},i.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))))},BillingInfoCustomer:function(e){return i.createElement("svg",Bn({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),sn||(sn=i.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),un||(un=i.createElement("path",{d:"M26 27v-2a4 4 0 0 0-4-4h-8a4 4 0 0 0-4 4v2",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),dn||(dn=i.createElement("path",{clipRule:"evenodd",d:"M18 17a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},ContactSupport:function(e){return i.createElement("svg",An({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),pn||(pn=i.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),mn||(mn=i.createElement("path",{d:"M27 18.22C27 12.73 22.74 9 18 9c-4.69 0-9 3.65-9 9.28-.6.34-1 .98-1 1.72v2c0 1.1.9 2 2 2h1v-6.1c0-3.87 3.13-7 7-7s7 3.13 7 7V25h-8v2h8c1.1 0 2-.9 2-2v-1.22c.59-.31 1-.92 1-1.64v-2.3c0-.7-.41-1.31-1-1.62Z",fill:"#7586B0"})),gn||(gn=i.createElement("path",{d:"M15 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM21 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:"#7586B0"})),hn||(hn=i.createElement("path",{d:"M24 17.03A6.04 6.04 0 0 0 18.05 12c-3.03 0-6.29 2.51-6.03 6.45a8.075 8.075 0 0 0 4.86-5.89c1.31 2.63 4 4.44 7.12 4.47Z",fill:"#7586B0"})))},CreditCard:function(e){return i.createElement("svg",Mn({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),fn||(fn=i.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),yn||(yn=i.createElement("path",{d:"M26 10H10c-1.11 0-1.99.89-1.99 2L8 24c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V12c0-1.11-.89-2-2-2Zm0 14H10v-6h16v6Zm0-10H10v-2h16v2Z",fill:"#7586B0"})))},DollarCoin:function(e){return i.createElement("svg",Un({width:21,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),vn||(vn=i.createElement("g",{clipPath:"url(#dollar-coin_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M10.334 19.286A9.286 9.286 0 1 0 1.048 10a9.286 9.286 0 0 0 9.286 9.286Z"}),i.createElement("path",{d:"M12.765 7.46a1.903 1.903 0 0 0-1.796-1.27H9.494a1.7 1.7 0 0 0-.363 3.362l2.245.49a1.905 1.905 0 0 1-.407 3.768h-1.27c-.83 0-1.535-.53-1.797-1.27M10.334 6.19V4.287M10.334 15.714V13.81"}))),bn||(bn=i.createElement("defs",null,i.createElement("clipPath",{id:"dollar-coin_svg__a"},i.createElement("path",{fill:"#fff",transform:"translate(.333)",d:"M0 0h20v20H0z"})))))},MiniSchedule:De,Promotions:function(e){return i.createElement("svg",Ln({width:24,height:25,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),xn||(xn=i.createElement("g",{clipPath:"url(#promotions_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M21.429 5.325H2.57c-.946 0-1.714.767-1.714 1.714v3.429c0 .947.768 1.714 1.714 1.714H21.43c.946 0 1.714-.768 1.714-1.714V7.039c0-.947-.768-1.714-1.714-1.714ZM21.429 12.182v9.429a1.714 1.714 0 0 1-1.715 1.714H4.286a1.714 1.714 0 0 1-1.714-1.714v-9.429M12 5.325v18M17.143 1.04 12 5.324 6.857 1.039"}))),En||(En=i.createElement("defs",null,i.createElement("clipPath",{id:"promotions_svg__a"},i.createElement("path",{fill:"#fff",transform:"translate(0 .182)",d:"M0 0h24v24H0z"})))))},Restore:tr,ScheduleBox:function(e){return i.createElement("svg",nr({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Fn||(Fn=i.createElement("rect",{width:36,height:36,rx:10,fill:"url(#schedule-box_svg__a)"})),Dn||(Dn=i.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),In||(In=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.954 7.7a1 1 0 0 1-.654 1.254 8.998 8.998 0 0 0-1.543 16.523A9 9 0 0 0 27 17.54a1 1 0 1 1 2 0c0 .357-.017.713-.052 1.066.018.089.024.182.017.278l-.004.047a.997.997 0 0 1-.101.361A11 11 0 1 1 14.7 7.046a1 1 0 0 1 1.254.654Zm1.896.252a1 1 0 0 1 1.08-.912l.048.004a1 1 0 1 1-.178 1.992l-.038-.003a1 1 0 0 1-.912-1.081ZM22.858 9.2a1 1 0 0 1 1.391-.254l.078.054a1 1 0 1 1-1.152 1.635 8.98 8.98 0 0 0-.063-.044 1 1 0 0 1-.254-1.391Zm3.748 3.609a1 1 0 0 1 1.332.473l.04.085a1 1 0 1 1-1.813.844l-.014-.031-.019-.039a1 1 0 0 1 .474-1.332ZM19 14a1 1 0 1 0-2 0v4a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-3Z",fill:"#7586B0"})),On||(On=i.createElement("defs",null,i.createElement("linearGradient",{id:"schedule-box_svg__a",x1:35.02,y1:1.224,x2:0,y2:36,gradientUnits:"userSpaceOnUse"}))))},ScheduleClock:function(e){return i.createElement("svg",rr({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),jn||(jn=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.954 1.7A1 1 0 0 1 9.3 2.954a8.998 8.998 0 0 0-5.615 12.03A9 9 0 0 0 21 11.54a1 1 0 1 1 2 0c0 .357-.017.713-.052 1.066.018.089.024.182.017.278l-.004.047a.997.997 0 0 1-.101.361A11 11 0 1 1 8.7 1.046a1 1 0 0 1 1.254.654Zm1.896.252a1 1 0 0 1 1.08-.912l.048.004a1 1 0 1 1-.178 1.992l-.039-.003a1 1 0 0 1-.911-1.081ZM16.858 3.2a1 1 0 0 1 1.391-.254l.078.054a1 1 0 1 1-1.152 1.635 9.7 9.7 0 0 0-.063-.044 1 1 0 0 1-.254-1.391Zm3.748 3.608a1 1 0 0 1 1.332.474l.04.085a1 1 0 1 1-1.813.844l-.014-.031-.019-.039a1 1 0 0 1 .474-1.333ZM13 8a1 1 0 1 0-2 0v4a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3V8Z",fill:"#7586B0"})))},RenewSubscription:function(e){return i.createElement("svg",ir({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Rn||(Rn=i.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),qn||(qn=i.createElement("path",{clipRule:"evenodd",d:"M9 12a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H11a2 2 0 0 1-2-2V12Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Gn||(Gn=i.createElement("path",{d:"M22 8v4M14 8v4M9 16h18",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},Trash:function(e){return i.createElement("svg",ar({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_n||(_n=i.createElement("path",{d:"M3 6h18",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Wn||(Wn=i.createElement("path",{d:"M20 6a1 1 0 1 0-2 0h2ZM6 6a1 1 0 0 0-2 0h2Zm1 0a1 1 0 0 0 2 0H7Zm8 0a1 1 0 1 0 2 0h-2Zm3 0v14h2V6h-2Zm0 14a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2Zm-1 1H7v2h10v-2ZM7 21a1 1 0 0 1-1-1H4a3 3 0 0 0 3 3v-2Zm-1-1V6H4v14h2ZM9 6V4H7v2h2Zm0-2a1 1 0 0 1 1-1V1a3 3 0 0 0-3 3h2Zm1-1h4V1h-4v2Zm4 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2Zm1 1v2h2V4h-2Z",fill:"#F88078"})),Hn||(Hn=i.createElement("path",{d:"M10 11v6M14 11v6",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},PaymentMethod:function(e){return i.createElement("svg",or({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Vn||(Vn=i.createElement("path",{d:"M21.167 4H2.833C1.821 4 1 4.895 1 6v12c0 1.105.82 2 1.833 2h18.334C22.179 20 23 19.105 23 18V6c0-1.105-.82-2-1.833-2Z",fill:"#C6C6C7"})),zn||(zn=i.createElement("path",{opacity:.3,d:"M19.75 16.429H17.5c-.488 0-.75-.229-.75-.762 0-.534.262-.762.75-.762h2.25c.488 0 .75.228.75.762 0 .533-.262.762-.75.762Zm-4.5 0H13c-.488 0-.75-.229-.75-.762 0-.534.262-.762.75-.762h2.25c.488 0 .75.228.75.762 0 .533-.262.762-.75.762Zm-4.5 0H8.5c-.488 0-.75-.229-.75-.762 0-.534.262-.762.75-.762h2.25c.488 0 .75.228.75.762 0 .533-.262.762-.75.762Zm-4.5 0H4c-.487 0-.75-.229-.75-.762 0-.534.263-.762.75-.762h2.25c.487 0 .75.228.75.762 0 .533-.263.762-.75.762Z",fill:"#000"})))},OutlinedCircle:function(e){return i.createElement("svg",lr({width:21,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),$n||($n=i.createElement("circle",{cx:10.333,cy:10,r:9,fill:"#fff",stroke:"#327EEE",strokeWidth:2})))},OutlinedCheckedCircle:function(e){return i.createElement("svg",cr({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Zn||(Zn=i.createElement("circle",{cx:10,cy:10,r:9.25,fill:"#327EEE",stroke:"#327EEE",strokeWidth:1.5})),Yn||(Yn=i.createElement("path",{d:"M5 10.364 8.637 14l4-4 2-2",stroke:"#fff",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},OutlinedCheckedCircleDisabled:function(e){return i.createElement("svg",sr({width:21,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Qn||(Qn=i.createElement("circle",{cx:10.667,cy:10,r:9.25,fill:"#B3BCD3",stroke:"#B3BCD3",strokeWidth:1.5})),Kn||(Kn=i.createElement("path",{d:"M5.667 10.364 9.304 14l4-4 2-2",stroke:"#fff",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},ArrowForward:function(e){return i.createElement("svg",ur({width:18,height:18,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Xn||(Xn=i.createElement("path",{d:"M9 3 7.942 4.058l4.185 4.192H3v1.5h9.127l-4.185 4.193L9 15l6-6-6-6Z",fill:"#fff"})))},Close:function(e){return i.createElement("svg",dr({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Jn||(Jn=i.createElement("path",{d:"m15.834 5.342-1.175-1.175L10 8.825 5.342 4.167 4.167 5.342 8.825 10 4.167 14.66l1.175 1.175L10 11.175l4.659 4.659 1.175-1.175L11.175 10l4.659-4.658Z",fill:"#327EEE"})))},Check:function(e){return i.createElement("svg",pr({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),er||(er=i.createElement("path",{d:"M20 7 9 18l-5-5",stroke:"#F5F6F9",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))}},yr=o("div",{target:"e1ds7xyn0"})((function(e){var t=e.$pathColor;return t&&c.css(mr||(mr=Q(["\n path {\n fill: ",";\n }\n "])),t)})," ",(function(e){var t=e.$rectColor;return t&&c.css(gr||(gr=Q(["\n svg rect {\n fill: ",";\n }\n "])),t)})," ",(function(e){var t=e.$strokeColor;return t&&c.css(hr||(hr=Q(["\n g {\n stroke: ",";\n }\n "])),t)}),";");function vr(e){var t=e.className,n=e.style,r=e.svgPathColor,i=e.svgRectColor,o=e.svgStrokeColor,l=fr[e.icon],s=c.useTheme();return a.createElement(yr,{className:t,style:n,$pathColor:Sn(r,s),$rectColor:Sn(i,s),$strokeColor:Sn(o,s)},a.createElement(l,null))}var br=["children","value","index","maxHeight"];function xr(e){var t=e.children,n=e.value,r=e.index,i=e.maxHeight,o=Y(e,br);return a.createElement("div",Object.assign({role:"tabpanel",hidden:n!==r},o),n===r&&a.createElement(Cn,{$maxHeight:i},t))}function Er(e){var t=e.isSelected,n=e.label,r=t?"primary":"secondary";return a.createElement("div",{style:{display:"flex",gap:8,alignItems:"center"}},a.createElement(vr,{icon:e.icon,svgStrokeColor:r}),a.createElement(le,{variant:"h6",bold:t,fontWeight:l.FontWeight.Medium,color:r},n))}function wr(e){var t=e.customerPortal,n=e.hiddenSections,r=e.textOverrides,o=e.theme,l=function(e){return null==n?void 0:n.some((function(t){return t===e}))},c=S(t.subscriptions,(function(e){return e.addons})).length>0&&!l("addons"),s=t.promotionalEntitlements.length>0&&!l("promotionalEntitlements"),u=i.useState(c?1:2),d=u[0],p=u[1];return c||s?a.createElement(Pn,null,a.createElement(T,{sx:{borderBottom:1,borderColor:"divider"}},a.createElement(kn,{value:d,onChange:function(e,t){p(t)}},c?a.createElement(B,{sx:{textTransform:"none"},value:1,label:a.createElement(Er,{isSelected:1===d,label:r.addonsTabTitle,icon:"Addons"})}):null,s?a.createElement(B,{sx:{textTransform:"none"},value:2,label:a.createElement(Er,{isSelected:2===d,label:r.promotionsTabTitle,icon:"Promotions"})}):null)),a.createElement(xr,{value:d,index:1,maxHeight:o.tabMaxHeight},a.createElement(rn,null)),a.createElement(xr,{value:d,index:2,maxHeight:o.tabMaxHeight},a.createElement(on,null))):null}var kr=o("div",{target:"ejq3grd1"})({name:"1eoy87d",styles:"display:flex;justify-content:space-between"}),Pr=o("div",{target:"ejq3grd0"})({name:"43cxha",styles:"display:flex;flex-direction:column;gap:32px"});function Cr(){return a.createElement(kr,{className:"stigg-subscription-overview-skeleton-layout"},a.createElement(Pr,null,a.createElement(x,{width:120}),a.createElement(x,{width:120})),a.createElement(x,{width:295,height:193}))}function Sr(e){var t=e.scheduleUpdate.targetPackage;return a.createElement(f.Grid,{container:!0,alignItems:"center"},a.createElement(f.Grid,null,a.createElement(U.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})),a.createElement(f.Grid,{item:!0},a.createElement(le,{className:"stigg-scheduled-updates-description",variant:"body1"},"Downgrade to the ",a.createElement("b",null,null==t?void 0:t.displayName)," plan")))}function Tr(e){var t=e.scheduleUpdate.scheduleVariables.billingPeriod,r=t===n.BillingPeriod.Monthly?"annually":"monthly",i=t===n.BillingPeriod.Monthly?"monthly":"annually";return a.createElement(f.Grid,{container:!0,alignItems:"center"},a.createElement(f.Grid,null,a.createElement(U.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})),a.createElement(f.Grid,{item:!0},a.createElement(le,{className:"stigg-scheduled-updates-description",variant:"body1"},"Change from an ",r," to a ",a.createElement("b",null,i)," billing cycle")))}function Br(e){var t=e.scheduleUpdate.scheduleVariables,n=t.newUnitAmount,r=t.featureId,i=g.compact(g.map(e.subscription.prices,"feature")).find((function(e){return e.id===r}));if(!i)return null;var o=i.featureUnits,l=1===n?o:i.featureUnitsPlural;return a.createElement(f.Grid,{container:!0,alignItems:"flex-start",flexWrap:"nowrap"},a.createElement(f.Grid,null,a.createElement(U.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})),a.createElement(f.Grid,{item:!0},a.createElement(le,{className:"stigg-scheduled-updates-description",variant:"body1"},"Reduce the ",a.createElement("b",null,o)," quantity to ",n," ",l)))}function Ar(e){var t=e.scheduleUpdate,r=e.subscription;switch(t.subscriptionScheduleType){case n.SubscriptionScheduleType.Downgrade:return a.createElement(Sr,{scheduleUpdate:t});case n.SubscriptionScheduleType.BillingPeriod:return a.createElement(Tr,{scheduleUpdate:t});case n.SubscriptionScheduleType.UnitAmount:return a.createElement(Br,{scheduleUpdate:t,subscription:r});default:return null}}var Mr=o(f.Box,{target:"eju957a2"})("border-bottom:",(function(e){return"1px solid "+e.$borderColor}),";border-top-left-radius:10px;border-top-right-radius:10px;margin:-64px -64px 64px -64px;padding:24px 32px;"),Ur=o(d,{target:"eju957a1"})({name:"158icaa",styles:"margin-left:4px"}),Lr=o(tr,{target:"eju957a0"})("color:",(function(e){return e.theme.stigg.palette.primary}),";path{fill:",(function(e){return e.theme.stigg.palette.primary}),";}");function Nr(e){var t=e.subscription,n=t.scheduledUpdates;return a.createElement(a.Fragment,null,a.createElement(f.Grid,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1},a.createElement(f.Grid,null,a.createElement(le,{className:"stigg-scheduled-updates-description",variant:"body1"},"The following updates will take effect in the next billing cycle:"))),a.createElement(f.Grid,null,(n||[]).map((function(e){return a.createElement(Ar,{key:e.subscriptionScheduleType,scheduleUpdate:e,subscription:t})}))))}function Fr(e){var t=e.subscription,n=xe({scheduledUpdate:(t.scheduledUpdates||[])[0],subscriptionPrices:t.prices,billingPeriodRange:t.billingPeriodRange,options:{postfix:"at the end of the current billing period"}}),r=n.line2;return a.createElement(a.Fragment,null,a.createElement(f.Grid,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1},a.createElement(f.Grid,null,a.createElement(le,{className:"stigg-scheduled-updates-title",variant:"body1",color:"primary"},n.line1))),r&&a.createElement(f.Grid,null,a.createElement(le,{className:"stigg-scheduled-updates-subtitle",variant:"body1",color:"secondary"},r)))}function Dr(e){var t=e.subscription,n=e.onCancelScheduledUpdates,r=e.theme,o=e.cancelScheduledUpdatesButtonTitle,l=c.useTheme(),s=i.useState(!1),u=s[0],d=s[1],p=t.scheduledUpdates;if(!p||0===p.length)return null;var m=1===p.length;return a.createElement(Mr,{$borderColor:r.borderColor,className:"stigg-scheduled-updates-alert-container"},a.createElement(f.Grid,{container:!0,alignItems:m?"center":"flex-start",gap:2},a.createElement(f.Grid,{item:!0,display:"flex"},a.createElement(vr,{icon:"ScheduleBox",svgPathColor:r.iconsColor,svgRectColor:r.iconsBackgroundColor})),a.createElement(f.Grid,{item:!0,flex:1},a.createElement(m?Fr:Nr,{subscription:t})),!!n&&a.createElement(f.Grid,{item:!0},a.createElement(Qt,{variant:"outlined",onClick:function(){d(!0),Promise.resolve(n(t)).finally((function(){return d(!1)}))}},u?a.createElement(Ur,{loading:!0,size:16,color:l.stigg.palette.text.disabled}):a.createElement(Lr,{style:{display:"flex",marginRight:4},className:"stigg-scheduled-updates-cancel-update-button-icon"}),a.createElement(le,{variant:"body1",color:"primary.main",className:"stigg-scheduled-updates-cancel-update-button"},o)))))}var Ir=o("div",{target:"e1kw2z1l0"})("width:100%;display:flex;flex-direction:column;border-radius:10px;background-color:",(function(e){return e.$backgroundColor}),";border:",(function(e){return"1px solid "+e.$borderColor}),";padding:64px;");function Or(e){var t=e.billingPeriod,r=e.rangeEnd,i=e.amount,o=e.currency;return a.createElement(a.Fragment,null,a.createElement(le,{variant:"h6"},"Next estimated bill"),a.createElement(le,{variant:"h1"},Ie({amount:i,currency:o,maximumFractionDigits:2})),a.createElement(le,{variant:"body1",color:"secondary"},"Billed ",t===n.BillingPeriod.Monthly?"monthly":"annually"," on"," ",a.createElement(le,{variant:"body1",span:!0,color:"primary"},p.utc(r).format("MMM Do, YYYY"))),a.createElement(le,{variant:"body1",color:"secondary"},"* Additional tax rates may apply"))}function jr(e){var t=e.description;return a.createElement(a.Fragment,null,a.createElement(le,{variant:"h6",color:"secondary"},"No upcoming bill"),a.createElement(le,{variant:"body1",color:"secondary"},t))}var Rr=o("div",{target:"e1ftdtst1"})({name:"1nocm2b",styles:"display:flex;flex-direction:column;align-items:left;gap:8px"}),qr=o(C,{target:"e1ftdtst0"})({name:"1l28f5r",styles:"width:fit-content;&.MuiButton-root{padding:0;&:hover{background:none;}}"});function Gr(e){var t=e.onContactSupport,n=e.label,r=a.createElement(le,{color:t?"primary.main":"secondary"},e.linkLabel);return a.createElement(Rr,{className:"stigg-contact-support-layout"},a.createElement(le,{className:"stigg-contact-support-label",color:"secondary"},n),t?a.createElement(qr,{className:"stigg-contact-support-button",style:{textTransform:"none"},variant:"text",onClick:t},r):r)}var _r,Wr,Hr=o("div",{target:"e1u4onrr0"})("max-height:278px;display:flex;flex-direction:column;border-radius:10px;background-color:",(function(e){return e.theme.stigg.palette.backgroundSection}),";border:",(function(e){return"1px solid "+e.$borderColor}),";padding:32px;gap:16px;");function Vr(e){var t,r,i,o,l=e.subscription,c=e.theme,s=e.textOverrides,u=e.onContactSupport,d=l.pricingType,p=null==(t=null==(r=l.prices)?void 0:r.every((function(e){return e.billingModel!==n.BillingModel.UsageBased})))||t,m=null==(i=l.scheduledUpdates)?void 0:i.find((function(e){var t=e.targetPackage;return e.subscriptionScheduleType===n.SubscriptionScheduleType.Downgrade&&(null==t?void 0:t.pricingType)===n.PricingType.Free}));if(d===n.PricingType.Free)o=a.createElement(jr,{description:"You're on a free plan, so you don’t have any upcoming charges"});else if(d===n.PricingType.Paid)if(m&&p)o=a.createElement(jr,{description:"Your plan will be downgraded to a free plan, so you don’t have any upcoming charges"});else if(l.status===n.SubscriptionStatus.InTrial)o=a.createElement(jr,{description:"You’re on a free trial of the "+l.planName+" plan, so you don’t have any upcoming charges"});else{var g,h,f,y,v=null==(g=l.prices)||null==(h=g[0])?void 0:h.billingPeriod,b=null==(f=l.billingPeriodRange)?void 0:f.end,x=null==(y=l.totalPrice)?void 0:y.total;v&&b&&x&&(o=a.createElement(Or,{billingPeriod:v,rangeEnd:b,amount:x.amount,currency:x.currency}))}else d===n.PricingType.Custom&&(o=a.createElement(Gr,{onContactSupport:u,label:s.contactSupportTitle,linkLabel:s.contactSupportLink}));return a.createElement(Hr,{className:"stigg-subscription-total-price-layout",$borderColor:c.borderColor},o)}function zr(){return(zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var $r,Zr,Yr,Qr=function(e){return i.createElement("svg",zr({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_r||(_r=i.createElement("path",{d:"M12.947 13.6h-1.013l.001-2.824a.522.522 0 0 0-.18-.392L8.622 7.918l3.134-2.465a.497.497 0 0 0 .18-.392V2.4h1.012c.278 0 .49-.212.49-.49a.481.481 0 0 0-.49-.49H3.053a.481.481 0 0 0-.49.49c0 .278.213.49.49.49h1.013l-.001 2.661c0 .147.065.294.18.392l3.117 2.465-3.117 2.466a.497.497 0 0 0-.18.392V13.6H3.054a.481.481 0 0 0-.49.49c0 .277.213.49.49.49h9.894c.277 0 .49-.213.49-.49a.481.481 0 0 0-.49-.49ZM5.045 2.4h5.91v2.416L8 7.167l-2.955-2.35V2.4Zm0 8.62L8 8.67l2.955 2.334v2.58h-5.91V11.02Z",fill:"#fff"})),Wr||(Wr=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.053 1.254h9.894c.37 0 .657.287.657.656 0 .37-.287.657-.657.657h-.845L12.1 5.06c0 .214-.088.39-.238.519l-.005.004L8.89 7.918l2.974 2.34c.152.13.238.323.238.518l-.001 2.657h.846c.37 0 .657.287.657.657 0 .37-.288.657-.657.657H3.053a.648.648 0 0 1-.657-.657c0-.37.287-.657.657-.657h.846v-2.657c0-.214.087-.39.237-.519l.005-.004 2.953-2.335L4.136 5.58a.688.688 0 0 1-.238-.519V2.567h-.845a.648.648 0 0 1-.657-.656c0-.37.287-.657.657-.657Zm9.894.333H3.053a.315.315 0 0 0-.323.324c0 .185.138.323.323.323h1.18l-.001 2.827c0 .099.043.198.119.264l3.28 2.593-3.28 2.594a.33.33 0 0 0-.119.264v2.99H3.053a.315.315 0 0 0-.323.324c0 .185.138.323.323.323h9.894a.315.315 0 0 0 .323-.323.315.315 0 0 0-.323-.323h-1.18l.001-2.991a.355.355 0 0 0-.119-.264L8.351 7.918l3.298-2.593a.33.33 0 0 0 .119-.264V2.233h1.18a.315.315 0 0 0 .323-.323.315.315 0 0 0-.324-.323Zm-8.069.646h6.244v2.664L8 7.38 4.878 4.897V2.233Zm.334.334v2.169L8 6.955l2.788-2.22V2.568H5.212ZM8 8.457l3.122 2.467v2.827H4.878v-2.81L8 8.456Zm0 .425-2.788 2.219v2.316h5.576v-2.332L8 8.882Z",fill:"#fff"})))},Kr=["children","className","placement"],Xr=o((function(e){var t=e.children,n=e.className,r=e.placement,i=void 0===r?"top":r,o=Y(e,Kr);return a.createElement(f.Tooltip,Object.assign({arrow:!0,placement:i},o,{classes:{popper:n,tooltip:"stigg-tooltip",arrow:"stigg-tooltip-arrow"}}),a.createElement("div",null,t))}),{target:"enddsuj0"})((function(e){var t,n=e.theme,r=e.$padding,i=e.$maxWidth;return(t={})["& ."+f.tooltipClasses.tooltip]={backgroundColor:n.stigg.palette.white,maxWidth:void 0===i?300:i,boxShadow:n.stigg.shadows.popover,padding:void 0===r?8:r,borderRadius:n.stigg.border.radius,color:n.stigg.palette.text.primary},t["& ."+f.tooltipClasses.arrow]={color:n.stigg.palette.white},t}),""),Jr=k(le)($r||($r=Q(["\n display: ",";\n -webkit-line-clamp: ",";\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: normal;\n ","\n\n ","\n"])),(function(e){return e.$display}),(function(e){return e.$maxLines}),(function(e){return e.$wordBreak&&w.css(Zr||(Zr=Q(["\n word-break: break-word;\n "])))}),(function(e){return e.$bold&&w.css(Yr||(Yr=Q(["\n font-weight: bold;\n "])))}));function ei(e){return e&&(e.clientHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)}var ti=function(e){var t=e.leaveDelay,n=e.children,r=e.variant,o=e.color,l=e.maxLines,c=void 0===l?1:l,s=e.wordBreak,u=e.bold,d=e.tooltipPlacement,p=void 0===d?"top":d,m=e.className,g=e.display,h=void 0===g?"-webkit-box":g,f=e.style,y=e["data-testid"],v=i.useState(!1),b=v[0],x=v[1],E=i.useRef(null),w=a.createElement(Jr,{ref:E,variant:r,color:o,$maxLines:c,$wordBreak:s,$bold:u,className:m,$display:h,style:f,"data-testid":y},n);i.useEffect((function(){if(null!=E&&E.current){var e=ei(E.current);x(e)}}),[E]);var k=(null==E?void 0:E.current)&&ei(E.current);return a.createElement("span",null,b||k?a.createElement(Xr,{placement:p,leaveDelay:t,title:a.createElement(le,{variant:"body1"},n)},w):w)},ni=o("div",{target:"el5iwyw1"})("width:100%;display:flex;align-items:center;gap:4px;background-color:",(function(e){return e.theme.stigg.palette.warning}),";border-radius:10px;padding:8px 16px;margin-top:16px;"),ri=o(f.Link,{target:"el5iwyw0"})({name:"69ka7t",styles:"text-decoration-color:white;color:white;cursor:pointer"});function ii(e){var t=e.subscription,r=e.includePlanName,i=e.onManageSubscription;return(null==t?void 0:t.status)!==n.SubscriptionStatus.InTrial?null:a.createElement(ni,{className:"stigg-subscription-trial-badge"},a.createElement(Qr,{className:"stigg-subscription-trial-badge-image"}),a.createElement("div",{style:{flex:1,marginRight:4}},a.createElement(ti,{variant:"body1",className:"stigg-subscription-trial-badge-text",color:"white"},t.trialRemainingDays+" days remaining in trial",r&&" of the "+t.planName+" plan")),a.createElement(ri,{className:"stigg-subscription-trial-upgrade-button",onClick:i},a.createElement(le,{color:"white"},"Upgrade plan")))}function ai(e){var t=e.mainSubscription,n=e.trialSubscription,r=e.onManageSubscription;return a.createElement("div",{className:"stigg-subscription-view-layout"},a.createElement(le,{className:"stigg-subscription-plan-name",variant:"h1",overrideColor:e.theme.planNameColor,style:{marginTop:8}},t.planName," plan"),a.createElement(ii,{subscription:n,includePlanName:(null==n?void 0:n.planName)!==t.planName,onManageSubscription:r}))}function oi(e,t){return Math.min(Math.floor(e/t*100),100)}var li,ci=o(L,{target:"e1cbsoof1"})("height:4px;background-color:",(function(e){return s(e.theme.stigg.palette.primary).alpha(.4).string()}),";span{background-color:",(function(e){var t=e.theme;switch(e.$progressStatus){case"standard":return t.stigg.palette.primary;case"warning":return t.stigg.palette.warning;case"error":return t.stigg.palette.error;default:return t.stigg.palette.primary}}),";}"),si=o(f.Divider,{target:"e1cbsoof0"})("border-style:dotted;border-bottom-width:2px;border-color:",(function(e){return s(e.theme.stigg.palette.outlinedRestingBorder).alpha(.4).string()}),";");function ui(e){var t=e.entitlement;if(t.hasUnlimitedUsage)return a.createElement(si,null);var n,r=oi(t.currentUsage||0,t.usageLimit),i=(n=r)<70?"standard":n<100?"warning":"error";return a.createElement(ci,{$progressStatus:i,className:"stigg-feature-usage-progress-bar-"+i.toString(),variant:"determinate",value:r})}var di=k(C)(li||(li=Q(["\n text-transform: none;\n padding: 0;\n white-space: nowrap;\n"])));function pi(e){var t=e.entitlement,n=e.feature,r=e.onManageSubscription,i=e.onBuyMore,o=e.canBuyMore,l=e.canUpgradeSubscription;return e.hasCustomSubscription||t.hasUnlimitedUsage||oi(t.currentUsage||0,t.usageLimit)<70?null:o?i?a.createElement(di,{variant:"text",onClick:function(){return i(n,t)}},a.createElement(le,{color:"primary.main"},"Buy more")):null:l&&r?a.createElement(di,{variant:"text",onClick:r},a.createElement(le,{color:"primary.main"},"Upgrade")):null}function mi(e){var t,n,r,i=e.amount,o=e.currency,l=e.entitlement,c=e.feature,s=e.hideChargePrice,u=e.onBuyMore,d=e.onManageSubscription,p=e.canUpgradeSubscription,m=e.hasCustomSubscription;return a.createElement("div",{className:"stigg-charge-list-item",style:{display:"flex",flexDirection:"column",gap:12}},a.createElement("div",{style:{display:"flex",justifyContent:"space-between",gap:12}},a.createElement("div",{style:{display:"flex",gap:12}},a.createElement(ti,{variant:"body1",color:"primary"},c.displayName),!s&&a.createElement(ti,{variant:"body1",color:"secondary"},Ie({amount:i,currency:o})," per ",c.featureUnits)),a.createElement("div",{style:{display:"flex",gap:12}},a.createElement(pi,{entitlement:l,feature:c,canBuyMore:!0,onBuyMore:u,onManageSubscription:d,canUpgradeSubscription:p,hasCustomSubscription:m}),a.createElement(le,{variant:"body1",color:"primary",style:{whiteSpace:"nowrap"}},l.hasUnlimitedUsage?null==(t=l.currentUsage)?void 0:t.toLocaleString():(null==(n=l.currentUsage)?void 0:n.toLocaleString())+" of "+(null==(r=l.usageLimit)?void 0:r.toLocaleString())))),a.createElement(ui,{entitlement:l}))}function gi(e){var t=e.subscription,r=e.onBuyMore,i=e.onManageSubscription,o=e.hasCustomSubscription,l=e.canUpgradeSubscription,c=g.keyBy(e.entitlements,"feature.refId"),s=t.prices.filter((function(e){var t=e.feature;return!!t&&c[t.refId]&&!!e.price}));return s.length?a.createElement("div",{className:"stigg-charge-list",style:{display:"flex",flexDirection:"column",gap:16,marginTop:32}},s.map((function(e){var t=e.feature,s=e.price;if(!t||!s)return null;var u=c[t.refId];return u&&u.feature?a.createElement(mi,{key:t.refId,entitlement:u,feature:u.feature,amount:s.amount,currency:s.currency,hideChargePrice:e.billingModel===n.BillingModel.PerUnit,onBuyMore:r,onManageSubscription:i,canUpgradeSubscription:l,hasCustomSubscription:o}):null}))):null}function hi(e){var t=e.onManageSubscription,r=e.onBuyMore,i=e.onCancelScheduledUpdates,o=e.onContactSupport,l=e.hiddenSections,c=e.cancelScheduledUpdatesButtonTitle,s=$t(),u=s.customerPortal,d=s.textOverrides,p=s.theme,m=s.isLoading||!u,g=u||{},h=g.subscriptions,f=g.entitlements,y=g.canUpgradeSubscription,v=null==h?void 0:h.find((function(e){return e.status===n.SubscriptionStatus.Active})),b=null==h?void 0:h.find((function(e){return e.status===n.SubscriptionStatus.InTrial})),x=(null==v?void 0:v.pricingType)===n.PricingType.Custom,E=v||b;return a.createElement(Ir,{className:"stigg-customer-portal-subscriptions-overview",$backgroundColor:p.backgroundColor,$borderColor:p.borderColor},!m&&v&&v.scheduledUpdates&&a.createElement(Dr,{theme:p,subscription:v,onCancelScheduledUpdates:i,cancelScheduledUpdatesButtonTitle:c}),m||!E?a.createElement(Cr,null):a.createElement("div",{className:"stigg-overview-layout",style:{display:"flex",alignItems:"flex-start",gap:64}},a.createElement("div",{style:{display:"flex",flexDirection:"column",flex:1}},a.createElement(nn,{onManageSubscription:t,hideManageButton:x,textOverrides:d}),a.createElement(ai,{mainSubscription:E,trialSubscription:b,theme:p,onManageSubscription:t}),v&&f&&a.createElement(gi,{subscription:v,entitlements:f,onBuyMore:r,onManageSubscription:t,canUpgradeSubscription:!!y,hasCustomSubscription:x}),a.createElement(wr,{customerPortal:u,hiddenSections:l,textOverrides:d,theme:p})),a.createElement("div",{style:{display:"flex",flexDirection:"column",width:319,gap:24}},a.createElement(Vr,{subscription:E,theme:p,onContactSupport:o,textOverrides:d}))))}var fi=o("div",{target:"e2lw8x70"})({name:"7wpci2",styles:"display:flex;width:100%;align-items:flex-end;justify-content:flex-end;margin-bottom:24px"});function yi(e){return a.createElement(fi,{className:"stigg-customer-portal-header-layout"},a.createElement(mt,{source:"customer_portal",showWatermark:e.showWatermark}))}var vi=o(le,{target:"eb0pe7a1"})({name:"kxbue8",styles:"text-transform:none"}),bi=o(U.ExternalLink,{target:"eb0pe7a0"})("color:",(function(e){return e.theme.stigg.palette.primary}),";");function xi(e){var t=e.text,n=e.url;return a.createElement(Qt,{className:e.className,variant:"outlined",startIcon:a.createElement(bi,{size:20,strokeWidth:2.5}),onClick:function(){window.open(n,"_blank")}},a.createElement(vi,{color:"primary.main"},t))}var Ei,wi=o("div",{target:"e12mjvl51"})({name:"1hidw77",styles:"display:flex;flex-direction:column;align-items:flex-start;gap:16px;flex:1 0 0"}),ki=o("div",{target:"e12mjvl50"})({name:"j9hhqa",styles:"display:flex;align-items:flex-start;gap:16px;align-self:stretch"});function Pi(e){var t=e.rows;return a.createElement(wi,null,a.createElement(le,{variant:"h6",color:"secondary",fontWeight:l.FontWeight.Medium},e.title),t.map((function(e){var t=e.classNamePrefix,n=e.label,r=e.value,i=e.valueTypographyProps;return a.createElement(ki,{key:n},a.createElement(le,Object.assign({className:t+"-label",variant:"body1",color:"secondary",style:{width:80}},e.labelTypographyProps),n),a.createElement(le,Object.assign({className:t+"-text",variant:"body1",color:"secondary"},i),r))})))}function Ci(){return a.createElement(x,{width:220,height:42})}function Si(){var e=$t(),t=e.customerPortal,n=e.textOverrides,r=e.theme,i=(t||{}).billingInformation,o=!i||e.isLoading,l=[];if(o?l.push.apply(l,[a.createElement(wi,null,a.createElement(x,{width:220,height:12}),a.createElement(x,{width:220,height:12}),a.createElement(x,{width:220,height:12})),a.createElement(f.Divider,{orientation:"vertical",style:{minHeight:93}}),a.createElement(wi,null,a.createElement(x,{width:220,height:12}),a.createElement(x,{width:220,height:12}),a.createElement(x,{width:220,height:12}))]):(l.push(a.createElement(Pi,{title:"Billed to",rows:[{classNamePrefix:"stigg-customer-name",label:"Name",value:(null==i?void 0:i.name)||"-",valueTypographyProps:null!=i&&i.name?{}:{color:"disabled"}},{classNamePrefix:"stigg-customer-email",label:"Email",value:(null==i?void 0:i.email)||"-",valueTypographyProps:null!=i&&i.email?{}:{color:"disabled"}}]})),null!=i&&i.defaultPaymentMethodId&&i.defaultPaymentMethodLast4Digits&&i.defaultPaymentExpirationMonth&&i.defaultPaymentExpirationYear&&(l.unshift(a.createElement(f.Divider,{orientation:"vertical",style:{minHeight:93}})),l.unshift(a.createElement(Pi,{title:"Payment method",rows:[{classNamePrefix:"stigg-credit-card",label:"Card",value:"Ending in "+i.defaultPaymentMethodLast4Digits},{classNamePrefix:"stigg-credit-card-expiration",label:"Expires",value:g.padStart(i.defaultPaymentExpirationMonth.toString(),2,"0")+"/"+i.defaultPaymentExpirationYear}]})))),!(o||null!=i&&i.name||null!=i&&i.email||null!=i&&i.defaultPaymentMethodId))return null;var c=o?a.createElement(Ci,null):null!=t&&t.billingPortalUrl?a.createElement(xi,{url:t.billingPortalUrl,text:n.editPaymentDetails,className:"stigg-edit-payment-details-button"}):null;return a.createElement(Ir,{className:"stigg-payment-details-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor},a.createElement(Jt,{className:"stigg-payment-details-section-header"},a.createElement(en,{isLoading:o,className:"stigg-payment-details-section-title",title:"Payment details"}),c),a.createElement("div",{style:{display:"flex",alignItems:"stretch",gap:64}},l))}var Ti=o(Ir,{target:"eqpkdww0"})("position:relative;.stigg-paywall-layout{width:100%;}.stigg-paywall-plans-layout{flex-wrap:nowrap;width:100%;overflow-x:auto;justify-content:unset;padding:0;}.stigg-paywall-plans-layout .stigg-plan-offering-container:first-of-type{margin-left:auto;}.stigg-paywall-plans-layout .stigg-plan-offering-container:last-child{margin-right:auto;}",(function(e){return e.$hideButtons&&c.css(Ei||(Ei=Q(["\n .stigg-paywall-plan-button:not([disabled]) {\n display: none;\n }\n "])))})," .","stigg-watermark","{display:none;}"),Bi=a.forwardRef((function(e,t){var n=e.paywallComponent,r=e.theme;return n?a.createElement(Ti,{className:"stigg-customer-portal-paywall-section",ref:t,$hideButtons:e.hidePaywallButtons,$backgroundColor:r.backgroundColor,$borderColor:r.borderColor},a.createElement(Jt,{className:"stigg-customer-portal-paywall-header"},a.createElement(en,{isLoading:e.isLoading,className:"stigg-customer-portal-paywall-section-title",title:e.title})),n):null})),Ai=o("div",{target:"e1gjjeod1"})({name:"6xtw2",styles:"width:100%;display:flex;flex-direction:column;align-items:center;& *{box-sizing:border-box;}"}),Mi=o("div",{target:"e1gjjeod0"})({name:"1c31jfu",styles:"width:100%;display:flex;flex-direction:column;align-items:center;row-gap:24px"}),Ui=o("div",{target:"eqqveb80"})("display:flex;flex-direction:column;padding:24px;border:",(function(e){return"1px solid "+e.$borderColor}),";border-radius:10px;row-gap:16px;height:100%;",(function(e){return e.$highlight&&"background-color: "+e.theme.stigg.palette.backgroundSection}),";");function Li(e){var t,r,i,o,l,c=e.entitlement,s=e.subscriptionPrice,u=e.onManageSubscription,d=e.onBuyMore,m=e.hasCustomSubscription,g=e.canUpgradeSubscription,h=$t().theme,f=!c.hasUnlimitedUsage&&c.currentUsage>c.usageLimit;return c.feature?a.createElement(Ui,{$highlight:!!s,$borderColor:h.borderColor},a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16}},a.createElement(ti,{variant:"body1"},c.feature&&((l=F((o=c.feature).displayName))===F(o.featureUnits||"")||l===F(o.featureUnitsPlural||"")?o.displayName:o.displayName+" ("+o.featureUnitsPlural+")")),s&&a.createElement(Xr,{title:a.createElement(le,{variant:"body1"},s.billingModel===n.BillingModel.PerUnit?"Billed for committed usage":"Billed for actual usage")},a.createElement(vr,{icon:"DollarCoin",svgStrokeColor:h.iconsColor}))),a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8}},a.createElement(ti,{variant:"body1",color:f?"error":"primary","data-testid":"usage-data-"+(null==(t=c.feature)?void 0:t.refId)},null==(r=c.currentUsage)?void 0:r.toLocaleString(),!c.hasUnlimitedUsage&&" / "+(null==(i=c.usageLimit)?void 0:i.toLocaleString())+" ("+oi(c.currentUsage||0,c.usageLimit)+"%)"),a.createElement(pi,{entitlement:c,feature:c.feature,onBuyMore:d,canBuyMore:!!s,onManageSubscription:u,canUpgradeSubscription:g,hasCustomSubscription:m})),a.createElement(ui,{entitlement:c}),c.hasUnlimitedUsage||N(c.usageLimit)||N(c.currentUsage)||!c.resetPeriod||!c.nextResetDate?null:a.createElement(le,{color:"secondary"},function(e){if(!e.resetPeriod||!e.nextResetDate)return null;var t=function(t){return p.utc(e.nextResetDate).diff(p.utc(),t)};switch(e.resetPeriod){case"MONTH":return"Resets monthly - in "+t("days")+" days";case"WEEK":return"Resets weekly - in "+t("days")+" days";case"DAY":return"Resets daily - in "+t("hours")+" hours";case"HOUR":return"Resets hourly - in "+t("minutes")+" minutes";default:return null}}(c)),c.hasUnlimitedUsage&&a.createElement(le,{color:"secondary"},"In current billing period")):null}var Ni=o("div",{target:"eoaojje0"})({name:"3hgi0y",styles:"margin-top:32px"});function Fi(){return a.createElement(f.Grid,{container:!0,spacing:4,className:"stigg-subscription-usage-skeleton-layout"},g.range(6).map((function(e){return a.createElement(f.Grid,{key:e,item:!0,xs:4},a.createElement(x,{width:280,height:120}))})))}function Di(e){var t=e.onManageSubscription,r=e.onBuyMore,i=a.useState(!1),o=i[0],l=i[1],c=$t(),s=c.customerPortal,u=c.textOverrides,d=c.theme,p=c.isLoading||!s,m=s||{},h=m.entitlements,y=m.subscriptions,v=null==h?void 0:h.filter((function(e){var t,r;return(null==(t=e.feature)?void 0:t.meterType)===n.MeterType.Fluctuating||(null==(r=e.feature)?void 0:r.meterType)===n.MeterType.Incremental})),b=null==y?void 0:y.find((function(e){return e.status===n.SubscriptionStatus.Active})),x=(null==b?void 0:b.pricingType)===n.PricingType.Custom,E=!(null==s||!s.canUpgradeSubscription),w=g.keyBy(null==b?void 0:b.prices,"feature.refId"),k=g.keyBy(v,"feature.refId"),P=g.compact(null==b?void 0:b.prices.map((function(e){return e.feature&&k[e.feature.refId]}))),C=g.compact(null==v?void 0:v.filter((function(e){return!w[e.feature.refId]}))),S=[].concat(P,C),T=S.length>2?4:6,B=o?S:S.slice(0,6);return p||null!=v&&v.length?a.createElement(Ir,{className:"stigg-subscription-usage-layout",$backgroundColor:d.backgroundColor,$borderColor:d.borderColor},a.createElement(Jt,null,a.createElement(en,{title:u.usageTabTitle,className:"stigg-customer-portal-usage-section-title",isLoading:p})),p?a.createElement(Fi,null):a.createElement(a.Fragment,null,a.createElement(f.Grid,{container:!0,spacing:4},B.map((function(e){return a.createElement(f.Grid,{item:!0,xs:T},a.createElement(Li,{key:e.feature.refId,subscriptionPrice:w[e.feature.refId],entitlement:e,onManageSubscription:t,onBuyMore:r,hasCustomSubscription:x,canUpgradeSubscription:E}))}))),S.length>6&&a.createElement(Ni,null,a.createElement(Qt,{className:"stigg-usage-toggle-many-button",variant:"text",startIcon:a.createElement(o?U.Minus:U.Plus,null),onClick:function(){return l((function(e){return!e}))}},o?"Show less":"Show more")))):null}function Ii(e){var t=e.onManageSubscription,r=e.onBuyMore,o=e.onCancelScheduledUpdates,l=e.onContactSupport,c=e.paywallComponent,s=e.hiddenSections,u=Pt().stigg,d=$t(),p=d.customerPortal,m=d.textOverrides,g=d.theme,h=d.isLoading,f=i.useRef(null),y=function(){var e;t?t():null==f||null==(e=f.current)||e.scrollIntoView({behavior:"smooth"})},v=null==p?void 0:p.subscriptions.some((function(e){return e.pricingType===n.PricingType.Custom})),b=!(null!=s&&s.some((function(e){return"usage"===e}))),x=!(null!=s&&s.some((function(e){return"paymentDetails"===e||"billingInformation"===e}))),E=!(null!=s&&s.some((function(e){return"invoices"===e||"billingInformation"===e})));return a.createElement(Ai,{className:"stigg-customer-portal-layout"},a.createElement(yi,{showWatermark:u.isWidgetWatermarkEnabled&&!!p}),a.createElement(Mi,{className:"stigg-customer-portal-sections"},a.createElement(hi,{onCancelScheduledUpdates:o,onBuyMore:r,onManageSubscription:y,onContactSupport:l,hiddenSections:s,cancelScheduledUpdatesButtonTitle:m.cancelScheduledUpdatesButtonTitle}),b&&a.createElement(Di,{onManageSubscription:y,onBuyMore:r}),a.createElement(Bi,{ref:f,paywallComponent:c,hidePaywallButtons:!!v,theme:g,title:m.paywallSectionTitle,isLoading:!p||h}),x&&a.createElement(Si,null),E&&a.createElement(ji,null)))}var Oi=["textOverrides","theme","resourceId","productId"];function ji(){var e=$t(),t=e.customerPortal,n=e.textOverrides,r=e.theme,i=!t||e.isLoading,o=i?a.createElement(Ci,null):null!=t&&t.billingPortalUrl?a.createElement(xi,{url:t.billingPortalUrl,text:n.viewInvoiceHistory,className:"stigg-view-invoice-history-button"}):null;return i||null!=t&&t.billingPortalUrl?a.createElement(Ir,{className:"stigg-invoices-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor},a.createElement(Jt,{className:"stigg-invoices-section-header"},a.createElement(en,{isLoading:i,className:"stigg-invoices-section-title",title:n.invoicesTitle}),o)):null}var Ri=function(e){return E(e,"addon.displayName")};function qi(e,t){return e.pricePoints.some((function(e){return e.billingPeriod===t}))}function Gi(e){var t=e.addon,n=e.currency,r=e.billingCountryCode;return Z({},t,{pricePoints:t.pricePoints.filter((function(e){return e.currency===n&&(!r||e.billingCountryCode===r)}))})}function _i(){var e=la()[1];return function(t){return e((function(e){O(e.addonsStep.addons,(function(e){return e.addon.id===t}))}))}}function Wi(){var e,t,n={checkoutState:(e=la()[0]).checkout,widgetState:e.widgetState,checkoutLocalization:e.checkoutLocalization};return{checkoutState:n.checkoutState,widgetState:n.widgetState,checkoutLocalization:n.checkoutLocalization,setWidgetReadOnly:(t=la()[1],function(e){return t((function(t){t.widgetState.readOnly=e}))})}}var Hi,Vi=function(e,t){return e.minUnitQuantity&&t<e.minUnitQuantity?e.minUnitQuantity:e.maxUnitQuantity&&t>e.maxUnitQuantity?e.maxUnitQuantity:t},zi=function(e){return e.pricingModel===n.BillingModel.PerUnit};function $i(){var e=la()[1];return function(t,n){return e((function(e){var r=e.planStep.billableFeatures.find((function(e){return e.featureId===t}));r?r.quantity=n:e.planStep.billableFeatures.push({featureId:t,quantity:n})}))}}function Zi(){var e;return Z({},la()[0].planStep,{setBillingPeriod:(e=la()[1],function(t){return e((function(e){e.planStep.billingPeriod=t}))}),setBillableFeature:$i()})}!function(e){e.PLAN="PLAN",e.ADDONS="ADDONS",e.PAYMENT="PAYMENT"}(Hi||(Hi={}));var Yi=[{key:Hi.PLAN,label:"Plan"},{key:Hi.ADDONS,label:"Add-ons"},{key:Hi.PAYMENT,label:"Payment details"}],Qi={activeStep:0,completedSteps:[],steps:Yi,isDisabled:!1};function Ki(){var e=la()[1];return function(t){return e((function(e){e.progressBar.completedSteps.push(t)}))}}function Xi(){var e=la()[1];return function(){return e((function(e){var t=e.progressBar;t.isDisabled||(t.completedSteps.includes(t.activeStep)||t.completedSteps.push(t.activeStep),t.activeStep<t.steps.length-1&&(t.activeStep+=1))}))}}function Ji(){var e=la()[1];return function(t){return e((function(e){e.progressBar.isDisabled=!!t}))}}function ea(){var e,t,n=la()[0].progressBar;return{currentStep:n.steps[n.activeStep],progressBarState:n,isLastStep:n.activeStep===n.steps.length-1,isCheckoutComplete:(t=n,t.completedSteps.length>=t.steps.length-1),setActiveStep:(e=la()[1],function(t){return e((function(e){e.progressBar.activeStep=t}))}),markStepAsCompleted:Ki(),goNext:Xi(),setIsDisabled:Ji()}}function ta(){var e=la()[0],t=e.paymentStep;return Z({},e.planStep,{addons:e.addonsStep.addons,promotionCode:e.promotionCode,billingAddress:t.billingAddress,taxPercentage:t.taxPercentage})}var na=function(){var e=Pt().stigg,t=ta(),n=la()[0],r=n.resourceId,a=n.planStep,o=Wi().checkoutState||{},l=o.plan,c=o.customer;return{previewSubscriptionAction:i.useCallback(function(){var n=$(Et.mark((function n(i){var o,s,u,d,p,m,g,h;return Et.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=(void 0===i?{}:i).promotionCode,s=t.addons.map((function(e){return{addonId:e.addon.id,quantity:e.quantity}})),u=null,d=null,!t.billableFeatures.some((function(e){return null===e.quantity}))){n.next=7;break}return n.abrupt("return",{subscriptionPreview:u});case 7:if(n.prev=7,null==c||!c.id||null==l||!l.id){n.next=13;break}return p=Z({customerId:c.id,planId:null==l?void 0:l.id,billableFeatures:t.billableFeatures,addons:s,billingPeriod:t.billingPeriod,promotionCode:null!=o?o:t.promotionCode,resourceId:r,billingCountryCode:a.billingCountryCode},(v=(f={billingAddress:t.billingAddress,taxPercentage:t.taxPercentage}).taxPercentage,(y=f.billingAddress)||v?{billingInformation:Z({},y?{billingAddress:y}:{},v?{taxPercentage:v}:{})}:{})),n.next=12,e.previewSubscription(p);case 12:u=n.sent;case 13:n.next=19;break;case 15:n.prev=15,n.t0=n.catch(7),g=(null==n.t0||null==(m=n.t0.message)?void 0:m.split("Error:"))||[],d=null==(h=g[1])?void 0:h.trim();case 19:return n.abrupt("return",{subscriptionPreview:u,errorMessage:d});case 20:case"end":return n.stop()}var f,y,v}),n,null,[[7,15]])})));return function(e){return n.apply(this,arguments)}}(),[c,l,r,e,t.addons,t.billingPeriod,t.billableFeatures,t.promotionCode,t.billingAddress,t.taxPercentage,a.billingCountryCode])}};function ra(){var e=la()[1];return function(t){return e((function(e){e.paymentStep.errorMessage=t}))}}function ia(){var e=la()[1];return function(t){return e((function(e){e.paymentStep.billingAddress=t}))}}function aa(){var e;return Z({},la()[0].paymentStep,{setUseNewPaymentMethod:(e=la()[1],function(t){return e((function(e){e.paymentStep.useNewPaymentMethod=t}))}),setErrorMessage:ra(),setBillingAddress:ia()})}var oa=a.createContext(null);oa.displayName="CheckoutContext";var la=function(){var e=i.useContext(oa);if(!e)throw new Error("Could not find Checkout context; You need to wrap your checkout components in an <CheckoutProvider> component.");return e},ca=function(e){var t=e.children,n=e.initialState,r=i.useState(n),o=r[0],l=r[1];i.useEffect((function(){l(n)}),[n]);var c=i.useCallback((function(e){return l((function(t){return D.produce(t,(function(t){return e(t)}))}))}),[l]),s=i.useMemo((function(){return[o,c]}),[c,o]);return a.createElement(oa.Provider,{value:[s[0],s[1]]},t)};function sa(e){var t,r=e.children,o=e.textOverrides,l=e.theme,c=e.preferredBillingPeriod,s=e.billableFeatures,d=e.billingCountryCode,m=e.billingInformation,g=function(e){var t=e.planId,n=e.resourceId,r=e.billingCountryCode,a=Pt().stigg,o=i.useState(!0),l=o[0],c=o[1],s=i.useState(),u=s[0],d=s[1];return i.useEffect((function(){var e=function(){var e=$(Et.mark((function e(){return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.getCheckoutState({planId:t,resourceId:n,billingCountryCode:r});case 3:d(e.sent),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),wt.error("Failed to load checkout "+(null==e.t0?void 0:e.t0.message),e.t0);case 10:return e.prev=10,c(!1),e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[0,7,10,13]])})));return function(){return e.apply(this,arguments)}}();a.isCustomerLoaded&&(c(!0),e())}),[a,a.isCustomerLoaded,n,t,r]),{checkout:u,isLoading:l}}({resourceId:e.resourceId,planId:e.planId,billingCountryCode:d}),h=g.checkout,f=g.isLoading,y=null!=h&&h.configuration?function(e){var t=e.palette;return{palette:{primary:(null==t?void 0:t.primary)||void 0,backgroundPaper:(null==t?void 0:t.backgroundColor)||void 0,outlinedBorder:(null==t?void 0:t.borderColor)||void 0,text:{primary:(null==t?void 0:t.textColor)||void 0},backgroundHighlight:(null==t?void 0:t.selectionColor)||void 0,backgroundSection:(null==t?void 0:t.summaryBackgroundColor)||void 0},typography:Bt(e.typography)}}(h.configuration):void 0,v=Wt(y),b=i.useMemo((function(){var e,t,r,i,a=function(e,t,n){var r=(e||{}).palette;return{primary:(null==t?void 0:t.primary)||(null==r?void 0:r.primary)||"rgb(50, 126, 238)",textColor:(null==t?void 0:t.textColor)||(null==r?void 0:r.text.primary)||"rgb(0, 30, 108)",backgroundColor:(null==t?void 0:t.backgroundColor)||(null==r?void 0:r.backgroundPaper)||"rgb(255, 255, 255)",borderColor:(null==t?void 0:t.borderColor)||(null==r?void 0:r.outlinedBorder)||"rgb(235, 237, 243)",selectionColor:(null==t?void 0:t.selectionColor)||(null==r?void 0:r.backgroundSection)||"rgb(229, 242, 255)",summaryBackgroundColor:(null==t?void 0:t.summaryBackgroundColor)||(null==r?void 0:r.backgroundHighlight)||"rgb(109, 121, 144)"}}(v,l),g=u({changePlan:"Change plan",billingPeriodsTitle:"Billing cycle",addAddonText:"Add",newPaymentMethodText:"New payment method",newPaymentMethodBillingAddressTitle:"Billing address",newPaymentMethodCardTitle:"Payment method",baseChargeText:function(){return"Base charge"},totalText:"Total due today",subTotalText:"Subtotal",addCouponCodeText:"Add coupon code",couponCodeTitle:"Coupon code",addonsSectionTitle:"Add-ons",changesWillApplyAtEndOfBillingPeriod:function(e){return"Your changes will apply on the end of your current billing cycle on "+p(e.billingPeriodEnd).format("MMM D, YYYY")+"."},checkoutButton:{nextText:"Next",downgradeText:"Downgrade",upgradeText:"Upgrade",purchaseText:"Purchase"},appliedCreditsTitle:"Applied credits",taxTitle:function(e){var t=e.taxDetails;return"Tax ("+(null==t?void 0:t.percentage)+"%)"},downgradeToFreeAlertText:function(){return"We’re sorry to see you downgrade your plan 😞"}},o),y=function(e){var t=e.plan,n=e.activeSubscription,r=e.billingCountryCode,i=e.preconfiguredBillableFeatures,a=function(e){var t,n,r,i,a=e.plan,o=e.activeSubscription,l=e.preferredBillingPeriod,c=null==a?void 0:a.pricePoints.some((function(e){return e.billingPeriod===q.BillingPeriod.Monthly})),s=null==a?void 0:a.pricePoints.some((function(e){return e.billingPeriod===q.BillingPeriod.Annually}));if(l){if(l===q.BillingPeriod.Monthly&&c)return q.BillingPeriod.Monthly;if(l===q.BillingPeriod.Annually&&s)return q.BillingPeriod.Annually}return(null==o||null==(t=o.plan)?void 0:t.id)===(null==a?void 0:a.id)?(null==o||null==(r=o.price)?void 0:r.billingPeriod)||q.BillingPeriod.Monthly:null!=o&&null!=(n=o.price)&&n.billingPeriod?null==o||null==(i=o.price)?void 0:i.billingPeriod:s?q.BillingPeriod.Annually:q.BillingPeriod.Monthly}({plan:t,activeSubscription:n,preferredBillingPeriod:e.preferredBillingPeriod}),o=function(e,t,n){var r;if(!t)return[];var i=j(e,"featureId"),a=j(R(null==n||null==(r=n.prices)?void 0:r.map((function(e){var t=e.feature;return t&&zi(e)?{featureId:t.featureId,quantity:t.unitQuantity||null}:null}))),"featureId");return R(null==t?void 0:t.map((function(e){var t,n,r,o,l=null==(t=e.feature)?void 0:t.featureId;if(!l||!zi(e))return null;var c=(null==(n=i[l])?void 0:n.quantity)||(null==(r=a[l])?void 0:r.quantity);return o=Vi(e,c||1),e.isTieredPrice&&(o=we(e.tiers,o).upTo),{featureId:l,quantity:o}})))}(i,null==t?void 0:t.pricePoints.filter((function(e){return e.billingPeriod===a})),n);return{billingPeriod:a,billableFeatures:o,billingCountryCode:r}}({preferredBillingPeriod:c,plan:null==h?void 0:h.plan,activeSubscription:null==h?void 0:h.activeSubscription,billingCountryCode:d,preconfiguredBillableFeatures:null!=s?s:[]}),b=function(e){var t,r,i=e.activeSubscription,a=e.plan,o=e.billingPeriod,l=e.billingCountryCode,c=[],s=(null==a||null==(t=a.pricePoints)||null==(r=t[0])?void 0:r.currency)||n.Currency.Usd,u=function(e){return E(e,"displayName")}(function(e){var t,n=e.addons,r=e.billingPeriod,i=e.billingCountryCode,a=e.currency;return(null==n||null==(t=n.filter((function(e){return qi(e,r)})))?void 0:t.map((function(e){return Gi({addon:e,currency:a,billingCountryCode:i})})))||[]}({addons:null==a?void 0:a.compatibleAddons,billingPeriod:o,billingCountryCode:l,currency:s})),d=function(e){var t,n=e.addons,r=e.billingPeriod,i=e.billingCountryCode,a=e.currency;return(null==n||null==(t=n.filter((function(e){return qi(e.addon,r)})))?void 0:t.map((function(e){return Z({},e,{addon:Gi({addon:e.addon,currency:a,billingCountryCode:i})})})))||[]}({addons:null==i?void 0:i.addons,billingPeriod:o,billingCountryCode:l,currency:s});return null!=d&&d.length&&null!=u&&u.length&&(c=Ri(d.filter((function(e){return u.some((function(t){return t.id===e.addon.id}))})))),{addons:c,initialAddons:I(c),availableAddons:u}}({plan:null==h?void 0:h.plan,billingPeriod:y.billingPeriod,activeSubscription:null==h?void 0:h.activeSubscription}),x={useNewPaymentMethod:!(null!=(i=(r={customer:null==h?void 0:h.customer,taxPercentage:null==m||null==(e=m.taxDetails)?void 0:e.taxPercentage}).customer)&&i.paymentMethodDetails),taxPercentage:r.taxPercentage},w=function(e){var t=e.availableAddons;return 0===(null==t?void 0:t.length)?Z({},Qi,{steps:Yi.filter((function(e){return e.key!==Hi.ADDONS}))}):Qi}({availableAddons:f?void 0:b.availableAddons});return{checkout:h,checkoutLocalization:g,stiggTheme:v,theme:a,progressBar:w,planStep:y,addonsStep:b,paymentStep:x,resourceId:null==h||null==(t=h.resource)?void 0:t.id,widgetState:{readOnly:!1,isLoadingCheckoutData:f}}}),[c,d,h,f,null==m||null==(t=m.taxDetails)?void 0:t.taxPercentage]);return a.createElement(Vt,{key:null==h?void 0:h.plan.id,componentTheme:y},a.createElement(ca,{initialState:b},r))}var ua,da,pa,ma,ga=o("div",{target:"ergo9xd2"})("margin:auto;width:100%;max-width:920px;display:flex;position:relative;flex-direction:column;align-items:center;padding:16px 32px;border-radius:10px;background-color:",(function(e){return e.theme.stigg.palette.backgroundPaper}),";border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";& *{box-sizing:border-box;}"),ha=o(T,{target:"ergo9xd1"})({name:"1pdbip7",styles:"display:flex;align-items:flex-start;gap:32px;flex-wrap:wrap;width:100%"}),fa=o(T,{target:"ergo9xd0"})({name:"fszphw",styles:"display:flex;flex-direction:column;gap:0;flex:2"}),ya=o(f.LinearProgress,{target:"e9upyia2"})((function(e){var t,n=e.theme,r=e.$disabled;return(t={})["&."+f.linearProgressClasses.root]={borderRadius:n.stigg.border.radius,backgroundColor:n.stigg.palette.outlinedBorder},t["& ."+f.linearProgressClasses.bar]={backgroundColor:r?s(n.stigg.palette.outlinedBorder).darken(.2).hex():n.stigg.palette.primary},t}),""),va=o(f.Button,{target:"e9upyia1"})((function(){var e;return(e={})["&."+f.buttonClasses.root]={textTransform:"none",lineHeight:"inherit",justifyContent:"flex-start",padding:"8px 4px"},e}),""),ba=o(vr,{target:"e9upyia0"})((function(e){var t=e.theme,n=e.$shouldStroke;return{circle:{stroke:void 0===n||n?e.$disabled?t.stigg.palette.text.disabled:t.stigg.palette.primary:void 0}}}),""),xa=o(f.Grid,{target:"e1v7qkry3"})("display:flex;flex-direction:",(function(e){return e.$flexDirection||"row"}),";gap:",(function(e){return e.$gap}),"px;"),Ea=o(xa,{target:"e1v7qkry2"})({name:"o7lzx8",styles:"span{display:flex;flex:1;}"}),wa=o(f.Grid,{target:"e1v7qkry1"})("span{display:flex;flex:",(function(e){return e.flex}),";}"),ka=o(x,{target:"e1v7qkry0"})({name:"1u8hqvf",styles:"border-radius:4px"}),Pa=function(){var e=ea(),t=e.progressBarState,n=e.setActiveStep,r=Wi().widgetState,i=r.readOnly,o=r.isLoadingCheckoutData,l=t||{},c=l.activeStep,s=l.completedSteps,u=l.steps;return a.createElement(f.Box,{sx:{width:"100%",my:3}},a.createElement(ya,{variant:"determinate",value:100*(c+1)/u.length,$disabled:i}),a.createElement(f.Grid,{container:!0,display:"flex"},u.map((function(e,t){var r=e.key,l=e.label,u=s.includes(t),d=i||t>c&&!u&&!s.includes(t-1),p=d?"OutlinedCheckedCircleDisabled":"OutlinedCheckedCircle";return a.createElement(f.Grid,{key:r,item:!0,display:"flex",flexDirection:"row",flex:1,justifyContent:"flex-start"},o?a.createElement(ka,{width:120,height:20,style:{marginTop:8}}):a.createElement(va,{onClick:function(){return n(t)},fullWidth:!0,disabled:d},a.createElement(f.Grid,{item:!0,display:"flex",flexDirection:"row",alignItems:"center",gap:1},a.createElement(f.StepIcon,{icon:a.createElement(ba,u?{icon:p,$shouldStroke:!d}:{icon:"OutlinedCircle",$disabled:d})}),a.createElement(le,{variant:"h6",color:d?"disabled":"primary.main"},l))))}))))},Ca=[n.BillingModel.FlatFee,n.BillingModel.PerUnit,n.BillingModel.UsageBased],Sa=function(e){return i.useMemo((function(){return function(e){return E(e,[function(e){return Ca.indexOf(e.pricingModel)},function(e){var t;return null==(t=e.feature)?void 0:t.displayName}])}(e)}),[e])},Ta=["variant"],Ba=o(f.Button,{target:"effv4rq0"})("border-radius:10px;text-transform:none;",(function(e){var t=e.theme,n=e.$success,r=e.$error;return e.$isLoading?f.css(ua||(ua=Q(["\n background-color: ",";\n cursor: no-drop;\n\n &:hover {\n background-color: ",";\n }\n "])),t.stigg.palette.primaryDark,t.stigg.palette.primaryDark):n?f.css(da||(da=Q(["\n background-color: ",";\n cursor: 'default';\n\n &:hover {\n background-color: ",";\n }\n "])),t.stigg.palette.success,t.stigg.palette.successDark):r?f.css(pa||(pa=Q(["\n background-color: ",";\n\n &:hover {\n background-color: ",";\n }\n "])),t.stigg.palette.error,t.stigg.palette.errorDark):""}),";"),Aa=function(e){var t=e.variant,n=void 0===t?"outlined":t,r=Y(e,Ta);return a.createElement(Ba,Object.assign({variant:n},r))},Ma=W(f.TextField)((function(e){var t=e.theme;return{"& .MuiOutlinedInput-root":{height:"42px",borderRadius:t.stigg.border.radius,fieldset:{borderColor:t.stigg.palette.outlinedBorder},"&:not(.Mui-focused):hover fieldset":{borderColor:t.stigg.palette.outlinedRestingBorder}},"& .MuiInputBase-input":Z({padding:"8px 12px",borderRadius:t.stigg.border.radius,fontFamily:t.stigg.typography.fontFamily,color:t.stigg.palette.text.primary},t.stigg.typography.body)}})),Ua=o(f.Grid,{target:"e1q84ats0"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"});function La(){return a.createElement(Ua,{container:!0},a.createElement(xa,{item:!0,$gap:48},a.createElement(ka,{width:120,height:20}),a.createElement(ka,{width:120,height:20})),a.createElement(f.Divider,{className:"stigg-checkout-plan-header-divider",sx:{marginY:2}}),a.createElement(Ua,{item:!0},a.createElement(ka,{width:120,height:20}),a.createElement(Ea,{$gap:16,marginTop:3},a.createElement(ka,{height:20}),a.createElement(ka,{height:20})),a.createElement(xa,{$gap:130,marginTop:3},a.createElement(wa,{flex:1},a.createElement(ka,{height:20})),a.createElement(wa,{flex:3},a.createElement(ka,{height:20})))))}function Na(){var e;return{promotionCode:la()[0].promotionCode,setPromotionCode:(e=la()[1],function(t){return e((function(e){e.promotionCode=t}))})}}function Fa(){return(Fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Da=o((function(e){return i.createElement("svg",Fa({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ma||(ma=i.createElement("g",{stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M10 4.167v11.666M4.167 10h11.667"}))))}),{target:"e3hfkj90"})("path{stroke:",(function(e){return e.theme.stigg.palette.primary}),";}"),Ia=function(e){var t=e.checkoutLocalization;return a.createElement(Aa,{fullWidth:!0,className:"stigg-checkout-summary-add-coupon-code-button",sx:{textTransform:"none",justifyContent:"flex-start"},variant:"text",size:"medium",onClick:e.onAddClick},a.createElement(Da,{className:"stigg-checkout-summary-add-coupon-code-button-icon"}),a.createElement(le,{className:"stigg-checkout-change-plan-button-text",color:"primary.main",style:{lineHeight:"24px"},variant:"body1"},t.addCouponCodeText))},Oa=o(Aa,{target:"e8kocin0"})("padding:4px 10px;min-width:unset;border-radius:",(function(e){return e.theme.stigg.border.radius}),";display:flex;align-items:center;"),ja=function(e){var t=e.checkoutLocalization,n=Na().setPromotionCode,r=i.useState(!1),o=r[0],l=r[1],c=a.useState(""),s=c[0],u=c[1],d=a.useState(!1),p=d[0],m=d[1],g=a.useState(""),h=g[0],y=g[1],v=na().previewSubscriptionAction,b=function(){var e=$(Et.mark((function e(){var t,r,i;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),y(""),e.next=4,v({promotionCode:s});case 4:r=(t=e.sent).subscriptionPreview,!(i=t.errorMessage)&&null!=r&&r.discount?(n(s.toUpperCase()),l(!1)):i&&y(i),m(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return o?a.createElement(f.Grid,null,a.createElement(le,{variant:"body1",color:h?"error":"primary.main"},t.couponCodeTitle),a.createElement(Ma,{autoFocus:!0,variant:"outlined",fullWidth:!0,error:!!h,value:s,onChange:function(e){u(e.target.value)},inputProps:{maxLength:20},InputProps:{endAdornment:a.createElement(Oa,{variant:"contained",disableRipple:p,$isLoading:p,onClick:b},p?a.createElement(f.CircularProgress,{size:18}):a.createElement(vr,{style:{display:"flex"},icon:"ArrowForward"}))}}),!!h&&a.createElement(le,{variant:"body1",color:"error"},h)):a.createElement(Ia,{onAddClick:function(){return l(!0)},checkoutLocalization:t})},Ra=o(f.Grid,{target:"e1cvrfx30"})("width:auto;display:inline-flex;align-items:center;flex-direction:row;gap:8px;padding:6px 16px;border-radius:",(function(e){return e.theme.stigg.border.radius}),";border:1px solid ",(function(e){return e.theme.stigg.palette.primary}),";"),qa=function(e){var t=e.onClearPromotionCode;return a.createElement(Ra,{container:!0},a.createElement(f.Grid,{item:!0},a.createElement(le,{variant:"body1",color:"primary.main"},e.promotionCode)),a.createElement(f.Grid,{item:!0},a.createElement(Aa,{variant:"text",sx:{minWidth:"unset",padding:0},onClick:t},a.createElement(vr,{icon:"Close",style:{display:"flex"}}))))},Ga=o("div",{target:"eqejwsl0"})({name:"1k6141t",styles:"margin:16px 0"}),_a=function(e){var t,n=e.checkoutLocalization,r=Na(),i=r.promotionCode,o=r.setPromotionCode;return t=i?a.createElement(qa,{promotionCode:i,onClearPromotionCode:function(){o("")}}):a.createElement(ja,{checkoutLocalization:n}),a.createElement(Ga,null,t)},Wa=["postal_code"];function Ha(e){var t,n=e.onBillingAddressChange,r=Wi(),i=r.checkoutState,o=r.checkoutLocalization,l=r.widgetState,c=r.setWidgetReadOnly,s=aa().setBillingAddress,u=i||{},d=u.customer,p=u.configuration,m=l.readOnly;return a.createElement(f.Grid,{flexDirection:"column",container:!0,gap:3,padding:"16px",sx:{pointerEvents:m?"none":void 0}},a.createElement(f.Grid,{flexDirection:"column",container:!0,gap:2},a.createElement(le,{variant:"h6"},o.newPaymentMethodBillingAddressTitle),a.createElement(G.AddressElement,{onChange:function(e){if(e.complete){var t=e.value.address,r=Z({postalCode:t.postal_code},Y(t,Wa));c(!0),s(r),n?function(){var e=$(Et.mark((function e(){return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({billingAddress:r});case 2:c(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()():c(!1)}},options:{mode:"billing",fields:{phone:null!=p&&null!=(t=p.content)&&t.collectPhoneNumber?"always":"auto"},defaultValues:Z({},(null==d?void 0:d.name)&&{name:d.name})}})),a.createElement(f.Grid,{flexDirection:"column",container:!0,gap:2},a.createElement(le,{variant:"h6"},o.newPaymentMethodCardTitle),a.createElement(G.PaymentElement,{onChange:function(){},onReady:function(){},options:{readOnly:m,terms:{card:"never"},defaultValues:{billingDetails:Z({},(null==d?void 0:d.name)&&{name:d.name},(null==d?void 0:d.email)&&{email:d.email})}}})))}function Va(e){return za.apply(this,arguments)}function za(){return(za=$(Et.mark((function e(t){var n,r;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.elements){e.next=5;break}return console.error("Stripe elements not initialized"),e.abrupt("return",{success:!1,errorMessage:"Stripe elements not initialized"});case 5:return e.next=7,n.submit();case 7:if(!(r=e.sent.error)){e.next=12;break}return console.log(r.message),e.abrupt("return",{success:!1,errorMessage:r.message||""});case 12:return e.abrupt("return",{success:!0});case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $a(e){return Za.apply(this,arguments)}function Za(){return(Za=$(Et.mark((function e(t){var n,r,i,a,o;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.elements,i=t.setupIntentClientSecret,(n=t.stripe)&&r&&i){e.next=3;break}return e.abrupt("return",{success:!1});case 3:return e.next=5,Ka({stripe:n,elements:r,clientSecret:i});case 5:return e.abrupt("return",{success:!!(o=(a=e.sent).newPaymentMethodId),paymentMethodId:o,errorMessage:a.setupErrorMessage});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ya(e){return Qa.apply(this,arguments)}function Qa(){return(Qa=$(Et.mark((function e(t){var r,i,a,o,l,c,s;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=null==(o=t.applySubscriptionResults)||null==(r=o.subscription)||null==(i=r.latestInvoice)?void 0:i.paymentSecret,!(l=t.stripe)||!c||(null==o||null==(a=o.subscription)?void 0:a.paymentCollection)!==n.PaymentCollection.ActionRequired){e.next=9;break}return e.next=5,l.handleNextAction({clientSecret:c});case 5:if(!(s=e.sent.error)){e.next=9;break}return e.abrupt("return",{errorMessage:s.message||""});case 9:return e.abrupt("return",{subscription:null==o?void 0:o.subscription});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ka(e){return Xa.apply(this,arguments)}function Xa(){return(Xa=$(Et.mark((function e(t){var n,r,i,a,o,l,c;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.stripe,r=t.elements,i=t.clientSecret,e.next=3,n.confirmSetup({elements:r,confirmParams:{return_url:window.location.href},redirect:"if_required"});case 3:if(!(l=e.sent.error)){e.next=9;break}"card_error"===l.type||"validation_error"===l.type?"card_error"===l.type&&(o=l.message||""):o="An unexpected error occurred.",e.next=21;break;case 9:return e.prev=9,e.next=12,n.retrieveSetupIntent(i);case 12:null!=(c=e.sent.setupIntent)&&c.payment_method&&(a=c.payment_method),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(9),o="An unexpected error occurred.",console.error(e.t0);case 21:return e.abrupt("return",{newPaymentMethodId:a,setupErrorMessage:o});case 22:case"end":return e.stop()}}),e,null,[[9,17]])})))).apply(this,arguments)}var Ja={v:"5.12.1",fr:30,ip:0,op:201,w:700,h:700,nm:"Check",ddd:0,assets:[],layers:[{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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.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:!1}],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:[.833],y:[.833]},o:{x:[.167],y:[.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:!1},{ty:"st",c:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:30,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:61,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.338],y:[1]},o:{x:[.333],y:[0]},t:87,s:[50]},{t:122,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.338],y:[1]},o:{x:[.333],y:[0]},t:87,s:[45]},{t:122,s:[0]}],ix:2},o:{a:1,k:[{i:{x:[.474],y:[1]},o:{x:[.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:!1}],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}],markers:[],props:{}},eo=s("#0b2f7a").alpha(.3).toString(),to=o(f.Box,{target:"eeyi5d30"})("position:absolute;top:0;left:0;bottom:0;right:0;background-color:",eo,";* rect{fill:transparent;}");function no(){return a.createElement(to,null,a.createElement(V,{width:350,isClickToPauseDisabled:!0,options:{loop:!1,autoplay:!0,animationData:Ja}}))}var ro=function(e){return new Promise((function(t){return setTimeout(t,e)}))},io=function(e){var t=e.width,n=e.height,r=e.children;return e.isLoading?a.createElement(ka,{width:void 0===t?50:t,height:void 0===n?16:n}):a.createElement(a.Fragment,null,r)},ao=function(e){var t,n,r,i,o,l=e.subscriptionPreview,c=e.isFetchingSubscriptionPreview;if(null==l||null==(t=l.proration)||null==(n=t.netAmount)||!n.amount||(null==l||null==(r=l.proration)||null==(i=r.netAmount)?void 0:i.amount)>=0)return null;var s=Ie(null==l||null==(o=l.proration)?void 0:o.netAmount);return a.createElement(le,{variant:"caption",style:{marginTop:14}},a.createElement(io,{isLoading:c,width:"100%"},"Your remaining credits, which are "+s+", will be kept for you for future use."))},oo=function(e){var t=e.subscriptionPreview,n=e.activeSubscription,r=e.isFetchingSubscriptionPreview,i=e.checkoutLocalization;if(null==t||!t.hasScheduledUpdates||null==n||!n.currentBillingPeriodEnd)return null;var o="function"==typeof i.changesWillApplyAtEndOfBillingPeriod?i.changesWillApplyAtEndOfBillingPeriod({billingPeriodEnd:n.currentBillingPeriodEnd}):i.changesWillApplyAtEndOfBillingPeriod;return a.createElement(le,{variant:"caption",style:{marginTop:14}},a.createElement(io,{isLoading:r,width:"100%"},o))},lo=function(e){var t,n=e.subscriptionPreview,r=e.plan,i=e.isFetchingSubscriptionPreview;if(null==n||!n.total)return null;var o=Ie(null==n?void 0:n.total),l=!(null==(t=n.credits)||!t.used);return a.createElement(le,{variant:"caption",style:{marginTop:14}},a.createElement(io,{isLoading:i,width:"100%"},"Today we’ll charge you "+o+" (incl. taxes) for your new "+(null==r?void 0:r.displayName)+" plan"+(l?" minus credits left from your existing plan.":"")+" "))},co=function(e){var t,n,r=e.subscriptionPreview,i=e.activeSubscription,o=e.plan,l=e.isFetchingSubscriptionPreview;if(null==r||null==(t=r.subscription)||!t.total)return null;var c=(null==i||null==(n=i.plan)?void 0:n.id)&&(null==o?void 0:o.id)&&i.plan.id===o.id,s=r.isPlanDowngrade&&r.hasScheduledUpdates,u=p(r.hasScheduledUpdates?null==i?void 0:i.currentBillingPeriodEnd:null==r?void 0:r.billingPeriodRange.end).format("MMM D, YYYY"),d=Ie(null==r?void 0:r.subscription.total);return a.createElement(le,{variant:"caption",style:{marginTop:14}},a.createElement(io,{isLoading:l,width:"100%"},"Your"+(c?"":" new")+" "+(null==o?void 0:o.displayName)+" plan will "+(s?"start":"renew")+" on "+u+" for "+d+" (incl. taxes) unless you cancel it."))};function so(e){return a.createElement(a.Fragment,null,a.createElement(ao,Object.assign({},e)),a.createElement(oo,Object.assign({},e)),a.createElement(lo,Object.assign({},e)),a.createElement(co,Object.assign({},e)))}var uo=o("div",{target:"e1ultpe61"})({name:"rdmn2i",styles:"&+&{margin-top:8px;}"}),po=o("div",{target:"e1ultpe60"})({name:"bcffy2",styles:"display:flex;align-items:center;justify-content:space-between"}),mo=function(e){var t,r=e.label,i=e.quantity,o=e.price,l=o.billingPeriod;return t=o.isTieredPrice?we(o.tiers,i).unitPrice.amount:o.amount,a.createElement(uo,null,a.createElement(po,{style:{alignItems:"flex-end"}},a.createElement(f.Grid,{item:!0},a.createElement(le,{variant:"h6",color:"primary"},r),(i>1||l===n.BillingPeriod.Annually)&&a.createElement(le,{variant:"body1",color:"secondary"},function(e){var t=e.amount,r=e.price,i=e.quantity,a=null;r.billingPeriod===n.BillingPeriod.Annually&&(t/=12,a="12 months");var o=Ie({amount:t,currency:r.currency});return(i>1?i+" x "+o+" each":o)+(a?" x "+a:"")}({amount:t,price:o,quantity:i}))),a.createElement(f.Grid,{item:!0},a.createElement(le,{variant:"body1",color:"secondary",style:{wordBreak:"break-word"}},Ie({amount:i*t,currency:o.currency})))))},go=function(e){var t,r=e.isFetchingSubscriptionPreview,i=e.subscriptionPreview||{},o=i.subTotal,l=i.discount;return o&&l?(t=l.type===n.DiscountType.Percentage?-1*Math.abs(l.value/100*o.amount):-1*Math.abs(l.value),a.createElement(uo,null,a.createElement(po,null,a.createElement(le,{variant:"body1",color:"secondary"},"Discount"+(l.type===n.DiscountType.Percentage?" ("+l.value+"% off)":"")),a.createElement(le,{variant:"body1",color:"secondary"},r?a.createElement(ka,{width:50,height:16}):Ie({amount:t,currency:o.currency}))))):null},ho=function(e){var t=e.isFetchingSubscriptionPreview,n=(e.subscriptionPreview||{}).credits;return!n||n.used.amount<=0?null:a.createElement(uo,null,a.createElement(po,null,a.createElement(le,{variant:"body1",color:"secondary"},e.checkoutLocalization.appliedCreditsTitle),a.createElement(le,{variant:"body1",color:"secondary"},a.createElement(io,{isLoading:t},Ie({amount:-1*n.used.amount,currency:n.used.currency})))))},fo=function(e){var t=e.isFetchingSubscriptionPreview,n=e.subscriptionPreview||{},r=n.tax,i=n.taxDetails;return i&&r?a.createElement(uo,null,a.createElement(po,null,a.createElement(le,{variant:"body1",color:"secondary"},e.checkoutLocalization.taxTitle({taxDetails:i})),a.createElement(le,{variant:"body1",color:"secondary"},a.createElement(io,{isLoading:t},Ie({amount:null==r?void 0:r.amount,currency:null==r?void 0:r.currency}))))):null},yo=o(f.Paper,{target:"e9ji7bp4"})("border-radius:10px;background:",(function(e){return e.theme.stigg.palette.backgroundHighlight}),";padding:16px;");yo.defaultProps={elevation:0};var vo,bo=o(le,{target:"e9ji7bp3"})({name:"18uqayh",styles:"margin-bottom:16px"}),xo=o(f.Divider,{target:"e9ji7bp2"})({name:"1k6141t",styles:"margin:16px 0"}),Eo=o(le,{target:"e9ji7bp1"})({name:"1d0nbku",styles:"margin-top:24px"}),wo=o(le,{target:"e9ji7bp0"})({name:"5bhc30",styles:"margin-bottom:8px"}),ko=function(e){var t,r,o=e.onCheckout,l=e.onCheckoutCompleted,c=e.disablePromotionCode,s=e.isFreeDowngrade,u=i.useState(!1),d=u[0],p=u[1],m=aa().setErrorMessage,g=ea(),h=ta(),y=Wi(),v=y.checkoutLocalization,b=y.checkoutState||{},x=b.plan,E=b.activeSubscription,w=Sa((null==x||null==(t=x.pricePoints)?void 0:t.filter((function(e){return e.billingPeriod===h.billingPeriod})))||[]),k=_(w,(function(e){return e.pricingModel===n.BillingModel.FlatFee})),P=k[1],C=(k[0]||[])[0],S=s||g.isCheckoutComplete&&g.isLastStep,T=function(){var e=i.useState(null),t=e[0],n=e[1],r=i.useState(!1),a=r[0],o=r[1],l=na().previewSubscriptionAction;return i.useEffect((function(){!function(){var e=$(Et.mark((function e(){var t;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(!0),e.next=3,l();case 3:(t=e.sent.subscriptionPreview)&&n(t),o(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[l]),{subscriptionPreview:t,isFetchingSubscriptionPreview:a}}(),B=T.subscriptionPreview,A=T.isFetchingSubscriptionPreview,M=function(e){var t=e.onCheckout,n=e.onCheckoutCompleted,r=e.onSuccess,i=Pt().stigg,a=aa().useNewPaymentMethod,o=function(){var e=ta(),t=la()[0].resourceId,n=(Wi().checkoutState||{}).plan,r=e.addons.map((function(e){return{addonId:e.addon.id,quantity:e.quantity}}));if(null!=n&&n.id)return Z({resourceId:t,planId:n.id,billingPeriod:e.billingPeriod,billableFeatures:e.billableFeatures,addons:r,promotionCode:e.promotionCode,billingCountryCode:e.billingCountryCode},e.taxPercentage?{billingInformation:{taxPercentage:e.taxPercentage}}:{})}(),l=Wi(),c=l.widgetState,s=l.setWidgetReadOnly,u=(l.checkoutState||{}).setupSecret,d=G.useStripe(),p=G.useElements();return{handleSubmit:function(){var e=$(Et.mark((function e(l){var c,m,g,h,f,y,v,b,x;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l.preventDefault(),o){e.next=3;break}return e.abrupt("return",{success:!1,errorMessage:"Unexpected error, please contact support."});case 3:if(m=Z({},o),y=function(){var e=$(Et.mark((function e(){var t,n,r,o,l;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a){e.next=13;break}return e.next=3,Va({elements:p});case 3:if(n=(t=e.sent).errorMessage,t.success){e.next=8;break}return e.abrupt("return",{success:!1,errorMessage:n});case 8:return e.next=10,$a({elements:p,stripe:d,setupIntentClientSecret:u});case 10:(r=e.sent).success||(h=r.errorMessage),f=r.paymentMethodId;case 13:if(!h){e.next=15;break}return e.abrupt("return",{success:!1,errorMessage:h});case 15:return m=Z({},m,{paymentMethodId:f}),e.prev=16,e.next=19,i.applySubscription(m);case 19:return o=e.sent,e.next=22,Ya({applySubscriptionResults:o,stripe:d});case 22:return g=l=e.sent,l.errorMessage&&(h=l.errorMessage),e.abrupt("return",{success:!l.errorMessage,errorMessage:l.errorMessage});case 28:return e.prev=28,e.t0=e.catch(16),console.error(e.t0),e.abrupt("return",{success:!1,errorMessage:h=null==e.t0?void 0:e.t0.message});case 33:case"end":return e.stop()}}),e,null,[[16,28]])})));return function(){return e.apply(this,arguments)}}(),s(!0),!t){e.next=13;break}return e.next=9,t({checkoutParams:m,checkoutAction:y});case 9:!(v=e.sent).success&&v.errorMessage&&(h=v.errorMessage),e.next=17;break;case 13:return e.next=15,y();case 15:!(b=e.sent).success&&b.errorMessage&&(h=b.errorMessage);case 17:if(s(!1),!(x=!h&&!(null==(c=g)||!c.subscription))||!r){e.next=23;break}return r(),e.next=23,ro(5e3);case 23:return e.next=25,n({success:x,error:h});case 25:return e.abrupt("return",{results:g,success:!h,errorMessage:h});case 26:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),isLoading:!(null==c||!c.readOnly)}}({onCheckout:o,onCheckoutCompleted:l,onSuccess:function(){p(!0),g.markStepAsCompleted(g.progressBarState.activeStep)}}),U=M.handleSubmit,L=M.isLoading,N=function(){var e=$(Et.mark((function e(t){var n;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!d){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,U(t);case 4:if(e.t0=e.sent,e.t0){e.next=7;break}e.t0={};case 7:(n=e.t0.errorMessage)?(m(n),p(!1)):m(void 0);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=$(Et.mark((function e(t){return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!L){e.next=2;break}return e.abrupt("return");case 2:if(!S){e.next=7;break}return e.next=5,N(t);case 5:e.next=8;break;case 7:g.goNext();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.createElement(f.Box,{flex:1},a.createElement(yo,null,a.createElement(bo,{variant:"h6"},null==x?void 0:x.displayName),C&&a.createElement(uo,null,a.createElement(po,null,a.createElement(le,{variant:"h6",color:"primary"},"function"==typeof v.baseChargeText?v.baseChargeText({billingPeriod:h.billingPeriod}):v.baseChargeText),a.createElement(le,{variant:"body1",color:"secondary"},Ie({amount:C.amount,currency:C.currency})))),P.map((function(e){var t,n,r,i=null==(t=h.billableFeatures)?void 0:t.find((function(t){var n;return t.featureId===(null==(n=e.feature)?void 0:n.featureId)}));return a.createElement(mo,{key:null==(n=e.feature)?void 0:n.featureId,label:(null==(r=e.feature)?void 0:r.displayName)||"",quantity:(null==i?void 0:i.quantity)||1,price:e})})),!(null==(r=h.addons)||!r.length)&&a.createElement(a.Fragment,null,a.createElement(f.Grid,{display:"flex",flexDirection:"row",alignItems:"center",marginY:1},a.createElement(le,{variant:"body1",color:"primary",style:{paddingRight:"8px"}},v.addonsSectionTitle),a.createElement(xo,{className:"stigg-checkout-summary-divider",sx:{flex:1}})),h.addons.map((function(e){var t,n,r=null==(t=e.addon.pricePoints)?void 0:t.find((function(e){return e.billingPeriod===h.billingPeriod}));return r?a.createElement(mo,{key:null==e||null==(n=e.addon)?void 0:n.id,label:e.addon.displayName,quantity:e.quantity,price:r}):null}))),a.createElement(po,null,a.createElement(Eo,{variant:"h6"},v.subTotalText),a.createElement(Eo,{variant:"h6"},a.createElement(io,{isLoading:A},Ie(Z({amount:0},null==B?void 0:B.subTotal))))),a.createElement(xo,{className:"stigg-checkout-summary-divider"}),!c&&a.createElement(a.Fragment,null,a.createElement(_a,{checkoutLocalization:v}),a.createElement(xo,{className:"stigg-checkout-summary-divider"})),a.createElement(go,{subscriptionPreview:B,isFetchingSubscriptionPreview:A}),a.createElement(fo,{subscriptionPreview:B,isFetchingSubscriptionPreview:A,checkoutLocalization:v}),a.createElement(ho,{subscriptionPreview:B,isFetchingSubscriptionPreview:A,checkoutLocalization:v}),a.createElement(uo,null,a.createElement(po,null,a.createElement(wo,{variant:"h6"},v.totalText),a.createElement(wo,{variant:"h6"},a.createElement(io,{isLoading:A},Ie(Z({amount:0},null==B?void 0:B.total)))))),a.createElement(so,{plan:x,activeSubscription:E,subscriptionPreview:B,isFetchingSubscriptionPreview:A,checkoutLocalization:v}),a.createElement(Aa,{disableRipple:L||g.progressBarState.isDisabled,$isLoading:L||g.progressBarState.isDisabled,$success:d,$error:S&&(null==B?void 0:B.isPlanDowngrade),disabled:L||A,className:"stigg-checkout-summary-cta-button",sx:{textTransform:"none",borderRadius:"10px",marginTop:"24px"},variant:"contained",size:"medium",onClick:function(e){F(e)},fullWidth:!0},a.createElement(le,{className:"stigg-checkout-summary-cta-button-text",color:"white",style:{display:"flex"}},d?a.createElement(vr,{icon:"Check",style:{display:"contents"}}):L||A?a.createElement(f.CircularProgress,{size:20,sx:{color:"white"}}):function(e){var t=e.subscriptionPreview,n=e.checkoutLocalization;return e.isLastStep?null!=t&&t.isPlanDowngrade?n.checkoutButton.downgradeText:e.isFirstSubscription?n.checkoutButton.purchaseText:n.checkoutButton.upgradeText:n.checkoutButton.nextText}({isLastStep:S,subscriptionPreview:B,checkoutLocalization:v})))),a.createElement(mt,{source:"checkout",showWatermark:!0,style:{marginTop:8,display:"flex",justifyContent:"center"}}),d&&a.createElement(no,null))},Po=function(){return a.createElement(f.Box,{flex:1},a.createElement(yo,null,a.createElement(xa,{$flexDirection:"column",$gap:24},a.createElement(ka,{width:120,height:20}),a.createElement(ka,{width:120,height:20}),a.createElement(ka,{width:120,height:20}),a.createElement(ka,{width:120,height:20})),a.createElement(xa,{$flexDirection:"column",$gap:24,marginTop:5},a.createElement(ka,{height:20}),a.createElement(ka,{height:20}),a.createElement(ka,{height:20})),a.createElement(wa,{flex:1,marginTop:5},a.createElement(ka,{height:34}))),a.createElement(mt,{source:"checkout",showWatermark:!0,style:{marginTop:8,display:"flex",justifyContent:"center"}}))};function Co(){return(Co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var So=function(e){return i.createElement("svg",Co({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),vo||(vo=i.createElement("g",{stroke:"#7586B0",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M2.667 8h10.667M9.333 4l4 4-4 4"}))))},To=o(f.Box,{target:"e1qdmq182"})({name:"1dz2cns",styles:"display:flex;align-items:baseline;gap:8px"}),Bo=o(So,{target:"e1qdmq181"})("path{stroke:",(function(e){return e.theme.stigg.palette.text.secondary}),";}"),Ao=o(f.Box,{target:"e1qdmq180"})({name:"63wzp2",styles:"display:flex;align-content:center;justify-content:space-between;margin-bottom:32px"});function Mo(e){var t=e.allowChangePlan,n=void 0!==t&&t,r=e.onChangePlan,i=Wi(),o=i.checkoutLocalization,l=i.checkoutState||{},c=l.plan,s=l.activeSubscription;return a.createElement(a.Fragment,null,a.createElement(Ao,null,a.createElement(To,null,s&&(null==c?void 0:c.id)!==(null==s?void 0:s.plan.id)&&a.createElement(a.Fragment,null,a.createElement(le,{variant:"h6",color:"secondary"},s.plan.displayName),a.createElement(Bo,null)),a.createElement(le,{variant:"h3",bold:!0},null==c?void 0:c.displayName)),n&&r&&a.createElement(f.Button,{className:"stigg-checkout-change-plan-button",sx:{textTransform:"none"},variant:"text",size:"medium",onClick:function(){r({currentPlan:c})}},a.createElement(le,{className:"stigg-checkout-change-plan-button-text",color:"primary.main",style:{lineHeight:"24px"},variant:"body1"},o.changePlan))),a.createElement(f.Divider,{className:"stigg-checkout-plan-header-divider"}))}var Uo,Lo,No,Fo,Do=o(f.Grid,{target:"e1o28dc92"})({name:"12z2e32",styles:"width:100%;margin-top:32px;gap:8px"}),Io=o(f.Grid,{target:"e1o28dc91"})({name:"a3p0fn",styles:"display:flex;justify-content:space-between;align-items:center;height:80px"}),Oo=o(Aa,{target:"e1o28dc90"})({name:"156064h",styles:"min-width:unset;width:41px;height:41px;padding:0"});function jo(e){var t=e.addon,r=e.billingPeriod,i=e.addonState,o=e.initialAddonState,l=e.setAddon,c=e.removeAddon,s=e.checkoutLocalization,u=t.pricePoints.find((function(e){return e.billingPeriod===r})),d=!!i,p=!!i&&!!o&&i.quantity!==o.quantity||!o&&!!i||!!o&&!i,m=function(e){l(t,e||1)};return a.createElement(Io,{container:!0},a.createElement(f.Grid,{item:!0},a.createElement(le,{variant:"h6",lineHeight:"24px"},t.displayName),!!u&&a.createElement(le,{variant:"body1",lineHeight:"20px",color:"secondary"},Ie({amount:u.amount,currency:u.currency})+"/"+(r===n.BillingPeriod.Annually?"year":"month"))),a.createElement(f.Grid,{item:!0},p&&a.createElement(Aa,{variant:"text",size:"small",sx:{padding:"8px",minWidth:"unset"},onClick:function(){o?l(t,o.quantity):c(t.id)}},a.createElement(le,{color:"primary.main",variant:"body1"},"Undo")),d&&a.createElement(a.Fragment,null,a.createElement(Ma,{id:t.id+"-input",type:"number",sx:{width:120,marginX:2},value:(null==i?void 0:i.quantity)||1,onChange:function(e){var t,n;return m(null!=e&&null!=(t=e.target)&&t.value?Number(null==e||null==(n=e.target)?void 0:n.value):1)}}),a.createElement(Oo,{color:"error",onClick:function(){return c(t.id)}},a.createElement(vr,{icon:"Trash",style:{display:"flex"}}))),!d&&a.createElement(Aa,{sx:{paddingX:"22px",paddingY:"8px"},onClick:function(){return m()}},s.addAddonText)))}function Ro(){var e,t=Wi().checkoutLocalization,n=Zi().billingPeriod,r=Z({},la()[0].addonsStep,{setAddon:(e=la()[1],function(t,n){return e((function(e){var r=e.addonsStep.addons.find((function(e){return e.addon.id===t.id}));r?r.quantity=n:(e.addonsStep.addons.push({addon:t,quantity:n}),e.addonsStep.addons=Ri(e.addonsStep.addons))}))}),removeAddon:_i()}),i=r.initialAddons,o=r.addons,l=r.availableAddons,c=r.setAddon,s=r.removeAddon;return a.createElement(Do,{container:!0},null==l?void 0:l.map((function(e){var r=o.find((function(t){return t.addon.id===e.id})),l=null==i?void 0:i.find((function(t){return t.addon.id===e.id}));return a.createElement(jo,{key:e.id,addon:e,billingPeriod:n,addonState:r,initialAddonState:l,setAddon:c,removeAddon:s,checkoutLocalization:t})})))}var qo,Go=W(f.Grid)(Uo||(Uo=Q(["\n padding: 8px;\n border-radius: 10px;\n border: 1px solid ",";\n cursor: ",";\n"])),(function(e){return e.theme.stigg.palette.outlinedBorder}),(function(e){return e.$disabled?"not-allowed":"pointer"})),_o=W(Go)(Lo||(Lo=Q(["\n flex-direction: column;\n align-items: unset;\n"]))),Wo=W(f.Grid)(No||(No=Q(["\n display: flex;\n align-items: center;\n flex: 1;\n gap: 12px;\n"]))),Ho=W(f.Grid)(Fo||(Fo=Q(["\n display: flex;\n flex-direction: column;\n"])));function Vo(e){var t=e.icon,n=e.text,r=e.subtitle;return a.createElement(Wo,null,a.createElement(f.Radio,{checked:e.checked,disabled:e.readOnly}),a.createElement(vr,{icon:t,style:{display:"flex"}}),a.createElement(Ho,{container:!0},a.createElement(f.Grid,{item:!0},n),r&&a.createElement(f.Grid,{item:!0},r)))}function zo(e){var t=e.paymentMethodDetails,n=e.readOnly;if(!t)return null;var r=t.expirationMonth,i=t.expirationYear;return a.createElement(Go,{item:!0,onClick:e.onSelect,$disabled:n},a.createElement(Vo,{checked:e.checked,readOnly:n,icon:"PaymentMethod",text:a.createElement(le,{variant:"h6"},"Card ending in "+t.last4Digits),subtitle:!!r&&!!i&&a.createElement(le,{variant:"body1"},"Expires "+r.toString().padStart(2,"0")+"/"+i)}))}function $o(e){var t=e.checked,n=e.readOnly,r=e.onBillingAddressChange;return a.createElement(_o,{item:!0,onClick:e.onSelect,$disabled:n},a.createElement(Vo,{checked:t,readOnly:n,icon:"PaymentMethod",text:a.createElement(le,{variant:"h6"},e.checkoutLocalization.newPaymentMethodText)}),a.createElement(f.Collapse,{in:t},a.createElement(Ha,{onBillingAddressChange:r})))}var Zo=W(f.Grid)(qo||(qo=Q(["\n display: flex;\n flex-direction: column;\n gap: 24px;\n margin: 32px 0;\n"])));function Yo(e){var t=e.onBillingAddressChange,n=Wi(),r=n.checkoutLocalization,i=n.widgetState,o=(n.checkoutState||{}).customer,l=aa(),c=l.errorMessage,s=l.useNewPaymentMethod,u=l.setUseNewPaymentMethod,d=i.readOnly,p=function(e){d||u(e)};return a.createElement(Zo,{container:!0},!!c&&a.createElement(f.Alert,{severity:"error",sx:{alignItems:"center"}},a.createElement(le,{overrideColor:"inherit"},c)),a.createElement(zo,{readOnly:d,checked:!s,paymentMethodDetails:null==o?void 0:o.paymentMethodDetails,onSelect:function(){return p(!1)}}),a.createElement($o,{readOnly:d,checked:s,checkoutLocalization:r,onSelect:function(){return p(!0)},onBillingAddressChange:t}))}function Qo(e){switch(e){case n.BillingPeriod.Annually:return"Annual";case n.BillingPeriod.Monthly:return"Monthly";default:return""}}var Ko,Xo=o(f.Box,{target:"ekae5v44"})({name:"1k6141t",styles:"margin:16px 0"}),Jo=o("button",{target:"ekae5v43"})("cursor:",(function(e){return e.$disabled?"default":"pointer"}),";flex:1;display:flex;align-items:center;justify-content:flex-start;padding:8px 8px 8px 4px;border-radius:10px;border:",(function(e){var t=e.theme;return"1px solid "+(e.$isActive?t.stigg.palette.outlinedRestingBorder:t.stigg.palette.outlinedBorder)}),";background:",(function(e){return e.$isActive?e.theme.stigg.palette.backgroundSection:"transparent"}),";text-transform:none;text-align:start;&.MuiButton-root{padding:0 16px 0 8px;&:hover{background:none;}}"),el=o(f.Box,{target:"ekae5v42"})({name:"1neb8ay",styles:"display:flex;gap:16px;margin-top:16px"}),tl=function(e){var t=e.billingPeriod,n=Zi(),r=n.setBillingPeriod,i=n.billingPeriod===t;return a.createElement(Jo,{onClick:function(){return r(t)},$isActive:i},a.createElement(f.Radio,{checked:i,onChange:function(){return r(t)},value:t,inputProps:{"aria-label":Qo(t)}}),a.createElement(f.Box,null,a.createElement(le,{variant:"h6",color:"primary",fontWeight:l.FontWeight.Medium},Qo(t))))},nl=function(e){var t=e.plan,r=e.checkoutLocalization,i=g.partition(null==t?void 0:t.pricePoints,(function(e){return e.billingPeriod===n.BillingPeriod.Monthly})),o=i[0],c=i[1];return a.createElement(Xo,null,a.createElement(le,{variant:"h6",color:"primary",fontWeight:l.FontWeight.Medium},r.billingPeriodsTitle),a.createElement(el,null,!(null==o||!o.length)&&a.createElement(tl,{key:n.BillingPeriod.Monthly,billingPeriod:n.BillingPeriod.Monthly}),!(null==c||!c.length)&&a.createElement(tl,{key:n.BillingPeriod.Annually,billingPeriod:n.BillingPeriod.Annually})))},rl=W.div(Ko||(Ko=Q(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n min-height: 60px;\n margin-top: 16px;\n"])));function il(e){var t,r,i,o,l=e.charge,c=e.isValid,s=e.setBillableFeature,u=e.billableFeature,d=e.onValidationChange,p=null==(t=l.feature)?void 0:t.featureId,m=!p,g=l.pricingModel===n.BillingModel.UsageBased,h=m?"Base charge":null==(r=l.feature)?void 0:r.displayName,y=!!(null!=l&&l.minUnitQuantity||null!=l&&l.maxUnitQuantity);if(m||g)o=""+Ie({amount:l.amount,currency:l.currency,locale:"en-us"}),g&&(o+=" / unit");else if(l.isTieredPrice){var v=we(l.tiers,u.quantity||1);o=a.createElement(qe,{componentId:p+"-tiers",tiers:l.tiers,tierUnits:Ee(l),selectedTier:v,handleTierChange:function(e){s(p,e.upTo)}})}else o=a.createElement(Ma,{sx:{width:145},id:p+"-input",type:"number",InputProps:y?{inputProps:{min:l.minUnitQuantity,max:l.maxUnitQuantity}}:{},error:!c,helperText:c?"":"Not a valid value",FormHelperTextProps:{sx:{margin:"4px"}},value:(null==u?void 0:u.quantity)||l.minUnitQuantity||"",onChange:function(e){var t,n;if(!m&&p){var r=null!=e&&null!=(t=e.target)&&t.value?Number(null==e||null==(n=e.target)?void 0:n.value):l.minUnitQuantity;if(!r||r<=0)return d({featureId:p,isValid:!1}),void s(p,null);d({featureId:p,isValid:!0});var i=Vi(l,r);s(p,i)}}});return a.createElement(rl,null,a.createElement(f.Box,{display:"flex",flexDirection:"column"},a.createElement(le,{variant:"h6",color:"primary",lineHeight:"24px"},h),y&&a.createElement(le,{variant:"body1",color:"secondary",lineHeight:"20px"},te(l.minUnitQuantity,l.maxUnitQuantity,null==(i=l.feature)?void 0:i.unitsPlural))),a.createElement(le,{variant:"h6",color:"primary"},o))}function al(e){var t,n=e.plan,r=e.billingPeriod,o=Zi(),l=o.billableFeatures,c=o.setBillableFeature,s=ea().setIsDisabled,u=Sa((null==n||null==(t=n.pricePoints)?void 0:t.filter((function(e){return e.billingPeriod===r})))||[]),d=i.useState(null==u?void 0:u.reduce((function(e,t){var n;return e[(null==(n=t.feature)?void 0:n.featureId)||"base-charge"]=!0,e}),{})),p=d[0],m=d[1];return i.useEffect((function(){var e=Object.values(p).some((function(e){return!e}));s(e)}),[p,s]),a.createElement("div",null,null==u?void 0:u.map((function(e){var t,n,r=l.find((function(t){var n;return t.featureId===(null==(n=e.feature)?void 0:n.featureId)}));return a.createElement(il,{key:(null==(t=e.feature)?void 0:t.featureId)||"base-charge",charge:e,setBillableFeature:c,billableFeature:r,isValid:p[(null==(n=e.feature)?void 0:n.featureId)||"base-charge"],onValidationChange:function(e){var t=e.featureId,n=e.isValid;return m((function(e){var r;return Z({},e,((r={})[t]=n,r))}))}})})))}var ol=o(f.Box,{target:"emtnukp0"})({name:"1d3w5wq",styles:"width:100%"}),ll=function(){var e=Wi(),t=e.checkoutLocalization,n=(e.checkoutState||{}).plan,r=Zi().billingPeriod;return a.createElement(ol,null,a.createElement(nl,{plan:n,checkoutLocalization:t}),a.createElement(al,{plan:n,billingPeriod:r}))},cl=o(f.Box,{target:"eaawmuo2"})({name:"zjik7",styles:"display:flex"}),sl=o(f.Alert,{target:"eaawmuo1"})({name:"18uqayh",styles:"margin-bottom:16px"}),ul=o(f.Box,{target:"eaawmuo0"})("padding:16px;border-radius:10px;width:100%;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";"),dl=function(e){var t=e.planName,n=e.totalPrice,r=e.billingPeriod,i=n?Ie({amount:n.amount,currency:n.currency}):"Free",o=r?" / Paid "+r.toLowerCase():"";return a.createElement(ul,{className:"stigg-checkout-free-downgrade-plan-box"},a.createElement(le,{className:"stigg-checkout-downgrade-to-free-text-plan",color:"secondary"},t),a.createElement("div",null,a.createElement(le,{className:"stigg-checkout-downgrade-to-free-text-price",span:!0,bold:!0,variant:"h3",color:"primary"},i),a.createElement(le,{className:"stigg-checkout-downgrade-to-free-text-billing-period",span:!0,color:"secondary"},o)))},pl=function(e){var t,n=e.activeSubscription,r=e.freePlan;return a.createElement(a.Fragment,null,a.createElement(sl,{className:"stigg-checkout-downgrade-to-free-alert",severity:"info"},a.createElement(le,{color:"secondary"},e.checkoutLocalization.downgradeToFreeAlertText({plan:n.plan}))),a.createElement(cl,{className:"stigg-checkout-downgrade-to-free-plans-container"},a.createElement(dl,{planName:n.plan.displayName,totalPrice:null==(t=n.totalPrice)?void 0:t.total,billingPeriod:n.prices[0].billingPeriod}),a.createElement(Bo,{className:"stigg-checkout-downgrade-to-free-arrow",style:{margin:"auto 16px",minWidth:"16px"}}),a.createElement(dl,{planName:r.displayName})))};function ml(e){var t=e.onCheckout,r=e.onCheckoutCompleted,o=e.onChangePlan,l=e.onBillingAddressChange,c=e.disablePromotionCode,s=function(){var e=i.useState(null),t=e[0],r=e[1],a=Wi().checkoutState||{},o=a.billingIntegration,l=a.setupSecret;return i.useEffect((function(){if(o){var e=o.credentials;if(o.billingIdentifier!==n.BillingVendorIdentifier.Stripe)return void console.error("Currently only stripe integration is supported");r(H.loadStripe(e.publicKey,{stripeAccount:e.accountId}))}}),[o]),{stripePromise:t,setupIntentClientSecret:l}}(),u=s.stripePromise,d=s.setupIntentClientSecret,p=la()[0],m=p.stiggTheme,g=p.widgetState,h=ea().currentStep,f=g.isLoadingCheckoutData,y=Wi(),v=y.checkoutLocalization,b=y.checkoutState||{},x=b.plan,E=b.activeSubscription,w=!!x&&x.pricingType===n.PricingType.Free&&!!E&&E.pricingType!==n.PricingType.Free,k=function(e,t){var n=t.onBillingAddressChange;switch(e.key){case Hi.PLAN:return{allowChangePlan:!0,content:a.createElement(ll,null)};case Hi.ADDONS:return{content:a.createElement(Ro,null)};case Hi.PAYMENT:return{content:a.createElement(Yo,{onBillingAddressChange:n})};default:return{content:null}}}(h,{onBillingAddressChange:l}),P=k.content,C=k.allowChangePlan,S=a.createElement(a.Fragment,null,w?a.createElement(pl,{checkoutLocalization:v,freePlan:x,activeSubscription:E}):a.createElement(a.Fragment,null,a.createElement(Mo,{allowChangePlan:C,onChangePlan:o}),P));return a.createElement(G.Elements,{stripe:u,options:{clientSecret:d,appearance:{theme:"stripe",variables:{colorText:m.palette.text.primary,colorPrimaryText:m.palette.text.primary,colorTextPlaceholder:m.palette.text.disabled,fontFamily:m.typography.fontFamily}}}},a.createElement(ga,{className:"stigg-checkout-layout"},!w&&a.createElement(Pa,null),a.createElement(ha,null,a.createElement(fa,null,f?a.createElement(La,null):S),f?a.createElement(Po,null):a.createElement(ko,{disablePromotionCode:c,onCheckout:t,onCheckoutCompleted:r,isFreeDowngrade:w}))))}var gl,hl=["textOverrides","theme","resourceId","planId","preferredBillingPeriod","billingCountryCode","billableFeatures","billingInformation"];(gl=exports.ProvisionStatus||(exports.ProvisionStatus={})).IN_PROGRESS="IN_PROGRESS",gl.SUCCEEDED="SUCCEEDED",gl.FAILED="FAILED",Object.keys(n).forEach((function(e){"default"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})})),exports.AddonsList=rn,exports.Checkout=function(e){var t=e.textOverrides,n=e.theme,r=e.resourceId,i=e.planId,o=e.preferredBillingPeriod,l=e.billingCountryCode,c=e.billableFeatures,s=e.billingInformation,u=Y(e,hl);return a.createElement(sa,{textOverrides:t,theme:n,resourceId:r,planId:i,preferredBillingPeriod:o,billingCountryCode:l,billableFeatures:c,billingInformation:s},a.createElement(ml,Object.assign({},u)))},exports.CustomerPortal=function(e){var t=e.textOverrides,n=e.theme,r=e.resourceId,i=e.productId,o=Y(e,Oi);return a.createElement(Zt,{textOverrides:t,theme:n,resourceId:r,productId:i},a.createElement(Ii,Object.assign({},o)))},exports.CustomerPortalProvider=Zt,exports.CustomerUsageData=Di,exports.InvoicesSection=ji,exports.PaymentDetailsSection=Si,exports.Paywall=function(e){var t=e.productId,r=e.resourceId,o=e.highlightedPlanId,l=e.showOnlyEligiblePlans,c=e.textOverrides,s=e.onPlanSelected,d=e.preferredBillingPeriod,g=e.onBillingPeriodChange,h=e.billingCountryCode,f=!!i.useContext(zt),y=!1;if(f){var v=$t();y=v.isLoading,r=v.resourceId}var b=function(e){var t=e.productId,r=e.resourceId,a=e.showOnlyEligiblePlans,o=e.billingCountryCode,l=e.preferredBillingPeriod,c=Pt(),s=c.stigg,u=c.locale,d=i.useState(n.BillingPeriod.Annually),g=d[0],h=d[1],f=i.useState([]),y=f[0],v=f[1],b=i.useState(null),x=b[0],w=b[1],k=i.useState(!0),P=k[0],C=k[1];i.useEffect((function(){!function(){var e=$(Et.mark((function e(){var n,i,a,c;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,C(!0),e.next=4,s.waitForInitialization();case 4:return e.next=6,s.getPaywall({productId:t,resourceId:r,billingCountryCode:o});case 6:i=Ct((n=e.sent).plans,n.activeSubscriptions,l),a=i.availableBillingPeriods,c=i.defaultBillingPeriod,w(n),v(a),h(c),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),wt.error("Failed to load paywall "+(null==e.t0?void 0:e.t0.message),e.t0);case 16:return e.prev=16,C(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,13,16,19]])})));return function(){return e.apply(this,arguments)}}()()}),[s,t,s.isCustomerLoaded,o,r]);var S=function(e,t){var r,i=e||{},a=i.plans,o=i.currency,l=i.configuration,c=i.customer,s=i.paywallCalculatedPricePoints,u=function(e){var t,r,i,a=!0,o=(null==e?void 0:e.find((function(e){return e.status===n.SubscriptionStatus.InTrial})))||null,l=null==(t=o)?void 0:t.plan,c=null!=(r=o)&&r.trialEndDate?p.utc(o.trialEndDate).diff(p.utc(),"days",!1)+1:void 0;return l||(a=!1,l=null==(i=o=(null==e?void 0:e.find((function(e){return e.status===n.SubscriptionStatus.Active})))||null)?void 0:i.plan),{currentSubscription:o,currentPlan:l,isCustomerOnTrial:a,trialDaysLeft:c}}(i.activeSubscriptions),d=u.currentSubscription,g=u.currentPlan,h=u.isCustomerOnTrial,f=u.trialDaysLeft,y=(null==d?void 0:d.scheduledUpdates)||[],v=null==d||null==(r=d.price)?void 0:r.billingPeriod,b=y.find((function(e){return e.subscriptionScheduleType===n.SubscriptionScheduleType.Downgrade})),x=y.find((function(e){return e.subscriptionScheduleType===n.SubscriptionScheduleType.BillingPeriod})),w=E(a,(function(e){return e.order})).map((function(e){var t,n=null==c||null==(t=c.eligibleForTrial)?void 0:t.find((function(t){return t.productId===e.product.id})),r=e.id===(null==g?void 0:g.id);return Z({},e,{paywallCalculatedPricePoints:null==s?void 0:s.filter((function(t){return t.planId===e.id})),isTriable:!m(e.defaultTrialConfig)&&(!n||n.eligible),isCurrentCustomerPlan:r,currentCustomerPlanBillingPeriod:v,isUpcomingPlan:!1,trialDaysLeft:f,isNextPlan:function(t){var n,i=null==b?void 0:b.scheduleVariables,a=null==x?void 0:x.scheduleVariables,o=e.pricePoints.some((function(e){return e.billingPeriod===t}));return b?(null==(n=b.targetPackage)?void 0:n.refId)===e.id&&(!o||i.billingPeriod===t):!(!x||!r)&&a.billingPeriod===t},paywallCurrency:o,scheduledUpdate:b||x})}));if(a&&g){var k,P=g&&(null==a||null==(k=a.find((function(e){return e.id===(null==g?void 0:g.id)})))?void 0:k.order);m(P)||(w=w.map((function(e){return Z({},e,{isLowerThanCurrentPlan:P>e.order})})),t&&(w=w.filter((function(e){return e.order>P}))))}var C=l?function(e){var t=e.palette,n=e.layout;return{customCss:e.customCss||void 0,palette:{primary:(null==t?void 0:t.primary)||void 0,backgroundPaper:(null==t?void 0:t.backgroundColor)||void 0,outlinedBorder:(null==t?void 0:t.borderColor)||void 0,backgroundHighlight:(null==t?void 0:t.currentPlanBackground)||void 0,text:{primary:(null==t?void 0:t.textColor)||void 0}},typography:Bt(e.typography),layout:{ctaAlignment:At(null==n?void 0:n.alignment),headerAlignment:At(null==n?void 0:n.alignment),descriptionAlignment:At(null==n?void 0:n.alignment),planMaxWidth:St(null==n?void 0:n.planWidth),planMinWidth:St(null==n?void 0:n.planWidth),planMargin:St(null==n?void 0:n.planMargin),planPadding:St(null==n?void 0:n.planPadding)}}}(l):void 0;return{currentPlan:g,currentSubscription:d,isCustomerOnTrial:h,plans:w,paywallConfiguration:C}}(x,a);return Z({customer:(null==x?void 0:x.customer)||null,isLoading:P,selectedBillingPeriod:g,setSelectedBillingPeriod:h,availableBillingPeriods:y,locale:u,configuration:S.paywallConfiguration},S)}({productId:t,resourceId:r,showOnlyEligiblePlans:l,billingCountryCode:h,preferredBillingPeriod:d}),x=b.plans,w=b.customer,k=b.currentSubscription,P=b.isCustomerOnTrial,C=b.isLoading,S=b.selectedBillingPeriod,T=b.setSelectedBillingPeriod,B=b.availableBillingPeriods,A=b.locale,M=b.configuration,U=u({highlightChip:"Recommended",planCTAButton:{upgrade:"Upgrade",downgrade:"Downgrade",startTrial:function(e){var t;return"Start "+(null==(t=e.defaultTrialConfig)?void 0:t.duration)+" day trial"},custom:"Contact us",currentPlan:"Current plan",startNew:"Get started",switchToBillingPeriod:function(e){return e===n.BillingPeriod.Monthly?"Switch to monthly billing":"Switch to annual billing"},cancelScheduledUpdate:"Cancel"},price:{startingAtCaption:"Starts at",pricePeriod:function(e){return e===n.BillingPeriod.Monthly?"/ month":"/ year"},free:function(e){return{price:(null==e?void 0:e.symbol)+"0"}},custom:"Custom",priceNotSet:"Price not set"}},c),L=!x||C||y?a.createElement(Rt,null):a.createElement(xt,{plans:x,customer:w,currentSubscription:k,selectedBillingPeriod:S,onBillingPeriodChanged:function(e){T(e),g&&g(e)},availableBillingPeriods:B,highlightedPlanId:o,isLoading:C,isCustomerOnTrial:P,onPlanSelected:s,paywallLocale:U,locale:A});return f?L:a.createElement(Vt,{componentTheme:M},L)},exports.Promotions=on,exports.StiggContext=kt,exports.StiggProvider=function(e){var t=e.apiKey,n=e.baseUri,o=e.baseEdgeUri,l=e.enableEdge,c=e.customerId,s=e.customerToken,u=e.resourceId,d=e.theme,p=e.locale,m=e.useEntitlementPolling,g=e.entitlementPollingInterval,h=e.entitlementsFallback,f=e.stiggClient,y=e.children,v=i.useRef(t),x={apiKey:t,customerId:c,customerToken:s,resourceId:u,baseUri:n,baseEdgeUri:o,enableEdge:l,entitlementsFallback:h,useEntitlementPolling:m,entitlementPollingInterval:g},E=i.useState((function(){return{stigg:null!=f?f:r.initialize(Z({},x,{lazyLoad:!0})),locale:p||"en-US",isInitialized:!1,theme:d,refreshData:(e=$(Et.mark((function e(){return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k((function(e){return Z({},e,{customerPortalUpdatedAt:new Date})})),e.next=3,w.stigg.refresh();case 3:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})};var e})),w=E[0],k=E[1];return i.useEffect((function(){var e=!0,n=function(t){e&&k(t)},i=function(){return n((function(e){return Z({},e,{updatedAt:new Date})}))},a=function(e){return n((function(t){return t.stigg&&t.stigg.removeListener("entitlementsUpdated",i),e.addListener("entitlementsUpdated",i),Z({},t,{stigg:e,isInitialized:!0,updatedAt:new Date})}))};return function(){var e=$(Et.mark((function e(){var i;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=w.stigg,t!==v.current&&(wt.log("Updating stigg client",{apiKey:t}),v.current=t,i=r.initialize(Z({},x)),n((function(e){return Z({},e,{isInitialized:!1,updatedAt:new Date})}))),e.next=4,i.waitForInitialization();case 4:a(i);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()(),function(){e=!1,w.stigg.removeListener("entitlementsUpdated",i),w.stigg.clearCustomer()}}),[t]),i.useEffect((function(){var e=w.stigg;c?e.setCustomerId(c,s,u):e.clearCustomer()}),[c,s,u]),i.useEffect((function(){k((function(e){return Z({},e,{theme:d})}))}),[d]),a.createElement(kt.Provider,{value:w},a.createElement(b.SkeletonTheme,{baseColor:"#F5F6F9",highlightColor:"#e5e6ea"},y))},exports.SubscriptionsOverview=hi,exports.useStiggContext=Pt,exports.useWaitForCheckoutCompleted=function(e){var t,n=void 0===e?{}:e,r=n.onProvisionStart,a=n.onProvisionSucceeded,o=n.onProvisionFailed,l=Pt().stigg,c=i.useState(exports.ProvisionStatus.IN_PROGRESS),s=c[0],u=c[1],d=i.useState(!1),p=d[0],m=d[1],g=i.useMemo((function(){var e=new URLSearchParams(window.location.search);return t?e.get(t):e}),[t="checkoutCompleted",window.location.search]);return i.useEffect((function(){!function(){var e=$(Et.mark((function e(){var t;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g&&"false"!==g.toLowerCase()&&!p){e.next=2;break}return e.abrupt("return");case 2:return m(!0),r&&r(),e.prev=4,e.next=7,l.waitForCheckoutCompleted();case 7:t=e.sent,u(exports.ProvisionStatus.SUCCEEDED),a&&a(t),e.next=17;break;case 12:e.prev=12,e.t0=e.catch(4),console.error("Failed to wait for checkout to complete",e.t0),u(exports.ProvisionStatus.FAILED),o&&o(e.t0);case 17:return e.prev=17,m(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[4,12,17,20]])})));return function(){return e.apply(this,arguments)}}()()}),[l,g]),{isAwaitingCheckout:p,provisionStatus:s}};
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t,n=require("@stigg/js-client-sdk"),r=e(n),i=require("react"),a=e(i),o=e(require("@emotion/styled/base")),l=require("styled-typography"),c=require("@emotion/react"),s=e(require("color")),u=e(require("lodash/merge")),d=e(require("react-spinners/ClipLoader")),p=e(require("moment")),m=e(require("lodash/isNil")),g=require("lodash"),h=e(require("classnames")),f=require("@mui/material"),y=e(require("currency-symbol-map")),v=e(require("react-switch")),b=require("react-loading-skeleton"),x=e(b),E=e(require("lodash/sortBy")),w=require("styled-components"),k=e(w),P=require("@mui/material/styles"),C=e(require("@mui/material/Button")),S=e(require("lodash/flatMap")),T=e(require("@mui/material/Box")),B=e(require("@mui/material/Tab")),A=e(require("lodash/isEmpty")),M=e(require("@mui/material/Tabs")),U=require("react-feather"),L=e(require("@mui/material/LinearProgress")),N=e(require("lodash/isUndefined")),F=e(require("lodash/lowerCase")),O=require("immer"),I=e(require("lodash/cloneDeep")),D=e(require("lodash/remove")),j=e(require("lodash/keyBy")),q=e(require("lodash/compact")),R=require("@stigg/api-client-js/src/generated/sdk"),G=require("@stripe/react-stripe-js"),_=e(require("lodash/partition")),W=e(require("@emotion/styled")),H=require("@stripe/stripe-js"),V=e(require("react-lottie"));function z(e,t,n,r,i,a,o){try{var l=e[a](o),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,i)}function $(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){z(a,r,i,o,l,"next",e)}function l(e){z(a,r,i,o,l,"throw",e)}o(void 0)}))}}function Z(){return(Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Y(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}function Q(e,t){return t||(t=e.slice(0)),e.raw=t,e}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function X(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return K(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function J(){return(J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ee=function(e){return i.createElement("svg",J({width:15,height:11,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=i.createElement("path",{d:"M5.59 7.99 2.125 4.525A1 1 0 1 0 .71 5.94l4.88 4.88 8.705-8.705a.997.997 0 0 0-1.41-1.41L5.59 7.99Z",fill:"#B2BBD3"})))};function te(e,t,n){var r=n?" "+n:"";return e&&1!==e||!t?e&&e>1&&t?e+"-"+t+r:e&&e>1?"Minimum "+e+r:"":"Up to "+t+r}var ne=["children","span","style","fontWeight","variant","color","overrideColor","bold"];function re(e,t){switch(t){case"white":return"white";case"primary.main":return e.stigg.palette.primary;case"warning":return e.stigg.palette.warning;case"error":return e.stigg.palette.error;default:return e.stigg.palette.text[t]}}var ie=o(l.Text,{target:"ewjez2x0"})("margin:0;",(function(e){return e.$span&&"display: inline"}),";");function ae(e){switch(e){case"bold":return l.FontWeight.Bold;case"normal":default:return l.FontWeight.Normal}}function oe(e,t){var n=e.stigg.typography;switch(t){case"h1":return ae(n.h1.fontWeight);case"h3":return ae(n.h2.fontWeight);case"h6":return ae(n.h3.fontWeight);case"body1":return ae(n.body.fontWeight);case"caption":return ae(n.caption.fontWeight);default:return l.FontWeight.Normal}}var le=i.forwardRef((function(e,t){var n=e.children,r=e.span,i=e.style,o=e.fontWeight,s=e.variant,u=void 0===s?"body1":s,d=e.color,p=void 0===d?"primary":d,m=e.overrideColor,g=e.bold,h=Y(e,ne),f=c.useTheme(),y=function(e){switch(e){case"h1":return 1;case"h3":return 2;case"h6":return 3;case"body1":return 4;case"caption":return 5;default:return 3}}(u),v="typography-level-"+y;return a.createElement(ie,Object.assign({ref:t},h,{className:e.className?e.className+" "+v:v,style:i,level:y,color:m||re(f,p),fontWeight:null!=o?o:g?l.FontWeight.Bold:oe(f,u),$span:r}),n)})),ce=["displayNameOverride"],se=o(le,{target:"e1mddeqb2"})({name:"ti75j2",styles:"margin:0"}),ue=o("div",{target:"e1mddeqb1"})({name:"s5xdrg",styles:"display:flex;align-items:center"}),de=o(ee,{target:"e1mddeqb0"})("margin-right:16px;flex-shrink:0;*{fill:",(function(e){return e.theme.stigg.palette.text.disabled}),";}");function pe(e){var t=e.displayNameOverride,r=function(e){var t=e.hasUnlimitedUsage,r=e.feature,i=e.resetPeriod,a=e.usageLimit,o=e.minUnitQuantity,l=e.maxUnitQuantity,c=e.isCustom,s=o||l,u=i&&a?""+function(e){if(!e)return"";switch(e){case n.EntitlementResetPeriod.Day:return"per day";case n.EntitlementResetPeriod.Hour:return"per hour";case n.EntitlementResetPeriod.Week:return"per week";case n.EntitlementResetPeriod.Month:return"per month"}}(i):"";if(t)return"Unlimited "+(null==r?void 0:r.unitsPlural);if(c)return"Custom "+(null==r?void 0:r.unitsPlural);if(a){var d=1===a?null==r?void 0:r.units:null==r?void 0:r.unitsPlural;return function(e){return e.toLocaleString("en-US",{maximumFractionDigits:0})}(a)+" "+d+" "+u}return s?te(o,l,null==r?void 0:r.unitsPlural):null==r?void 0:r.displayName}(Y(e,ce));return a.createElement(ue,{className:"stigg-entitlement-row-container"},a.createElement(de,{className:"stigg-entitlement-row-icon"}),a.createElement(se,{className:"stigg-entitlement-name",variant:"h6",color:"secondary"},t||r))}var me,ge=o("div",{target:"e1yz7zcg0"})({name:"budh8k",styles:"display:flex;flex-direction:column;gap:16px"});function he(e){var t,r=e.plan,i=e.billingPeriod,o=e.paywallLocale,l=null==(t=r.pricePoints)?void 0:t.filter((function(e){return e.billingPeriod===i})),c=null==l?void 0:l.map((function(e){var t;return(null==e?void 0:e.minUnitQuantity)&&(null==e?void 0:e.minUnitQuantity)>1||(null==e?void 0:e.maxUnitQuantity)?a.createElement(pe,{key:"priceUnitEntitlement-"+(null==e||null==(t=e.feature)?void 0:t.displayName),feature:null==e?void 0:e.feature,minUnitQuantity:null==e?void 0:e.minUnitQuantity,maxUnitQuantity:null==e?void 0:e.maxUnitQuantity}):null}));return a.createElement(ge,{className:"stigg-plan-entitlements-container"},a.createElement(le,{className:"stigg-plan-entitlements-title",color:"secondary",variant:"h6",bold:!0},function(e,t){if(t.entitlementsTitle)return t.entitlementsTitle(e);var n=e.displayName+" includes";return e.basePlan&&(n="Everything in "+e.basePlan.displayName+", plus:"),n}(r,o)),c,r.entitlements.filter((function(e){return!(e.hiddenFromWidgets||[]).includes(n.WidgetType.Paywall)})).map((function(e){var t;return a.createElement(pe,{key:null==(t=e.feature)?void 0:t.id,displayNameOverride:e.displayNameOverride,feature:e.feature,resetPeriod:e.resetPeriod,hasUnlimitedUsage:e.hasUnlimitedUsage,usageLimit:e.usageLimit,isCustom:e.isCustom})})))}(me=exports.SubscribeIntentionType||(exports.SubscribeIntentionType={})).START_TRIAL="START_TRIAL",me.UPGRADE_TRIAL_TO_PAID="UPGRADE_TRIAL_TO_PAID",me.REQUEST_CUSTOM_PLAN_ACCESS="REQUEST_CUSTOM_PLAN_ACCESS",me.CHANGE_BILLING_PERIOD="CHANGE_BILLING_PERIOD",me.CHANGE_UNIT_QUANTITY="CHANGE_UNIT_QUANTITY",me.UPGRADE_PLAN="UPGRADE_PLAN",me.DOWNGRADE_PLAN="DOWNGRADE_PLAN",me.CANCEL_SCHEDULED_UPDATES="CANCEL_SCHEDULED_UPDATES";var fe,ye,ve=function(e){return{left:"flex-start",center:"center",right:"flex-end"}[e]},be=function(e){return p.utc(e).format("MMMM Do, yyyy")};function xe(e){var t=e.scheduledUpdate,r=e.subscriptionPrices,i=e.billingPeriodRange,o=e.options,l=void 0===o?{}:o;if(!t)return{};var c=l.withDate,s=l.postfix,u=void 0===s?"":s;switch(t.subscriptionScheduleType){case n.SubscriptionScheduleType.Downgrade:var d,h=c;return m(h)&&null!=i&&i.end&&(h=!p(t.scheduledExecutionTime).isSame(null==i?void 0:i.end,"day")),{line1:a.createElement(a.Fragment,null,"Your subscription will be downgraded to the ",a.createElement("b",null,null==(d=t.targetPackage)?void 0:d.displayName," plan")," ",h?a.createElement(a.Fragment,null,"on ",be(t.scheduledExecutionTime)):u,"."),line2:"Until then you still have access to your current plan."};case n.SubscriptionScheduleType.BillingPeriod:var f;return{line1:a.createElement(a.Fragment,null,"Your billing cycle will change to ",a.createElement("b",null,null==(f=t.scheduleVariables.billingPeriod)?void 0:f.toLocaleLowerCase())," ",c?a.createElement(a.Fragment,null,"on ",be(t.scheduledExecutionTime)):u,".")};case n.SubscriptionScheduleType.UnitAmount:var y=t.scheduleVariables,v=g.compact(g.map(r,"feature")).find((function(e){return e.id===y.featureId}))||{},b=v.featureUnits,x=1===y.newUnitAmount?b:v.featureUnitsPlural;return{line1:a.createElement(a.Fragment,null,"Your subscription will be updated to ",a.createElement("b",null,y.newUnitAmount)," ",x," ",c?a.createElement(a.Fragment,null,"on ",be(t.scheduledExecutionTime)):u,"."),line2:"Until then you still have access to your current "+b+" count."};default:return{}}}function Ee(e){return e.feature&&(1!=e.feature.unitQuantity?e.feature.unitsPlural:e.feature.units)||""}function we(e,t){if(e){var n=[].concat(e);n.sort((function(e,t){return e.upTo-t.upTo}));for(var r,i=X(n);!(r=i()).done;){var a=r.value;if(t<=a.upTo)return a}return n[n.length-1]}}function ke(e,t,r,i){switch(e.tiersMode){case n.TiersMode.Volume:return(r===n.BillingPeriod.Annually&&i?t.unitPrice.amount/12:t.unitPrice.amount)*t.upTo}return 0}function Pe(e,t,r,i){var a=e.pricePoints.filter((function(e){return e.billingPeriod===t&&e.isTieredPrice}));if(1==a.length){var o,l=a[0],c=l.feature.featureId,s=l.tiers[0];if(i[c])s=(null==(o=l.tiers)?void 0:o.find((function(e){return e.upTo===i[c].upTo})))||s;else if(r){var u=r.prices.find((function(e){var t;return e.pricingModel==n.BillingModel.PerUnit&&e.tiersMode&&(null==(t=e.feature)?void 0:t.featureId)===c}));u&&(s=we(l.tiers,u.feature.unitQuantity||1))}var d={};return d[c]=s,d}return{}}!function(e){e[e.Lower=-1]="Lower",e[e.Equal=0]="Equal",e[e.Higher=1]="Higher"}(fe||(fe={}));var Ce,Se=o(d,{target:"e199qof96"})({name:"1a2afmv",styles:"margin-left:10px"}),Te=o("button",{target:"e199qof95"})("cursor:",(function(e){return e.$disabled?"default":"pointer"}),";padding:8px 12px;background-color:",(function(e){return e.theme.stigg.palette.backgroundButton}),";border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedRestingBorder}),";border-radius:10px;display:flex;align-items:center;justify-content:center;min-height:42px;min-width:120px;",(function(e){return e.$disabled&&c.css(ye||(ye=Q(["\n opacity: 0.5;\n "])))})," &:hover{background-color:",(function(e){var t=e.theme;return e.$disabled?t.stigg.palette.backgroundButton:t.stigg.palette.outlinedHoverBackground}),";}"),Be=o(le,{target:"e199qof94"})({name:"h05omw",styles:"margin:0;font-size:15px"}),Ae=o(le,{target:"e199qof93"})({name:"1cnls12",styles:"min-height:87px"}),Me=o("button",{target:"e199qof92"})("background:none;border:none;padding:0;color:",(function(e){return e.theme.stigg.palette.text.secondary}),";text-decoration:underline;cursor:pointer;"),Ue=o(le,{target:"e199qof91"})({name:"1etgg0o",styles:"margin-top:8px;margin-bottom:17px;min-height:20px"}),Le=o("div",{target:"e199qof90"})("display:flex;flex-direction:column;margin-top:4px;align-self:",(function(e){return ve(e.theme.stigg.layout.ctaAlignment)}),";width:100%;");function Ne(e){var t=e.isNextPlan,r=e.customer,o=e.plan,l=e.billingPeriod,s=e.isCustomerOnTrial,u=e.onPlanSelected,d=e.paywallLocale,p=e.hasTiersRow,m=e.withTrialLeftRow,h=e.currentSubscription,f=e.selectedTierByFeature,y=c.useTheme(),v=i.useState(!1),b=v[0],x=v[1],E=d.planCTAButton,w=E.currentPlan,k=E.custom,P=E.downgrade,C=E.startTrial,S=E.upgrade,T=E.startNew,B=E.switchToBillingPeriod,A=E.cancelScheduledUpdate,M=g.isFunction(P)?P(o):P,U=g.isFunction(S)?S(o):S,L={title:r?o.isLowerThanCurrentPlan?M:U:T,disabled:!1,intentionType:o.isLowerThanCurrentPlan?exports.SubscribeIntentionType.DOWNGRADE_PLAN:s?exports.SubscribeIntentionType.UPGRADE_TRIAL_TO_PAID:exports.SubscribeIntentionType.UPGRADE_PLAN},N=o.pricingType===n.PricingType.Custom,F=xe({scheduledUpdate:o.scheduledUpdate,options:{withDate:!0}}).line1;if(!o.isTriable||o.isCurrentCustomerPlan||s)if(o.isCurrentCustomerPlan&&!s)if(l===o.currentCustomerPlanBillingPeriod||o.pricingType&&[n.PricingType.Free,n.PricingType.Custom].includes(o.pricingType))switch(function(e,t){if(!t||!e)return fe.Equal;var r=t.prices.find((function(e){return e.pricingModel==n.BillingModel.PerUnit&&e.tiersMode}));if(!r)return fe.Equal;var i=r.feature,a=i.unitQuantity;if(!a)return fe.Equal;var o=e[i.featureId];return o?o.upTo<a?fe.Lower:o.upTo>a?fe.Higher:fe.Equal:fe.Equal}(f,h)){case fe.Lower:L.intentionType=exports.SubscribeIntentionType.CHANGE_UNIT_QUANTITY,L.title=M;break;case fe.Higher:L.intentionType=exports.SubscribeIntentionType.CHANGE_UNIT_QUANTITY,L.title=U;break;default:L.title=w,L.disabled=!0}else L.title=B(l),L.intentionType=exports.SubscribeIntentionType.CHANGE_BILLING_PERIOD;else N&&(L.title=k,L.intentionType=exports.SubscribeIntentionType.REQUEST_CUSTOM_PLAN_ACCESS);else L.title=C(o),L.intentionType=exports.SubscribeIntentionType.START_TRIAL;t&&o.scheduledUpdate&&(L.disabled=!1,L.title=A,L.intentionType=exports.SubscribeIntentionType.CANCEL_SCHEDULED_UPDATES);var O=b||L.disabled;return a.createElement(a.Fragment,null,a.createElement(Le,{className:"stigg-paywall-plan-button-layout"},t&&F?a.createElement(Ae,{color:"secondary",variant:"body1",className:"stigg-paywall-schedule-update-text"},F," ",a.createElement(Me,{color:"secondary",onClick:function(){x(!0),Promise.resolve(u(L.intentionType)).finally((function(){return x(!1)}))}},L.title)):a.createElement(a.Fragment,null,a.createElement(Te,{className:"stigg-paywall-plan-button","data-testid":"paywall-card-cta-"+o.displayName,disabled:O,$disabled:O,onClick:function(){x(!0),Promise.resolve(u(L.intentionType)).finally((function(){return x(!1)}))}},a.createElement(Be,{className:"stigg-paywall-plan-button-text",variant:"h6",color:"primary.main"},L.title),b&&a.createElement(Se,{color:y.stigg.palette.text.disabled,loading:!0,size:16})),p&&!m?a.createElement("div",{style:{height:"20px"}}):a.createElement(Ue,{className:"stigg-trial-days-left-text",variant:"h6",color:"secondary"},o.isCurrentCustomerPlan&&o.trialDaysLeft&&a.createElement(a.Fragment,null,a.createElement("b",null,o.trialDaysLeft," days")," left on your free trial")))))}function Fe(){return(Fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Oe=function(e){return i.createElement("svg",Fe({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ce||(Ce=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.954 1.034A1 1 0 0 1 6.3 2.287a5.666 5.666 0 1 0 7.367 5.406 1 1 0 0 1 2 0c0 .23-.01.458-.03.684.01.072.012.147.006.223l-.004.049a1 1 0 0 1-.078.312A7.668 7.668 0 1 1 5.7.38a1 1 0 0 1 1.254.654Zm.614.239A1 1 0 0 1 8.648.36l.05.004a1 1 0 1 1-.182 1.992l-.037-.003a1 1 0 0 1-.911-1.081Zm4.85 1.636a1 1 0 0 1 1.41.11l.064.076a1 1 0 1 1-1.537 1.28 4.154 4.154 0 0 0-.047-.056 1 1 0 0 1 .11-1.41ZM9 5.334a1 1 0 0 0-2 0V8a1 1 0 0 0 1 1h2.667a1 1 0 1 0 0-2H9V5.334Z",fill:"#7586B0"})))},Ie=function(e){var t=e.amount,r=e.currency,i=e.locale,a=e.maximumFractionDigits,o=void 0===a?5:a,l=(void 0===r?n.Currency.Usd:r).toString(),c=y(l),s=new Intl.NumberFormat(i,Z({maximumFractionDigits:o,minimumFractionDigits:0,style:"currency",currency:l},c?{currencyDisplay:"code"}:{})).format(t||0);return c&&(s=s.replace(l,c)),s.replace(/\s/g,"")};function De(e,t,r,i,a,o){switch(e.pricingType){case n.PricingType.Free:return"function"==typeof r.price.free?r.price.free(e.paywallCurrency):r.price.free;case n.PricingType.Custom:return{price:r.price.custom};case n.PricingType.Paid:var l,c=e.pricePoints.filter((function(e){return e.billingPeriod===t})),s=null==(l=e.paywallCalculatedPricePoints)?void 0:l.find((function(e){return e.billingPeriod===t}));if(!(null!=c&&c.length||s))return{price:r.price.priceNotSet};var u={planPrices:c,paywallCalculatedPrice:s,selectedBillingPeriod:t,selectedTierByFeature:o||{}};return r.price.paid?r.price.paid(Z({},u,{plan:e})):function(e){for(var t,r,i,a=e.planPrices,o=e.selectedBillingPeriod,l=e.locale,c=e.shouldShowMonthlyPriceAmount,s=e.selectedTierByFeature,u=e.paywallCalculatedPrice||a[0],d=u.currency,p=u.amount||0,m=1===a.length,g=o===n.BillingPeriod.Annually&&c?p/12:p,h=e.paywallLocale.price.pricePeriod(c?n.BillingPeriod.Monthly:n.BillingPeriod.Annually),f=h,y=X(a);!(i=y()).done;){var v=i.value;if(v.isTieredPrice){var b=v.tiers[0];s[v.feature.featureId]&&(b=s[v.feature.featureId]||b,t=v.tiers,r=Ee(v)),g+=ke(v,b,o,c)}}if(m){var x,E=a[0],w=(null==(x=E.feature)?void 0:x.units)||"";E.pricingModel!==n.BillingModel.PerUnit||E.isTieredPrice?E.pricingModel===n.BillingModel.UsageBased&&(f="per "+w):f="per "+w+" "+h}return{price:Ie({amount:g,currency:d,locale:l}),unit:f,tiers:t,tierUnits:r}}(Z({},u,{locale:i,shouldShowMonthlyPriceAmount:a,paywallLocale:r}));default:return{price:""}}}var je=o(f.Select,{target:"eeq8l4e1"})("border-radius:10px;&:hover .MuiOutlinedInput-notchedOutline{border-color:",(function(e){return e.theme.stigg.palette.outlinedBorder}),";}"),qe=o(f.OutlinedInput,{target:"eeq8l4e0"})("& .MuiInputBase-input{padding:7px 12px;}&.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:",(function(e){return e.theme.stigg.palette.primary}),"!important;}");function Re(e){var t=e.componentId,n=e.tiers,r=e.tierUnits,i=e.selectedTier,o=e.handleTierChange;return a.createElement(le,{className:"stigg-price-tier-select",style:{minHeight:"46px"}},n?a.createElement(je,{value:i?i.upTo.toString():n[0].upTo.toString(),fullWidth:!0,onChange:function(e,t){n&&o(we(n,e.target.value))},id:t,input:a.createElement(qe,null),MenuProps:{MenuListProps:{disablePadding:!0},PaperProps:{sx:{marginTop:"4px",borderRadius:"10px"}}}},g.map(n,(function(e){return a.createElement(f.MenuItem,{className:"stigg-price-tier-menu-item-text",key:e.upTo,value:e.upTo.toString()},a.createElement(le,{variant:"body1",color:"primary"},e.upTo," ",r))}))):a.createElement("div",null))}var Ge=o(le,{target:"e1gsqbi12"})({name:"bfvx8c",styles:"word-break:break-word;width:100%"}),_e=o(le,{target:"e1gsqbi11"})({name:"1bmnxg7",styles:"white-space:nowrap"}),We=o(le,{target:"e1gsqbi10"})({name:"nurf5y",styles:"white-space:normal;min-height:39px"});function He(e){var t=e.billingPeriod,n=e.hasMonthlyPrice,r=e.hasAnnuallyPrice,i=e.paywallLocale,o="";return e.plan.pricePoints.find((function(e){return e.billingPeriod===t}))&&n&&r&&(o=(null==i.price.billingPeriod?void 0:i.price.billingPeriod(t))||", billed "+t.toLowerCase()),a.createElement(le,{span:!0,className:"stigg-price-billing-period-text",variant:"h6",color:"secondary"},o)}var Ve=function(e){var t=e.showStartingAt,n=e.withUnitPriceRow,r=e.withStartingAtRow,o=e.withTiersRow,l=e.selectedTierByFeature,c=e.setSelectedTierByFeature,s=e.plan,u=e.billingPeriod,d=e.paywallLocale,p=e.hasMonthlyPrice,m=e.hasAnnuallyPrice,g=De(s,u,d,e.locale,p,l),h=g.price,f=g.unit,y=g.tiers,v=g.tierUnits,b=i.useState(),x=b[0],E=b[1];i.useEffect((function(){E(l[k])}),[l]);var w=s.pricePoints.find((function(e){return e.billingPeriod===u&&e.isTieredPrice})),k=w?w.feature.featureId:void 0,P=function(e){var t={};t[k]=e,c(t)};return i.useEffect((function(){y&&P(l[k])}),[]),a.createElement(Ge,{className:"stigg-price-text"},a.createElement(a.Fragment,null,r&&a.createElement(le,{style:{minHeight:"20px"},className:"stigg-starting-at-text",variant:"body1",color:"secondary"},t?d.price.startingAtCaption:""),a.createElement(We,{variant:"h1"},h),n&&a.createElement(le,{className:"stigg-price-unit-and-billing-period-text",style:{minHeight:"48px"}},a.createElement(_e,{span:!0,variant:"h6",color:"secondary"},f),a.createElement(He,{plan:s,billingPeriod:u,hasAnnuallyPrice:m,hasMonthlyPrice:p,paywallLocale:d})),o&&a.createElement(Re,{componentId:s.id+"_"+k+"_tier",tiers:y,tierUnits:v,selectedTier:x,handleTierChange:P})))},ze=o("div",{target:"eacdu8d8"})("position:relative;background-color:",(function(e){var t=e.theme;return e.$isCurrentPlan?t.stigg.palette.backgroundHighlight:t.stigg.palette.backgroundPaper}),";border:",(function(e){var t=e.theme;return e.$isHighlighted?"3px solid "+t.stigg.palette.primary:"1px solid "+t.stigg.palette.outlinedBorder}),";border-radius:10px;padding:",(function(e){return e.theme.stigg.layout.planPadding}),";display:flex;min-width:",(function(e){return e.theme.stigg.layout.planMinWidth}),";max-width:",(function(e){return e.theme.stigg.layout.planMaxWidth}),";flex-direction:column;align-items:flex-start;justify-content:flex-start;position:relative;"),$e=o(le,{target:"eacdu8d7"})({name:"mpkj0c",styles:"padding-bottom:8px"}),Ze=o("div",{target:"eacdu8d6"})("height:2px;width:100%;background-color:",(function(e){return e.theme.stigg.palette.outlinedBorder}),";margin-bottom:40px;"),Ye=o(le,{target:"eacdu8d5"})("text-align:",(function(e){return e.theme.stigg.layout.descriptionAlignment}),";min-height:",(function(e){return e.theme.stigg.layout.descriptionMinHeight}),";"),Qe=o("div",{target:"eacdu8d4"})("background-color:",(function(e){return e.theme.stigg.palette.primary}),";border-radius:40px;position:absolute;top:-12px;"),Ke=o(le,{target:"eacdu8d3"})({name:"a8c38r",styles:"margin:0;padding:2px 8px"}),Xe=o("div",{target:"eacdu8d2"})("width:100%;display:flex;flex-direction:column;align-items:",(function(e){return ve(e.theme.stigg.layout.headerAlignment)}),";"),Je=o("div",{target:"eacdu8d1"})("position:absolute;top:0;background-color:",(function(e){return e.theme.stigg.palette.outlinedBorder}),";border-radius:0px 0px 10px 10px;padding:3px 12px;"),et=o(Oe,{target:"eacdu8d0"})("display:flex;height:100%;margin-right:4px;path{fill:",(function(e){return e.theme.stigg.palette.text.primary}),";}");function tt(e){var t=e.text,n=void 0===t?"Next":t;return a.createElement(Je,null,a.createElement(f.Grid,{display:"flex",alignItems:"center",gap:1},a.createElement(et,{$iconsColor:e.iconsColor}),a.createElement(le,{color:"primary",variant:"body1"},n)))}function nt(e){var t,n=e.withUnitPriceRow,r=e.withTiersRow,o=e.withTrialLeftRow,l=e.customer,c=e.plan,s=e.billingPeriod,u=e.isHighlighted,d=e.currentSubscription,p=e.shouldShowDescriptionSection,m=e.hasMonthlyPrice,g=e.hasAnnuallyPrice,f=e.isCustomerOnTrial,y=e.onPlanSelected,v=e.paywallLocale,b=e.locale,x=e.withStartingAtRow,E=c.isNextPlan&&c.isNextPlan(s),w=c.pricePoints.filter((function(e){return e.billingPeriod===s})),k=null==(t=c.paywallCalculatedPricePoints)?void 0:t.find((function(e){return e.billingPeriod===s})),P=w.length>1&&!(null==k||!k.additionalChargesMayApply),C=null;E?C=a.createElement(tt,{text:"Next plan"}):u&&v.highlightChip&&(C=a.createElement(Qe,{className:"stigg-highlight-badge"},a.createElement(Ke,{className:"stigg-highlight-badge-text",color:"white",bold:!0},v.highlightChip)));var S=a.useState(Pe(c,s,d,{})),T=S[0],B=S[1];return i.useEffect((function(){B(Pe(c,s,d,T))}),[s]),a.createElement(ze,{className:h("stigg-plan-offering-container",{"stigg-current-plan":c.isCurrentCustomerPlan}),$isHighlighted:u,$isCurrentPlan:c.isCurrentCustomerPlan},C,a.createElement(Xe,{className:"stigg-header-wrapper"},a.createElement($e,{className:"stigg-plan-header",variant:"h3"},c.displayName),p&&a.createElement(Ye,{className:"stigg-plan-description",variant:"h6",color:"secondary"},c.description),a.createElement(Ve,{showStartingAt:P,withUnitPriceRow:n,withStartingAtRow:x,withTiersRow:r,selectedTierByFeature:T,setSelectedTierByFeature:B,plan:c,billingPeriod:s,paywallLocale:v,locale:b,hasAnnuallyPrice:g,hasMonthlyPrice:m}),a.createElement(Ne,{isNextPlan:E,customer:l,plan:c,currentSubscription:d,billingPeriod:s,isCustomerOnTrial:f,onPlanSelected:function(e){var t=Object.keys(T).map((function(e){return{featureId:e,quantity:T[e].upTo}}));return y(e,t)},paywallLocale:v,hasTiersRow:r,withTrialLeftRow:o,selectedTierByFeature:T}),a.createElement(Ze,{className:"stigg-plan-header-divider"})),a.createElement(he,{plan:c,billingPeriod:s,paywallLocale:v}))}var rt,it=o("div",{target:"esqa6i42"})("height:40px;padding:0 20px;margin-bottom:",(function(e){return e.theme.stigg.layout.switchBottomSpacing}),";border-radius:10px;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";background-color:",(function(e){return e.theme.stigg.palette.backgroundPaper}),";display:flex;align-items:center;justify-content:center;"),at=o(le,{target:"esqa6i41"})({name:"zvmrfm",styles:"margin:0 8px"}),ot=o(v,{target:"esqa6i40"})("& .react-switch-bg{border:",(function(e){return"1px solid "+e.theme.stigg.palette.switchBorder}),";background:",(function(e){return e.theme.stigg.palette.switchFill}),"!important;}& .react-switch-handle{box-shadow:",(function(e){return e.theme.stigg.shadows.light}),";background:",(function(e){return e.theme.stigg.palette.switchHandle}),"!important;top:0.5px!important;}");function lt(e){return a.createElement(le,{variant:"h6",color:e.disabled?"disabled":"primary",className:"stigg-discount-rate-text"},e.discount,"% off")}function ct(e){var t=e.discountRate,r=e.onBillingPeriodChanged;if(e.availableBillingPeriods.length<=1)return null;var i=e.selectedBillingPeriod===n.BillingPeriod.Monthly;return a.createElement(it,{className:"stigg-period-picker-container"},a.createElement(at,{variant:"h6",className:"stigg-monthly-period-text",color:i?"primary":"disabled"},"Monthly"),a.createElement(ot,{className:"stigg-period-switch",uncheckedIcon:!1,checkedIcon:!1,height:16,width:33,onChange:function(e){return r(e?n.BillingPeriod.Annually:n.BillingPeriod.Monthly)},checked:!i,borderRadius:10,handleDiameter:19}),a.createElement(at,{variant:"h6",className:"stigg-annual-period-text",color:i?"disabled":"primary"},"Annual"),0!==t&&a.createElement(lt,{discount:t,disabled:i}))}function st(e,t){var n,r,i,a;if((a=null==(n=e.paywallCalculatedPricePoints)?void 0:n.find((function(e){return e.billingPeriod===t})))||(a=e.pricePoints.find((function(e){return e.billingPeriod===t}))),null==(r=a)||!r.amount){var o=e.pricePoints.find((function(e){return e.isTieredPrice&&e.billingPeriod===t}));if(o)return o.tiers[0].unitPrice.amount}return null==(i=a)?void 0:i.amount}function ut(){return(ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var dt=o((function(e){return i.createElement("svg",ut({width:135,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),rt||(rt=i.createElement("path",{d:"M.099 3.43v9.558h1.057V9.527h2.81c1.983 0 3.323-1.275 3.323-3.049 0-1.773-1.34-3.048-3.324-3.048H.1Zm1.057 5.127v-4.15h2.889c1.289 0 2.143.855 2.143 2.071 0 1.217-.854 2.079-2.143 2.079h-2.89ZM11.779 13.162c2.129 0 3.873-1.622 3.873-3.78 0-2.165-1.715-3.758-3.844-3.758-2.158 0-3.874 1.622-3.874 3.787 0 2.158 1.687 3.75 3.845 3.75Zm.014-.934c-1.556 0-2.773-1.202-2.773-2.832 0-1.629 1.216-2.83 2.773-2.83 1.528 0 2.773 1.201 2.773 2.83 0 1.63-1.245 2.832-2.773 2.832ZM19.905 12.988l1.572-6.046h.029l1.556 6.046h1.34l2.194-7.183h-1.18l-1.622 6.104h-.03l-1.549-6.104h-1.433l-1.55 6.104h-.029l-1.65-6.104h-1.195l2.208 7.183h1.34ZM34.983 9.425c0-2.121-1.578-3.8-3.83-3.8-2.1 0-3.845 1.556-3.845 3.786 0 2.143 1.6 3.75 3.874 3.75 1.586 0 2.875-.767 3.497-1.969l-.897-.485c-.413.898-1.412 1.528-2.585 1.528-1.673 0-2.694-1.246-2.795-2.513h6.567c.014-.13.014-.18.014-.297ZM31.14 6.551c1.404 0 2.527.948 2.715 2.259h-5.423a2.745 2.745 0 0 1 2.708-2.26ZM39.592 5.682c-1.028 0-1.774.521-2.1 1.253l-.101-1.13h-.905v7.183h1.057V8.564c0-1.115.615-1.789 1.774-1.789h.68V5.682h-.405ZM48.249 9.425c0-2.121-1.579-3.8-3.83-3.8-2.1 0-3.845 1.556-3.845 3.786 0 2.143 1.6 3.75 3.873 3.75 1.586 0 2.875-.767 3.497-1.969l-.897-.485c-.413.898-1.412 1.528-2.585 1.528-1.673 0-2.694-1.246-2.795-2.513h6.567c.015-.13.015-.18.015-.297Zm-3.845-2.874c1.404 0 2.527.948 2.715 2.259h-5.423a2.745 2.745 0 0 1 2.708-2.26ZM55.846 7.029c-.63-.89-1.644-1.398-2.831-1.398-2.093 0-3.773 1.586-3.773 3.765 0 2.18 1.651 3.766 3.744 3.766 1.195 0 2.23-.522 2.867-1.42l.145 1.246h.905V2.56l-1.057.116V7.03Zm-2.817 5.199c-1.498 0-2.7-1.188-2.7-2.832 0-1.643 1.202-2.83 2.7-2.83a2.787 2.787 0 0 1 2.817 2.83 2.787 2.787 0 0 1-2.817 2.832ZM65.731 5.631c-1.194 0-2.222.514-2.86 1.412V2.561l-1.057.116v10.31h.905l.145-1.237c.63.898 1.644 1.412 2.838 1.412 2.093 0 3.773-1.586 3.773-3.766 0-2.179-1.651-3.765-3.744-3.765Zm-.043 6.597a2.787 2.787 0 0 1-2.817-2.832 2.787 2.787 0 0 1 2.817-2.83c1.499 0 2.7 1.187 2.7 2.83 0 1.644-1.201 2.832-2.7 2.832ZM76.219 5.805v4.113c0 1.412-.905 2.266-2.172 2.266-1.26 0-1.97-.738-1.97-2.07V5.804H71.02v4.468c0 1.694 1.115 2.824 2.744 2.824 1.079 0 1.926-.42 2.455-1.116v.913c0 1.267-.956 2.186-2.346 2.186-1.123 0-2.05-.6-2.288-1.65l-.927.477C71.1 15.16 72.308 16 73.858 16c1.955 0 3.418-1.405 3.418-3.208V5.805h-1.057ZM108.672 10.487c0 1.42-1.261 2.3-3.181 2.3-1.027 0-1.857-.184-2.651-.578.074-.449.142-.99.16-1.618.738.43 1.575.64 2.381.64.959 0 1.458-.221 1.458-.689.018-.461-.339-.67-1.772-.947-1.661-.332-2.399-1.021-2.399-2.24 0-1.377 1.261-2.27 3.18-2.27.849 0 1.692.16 2.338.437l-.32 1.544a4.803 4.803 0 0 0-2.018-.43c-.898 0-1.341.221-1.341.658 0 .381.308.541 1.71.83 1.79.382 2.461 1.07 2.461 2.35l-.006.013Zm4.207.609c-.719 0-1.298-.382-1.298-1.39V6.887h1.827l.339-1.63h-2.166v-2.32a9.976 9.976 0 0 1-1.9.345l-.019 6.748c0 1.84 1.101 2.769 2.75 2.769.375 0 .701-.037.978-.105l.363-1.729c-.228.08-.517.136-.874.136v-.006Zm2.086 1.593h1.919V5.258h-1.919v7.43Zm.965-10.47c-.621-.006-1.101.45-1.107 1.052 0 .621.455 1.089 1.071 1.095.621 0 1.082-.437 1.095-1.04.012-.62-.443-1.095-1.052-1.107h-.007Zm10.126 3.039v6.268c0 2.369-1.6 3.999-4.3 3.999-.972 0-2.042-.216-2.762-.628.498-.51.837-.953 1.052-1.273.486.166.996.252 1.519.252 1.71 0 2.578-.947 2.578-2.14v-.24c-.609.7-1.489 1.138-2.541 1.138-2.018 0-3.537-1.501-3.537-3.728 0-2.227 1.661-3.808 3.691-3.808 1.052 0 1.968.381 2.577 1.101l.062-.947h1.667l-.006.006Zm-1.901 3.648c0-1.181-.861-2.08-2.048-2.08-1.188 0-2.061.899-2.061 2.08 0 1.18.861 2.048 2.061 2.048 1.199 0 2.048-.898 2.048-2.048Zm10.839-3.648v6.268c0 2.369-1.6 3.999-4.3 3.999-.972 0-2.042-.216-2.762-.628.498-.51.837-.953 1.052-1.273.486.166.996.252 1.519.252 1.71 0 2.578-.947 2.578-2.14v-.24c-.609.7-1.489 1.138-2.541 1.138-2.017 0-3.537-1.501-3.537-3.728 0-2.227 1.661-3.808 3.691-3.808 1.052 0 1.968.381 2.577 1.101l.062-.947H135l-.006.006Zm-1.901 3.648c0-1.181-.861-2.08-2.048-2.08-1.188 0-2.061.899-2.061 2.08 0 1.18.861 2.048 2.061 2.048 1.199 0 2.048-.898 2.048-2.048ZM95.71 14.982c-.075.037-1.483.659-3.975.542A14.827 14.827 0 0 1 88.512 15l4.312-5.007c.77.197 1.76.381 2.885.436 2.492.123 3.9-.504 3.974-.541l-3.974 5.1v-.007Zm-6.441-9.62c-.708-2.393-.431-3.907-.413-3.987l-4.01 5.07c-.013.08-.29 1.592.412 3.985a14.98 14.98 0 0 0 1.273 3.008l3.845-5.37a15.042 15.042 0 0 1-1.107-2.7v-.006Zm9.996.529a14.561 14.561 0 0 0-1.815-3.882l-3.568 4.546.67 3.217c.4.056.794.092 1.194.117.203.006.406.012.603.012 1.931 0 3.008-.455 3.125-.51l.277-.123c.024-.665-.019-1.84-.48-3.384l-.006.007Zm-2.24-4.208A14.43 14.43 0 0 0 92.83.834c-1.605-.08-2.756.154-3.395.338l-.056.296c-.012.061-.258 1.494.4 3.74.11.381.246.756.394 1.132l3.285-.111 3.574-4.54-.006-.006Z",fill:"#001E6C"})))}),{target:"ee5i8qp1"})("*{fill:",(function(e){return e.theme.stigg.palette.text.secondary}),";}"),pt=o("div",{target:"ee5i8qp0"})("align-self:",(function(e){return e.$alignSelf||"unset"}),";@media (max-width: 1040px){align-self:center;}");function mt(e){var t=e.source,n=e.style;return e.showWatermark?a.createElement(pt,{$alignSelf:e.align,className:"stigg-watermark",style:Z({cursor:"pointer"},void 0===n?{}:n),onClick:function(){var e=window.location.hostname.replace("www.","");window.open("https://www.stigg.io/?utm_source="+e+"&utm_medium=referral&utm_campaign="+t,"_blank")}},a.createElement(dt,null)):null}function gt(e,t){return e.some((function(e){return ht(e,t)}))}function ht(e,t){return e.pricePoints.some((function(e){return e.billingPeriod===t}))}var ft,yt=o("div",{target:"e19kubi82"})("color:",(function(e){return e.theme.stigg.palette.text.primary}),";display:flex;align-items:stretch;justify-content:center;flex-wrap:wrap;padding:10px 0;gap:",(function(e){return e.theme.stigg.layout.planMargin}),";"),vt=o("div",{target:"e19kubi81"})({name:"1rdsyw8",styles:"display:flex;flex-direction:column;align-items:center;& *{box-sizing:border-box;}"}),bt=o("div",{target:"e19kubi80"})({name:"zigog8",styles:"display:flex;flex-direction:column;align-items:center"}),xt=function(e){var t=e.plans,r=e.customer,o=e.currentSubscription,l=e.highlightedPlanId,c=e.selectedBillingPeriod,s=e.onBillingPeriodChanged,u=e.availableBillingPeriods,d=e.isCustomerOnTrial,p=e.onPlanSelected,g=e.paywallLocale,h=e.locale,f=Pt().stigg,y=function(e){return e.reduce((function(e,t){var r,i,a=st(t,n.BillingPeriod.Monthly),o=(i=st(t,n.BillingPeriod.Annually),m(r=a)||m(i)?null:Math.round((r-i/12)/r*100));return o&&(e=Math.max(e,o)),e}),0)}(t),v=t.some((function(e){return!!e.description})),b=gt(t,n.BillingPeriod.Monthly),x=gt(t,n.BillingPeriod.Annually),E=function(e,t){return e.filter((function(e){return e.pricingType!==n.PricingType.Paid||ht(e,t)}))}(t,c),w=i.useCallback((function(e,t,n){return p({plan:e,customer:r,subscription:o,intentionType:t,selectedBillingPeriod:c,billableFeatures:n})}),[r,c]),k=E.some((function(e){var t,n=e.pricePoints.filter((function(e){return e.billingPeriod===c})),r=null==(t=e.paywallCalculatedPricePoints)?void 0:t.find((function(e){return e.billingPeriod===c}));return n.length>1&&!(null==r||!r.additionalChargesMayApply)})),P=E.some((function(e){return!!De(e,c,g,h,b).unit})),C=E.some((function(e){return!!Pe(e,c,o,{})})),S=E.some((function(e){return e.isCurrentCustomerPlan&&e.trialDaysLeft}));return a.createElement(vt,{className:"stigg-paywall-container"},a.createElement(bt,{className:"stigg-paywall-layout"},a.createElement(ct,{onBillingPeriodChanged:s,selectedBillingPeriod:c,availableBillingPeriods:u,discountRate:y}),a.createElement(yt,{className:"stigg-paywall-plans-layout"},E.map((function(e){return a.createElement(nt,{withUnitPriceRow:P,withTiersRow:C,withTrialLeftRow:S,key:e.id,shouldShowDescriptionSection:v,hasMonthlyPrice:b,hasAnnuallyPrice:x,plan:e,withStartingAtRow:k,currentSubscription:o,billingPeriod:c,isHighlighted:e.id===l,isCustomerOnTrial:d,onPlanSelected:function(t,n){return w(e,t,n)},paywallLocale:g,locale:h,customer:r})}))),a.createElement(mt,{source:"paywall",align:"end",style:{marginTop:16},showWatermark:f.isWidgetWatermarkEnabled})))},Et=(function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=Object.create((t&&t.prototype instanceof d?t:d).prototype),a=new k(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return{value:void 0,done:!0}}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var l=x(o,n);if(l){if(l===u)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u={};function d(){}function p(){}function m(){}var g={};l(g,i,(function(){return this}));var h=Object.getPrototypeOf,f=h&&h(h(P([])));f&&f!==t&&n.call(f,i)&&(g=f);var y=m.prototype=d.prototype=Object.create(g);function v(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,a){function o(){return new t((function(r,o){!function r(i,a,o,l){var c=s(e[i],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(d).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(c.arg)}(i,a,r,o)}))}return r=r?r.then(o,o):o()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=m,l(y,"constructor",m),l(m,"constructor",p),p.displayName=l(m,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,l(e,o,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),l(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new b(c(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},v(y),l(y,o,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,u):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(ft={exports:{}}),ft.exports),wt=new(function(){function e(){}var t=e.prototype;return t.error=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];console.error(e,t||{},r)},t.log=function(e,t){console.log(e,t||{})},t.debug=function(e,t){console.debug(e,t||{})},e}()),kt=a.createContext(null);kt.displayName="StiggContext";var Pt=function(){var e=i.useContext(kt);if(!e)throw new Error("Could not find Stigg context; You need to wrap your app in an <StiggProvider> component.");return e};function Ct(e,t,r){var i,a=e.flatMap((function(e){return e.pricePoints})).map((function(e){return e.billingPeriod})),o=g.countBy(a),l=g.uniq(a);if(r&&l.includes(r))i=r;else if(t){var c=t.find((function(e){return e.status==n.SubscriptionStatus.Active}));c&&c.prices.length>0&&(i=null==c?void 0:c.prices[0].billingPeriod)}return i||(i=(o[n.BillingPeriod.Monthly]||0)>(o[n.BillingPeriod.Annually]||0)?n.BillingPeriod.Monthly:n.BillingPeriod.Annually),{defaultBillingPeriod:i,availableBillingPeriods:l}}function St(e,t){if(void 0===t&&(t="px"),e)return""+e+t}function Tt(e,t){if(!t)return e;switch(t){case n.FontWeight.Normal:return"normal";case n.FontWeight.Bold:return"bold";default:return"normal"}}function Bt(e){var t,n,r,i,a,o,l,c;return{fontFamilyUrl:(null==e?void 0:e.fontFamily)||void 0,h1:{fontSize:St(null==e||null==(t=e.h1)?void 0:t.fontSize),fontWeight:Tt("bold",null==e||null==(n=e.h1)?void 0:n.fontWeight)},h2:{fontSize:St(null==e||null==(r=e.h2)?void 0:r.fontSize),fontWeight:Tt("normal",null==e||null==(i=e.h2)?void 0:i.fontWeight)},h3:{fontSize:St(null==e||null==(a=e.h3)?void 0:a.fontSize),fontWeight:Tt("normal",null==e||null==(o=e.h3)?void 0:o.fontWeight)},body:{fontSize:St(null==e||null==(l=e.body)?void 0:l.fontSize),fontWeight:Tt("normal",null==e||null==(c=e.body)?void 0:c.fontWeight)}}}function At(e){if(e)switch(e){case n.Alignment.Left:return"left";case n.Alignment.Center:return"center";case n.Alignment.Right:return"right";default:return}}var Mt,Ut=o("div",{target:"e1f7khji6"})({name:"zigog8",styles:"display:flex;flex-direction:column;align-items:center"}),Lt=o(ee,{target:"e1f7khji5"})({name:"o7nnmj",styles:"margin-right:16px"}),Nt=o("div",{target:"e1f7khji4"})("display:flex;flex-direction:column;align-items:flex-start;gap:20px;border-radius:10px;padding:",(function(e){return e.theme.stigg.layout.planPadding}),";background-color:",(function(e){return e.theme.stigg.palette.backgroundPaper}),";min-width:",(function(e){return e.theme.stigg.layout.planMinWidth}),";max-width:",(function(e){return e.theme.stigg.layout.planMaxWidth}),";min-height:450px;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";"),Ft=o("div",{target:"e1f7khji3"})("display:flex;gap:",(function(e){return e.theme.stigg.layout.planMargin}),";flex-wrap:wrap;justify-content:center;"),Ot=o("div",{target:"e1f7khji2"})({name:"k8xojc",styles:"display:flex;align-items:center;margin-bottom:12px"}),It=o("div",{target:"e1f7khji1"})({name:"xdvdnl",styles:"margin-top:auto"}),Dt=o("div",{target:"e1f7khji0"})("width:150px;margin-bottom:",(function(e){return e.theme.stigg.layout.switchBottomSpacing}),";padding:12px 12px;border-radius:10px;background-color:white;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";");function jt(){return a.createElement(Nt,null,a.createElement(x,{width:120,borderRadius:4}),a.createElement(x,{circle:!0,width:40,height:40}),a.createElement(x,{style:{marginBottom:33},width:120,borderRadius:4}),a.createElement(Ot,null,a.createElement(Lt,null),a.createElement(x,{width:120,borderRadius:4})),a.createElement(Ot,null,a.createElement(Lt,null),a.createElement(x,{width:120,borderRadius:4})),a.createElement(Ot,null,a.createElement(Lt,null),a.createElement(x,{width:120,borderRadius:4})),a.createElement(It,null,a.createElement(x,{height:50,borderRadius:4})))}function qt(){return a.createElement(Ut,{className:"stigg-skeleton-loader-container"},a.createElement(Dt,{className:"stigg-skeleton-loader-billing-period"},a.createElement(x,{borderRadius:4})),a.createElement(Ft,{className:"stigg-skeleton-loader-plans-container"},a.createElement(jt,null),a.createElement(jt,null),a.createElement(jt,null)))}var Rt,Gt=function(e){var t=e.externalFontUrl;return a.createElement(c.Global,{styles:c.css(Mt||(Mt=Q(["\n ","\n\n /* latin-ext */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZ2IHTWEBlwu8Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZOIHTWEBlw.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,\n U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriAWCrCBamC3YU-CnE6Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriAWCrCBimC3YU-Ck.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,\n U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriASitCBamC3YU-CnE6Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriASitCBimC3YU-Ck.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,\n U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n "])),t&&"\n @font-face {\n font-family: 'custom-font';\n font-style: normal;\n font-weight: normal;\n src: local('custom-font'), url("+t+") format('woff');\n }\n ")})},_t=o("div",{target:"emcdfp60"})((function(e){var t=e.customCss;return t&&c.css(Rt||(Rt=Q(["\n ","\n "])),t)}),";");function Wt(e){var t,n,r,i,a,o,l,c,d,p=Pt(),m=g.merge(e,p.theme);return a=s((null==(t=m)||null==(n=t.palette)?void 0:n.primary)||"#327EEE"),o=s((null==t||null==(r=t.palette)||null==(i=r.text)?void 0:i.primary)||"#001E6C"),l=s("#4CAF50"),c=s("#f44336"),d={palette:{primary:a.hex(),primaryDark:a.darken(.3).hex(),backgroundPaper:"#FFFFFF",backgroundHighlight:"#F5F6F9",backgroundSection:a.alpha(.1).toString(),backgroundButton:a.alpha(.08).toString(),outlinedBorder:"#C4CBDD",outlinedRestingBorder:a.alpha(.5).toString(),outlinedHoverBackground:a.lightness(95).hex(),switchBorder:a.lighten(.1).hex(),switchFill:a.lighten(.5).hex(),switchHandle:a.hex(),warning:"#ed6c02",error:c.hex(),errorDark:c.darken(.3).hex(),success:l.hex(),successDark:l.darken(.3).hex(),white:"#FFFFFF",text:{primary:o.hex(),secondary:o.alpha(.75).toString(),disabled:o.alpha(.5).toString()}},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"},h2:{fontSize:"24px",fontWeight:"normal"},h3:{fontSize:"16px",fontWeight:"normal"},body:{fontSize:"14px",fontWeight:"normal"},caption:{fontSize:"12px",fontWeight:"normal"}},customCss:""},u(d,t)}function Ht(e){var t=e.typography,n=Number(t.body.fontSize.replace("px",""))/14;return{pxToRem:function(e){return e/16*n+"rem"},bodyFontFamily:t.fontFamily,headingFontFamily:t.fontFamily,fontSizes:[t.h1.fontSize,t.h2.fontSize,t.h3.fontSize,t.body.fontSize,"12px","10px"]}}var Vt=function(e){var t=e.children,n=Wt(e.componentTheme);return a.createElement(P.ThemeProvider,{theme:P.createTheme({stigg:n})},a.createElement(c.ThemeProvider,{theme:{stigg:n}},a.createElement(_t,{customCss:n.customCss},a.createElement(Gt,{externalFontUrl:n.typography.fontFamilyUrl}),a.createElement(w.ThemeProvider,{theme:{typography:Ht(n)}},t))))},zt=a.createContext(null);zt.displayName="CustomerPortalContext";var $t=function(){var e=i.useContext(zt);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 Zt(e){var t,n,r,o,l,c,s,d=e.children,p=e.textOverrides,m=e.theme,g=e.resourceId,h=e.productId,f=Pt().customerPortalUpdatedAt,y=function(e){var t=e.resourceId,n=e.productId,r=Pt(),a=r.stigg,o=r.customerPortalUpdatedAt,l=i.useState(!1),c=l[0],s=l[1],u=i.useState(),d=u[0],p=u[1];return i.useEffect((function(){!function(){var e=$(Et.mark((function e(){return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isCustomerLoaded){e.next=15;break}return e.prev=1,s(!0),e.next=5,a.getCustomerPortal({resourceId:t,productId:n});case 5:p(e.sent),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),wt.error("Failed to load customer portal "+(null==e.t0?void 0:e.t0.message),e.t0);case 12:return e.prev=12,s(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,9,12,15]])})));return function(){return e.apply(this,arguments)}}()()}),[a,a.isCustomerLoaded,o,t]),{customerPortal:d,isLoading:c}}({resourceId:g,productId:h}),v=y.customerPortal,b=y.isLoading,x=null!=v&&v.configuration?function(e){var t=e.palette;return{palette:{primary:(null==t?void 0:t.primary)||void 0,backgroundPaper:(null==t?void 0:t.paywallBackgroundColor)||void 0,outlinedBorder:(null==t?void 0:t.borderColor)||void 0,backgroundHighlight:(null==t?void 0:t.currentPlanBackground)||void 0,text:{primary:(null==t?void 0:t.textColor)||void 0}},typography:Bt(e.typography)}}(v.configuration):void 0,E=(t=Wt(x),r=null==v?void 0:v.configuration,{sectionTitleColor:(null==(n=m)?void 0:n.sectionTitleColor)||t.palette.text.secondary,planNameColor:(null==n?void 0:n.planNameColor)||t.palette.text.primary,backgroundColor:(null==n?void 0:n.backgroundColor)||(null==r||null==(o=r.palette)?void 0:o.backgroundColor)||"white",borderColor:(null==n?void 0:n.borderColor)||(null==r||null==(l=r.palette)?void 0:l.borderColor)||"rgba(0, 30, 108, 0.15)",listItemBackgroundColor:(null==n?void 0:n.backgroundColor)||(null==r||null==(c=r.palette)?void 0:c.backgroundColor)||"white",tabMaxHeight:(null==n?void 0:n.tabMaxHeight)||"380px",iconsColor:(null==n?void 0:n.iconsColor)||(null==r||null==(s=r.palette)?void 0:s.iconsColor)||void 0,iconsBackgroundColor:null==n?void 0:n.iconsBackgroundColor}),w=u({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"},p);return a.createElement(Vt,{componentTheme:x},a.createElement(zt.Provider,{key:null==f?void 0:f.toString(),value:{customerPortal:v,isLoading:b,textOverrides:w,theme:E,resourceId:g}},d))}var Yt,Qt=o(C,{target:"emvioms0"})("border-radius:10px;padding:8px 16px;text-transform:none;&,&:hover{border-color:",(function(e){return e.theme.stigg.palette.outlinedRestingBorder}),";}");function Kt(){return(Kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Xt=function(e){return i.createElement("svg",Kt({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Yt||(Yt=i.createElement("path",{clipRule:"evenodd",d:"M13.333 2.5 17.5 6.667 6.667 17.5H2.5v-4.167L13.333 2.5v0Z",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},Jt=o("div",{target:"ewz8krb0"})("display:flex;align-items:center;justify-content:space-between;",(function(e){return!e.$disableMargin&&"\n &:not(:last-child) {\n margin-bottom: 32px;\n }\n "}),";");function en(e){var t=e.title,n=e.className,r=e.isLoading,i=$t().theme;return r?a.createElement(x,{width:120}):a.createElement(le,{className:n,overrideColor:i.sectionTitleColor,variant:"h3",bold:!0},t)}var tn=o(Xt,{target:"e1fjw26b0"})("path{stroke:",(function(e){return e.theme.stigg.palette.primary}),";}");function nn(e){var t=e.onManageSubscription,n=e.hideManageButton,r=e.textOverrides;return a.createElement(Jt,{className:"stigg-customer-portal-overview-header",$disableMargin:!0},a.createElement(en,{title:"Subscription",className:"stigg-overview-title"}),!n&&a.createElement(Qt,{className:"stigg-manage-subscription-button",variant:"outlined",onClick:t},a.createElement(tn,{className:"stigg-manage-subscription-button-image"}),a.createElement(le,{className:"stigg-manage-subscription-button-text",color:"primary.main",style:{marginLeft:"8px"},variant:"body1"},null==r?void 0:r.manageSubscription)))}function rn(){var e=$t().customerPortal,t=S(null==e?void 0:e.subscriptions,(function(e){return e.addons}));return A(t)?null:a.createElement("div",{className:"stigg-addons-list-layout"},t.map((function(e,n){return a.createElement(le,{key:e.addonId,span:!0,className:"stigg-addon-list-item-text",variant:"body1"},e.quantity>1&&e.quantity+" X ",e.displayName,n===t.length-1?"":", ")})))}var an=o("div",{target:"e1g6q2f50"})("display:flex;justify-content:space-between;align-items:center;gap:64px;border-bottom:",(function(e){return"1px solid "+e.$borderColor}),";padding:16px 0;&>*:first-child{max-width:60%;}");function on(){var e=$t(),t=e.customerPortal,n=e.theme,r=null==t?void 0:t.promotionalEntitlements;return a.createElement("div",{style:{display:"flex",flexDirection:"column"}},a.createElement(le,{color:"secondary"},e.textOverrides.promotionsSubtitle),a.createElement("div",{style:{display:"flex",flexDirection:"column"}},a.createElement(an,{$borderColor:n.borderColor},a.createElement(le,{variant:"body1",bold:!0},"Feature"),a.createElement(le,{variant:"body1",bold:!0},"Expiration date")),null==r?void 0:r.map((function(e){return a.createElement(an,{$borderColor:n.borderColor},a.createElement(le,{variant:"body1"},function(e){var t,n=e.displayName;return e.hasUnlimitedUsage?"Unlimited "+n:e.usageLimit?n+" x "+(null==(t=e.usageLimit)?void 0:t.toLocaleString()):n}(e)),a.createElement(le,{variant:"body1",color:"disabled"},e.endDate?p.utc(e.endDate).format("MMM Do, YYYY"):"None"))}))))}var ln,cn,sn,un,dn,pn,mn,gn,hn,fn,yn,vn,bn,xn,En,wn,kn=o(M,{target:"exlfw3j3"})({name:"jlwfj4",styles:".MuiTabs-indicator{background-color:#001e6c;}"}),Pn=o("div",{target:"exlfw3j2"})({name:"1dqkbz0",styles:"width:100%;flex:1;margin-top:16px"}),Cn=o(T,{target:"exlfw3j1"})("margin-top:16px;max-height:",(function(e){return e.$maxHeight}),";overflow-y:auto;"),Sn=function(e,t){switch(e){case"primary":return t.stigg.palette.text.primary;case"secondary":return t.stigg.palette.text.secondary;default:return e}};function Tn(){return(Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Bn(){return(Bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function An(){return(An=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Mn(){return(Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Un(){return(Un=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ln(){return(Ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Nn(){return(Nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Fn,On,In,Dn,jn,qn,Rn,Gn,_n,Wn,Hn,Vn,zn,$n,Zn,Yn,Qn,Kn,Xn,Jn,er,tr=function(e){return i.createElement("svg",Nn({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),wn||(wn=i.createElement("path",{d:"M10.833 2.5a7.5 7.5 0 0 0-7.5 7.5h-2.5l3.242 3.242.058.116L7.5 10H5a5.829 5.829 0 0 1 5.833-5.833A5.83 5.83 0 0 1 16.667 10a5.83 5.83 0 0 1-5.834 5.833 5.786 5.786 0 0 1-4.116-1.716L5.533 15.3a7.462 7.462 0 0 0 5.3 2.2 7.5 7.5 0 0 0 0-15ZM10 6.667v4.166l3.567 2.117.6-1.008-2.917-1.734V6.667H10Z",fill:"#6678A7"})))};function nr(){return(nr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function rr(){return(rr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ir(){return(ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ar(){return(ar=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function or(){return(or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function lr(){return(lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function cr(){return(cr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function sr(){return(sr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ur(){return(ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function dr(){return(dr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function pr(){return(pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var mr,gr,hr,fr={__proto__:null,Addons:function(e){return i.createElement("svg",Tn({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ln||(ln=i.createElement("g",{clipPath:"url(#addons_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M12 6.857v10.286M6.857 12h10.286M18 .857H6A5.143 5.143 0 0 0 .857 6v12A5.143 5.143 0 0 0 6 23.143h12A5.143 5.143 0 0 0 23.143 18V6A5.143 5.143 0 0 0 18 .857Z"}))),cn||(cn=i.createElement("defs",null,i.createElement("clipPath",{id:"addons_svg__a"},i.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))))},BillingInfoCustomer:function(e){return i.createElement("svg",Bn({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),sn||(sn=i.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),un||(un=i.createElement("path",{d:"M26 27v-2a4 4 0 0 0-4-4h-8a4 4 0 0 0-4 4v2",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),dn||(dn=i.createElement("path",{clipRule:"evenodd",d:"M18 17a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},ContactSupport:function(e){return i.createElement("svg",An({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),pn||(pn=i.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),mn||(mn=i.createElement("path",{d:"M27 18.22C27 12.73 22.74 9 18 9c-4.69 0-9 3.65-9 9.28-.6.34-1 .98-1 1.72v2c0 1.1.9 2 2 2h1v-6.1c0-3.87 3.13-7 7-7s7 3.13 7 7V25h-8v2h8c1.1 0 2-.9 2-2v-1.22c.59-.31 1-.92 1-1.64v-2.3c0-.7-.41-1.31-1-1.62Z",fill:"#7586B0"})),gn||(gn=i.createElement("path",{d:"M15 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM21 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:"#7586B0"})),hn||(hn=i.createElement("path",{d:"M24 17.03A6.04 6.04 0 0 0 18.05 12c-3.03 0-6.29 2.51-6.03 6.45a8.075 8.075 0 0 0 4.86-5.89c1.31 2.63 4 4.44 7.12 4.47Z",fill:"#7586B0"})))},CreditCard:function(e){return i.createElement("svg",Mn({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),fn||(fn=i.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),yn||(yn=i.createElement("path",{d:"M26 10H10c-1.11 0-1.99.89-1.99 2L8 24c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V12c0-1.11-.89-2-2-2Zm0 14H10v-6h16v6Zm0-10H10v-2h16v2Z",fill:"#7586B0"})))},DollarCoin:function(e){return i.createElement("svg",Un({width:21,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),vn||(vn=i.createElement("g",{clipPath:"url(#dollar-coin_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M10.334 19.286A9.286 9.286 0 1 0 1.048 10a9.286 9.286 0 0 0 9.286 9.286Z"}),i.createElement("path",{d:"M12.765 7.46a1.903 1.903 0 0 0-1.796-1.27H9.494a1.7 1.7 0 0 0-.363 3.362l2.245.49a1.905 1.905 0 0 1-.407 3.768h-1.27c-.83 0-1.535-.53-1.797-1.27M10.334 6.19V4.287M10.334 15.714V13.81"}))),bn||(bn=i.createElement("defs",null,i.createElement("clipPath",{id:"dollar-coin_svg__a"},i.createElement("path",{fill:"#fff",transform:"translate(.333)",d:"M0 0h20v20H0z"})))))},MiniSchedule:Oe,Promotions:function(e){return i.createElement("svg",Ln({width:24,height:25,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),xn||(xn=i.createElement("g",{clipPath:"url(#promotions_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M21.429 5.325H2.57c-.946 0-1.714.767-1.714 1.714v3.429c0 .947.768 1.714 1.714 1.714H21.43c.946 0 1.714-.768 1.714-1.714V7.039c0-.947-.768-1.714-1.714-1.714ZM21.429 12.182v9.429a1.714 1.714 0 0 1-1.715 1.714H4.286a1.714 1.714 0 0 1-1.714-1.714v-9.429M12 5.325v18M17.143 1.04 12 5.324 6.857 1.039"}))),En||(En=i.createElement("defs",null,i.createElement("clipPath",{id:"promotions_svg__a"},i.createElement("path",{fill:"#fff",transform:"translate(0 .182)",d:"M0 0h24v24H0z"})))))},Restore:tr,ScheduleBox:function(e){return i.createElement("svg",nr({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Fn||(Fn=i.createElement("rect",{width:36,height:36,rx:10,fill:"url(#schedule-box_svg__a)"})),On||(On=i.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),In||(In=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.954 7.7a1 1 0 0 1-.654 1.254 8.998 8.998 0 0 0-1.543 16.523A9 9 0 0 0 27 17.54a1 1 0 1 1 2 0c0 .357-.017.713-.052 1.066.018.089.024.182.017.278l-.004.047a.997.997 0 0 1-.101.361A11 11 0 1 1 14.7 7.046a1 1 0 0 1 1.254.654Zm1.896.252a1 1 0 0 1 1.08-.912l.048.004a1 1 0 1 1-.178 1.992l-.038-.003a1 1 0 0 1-.912-1.081ZM22.858 9.2a1 1 0 0 1 1.391-.254l.078.054a1 1 0 1 1-1.152 1.635 8.98 8.98 0 0 0-.063-.044 1 1 0 0 1-.254-1.391Zm3.748 3.609a1 1 0 0 1 1.332.473l.04.085a1 1 0 1 1-1.813.844l-.014-.031-.019-.039a1 1 0 0 1 .474-1.332ZM19 14a1 1 0 1 0-2 0v4a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-3Z",fill:"#7586B0"})),Dn||(Dn=i.createElement("defs",null,i.createElement("linearGradient",{id:"schedule-box_svg__a",x1:35.02,y1:1.224,x2:0,y2:36,gradientUnits:"userSpaceOnUse"}))))},ScheduleClock:function(e){return i.createElement("svg",rr({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),jn||(jn=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.954 1.7A1 1 0 0 1 9.3 2.954a8.998 8.998 0 0 0-5.615 12.03A9 9 0 0 0 21 11.54a1 1 0 1 1 2 0c0 .357-.017.713-.052 1.066.018.089.024.182.017.278l-.004.047a.997.997 0 0 1-.101.361A11 11 0 1 1 8.7 1.046a1 1 0 0 1 1.254.654Zm1.896.252a1 1 0 0 1 1.08-.912l.048.004a1 1 0 1 1-.178 1.992l-.039-.003a1 1 0 0 1-.911-1.081ZM16.858 3.2a1 1 0 0 1 1.391-.254l.078.054a1 1 0 1 1-1.152 1.635 9.7 9.7 0 0 0-.063-.044 1 1 0 0 1-.254-1.391Zm3.748 3.608a1 1 0 0 1 1.332.474l.04.085a1 1 0 1 1-1.813.844l-.014-.031-.019-.039a1 1 0 0 1 .474-1.333ZM13 8a1 1 0 1 0-2 0v4a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3V8Z",fill:"#7586B0"})))},RenewSubscription:function(e){return i.createElement("svg",ir({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),qn||(qn=i.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),Rn||(Rn=i.createElement("path",{clipRule:"evenodd",d:"M9 12a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H11a2 2 0 0 1-2-2V12Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Gn||(Gn=i.createElement("path",{d:"M22 8v4M14 8v4M9 16h18",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},Trash:function(e){return i.createElement("svg",ar({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_n||(_n=i.createElement("path",{d:"M3 6h18",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Wn||(Wn=i.createElement("path",{d:"M20 6a1 1 0 1 0-2 0h2ZM6 6a1 1 0 0 0-2 0h2Zm1 0a1 1 0 0 0 2 0H7Zm8 0a1 1 0 1 0 2 0h-2Zm3 0v14h2V6h-2Zm0 14a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2Zm-1 1H7v2h10v-2ZM7 21a1 1 0 0 1-1-1H4a3 3 0 0 0 3 3v-2Zm-1-1V6H4v14h2ZM9 6V4H7v2h2Zm0-2a1 1 0 0 1 1-1V1a3 3 0 0 0-3 3h2Zm1-1h4V1h-4v2Zm4 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2Zm1 1v2h2V4h-2Z",fill:"#F88078"})),Hn||(Hn=i.createElement("path",{d:"M10 11v6M14 11v6",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},PaymentMethod:function(e){return i.createElement("svg",or({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Vn||(Vn=i.createElement("path",{d:"M21.167 4H2.833C1.821 4 1 4.895 1 6v12c0 1.105.82 2 1.833 2h18.334C22.179 20 23 19.105 23 18V6c0-1.105-.82-2-1.833-2Z",fill:"#C6C6C7"})),zn||(zn=i.createElement("path",{opacity:.3,d:"M19.75 16.429H17.5c-.488 0-.75-.229-.75-.762 0-.534.262-.762.75-.762h2.25c.488 0 .75.228.75.762 0 .533-.262.762-.75.762Zm-4.5 0H13c-.488 0-.75-.229-.75-.762 0-.534.262-.762.75-.762h2.25c.488 0 .75.228.75.762 0 .533-.262.762-.75.762Zm-4.5 0H8.5c-.488 0-.75-.229-.75-.762 0-.534.262-.762.75-.762h2.25c.488 0 .75.228.75.762 0 .533-.262.762-.75.762Zm-4.5 0H4c-.487 0-.75-.229-.75-.762 0-.534.263-.762.75-.762h2.25c.487 0 .75.228.75.762 0 .533-.263.762-.75.762Z",fill:"#000"})))},OutlinedCircle:function(e){return i.createElement("svg",lr({width:21,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),$n||($n=i.createElement("circle",{cx:10.333,cy:10,r:9,fill:"#fff",stroke:"#327EEE",strokeWidth:2})))},OutlinedCheckedCircle:function(e){return i.createElement("svg",cr({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Zn||(Zn=i.createElement("circle",{cx:10,cy:10,r:9.25,fill:"#327EEE",stroke:"#327EEE",strokeWidth:1.5})),Yn||(Yn=i.createElement("path",{d:"M5 10.364 8.637 14l4-4 2-2",stroke:"#fff",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},OutlinedCheckedCircleDisabled:function(e){return i.createElement("svg",sr({width:21,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Qn||(Qn=i.createElement("circle",{cx:10.667,cy:10,r:9.25,fill:"#B3BCD3",stroke:"#B3BCD3",strokeWidth:1.5})),Kn||(Kn=i.createElement("path",{d:"M5.667 10.364 9.304 14l4-4 2-2",stroke:"#fff",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},ArrowForward:function(e){return i.createElement("svg",ur({width:18,height:18,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Xn||(Xn=i.createElement("path",{d:"M9 3 7.942 4.058l4.185 4.192H3v1.5h9.127l-4.185 4.193L9 15l6-6-6-6Z",fill:"#fff"})))},Close:function(e){return i.createElement("svg",dr({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Jn||(Jn=i.createElement("path",{d:"m15.834 5.342-1.175-1.175L10 8.825 5.342 4.167 4.167 5.342 8.825 10 4.167 14.66l1.175 1.175L10 11.175l4.659 4.659 1.175-1.175L11.175 10l4.659-4.658Z",fill:"#327EEE"})))},Check:function(e){return i.createElement("svg",pr({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),er||(er=i.createElement("path",{d:"M20 7 9 18l-5-5",stroke:"#F5F6F9",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))}},yr=o("div",{target:"e1ds7xyn0"})((function(e){var t=e.$pathColor;return t&&c.css(mr||(mr=Q(["\n path {\n fill: ",";\n }\n "])),t)})," ",(function(e){var t=e.$rectColor;return t&&c.css(gr||(gr=Q(["\n svg rect {\n fill: ",";\n }\n "])),t)})," ",(function(e){var t=e.$strokeColor;return t&&c.css(hr||(hr=Q(["\n g {\n stroke: ",";\n }\n "])),t)}),";");function vr(e){var t=e.className,n=e.style,r=e.svgPathColor,i=e.svgRectColor,o=e.svgStrokeColor,l=fr[e.icon],s=c.useTheme();return a.createElement(yr,{className:t,style:n,$pathColor:Sn(r,s),$rectColor:Sn(i,s),$strokeColor:Sn(o,s)},a.createElement(l,null))}var br=["children","value","index","maxHeight"];function xr(e){var t=e.children,n=e.value,r=e.index,i=e.maxHeight,o=Y(e,br);return a.createElement("div",Object.assign({role:"tabpanel",hidden:n!==r},o),n===r&&a.createElement(Cn,{$maxHeight:i},t))}function Er(e){var t=e.isSelected,n=e.label,r=t?"primary":"secondary";return a.createElement("div",{style:{display:"flex",gap:8,alignItems:"center"}},a.createElement(vr,{icon:e.icon,svgStrokeColor:r}),a.createElement(le,{variant:"h6",bold:t,fontWeight:l.FontWeight.Medium,color:r},n))}function wr(e){var t=e.customerPortal,n=e.hiddenSections,r=e.textOverrides,o=e.theme,l=function(e){return null==n?void 0:n.some((function(t){return t===e}))},c=S(t.subscriptions,(function(e){return e.addons})).length>0&&!l("addons"),s=t.promotionalEntitlements.length>0&&!l("promotionalEntitlements"),u=i.useState(c?1:2),d=u[0],p=u[1];return c||s?a.createElement(Pn,null,a.createElement(T,{sx:{borderBottom:1,borderColor:"divider"}},a.createElement(kn,{value:d,onChange:function(e,t){p(t)}},c?a.createElement(B,{sx:{textTransform:"none"},value:1,label:a.createElement(Er,{isSelected:1===d,label:r.addonsTabTitle,icon:"Addons"})}):null,s?a.createElement(B,{sx:{textTransform:"none"},value:2,label:a.createElement(Er,{isSelected:2===d,label:r.promotionsTabTitle,icon:"Promotions"})}):null)),a.createElement(xr,{value:d,index:1,maxHeight:o.tabMaxHeight},a.createElement(rn,null)),a.createElement(xr,{value:d,index:2,maxHeight:o.tabMaxHeight},a.createElement(on,null))):null}var kr=o("div",{target:"ejq3grd1"})({name:"1eoy87d",styles:"display:flex;justify-content:space-between"}),Pr=o("div",{target:"ejq3grd0"})({name:"43cxha",styles:"display:flex;flex-direction:column;gap:32px"});function Cr(){return a.createElement(kr,{className:"stigg-subscription-overview-skeleton-layout"},a.createElement(Pr,null,a.createElement(x,{width:120}),a.createElement(x,{width:120})),a.createElement(x,{width:295,height:193}))}function Sr(e){var t=e.scheduleUpdate.targetPackage;return a.createElement(f.Grid,{container:!0,alignItems:"center"},a.createElement(f.Grid,null,a.createElement(U.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})),a.createElement(f.Grid,{item:!0},a.createElement(le,{className:"stigg-scheduled-updates-description",variant:"body1"},"Downgrade to the ",a.createElement("b",null,null==t?void 0:t.displayName)," plan")))}function Tr(e){var t=e.scheduleUpdate.scheduleVariables.billingPeriod,r=t===n.BillingPeriod.Monthly?"annually":"monthly",i=t===n.BillingPeriod.Monthly?"monthly":"annually";return a.createElement(f.Grid,{container:!0,alignItems:"center"},a.createElement(f.Grid,null,a.createElement(U.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})),a.createElement(f.Grid,{item:!0},a.createElement(le,{className:"stigg-scheduled-updates-description",variant:"body1"},"Change from an ",r," to a ",a.createElement("b",null,i)," billing cycle")))}function Br(e){var t=e.scheduleUpdate.scheduleVariables,n=t.newUnitAmount,r=t.featureId,i=g.compact(g.map(e.subscription.prices,"feature")).find((function(e){return e.id===r}));if(!i)return null;var o=i.featureUnits,l=1===n?o:i.featureUnitsPlural;return a.createElement(f.Grid,{container:!0,alignItems:"flex-start",flexWrap:"nowrap"},a.createElement(f.Grid,null,a.createElement(U.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})),a.createElement(f.Grid,{item:!0},a.createElement(le,{className:"stigg-scheduled-updates-description",variant:"body1"},"Reduce the ",a.createElement("b",null,o)," quantity to ",n," ",l)))}function Ar(e){var t=e.scheduleUpdate,r=e.subscription;switch(t.subscriptionScheduleType){case n.SubscriptionScheduleType.Downgrade:return a.createElement(Sr,{scheduleUpdate:t});case n.SubscriptionScheduleType.BillingPeriod:return a.createElement(Tr,{scheduleUpdate:t});case n.SubscriptionScheduleType.UnitAmount:return a.createElement(Br,{scheduleUpdate:t,subscription:r});default:return null}}var Mr=o(f.Box,{target:"eju957a2"})("border-bottom:",(function(e){return"1px solid "+e.$borderColor}),";border-top-left-radius:10px;border-top-right-radius:10px;margin:-64px -64px 64px -64px;padding:24px 32px;"),Ur=o(d,{target:"eju957a1"})({name:"158icaa",styles:"margin-left:4px"}),Lr=o(tr,{target:"eju957a0"})("color:",(function(e){return e.theme.stigg.palette.primary}),";path{fill:",(function(e){return e.theme.stigg.palette.primary}),";}");function Nr(e){var t=e.subscription,n=t.scheduledUpdates;return a.createElement(a.Fragment,null,a.createElement(f.Grid,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1},a.createElement(f.Grid,null,a.createElement(le,{className:"stigg-scheduled-updates-description",variant:"body1"},"The following updates will take effect in the next billing cycle:"))),a.createElement(f.Grid,null,(n||[]).map((function(e){return a.createElement(Ar,{key:e.subscriptionScheduleType,scheduleUpdate:e,subscription:t})}))))}function Fr(e){var t=e.subscription,n=xe({scheduledUpdate:(t.scheduledUpdates||[])[0],subscriptionPrices:t.prices,billingPeriodRange:t.billingPeriodRange,options:{postfix:"at the end of the current billing period"}}),r=n.line2;return a.createElement(a.Fragment,null,a.createElement(f.Grid,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1},a.createElement(f.Grid,null,a.createElement(le,{className:"stigg-scheduled-updates-title",variant:"body1",color:"primary"},n.line1))),r&&a.createElement(f.Grid,null,a.createElement(le,{className:"stigg-scheduled-updates-subtitle",variant:"body1",color:"secondary"},r)))}function Or(e){var t=e.subscription,n=e.onCancelScheduledUpdates,r=e.theme,o=e.cancelScheduledUpdatesButtonTitle,l=c.useTheme(),s=i.useState(!1),u=s[0],d=s[1],p=t.scheduledUpdates;if(!p||0===p.length)return null;var m=1===p.length;return a.createElement(Mr,{$borderColor:r.borderColor,className:"stigg-scheduled-updates-alert-container"},a.createElement(f.Grid,{container:!0,alignItems:m?"center":"flex-start",gap:2},a.createElement(f.Grid,{item:!0,display:"flex"},a.createElement(vr,{icon:"ScheduleBox",svgPathColor:r.iconsColor,svgRectColor:r.iconsBackgroundColor})),a.createElement(f.Grid,{item:!0,flex:1},a.createElement(m?Fr:Nr,{subscription:t})),!!n&&a.createElement(f.Grid,{item:!0},a.createElement(Qt,{variant:"outlined",onClick:function(){d(!0),Promise.resolve(n(t)).finally((function(){return d(!1)}))}},u?a.createElement(Ur,{loading:!0,size:16,color:l.stigg.palette.text.disabled}):a.createElement(Lr,{style:{display:"flex",marginRight:4},className:"stigg-scheduled-updates-cancel-update-button-icon"}),a.createElement(le,{variant:"body1",color:"primary.main",className:"stigg-scheduled-updates-cancel-update-button"},o)))))}var Ir=o("div",{target:"e1kw2z1l0"})("width:100%;display:flex;flex-direction:column;border-radius:10px;background-color:",(function(e){return e.$backgroundColor}),";border:",(function(e){return"1px solid "+e.$borderColor}),";padding:64px;");function Dr(e){var t=e.billingPeriod,r=e.rangeEnd,i=e.amount,o=e.currency;return a.createElement(a.Fragment,null,a.createElement(le,{variant:"h6"},"Next estimated bill"),a.createElement(le,{variant:"h1"},Ie({amount:i,currency:o,maximumFractionDigits:2})),a.createElement(le,{variant:"body1",color:"secondary"},"Billed ",t===n.BillingPeriod.Monthly?"monthly":"annually"," on"," ",a.createElement(le,{variant:"body1",span:!0,color:"primary"},p.utc(r).format("MMM Do, YYYY"))),a.createElement(le,{variant:"body1",color:"secondary"},"* Additional tax rates may apply"))}function jr(e){var t=e.description;return a.createElement(a.Fragment,null,a.createElement(le,{variant:"h6",color:"secondary"},"No upcoming bill"),a.createElement(le,{variant:"body1",color:"secondary"},t))}var qr=o("div",{target:"e1ftdtst1"})({name:"1nocm2b",styles:"display:flex;flex-direction:column;align-items:left;gap:8px"}),Rr=o(C,{target:"e1ftdtst0"})({name:"1l28f5r",styles:"width:fit-content;&.MuiButton-root{padding:0;&:hover{background:none;}}"});function Gr(e){var t=e.onContactSupport,n=e.label,r=a.createElement(le,{color:t?"primary.main":"secondary"},e.linkLabel);return a.createElement(qr,{className:"stigg-contact-support-layout"},a.createElement(le,{className:"stigg-contact-support-label",color:"secondary"},n),t?a.createElement(Rr,{className:"stigg-contact-support-button",style:{textTransform:"none"},variant:"text",onClick:t},r):r)}var _r,Wr,Hr=o("div",{target:"e1u4onrr0"})("max-height:278px;display:flex;flex-direction:column;border-radius:10px;background-color:",(function(e){return e.theme.stigg.palette.backgroundSection}),";border:",(function(e){return"1px solid "+e.$borderColor}),";padding:32px;gap:16px;");function Vr(e){var t,r,i,o,l=e.subscription,c=e.theme,s=e.textOverrides,u=e.onContactSupport,d=l.pricingType,p=null==(t=null==(r=l.prices)?void 0:r.every((function(e){return e.billingModel!==n.BillingModel.UsageBased})))||t,m=null==(i=l.scheduledUpdates)?void 0:i.find((function(e){var t=e.targetPackage;return e.subscriptionScheduleType===n.SubscriptionScheduleType.Downgrade&&(null==t?void 0:t.pricingType)===n.PricingType.Free}));if(d===n.PricingType.Free)o=a.createElement(jr,{description:"You're on a free plan, so you don’t have any upcoming charges"});else if(d===n.PricingType.Paid)if(m&&p)o=a.createElement(jr,{description:"Your plan will be downgraded to a free plan, so you don’t have any upcoming charges"});else if(l.status===n.SubscriptionStatus.InTrial)o=a.createElement(jr,{description:"You’re on a free trial of the "+l.planName+" plan, so you don’t have any upcoming charges"});else{var g,h,f,y,v=null==(g=l.prices)||null==(h=g[0])?void 0:h.billingPeriod,b=null==(f=l.billingPeriodRange)?void 0:f.end,x=null==(y=l.totalPrice)?void 0:y.total;v&&b&&x&&(o=a.createElement(Dr,{billingPeriod:v,rangeEnd:b,amount:x.amount,currency:x.currency}))}else d===n.PricingType.Custom&&(o=a.createElement(Gr,{onContactSupport:u,label:s.contactSupportTitle,linkLabel:s.contactSupportLink}));return a.createElement(Hr,{className:"stigg-subscription-total-price-layout",$borderColor:c.borderColor},o)}function zr(){return(zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var $r,Zr,Yr,Qr=function(e){return i.createElement("svg",zr({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_r||(_r=i.createElement("path",{d:"M12.947 13.6h-1.013l.001-2.824a.522.522 0 0 0-.18-.392L8.622 7.918l3.134-2.465a.497.497 0 0 0 .18-.392V2.4h1.012c.278 0 .49-.212.49-.49a.481.481 0 0 0-.49-.49H3.053a.481.481 0 0 0-.49.49c0 .278.213.49.49.49h1.013l-.001 2.661c0 .147.065.294.18.392l3.117 2.465-3.117 2.466a.497.497 0 0 0-.18.392V13.6H3.054a.481.481 0 0 0-.49.49c0 .277.213.49.49.49h9.894c.277 0 .49-.213.49-.49a.481.481 0 0 0-.49-.49ZM5.045 2.4h5.91v2.416L8 7.167l-2.955-2.35V2.4Zm0 8.62L8 8.67l2.955 2.334v2.58h-5.91V11.02Z",fill:"#fff"})),Wr||(Wr=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.053 1.254h9.894c.37 0 .657.287.657.656 0 .37-.287.657-.657.657h-.845L12.1 5.06c0 .214-.088.39-.238.519l-.005.004L8.89 7.918l2.974 2.34c.152.13.238.323.238.518l-.001 2.657h.846c.37 0 .657.287.657.657 0 .37-.288.657-.657.657H3.053a.648.648 0 0 1-.657-.657c0-.37.287-.657.657-.657h.846v-2.657c0-.214.087-.39.237-.519l.005-.004 2.953-2.335L4.136 5.58a.688.688 0 0 1-.238-.519V2.567h-.845a.648.648 0 0 1-.657-.656c0-.37.287-.657.657-.657Zm9.894.333H3.053a.315.315 0 0 0-.323.324c0 .185.138.323.323.323h1.18l-.001 2.827c0 .099.043.198.119.264l3.28 2.593-3.28 2.594a.33.33 0 0 0-.119.264v2.99H3.053a.315.315 0 0 0-.323.324c0 .185.138.323.323.323h9.894a.315.315 0 0 0 .323-.323.315.315 0 0 0-.323-.323h-1.18l.001-2.991a.355.355 0 0 0-.119-.264L8.351 7.918l3.298-2.593a.33.33 0 0 0 .119-.264V2.233h1.18a.315.315 0 0 0 .323-.323.315.315 0 0 0-.324-.323Zm-8.069.646h6.244v2.664L8 7.38 4.878 4.897V2.233Zm.334.334v2.169L8 6.955l2.788-2.22V2.568H5.212ZM8 8.457l3.122 2.467v2.827H4.878v-2.81L8 8.456Zm0 .425-2.788 2.219v2.316h5.576v-2.332L8 8.882Z",fill:"#fff"})))},Kr=["children","className","placement"],Xr=o((function(e){var t=e.children,n=e.className,r=e.placement,i=void 0===r?"top":r,o=Y(e,Kr);return a.createElement(f.Tooltip,Object.assign({arrow:!0,placement:i},o,{classes:{popper:n,tooltip:"stigg-tooltip",arrow:"stigg-tooltip-arrow"}}),a.createElement("div",null,t))}),{target:"enddsuj0"})((function(e){var t,n=e.theme,r=e.$padding,i=e.$maxWidth;return(t={})["& ."+f.tooltipClasses.tooltip]={backgroundColor:n.stigg.palette.white,maxWidth:void 0===i?300:i,boxShadow:n.stigg.shadows.popover,padding:void 0===r?8:r,borderRadius:n.stigg.border.radius,color:n.stigg.palette.text.primary},t["& ."+f.tooltipClasses.arrow]={color:n.stigg.palette.white},t}),""),Jr=k(le)($r||($r=Q(["\n display: ",";\n -webkit-line-clamp: ",";\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: normal;\n ","\n\n ","\n"])),(function(e){return e.$display}),(function(e){return e.$maxLines}),(function(e){return e.$wordBreak&&w.css(Zr||(Zr=Q(["\n word-break: break-word;\n "])))}),(function(e){return e.$bold&&w.css(Yr||(Yr=Q(["\n font-weight: bold;\n "])))}));function ei(e){return e&&(e.clientHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)}var ti=function(e){var t=e.leaveDelay,n=e.children,r=e.variant,o=e.color,l=e.maxLines,c=void 0===l?1:l,s=e.wordBreak,u=e.bold,d=e.tooltipPlacement,p=void 0===d?"top":d,m=e.className,g=e.display,h=void 0===g?"-webkit-box":g,f=e.style,y=e["data-testid"],v=i.useState(!1),b=v[0],x=v[1],E=i.useRef(null),w=a.createElement(Jr,{ref:E,variant:r,color:o,$maxLines:c,$wordBreak:s,$bold:u,className:m,$display:h,style:f,"data-testid":y},n);i.useEffect((function(){if(null!=E&&E.current){var e=ei(E.current);x(e)}}),[E]);var k=(null==E?void 0:E.current)&&ei(E.current);return a.createElement("span",null,b||k?a.createElement(Xr,{placement:p,leaveDelay:t,title:a.createElement(le,{variant:"body1"},n)},w):w)},ni=o("div",{target:"el5iwyw1"})("width:100%;display:flex;align-items:center;gap:4px;background-color:",(function(e){return e.theme.stigg.palette.warning}),";border-radius:10px;padding:8px 16px;margin-top:16px;"),ri=o(f.Link,{target:"el5iwyw0"})({name:"69ka7t",styles:"text-decoration-color:white;color:white;cursor:pointer"});function ii(e){var t=e.subscription,r=e.includePlanName,i=e.onManageSubscription;return(null==t?void 0:t.status)!==n.SubscriptionStatus.InTrial?null:a.createElement(ni,{className:"stigg-subscription-trial-badge"},a.createElement(Qr,{className:"stigg-subscription-trial-badge-image"}),a.createElement("div",{style:{flex:1,marginRight:4}},a.createElement(ti,{variant:"body1",className:"stigg-subscription-trial-badge-text",color:"white"},t.trialRemainingDays+" days remaining in trial",r&&" of the "+t.planName+" plan")),a.createElement(ri,{className:"stigg-subscription-trial-upgrade-button",onClick:i},a.createElement(le,{color:"white"},"Upgrade plan")))}function ai(e){var t=e.mainSubscription,n=e.trialSubscription,r=e.onManageSubscription;return a.createElement("div",{className:"stigg-subscription-view-layout"},a.createElement(le,{className:"stigg-subscription-plan-name",variant:"h1",overrideColor:e.theme.planNameColor,style:{marginTop:8}},t.planName," plan"),a.createElement(ii,{subscription:n,includePlanName:(null==n?void 0:n.planName)!==t.planName,onManageSubscription:r}))}function oi(e,t){return Math.min(Math.floor(e/t*100),100)}var li,ci=o(L,{target:"e1cbsoof1"})("height:4px;background-color:",(function(e){return s(e.theme.stigg.palette.primary).alpha(.4).string()}),";span{background-color:",(function(e){var t=e.theme;switch(e.$progressStatus){case"standard":return t.stigg.palette.primary;case"warning":return t.stigg.palette.warning;case"error":return t.stigg.palette.error;default:return t.stigg.palette.primary}}),";}"),si=o(f.Divider,{target:"e1cbsoof0"})("border-style:dotted;border-bottom-width:2px;border-color:",(function(e){return s(e.theme.stigg.palette.outlinedRestingBorder).alpha(.4).string()}),";");function ui(e){var t=e.entitlement;if(t.hasUnlimitedUsage)return a.createElement(si,null);var n,r=oi(t.currentUsage||0,t.usageLimit),i=(n=r)<70?"standard":n<100?"warning":"error";return a.createElement(ci,{$progressStatus:i,className:"stigg-feature-usage-progress-bar-"+i.toString(),variant:"determinate",value:r})}var di=k(C)(li||(li=Q(["\n text-transform: none;\n padding: 0;\n white-space: nowrap;\n"])));function pi(e){var t=e.entitlement,n=e.feature,r=e.onManageSubscription,i=e.onBuyMore,o=e.canBuyMore,l=e.canUpgradeSubscription;return e.hasCustomSubscription||t.hasUnlimitedUsage||oi(t.currentUsage||0,t.usageLimit)<70?null:o?i?a.createElement(di,{variant:"text",onClick:function(){return i(n,t)}},a.createElement(le,{color:"primary.main"},"Buy more")):null:l&&r?a.createElement(di,{variant:"text",onClick:r},a.createElement(le,{color:"primary.main"},"Upgrade")):null}function mi(e){var t,n,r,i=e.amount,o=e.currency,l=e.entitlement,c=e.feature,s=e.hideChargePrice,u=e.onBuyMore,d=e.onManageSubscription,p=e.canUpgradeSubscription,m=e.hasCustomSubscription;return a.createElement("div",{className:"stigg-charge-list-item",style:{display:"flex",flexDirection:"column",gap:12}},a.createElement("div",{style:{display:"flex",justifyContent:"space-between",gap:12}},a.createElement("div",{style:{display:"flex",gap:12}},a.createElement(ti,{variant:"body1",color:"primary"},c.displayName),!s&&a.createElement(ti,{variant:"body1",color:"secondary"},Ie({amount:i,currency:o})," per ",c.featureUnits)),a.createElement("div",{style:{display:"flex",gap:12}},a.createElement(pi,{entitlement:l,feature:c,canBuyMore:!0,onBuyMore:u,onManageSubscription:d,canUpgradeSubscription:p,hasCustomSubscription:m}),a.createElement(le,{variant:"body1",color:"primary",style:{whiteSpace:"nowrap"}},l.hasUnlimitedUsage?null==(t=l.currentUsage)?void 0:t.toLocaleString():(null==(n=l.currentUsage)?void 0:n.toLocaleString())+" of "+(null==(r=l.usageLimit)?void 0:r.toLocaleString())))),a.createElement(ui,{entitlement:l}))}function gi(e){var t=e.subscription,r=e.onBuyMore,i=e.onManageSubscription,o=e.hasCustomSubscription,l=e.canUpgradeSubscription,c=g.keyBy(e.entitlements,"feature.refId"),s=t.prices.filter((function(e){var t=e.feature;return!!t&&c[t.refId]&&!!e.price}));return s.length?a.createElement("div",{className:"stigg-charge-list",style:{display:"flex",flexDirection:"column",gap:16,marginTop:32}},s.map((function(e){var t=e.feature,s=e.price;if(!t||!s)return null;var u=c[t.refId];return u&&u.feature?a.createElement(mi,{key:t.refId,entitlement:u,feature:u.feature,amount:s.amount,currency:s.currency,hideChargePrice:e.billingModel===n.BillingModel.PerUnit,onBuyMore:r,onManageSubscription:i,canUpgradeSubscription:l,hasCustomSubscription:o}):null}))):null}function hi(e){var t=e.onManageSubscription,r=e.onBuyMore,i=e.onCancelScheduledUpdates,o=e.onContactSupport,l=e.hiddenSections,c=e.cancelScheduledUpdatesButtonTitle,s=$t(),u=s.customerPortal,d=s.textOverrides,p=s.theme,m=s.isLoading||!u,g=u||{},h=g.subscriptions,f=g.entitlements,y=g.canUpgradeSubscription,v=null==h?void 0:h.find((function(e){return e.status===n.SubscriptionStatus.Active})),b=null==h?void 0:h.find((function(e){return e.status===n.SubscriptionStatus.InTrial})),x=(null==v?void 0:v.pricingType)===n.PricingType.Custom,E=v||b;return a.createElement(Ir,{className:"stigg-customer-portal-subscriptions-overview",$backgroundColor:p.backgroundColor,$borderColor:p.borderColor},!m&&v&&v.scheduledUpdates&&a.createElement(Or,{theme:p,subscription:v,onCancelScheduledUpdates:i,cancelScheduledUpdatesButtonTitle:c}),m||!E?a.createElement(Cr,null):a.createElement("div",{className:"stigg-overview-layout",style:{display:"flex",alignItems:"flex-start",gap:64}},a.createElement("div",{style:{display:"flex",flexDirection:"column",flex:1}},a.createElement(nn,{onManageSubscription:t,hideManageButton:x,textOverrides:d}),a.createElement(ai,{mainSubscription:E,trialSubscription:b,theme:p,onManageSubscription:t}),v&&f&&a.createElement(gi,{subscription:v,entitlements:f,onBuyMore:r,onManageSubscription:t,canUpgradeSubscription:!!y,hasCustomSubscription:x}),a.createElement(wr,{customerPortal:u,hiddenSections:l,textOverrides:d,theme:p})),a.createElement("div",{style:{display:"flex",flexDirection:"column",width:319,gap:24}},a.createElement(Vr,{subscription:E,theme:p,onContactSupport:o,textOverrides:d}))))}var fi=o("div",{target:"e2lw8x70"})({name:"7wpci2",styles:"display:flex;width:100%;align-items:flex-end;justify-content:flex-end;margin-bottom:24px"});function yi(e){return a.createElement(fi,{className:"stigg-customer-portal-header-layout"},a.createElement(mt,{source:"customer_portal",showWatermark:e.showWatermark}))}var vi=o(le,{target:"eb0pe7a1"})({name:"kxbue8",styles:"text-transform:none"}),bi=o(U.ExternalLink,{target:"eb0pe7a0"})("color:",(function(e){return e.theme.stigg.palette.primary}),";");function xi(e){var t=e.text,n=e.url;return a.createElement(Qt,{className:e.className,variant:"outlined",startIcon:a.createElement(bi,{size:20,strokeWidth:2.5}),onClick:function(){window.open(n,"_blank")}},a.createElement(vi,{color:"primary.main"},t))}var Ei,wi=o("div",{target:"e12mjvl51"})({name:"1hidw77",styles:"display:flex;flex-direction:column;align-items:flex-start;gap:16px;flex:1 0 0"}),ki=o("div",{target:"e12mjvl50"})({name:"j9hhqa",styles:"display:flex;align-items:flex-start;gap:16px;align-self:stretch"});function Pi(e){var t=e.rows;return a.createElement(wi,null,a.createElement(le,{variant:"h6",color:"secondary",fontWeight:l.FontWeight.Medium},e.title),t.map((function(e){var t=e.classNamePrefix,n=e.label,r=e.value,i=e.valueTypographyProps;return a.createElement(ki,{key:n},a.createElement(le,Object.assign({className:t+"-label",variant:"body1",color:"secondary",style:{width:80}},e.labelTypographyProps),n),a.createElement(le,Object.assign({className:t+"-text",variant:"body1",color:"secondary"},i),r))})))}function Ci(){return a.createElement(x,{width:220,height:42})}function Si(){var e=$t(),t=e.customerPortal,n=e.textOverrides,r=e.theme,i=(t||{}).billingInformation,o=!i||e.isLoading,l=[];if(o?l.push.apply(l,[a.createElement(wi,null,a.createElement(x,{width:220,height:12}),a.createElement(x,{width:220,height:12}),a.createElement(x,{width:220,height:12})),a.createElement(f.Divider,{orientation:"vertical",style:{minHeight:93}}),a.createElement(wi,null,a.createElement(x,{width:220,height:12}),a.createElement(x,{width:220,height:12}),a.createElement(x,{width:220,height:12}))]):(l.push(a.createElement(Pi,{title:"Billed to",rows:[{classNamePrefix:"stigg-customer-name",label:"Name",value:(null==i?void 0:i.name)||"-",valueTypographyProps:null!=i&&i.name?{}:{color:"disabled"}},{classNamePrefix:"stigg-customer-email",label:"Email",value:(null==i?void 0:i.email)||"-",valueTypographyProps:null!=i&&i.email?{}:{color:"disabled"}}]})),null!=i&&i.defaultPaymentMethodId&&i.defaultPaymentMethodLast4Digits&&i.defaultPaymentExpirationMonth&&i.defaultPaymentExpirationYear&&(l.unshift(a.createElement(f.Divider,{orientation:"vertical",style:{minHeight:93}})),l.unshift(a.createElement(Pi,{title:"Payment method",rows:[{classNamePrefix:"stigg-credit-card",label:"Card",value:"Ending in "+i.defaultPaymentMethodLast4Digits},{classNamePrefix:"stigg-credit-card-expiration",label:"Expires",value:g.padStart(i.defaultPaymentExpirationMonth.toString(),2,"0")+"/"+i.defaultPaymentExpirationYear}]})))),!(o||null!=i&&i.name||null!=i&&i.email||null!=i&&i.defaultPaymentMethodId))return null;var c=o?a.createElement(Ci,null):null!=t&&t.billingPortalUrl?a.createElement(xi,{url:t.billingPortalUrl,text:n.editPaymentDetails,className:"stigg-edit-payment-details-button"}):null;return a.createElement(Ir,{className:"stigg-payment-details-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor},a.createElement(Jt,{className:"stigg-payment-details-section-header"},a.createElement(en,{isLoading:o,className:"stigg-payment-details-section-title",title:"Payment details"}),c),a.createElement("div",{style:{display:"flex",alignItems:"stretch",gap:64}},l))}var Ti=o(Ir,{target:"eqpkdww0"})("position:relative;.stigg-paywall-layout{width:100%;}.stigg-paywall-plans-layout{flex-wrap:nowrap;width:100%;overflow-x:auto;justify-content:unset;padding:0;}.stigg-paywall-plans-layout .stigg-plan-offering-container:first-of-type{margin-left:auto;}.stigg-paywall-plans-layout .stigg-plan-offering-container:last-child{margin-right:auto;}",(function(e){return e.$hideButtons&&c.css(Ei||(Ei=Q(["\n .stigg-paywall-plan-button:not([disabled]) {\n display: none;\n }\n "])))})," .","stigg-watermark","{display:none;}"),Bi=a.forwardRef((function(e,t){var n=e.paywallComponent,r=e.theme;return n?a.createElement(Ti,{className:"stigg-customer-portal-paywall-section",ref:t,$hideButtons:e.hidePaywallButtons,$backgroundColor:r.backgroundColor,$borderColor:r.borderColor},a.createElement(Jt,{className:"stigg-customer-portal-paywall-header"},a.createElement(en,{isLoading:e.isLoading,className:"stigg-customer-portal-paywall-section-title",title:e.title})),n):null})),Ai=o("div",{target:"e1gjjeod1"})({name:"6xtw2",styles:"width:100%;display:flex;flex-direction:column;align-items:center;& *{box-sizing:border-box;}"}),Mi=o("div",{target:"e1gjjeod0"})({name:"1c31jfu",styles:"width:100%;display:flex;flex-direction:column;align-items:center;row-gap:24px"}),Ui=o("div",{target:"eqqveb80"})("display:flex;flex-direction:column;padding:24px;border:",(function(e){return"1px solid "+e.$borderColor}),";border-radius:10px;row-gap:16px;height:100%;",(function(e){return e.$highlight&&"background-color: "+e.theme.stigg.palette.backgroundSection}),";");function Li(e){var t,r,i,o,l,c=e.entitlement,s=e.subscriptionPrice,u=e.onManageSubscription,d=e.onBuyMore,m=e.hasCustomSubscription,g=e.canUpgradeSubscription,h=$t().theme,f=!c.hasUnlimitedUsage&&c.currentUsage>c.usageLimit;return c.feature?a.createElement(Ui,{$highlight:!!s,$borderColor:h.borderColor},a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16}},a.createElement(ti,{variant:"body1"},c.feature&&((l=F((o=c.feature).displayName))===F(o.featureUnits||"")||l===F(o.featureUnitsPlural||"")?o.displayName:o.displayName+" ("+o.featureUnitsPlural+")")),s&&a.createElement(Xr,{title:a.createElement(le,{variant:"body1"},s.billingModel===n.BillingModel.PerUnit?"Billed for committed usage":"Billed for actual usage")},a.createElement(vr,{icon:"DollarCoin",svgStrokeColor:h.iconsColor}))),a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8}},a.createElement(ti,{variant:"body1",color:f?"error":"primary","data-testid":"usage-data-"+(null==(t=c.feature)?void 0:t.refId)},null==(r=c.currentUsage)?void 0:r.toLocaleString(),!c.hasUnlimitedUsage&&" / "+(null==(i=c.usageLimit)?void 0:i.toLocaleString())+" ("+oi(c.currentUsage||0,c.usageLimit)+"%)"),a.createElement(pi,{entitlement:c,feature:c.feature,onBuyMore:d,canBuyMore:!!s,onManageSubscription:u,canUpgradeSubscription:g,hasCustomSubscription:m})),a.createElement(ui,{entitlement:c}),c.hasUnlimitedUsage||N(c.usageLimit)||N(c.currentUsage)||!c.resetPeriod||!c.nextResetDate?null:a.createElement(le,{color:"secondary"},function(e){if(!e.resetPeriod||!e.nextResetDate)return null;var t=function(t){return p.utc(e.nextResetDate).diff(p.utc(),t)};switch(e.resetPeriod){case"MONTH":return"Resets monthly - in "+t("days")+" days";case"WEEK":return"Resets weekly - in "+t("days")+" days";case"DAY":return"Resets daily - in "+t("hours")+" hours";case"HOUR":return"Resets hourly - in "+t("minutes")+" minutes";default:return null}}(c)),c.hasUnlimitedUsage&&a.createElement(le,{color:"secondary"},"In current billing period")):null}var Ni=o("div",{target:"eoaojje0"})({name:"3hgi0y",styles:"margin-top:32px"});function Fi(){return a.createElement(f.Grid,{container:!0,spacing:4,className:"stigg-subscription-usage-skeleton-layout"},g.range(6).map((function(e){return a.createElement(f.Grid,{key:e,item:!0,xs:4},a.createElement(x,{width:280,height:120}))})))}function Oi(e){var t=e.onManageSubscription,r=e.onBuyMore,i=a.useState(!1),o=i[0],l=i[1],c=$t(),s=c.customerPortal,u=c.textOverrides,d=c.theme,p=c.isLoading||!s,m=s||{},h=m.entitlements,y=m.subscriptions,v=null==h?void 0:h.filter((function(e){var t,r;return(null==(t=e.feature)?void 0:t.meterType)===n.MeterType.Fluctuating||(null==(r=e.feature)?void 0:r.meterType)===n.MeterType.Incremental})),b=null==y?void 0:y.find((function(e){return e.status===n.SubscriptionStatus.Active})),x=(null==b?void 0:b.pricingType)===n.PricingType.Custom,E=!(null==s||!s.canUpgradeSubscription),w=g.keyBy(null==b?void 0:b.prices,"feature.refId"),k=g.keyBy(v,"feature.refId"),P=g.compact(null==b?void 0:b.prices.map((function(e){return e.feature&&k[e.feature.refId]}))),C=g.compact(null==v?void 0:v.filter((function(e){return!w[e.feature.refId]}))),S=[].concat(P,C),T=S.length>2?4:6,B=o?S:S.slice(0,6);return p||null!=v&&v.length?a.createElement(Ir,{className:"stigg-subscription-usage-layout",$backgroundColor:d.backgroundColor,$borderColor:d.borderColor},a.createElement(Jt,null,a.createElement(en,{title:u.usageTabTitle,className:"stigg-customer-portal-usage-section-title",isLoading:p})),p?a.createElement(Fi,null):a.createElement(a.Fragment,null,a.createElement(f.Grid,{container:!0,spacing:4},B.map((function(e){return a.createElement(f.Grid,{item:!0,xs:T},a.createElement(Li,{key:e.feature.refId,subscriptionPrice:w[e.feature.refId],entitlement:e,onManageSubscription:t,onBuyMore:r,hasCustomSubscription:x,canUpgradeSubscription:E}))}))),S.length>6&&a.createElement(Ni,null,a.createElement(Qt,{className:"stigg-usage-toggle-many-button",variant:"text",startIcon:a.createElement(o?U.Minus:U.Plus,null),onClick:function(){return l((function(e){return!e}))}},o?"Show less":"Show more")))):null}function Ii(e){var t=e.onManageSubscription,r=e.onBuyMore,o=e.onCancelScheduledUpdates,l=e.onContactSupport,c=e.paywallComponent,s=e.hiddenSections,u=Pt().stigg,d=$t(),p=d.customerPortal,m=d.textOverrides,g=d.theme,h=d.isLoading,f=i.useRef(null),y=function(){var e;t?t():null==f||null==(e=f.current)||e.scrollIntoView({behavior:"smooth"})},v=null==p?void 0:p.subscriptions.some((function(e){return e.pricingType===n.PricingType.Custom})),b=!(null!=s&&s.some((function(e){return"usage"===e}))),x=!(null!=s&&s.some((function(e){return"paymentDetails"===e||"billingInformation"===e}))),E=!(null!=s&&s.some((function(e){return"invoices"===e||"billingInformation"===e})));return a.createElement(Ai,{className:"stigg-customer-portal-layout"},a.createElement(yi,{showWatermark:u.isWidgetWatermarkEnabled&&!!p}),a.createElement(Mi,{className:"stigg-customer-portal-sections"},a.createElement(hi,{onCancelScheduledUpdates:o,onBuyMore:r,onManageSubscription:y,onContactSupport:l,hiddenSections:s,cancelScheduledUpdatesButtonTitle:m.cancelScheduledUpdatesButtonTitle}),b&&a.createElement(Oi,{onManageSubscription:y,onBuyMore:r}),a.createElement(Bi,{ref:f,paywallComponent:c,hidePaywallButtons:!!v,theme:g,title:m.paywallSectionTitle,isLoading:!p||h}),x&&a.createElement(Si,null),E&&a.createElement(ji,null)))}var Di=["textOverrides","theme","resourceId","productId"];function ji(){var e=$t(),t=e.customerPortal,n=e.textOverrides,r=e.theme,i=!t||e.isLoading,o=i?a.createElement(Ci,null):null!=t&&t.billingPortalUrl?a.createElement(xi,{url:t.billingPortalUrl,text:n.viewInvoiceHistory,className:"stigg-view-invoice-history-button"}):null;return i||null!=t&&t.billingPortalUrl?a.createElement(Ir,{className:"stigg-invoices-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor},a.createElement(Jt,{className:"stigg-invoices-section-header"},a.createElement(en,{isLoading:i,className:"stigg-invoices-section-title",title:n.invoicesTitle}),o)):null}var qi=function(e){return E(e,"addon.displayName")};function Ri(e,t){return e.pricePoints.some((function(e){return e.billingPeriod===t}))}function Gi(e){var t=e.addon,n=e.currency,r=e.billingCountryCode;return Z({},t,{pricePoints:t.pricePoints.filter((function(e){return e.currency===n&&(!r||e.billingCountryCode===r)}))})}function _i(){var e=la()[1];return function(t){return e((function(e){D(e.addonsStep.addons,(function(e){return e.addon.id===t}))}))}}function Wi(){var e,t,n={checkoutState:(e=la()[0]).checkout,widgetState:e.widgetState,checkoutLocalization:e.checkoutLocalization};return{checkoutState:n.checkoutState,widgetState:n.widgetState,checkoutLocalization:n.checkoutLocalization,setWidgetReadOnly:(t=la()[1],function(e){return t((function(t){t.widgetState.readOnly=e}))})}}var Hi,Vi=function(e,t){return e.minUnitQuantity&&t<e.minUnitQuantity?e.minUnitQuantity:e.maxUnitQuantity&&t>e.maxUnitQuantity?e.maxUnitQuantity:t},zi=function(e){return e.pricingModel===n.BillingModel.PerUnit};function $i(){var e=la()[1];return function(t,n){return e((function(e){var r=e.planStep.billableFeatures.find((function(e){return e.featureId===t}));r?r.quantity=n:e.planStep.billableFeatures.push({featureId:t,quantity:n})}))}}function Zi(){var e;return Z({},la()[0].planStep,{setBillingPeriod:(e=la()[1],function(t){return e((function(e){e.planStep.billingPeriod=t}))}),setBillableFeature:$i()})}!function(e){e.PLAN="PLAN",e.ADDONS="ADDONS",e.PAYMENT="PAYMENT"}(Hi||(Hi={}));var Yi=[{key:Hi.PLAN,label:"Plan"},{key:Hi.ADDONS,label:"Add-ons"},{key:Hi.PAYMENT,label:"Payment details"}],Qi={activeStep:0,completedSteps:[],steps:Yi,isDisabled:!1};function Ki(){var e=la()[1];return function(t){return e((function(e){e.progressBar.completedSteps.push(t)}))}}function Xi(){var e=la()[1];return function(){return e((function(e){var t=e.progressBar;t.isDisabled||(t.completedSteps.includes(t.activeStep)||t.completedSteps.push(t.activeStep),t.activeStep<t.steps.length-1&&(t.activeStep+=1))}))}}function Ji(){var e=la()[1];return function(t){return e((function(e){e.progressBar.isDisabled=!!t}))}}function ea(){var e,t,n=la()[0].progressBar;return{currentStep:n.steps[n.activeStep],progressBarState:n,isLastStep:n.activeStep===n.steps.length-1,isCheckoutComplete:(t=n,t.completedSteps.length>=t.steps.length-1),setActiveStep:(e=la()[1],function(t){return e((function(e){e.progressBar.activeStep=t}))}),markStepAsCompleted:Ki(),goNext:Xi(),setIsDisabled:Ji()}}function ta(){var e=la()[0],t=e.paymentStep;return Z({},e.planStep,{addons:e.addonsStep.addons,promotionCode:e.promotionCode,billingAddress:t.billingAddress,taxPercentage:t.taxPercentage})}var na=function(){var e=Pt().stigg,t=ta(),n=la()[0],r=n.resourceId,a=n.planStep,o=Wi().checkoutState||{},l=o.plan,c=o.customer;return{previewSubscriptionAction:i.useCallback(function(){var n=$(Et.mark((function n(i){var o,s,u,d,p,m,g,h;return Et.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=(void 0===i?{}:i).promotionCode,s=t.addons.map((function(e){return{addonId:e.addon.id,quantity:e.quantity}})),u=null,d=null,!t.billableFeatures.some((function(e){var t=e.quantity;return null===t||t<=0}))&&!s.some((function(e){var t=e.quantity;return null===t||t<=0}))){n.next=8;break}return n.abrupt("return",{subscriptionPreview:u});case 8:if(n.prev=8,null==c||!c.id||null==l||!l.id){n.next=14;break}return p=Z({customerId:c.id,planId:null==l?void 0:l.id,billableFeatures:t.billableFeatures,addons:s,billingPeriod:t.billingPeriod,promotionCode:null!=o?o:t.promotionCode,resourceId:r,billingCountryCode:a.billingCountryCode},(v=(f={billingAddress:t.billingAddress,taxPercentage:t.taxPercentage}).taxPercentage,(y=f.billingAddress)||v?{billingInformation:Z({},y?{billingAddress:y}:{},v?{taxPercentage:v}:{})}:{})),n.next=13,e.previewSubscription(p);case 13:u=n.sent;case 14:n.next=20;break;case 16:n.prev=16,n.t0=n.catch(8),g=(null==n.t0||null==(m=n.t0.message)?void 0:m.split("Error:"))||[],d=null==(h=g[1])?void 0:h.trim();case 20:return n.abrupt("return",{subscriptionPreview:u,errorMessage:d});case 21:case"end":return n.stop()}var f,y,v}),n,null,[[8,16]])})));return function(e){return n.apply(this,arguments)}}(),[c,l,r,e,t.addons,t.billingPeriod,t.billableFeatures,t.promotionCode,t.billingAddress,t.taxPercentage,a.billingCountryCode])}};function ra(){var e=la()[1];return function(t){return e((function(e){e.paymentStep.errorMessage=t}))}}function ia(){var e=la()[1];return function(t){return e((function(e){e.paymentStep.billingAddress=t}))}}function aa(){var e;return Z({},la()[0].paymentStep,{setUseNewPaymentMethod:(e=la()[1],function(t){return e((function(e){e.paymentStep.useNewPaymentMethod=t}))}),setErrorMessage:ra(),setBillingAddress:ia()})}var oa=a.createContext(null);oa.displayName="CheckoutContext";var la=function(){var e=i.useContext(oa);if(!e)throw new Error("Could not find Checkout context; You need to wrap your checkout components in an <CheckoutProvider> component.");return e},ca=function(e){var t=e.children,n=e.initialState,r=i.useState(n),o=r[0],l=r[1];i.useEffect((function(){l(n)}),[n]);var c=i.useCallback((function(e){return l((function(t){return O.produce(t,(function(t){return e(t)}))}))}),[l]),s=i.useMemo((function(){return[o,c]}),[c,o]);return a.createElement(oa.Provider,{value:[s[0],s[1]]},t)};function sa(e){var t,r=e.children,o=e.textOverrides,l=e.theme,c=e.preferredBillingPeriod,s=e.billableFeatures,d=e.billingCountryCode,m=e.billingInformation,g=function(e){var t=e.planId,n=e.resourceId,r=e.billingCountryCode,a=Pt().stigg,o=i.useState(!0),l=o[0],c=o[1],s=i.useState(),u=s[0],d=s[1];return i.useEffect((function(){var e=function(){var e=$(Et.mark((function e(){return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.getCheckoutState({planId:t,resourceId:n,billingCountryCode:r});case 3:d(e.sent),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),wt.error("Failed to load checkout "+(null==e.t0?void 0:e.t0.message),e.t0);case 10:return e.prev=10,c(!1),e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[0,7,10,13]])})));return function(){return e.apply(this,arguments)}}();a.isCustomerLoaded&&(c(!0),e())}),[a,a.isCustomerLoaded,n,t,r]),{checkout:u,isLoading:l}}({resourceId:e.resourceId,planId:e.planId,billingCountryCode:d}),h=g.checkout,f=g.isLoading,y=null!=h&&h.configuration?function(e){var t=e.palette;return{palette:{primary:(null==t?void 0:t.primary)||void 0,backgroundPaper:(null==t?void 0:t.backgroundColor)||void 0,outlinedBorder:(null==t?void 0:t.borderColor)||void 0,text:{primary:(null==t?void 0:t.textColor)||void 0},backgroundHighlight:(null==t?void 0:t.selectionColor)||void 0,backgroundSection:(null==t?void 0:t.summaryBackgroundColor)||void 0},typography:Bt(e.typography)}}(h.configuration):void 0,v=Wt(y),b=i.useMemo((function(){var e,t,r,i,a=function(e,t,n){var r=(e||{}).palette;return{primary:(null==t?void 0:t.primary)||(null==r?void 0:r.primary)||"rgb(50, 126, 238)",textColor:(null==t?void 0:t.textColor)||(null==r?void 0:r.text.primary)||"rgb(0, 30, 108)",backgroundColor:(null==t?void 0:t.backgroundColor)||(null==r?void 0:r.backgroundPaper)||"rgb(255, 255, 255)",borderColor:(null==t?void 0:t.borderColor)||(null==r?void 0:r.outlinedBorder)||"rgb(235, 237, 243)",selectionColor:(null==t?void 0:t.selectionColor)||(null==r?void 0:r.backgroundSection)||"rgb(229, 242, 255)",summaryBackgroundColor:(null==t?void 0:t.summaryBackgroundColor)||(null==r?void 0:r.backgroundHighlight)||"rgb(109, 121, 144)"}}(v,l),g=u({changePlan:"Change plan",billingPeriodsTitle:"Billing cycle",addAddonText:"Add",newPaymentMethodText:"New payment method",newPaymentMethodBillingAddressTitle:"Billing address",newPaymentMethodCardTitle:"Payment method",baseChargeText:function(){return"Base charge"},totalText:"Total due today",subTotalText:"Subtotal",addCouponCodeText:"Add coupon code",couponCodeTitle:"Coupon code",addonsSectionTitle:"Add-ons",changesWillApplyAtEndOfBillingPeriod:function(e){return"Your changes will apply on the end of your current billing cycle on "+p(e.billingPeriodEnd).format("MMM D, YYYY")+"."},checkoutButton:{nextText:"Next",downgradeText:"Downgrade",upgradeText:"Upgrade",purchaseText:"Purchase"},appliedCreditsTitle:"Applied credits",taxTitle:function(e){var t=e.taxDetails;return"Tax ("+(null==t?void 0:t.percentage)+"%)"},downgradeToFreeAlertText:function(){return"We’re sorry to see you cancel your paid subscription 😭"}},o),y=function(e){var t=e.plan,n=e.activeSubscription,r=e.billingCountryCode,i=e.preconfiguredBillableFeatures,a=function(e){var t,n,r,i,a=e.plan,o=e.activeSubscription,l=e.preferredBillingPeriod,c=null==a?void 0:a.pricePoints.some((function(e){return e.billingPeriod===R.BillingPeriod.Monthly})),s=null==a?void 0:a.pricePoints.some((function(e){return e.billingPeriod===R.BillingPeriod.Annually}));if(l){if(l===R.BillingPeriod.Monthly&&c)return R.BillingPeriod.Monthly;if(l===R.BillingPeriod.Annually&&s)return R.BillingPeriod.Annually}return(null==o||null==(t=o.plan)?void 0:t.id)===(null==a?void 0:a.id)?(null==o||null==(r=o.price)?void 0:r.billingPeriod)||R.BillingPeriod.Monthly:null!=o&&null!=(n=o.price)&&n.billingPeriod?null==o||null==(i=o.price)?void 0:i.billingPeriod:s?R.BillingPeriod.Annually:R.BillingPeriod.Monthly}({plan:t,activeSubscription:n,preferredBillingPeriod:e.preferredBillingPeriod}),o=function(e,t,n){var r;if(!t)return[];var i=j(e,"featureId"),a=j(q(null==n||null==(r=n.prices)?void 0:r.map((function(e){var t=e.feature;return t&&zi(e)?{featureId:t.featureId,quantity:t.unitQuantity||null}:null}))),"featureId");return q(null==t?void 0:t.map((function(e){var t,n,r,o,l=null==(t=e.feature)?void 0:t.featureId;if(!l||!zi(e))return null;var c=(null==(n=i[l])?void 0:n.quantity)||(null==(r=a[l])?void 0:r.quantity);return o=Vi(e,c||1),e.isTieredPrice&&(o=we(e.tiers,o).upTo),{featureId:l,quantity:o}})))}(i,null==t?void 0:t.pricePoints.filter((function(e){return e.billingPeriod===a})),n);return{billingPeriod:a,billableFeatures:o,billingCountryCode:r}}({preferredBillingPeriod:c,plan:null==h?void 0:h.plan,activeSubscription:null==h?void 0:h.activeSubscription,billingCountryCode:d,preconfiguredBillableFeatures:null!=s?s:[]}),b=function(e){var t,r,i=e.activeSubscription,a=e.plan,o=e.billingPeriod,l=e.billingCountryCode,c=[],s=(null==a||null==(t=a.pricePoints)||null==(r=t[0])?void 0:r.currency)||n.Currency.Usd,u=function(e){return E(e,"displayName")}(function(e){var t,n=e.addons,r=e.billingPeriod,i=e.billingCountryCode,a=e.currency;return(null==n||null==(t=n.filter((function(e){return Ri(e,r)})))?void 0:t.map((function(e){return Gi({addon:e,currency:a,billingCountryCode:i})})))||[]}({addons:null==a?void 0:a.compatibleAddons,billingPeriod:o,billingCountryCode:l,currency:s})),d=function(e){var t,n=e.addons,r=e.billingPeriod,i=e.billingCountryCode,a=e.currency;return(null==n||null==(t=n.filter((function(e){return Ri(e.addon,r)})))?void 0:t.map((function(e){return Z({},e,{addon:Gi({addon:e.addon,currency:a,billingCountryCode:i})})})))||[]}({addons:null==i?void 0:i.addons,billingPeriod:o,billingCountryCode:l,currency:s});return null!=d&&d.length&&null!=u&&u.length&&(c=qi(d.filter((function(e){return u.some((function(t){return t.id===e.addon.id}))})))),{addons:c,initialAddons:I(c),availableAddons:u}}({plan:null==h?void 0:h.plan,billingPeriod:y.billingPeriod,activeSubscription:null==h?void 0:h.activeSubscription}),x={useNewPaymentMethod:!(null!=(i=(r={customer:null==h?void 0:h.customer,taxPercentage:null==m||null==(e=m.taxDetails)?void 0:e.taxPercentage}).customer)&&i.paymentMethodDetails),taxPercentage:r.taxPercentage},w=function(e){var t=e.availableAddons;return 0===(null==t?void 0:t.length)?Z({},Qi,{steps:Yi.filter((function(e){return e.key!==Hi.ADDONS}))}):Qi}({availableAddons:f?void 0:b.availableAddons});return{checkout:h,checkoutLocalization:g,stiggTheme:v,theme:a,progressBar:w,planStep:y,addonsStep:b,paymentStep:x,resourceId:null==h||null==(t=h.resource)?void 0:t.id,widgetState:{readOnly:!1,isLoadingCheckoutData:f}}}),[c,d,h,f,null==m||null==(t=m.taxDetails)?void 0:t.taxPercentage]);return a.createElement(Vt,{key:null==h?void 0:h.plan.id,componentTheme:y},a.createElement(ca,{initialState:b},r))}var ua,da,pa,ma=o("div",{target:"ergo9xd2"})("margin:auto;width:100%;min-height:760px;max-width:920px;display:flex;position:relative;flex-direction:column;align-items:center;padding:16px 32px;border-radius:10px;background-color:",(function(e){return e.theme.stigg.palette.backgroundPaper}),";border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";& *{box-sizing:border-box;}"),ga=o(T,{target:"ergo9xd1"})({name:"1pdbip7",styles:"display:flex;align-items:flex-start;gap:32px;flex-wrap:wrap;width:100%"}),ha=o(T,{target:"ergo9xd0"})({name:"fszphw",styles:"display:flex;flex-direction:column;gap:0;flex:2"}),fa=o(f.LinearProgress,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"e9upyia2"})((function(e){var t,n=e.theme,r=e.$disabled;return(t={})["&."+f.linearProgressClasses.root]={borderRadius:n.stigg.border.radius,backgroundColor:n.stigg.palette.outlinedBorder},t["& ."+f.linearProgressClasses.bar]={backgroundColor:r?s(n.stigg.palette.outlinedBorder).darken(.2).hex():n.stigg.palette.primary},t}),""),ya=o(f.Button,{target:"e9upyia1"})((function(){var e;return(e={})["&."+f.buttonClasses.root]={textTransform:"none",lineHeight:"inherit",justifyContent:"flex-start",padding:"8px 4px"},e}),""),va=o(vr,{target:"e9upyia0"})((function(e){var t=e.theme,n=e.$shouldStroke;return{circle:{stroke:void 0===n||n?e.$disabled?t.stigg.palette.text.disabled:t.stigg.palette.primary:void 0}}}),""),ba=o(f.Grid,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"e1v7qkry3"})("display:flex;flex-direction:",(function(e){return e.$flexDirection||"row"}),";gap:",(function(e){return e.$gap}),"px;"),xa=o(ba,{target:"e1v7qkry2"})({name:"o7lzx8",styles:"span{display:flex;flex:1;}"}),Ea=o(f.Grid,{target:"e1v7qkry1"})("span{display:flex;flex:",(function(e){return e.flex}),";}"),wa=o(x,{target:"e1v7qkry0"})({name:"1u8hqvf",styles:"border-radius:4px"}),ka=function(){var e=ea(),t=e.progressBarState,n=e.setActiveStep,r=Wi().widgetState,i=r.readOnly,o=r.isLoadingCheckoutData,l=t||{},c=l.activeStep,s=l.completedSteps,u=l.steps;return a.createElement(f.Box,{sx:{width:"100%",mb:3}},a.createElement(fa,{variant:"determinate",value:100*(c+1)/u.length,$disabled:i}),a.createElement(f.Grid,{container:!0,display:"flex"},u.map((function(e,r){var l=e.key,u=e.label,d=s.includes(r),p=i||r>c&&!d&&!s.includes(r-1)||c!==r&&t.isDisabled,m=p?"OutlinedCheckedCircleDisabled":"OutlinedCheckedCircle";return a.createElement(f.Grid,{key:l,item:!0,display:"flex",flexDirection:"row",flex:1,justifyContent:"flex-start"},o?a.createElement(wa,{width:120,height:20,style:{marginTop:8}}):a.createElement(ya,{onClick:function(){return n(r)},fullWidth:!0,disabled:p},a.createElement(f.Grid,{item:!0,display:"flex",flexDirection:"row",alignItems:"center",gap:1},a.createElement(f.StepIcon,{icon:a.createElement(va,d?{icon:m,$shouldStroke:!p}:{icon:"OutlinedCircle",$disabled:p})}),a.createElement(le,{variant:"h6",color:p?"disabled":"primary.main"},u))))}))))},Pa=[n.BillingModel.FlatFee,n.BillingModel.PerUnit,n.BillingModel.UsageBased],Ca=function(e){return i.useMemo((function(){return function(e){return E(e,[function(e){return Pa.indexOf(e.pricingModel)},function(e){var t;return null==(t=e.feature)?void 0:t.displayName}])}(e)}),[e])},Sa=["variant"],Ta=o(f.Button,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"effv4rq0"})("border-radius:10px;text-transform:none;",(function(e){var t=e.theme,n=e.$error;return e.$success?f.css(ua||(ua=Q(["\n background-color: ",";\n cursor: 'default';\n\n &:hover {\n background-color: ",";\n }\n "])),t.stigg.palette.success,t.stigg.palette.successDark):n?f.css(da||(da=Q(["\n background-color: ",";\n\n &:hover {\n background-color: ",";\n }\n "])),t.stigg.palette.error,t.stigg.palette.errorDark):""}),";"),Ba=function(e){var t=e.variant,n=void 0===t?"outlined":t,r=Y(e,Sa);return a.createElement(Ta,Object.assign({variant:n},r))},Aa=W(f.TextField)((function(e){var t=e.theme;return{"& .MuiOutlinedInput-root":{height:"42px",borderRadius:t.stigg.border.radius,fieldset:{borderColor:t.stigg.palette.outlinedBorder},"&:not(.Mui-focused):hover fieldset":{borderColor:t.stigg.palette.outlinedRestingBorder}},"& .MuiInputBase-input":Z({padding:"8px 12px",borderRadius:t.stigg.border.radius,fontFamily:t.stigg.typography.fontFamily,color:t.stigg.palette.text.primary},t.stigg.typography.body)}})),Ma=o(f.Grid,{target:"e1q84ats0"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"});function Ua(){return a.createElement(Ma,{container:!0},a.createElement(ba,{item:!0,$gap:48},a.createElement(wa,{width:120,height:20}),a.createElement(wa,{width:120,height:20})),a.createElement(f.Divider,{className:"stigg-checkout-plan-header-divider",sx:{marginY:2}}),a.createElement(Ma,{item:!0},a.createElement(wa,{width:120,height:20}),a.createElement(xa,{$gap:16,marginTop:3},a.createElement(wa,{height:20}),a.createElement(wa,{height:20})),a.createElement(ba,{$gap:130,marginTop:3},a.createElement(Ea,{flex:1},a.createElement(wa,{height:20})),a.createElement(Ea,{flex:3},a.createElement(wa,{height:20})))))}function La(){var e;return{promotionCode:la()[0].promotionCode,setPromotionCode:(e=la()[1],function(t){return e((function(e){e.promotionCode=t}))})}}function Na(){return(Na=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Fa=o((function(e){return i.createElement("svg",Na({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),pa||(pa=i.createElement("g",{stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M10 4.167v11.666M4.167 10h11.667"}))))}),{target:"e3hfkj90"})("path{stroke:",(function(e){return e.theme.stigg.palette.primary}),";}"),Oa=function(e){var t=e.checkoutLocalization;return a.createElement(Ba,{fullWidth:!0,className:"stigg-checkout-summary-add-coupon-code-button",sx:{textTransform:"none",justifyContent:"flex-start"},variant:"text",size:"medium",onClick:e.onAddClick},a.createElement(Fa,{className:"stigg-checkout-summary-add-coupon-code-button-icon"}),a.createElement(le,{className:"stigg-checkout-change-plan-button-text",color:"primary.main",style:{lineHeight:"24px"},variant:"body1"},t.addCouponCodeText))},Ia=o(Ba,{target:"e8kocin0"})("padding:4px 10px;min-width:unset;border-radius:",(function(e){return e.theme.stigg.border.radius}),";display:flex;align-items:center;"),Da=function(e){var t=e.checkoutLocalization,n=La().setPromotionCode,r=i.useState(!1),o=r[0],l=r[1],c=a.useState(""),s=c[0],u=c[1],d=a.useState(!1),p=d[0],m=d[1],g=a.useState(""),h=g[0],y=g[1],v=na().previewSubscriptionAction,b=function(){var e=$(Et.mark((function e(){var t,r,i;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),y(""),e.next=4,v({promotionCode:s});case 4:r=(t=e.sent).subscriptionPreview,!(i=t.errorMessage)&&null!=r&&r.discount?(n(s.toUpperCase()),l(!1)):i&&y(i),m(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return o?a.createElement(f.Grid,null,a.createElement(le,{variant:"body1",color:h?"error":"primary.main"},t.couponCodeTitle),a.createElement(Aa,{autoFocus:!0,variant:"outlined",fullWidth:!0,error:!!h,value:s,onChange:function(e){u(e.target.value)},inputProps:{maxLength:20},InputProps:{endAdornment:a.createElement(Ia,{variant:"contained",disabled:p,onClick:b},p?a.createElement(f.CircularProgress,{size:18,sx:{color:"white"}}):a.createElement(vr,{style:{display:"flex"},icon:"ArrowForward"}))}}),!!h&&a.createElement(le,{variant:"body1",color:"error"},h)):a.createElement(Oa,{onAddClick:function(){return l(!0)},checkoutLocalization:t})},ja=o(f.Grid,{target:"e1cvrfx30"})("width:auto;display:inline-flex;align-items:center;flex-direction:row;gap:8px;padding:6px 16px;border-radius:",(function(e){return e.theme.stigg.border.radius}),";border:1px solid ",(function(e){return e.theme.stigg.palette.primary}),";"),qa=function(e){var t=e.onClearPromotionCode;return a.createElement(ja,{container:!0},a.createElement(f.Grid,{item:!0},a.createElement(le,{variant:"body1",color:"primary.main"},e.promotionCode)),a.createElement(f.Grid,{item:!0},a.createElement(Ba,{variant:"text",sx:{minWidth:"unset",padding:0},onClick:t},a.createElement(vr,{icon:"Close",style:{display:"flex"}}))))},Ra=o("div",{target:"eqejwsl0"})({name:"1k6141t",styles:"margin:16px 0"}),Ga=function(e){var t,n=e.checkoutLocalization,r=La(),i=r.promotionCode,o=r.setPromotionCode;return t=i?a.createElement(qa,{promotionCode:i,onClearPromotionCode:function(){o("")}}):a.createElement(Da,{checkoutLocalization:n}),a.createElement(Ra,null,t)},_a=["postal_code"];function Wa(e){var t,n=e.onBillingAddressChange,r=Wi(),i=r.checkoutState,o=r.checkoutLocalization,l=r.widgetState,c=r.setWidgetReadOnly,s=aa().setBillingAddress,u=i||{},d=u.customer,p=u.configuration,m=l.readOnly;return a.createElement(f.Grid,{flexDirection:"column",container:!0,gap:3,padding:"16px",sx:{pointerEvents:m?"none":void 0}},a.createElement(f.Grid,{flexDirection:"column",container:!0,gap:2},a.createElement(le,{variant:"h6"},o.newPaymentMethodBillingAddressTitle),a.createElement(G.AddressElement,{onChange:function(e){if(e.complete){var t=e.value.address,r=Z({postalCode:t.postal_code},Y(t,_a));c(!0),s(r),n?function(){var e=$(Et.mark((function e(){return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({billingAddress:r});case 2:c(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()():c(!1)}},options:{mode:"billing",fields:{phone:null!=p&&null!=(t=p.content)&&t.collectPhoneNumber?"always":"auto"},defaultValues:Z({},(null==d?void 0:d.name)&&{name:d.name})}})),a.createElement(f.Grid,{flexDirection:"column",container:!0,gap:2},a.createElement(le,{variant:"h6"},o.newPaymentMethodCardTitle),a.createElement(G.PaymentElement,{onChange:function(){},onReady:function(){},options:{readOnly:m,terms:{card:"never"},defaultValues:{billingDetails:Z({},(null==d?void 0:d.name)&&{name:d.name},(null==d?void 0:d.email)&&{email:d.email})}}})))}function Ha(e){return Va.apply(this,arguments)}function Va(){return(Va=$(Et.mark((function e(t){var n,r;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.elements){e.next=5;break}return console.error("Stripe elements not initialized"),e.abrupt("return",{success:!1,errorMessage:"Stripe elements not initialized"});case 5:return e.next=7,n.submit();case 7:if(!(r=e.sent.error)){e.next=12;break}return console.log(r.message),e.abrupt("return",{success:!1,errorMessage:r.message||""});case 12:return e.abrupt("return",{success:!0});case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function za(e){return $a.apply(this,arguments)}function $a(){return($a=$(Et.mark((function e(t){var n,r,i,a,o;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.elements,i=t.setupIntentClientSecret,(n=t.stripe)&&r&&i){e.next=3;break}return e.abrupt("return",{success:!1});case 3:return e.next=5,Qa({stripe:n,elements:r,clientSecret:i});case 5:return e.abrupt("return",{success:!!(o=(a=e.sent).newPaymentMethodId),paymentMethodId:o,errorMessage:a.setupErrorMessage});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Za(e){return Ya.apply(this,arguments)}function Ya(){return(Ya=$(Et.mark((function e(t){var r,i,a,o,l,c,s;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=null==(o=t.applySubscriptionResults)||null==(r=o.subscription)||null==(i=r.latestInvoice)?void 0:i.paymentSecret,!(l=t.stripe)||!c||(null==o||null==(a=o.subscription)?void 0:a.paymentCollection)!==n.PaymentCollection.ActionRequired){e.next=9;break}return e.next=5,l.handleNextAction({clientSecret:c});case 5:if(!(s=e.sent.error)){e.next=9;break}return e.abrupt("return",{errorMessage:s.message||""});case 9:return e.abrupt("return",{subscription:null==o?void 0:o.subscription});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Qa(e){return Ka.apply(this,arguments)}function Ka(){return(Ka=$(Et.mark((function e(t){var n,r,i,a,o,l,c;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.stripe,r=t.elements,i=t.clientSecret,e.next=3,n.confirmSetup({elements:r,confirmParams:{return_url:window.location.href},redirect:"if_required"});case 3:if(!(l=e.sent.error)){e.next=9;break}"card_error"===l.type||"validation_error"===l.type?"card_error"===l.type&&(o=l.message||""):o="An unexpected error occurred.",e.next=21;break;case 9:return e.prev=9,e.next=12,n.retrieveSetupIntent(i);case 12:null!=(c=e.sent.setupIntent)&&c.payment_method&&(a=c.payment_method),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(9),o="An unexpected error occurred.",console.error(e.t0);case 21:return e.abrupt("return",{newPaymentMethodId:a,setupErrorMessage:o});case 22:case"end":return e.stop()}}),e,null,[[9,17]])})))).apply(this,arguments)}var Xa={v:"5.12.1",fr:30,ip:0,op:201,w:700,h:700,nm:"Check",ddd:0,assets:[],layers:[{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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.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:!1}],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:[.833],y:[.833]},o:{x:[.167],y:[.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:!1},{ty:"st",c:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:30,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:61,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.338],y:[1]},o:{x:[.333],y:[0]},t:87,s:[50]},{t:122,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.338],y:[1]},o:{x:[.333],y:[0]},t:87,s:[45]},{t:122,s:[0]}],ix:2},o:{a:1,k:[{i:{x:[.474],y:[1]},o:{x:[.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:!1}],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}],markers:[],props:{}},Ja=s("#0b2f7a").alpha(.3).toString(),eo=o(f.Box,{target:"eeyi5d30"})("position:absolute;top:0;left:0;bottom:0;right:0;background-color:",Ja,";* rect{fill:transparent;}");function to(){return a.createElement(eo,null,a.createElement(V,{width:350,isClickToPauseDisabled:!0,options:{loop:!1,autoplay:!0,animationData:Xa}}))}var no=function(e){return new Promise((function(t){return setTimeout(t,e)}))},ro=function(e){var t=e.width,n=e.height,r=e.children;return e.isLoading?a.createElement(wa,{width:void 0===t?50:t,height:void 0===n?16:n}):a.createElement(a.Fragment,null,r)},io=function(e){var t,n,r,i,o,l=e.subscriptionPreview,c=e.isFetchingSubscriptionPreview;if(null==l||null==(t=l.proration)||null==(n=t.netAmount)||!n.amount||(null==l||null==(r=l.proration)||null==(i=r.netAmount)?void 0:i.amount)>=0)return null;var s=Ie(null==l||null==(o=l.proration)?void 0:o.netAmount);return a.createElement(le,{variant:"caption",style:{marginTop:14}},a.createElement(ro,{isLoading:c,width:"100%"},"Your remaining credits, which are "+s+", will be kept for you for future use."))},ao=function(e){var t=e.subscriptionPreview,n=e.activeSubscription,r=e.isFetchingSubscriptionPreview,i=e.checkoutLocalization;if(null==t||!t.hasScheduledUpdates||null==n||!n.currentBillingPeriodEnd)return null;var o="function"==typeof i.changesWillApplyAtEndOfBillingPeriod?i.changesWillApplyAtEndOfBillingPeriod({billingPeriodEnd:n.currentBillingPeriodEnd}):i.changesWillApplyAtEndOfBillingPeriod;return a.createElement(le,{variant:"caption",style:{marginTop:14}},a.createElement(ro,{isLoading:r,width:"100%"},o))},oo=function(e){var t,n=e.subscriptionPreview,r=e.plan,i=e.isFetchingSubscriptionPreview;if(null==n||!n.total||n.total.amount<=0)return null;var o=Ie(n.total),l=!(null==(t=n.credits)||!t.used);return a.createElement(le,{variant:"caption",style:{marginTop:14}},a.createElement(ro,{isLoading:i,width:"100%"},"Today we’ll charge you "+o+" (incl. taxes) for your new "+(null==r?void 0:r.displayName)+" plan"+(l?" minus credits left from your existing plan.":"")+" "))},lo=function(e){var t,n,r=e.subscriptionPreview,i=e.activeSubscription,o=e.plan,l=e.isFetchingSubscriptionPreview;if(null==r||null==(t=r.subscription)||!t.total)return null;var c=(null==i||null==(n=i.plan)?void 0:n.id)&&(null==o?void 0:o.id)&&i.plan.id===o.id,s=r.isPlanDowngrade&&r.hasScheduledUpdates,u=p(r.hasScheduledUpdates?null==i?void 0:i.currentBillingPeriodEnd:null==r?void 0:r.billingPeriodRange.end).format("MMM D, YYYY"),d=Ie(null==r?void 0:r.subscription.total);return a.createElement(le,{variant:"caption",style:{marginTop:14}},a.createElement(ro,{isLoading:l,width:"100%"},"Your"+(c?"":" new")+" "+(null==o?void 0:o.displayName)+" plan will "+(s?"start":"renew")+" on "+u+" for "+d+" (incl. taxes) unless you cancel it."))};function co(e){return a.createElement(a.Fragment,null,a.createElement(io,Object.assign({},e)),a.createElement(ao,Object.assign({},e)),a.createElement(oo,Object.assign({},e)),a.createElement(lo,Object.assign({},e)))}var so=o("div",{target:"e1ultpe61"})({name:"rdmn2i",styles:"&+&{margin-top:8px;}"}),uo=o("div",{target:"e1ultpe60"})({name:"bcffy2",styles:"display:flex;align-items:center;justify-content:space-between"}),po=function(e){var t,r=e.label,i=e.quantity,o=e.price,l=o.billingPeriod;return t=o.isTieredPrice?we(o.tiers,i).unitPrice.amount:o.amount,a.createElement(so,null,a.createElement(uo,{style:{alignItems:"flex-end"}},a.createElement(f.Grid,{item:!0},a.createElement(le,{variant:"h6",color:"primary"},r),(i>1||l===n.BillingPeriod.Annually)&&a.createElement(le,{variant:"body1",color:"secondary"},function(e){var t=e.amount,r=e.price,i=e.quantity,a=null;r.billingPeriod===n.BillingPeriod.Annually&&(t/=12,a="12 months");var o=Ie({amount:t,currency:r.currency});return(i>1?i+" x "+o+" each":o)+(a?" x "+a:"")}({amount:t,price:o,quantity:i}))),a.createElement(f.Grid,{item:!0},a.createElement(le,{variant:"body1",color:"secondary",style:{wordBreak:"break-word"}},Ie({amount:i*t,currency:o.currency})))))},mo=function(e){var t,r=e.isFetchingSubscriptionPreview,i=e.subscriptionPreview||{},o=i.subTotal,l=i.discount;return o&&l?(t=l.type===n.DiscountType.Percentage?-1*Math.abs(l.value/100*o.amount):-1*Math.abs(l.value),a.createElement(so,null,a.createElement(uo,null,a.createElement(le,{variant:"body1",color:"secondary"},"Discount"+(l.type===n.DiscountType.Percentage?" ("+l.value+"% off)":"")),a.createElement(le,{variant:"body1",color:"secondary"},r?a.createElement(wa,{width:50,height:16}):Ie({amount:t,currency:o.currency}))))):null},go=function(e){var t=e.isFetchingSubscriptionPreview,n=(e.subscriptionPreview||{}).credits;return!n||n.used.amount<=0?null:a.createElement(so,null,a.createElement(uo,null,a.createElement(le,{variant:"body1",color:"secondary"},e.checkoutLocalization.appliedCreditsTitle),a.createElement(le,{variant:"body1",color:"secondary"},a.createElement(ro,{isLoading:t},Ie({amount:-1*n.used.amount,currency:n.used.currency})))))},ho=function(e){var t=e.isFetchingSubscriptionPreview,n=e.subscriptionPreview||{},r=n.tax,i=n.taxDetails;return i&&r?a.createElement(so,null,a.createElement(uo,null,a.createElement(le,{variant:"body1",color:"secondary"},e.checkoutLocalization.taxTitle({taxDetails:i})),a.createElement(le,{variant:"body1",color:"secondary"},a.createElement(ro,{isLoading:t},Ie({amount:null==r?void 0:r.amount,currency:null==r?void 0:r.currency}))))):null},fo=o(f.Paper,{target:"e9ji7bp4"})("border-radius:10px;background:",(function(e){return e.theme.stigg.palette.backgroundHighlight}),";padding:16px;");fo.defaultProps={elevation:0};var yo,vo=o(le,{target:"e9ji7bp3"})({name:"18uqayh",styles:"margin-bottom:16px"}),bo=o(f.Divider,{target:"e9ji7bp2"})({name:"1k6141t",styles:"margin:16px 0"}),xo=o(le,{target:"e9ji7bp1"})({name:"1d0nbku",styles:"margin-top:24px"}),Eo=o(le,{target:"e9ji7bp0"})({name:"5bhc30",styles:"margin-bottom:8px"}),wo=function(e){var t,r,o=e.onCheckout,l=e.onCheckoutCompleted,c=e.disablePromotionCode,s=e.isFreeDowngrade,u=i.useState(!1),d=u[0],p=u[1],m=aa().setErrorMessage,g=ea(),h=ta(),y=Wi(),v=y.checkoutLocalization,b=y.checkoutState||{},x=b.plan,E=b.activeSubscription,w=Ca((null==x||null==(t=x.pricePoints)?void 0:t.filter((function(e){return e.billingPeriod===h.billingPeriod})))||[]),k=_(w,(function(e){return e.pricingModel===n.BillingModel.FlatFee})),P=k[1],C=(k[0]||[])[0],S=s||g.isCheckoutComplete&&g.isLastStep,T=function(){var e=i.useState(null),t=e[0],n=e[1],r=i.useState(!1),a=r[0],o=r[1],l=na().previewSubscriptionAction;return i.useEffect((function(){!function(){var e=$(Et.mark((function e(){var t;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(!0),e.next=3,l();case 3:(t=e.sent.subscriptionPreview)&&n(t),o(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[l]),{subscriptionPreview:t,isFetchingSubscriptionPreview:a}}(),B=T.subscriptionPreview,A=T.isFetchingSubscriptionPreview,M=function(e){var t=e.onCheckout,n=e.onCheckoutCompleted,r=e.onSuccess,i=Pt().stigg,a=aa().useNewPaymentMethod,o=function(){var e=ta(),t=la()[0].resourceId,n=(Wi().checkoutState||{}).plan,r=e.addons.map((function(e){return{addonId:e.addon.id,quantity:e.quantity}}));if(null!=n&&n.id)return Z({resourceId:t,planId:n.id,billingPeriod:e.billingPeriod,billableFeatures:e.billableFeatures,addons:r,promotionCode:e.promotionCode,billingCountryCode:e.billingCountryCode},e.taxPercentage?{billingInformation:{taxPercentage:e.taxPercentage}}:{})}(),l=Wi(),c=l.widgetState,s=l.setWidgetReadOnly,u=(l.checkoutState||{}).setupSecret,d=G.useStripe(),p=G.useElements();return{handleSubmit:function(){var e=$(Et.mark((function e(l){var c,m,g,h,f,y,v,b,x;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l.preventDefault(),o){e.next=3;break}return e.abrupt("return",{success:!1,errorMessage:"Unexpected error, please contact support."});case 3:if(m=Z({},o),y=function(){var e=$(Et.mark((function e(){var t,n,r,o,l;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a){e.next=13;break}return e.next=3,Ha({elements:p});case 3:if(n=(t=e.sent).errorMessage,t.success){e.next=8;break}return e.abrupt("return",{success:!1,errorMessage:n});case 8:return e.next=10,za({elements:p,stripe:d,setupIntentClientSecret:u});case 10:(r=e.sent).success||(h=r.errorMessage),f=r.paymentMethodId;case 13:if(!h){e.next=15;break}return e.abrupt("return",{success:!1,errorMessage:h});case 15:return m=Z({},m,{paymentMethodId:f}),e.prev=16,e.next=19,i.applySubscription(m);case 19:return o=e.sent,e.next=22,Za({applySubscriptionResults:o,stripe:d});case 22:return g=l=e.sent,l.errorMessage&&(h=l.errorMessage),e.abrupt("return",{success:!l.errorMessage,errorMessage:l.errorMessage});case 28:return e.prev=28,e.t0=e.catch(16),console.error(e.t0),e.abrupt("return",{success:!1,errorMessage:h=null==e.t0?void 0:e.t0.message});case 33:case"end":return e.stop()}}),e,null,[[16,28]])})));return function(){return e.apply(this,arguments)}}(),s(!0),!t){e.next=13;break}return e.next=9,t({checkoutParams:m,checkoutAction:y});case 9:!(v=e.sent).success&&v.errorMessage&&(h=v.errorMessage),e.next=17;break;case 13:return e.next=15,y();case 15:!(b=e.sent).success&&b.errorMessage&&(h=b.errorMessage);case 17:if(s(!1),!(x=!h&&!(null==(c=g)||!c.subscription))||!r){e.next=23;break}return r(),e.next=23,no(5e3);case 23:return e.next=25,n({success:x,error:h});case 25:return e.abrupt("return",{results:g,success:!h,errorMessage:h});case 26:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),isLoading:!(null==c||!c.readOnly)}}({onCheckout:o,onCheckoutCompleted:l,onSuccess:function(){p(!0),g.markStepAsCompleted(g.progressBarState.activeStep)}}),U=M.handleSubmit,L=M.isLoading,N=function(){var e=$(Et.mark((function e(t){var n;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!d){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,U(t);case 4:if(e.t0=e.sent,e.t0){e.next=7;break}e.t0={};case 7:(n=e.t0.errorMessage)?(m(n),p(!1)):m(void 0);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=$(Et.mark((function e(t){return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!L){e.next=2;break}return e.abrupt("return");case 2:if(!S){e.next=7;break}return e.next=5,N(t);case 5:e.next=8;break;case 7:g.goNext();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.createElement(f.Box,{flex:1},a.createElement(fo,null,a.createElement(vo,{variant:"h6"},null==x?void 0:x.displayName),C&&a.createElement(so,null,a.createElement(uo,null,a.createElement(le,{variant:"h6",color:"primary"},"function"==typeof v.baseChargeText?v.baseChargeText({billingPeriod:h.billingPeriod}):v.baseChargeText),a.createElement(le,{variant:"body1",color:"secondary"},Ie({amount:C.amount,currency:C.currency})))),P.map((function(e){var t,n,r,i=null==(t=h.billableFeatures)?void 0:t.find((function(t){var n;return t.featureId===(null==(n=e.feature)?void 0:n.featureId)}));return a.createElement(po,{key:null==(n=e.feature)?void 0:n.featureId,label:(null==(r=e.feature)?void 0:r.displayName)||"",quantity:(null==i?void 0:i.quantity)||1,price:e})})),!(null==(r=h.addons)||!r.length)&&a.createElement(a.Fragment,null,a.createElement(f.Grid,{display:"flex",flexDirection:"row",alignItems:"center",marginY:1},a.createElement(le,{variant:"body1",color:"primary",style:{paddingRight:"8px"}},v.addonsSectionTitle),a.createElement(bo,{className:"stigg-checkout-summary-divider",sx:{flex:1}})),h.addons.map((function(e){var t,n,r=null==(t=e.addon.pricePoints)?void 0:t.find((function(e){return e.billingPeriod===h.billingPeriod}));return r?a.createElement(po,{key:null==e||null==(n=e.addon)?void 0:n.id,label:e.addon.displayName,quantity:e.quantity&&e.quantity>0?e.quantity:1,price:r}):null}))),a.createElement(uo,null,a.createElement(xo,{variant:"h6"},v.subTotalText),a.createElement(xo,{variant:"h6"},a.createElement(ro,{isLoading:A},Ie(Z({amount:0},null==B?void 0:B.subTotal))))),a.createElement(bo,{className:"stigg-checkout-summary-divider"}),!c&&!s&&a.createElement(a.Fragment,null,a.createElement(Ga,{checkoutLocalization:v}),a.createElement(bo,{className:"stigg-checkout-summary-divider"})),a.createElement(mo,{subscriptionPreview:B,isFetchingSubscriptionPreview:A}),a.createElement(ho,{subscriptionPreview:B,isFetchingSubscriptionPreview:A,checkoutLocalization:v}),a.createElement(go,{subscriptionPreview:B,isFetchingSubscriptionPreview:A,checkoutLocalization:v}),a.createElement(so,null,a.createElement(uo,null,a.createElement(Eo,{variant:"h6"},v.totalText),a.createElement(Eo,{variant:"h6"},a.createElement(ro,{isLoading:A},Ie(Z({amount:0},null==B?void 0:B.total)))))),a.createElement(co,{plan:x,activeSubscription:E,subscriptionPreview:B,isFetchingSubscriptionPreview:A,checkoutLocalization:v}),a.createElement(Ba,{$success:d,$error:S&&!(null==B||!B.isPlanDowngrade),disabled:L||A||g.progressBarState.isDisabled,className:"stigg-checkout-summary-cta-button",sx:{textTransform:"none",borderRadius:"10px",marginTop:"24px",height:"36px"},variant:"contained",size:"medium",onClick:function(e){F(e)},fullWidth:!0},a.createElement(le,{className:"stigg-checkout-summary-cta-button-text",color:"white",style:{display:"flex"}},d?a.createElement(vr,{icon:"Check",style:{display:"contents"}}):L||A?a.createElement(f.CircularProgress,{size:20,sx:{color:"white"}}):function(e){var t=e.subscriptionPreview,n=e.checkoutLocalization;return e.isLastStep?null!=t&&t.isPlanDowngrade?n.checkoutButton.downgradeText:e.isFirstSubscription?n.checkoutButton.purchaseText:n.checkoutButton.upgradeText:n.checkoutButton.nextText}({isLastStep:S,subscriptionPreview:B,checkoutLocalization:v})))),a.createElement(mt,{source:"checkout",showWatermark:!0,style:{marginTop:8,display:"flex",justifyContent:"center"}}),d&&a.createElement(to,null))},ko=function(){return a.createElement(f.Box,{flex:1},a.createElement(fo,null,a.createElement(ba,{$flexDirection:"column",$gap:24},a.createElement(wa,{width:120,height:20}),a.createElement(wa,{width:120,height:20}),a.createElement(wa,{width:120,height:20}),a.createElement(wa,{width:120,height:20})),a.createElement(ba,{$flexDirection:"column",$gap:24,marginTop:5},a.createElement(wa,{height:20}),a.createElement(wa,{height:20}),a.createElement(wa,{height:20})),a.createElement(Ea,{flex:1,marginTop:5},a.createElement(wa,{height:34}))),a.createElement(mt,{source:"checkout",showWatermark:!0,style:{marginTop:8,display:"flex",justifyContent:"center"}}))};function Po(){return(Po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Co=function(e){return i.createElement("svg",Po({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),yo||(yo=i.createElement("g",{stroke:"#7586B0",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M2.667 8h10.667M9.333 4l4 4-4 4"}))))},So=o(f.Box,{target:"e1qdmq182"})({name:"1dz2cns",styles:"display:flex;align-items:baseline;gap:8px"}),To=o(Co,{target:"e1qdmq181"})("path{stroke:",(function(e){return e.theme.stigg.palette.text.secondary}),";}"),Bo=o(f.Box,{target:"e1qdmq180"})({name:"qfb22n",styles:"display:flex;align-content:center;justify-content:space-between;margin-bottom:16px"}),Ao=function(e){return a.createElement(f.Button,{className:"stigg-checkout-change-plan-button",sx:{textTransform:"none"},variant:"text",size:e.size,onClick:e.onClick},a.createElement(le,{className:"stigg-checkout-change-plan-button-text",color:"primary.main",variant:"body1",style:{lineHeight:"24px"}},e.checkoutLocalization.changePlan))};function Mo(e){var t=e.allowChangePlan,n=void 0!==t&&t,r=e.onChangePlan,i=Wi(),o=i.checkoutLocalization,l=i.checkoutState||{},c=l.plan,s=l.activeSubscription;return a.createElement(a.Fragment,null,a.createElement(Bo,null,a.createElement(So,null,s&&(null==c?void 0:c.id)!==(null==s?void 0:s.plan.id)&&a.createElement(a.Fragment,null,a.createElement(le,{variant:"h6",color:"secondary"},s.plan.displayName),a.createElement(To,null)),a.createElement(le,{variant:"h3",bold:!0},null==c?void 0:c.displayName)),n&&r&&a.createElement(Ao,{onClick:function(){r({currentPlan:c})},checkoutLocalization:o,size:"medium"})),a.createElement(f.Divider,{className:"stigg-checkout-plan-header-divider"}))}var Uo,Lo,No,Fo,Oo=o(f.Grid,{target:"e1o28dc92"})({name:"12z2e32",styles:"width:100%;margin-top:32px;gap:8px"}),Io=o(f.Grid,{target:"e1o28dc91"})({name:"a3p0fn",styles:"display:flex;justify-content:space-between;align-items:center;height:80px"}),Do=o(Ba,{target:"e1o28dc90"})({name:"156064h",styles:"min-width:unset;width:41px;height:41px;padding:0"});function jo(e){var t,r=e.addon,i=e.billingPeriod,o=e.addonState,l=e.initialAddonState,c=e.setAddon,s=e.removeAddon,u=e.checkoutLocalization,d=e.onAddonsValidationChange,p=e.isValid,m=r.pricePoints.find((function(e){return e.billingPeriod===i})),g=!!o,h=!!o&&!!l&&o.quantity!==l.quantity||!l&&!!o||!!l&&!o,y=function(e){if(!e||e<=0)return d({addonId:r.id,isValid:!1}),void c(r,null!=e?e:null);d({addonId:r.id,isValid:!0}),c(r,e)};return a.createElement(Io,{container:!0},a.createElement(f.Grid,{item:!0},a.createElement(le,{variant:"h6",lineHeight:"24px"},r.displayName),!!m&&a.createElement(le,{variant:"body1",lineHeight:"20px",color:"secondary"},Ie({amount:m.amount,currency:m.currency})+"/"+(i===n.BillingPeriod.Annually?"year":"month"))),a.createElement(f.Grid,{item:!0},h&&a.createElement(Ba,{variant:"text",size:"small",sx:{padding:"8px",minWidth:"unset"},onClick:function(){l?c(r,l.quantity):(s(r.id),d({addonId:r.id,isValid:!0}))}},a.createElement(le,{color:"primary.main",variant:"body1"},"Undo")),g&&a.createElement(a.Fragment,null,a.createElement(Aa,{id:r.id+"-input",type:"number",sx:{width:120,marginX:2},value:null!=(t=null==o?void 0:o.quantity)?t:"",error:!p,helperText:p?void 0:"Minimum 1",FormHelperTextProps:{sx:{margin:"4px"}},onChange:function(e){var t,n;return y(null!=e&&null!=(t=e.target)&&t.value?Number(null==e||null==(n=e.target)?void 0:n.value):null)}}),a.createElement(Do,{color:"error",onClick:function(){return s(r.id)}},a.createElement(vr,{icon:"Trash",style:{display:"flex"}}))),!g&&a.createElement(Ba,{sx:{paddingX:"22px",paddingY:"8px"},onClick:function(){return y(1)}},u.addAddonText)))}function qo(){var e,t=Wi().checkoutLocalization,n=Zi().billingPeriod,r=ea().setIsDisabled,o=Z({},la()[0].addonsStep,{setAddon:(e=la()[1],function(t,n){return e((function(e){var r=e.addonsStep.addons.find((function(e){return e.addon.id===t.id}));r?r.quantity=n:(e.addonsStep.addons.push({addon:t,quantity:n}),e.addonsStep.addons=qi(e.addonsStep.addons))}))}),removeAddon:_i()}),l=o.initialAddons,c=o.addons,s=o.availableAddons,u=o.setAddon,d=o.removeAddon,p=i.useState((null==s?void 0:s.reduce((function(e,t){var n=c.find((function(e){return e.addon.id===t.id}));return e[t.id]=!!n&&n.quantity>0,e}),{}))||{}),m=p[0],g=p[1];return i.useEffect((function(){var e=Object.values(m).some((function(e){return!e}));r(e)}),[m,r]),a.createElement(Oo,{container:!0},null==s?void 0:s.map((function(e){var r=c.find((function(t){return t.addon.id===e.id})),i=null==l?void 0:l.find((function(t){return t.addon.id===e.id}));return a.createElement(jo,{key:e.id,addon:e,billingPeriod:n,addonState:r,initialAddonState:i,setAddon:u,removeAddon:d,checkoutLocalization:t,onAddonsValidationChange:function(e){var t;return g(Z({},m,((t={})[e.addonId]=e.isValid,t)))},isValid:m[e.id]})})))}var Ro,Go=W(f.Grid)(Uo||(Uo=Q(["\n padding: 8px;\n border-radius: 10px;\n border: 1px solid ",";\n cursor: ",";\n"])),(function(e){return e.theme.stigg.palette.outlinedBorder}),(function(e){return e.$disabled?"not-allowed":"pointer"})),_o=W(Go)(Lo||(Lo=Q(["\n flex-direction: column;\n align-items: unset;\n"]))),Wo=W(f.Grid)(No||(No=Q(["\n display: flex;\n align-items: center;\n flex: 1;\n gap: 12px;\n"]))),Ho=W(f.Grid)(Fo||(Fo=Q(["\n display: flex;\n flex-direction: column;\n"])));function Vo(e){var t=e.icon,n=e.text,r=e.subtitle;return a.createElement(Wo,null,a.createElement(f.Radio,{checked:e.checked,disabled:e.readOnly}),a.createElement(vr,{icon:t,style:{display:"flex"}}),a.createElement(Ho,{container:!0},a.createElement(f.Grid,{item:!0},n),r&&a.createElement(f.Grid,{item:!0},r)))}function zo(e){var t=e.paymentMethodDetails,n=e.readOnly;if(!t)return null;var r=t.expirationMonth,i=t.expirationYear;return a.createElement(Go,{item:!0,onClick:e.onSelect,$disabled:n},a.createElement(Vo,{checked:e.checked,readOnly:n,icon:"PaymentMethod",text:a.createElement(le,{variant:"h6"},"Card ending in "+t.last4Digits),subtitle:!!r&&!!i&&a.createElement(le,{variant:"body1"},"Expires "+r.toString().padStart(2,"0")+"/"+i)}))}function $o(e){var t=e.checked,n=e.readOnly,r=e.onBillingAddressChange;return a.createElement(_o,{item:!0,onClick:e.onSelect,$disabled:n},a.createElement(Vo,{checked:t,readOnly:n,icon:"PaymentMethod",text:a.createElement(le,{variant:"h6"},e.checkoutLocalization.newPaymentMethodText)}),a.createElement(f.Collapse,{in:t},a.createElement(Wa,{onBillingAddressChange:r})))}var Zo=W(f.Grid)(Ro||(Ro=Q(["\n display: flex;\n flex-direction: column;\n gap: 24px;\n margin: 32px 0;\n"])));function Yo(e){var t=e.onBillingAddressChange,n=Wi(),r=n.checkoutLocalization,i=n.widgetState,o=(n.checkoutState||{}).customer,l=aa(),c=l.errorMessage,s=l.useNewPaymentMethod,u=l.setUseNewPaymentMethod,d=i.readOnly,p=function(e){d||u(e)};return a.createElement(Zo,{container:!0},!!c&&a.createElement(f.Alert,{severity:"error",sx:{alignItems:"center"}},a.createElement(le,{overrideColor:"inherit"},c)),a.createElement(zo,{readOnly:d,checked:!s,paymentMethodDetails:null==o?void 0:o.paymentMethodDetails,onSelect:function(){return p(!1)}}),a.createElement($o,{readOnly:d,checked:s,checkoutLocalization:r,onSelect:function(){return p(!0)},onBillingAddressChange:t}))}function Qo(e){switch(e){case n.BillingPeriod.Annually:return"Annual";case n.BillingPeriod.Monthly:return"Monthly";default:return""}}var Ko,Xo=o(f.Box,{target:"ekae5v44"})({name:"1k6141t",styles:"margin:16px 0"}),Jo=o("button",{target:"ekae5v43"})("cursor:",(function(e){return e.$disabled||e.$isOnlyBillingPeriod?"default":"pointer"}),";flex:1;display:flex;align-items:center;justify-content:flex-start;padding:2px 8px;border-radius:10px;border:",(function(e){var t=e.theme,n=t.stigg.palette.outlinedBorder;return e.$isOnlyBillingPeriod?n="transparent":e.$isActive&&(n=t.stigg.palette.outlinedRestingBorder),"1px solid "+n}),";background:",(function(e){return e.$isOnlyBillingPeriod?"transparent":e.$isActive?e.theme.stigg.palette.backgroundSection:"transparent"}),";text-transform:none;text-align:start;height:36px;&.MuiButton-root{padding:0 16px 0 8px;&:hover{background:none;}}"),el=o(f.Box,{target:"ekae5v42"})({name:"1neb8ay",styles:"display:flex;gap:16px;margin-top:16px"}),tl=function(e){var t=e.billingPeriod,n=e.isOnlyBillingPeriod,r=Zi(),i=r.setBillingPeriod,o=r.billingPeriod===t;return a.createElement(Jo,{onClick:function(){return i(t)},$isActive:o,$isOnlyBillingPeriod:n},a.createElement(f.Radio,{checked:o,onChange:function(){return i(t)},value:t,disabled:n,inputProps:{"aria-label":Qo(t)},sx:{padding:0,marginRight:"8px"}}),a.createElement(f.Box,null,a.createElement(le,{variant:"body1",color:"primary"},Qo(t))))},nl=function(e){var t=e.plan,r=e.checkoutLocalization,i=g.partition(null==t?void 0:t.pricePoints,(function(e){return e.billingPeriod===n.BillingPeriod.Monthly})),o=i[0],c=i[1],s=!(null==o||!o.length||null==c||!c.length);return a.createElement(Xo,null,a.createElement(le,{variant:"h6",color:"primary",fontWeight:l.FontWeight.Medium},r.billingPeriodsTitle),a.createElement(el,null,!(null==c||!c.length)&&a.createElement(tl,{key:n.BillingPeriod.Annually,billingPeriod:n.BillingPeriod.Annually,isOnlyBillingPeriod:!s}),!(null==o||!o.length)&&a.createElement(tl,{key:n.BillingPeriod.Monthly,billingPeriod:n.BillingPeriod.Monthly,isOnlyBillingPeriod:!s})))},rl=W.div(Ko||(Ko=Q(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n min-height: 60px;\n margin-top: 16px;\n"])));function il(e){var t,r,i,o,l=e.charge,c=e.isValid,s=e.setBillableFeature,u=e.billableFeature,d=e.onValidationChange,p=null==(t=l.feature)?void 0:t.featureId,m=!p,g=l.pricingModel===n.BillingModel.UsageBased,h=m?"Base charge":null==(r=l.feature)?void 0:r.displayName,y=!!(null!=l&&l.minUnitQuantity||null!=l&&l.maxUnitQuantity);if(m||g)o=""+Ie({amount:l.amount,currency:l.currency,locale:"en-us"}),g&&(o+=" / unit");else if(l.isTieredPrice){var v=we(l.tiers,u.quantity||1);o=a.createElement(Re,{componentId:p+"-tiers",tiers:l.tiers,tierUnits:Ee(l),selectedTier:v,handleTierChange:function(e){s(p,e.upTo)}})}else{var b,x;o=a.createElement(Aa,{sx:{width:120},id:p+"-input",type:"number",InputProps:y?{inputProps:{min:l.minUnitQuantity,max:l.maxUnitQuantity}}:{},error:!c,helperText:c?void 0:"Minimum 1",FormHelperTextProps:{sx:{margin:"4px"}},value:null!=(b=null!=(x=null==u?void 0:u.quantity)?x:l.minUnitQuantity)?b:"",onChange:function(e){var t,n;if(!m&&p){var r=null!=e&&null!=(t=e.target)&&t.value?Number(null==e||null==(n=e.target)?void 0:n.value):l.minUnitQuantity;if(!r||r<=0)return d({featureId:p,isValid:!1}),void s(p,null!=r?r:null);d({featureId:p,isValid:!0});var i=Vi(l,r);s(p,i)}},onWheel:function(e){return e.target.blur()}})}return a.createElement(rl,null,a.createElement(f.Box,{display:"flex",flexDirection:"column"},a.createElement(le,{variant:"h6",color:"primary",lineHeight:"24px"},h),y&&a.createElement(le,{variant:"body1",color:"secondary",lineHeight:"20px"},te(l.minUnitQuantity,l.maxUnitQuantity,null==(i=l.feature)?void 0:i.unitsPlural))),a.createElement(le,{variant:"h6",color:"primary"},o))}function al(e){var t,n=e.plan,r=e.billingPeriod,o=Zi(),l=o.billableFeatures,c=o.setBillableFeature,s=ea().setIsDisabled,u=Ca((null==n||null==(t=n.pricePoints)?void 0:t.filter((function(e){return e.billingPeriod===r})))||[]),d=i.useState(null==u?void 0:u.reduce((function(e,t){var n;return e[(null==(n=t.feature)?void 0:n.featureId)||"base-charge"]=!0,e}),{})),p=d[0],m=d[1];return i.useEffect((function(){var e=Object.values(p).some((function(e){return!e}));s(e)}),[p,s]),a.createElement("div",null,null==u?void 0:u.map((function(e){var t,n,r=l.find((function(t){var n;return t.featureId===(null==(n=e.feature)?void 0:n.featureId)}));return a.createElement(il,{key:(null==(t=e.feature)?void 0:t.featureId)||"base-charge",charge:e,setBillableFeature:c,billableFeature:r,isValid:p[(null==(n=e.feature)?void 0:n.featureId)||"base-charge"],onValidationChange:function(e){var t=e.featureId,n=e.isValid;return m((function(e){var r;return Z({},e,((r={})[t]=n,r))}))}})})))}var ol=o(f.Box,{target:"emtnukp0"})({name:"1d3w5wq",styles:"width:100%"}),ll=function(){var e=Wi(),t=e.checkoutLocalization,n=(e.checkoutState||{}).plan,r=Zi().billingPeriod;return a.createElement(ol,null,a.createElement(nl,{plan:n,checkoutLocalization:t}),a.createElement(al,{plan:n,billingPeriod:r}))},cl=o(f.Box,{target:"eaawmuo2"})({name:"zjik7",styles:"display:flex"}),sl=o(f.Alert,{target:"eaawmuo1"})({name:"18uqayh",styles:"margin-bottom:16px"}),ul=o(f.Box,{target:"eaawmuo0"})("padding:16px;border-radius:10px;width:100%;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";"),dl=function(e){var t=e.planName,n=e.totalPrice,r=e.billingPeriod,i=n?Ie({amount:n.amount,currency:n.currency}):"Free",o=r?" / Paid "+r.toLowerCase():"";return a.createElement(ul,{className:"stigg-checkout-free-downgrade-plan-box"},a.createElement(le,{className:"stigg-checkout-downgrade-to-free-text-plan",color:"secondary"},t),a.createElement("div",null,a.createElement(le,{className:"stigg-checkout-downgrade-to-free-text-price",span:!0,bold:!0,variant:"h3",color:"primary"},i),a.createElement(le,{className:"stigg-checkout-downgrade-to-free-text-billing-period",span:!0,color:"secondary"},o)))},pl=function(e){var t,n,r=e.checkoutLocalization,i=e.activeSubscription,o=e.freePlan,l=e.allowChangePlan,c=e.onChangePlan;return void 0!==l&&l&&c&&(n=a.createElement(Ao,{onClick:function(){c({currentPlan:o})},checkoutLocalization:r,size:"small"})),a.createElement(a.Fragment,null,a.createElement(sl,{action:n,className:"stigg-checkout-downgrade-to-free-alert",severity:"info"},a.createElement(le,{span:!0,color:"secondary"},r.downgradeToFreeAlertText({plan:i.plan}))),a.createElement(cl,{className:"stigg-checkout-downgrade-to-free-plans-container"},a.createElement(dl,{planName:i.plan.displayName,totalPrice:null==(t=i.totalPrice)?void 0:t.total,billingPeriod:i.prices[0].billingPeriod}),a.createElement(To,{className:"stigg-checkout-downgrade-to-free-arrow",style:{margin:"auto 16px",minWidth:"16px"}}),a.createElement(dl,{planName:o.displayName})))};function ml(e){var t=e.onCheckout,r=e.onCheckoutCompleted,o=e.onChangePlan,l=e.onBillingAddressChange,c=e.disablePromotionCode,s=function(){var e=i.useState(null),t=e[0],r=e[1],a=Wi().checkoutState||{},o=a.billingIntegration,l=a.setupSecret;return i.useEffect((function(){if(o){var e=o.credentials;if(o.billingIdentifier!==n.BillingVendorIdentifier.Stripe)return void console.error("Currently only stripe integration is supported");r(H.loadStripe(e.publicKey,{stripeAccount:e.accountId}))}}),[o]),{stripePromise:t,setupIntentClientSecret:l}}(),u=s.stripePromise,d=s.setupIntentClientSecret,p=la()[0],m=p.stiggTheme,g=p.widgetState,h=ea().currentStep,f=g.isLoadingCheckoutData,y=Wi(),v=y.checkoutLocalization,b=y.checkoutState||{},x=b.plan,E=b.activeSubscription,w=!!x&&x.pricingType===n.PricingType.Free&&!!E&&E.pricingType!==n.PricingType.Free,k=function(e,t){var n=t.onBillingAddressChange;switch(e.key){case Hi.PLAN:return{allowChangePlan:!0,content:a.createElement(ll,null)};case Hi.ADDONS:return{content:a.createElement(qo,null)};case Hi.PAYMENT:return{content:a.createElement(Yo,{onBillingAddressChange:n})};default:return{content:null}}}(h,{onBillingAddressChange:l}),P=k.content,C=k.allowChangePlan,S=a.createElement(a.Fragment,null,w?a.createElement(pl,{checkoutLocalization:v,freePlan:x,activeSubscription:E,allowChangePlan:C,onChangePlan:o}):a.createElement(a.Fragment,null,a.createElement(Mo,{allowChangePlan:C,onChangePlan:o}),P));return a.createElement(G.Elements,{stripe:u,options:{clientSecret:d,appearance:{theme:"stripe",variables:{colorText:m.palette.text.primary,colorPrimaryText:m.palette.text.primary,colorTextPlaceholder:m.palette.text.disabled,fontFamily:m.typography.fontFamily}}}},a.createElement(ma,{className:"stigg-checkout-layout"},!w&&a.createElement(ka,null),a.createElement(ga,null,a.createElement(ha,null,f?a.createElement(Ua,null):S),f?a.createElement(ko,null):a.createElement(wo,{disablePromotionCode:c,onCheckout:t,onCheckoutCompleted:r,isFreeDowngrade:w}))))}var gl,hl=["textOverrides","theme","resourceId","planId","preferredBillingPeriod","billingCountryCode","billableFeatures","billingInformation"];(gl=exports.ProvisionStatus||(exports.ProvisionStatus={})).IN_PROGRESS="IN_PROGRESS",gl.SUCCEEDED="SUCCEEDED",gl.FAILED="FAILED",Object.keys(n).forEach((function(e){"default"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})})),exports.AddonsList=rn,exports.Checkout=function(e){var t=e.textOverrides,n=e.theme,r=e.resourceId,i=e.planId,o=e.preferredBillingPeriod,l=e.billingCountryCode,c=e.billableFeatures,s=e.billingInformation,u=Y(e,hl);return a.createElement(sa,{textOverrides:t,theme:n,resourceId:r,planId:i,preferredBillingPeriod:o,billingCountryCode:l,billableFeatures:c,billingInformation:s},a.createElement(ml,Object.assign({},u)))},exports.CustomerPortal=function(e){var t=e.textOverrides,n=e.theme,r=e.resourceId,i=e.productId,o=Y(e,Di);return a.createElement(Zt,{textOverrides:t,theme:n,resourceId:r,productId:i},a.createElement(Ii,Object.assign({},o)))},exports.CustomerPortalProvider=Zt,exports.CustomerUsageData=Oi,exports.InvoicesSection=ji,exports.PaymentDetailsSection=Si,exports.Paywall=function(e){var t=e.productId,r=e.resourceId,o=e.highlightedPlanId,l=e.showOnlyEligiblePlans,c=e.textOverrides,s=e.onPlanSelected,d=e.preferredBillingPeriod,g=e.onBillingPeriodChange,h=e.billingCountryCode,f=!!i.useContext(zt),y=!1;if(f){var v=$t();y=v.isLoading,r=v.resourceId}var b=function(e){var t=e.productId,r=e.resourceId,a=e.showOnlyEligiblePlans,o=e.billingCountryCode,l=e.preferredBillingPeriod,c=Pt(),s=c.stigg,u=c.locale,d=i.useState(n.BillingPeriod.Annually),g=d[0],h=d[1],f=i.useState([]),y=f[0],v=f[1],b=i.useState(null),x=b[0],w=b[1],k=i.useState(!0),P=k[0],C=k[1];i.useEffect((function(){!function(){var e=$(Et.mark((function e(){var n,i,a,c;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,C(!0),e.next=4,s.waitForInitialization();case 4:return e.next=6,s.getPaywall({productId:t,resourceId:r,billingCountryCode:o});case 6:i=Ct((n=e.sent).plans,n.activeSubscriptions,l),a=i.availableBillingPeriods,c=i.defaultBillingPeriod,w(n),v(a),h(c),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),wt.error("Failed to load paywall "+(null==e.t0?void 0:e.t0.message),e.t0);case 16:return e.prev=16,C(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,13,16,19]])})));return function(){return e.apply(this,arguments)}}()()}),[s,t,s.isCustomerLoaded,o,r]);var S=function(e,t){var r,i=e||{},a=i.plans,o=i.currency,l=i.configuration,c=i.customer,s=i.paywallCalculatedPricePoints,u=function(e){var t,r,i,a=!0,o=(null==e?void 0:e.find((function(e){return e.status===n.SubscriptionStatus.InTrial})))||null,l=null==(t=o)?void 0:t.plan,c=null!=(r=o)&&r.trialEndDate?p.utc(o.trialEndDate).diff(p.utc(),"days",!1)+1:void 0;return l||(a=!1,l=null==(i=o=(null==e?void 0:e.find((function(e){return e.status===n.SubscriptionStatus.Active})))||null)?void 0:i.plan),{currentSubscription:o,currentPlan:l,isCustomerOnTrial:a,trialDaysLeft:c}}(i.activeSubscriptions),d=u.currentSubscription,g=u.currentPlan,h=u.isCustomerOnTrial,f=u.trialDaysLeft,y=(null==d?void 0:d.scheduledUpdates)||[],v=null==d||null==(r=d.price)?void 0:r.billingPeriod,b=y.find((function(e){return e.subscriptionScheduleType===n.SubscriptionScheduleType.Downgrade})),x=y.find((function(e){return e.subscriptionScheduleType===n.SubscriptionScheduleType.BillingPeriod})),w=E(a,(function(e){return e.order})).map((function(e){var t,n=null==c||null==(t=c.eligibleForTrial)?void 0:t.find((function(t){return t.productId===e.product.id})),r=e.id===(null==g?void 0:g.id);return Z({},e,{paywallCalculatedPricePoints:null==s?void 0:s.filter((function(t){return t.planId===e.id})),isTriable:!m(e.defaultTrialConfig)&&(!n||n.eligible),isCurrentCustomerPlan:r,currentCustomerPlanBillingPeriod:v,isUpcomingPlan:!1,trialDaysLeft:f,isNextPlan:function(t){var n,i=null==b?void 0:b.scheduleVariables,a=null==x?void 0:x.scheduleVariables,o=e.pricePoints.some((function(e){return e.billingPeriod===t}));return b?(null==(n=b.targetPackage)?void 0:n.refId)===e.id&&(!o||i.billingPeriod===t):!(!x||!r)&&a.billingPeriod===t},paywallCurrency:o,scheduledUpdate:b||x})}));if(a&&g){var k,P=g&&(null==a||null==(k=a.find((function(e){return e.id===(null==g?void 0:g.id)})))?void 0:k.order);m(P)||(w=w.map((function(e){return Z({},e,{isLowerThanCurrentPlan:P>e.order})})),t&&(w=w.filter((function(e){return e.order>P}))))}var C=l?function(e){var t=e.palette,n=e.layout;return{customCss:e.customCss||void 0,palette:{primary:(null==t?void 0:t.primary)||void 0,backgroundPaper:(null==t?void 0:t.backgroundColor)||void 0,outlinedBorder:(null==t?void 0:t.borderColor)||void 0,backgroundHighlight:(null==t?void 0:t.currentPlanBackground)||void 0,text:{primary:(null==t?void 0:t.textColor)||void 0}},typography:Bt(e.typography),layout:{ctaAlignment:At(null==n?void 0:n.alignment),headerAlignment:At(null==n?void 0:n.alignment),descriptionAlignment:At(null==n?void 0:n.alignment),planMaxWidth:St(null==n?void 0:n.planWidth),planMinWidth:St(null==n?void 0:n.planWidth),planMargin:St(null==n?void 0:n.planMargin),planPadding:St(null==n?void 0:n.planPadding)}}}(l):void 0;return{currentPlan:g,currentSubscription:d,isCustomerOnTrial:h,plans:w,paywallConfiguration:C}}(x,a);return Z({customer:(null==x?void 0:x.customer)||null,isLoading:P,selectedBillingPeriod:g,setSelectedBillingPeriod:h,availableBillingPeriods:y,locale:u,configuration:S.paywallConfiguration},S)}({productId:t,resourceId:r,showOnlyEligiblePlans:l,billingCountryCode:h,preferredBillingPeriod:d}),x=b.plans,w=b.customer,k=b.currentSubscription,P=b.isCustomerOnTrial,C=b.isLoading,S=b.selectedBillingPeriod,T=b.setSelectedBillingPeriod,B=b.availableBillingPeriods,A=b.locale,M=b.configuration,U=u({highlightChip:"Recommended",planCTAButton:{upgrade:"Upgrade",downgrade:"Downgrade",startTrial:function(e){var t;return"Start "+(null==(t=e.defaultTrialConfig)?void 0:t.duration)+" day trial"},custom:"Contact us",currentPlan:"Current plan",startNew:"Get started",switchToBillingPeriod:function(e){return e===n.BillingPeriod.Monthly?"Switch to monthly billing":"Switch to annual billing"},cancelScheduledUpdate:"Cancel"},price:{startingAtCaption:"Starts at",pricePeriod:function(e){return e===n.BillingPeriod.Monthly?"/ month":"/ year"},free:function(e){return{price:(null==e?void 0:e.symbol)+"0"}},custom:"Custom",priceNotSet:"Price not set"}},c),L=!x||C||y?a.createElement(qt,null):a.createElement(xt,{plans:x,customer:w,currentSubscription:k,selectedBillingPeriod:S,onBillingPeriodChanged:function(e){T(e),g&&g(e)},availableBillingPeriods:B,highlightedPlanId:o,isLoading:C,isCustomerOnTrial:P,onPlanSelected:s,paywallLocale:U,locale:A});return f?L:a.createElement(Vt,{componentTheme:M},L)},exports.Promotions=on,exports.StiggContext=kt,exports.StiggProvider=function(e){var t=e.apiKey,n=e.baseUri,o=e.baseEdgeUri,l=e.enableEdge,c=e.customerId,s=e.customerToken,u=e.resourceId,d=e.theme,p=e.locale,m=e.useEntitlementPolling,g=e.entitlementPollingInterval,h=e.entitlementsFallback,f=e.stiggClient,y=e.children,v=i.useRef(t),x={apiKey:t,customerId:c,customerToken:s,resourceId:u,baseUri:n,baseEdgeUri:o,enableEdge:l,entitlementsFallback:h,useEntitlementPolling:m,entitlementPollingInterval:g},E=i.useState((function(){return{stigg:null!=f?f:r.initialize(Z({},x,{lazyLoad:!0})),locale:p||"en-US",isInitialized:!1,theme:d,refreshData:(e=$(Et.mark((function e(){return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k((function(e){return Z({},e,{customerPortalUpdatedAt:new Date})})),e.next=3,w.stigg.refresh();case 3:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})};var e})),w=E[0],k=E[1];return i.useEffect((function(){var e=!0,n=function(t){e&&k(t)},i=function(){return n((function(e){return Z({},e,{updatedAt:new Date})}))},a=function(e){return n((function(t){return t.stigg&&t.stigg.removeListener("entitlementsUpdated",i),e.addListener("entitlementsUpdated",i),Z({},t,{stigg:e,isInitialized:!0,updatedAt:new Date})}))};return function(){var e=$(Et.mark((function e(){var i;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=w.stigg,t!==v.current&&(wt.log("Updating stigg client",{apiKey:t}),v.current=t,i=r.initialize(Z({},x)),n((function(e){return Z({},e,{isInitialized:!1,updatedAt:new Date})}))),e.next=4,i.waitForInitialization();case 4:a(i);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()(),function(){e=!1,w.stigg.removeListener("entitlementsUpdated",i),w.stigg.clearCustomer()}}),[t]),i.useEffect((function(){var e=w.stigg;c?e.setCustomerId(c,s,u):e.clearCustomer()}),[c,s,u]),i.useEffect((function(){k((function(e){return Z({},e,{theme:d})}))}),[d]),a.createElement(kt.Provider,{value:w},a.createElement(b.SkeletonTheme,{baseColor:"#F5F6F9",highlightColor:"#e5e6ea"},y))},exports.SubscriptionsOverview=hi,exports.useStiggContext=Pt,exports.useWaitForCheckoutCompleted=function(e){var t,n=void 0===e?{}:e,r=n.onProvisionStart,a=n.onProvisionSucceeded,o=n.onProvisionFailed,l=Pt().stigg,c=i.useState(exports.ProvisionStatus.IN_PROGRESS),s=c[0],u=c[1],d=i.useState(!1),p=d[0],m=d[1],g=i.useMemo((function(){var e=new URLSearchParams(window.location.search);return t?e.get(t):e}),[t="checkoutCompleted",window.location.search]);return i.useEffect((function(){!function(){var e=$(Et.mark((function e(){var t;return Et.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g&&"false"!==g.toLowerCase()&&!p){e.next=2;break}return e.abrupt("return");case 2:return m(!0),r&&r(),e.prev=4,e.next=7,l.waitForCheckoutCompleted();case 7:t=e.sent,u(exports.ProvisionStatus.SUCCEEDED),a&&a(t),e.next=17;break;case 12:e.prev=12,e.t0=e.catch(4),console.error("Failed to wait for checkout to complete",e.t0),u(exports.ProvisionStatus.FAILED),o&&o(e.t0);case 17:return e.prev=17,m(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[4,12,17,20]])})));return function(){return e.apply(this,arguments)}}()()}),[l,g]),{isAwaitingCheckout:p,provisionStatus:s}};
|
|
2
2
|
//# sourceMappingURL=react-sdk.cjs.production.min.js.map
|