1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3769],{4149:function(e,t,a){a.d(t,{Z:function(){return N}});var n=a(20550),i=a(2081),l=a(51403),r=a(16660),o=a(34166),s=a(19226),c=a(65718),d=a(43857),m=a(18895),u=function(e,t){var a;return function(){for(var n=arguments.length,i=Array(n),l=0;l<n;l++)i[l]=arguments[l];var r=this;a&&clearTimeout(a),a=setTimeout(function(){a=null,e.apply(r,i)},t)}},x=a(94511),p=a(95855),_=a(9669),f=a.n(_),v=a(88026);function N(e){var t=(0,d.Z)(),a=t.t;t.lang;var _,N=(0,r.useState)(""),h=N[0],g=N[1],I=(0,r.useState)(""),E=I[0],A=I[1],L=(0,r.useState)(""),b=L[0],j=L[1],y=(0,r.useState)(!1),w=y[0],R=y[1],P=(0,r.useRef)(null);(0,o.Z)(P,e.setEmailPopup);var C,O,M=(_=(0,n.Z)(function(e){return(0,i.__generator)(this,function(t){return A(""),(0,s.o)(e)?g(e):(g(""),A(a("common:LOGIN_MODAL_ERROR_INVALID_EMAIL"))),[2]})}),function(e){return _.apply(this,arguments)}),F=(0,r.useCallback)(u(M,1e3),[]),S=(C=(0,n.Z)(function(){var t,a,n,l,r;return(0,i.__generator)(this,function(i){switch(i.label){case 0:return R(!0),n=(navigator.language||navigator.userLanguage).toLowerCase(),l=Math.random().toString(36).slice(2),[4,(0,m.oO)(h,l,n)];case 1:return(r=i.sent()).error&&(A(r.error),R(!1)),j(null==r?void 0:null===(t=r.data)||void 0===t?void 0:t.subscription_status),(null==r?void 0:null===(a=r.data)||void 0===a?void 0:a.subscription_status)!=="active"&&e.onSubmit(h),R(!1),[2]}})}),function(){return C.apply(this,arguments)}),T=(O=(0,n.Z)(function(){var t,n;return(0,i.__generator)(this,function(i){switch(i.label){case 0:return t="https://magicstudio.com"+f().pathname,[4,(0,m.wd)(h,t)];case 1:if((n=i.sent()).error)return A(a("common:LOGIN_MODAL_ERROR_API")),[2];return f().push({pathname:"/login",query:{requestId:n.data.login_request_id,origin_url:t,email:h,from:e.app}}),[2]}})}),function(){return O.apply(this,arguments)});return(0,l.jsx)("div",{className:"".concat(e.emailOpen?"block":"hidden"," transition-opacity ease-linear overflow-y-auto overflow-x-hidden w-full h-full inset-0 fixed z-40 bg-neutral-900 bg-opacity-90"),children:(0,l.jsx)("div",{className:"h-full md:h-modal transition-transform relative z-50 w-auto max-w-lg md:my-8 mx-auto flex items-center",children:(0,l.jsxs)("div",{ref:P,className:"relative max-h-full bg-white overflow-hidden bg-clip-padding shadow-lg rounded-lg w-full flex flex-col justify-start items-center",children:[(0,l.jsx)("div",{className:(0,v.Z)("bg-gradient-to-r from-".concat(e.app,"-gradient-start via-").concat(e.app,"-gradient-middle to-").concat(e.app,"-gradient-end h-2 w-full"))}),(0,l.jsxs)("div",{className:"py-8 overflow-y-auto px-12 md:px-16 flex flex-col items-center w-full relative",children:[(0,l.jsx)("div",{className:"absolute top-4 right-4 md:top-8 md:right-8 p-2 cursor-pointer hover:bg-neutral-100 rounded-lg",onClick:function(){return e.setEmailPopup(!1)},children:(0,l.jsx)(x.F,{className:"text-primary text-2xl"})}),"active"===b?(0,l.jsxs)("div",{className:"max-w-md w-full flex flex-col items-left mt-4 md:mt-8",children:[(0,l.jsx)("div",{className:"mb-4 relative text-center",children:(0,l.jsx)("img",{src:"https://".concat("meta.magicstudio.com/assets","/pro-crown-sparkles.svg"),className:"w-14 inline-block",alt:"Upgrade"})}),(0,l.jsx)(p.aC,{text:a("common:EMAIL_BEFORE_PAYMENT_MODAL_ALREADY_SUBSCRIBED_TITLE")}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(p.Cd,{text:"".concat(a("common:EMAIL_BEFORE_PAYMENT_MODAL_ALREADY_SUBSCRIBED_SUBTITLE_PREFIX")).concat(h).concat(a("common:EMAIL_BEFORE_PAYMENT_MODAL_ALREADY_SUBSCRIBED_SUBTITLE_SUFFIX"))})}),(0,l.jsx)(c.PrimaryButtonFullWidth,{text:a("common:LOGIN_CTA_BUTTON"),onClick:T,classes:"mt-6"}),(0,l.jsx)(c.SecondaryButtonFullWidth,{text:a("common:EMAIL_BEFORE_PAYMENT_MODAL_ALREADY_SUBSCRIBED_CHANGE_EMAIL_CTA"),classes:"mt-4",onClick:function(){j(""),g("")}}),(0,l.jsxs)("p",{className:"text-sm antialiased font-medium text-primary mt-6 mb-4 text-center cursor-pointer",onClick:function(){return window.location="mailto:[email protected]"},children:[a("common:EMAIL_BEFORE_PAYMENT_MODAL_ALREADY_SUBSCRIBED_NEED_HELP")," ",(0,l.jsx)("span",{className:(0,v.Z)("bg-clip-text box-decoration-clone text-transparent bg-gradient-to-r from-".concat(e.app,"-gradient-start via-").concat(e.app,"-gradient-middle to-").concat(e.app,"-gradient-end text-sm font-bold antialiased cursor-pointer whitespace-nowrap")),children:a("common:EMAIL_BEFORE_PAYMENT_MODAL_ALREADY_SUBSCRIBED_CONTACT_CTA")})]})]}):(0,l.jsxs)("div",{className:"w-full flex flex-col items-center mt-4 md:mt-8 relative",children:[(0,l.jsxs)("div",{className:"mb-4 relative -rotate-12",children:[(0,l.jsx)("i",{className:"isax isax-sms text-3xl text-primary"}),(0,l.jsx)("i",{className:(0,v.Z)("icon-sparkles absolute -top-3 -left-5 text-".concat(e.app,"-gradient-end rotate-45 text-sm"))}),(0,l.jsx)("i",{className:(0,v.Z)("icon-sparkles absolute -bottom-1 -right-4 text-".concat(e.app,"-gradient-end rotate-90 text-sm"))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(p.aC,{text:a("common:EMAIL_BEFORE_PAYMENT_MODAL_EMAIL_FORM_TITLE")}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(p.Cd,{text:a("common:EMAIL_BEFORE_PAYMENT_MODAL_EMAIL_FORM_
1SUBTITLE")})}),(0,l.jsx)("input",{id:"email-input",className:"".concat(E?"border-red-400":"border-primary-light"," mb-4 mt-6 border w-full px-6 rounded-lg antialiased text-primary font-normal focus:outline-none py-3 placeholder:font-light"),type:"email",placeholder:a("common:EMAIL_BEFORE_PAYMENT_MODAL_EMAIL_FORM_PLACEHOLDER"),onChange:function(e){return F(e.target.value)},required:!0}),(0,l.jsx)(c.PrimaryButtonFullWidth,{text:a("common:EMAIL_BEFORE_PAYMENT_MODAL_EMAIL_FORM_CTA"),onClick:S,disabled:0===h.length||0!==E.length||w}),(0,l.jsxs)("p",{className:"text-sm antialiased font-medium text-primary mt-6 mb-4 text-center cursor-pointer",onClick:function(){return f().push({pathname:"/login",query:{origin_url:"https://magicstudio.com"+f().pathname,from:e.app}})},children:["active"===b?"You are already on the PRO plan.":a("common:UPGRADE_NUDGE_LOGIN_QUESTION")," ",(0,l.jsx)("span",{className:"bg-clip-text box-decoration-clone text-transparent bg-gradient-to-r from-".concat(e.app||"magicstudio","-gradient-start to-").concat(e.app||"magicstudio","-gradient-end via-").concat(e.app,"-gradient-middle text-sm font-bold antialiased cursor-pointer whitespace-nowrap"),children:a("common:LOGIN_MODAL_BUTTON_CTA")})]}),E&&(0,l.jsx)("p",{className:"text-rose-400 absolute -bottom-5 text-xs antialiased font-medium text-center w-full",children:E})]})]})]})]})})})}},79457:function(e,t,a){a.d(t,{Cf:function(){return r},fX:function(){return c},rU:function(){return s},rY:function(){return o}});var n=a(51403);a(16660);var i=a(88026),l=a(43857);function r(e){var t,a,r,o,s=(0,l.Z)().t;return(0,n.jsxs)("div",{className:(0,i.Z)("".concat(e.recommended?"border-".concat(e.app?e.app:"magicstudio","-gradient-end"):"border-primary-light/50"," max-w-xs w-full rounded-xl border pr-2 sm:pr-4 py-3 sm:py-4 grid grid-cols-3 bg-white antialiased group ").concat(e.isLoading?"cursor-not-allowed":"cursor-pointer")),onClick:e.isLoading?null:e.openCheckout,children:[(0,n.jsxs)("div",{className:"col-span-1 flex flex-col items-center justify-between",children:[(0,n.jsx)("p",{className:"text-lg sm:text-xl antialiased font-bold text-primary",children:null==e?void 0:e.plan.time_period}),(0,n.jsx)("p",{className:"text-[0.625rem] antialiased text-primary uppercase font-semibold tracking-wider",children:s((null==e?void 0:e.plan.time_period)==="1"?"common:PRICING_PACK_MONTH_SUFFIX":"common:PRICING_PACK_MONTHS_SUFFIX")})]}),(0,n.jsxs)("div",{className:"col-span-2 flex flex-col justify-between",children:[(0,n.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,n.jsxs)("p",{className:"text-lg sm:text-xl text-primary font-bold antialiased",children:[null==e?void 0:null===(t=e.plan)||void 0===t?void 0:t.currency," ",null==e?void 0:null===(a=e.plan)||void 0===a?void 0:a.price_value]}),(0,n.jsx)("div",{className:"flex flex-row justify-end items-center",children:(0,n.jsxs)("p",{className:"".concat((null==e?void 0:e.plan.discount)?"visible":"invisible"," text-[0.625rem] font-medium antialiased text-primary rounded-full bg-caper bg-opacity-80 py-0.5 px-1.5 max-w-fit"),children:[s("common:PRICING_PLAN_SAVE_PREFIX"),null==e?void 0:e.plan.discount,"%",s("common:PRICING_PLAN_SAVE_SUFFIX")]})})]}),(0,n.jsxs)("div",{className:"flex flex-row justify-between items-end",children:[(null==e?void 0:e.plan.monthly_price_value)&&(0,n.jsxs)("p",{className:"text-xs text-primary font-normal antialiased",children:[null==e?void 0:null===(r=e.plan)||void 0===r?void 0:r.currency," ",null==e?void 0:null===(o=e.plan)||void 0===o?void 0:o.monthly_price_value," ",s("common:PRICING_PLAN_MONTHLY_PRICE_SUFFIX")]}),(0,n.jsx)("i",{className:(0,i.Z)("".concat(e.recommended?"text-".concat(e.app?e.app:"magicstudio","-gradient-end"):"text-primary"," text-end isax isax-arrow-right-1 text-xl translate-x-0 group-hover:translate-x-2 transition-transform duration-300"))})]})]})]})}function o(e){var t,a,r=(0,l.Z)().t;return(0,n.jsxs)("div",{className:"border-primary-light/50 max-w-xs w-full rounded-xl border py-4 px-4 bg-white antialiased group ".concat(e.isLoading?"cursor-not-allowed":"cursor-pointer"),onClick:e.isLoading?null:e.openCheckout,children:[(0,n.jsxs)("div",{className:"flex flex-row items-center justify-between",children:[(0,n.jsx)("p",{className:"text-base font-semibold capitalize",children:r("common:PRICING_PERIOD_MONTHLY")}),(null==e?void 0:null===(t=e.plan)||void 0===t?void 0:t.discount)&&(0,n.jsxs)("p",{className:"text-[0.625rem] font-medium antialiased text-primary rounded-full bg-caper bg-opacity-80 py-0.5 px-1.5 max-w-fit",children:[r("common:PRICING_PLAN_SAVE_PREFIX"),null==e?void 0:null===(a=e.plan)||void 0===a?void 0:a.discount,"%",r("common:PRICING_PLAN_SAVE_SUFFIX")]})]}),(0,n.jsxs)("div",{className:"flex flex-row items-center justify-between mt-2",children:[(0,n.jsxs)("div",{className:"flex flex-row items-baseline",children:[(0,n.jsxs)("p",{className:"text-xl text-primary font-bold antialiased",children:[null==e?void 0:e.plan.currency," ",null==e?void 0:e.plan.price_value]}),(0,n.jsx)("p",{className:"text-xs text-primary font-normal antialiased ml-1",children:r("common:PRICING_PLAN_MONTHLY_PRICE_SUFFIX")})]}),(0,n.jsx)("i",{className:(0,i.Z)(" text-primary text-end isax isax-arrow-right-1 text-xl translate-x-0 group-hover:translate-x-2 transition-transform duration-300")})]})]})}function s(e){var t,a,r,o,s,c,d=(0,l.Z)().t;return(0,n.jsxs)("div",{className:(0,i.Z)("border-".concat(e.app?e.app:"magicstudio","-gradient-end max-w-xs w-full rounded-xl border py-4 px-4 bg-white antialiased group relative ").concat(e.isLoading?"curs
1or-not-allowed":"cursor-pointer")),onClick:e.isLoading?null:e.openCheckout,children:[(0,n.jsxs)("div",{className:"text-[0.5rem] font-semibold text-white antialiased bg-gradient-end-color px-1.5 py-1 absolute max-w-fit rounded top-0 -translate-y-1/2 left-1/2 -translate-x-1/2 flex items-center justify-center",children:[(0,n.jsx)("i",{className:"isax isax-flash-15 text-[#FFC940] text-[0.625rem] mr-0.5"}),d("common:PRICING_POPULAR_BADGE")]}),(0,n.jsxs)("div",{className:"flex flex-row items-center justify-between",children:[(0,n.jsx)("p",{className:"text-base font-semibold capitalize",children:d("common:PRICING_PERIOD_YEARLY")}),(null==e?void 0:null===(t=e.plan)||void 0===t?void 0:t.discount)&&(0,n.jsxs)("p",{className:"text-[0.625rem] font-medium antialiased text-primary rounded-full bg-caper bg-opacity-80 py-0.5 px-1.5 max-w-fit",children:[d("common:PRICING_PLAN_SAVE_PREFIX"),null==e?void 0:null===(a=e.plan)||void 0===a?void 0:a.discount,"%",d("common:PRICING_PLAN_SAVE_SUFFIX")]})]}),(0,n.jsx)("div",{className:"flex flex-row items-center justify-between mt-2",children:(0,n.jsxs)("div",{className:"flex flex-row items-baseline",children:[(0,n.jsxs)("p",{className:"text-xl text-primary font-bold antialiased",children:[null==e?void 0:null===(r=e.plan)||void 0===r?void 0:r.currency," ",null==e?void 0:null===(o=e.plan)||void 0===o?void 0:o.price_value]}),(0,n.jsx)("p",{className:"text-xs text-primary font-normal antialiased ml-1",children:d("common:PRICING_PLAN_MONTHLY_PRICE_SUFFIX")})]})}),(0,n.jsxs)("div",{className:"flex flex-row items-center justify-between mt-1",children:[(0,n.jsx)("p",{className:"text-xs text-primary font-normal antialiased",children:d("common:PRICING_PLAN_YEARLY_BILLING_PREFIX")+(null==e?void 0:null===(s=e.plan)||void 0===s?void 0:s.currency)+" "+(null==e?void 0:null===(c=e.plan)||void 0===c?void 0:c.annual_price_value)+" "+d("common:PRICING_PLAN_YEARLY_BILLING_SUFFIX")}),(0,n.jsx)("i",{className:(0,i.Z)(" text-".concat(e.app?e.app:"magicstudio","-gradient-end text-end isax isax-arrow-right-1 text-xl translate-x-0 group-hover:translate-x-2 transition-transform duration-300"))})]})]})}function c(e){var t,a,r,o,s,c,d=(0,l.Z)().t;return(0,n.jsxs)("div",{className:"border-primary-light/50 max-w-xs w-full rounded-xl border py-4 px-4 bg-white antialiased group ".concat(e.isLoading?"cursor-not-allowed":"cursor-pointer"),onClick:e.isLoading?null:e.openCheckout,children:[(0,n.jsxs)("div",{className:"flex flex-row items-center justify-between",children:[(0,n.jsx)("p",{className:"text-base font-semibold capitalize",children:d("common:PRICING_PERIOD_6_MONTHLY")}),(null==e?void 0:null===(t=e.plan)||void 0===t?void 0:t.discount)&&(0,n.jsxs)("p",{className:"text-[0.625rem] font-medium antialiased text-primary rounded-full bg-caper bg-opacity-80 py-0.5 px-1.5 max-w-fit",children:[d("common:PRICING_PLAN_SAVE_PREFIX"),null==e?void 0:null===(a=e.plan)||void 0===a?void 0:a.discount,"%",d("common:PRICING_PLAN_SAVE_SUFFIX")]})]}),(0,n.jsx)("div",{className:"flex flex-row items-center justify-between mt-2",children:(0,n.jsxs)("div",{className:"flex flex-row items-baseline",children:[(0,n.jsxs)("p",{className:"text-xl text-primary font-bold antialiased",children:[null==e?void 0:null===(r=e.plan)||void 0===r?void 0:r.currency," ",null==e?void 0:null===(o=e.plan)||void 0===o?void 0:o.price_value]}),(0,n.jsx)("p",{className:"text-xs text-primary font-normal antialiased ml-1",children:d("common:PRICING_PLAN_MONTHLY_PRICE_SUFFIX")})]})}),(0,n.jsxs)("div",{className:"flex flex-row items-center justify-between mt-1",children:[(0,n.jsx)("p",{className:"text-xs text-primary font-normal antialiased",children:d("common:PRICING_PLAN_6_MONTHLY_BILLING_PREFIX")+(null==e?void 0:null===(s=e.plan)||void 0===s?void 0:s.currency)+" "+(null==e?void 0:null===(c=e.plan)||void 0===c?void 0:c.annual_price_value)+" "+d("common:PRICING_PLAN_6_MONTHLY_BILLING_SUFFIX")}),(0,n.jsx)("i",{className:(0,i.Z)(" text-primary text-end isax isax-arrow-right-1 text-xl translate-x-0 group-hover:translate-x-2 transition-transform duration-300")})]})]})}},99122:function(e,t,a){a.d(t,{M:function(){return i}});var n=a(41825);function i(){return(0,n.q3)("999-vs-1999-usd-cny-price")}},19226:function(e,t,a){a.d(t,{o:function(){return n}});function n(e){return String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)}}}]);
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.