1"use strict";(self.rspackChunkcircle=self.rspackChunkcircle||[]).push([[80328],{205737(e,t,n){var r=n(51730),a=n(915779),o={show:function(e){return(0,r.i_)(a.iK.paywallCheckout.attempts.show(e))},cancel:function(e,t){return(0,r.Dc)(a.iK.paywallCheckout.attempts.destroy(e),t?{processor_error:t}:void 0)}};n.d(t,{V:()=>o})},210104(e,t,n){var r=n(391426),a=n(570310),o=n(288513),l=function(e){var t=e.className,n=e.children;return(0,r.jsx)("div",{className:(0,a.x)((0,o.W2)("border-secondary-200"),"flex flex-col empty:hidden",t),children:n})};n.d(t,{w:()=>l})},714271(e,t,n){var r={default:"default",paywall_customization:"paywall_customization"};n.d(t,{v:()=>r})},454651(e,t,n){n.d(t,{D:()=>eW});var r,a,o,l,i=n(391426),u=n(568316),c=n(417980),s=n(570310),p=n(973646),f=n(892907),d=n(898666),v=n(674251),y=n(139942),m={xs:v.o.LabelXs,sm:v.o.LabelSm,md:v.o.LabelMd,default:v.o.LabelMd},_=function(e){var t,n,r,a=e.children,o=e.className,l=e.size,u=void 0===l?"sm":l,c=e.tooltip,v=e.weight,_=void 0===v?"normal":v,b=(0,y.fk)(),w=c&&(0,i.jsx)(d.$,{dataTestId:"checkout-form-preview-entry-tooltip",className:"inline-flex cursor-help",content:c,children:(0,i.jsx)(p.In,{type:"16-question-mark",size:16,color:"text-primary"})});if(b){return(0,i.jsxs)("div",{className:"flex flex-row gap-x-1 whitespace-normal",children:[(0,i.jsx)(f.o5,(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},(t=u,"semibold"===_?"xs"===t?{variant:"body-md",color:"secondary"}:{variant:"sm"===t?"label-sm":"label-md",color:"primary"}:"xs"===t?{variant:"label-xs",color:"secondary"}:{variant:"sm"===t?"body-sm":"body-md",color:"secondary"})),r=r={children:(0,i.jsx)("span",{className:"flex flex-row gap-x-2 whitespace-normal",children:a})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n)),w]})}var h=m[u]||m.default;return(0,i.jsxs)("div",{className:"flex flex-row gap-x-2 whitespace-normal",children:[(0,i.jsx)(h,{weight:_,children:(0,i.jsx)("span",{className:(0,s.x)(void 0===o?"":o),children:a})}),w]})},b={sm:v.o.LabelSm,md:v.o.LabelMd,lg:v.o.LabelLg},w=function(e,t){return"semibold"===t?"sm"===e?"label-sm":"label-md":"sm"===e?"body-sm":"body-md"},h=function(e){var t=e.children,n=e.color,r=void 0===n?"text-primary":n,a=e.size,o=void 0===a?"sm":a,l=e.weight,u=void 0===l?"normal":l;if((0,y.fk)())return"text-green-700"===r?(0,i.jsx)("span",{className:"text-green-700",children:(0,i.jsx)(f.o5,{variant:w(o,u),color:"current",children:t})}):(0,i.jsx)(f.o5,{variant:w(o,u),color:"primary",children:t});var c=b[o];return(0,i.jsx)(c,{weight:u,color:r,children:t})},g=function(e){var t=e.className,n=e.label,r=e.labelSize,a=e.labelWeight,o=e.labelClassName,l=e.tooltip,u=e.value,c=e.valueSize,p=e.valueColor,f=e.valueWeight,d=e.hide,v=e.dataTestId;return void 0!==d&&d?null:(0,i.jsxs)("div",{className:(0,s.x)(t,"flex flex-row items-center justify-between space-x-2 whitespace-nowrap md:space-x-3"),"data-testid":v,children:[(0,i.jsx)(_,{size:void 0===r?"sm":r,weight:void 0===a?"normal":a,className:void 0===o?"":o,tooltip:l,children:n}),u&&(0,i.jsx)(h,{size:void 0===c?"sm":c,weight:void 0===f?"normal":f,color:void 0===p?"text-primary":p,children:u})]})},O=n(933578),j=n(210104),P=n(714271),x=n(392369),T=n(451430),L=function(e){var t;return(null==e||null==(t=e.trial_period)?void 0:t.free)?{hide:!0}:{}},S=function(e){return e.first_payment.discount<0||e.first_payment.tax>0||e.first_payment.ending_balance<0},k=n(910648),D=Object.assign({},{DefaultLine:function(e){var t=e.options;return(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:""},t))},EndingBalanceLine:function(e){var t=e.preview,n=e.options;return!S(t)||t.first_payment.ending_balance>=0?null:(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)("paywall_checkout.first_payment.ending_balance"),tooltip:(0,c.t)("paywall_checkout.first_payment.ending_balance_tooltip"),value:t.first_payment.formatted_ending_balance,valueColor:"text-green-700",dataTestId:"checkout-form-preview-carry-over"},n))},FreeTrialLine:function(e){var t,n=e.preview,r=e.options;return[k.W9.trialThenValue,k.W9.trialThenUpfrontThenValue].includes(n.preview_scenario)?(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)("paywall_checkout.free_trial_day",{count:null==n||null==(t=n.trial_period)?void 0:t.days}),value:n.formatted_amount_due_now,valueWeight:"semibold",dataTestId:"checkout-form-preview-today-payment-free-trial"},r)):null},PaidTrialLine:function(e){var t,n=e.preview,r=e.options;return S(n)||![k.W9.upfrontThenTrialThenValue].includes(n.preview_scenario)?null:(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)("paywall_checkout.first_payment.total_due_for_paid_trial",{count:null==n||null==(t=n.trial_period)?void 0:t.days}),value:n.formatted_amount_due_now,valueWeight:"semibold",dataTestId:"checkout-form-preview-today-payment-paid-trial"},r))},SubtotalLine:function(e){var t=e.preview,n=e.options;return!S(t)||t.first_payment.subtotal<0?null:(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)("paywall_checkout.coupon.subtotal"),value:t.first_payment.formatted_subtotal,dataTestId:"checkout-form-preview-today-payment-subtotal"},n))},TaxLine:function(e){var t=e.preview,n=e.options;return S(t)&&0!==t.first_payment.tax?(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)("paywall_checkout.coupon.tax"),value:t.first_payment.formatted_tax,dataTestId:"checkout-form-preview-today-tax"},n)):null},DiscountLine:function(e){var t=e.preview,n=e.options;return!S(t)||t.first_payment.discount>=0?null:(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)("paywall_checkout.coupon.discount"),value:t.first_payment.formatted_discount,valueColor:"text-green-700",dataTestId:"checkout-form-preview-today-discount"},n))},TodayPaymentLine:function(e){var t=e.preview,n=e.options;return t.first_payment?(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:t.first_payment.due_on_phrase,value:t.first_payment.formatted_amount_due,labelWeight:"semibold",valueWeight:"semibold",dataTestId:"checkout-form-preview-today-payment-total"},n)):null},TotalDueTodayLine:function(e){var t=e.preview,n=e.options;return S(t)?(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)("paywall_checkout.amount_due"),value:t.formatted_amount_due_now,dataTestId:"checkout-form-preview-total-due-today-line"},n)):null}}),E=n(248043),N="paywall_checkout.todays_payment",W=function(e){var t={label:(0,c.t)(N),value:e.formatted_amount_due_now,valueWeight:"semibold"},n={label:(0,c.t)(N),value:void 0};if([k.W9.trialThenValue,k.W9.trialThenUpfrontThenValue].includes(e.preview_scenario))return n;if([k.W9.upfrontThenValue,k.W9.upfrontThenTrialThenValue].includes(e.preview_scenario))return!S(e)&&(null==e||null==(o=e.trial_period)?void 0:o.paid)?n:t;if([k.W9.value].includes(e.preview_scenario)){var r,a,o,l,i=1+ +!!e.future_payments+((null==e||null==(l=e.remaining_payments)?void 0:l.installments_preview.length)||0),u=(0,T.compact)([i>1?(0,c.t)("paywall_checkout.first_payment.header_installments"):(0,c.t)("paywall_checkout.todays_payment"),i>
11?"(".concat((0,c.t)("progress_counter",{count:(0,E.En)(1),total_count:i}),")"):null]).join(" ");return r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t),a=a={label:u},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(a)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(a,e))}),r}return t},I=Object.assign({},{TodayPaymentLine:function(e){var t=e.preview,n=W(t);return(0,i.jsx)(D.TodayPaymentLine,{preview:t,options:n})},TotalDueTodayLine:function(e){var t=e.preview,n=[k.W9.upfrontThenTrialThenValue,k.W9.upfrontThenValue].includes(t.preview_scenario)?{label:(0,c.t)("paywall_checkout.amount_due_intro_fee")}:[k.W9.trialThenValue,k.W9.trialThenUpfrontThenValue].includes(t.preview_scenario)?{hide:!0}:{};return(0,i.jsx)(D.TotalDueTodayLine,{preview:t,options:n})}}),A=[[I.TodayPaymentLine,T.noop],[D.FreeTrialLine,T.noop],[D.SubtotalLine,L],[D.DiscountLine,L],[D.TaxLine,L],[D.EndingBalanceLine,L],[D.PaidTrialLine,T.noop],[I.TotalDueTodayLine,T.noop]],C=[[D.TodayPaymentLine,function(){return{label:(0,c.t)("paywall_checkout.todays_payment")}}],[D.SubtotalLine,T.noop],[D.DiscountLine,T.noop],[D.TaxLine,T.noop],[D.EndingBalanceLine,T.noop],[D.TotalDueTodayLine,T.noop]],z=[[D.TodayPaymentLine,function(e){return[k.W9.trialThenValue,k.W9.trialThenUpfrontThenValue].includes(e.preview_scenario)?{label:(0,c.t)("paywall_checkout.todays_payment"),value:null}:{label:(0,c.t)("paywall_checkout.todays_payment")}}],[D.FreeTrialLine,T.noop],[D.SubtotalLine,L],[D.DiscountLine,L],[D.TaxLine,L],[D.EndingBalanceLine,L],[D.TotalDueTodayLine,L]];function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var F=[[D.TodayPaymentLine,T.noop],[D.SubtotalLine,T.noop],[D.DiscountLine,T.noop],[D.TaxLine,T.noop],[D.EndingBalanceLine,T.noop]],M={default:(V(r={},x.ZF.onetime,F),V(r,x.ZF.subscription,F),V(r,x.ZF.installments,F),r),paywall_customization:(V(a={},x.ZF.onetime,C),V(a,x.ZF.subscription,z),V(a,x.ZF.installments,A),a)};function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var R=function(e){var t=e.className,n=e.preview,r=e.variant,a=(M[void 0===r?P.v.default:r]||M[P.v.default])[n.paywall_price.price_type];return(0,i.jsx)(j.w,{className:(0,s.x)("gap-y-2",t),children:(0,i.jsx)(O.Fragment,{children:a.map(function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,l=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(a.push(t.value),2!==a.length);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==r.return||r.return()}finally{if(l)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return q(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return q(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return(0,t[0])({preview:n,options:(0,t[1])(n)||{}})})},Math.random())})},H=Object.assign({},{DiscountLine:function(e){var t,n,r=e.preview,a=e.options;return(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)("paywall_checkout.coupon.discount"),value:null==r||null==(t=r.future_payments)?void 0:t.formatted_discount,valueColor:"text-green-700",tooltip:null==r||null==(n=r.future_payments)?void 0:n.discount_phrase,dataTestId:"checkout-form-preview-future-payments-discount"},a))},HeaderLine:function(e){var t,n=e.preview,r=e.options;return(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)("paywall_checkout.future_payments.header"),labelWeight:"semibold",value:null==n||null==(t=n.future_payments)?void 0:t.formatted_total,valueWeight:"semibold",dataTestId:"checkout-form-preview-future-payments-total"},r))},HeaderPaywallCustomizationLine:function(){return(0,i.jsx)(eW.PreviewEntry,{label:(0,c.t)("paywall_checkout.future_payments.header"),labelWeight:"semibold",dataTestId:"checkout-form-preview-future-payments-total"})},RegularPriceLine:function(e){var t,n=e.preview,r=e.options;return(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)(["settings.paywall_prices.subscription.regular_price",n.paywall_price.interval_type]),value:null==n||null==(t=n.future_payments)?void 0:t.formatted_subtotal,dataTestId:"checkout-form-preview-future-payments-regular-price"},r))},SubtotalLine:function(e){var t,n,r=e.preview,a=e.options;return(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:null==r||null==(t=r.future_payments)?void 0:t.start_on_phrase,value:null==r||null==(n=r.future_payments)?void 0:n.formatted_subtotal,dataTestId:"checkout-form-preview-future-payments-subtotal"},a))},TaxLine:function(e){var t,n=e.preview,r=e.options;return(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)("paywall_checkout.coupon.tax"),value:null==n||null==(t=n.future_payments)?void 0:t.formatted_tax,dataTestId:"checkout-form-preview-future-payments-tax"},r))}}),U=function(e){var t,n,r;return[k.W9.upfrontThenTrialThenValue,k.W9.trialThenUpfrontThenValue,k.W9.upfrontThenValue].includes(e.preview_scenario)?1+((null==e||null==(r=e.remaining_payments)||null==(n=r.installments_preview)?void 0:n.length)||0):1+ +!!e.future_payments+((null==e||null==(t=e.remaining_payments)?void 0:t.installments_preview.length)||0)},Z=function(e){return 1===U(e)},B=function(e){return e.future_payments&&(e.future_payments.discount<0||e.future_payments.tax>0)},K=Object.assign({},{DiscountLine:function(e){var t=e.preview,n=e.options;return!t.future_payments||t.future_payments.discount>=0?null:(0,i.jsx)(H.DiscountLine,{preview:t,options:n})},HeaderLine:function(e){var t=e.preview,n=e.options;return t.future_payments?(0,i.jsx)(H.HeaderLine,{preview:t,options:n}):null},HeaderPaywallCustomizationLine:function(){return(0,i.jsx)(H.HeaderPaywallCustomizationLine,{})},RegularPriceLine:function(e){var t=e.preview,n=e.options;return t.future_payments&&B(t)?(0,i.jsx)(H.RegularPriceLine,{preview:t,options:n}):null},SubtotalLine:function(e){var t=e.preview,n=e.options;return t.future_payments?(0,i.jsx)(H.SubtotalLine,{preview:t,options:n}):null},TaxLine:function(e){var t=e.preview,n=e.options;return!t.future_payments||t.future_payments.tax<=0?null:(0,i.jsx)(H.TaxLine,{preview:t,options:n})}});function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var G={total_amount_due:0,coupons_applied_quantity:0,installments_preview:[]},Q=function(e){if((0,k.nL)(e.preview_scenario)&&e.future_payments){var t,n=e.remaining_payments||G,r=e.future_payments;return{total_amount_due:(null==n?void 0:n.total_amount_due)+r.amount_due,coupons_applied_quantity:(null==n?void 0:n.coupons_applied_quantity)+ +(r.discount<0),installments_preview:[{amount_due:r.amount_due,start_on:r.start_on,coupon_status:r.discount<0?"applied":"not_applied"}].concat(function(e){if(Array.isArray(e))return $(e)}(t=n.installments_preview)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return $(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return $(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}}return e.remaining_payments},X=function(e,t){return"applied"===t.coupon_status&&e.discounted?(e.discounted.totalAmountDue+=t.amount_due,e.discounted.singleInstallmentAmountDue=t.amount_due,e.discounted.quantity+=1):"not_applied"===t.coupon_status&&e.standard&&(e.standard.totalAmountDue+=t.amount_due,e.standard.singleInstallmentAmountDue=t.amount_due,e.standard.quantity+=1),e},Y=function(e){var t,n;return{tooltip:void 0,hide:0===((null==(t=e.future_payments)?void 0:t.discount)||0),value:null==(n=e.future_payments)?void 0:n.formatted_discount}},J={trial_then_value:function(e){var t;return{tooltip:void 0,hide:0===((null==(t=e.first_payment)?void 0:t.discount)||0),value:e.first_payment.formatted_discount}},trial_then_upfront_then_value:Y,upfront_then_trial_then_value:Y,upfront_then_value:Y,value:function(){return{hide:!0}}},ee=function(e){if(!e.paywall_coupon)return{hide:!0};if(1===U(e))return J[e.preview_scenario](e);var t,n,r=Q(e),a=((null==r?void 0:r.coupons_applied_quantity)||0)>0?(0,c.t)(["paywall_checkout.future_payments.discount_phrase_v2",null==e||null==(t=e.paywall_coupon)?void 0:t.duration],{count:null==r?void 0:r.coupons_applied_quantity}):void 0;return(0,k.nL)(e.preview_scenario)?{hide:0===e.first_payment.discount,value:e.first_payment.formatted_discount,tooltip:a}:{hide:0===((null==(n=e.future_payments)?void 0:n.discount)||0),tooltip:a}},et=function(e){var t,n;return{label:(0,c.t)("paywall_checkout.future_payments.future_payment_after_x_trial_days",{count:null==e||null==(t=e.trial_period)?void 0:t.days}),value:B(e)?null==(n=e.future_payments)?void 0:n.formatted_amount_due:void 0,valueWeight:"semibold"}},en=function(e){var t;return{label:(0,c.t)("paywall_checkout.future_payments.header_installments.one_installment"),value:B(e)?null==(t=e.future_payments)?void 0:t.formatted_amount_due:void 0,valueWeight:"semibold"}},er={trial_then_value:function(e){var t,n;return t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},et(e)),n=n={value:S(e)?e.first_payment.formatted_amount_due:void 0},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t},trial_then_upfront_then_value:et,upfront_then_trial_then_value:en,upfront_then_value:en,value:function(){return{hide:!0}}},ea=function(e){var t,n=U(e);return{label:(0,T.compact)([(0,c.t)(["paywall_checkout.future_payments.header_installments.first_payment",e.paywall_price.interval_type]),"(".concat((0,c.t)("progress_counter",{count:(0,E.En)(1),total_count:n}),")")]).join(" "),value:B(e)?null==(t=e.future_payments)?void 0:t.formatted_amount_due:void 0}},eo={trial_then_value:function(e){var t,n=U(e);return{label:(0,T.compact)([(0,c.t)(["paywall_checkout.future_payments.header_installments.first_payment",e.paywall_price.interval_type]),"(".concat((0,c.t)("progress_counter",{count:(0,E.En)(1),total_count:n}),")")]).join(" "),value:S(e)?null==(t=e.first_payment)?void 0:t.formatted_amount_due:void 0}},trial_then_upfront_then_value:ea,upfront_then_trial_then_value:function(e){var t,n=U(e),r=(0,T.compact)([(0,c.t)(["paywall_checkout.future_payments.header_installments.first_payment",e.paywall_price.interval_type]),"(".concat((0,c.t)("progress_counter",{count:(0,E.En)(1),total_count:n}),")")]).join(" ");return B(e)?{label:r,value:null==(t=e.future_payments)?void 0:t.formatted_amount_due,valueWeight:"semibold"}:{label:r,value:void 0}},upfront_then_value:ea,value:function(e){var t,n=U(e);return{label:[(0,c.t)(["paywall_checkout.future_payments.header_installments.next_payment",e.paywall_price.interval_type]),"(".concat((0,c.t)("progress_counter",{count:(0,E.En)(2),total_count:n}),")")].join(" "),value:B(e)?null==(t=e.future_payments)?void 0:t.formatted_amount_due:void 0}}},el=function(e){var t;return{value:null==e||null==(t=e.future_payments)?void 0:t.formatted_subtotal,hide:!B(e)}},ei={trial_then_value:function(e){return{value:e.first_payment.formatted_subtotal,hide:!S(e)}},trial_then_upfront_then_value:el,upfront_then_trial_then_value:el,upfront_then_value:el,value:function(){return{hide:!0}}},eu=function(e){var t,n;return{value:null==(t=e.future_payments)?void 0:t.formatted_amount_due,label:(0,c.t)("paywall_checkout.future_payments.one_time_payment_on",{date:null==(n=e.future_payments)?void 0:n.formatted_start_on}),valueWeight:B(e)?"normal":"semibold"}},ec={trial_then_value:function(e){var t,n;return{valueWeight:S(e)?"normal":"semibold",value:null==(t=e.first_payment)?void 0:t.formatted_amount_due,label:(0,c.t)("paywall_checkout.future_payments.one_time_payment_on",{date:null==(n=e.first_payment)?void 0:n.formatted_due_on})}},trial_then_upfront_then_value:function(e){var t,n;return{valueWeight:B(e)?"normal":"semibold",value:null==(t=e.future_payments)?void 0:t.formatted_amount_due,label:(0,c.t)("paywall_checkout.future_payments.one_time_payment_on",{date:null==(n=e.future_payments)?void 0:n.formatted_start_on})}},upfront_then_trial_then_value:eu,upfront_then_value:eu,value:function(){return{hide:!0}}},es=function(e){var t,n,r,a;return(0,k.nL)(e.preview_scenario)?{value:null==(r=e.first_payment)?void 0:r.formatted_amount_due,valueWeight:S(e)?"normal":"semibold",label:(0,c.t)(["paywall_checkout.future_payments.next_payment_on_v2",e.paywall_price.interval_type],{date:null==e||null==(a=e.first_payment)?void 0:a.formatted_due_on})}:{value:null==(t=e.future_payments)?void 0:t.formatted_amount_due,valueWeight:B(e)?"normal":"semibold",label:(0,c.t)(["paywall_checkout.future_payments.next_payment_on_v2",e.paywall_price.interval_type],{date:null==(n=e.future_payments)?void 0:n.formatted_start_on})}},ep=function(e){return(e||0)>0},ef=function(e){var t,n;return{value:null==e||null==(t=e.future_payments)?void 0:t.formatted_tax,hide:!ep(null==e||null==(n=e.future_payments)?void 0:n.tax)}},ed={trial_then_value:function(e){var t;return{value:e.first_payment.formatted_tax,hide:!ep(null==e||null==(t=e.first_payment)?void 0:t.tax)}},trial_then_upfront_then_value:ef,upfront_then_trial_then_value:ef,upfront_then_value:ef,value:function(){return{hide:!0}}},ev=function(e){var t;return Z(e)?ed[e.preview_scenario](e):{hide:!ep(null==e||null==(t=e.future_payments)?void 0:t.tax)}},ey=Object.assign({},{DiscountLine:function(e){var t=e.preview,n=ee(t);return(0,i.jsx)(H.DiscountLine,{preview:t,options:n})},HeaderLine:function(e){var t=e.preview,n=1===U(t)?er[t.preview_scenario](t):eo[t.preview_scenario](t);return(0,i.jsx)(H.HeaderLine,{preview:t,options:n})},RegularPriceLine:function(e){var t=e.preview,n=Z(t)?ei[t.preview_scenario](t):{hide:!B(t)};return(0,i.jsx)(H.RegularPriceLine,{preview:t,options:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)("subtotal")},n)})},SubtotalLine:function(e){var t=e.preview,n=1===U(t)?ec[t.preview_scenario](t):es(t);return(0,i.jsx)(H.SubtotalLine,{preview:t,options:n})},TaxLine:function(e){var t=e.preview,n=ev(t);return(0,i.jsx)(H.TaxLine,{preview:t,options:n})}}),em=[[ey.HeaderLine,T.noop],[ey.RegularPriceLine,T.noop],[ey.DiscountLine,T.noop],[ey.TaxLine,T.noop],[ey.SubtotalLine,T.noop]],e_=n(416419),eb=function(e,t,n){var r=(0,T.compact)(["paywall_checkout.future_payments.discount_phrase_v2",e,n&&"forever"!=e?"plus":null]);return(0,c.t)(r,{count:t})},ew=function(e){var t=Number(e.coupon_applications.application_count),n=0;return e.preview_scenario===k.W9.value&&(n=2),[k.W9.trialThenValue,k.W9.upfrontThenValue].includes(e.preview_scenario)&&(n=2),[k.W9.trialThenUpfrontThenValue,k.W9.upfrontThenTrialThenValue].includes(e.preview_scenario)&&(n=3),Math.max(t-n,0)},eh=[[K.HeaderLine,function(e){var t,n;return(0,k.nL)(e.preview_scenario)?{label:(0,c.t)("paywall_checkout.future_payments.future_payments_after_x_trial_days",{count:null==e||null==(n=e.trial_period)?void 0:n.days}),value:S(e)?e.first_payment.formatted_amount_due:null}:{value:B(e)?null==e||null==(t=e.future_payments)?void 0:t.formatted_amount_due:null}}],[H.RegularPriceLine,function(e){var t;return(0,k.nL)(e.preview_scenario)?{hide:!S(e),value:e.first_payment.formatted_subtotal}:{hide:!B(e),value:null==(t=e.future_payments)?void 0:t.formatted_subtotal}}],[H.DiscountLine,function(e){var t,n,r=null==e||null==(t=e.paywall_coupon)?void 0:t.duration,a=ew(e),o=e.coupon_applications.has_more;return(0,k.nL)(e.preview_scenario)?{hide:0===e.first_payment.discount,value:e.first_payment.formatted_discount,tooltip:r&&a>0&&eb(r,a,o)}:{hide:0===((null==e||null==(n=e.future_payments)?void 0:n.discount)||0),tooltip:r&&a>0&&eb(r,a,o)}}],[H.TaxLine,function(e){var t,n;return(0,k.nL)(e.preview_scenario)?{hide:0===e.first_payment.tax,value:e.first_payment.formatted_tax}:{hide:0===((null==e||null==(t=e.future_payments)?void 0:t.tax)||0),value:null==e||null==(n=e.future_payments)?void 0:n.formatted_tax}}],[H.SubtotalLine,function(e){var t;if((0,k.nL)(e.preview_scenario)){var n,r,a,o,l,i,u=e.paywall_price,s="",p={};return(null==e||null==(n=e.paywall_coupon)?void 0:n.duration)==="forever"?(s=(null==e||null==(a=e.future_payments)?void 0:a.formatted_start_on)||"",p={value:(0,e_.r)(e.currency,(null==(o=e.future_payments)?void 0:o.amount_due)||e.paywall_price.amount),valueWeight:"normal"}):(null==e||null==(r=e.paywall_coupon)?void 0:r.duration)==="once"?(s=(null==e||null==(l=e.future_payments)?void 0:l.formatted_start_on)||"",p={value:(0,e_.r)(e.currency,e.paywall_price.amount),valueWeight:"normal"}):(s=e.first_payment.formatted_due_on,p={value:null==e||null==(i=e.first_payment)?void 0:i.formatted_amount_due,valueWeight:S(e)?"normal":"semibold"}),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:(0,c.t)(["paywall_checkout.future_payments.payments_starting_on_phrase",u.price_type,u.interval_type],{date:s})},p)}return{value:null==e||null==(t=e.future_payments)?void 0:t.formatted_amount_due,valueWeight:B(e)?"normal":"semibold"}}]];function eg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eO=[[K.HeaderLine,T.noop],[K.SubtotalLine,T.noop],[K.DiscountLine,T.noop],[K.TaxLine,T.noop]],ej={default:(eg(o={},x.ZF.subscription,eO),eg(o,x.ZF.installments,eO),o),paywall_customization:(eg(l={},x.ZF.subscription,eh),eg(l,x.ZF.installments,em),l)};function eP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ex=function(e){var t=e.preview,n=e.className,r=e.variant,a=void 0===r?P.v.default:r;if("onetime"===t.paywall_price.price_type)return null;var o=(ej[a]||ej[P.v.default])[t.paywall_price.price_type];return(0,i.jsx)(j.w,{className:(0,s.x)("gap-y-2 border-t",n),children:(0,i.jsx)(O.Fragment,{children:o.map(function(e){var n=function(e){if(Array.isArray(e))return e}(e)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,l=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(a.push(t.value),2!==a.length);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==r.return||r.return()}finally{if(l)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return eP(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eP(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return(0,n[0])({preview:t,options:(0,n[1])(t)||{}})})},Math.random())})},eT=function(e){var t,n=null==(t=e.remaining_payments)?void 0:t.installments_preview.reduce(X,{discounted:{quantity:0,singleInstallmentAmountDue:0,totalAmountDue:0}});if(!(null==n?void 0:n.discounted)||(null==n?void 0:n.discounted.quantity)===0)return{hide:!0};var r=(0,e_.r)(e.currency,(null==n?void 0:n.discounted.singleInstallmentAmountDue)||0);return{label:(0,c.t)(["paywall_checkout.future_payments.discounted_installments",e.paywall_price.interval_type],{count:null==n?void 0:n.discounted.quantity}),value:"".concat(null==n?void 0:n.discounted.quantity,"x ").concat(r)}},eL=function(e){var t,n=null==(t=e.remaining_payments)?void 0:t.installments_preview.reduce(X,{standard:{quantity:0,singleInstallmentAmountDue:0,totalAmountDue:0}});if(!(null==n?void 0:n.standard)||(null==n?void 0:n.standard.quantity)===0||(null==n?void 0:n.standard.totalAmountDue)===0)return{hide:!0};var r=(0,e_.r)(e.currency,(null==n?void 0:n.standard.singleInstallmentAmountDue)||0);return{label:(0,c.t)(["paywall_checkout.future_payments.standard_installments",e.paywall_price.interval_type],{count:null==n?void 0:n.standard.quantity}),value:"".concat(null==n?void 0:n.standard.quantity,"x ").concat(r)}},eS=function(e){var t,n;return{label:(0,c.t)(["paywall_checkout.future_payments.remaining_payments",e.paywall_price.interval_type],{count:null==(t=e.remaining_payments)?void 0:t.installments_preview.length}),labelWeight:"semibold",valueWeight:"semibold",value:(0,e_.r)(e.currency,(null==e||null==(n=e.remaining_payments)?void 0:n.total_amount_due)||0)}},ek=Object.assign({},{TitleLine:function(e){var t=eS(e.preview);return(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:""},t))},StandardInstallmentsLine:function(e){var t=eL(e.preview);return(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:""},t))},DiscountedInstallmentsLine:function(e){var t=eT(e.preview);return(0,i.jsx)(eW.PreviewEntry,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({label:""},t))}}),eD=n(153169),eE=n(233554),eN=function(e){var t=e.className,n=e.preview,r=e.variant,a=void 0===r?P.v.default:r;return(0,i.jsx)(j.w,{className:(0,s.x)("gap-y-3 border-t py-8",t),children:(0,i.jsx)(eW.PreviewEntry,{label:(0,i.jsxs)(i.Fragment,{children:[(0,c.t)("paywall_checkout.amount_due"),a===P.v.default&&(0,i.jsx)(eD.T,{preview:n,properties:eE.u6})]}),labelClassName:"flex flex-row gap-x-2 items-baseline",labelSize:"md",labelWeight:"semibold",value:n.formatted_amount_due_now,valueSize:"md",valueWeight:"semibold",dataTestId:"checkout-form-preview-total-due-today"})})},eW=Object.assign(function(e){var t=e.preview;return(0,i.jsxs)("div",{className:"flex flex-col gap-y-6 md:pt-6",children:[(0,i.jsx)("div",{className:"mb-4 flex flex-row items-center",children:(0,i.jsx)(u.o.LabelLg,{weight:"semibold",children:(0,c.t)("paywall_checkout.order_summary")}
1)}),(0,i.jsx)(R,{className:"pb-4",preview:t}),(0,i.jsx)(ex,{className:"py-4",preview:t}),(0,i.jsx)(eN,{preview:t})]})},{ModalPreviewTemplate:function(e){var t=e.preview;return(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsx)(eW.FirstPaymentPreview,{preview:t,className:"pb-4",variant:P.v.paywall_customization}),(0,i.jsx)(eW.PaymentAfterTrialPreview,{preview:t,className:"py-4",variant:P.v.paywall_customization}),(0,i.jsx)(eW.FuturePaymentsPreview,{preview:t,className:"py-4",variant:P.v.paywall_customization}),(0,i.jsx)(eW.RemainingPaymentsPreview,{preview:t,className:"py-4",variant:P.v.paywall_customization}),(0,i.jsx)(eW.PaymentSchedulePreview,{preview:t,className:"py-4",variant:P.v.paywall_customization}),(0,i.jsx)(eW.TotalDueTodayPreview,{preview:t})]})},FirstPaymentPreview:R,FuturePaymentsPreview:ex,TotalDueTodayPreview:eN,ProratedCreditPreview:function(e){var t=e.preview,n=e.className,r=t.first_payment,a=r.prorated_credit_description,o=r.prorated_credit_amount,l=r.formatted_prorated_credit_amount;return a&&0!==o?(0,i.jsxs)(j.w,{className:(0,s.x)("gap-y-1 border-t",n),children:[(0,i.jsx)(eW.PreviewEntry,{label:(0,c.t)("paywall_checkout.prorated_credit"),labelWeight:"semibold",value:l,valueColor:o<0?"text-green-700":"text-primary",dataTestId:"checkout-form-preview-prorated-credit"}),(0,i.jsx)(eW.PreviewEntry,{label:a,labelSize:"xs"})]}):null},PaymentAfterTrialPreview:function(e){var t=e.preview,n=e.className;if(e.variant===P.v.default||![k.W9.trialThenUpfrontThenValue].includes(t.preview_scenario)||!t.trial_period)return null;var r=t.first_payment.discount<0,a=t.first_payment.tax>0,o=a||r;return(0,i.jsxs)(j.w,{className:(0,s.x)("gap-y-2 border-t",n),children:[(0,i.jsx)(g,{label:(0,c.t)("paywall_checkout.payment_after_trial.intro_fee_after_x_trial_days",{count:t.trial_period.days}),labelWeight:"semibold",value:o?t.first_payment.formatted_amount_due:void 0,valueWeight:o?"semibold":"normal"}),o&&(0,i.jsx)(g,{label:(0,c.t)("subtotal"),value:t.first_payment.formatted_subtotal}),r&&(0,i.jsx)(g,{label:(0,c.t)("paywall_checkout.coupon.discount"),valueColor:"text-green-700",value:t.first_payment.formatted_discount}),a&&(0,i.jsx)(g,{label:(0,c.t)("paywall_checkout.coupon.tax"),value:t.first_payment.formatted_tax}),(0,i.jsx)(g,{label:(0,c.t)("paywall_checkout.payment_after_trial.onetime_payment_due_on",{date:t.first_payment.formatted_due_on}),value:t.first_payment.formatted_amount_due,valueWeight:o?"normal":"semibold"})]})},RemainingPaymentsPreview:function(e){var t,n,r=e.preview,a=e.className;if(e.variant===P.v.default||"installments"!==r.paywall_price.price_type)return null;var o=(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},r),n=n={remaining_payments:Q(r)},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t);return(null==o?void 0:o.remaining_payments)?(0,i.jsxs)(j.w,{className:(0,s.x)("gap-y-2 border-t",a),children:[(0,i.jsx)(ek.TitleLine,{preview:o}),(0,i.jsx)(ek.DiscountedInstallmentsLine,{preview:o}),(0,i.jsx)(ek.StandardInstallmentsLine,{preview:o})]}):null},PaymentSchedulePreview:function(e){var t,n,r=e.className,a=e.preview;return e.variant!==P.v.default&&(null==a||null==(t=a.future_payments)?void 0:t.payment_schedule_line)?(0,i.jsx)(j.w,{className:(0,s.x)("gap-y-2 border-t",r),children:(0,i.jsx)(eW.PreviewEntry,{label:(0,c.t)("paywall_checkout.payment_schedule",{payment_sentence:null==(n=a.future_payments)?void 0:n.payment_schedule_line}),labelSize:"xs",labelWeight:"medium",dataTestId:"checkout-form-payment-schedule"})}):null},PreviewEntry:g})},233554(e,t,n){var r="!bg-blue-100 py-1 px-2",a="!text-blue-800 font-medium",o={trial_then_value:{labelLocale:"price_badge",variant:"info",className:r,labelClassName:a},trial_then_upfront_then_value:{labelLocale:"price_badge",variant:"info",className:r,labelClassName:a},upfront_then_trial_then_value:{labelLocale:"price_badge",variant:"secondary",className:"!bg-tertiary text-dark px-2 py-1",labelClassName:"!text-primary font-medium"},value:null,upfront_then_value:null},l={trial_then_value:{labelLocale:"free_trial",variant:"info",className:r,labelClassName:a},trial_then_upfront_then_value:{labelLocale:"free_trial",variant:"info",className:r,labelClassName:a},upfront_then_trial_then_value:{labelLocale:"paid_trial",variant:"secondary",className:"!bg-tertiary text-dark px-2 py-1",labelClassName:"!text-primary font-medium"},value:null,upfront_then_value:null},i={trial_then_value:{labelLocale:"free_trial",variant:"info",className:r,labelClassName:a},trial_then_upfront_then_value:{labelLocale:"free_trial",className:"!bg-blue-100 py-1 px-2",variant:"info",labelClassName:a},upfront_then_trial_then_value:null,value:null,upfront_then_value:null};n.d(t,{ZI:()=>i,jO:()=>o,u6:()=>l})},153169(e,t,n){var r=n(391426),a=n(570310),o=n(417980),l=n(517338),i=function(e){var t=e.price,n=e.preview,i=e.properties;if(!t&&!n)return null;var u=i[(null==t?void 0:t.scenario)||(null==n?void 0:n.preview_scenario)||"value"];return u?(0,r.jsx)(l.E,{label:(0,o.t)([u.labelLocale],{count:null==t?void 0:t.trial_days}),className:(0,a.x)("rounded-md border-0",u.className),variant:u.variant,labelClassName:u.labelClassName,textSizeClassName:"text-xs"}):null};n.d(t,{T:()=>i})},305661(e,t,n){function r(e,t,n,r,a,o,l){try{var i=e[o](l),u=i.value}catch(e){n(e);return}i.done?t(u):Promise.resolve(u).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise(function(a,o){var l=e.apply(t,n);function i(e){r(l,a,o,i,u,"next",e)}function u(e){r(l,a,o,i,u,"throw",e)}i(void 0)})}}function o(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(l,"next",{value:u(0)}),i(l,"throw",{value:u(1)}),i(l,"return",{value:u(2)}),"function"==typeof Symbol&&i(l,Symbol.iterator,{value:function(){return this}}),l;function u(i){return function(u){var c=[i,u];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}
1if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var l=function(e,t){var n,r,a=(null==e?void 0:e.subscription_processor_id)||(null==e?void 0:e.payment_intent_processor_id)||(null==e?void 0:e.invoice_processor_id),o="".concat(t).concat(a);return null==(r=window.webview)||null==(n=r.paymentSuccessful)||n.call(r,{redirect_url:o}),window.open(o,"_self")},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3;return a(function(){return o(this,function(t){return[2,new Promise(function(t){return setTimeout(t,e)})]})})()},u=function(e){var t=e.retriesThreshold,n=void 0===t?30:t,r=e.sleepTimeInMilliseconds,l=void 0===r?2e3:r,u=e.executor;return a(function(){var e,t;return o(this,function(r){switch(r.label){case 0:e=null,t=0,r.label=1;case 1:if(!(t<n))return[3,5];return[4,u()];case 2:if(e=r.sent())return[3,5];return[4,i(l)];case 3:r.sent(),r.label=4;case 4:return t++,[3,1];case 5:return[2,e]}})})()};n.d(t,{M:()=>u,h:()=>l})},22467(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var o=function(e,t){var n,o,l,i=null!=(l=null==t?void 0:t.rules)?l:{};return n=a({},e),o=o={variables:a({},e.variables,null==t?void 0:t.variables),rules:a({},e.rules,Object.fromEntries(Object.entries(i).map(function(t){var n,o,l=function(e){if(Array.isArray(e))return e}(t)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a=[],o=!0,l=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(a.push(t.value),2!==a.length);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==r.return||r.return()}finally{if(l)throw n}}return a}}(t)||function(e){if(e){if("string"==typeof e)return r(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=l[0],u=l[1];return[i,a({},null!=(n=null==(o=e.rules)?void 0:o[i])?n:{},u)]})))},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n};n.d(t,{g:()=>o})},530857(e,t,n){var r=n(933578),a=function(){return(0,r.useMemo)(function(){return{name:"full"}},[])};n.d(t,{Q:()=>a})},224934(e,t,n){var r=n(933578),a=function(){return(0,r.useMemo)(function(){return{phone:"never"}},[])};n.d(t,{j:()=>a})},917763(e,t,n){var r=n(933578),a=n(202090),o={flat:"flat",stripe:"stripe",night:"night"},l=function(){var e=(0,a.wR)().currentAppearance;return(0,r.useMemo)(function(){switch(e){case a.xz.LIGHT:return{stripeTheme:o.stripe};case a.xz.DARK:return{stripeTheme:o.night};default:return{stripeTheme:o.stripe}}},[e])};n.d(t,{d:()=>o,x:()=>l})},840884(e,t,n){var r=n(339041),a=function(e){return e===r.O.completed},o=function(e){return e===r.O.delayed_confirmation},l=function(e){return e===r.O.failed},i=function(e){return e===r.O.processing||e===r.O.waiting_for_confirmation};n.d(t,{H0:()=>l,R8:()=>o,VH:()=>a,vM:()=>i})},435987(e,t,n){var r=n(230763),a=n(407048),o={en:"en",pt:"pt-BR","pt-PT":"pt",es:"es",fr:"fr",it:"it"},l=function(e){var t,n=e.stripeAccountId,r=e.stripePublicKey,l={stripeAccount:n,locale:o[null!=(t=e.locale)?t:"en"]};return("development"===window.RAILS_ENV||"staging"===window.RAILS_ENV)&&(l.developerTools={assistant:{enabled:!0}}),(0,a.c)(r,l)},i=function(){var e,t,n=(0,r.Od)().currentCommunity;return{stripePromise:l({stripeAccountId:null==n||null==(e=n.payment_processor)?void 0:e.id,stripePublicKey:(null==n||null==(t=n.payment_processor)?void 0:t.public_api_key)||window.STRIPE_PUBLIC_KEY,locale:window.locale||"en"})}};n.d(t,{H:()=>i,n:()=>l})}
1,339041(e,t,n){var r={processing:"processing",waiting_for_confirmation:"waiting_for_confirmation",delayed_confirmation:"delayed_confirmation",completed:"completed",canceled:"canceled",failed:"failed"};n.d(t,{O:()=>r})}}]); 2//# sourceMappingURL=/packs/js/80328-e77811b93c22cd6a.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.