{"version":3,"file":"DynamicPricing.DpBAJus8.mjs","names":[],"sources":["https:/framerusercontent.com/modules/DWy8nFx1JiWtzbCWAq3T/LU0fGJuAAiOAao2eWP9L/DynamicPricing.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useLocaleInfo,useObserveData}from\"framer\";const baseUrl=\"https://app.jurilo.ch/v1/checkout\";const getLang=activeLocale=>{const code=activeLocale?.code?.toLowerCase()||\"\";if(code.startsWith(\"de\"))return\"de\";if(code.startsWith(\"fr\"))return\"fr\";return\"en\";};const postRedirect=(url,params)=>{const queryString=Object.entries(params).map(([key,value])=>`${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join(\"&\");console.log(\"Redirecting to:\",`${url}?${queryString}`);const form=document.createElement(\"form\");form.method=\"POST\";form.action=`${url}?${queryString}`;Object.entries(params).forEach(([key,value])=>{const input=document.createElement(\"input\");input.type=\"hidden\";input.name=key;input.value=value;form.appendChild(input);});document.body.appendChild(form);form.submit();};export function withSignupHandoff(Component){return props=>{const{activeLocale}=useLocaleInfo();const{valueOf}=useObserveData();const getLang=()=>{const code=activeLocale?.code?.toLowerCase()||\"\";if(code.startsWith(\"de\"))return\"de\";if(code.startsWith(\"fr\"))return\"fr\";return\"en\";};const lang=getLang();const variant=props.variant||\"\";const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}const params={lang};if(variant===\"Monthly\"){params.plan_frequency=\"Monthly\";}else if(variant===\"Yearly\"){params.plan_frequency=\"Yearly\";}else if(variant===\"Free\"){params.plan_frequency=\"Free\";}postRedirect(baseUrl,params);};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withMonthlyHandoff(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"monthly\",plan_category:\"business\",recurring_plan:\"unlimited\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withYearlyHandoff(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"yearly\",plan_category:\"business\",recurring_plan:\"unlimited\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withFreeHandoff(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"monthly\",plan_category:\"business\",recurring_plan:\"10_ques\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withMonthlyHandoffStart(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"monthly\",plan_category:\"business\",recurring_plan:\"10_ques\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withMonthlyHandoffPro(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"monthly\",plan_category:\"business\",recurring_plan:\"unlimited\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withMonthlyHandoffTax(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"monthly\",plan_category:\"business\",recurring_plan:\"jurilo_tax_only\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withMonthlyHandoffEnterprise(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"monthly\",plan_category:\"business\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withYearlyHandoffStart(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"yearly\",plan_category:\"business\",recurring_plan:\"10_ques\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withYearlyHandoffPro(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"yearly\",plan_category:\"business\",recurring_plan:\"unlimited\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withYearlyHandoffBusiness(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"yearly\",plan_category:\"business\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withYearlyHandoffTax(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"yearly\",plan_category:\"business\",recurring_plan:\"jurilo_tax_only\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withYearlyHandoffStart\":{\"type\":\"reactHoc\",\"name\":\"withYearlyHandoffStart\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMonthlyHandoffPro\":{\"type\":\"reactHoc\",\"name\":\"withMonthlyHandoffPro\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYearlyHandoffTax\":{\"type\":\"reactHoc\",\"name\":\"withYearlyHandoffTax\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSignupHandoff\":{\"type\":\"reactHoc\",\"name\":\"withSignupHandoff\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMonthlyHandoffStart\":{\"type\":\"reactHoc\",\"name\":\"withMonthlyHandoffStart\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYearlyHandoff\":{\"type\":\"reactHoc\",\"name\":\"withYearlyHandoff\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMonthlyHandoffEnterprise\":{\"type\":\"reactHoc\",\"name\":\"withMonthlyHandoffEnterprise\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMonthlyHandoffTax\":{\"type\":\"reactHoc\",\"name\":\"withMonthlyHandoffTax\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYearlyHandoffPro\":{\"type\":\"reactHoc\",\"name\":\"withYearlyHandoffPro\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFreeHandoff\":{\"type\":\"reactHoc\",\"name\":\"withFreeHandoff\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMonthlyHandoff\":{\"type\":\"reactHoc\",\"name\":\"withMonthlyHandoff\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYearlyHandoffBusiness\":{\"type\":\"reactHoc\",\"name\":\"withYearlyHandoffBusiness\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicPricing.map"],"mappings":"sJAAmkD,SAAgB,EAAmB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,gBAAc,EAAc,EAAQ,EAAK,EAAQ,CAAY,EAAQ,EAAe,GAAG,CAAI,IAAG,EAAE,eAAe,EAAE,EAAE,gBAAgB,GAAG,EAAa,EAAQ,CAAC,OAAK,eAAe,UAAU,cAAc,WAAW,eAAe,WAAW,CAAC,CAAE,EAAE,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,SAAS,EAAe,QAAQ,EAAe,MAAM,CAAC,OAAO,UAAU,MAAM,MAAM,CAAC,CAAC,CAAE,CAAE,CAAC,SAAgB,EAAkB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,gBAAc,EAAc,EAAQ,EAAK,EAAQ,CAAY,EAAQ,EAAe,GAAG,CAAI,IAAG,EAAE,eAAe,EAAE,EAAE,gBAAgB,GAAG,EAAa,EAAQ,CAAC,OAAK,eAAe,SAAS,cAAc,WAAW,eAAe,WAAW,CAAC,CAAE,EAAE,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,SAAS,EAAe,QAAQ,EAAe,MAAM,CAAC,OAAO,UAAU,MAAM,MAAM,CAAC,CAAC,CAAE,CAAE,CAAu3B,SAAgB,EAAsB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,gBAAc,EAAc,EAAQ,EAAK,EAAQ,CAAY,EAAQ,EAAe,GAAG,CAAI,IAAG,EAAE,eAAe,EAAE,EAAE,gBAAgB,GAAG,EAAa,EAAQ,CAAC,OAAK,eAAe,UAAU,cAAc,WAAW,eAAe,WAAW,CAAC,CAAE,EAAE,OAAoB,EAAK,EAAU,CAAC,G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