1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,72032,(e,t,r)=>{e.e,function(e,t){"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=e&&("u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=o){var a=[],i=!0,c=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(c)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}}(e,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.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var u,l,p,d,h,f={exports:{}};f.exports=(function(){if(h)return d;h=1;var e=p?l:(p=1,l="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function r(){}return r.resetWarningCache=t,d=function(){function n(t,r,n,o,a,i){if(i!==e){var c=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function o(){return n}n.isRequired=n;var a={array:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a}})()();var m=(u=f.exports)&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u,y=function(e,r,n){var o=!!n,a=t.useRef(n);t.useEffect(function(){a.current=n},[n]),t.useEffect(function(){if(!o||!e)return function(){};var t=function(){a.current&&a.current.apply(a,arguments)};return e.on(r,t),function(){e.off(r,t)}},[o,r,e,a])},g=function(e){var r=t.useRef(e);return t.useEffect(function(){r.current=e},[e]),r.current},v=function(e){return null!==e&&"object"===o(e)},b="[object Object]",S=function e(t,r){if(!v(t)||!v(r))return t===r;var n=Array.isArray(t);if(n!==Array.isArray(r))return!1;var o=Object.prototype.toString.call(t)===b;if(o!==(Object.prototype.toString.call(r)===b))return!1;if(!o&&!n)return t===r;var a=Object.keys(t),i=Object.keys(r);if(a.length!==i.length)return!1;for(var c={},s=0;s<a.length;s+=1)c[a[s]]=!0;for(var u=0;u<i.length;u+=1)c[i[u]]=!0;var l=Object.keys(c);return l.length===a.length&&l.every(function(n){return e(t[n],r[n])})},C=function(e,t,r){return v(e)?Object.keys(e).reduce(function(o,i){var c=!v(t)||!S(e[i],t[i]);return r.includes(i)?(c&&console.warn("Unsupported prop change: options.".concat(i," is not a mutable property.")),o):c?n(n({},o||{}),{},a({},i,e[i])):o},null):null},E="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E;if(null===e||v(e)&&"function"==typeof e.elements&&"function"==typeof e.createToken&&"function"==typeof e.createPaymentMethod&&"function"==typeof e.confirmCardPayment)return e;throw Error(t)},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E;if(v(e)&&"function"==typeof e.then)return{tag:"async",stripePromise:Promise.resolve(e).then(function(e){return k(e,t)})};var r=k(e,t);return null===r?{tag:"empty"}:{tag:"sync",stripe:r}},j=function(e){e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"3.8.0"}),e.registerAppInfo({name:"react-stripe-js",version:"3.8.0",url:"https://stripe.com/docs/stripe-js/react"}))},P=t.createContext(null);P.displayName="ElementsContext";var O=function(e,t){if(!e)throw Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e},T=function(e){var r=e.stripe,n=e.options,o=e.children,a=t.useMemo(function(){return w(r)},[r]),i=c(t.useState(function(){return{stripe:"sync"===a.tag?a.stripe:null,elements:"sync"===a.tag?a.stripe.elements(n):null}}),2),s=i[0],u=i[1];t.useEffect(function(){var e=!0,t=function(e){u(function(t){return t.stripe?t:{stripe:e,elements:e.elements(n)}})};return"async"!==a.tag||s.stripe?"sync"!==a.tag||s.stripe||t(a.stripe):a.stripePromise.then(function(r){r&&e&&t(r)}),function(){e=!1}},[a,s,n]);var l=g(r);t.useEffect(function(){null!==l&&l!==r&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[l,r]);var p=g(n);return t.useEffect(function(){if(s.elements){var e=C(n,p,["clientSecret","fonts"]);e&&s.elements.update(e)}},[n,p,s.elements]),t.useEffect(function(){j(s.stripe)},[s.stripe]),t.createElement(P.Provider,{value:s},o)};T.propTypes={stripe:m.any,options:m.object};var x=function(e){return O(t.useContext(P),e)},A=function(e){return(0,e.children)(x("mounts <ElementsConsumer>"))};A.propTypes={children:m.func.isRequired};var I=["on","session"],N=t.createContext(null);N.displayName="CheckoutSdkContext";var B=function(e,t){if(!e)throw Error("Could not find CheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an <CheckoutProvider> provider."));return e},F=t.createContext(null);F.displayName="CheckoutContext";var R=function(e,t){if(!e)return null;e.on,e.session;var r=i(e,I);return t?Object.assign(t,r):Object.assign(e.session(),r)},$=function(e){var r=e.stripe,n=e.options,o=e.children,a=t.useMemo(function(){return w(r,"Invalid prop `stripe` supplied to `CheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},[r]),i=c(t.useState(null),2),s=i[0],u=i[1],l=c(t.useState(function(){return{stripe:"sync"===a.tag?a.stripe:null,checkoutSdk:null}}),2),p=l[0],d=l[1],h=function(e,t){d(function(r){return r.stripe&&r.checkoutSdk?r:{stripe:e,checkoutSdk:t}})},f=t.useRef(!1);t.useEffect(function(){var e=!0;return"async"!==a.tag||p.stripe?"sync"===a.tag&&a.stripe&&!f.current&&(f.current=!0,a.stripe.initCheckout(n).then(function(e){e&&(h(a.stripe,e),e.on("change",u))})):a.stripePromise.then(function(t){t&&e&&!f.current&&(f.current=!0,t.initCheckout(n).then(function(e){e&&(h(t,e),e.on("change",u))}))}),function(){e=!1}},[a,p,n,u]);var m=g(r);t.useEffect(function(){null!==m&&m!==r&&console.warn("Unsupported prop change on CheckoutProvider: You cannot change the `stripe` prop after setting it.")},[m,r]);var y=g(n),v=g(p.checkoutSdk);t.useEffect(function(){if(p.checkoutSdk){var e,t,r=null==y||null==(e=y.elementsOptions)?void 0:e.appearance,o=null==n||null==(t=n.elementsOptions)?void 0:t.appearance,a=!S(o,r),i=!v&&p.checkoutSdk;o&&(a||i)&&p.checkoutSdk.changeAppearance(o)}}
1,[n,y,p.checkoutSdk,v]),t.useEffect(function(){j(p.stripe)},[p.stripe]);var b=t.useMemo(function(){return R(p.checkoutSdk,s)},[p.checkoutSdk,s]);return p.checkoutSdk?t.createElement(N.Provider,{value:p},t.createElement(F.Provider,{value:b},o)):null};$.propTypes={stripe:m.any,options:m.shape({fetchClientSecret:m.func.isRequired,elementsOptions:m.object}).isRequired};var _=function(e){var r=t.useContext(N),n=t.useContext(P);if(r&&n)throw Error("You cannot wrap the part of your app that ".concat(e," in both <CheckoutProvider> and <Elements> providers."));return r?B(r,e):O(n,e)},L=["mode"],M=function(e,r){var n="".concat(e.charAt(0).toUpperCase()+e.slice(1),"Element"),o=r?function(e){_("mounts <".concat(n,">"));var r=e.id,o=e.className;return t.createElement("div",{id:r,className:o})}:function(r){var o,a=r.id,s=r.className,u=r.options,l=void 0===u?{}:u,p=r.onBlur,d=r.onFocus,h=r.onReady,f=r.onChange,m=r.onEscape,v=r.onClick,b=r.onLoadError,S=r.onLoaderStart,E=r.onNetworksChange,k=r.onConfirm,w=r.onCancel,j=r.onShippingAddressChange,P=r.onShippingRateChange,O=_("mounts <".concat(n,">")),T="elements"in O?O.elements:null,x="checkoutSdk"in O?O.checkoutSdk:null,A=c(t.useState(null),2),I=A[0],N=A[1],B=t.useRef(null),F=t.useRef(null);y(I,"blur",p),y(I,"focus",d),y(I,"escape",m),y(I,"click",v),y(I,"loaderror",b),y(I,"loaderstart",S),y(I,"networkschange",E),y(I,"confirm",k),y(I,"cancel",w),y(I,"shippingaddresschange",j),y(I,"shippingratechange",P),y(I,"change",f),h&&(o="expressCheckout"===e?h:function(){h(I)}),y(I,"ready",o),t.useLayoutEffect(function(){if(null===B.current&&null!==F.current&&(T||x)){var t=null;if(x)switch(e){case"payment":t=x.createPaymentElement(l);break;case"address":if("mode"in l){var r=l.mode,o=i(l,L);if("shipping"===r)t=x.createShippingAddressElement(o);else if("billing"===r)t=x.createBillingAddressElement(o);else throw Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":t=x.createExpressCheckoutElement(l);break;case"currencySelector":t=x.createCurrencySelectorElement();break;case"taxId":t=x.createTaxIdElement(l);break;default:throw Error("Invalid Element type ".concat(n,". You must use either the <PaymentElement />, <AddressElement options={{mode: 'shipping'}} />, <AddressElement options={{mode: 'billing'}} />, or <ExpressCheckoutElement />."))}else T&&(t=T.create(e,l));B.current=t,N(t),t&&t.mount(F.current)}},[T,x,l]);var R=g(l);return t.useEffect(function(){if(B.current){var e=C(l,R,["paymentRequest"]);e&&"update"in B.current&&B.current.update(e)}},[l,R]),t.useLayoutEffect(function(){return function(){if(B.current&&"function"==typeof B.current.destroy)try{B.current.destroy(),B.current=null}catch(e){}}},[]),t.createElement("div",{id:a,className:s,ref:F})};return o.propTypes={id:m.string,className:m.string,onChange:m.func,onBlur:m.func,onFocus:m.func,onReady:m.func,onEscape:m.func,onClick:m.func,onLoadError:m.func,onLoaderStart:m.func,onNetworksChange:m.func,onConfirm:m.func,onCancel:m.func,onShippingAddressChange:m.func,onShippingRateChange:m.func,options:m.object},o.displayName=n,o.__elementType=e,o},U="u"<typeof window,z=t.createContext(null);z.displayName="EmbeddedCheckoutProviderContext";var Y=function(){var e=t.useContext(z);if(!e)throw Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},q=U?function(e){var r=e.id,n=e.className;return Y(),t.createElement("div",{id:r,className:n})}:function(e){var r=e.id,n=e.className,o=Y().embeddedCheckout,a=t.useRef(!1),i=t.useRef(null);return t.useLayoutEffect(function(){return!a.current&&o&&null!==i.current&&(o.mount(i.current),a.current=!0),function(){if(a.current&&o)try{o.unmount(),a.current=!1}catch(e){}}},[o]),t.createElement("div",{ref:i,id:r,className:n})},D=M("auBankAccount",U),J=M("card",U),W=M("cardNumber",U),K=M("cardExpiry",U),V=M("cardCvc",U),Q=M("fpxBank",U),G=M("iban",U),H=M("idealBank",U),Z=M("p24Bank",U),X=M("epsBank",U),ee=M("payment",U),et=M("expressCheckout",U),er=M("currencySelector",U),en=M("paymentRequestButton",U),eo=M("linkAuthentication",U),ea=M("address",U),ei=M("shippingAddress",U),ec=M("paymentMethodMessaging",U),es=M("affirmMessage",U),eu=M("afterpayClearpayMessage",U),el=M("taxId",U);e.AddressElement=ea,e.AffirmMessageElement=es,e.AfterpayClearpayMessageElement=eu,e.AuBankAccountElement=D,e.CardCvcElement=V,e.CardElement=J,e.CardExpiryElement=K,e.CardNumberElement=W,e.CheckoutProvider=$,e.CurrencySelectorElement=er,e.Elements=T,e.ElementsConsumer=A,e.EmbeddedCheckout=q,e.EmbeddedCheckoutProvider=function(e){var r=e.stripe,n=e.options,o=e.children,a=t.useMemo(function(){return w(r,"Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},[r]),i=t.useRef(null),s=t.useRef(null),u=c(t.useState({embeddedCheckout:null}),2),l=u[0],p=u[1];t.useEffect(function(){if(!s.current&&!i.current){var e=function(e){s.current||i.current||(s.current=e,i.current=s.current.initEmbeddedCheckout(n).then(function(e){p({embeddedCheckout:e})}))};"async"===a.tag&&!s.current&&(n.clientSecret||n.fetchClientSecret)?a.stripePromise.then(function(t){t&&e(t)}):"sync"===a.tag&&!s.current&&(n.clientSecret||n.fetchClientSecret)&&e(a.str
1ipe)}},[a,n,l,s]),t.useEffect(function(){return function(){l.embeddedCheckout?(i.current=null,l.embeddedCheckout.destroy()):i.current&&i.current.then(function(){i.current=null,l.embeddedCheckout&&l.embeddedCheckout.destroy()})}},[l.embeddedCheckout]),t.useEffect(function(){j(s)},[s]);var d=g(r);t.useEffect(function(){null!==d&&d!==r&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[d,r]);var h=g(n);return t.useEffect(function(){if(null!=h){if(null==n)return void console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.");void 0===n.clientSecret&&void 0===n.fetchClientSecret&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),null!=h.clientSecret&&n.clientSecret!==h.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=h.fetchClientSecret&&n.fetchClientSecret!==h.fetchClientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=h.onComplete&&n.onComplete!==h.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),null!=h.onShippingDetailsChange&&n.onShippingDetailsChange!==h.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),null!=h.onLineItemsChange&&n.onLineItemsChange!==h.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")}},[h,n]),t.createElement(z.Provider,{value:l},o)},e.EpsBankElement=X,e.ExpressCheckoutElement=et,e.FpxBankElement=Q,e.IbanElement=G,e.IdealBankElement=H,e.LinkAuthenticationElement=eo,e.P24BankElement=Z,e.PaymentElement=ee,e.PaymentMethodMessagingElement=ec,e.PaymentRequestButtonElement=en,e.ShippingAddressElement=ei,e.TaxIdElement=el,e.useCheckout=function(){B(t.useContext(N),"calls useCheckout()");var e=t.useContext(F);if(!e)throw Error("Could not find Checkout Context; You need to wrap the part of your app that calls useCheckout() in an <CheckoutProvider> provider.");return e},e.useElements=function(){return x("calls useElements()").elements},e.useStripe=function(){return _("calls useStripe()").stripe}}(r,e.r(71645))},92950,e=>{"use strict";let t=e.i(38856).SUBSCRIPTION_PLANS_PRESENTATION.map(e=>({id:e.id,planId:e.planId,label:e.label,tagline:e.tagline,price:e.priceMonthly,priceText:`$${e.priceMonthly.toFixed(2)}`,description:e.tagline,mostPopular:e.mostPopular,unlockedStageIndices:e.unlockedStageIndices,outcome:e.outcome,features:e.features.map(e=>e.badge?`${e.text} (${e.badge})`:e.text),featureItems:e.features,button:{disabled:!1,text:"Start 7-Day Free Trial"},billingCycles:[{id:"monthly",name:"Monthly",price:e.priceMonthly,priceText:`$${e.priceMonthly.toFixed(2)}`,interval:"month",popular:!1},{id:"quarterly",name:"Quarterly",price:e.priceQuarterly,priceText:`$${e.priceQuarterly.toFixed(2)}`,interval:"quarter",savings:"essentials"===e.planId?33:"growth"===e.planId?25:43,popular:e.mostPopular}]}));e.s(["PLANS",0,t])},37707,11860,40259,e=>{"use strict";var t,r="basil",n="https://js.stripe.com",o="".concat(n,"/").concat(r,"/stripe.js"),a=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,i=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,c=function(){for(var e=document.querySelectorAll('script[src^="'.concat(n,'"]')),t=0;t<e.length;t++){var r,o=e[t];if(r=o.src,a.test(r)||i.test(r))return o}return null},s=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(o).concat(t);var n=document.head||document.body;if(!n)throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return n.appendChild(r),r},u=function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"7.6.1",startTime:t})},l=null,p=null,d=null,h=function(e,t,n){if(null===e)return null;var o,a=t[0].match(/^pk_test/),i=3===(o=e.version)?"v3":o;
1a&&i!==r&&console.warn("Stripe.js@".concat(i," was loaded on the page, but @stripe/stripe-js@").concat("7.6.1"," expected Stripe.js@").concat(r,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var c=e.apply(void 0,t);return u(c,n),c},f=!1,m=function(){return t||(t=(null!==l?l:(l=new Promise(function(e,t){if("u"<typeof window||"u"<typeof document)return void e(null);if(window.Stripe,window.Stripe)return void e(window.Stripe);try{var r,n=c();n?n&&null!==d&&null!==p&&(n.removeEventListener("load",d),n.removeEventListener("error",p),null==(r=n.parentNode)||r.removeChild(n),n=s(null)):n=s(null),d=function(){window.Stripe?e(window.Stripe):t(Error("Stripe.js not available"))},p=function(e){t(Error("Failed to load Stripe.js",{cause:e}))},n.addEventListener("load",d),n.addEventListener("error",p)}catch(e){t(e);return}})).catch(function(e){return l=null,Promise.reject(e)})).catch(function(e){return t=null,Promise.reject(e)}))};Promise.resolve().then(function(){return m()}).catch(function(e){f||console.warn(e)});var y=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];f=!0;var n=Date.now();return m().then(function(e){return h(e,t,n)})};e.s(["loadStripe",0,y],11860),e.s([],40259);let g=class{static stripePromise=null;static async getStripe(){return this.stripePromise||(this.stripePromise=y("pk_live_51IBAmUFfZRf1CHsU6fVcFpamhvxWFUPmp62jsazNag68A6xj1t0K62tvrr2thtuq0jVR7LczPx3KNNU9XmgNwY0K00ebYVZlxS")),this.stripePromise}static async createPaymentIntent(e,t,r="one-time",n){try{let o=localStorage.getItem("authToken"),a=await fetch("https://jobsyn.ai/api/stripe/create-payment-intent",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`},body:JSON.stringify({amount:e,planId:t,billingCycle:r,currency:"usd",selectedTool:n})});if(!a.ok){let e=await a.text(),t="Failed to create payment intent";try{t=JSON.parse(e).message||t}catch{}return{success:!1,message:t}}return await a.json()}catch(e){return{success:!1,message:"Failed to create payment intent"}}}static async createCareerLabPaymentIntent(e,t){try{let r=localStorage.getItem("authToken"),n=await fetch("https://jobsyn.ai/api/stripe/career-lab-payment-intent",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({planId:e,discountCode:t})});if(!n.ok){let e=await n.text(),t="Failed to create payment intent";try{t=JSON.parse(e).message||t}catch{}return{success:!1,message:t}}return await n.json()}catch(e){return{success:!1,message:"Failed to create payment intent"}}}static async getActiveDiscount(e="career-lab"){try{let t=localStorage.getItem("authToken"),r=await fetch(`https://jobsyn.ai/api/stripe/active-discount?productType=${e}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});if(!r.ok){let e=await r.text(),t="Failed to fetch active discount";try{t=JSON.parse(e).message||t}catch{}return{success:!1,message:t}}return await r.json()}catch(e){return{success:!1,message:"Failed to fetch active discount code"}}}static async validateDiscount(e,t){try{let r=localStorage.getItem("authToken"),n=await fetch("https://jobsyn.ai/api/stripe/validate-discount",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({code:e,productType:t})});return await n.json()}catch(e){return{success:!1,message:"Failed to validate discount code"}}}static async createSubscription(e,t,r,n,o){try{let a=localStorage.getItem("authToken"),i=await fetch("https://jobsyn.ai/api/stripe/create-subscription",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({planId:e,billingCycle:t,paymentMethodId:r,selectedTool:n,discountCode:o})});return await i.json()}catch(e){return{success:!1,message:"Failed to create subscription"}}}static async updateSubscription(e,t){try{let r=localStorage.getItem("authToken"),n=await fetch("https://jobsyn.ai/api/stripe/update-subscription",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({planId:e,billingCycle:t})});return await n.json()}catch(e){return{success:!1,message:"Failed to update subscription"}}}static async cancelSubscription(e=!0){try{let t=localStorage.getItem("authToken"),r=await fetch("https://jobsyn.ai/api/stripe/cancel-subscription",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({cancelAtPeriodEnd:e})});return await r.json()}catch(e){return{success:!1,message:"Failed to cancel subscription"}}}static async reactivateSubscription(){try{let e=localStorage.getItem("authToken");if(!e)throw Error("No authentication token found");let t=await fetch("https://jobsyn.ai/api/stripe/reactivate-subscription",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}});return await t.json()}catch(e){return{success:!1,message:e instanceof Error?e.message:"Failed to reactivate subscription"}}}static async getCreditInfo(){try{let e=localStorage.getItem("authToken");if(!e)throw Error("No authentication token found");let t=await fetch("https://jobsyn.ai/api/stripe/credits",{method:"GET",headers:{Authorization:`Bearer ${e}`}});return await t.json()}catch(e){return{success:!1,message:e instanceof Error?e.message:"Failed to get credit information"}}}static async checkCredits(e){try{let t=localStorage.getItem("authToken");if(!t)throw Error("No authentication token found");let r=await fetch("https://jobsyn.ai/api/stripe/check-credits",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({feature:e})});return await r.json()}catch(e){return{success:!1,message:e instanceof Error?e.message:"Failed to check credits"}}}static async useCredits(e){try{let t=localStorage.getItem("authToken");if(!t)throw Error("No authentication token found");let r=await fetch("https://jobsyn.ai/api/stripe/use-credits",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({feature:e})});return await r.json()}catch(e){return{success:!1,message:e instanceof Error?e.message:"Failed to use credits"}}}static async getSubscriptionStatus(){try{let e=localStorage.getItem("authToken"),t=await fetch("https://jobsyn.ai/api/stripe/subscription-status",{headers:{Authorization:`Bearer ${e}`}});return await t.json()}catch(e){return{success:!1,message:"Failed to get subscription status"}}}static async getPaymentMethods(){try{let e=localStorage.getItem("authToken"),t=await fetch("https://jobsyn.ai/api/stripe/payment-methods",{headers:{Authorization:`Bearer ${e}`}});return await t.json()}catch(e){return{success:!1,message:"Failed to get payment methods"}}}static async addPaymentMethod(e){try{let t=localStorage.getItem("authToken"),r=await fetch("https://jobsyn.ai/api/stripe/add-payment-method",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({paymentMethodId:e})});return await r.json()}catch(e){return{success:!1,message:"Failed to add payment method"}}}static async removePaymentMethod(e){try{let t=localStorage.getItem("authToken"),r=await fetch(`https://jobsyn.ai/api/stripe/payment-methods/${e}`,{method:"DELETE",headers:{Authorization:`Bearer ${t}`}});return await r.json()}catch(e){return{success:!1,message:"Failed to remove payment method"}}}
1static async confirmPayment(e,t){try{let t=await this.getStripe();if(!t)throw Error("Stripe not loaded");return await t.confirmPayment({clientSecret:e,confirmParams:{return_url:`${window.location.origin}/subscription/success`}})}catch(e){throw e}}static async confirmSubscriptionSetup(e){try{let t=await this.getStripe();if(!t)throw Error("Stripe not loaded");return await t.confirmCardSetup(e,{payment_method:{card:null,billing_details:{name:"Subscription Setup"}}})}catch(e){throw e}}static async updateSubscriptionLegacy(e,t){try{let r=localStorage.getItem("authToken"),n=await fetch("https://jobsyn.ai/api/stripe/update-subscription",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({planId:e,paymentIntentId:t})});return await n.json()}catch(e){throw e}}static validatePlanBillingCycle(e,t){return({free:["one-time"],Premium:["monthly","quarterly"],pro:["monthly","quarterly"]})[e]?.includes(t)||!1}static getPlanPricing(e,t){let r={free:{oneTime:0},Premium:{monthly:39.99,quarterly:89.99},pro:{monthly:19.99,quarterly:39.99}}[e];if(!r)return{price:0};let n=r[t]||0;if("quarterly"===t&&("Premium"===e||"pro"===e)){let e=r.monthly||0,t=r.quarterly||0,n=3*e,o=n>0?Math.round((n-t)/n*100):0;return{price:t,originalPrice:n,savings:o}}return{price:n}}};e.s(["default",0,g],37707)}]);
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.