PageSourceSearch

https://www.facialexpressionchanger.com/_next/static/chunks/app/%5…/(default)/pricing/page-6ef01d070b81d82b.js

js facialexpressionchanger.com collected 2026-10-08 23:36:11 UTC 17,041 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6179],{2183:(e,t,r)=>{"use strict";r.d(t,{default:()=>a});var n=r(73220);let s={Ri:r(91746)};function a(e){let{name:t,className:r,onClick:a}=e,i=function(e){let t=s[e.slice(0,2)];return t&&t[e]||null}(t);return i?(0,n.jsx)(i,{className:r,onClick:a,style:{cursor:a?"pointer":"default"}}):null}},5010:(e,t,r)=>{"use strict";var n=r(87078);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},7005:(e,t,r)=>{"use strict";r.d(t,{default:()=>h});var n=r(73220),s=r(87185),a=r(53664),i=r(7985),o=r(34184),l=r(32587),c=r(22594),u=r(2183),d=r(22152),p=r(60296),m=r(35063),f=r(49924),g=r(16755);function h(e){var t,r,h,v,x;let{pricing:b}=e;if(b.disabled)return null;let{user:y,setShowSignModal:j}=(0,f.U)(),[w,N]=(0,o.useState)(null===(r=b.groups)||void 0===r?void 0:null===(t=r[0])||void 0===t?void 0:t.name),[_,k]=(0,o.useState)(!1),[S,C]=(0,o.useState)(null),P=async function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{if(!y){j(!0);return}if(k(!0),C(e.product_id),"free_plan"===e.product_id||0===e.amount){m.oR.info("Free plan is already active!"),k(!1),C(null);return}let t="starter_monthly"===e.product_id?g.$S.Starter:"premium_monthly"===e.product_id?g.$S.Premium:null;if(!t){m.oR.error("Invalid subscription plan"),k(!1),C(null);return}let r="https://facialexpressionchanger.com",n=await fetch("/api/create-subscription-checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({targetPlan:t,currentPlan:g.$S.Free,successUrl:"".concat(r,"/en?success=true"),cancelUrl:"".concat(r,"/en/pricing?canceled=true")})});if(401===n.status){k(!1),C(null),j(!0);return}let{code:s,message:a,data:i}=await n.json();if(0!==s){m.oR.error(a);return}let{public_key:o,session_id:l}=i,c=await (0,p.c)(o);if(!c){m.oR.error("checkout failed");return}let u=await c.redirectToCheckout({sessionId:l});u.error&&m.oR.error(u.error.message)}catch(e){console.log("checkout failed: ",e),m.oR.error("checkout failed")}finally{k(!1),C(null)}};return(0,o.useEffect)(()=>{b.items&&(N(b.items[0].group),C(b.items[0].product_id),k(!1))},[b.items]),(0,n.jsx)("section",{id:b.name,className:"py-16",children:(0,n.jsxs)("div",{className:"container",children:[(0,n.jsxs)("div",{className:"mx-auto mb-12 text-center",children:[(0,n.jsx)("h2",{className:"mb-4 text-4xl font-semibold lg:text-5xl text-gray-100",children:b.title}),(0,n.jsx)("p",{className:"text-gray-400 lg:text-lg",children:b.description})]}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[b.groups&&b.groups.length>0&&(0,n.jsx)("div",{className:"flex h-12 mb-12 items-center rounded-md bg-gray-800/50 backdrop-blur-sm border border-gray-700 p-1 text-lg",children:(0,n.jsx)(i.z,{value:w,className:"h-full grid-cols-".concat(b.groups.length),onValueChange:e=>{N(e)},children:b.groups.map((e,t)=>(0,n.jsxs)("div",{className:'h-full rounded-md transition-all has-[button[data-state="checked"]]:bg-purple-600',children:[(0,n.jsx)(i.C,{value:e.name||"",id:e.name,className:"peer sr-only"}),(0,n.jsxs)(d.J,{htmlFor:e.name,className:"flex h-full cursor-pointer items-center justify-center px-7 font-semibold text-gray-400 peer-data-[state=checked]:text-white",children:[e.title,e.label&&(0,n.jsx)(l.E,{variant:"outline",className:"border-purple-400 bg-purple-600 px-1.5 ml-1 text-white",children:e.label})]})]},t))})}),(0,n.jsx)("div",{className:"md:min-w-96 mt-0 grid gap-6 md:grid-cols-".concat(null===(v=b.items)||void 0===v?void 0:null===(h=v.filter(e=>!e.group||e.group===w))||void 0===h?void 0:h.length),children:null===(x=b.items)||void 0===x?void 0:x.map((e,t)=>e.group&&e.group!==w?null:(0,n.jsx)("div",{className:"rounded-lg p-6 backdrop-blur-sm shadow-xl transition-all duration-300 hover:scale-[1.02] ".concat(e.is_featured?"border-purple-500/50 border-2 bg-gradient-to-br from-purple-900/30 to-pink-900/30 text-gray-100":"border-gray-700 border bg-gray-800/50 text-gray-100"),children:(0,n.jsxs)("div",{className:"flex h-full flex-col justify-between gap-5",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[e.title&&(0,n.jsx)("h3",{className:"text-xl font-semibold text-gray-100",children:e.title}),(0,n.jsx)("div",{className:"flex-1"}),e.label&&(0,n.jsx)(l.E,{variant:"outline",className:"border-purple-400 bg-purple-600 px-1.5 text-white",children:e.label})]}),(0,n.jsxs)("div",{className:"flex items-end gap-2 mb-4",children:[e.original_price&&(0,n.jsx)("span",{className:"text-xl text-gray-500 font-semibold line-through",children:e.original_price}),e.price&&(0,n.jsx)("span",{className:"text-5xl font-semibold text-gray-100",children:e.price}),e.unit&&(0,n.jsx)("span",{className:"block font-semibold text-gray-300",children:e.unit})]}),e.description&&(0,n.jsx)("p",{className:"text-gray-400",children:e.description}),e.features_title&&(0,n.jsx)("p",{className:"mb-3 mt-6 font-semibold text-gray-200",children:e.features_title}),e.features&&(0,n.jsx)("ul",{className:"flex flex-col gap-3",children:e.features.map((e,t)=>(0,n.jsxs)("li",{className:"flex gap-2 text-gray-300",children:[(0,n.jsx)(s.A,{className:"mt-1 size-4 shrink-0 text-purple-400"}),e]},"feature-".concat(t)))})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[e.cn_amount&&e.cn_amount>0?(0,n.jsxs)("div",{className:"flex items-center gap-x-2 mt-2",children:[(0,n.jsx)("span",{className:"text-sm",children:"人民币支付 \uD83D\uDC49"}),(0,n.jsx)("div",{className:"inline-block p-2 hover:cursor-pointer hover:bg-base-200 rounded-md",onClick:()=>{!_&&P(e,!0)},children:(0,n.jsx)("img",{src:"/imgs/cnpay.png",alt:"cnpay",className:"w-20 h-10 rounded-lg"})})]}):null,e.button&&(0,n.jsxs)(c.$,{className:"w-full flex items-center justify-center gap-2 font-semibold ".concat(e.is_featured?"bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 text-white":"bg-gray-700 hover:bg-gray-600 text-gray-100"),disabled:_,onClick:()=>{!_&&P(e)},children:[(!_||_&&S!==e.product_id)&&(0,n.jsx)("p",{children:e.button.title}),_&&S===e.product_id&&(0,n.jsx)("p",{children:e.button.title}),_&&S===e.product_id&&(0,n.jsx)(a.A,{className:"mr-2 h-4 w-4 animate-spin"}),e.button.icon&&(0,n.jsx)(u.default,{name:e.button.icon,className:"size-4"})]}),e.tip&&(0,n.jsx)("p",{className:"text-gray-400 text-sm mt-2",children:e.tip})]})]})},t))})]})]})})}},7985:(e,t,r)=>{"use strict";r.d(t,{C:()=>c,z:()=>l});var n=r(73220),s=r(34184),a=r(55804),i=r(79151),o=r(85425);let l=s.forwardRef((e,t)=>
1{let{className:r,...s}=e;return(0,n.jsx)(a.bL,{className:(0,o.cn)("grid gap-2",r),...s,ref:t})});l.displayName=a.bL.displayName;let c=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)(a.q7,{ref:t,className:(0,o.cn)("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),...s,children:(0,n.jsx)(a.C1,{className:"flex items-center justify-center",children:(0,n.jsx)(i.A,{className:"h-2.5 w-2.5 fill-current text-current"})})})});c.displayName=a.q7.displayName},16755:(e,t,r)=>{"use strict";r.d(t,{$S:()=>n,QB:()=>s,it:()=>a});var n=function(e){return e.Free="free",e.Starter="starter",e.Premium="premium",e}({}),s=function(e){return e.Created="subscription_created",e.Updated="subscription_updated",e.Renewed="subscription_renewed",e.Canceled="subscription_canceled",e.CancelRequested="subscription_cancel_requested",e.UpgradeRequested="subscription_upgrade_requested",e.DowngradeRequested="subscription_downgrade_requested",e.PaymentFailed="subscription_payment_failed",e}({}),a=function(e){return e.Active="active",e.Canceled="canceled",e.PastDue="past_due",e.Incomplete="incomplete",e.IncompleteExpired="incomplete_expired",e.Trialing="trialing",e.Unpaid="unpaid",e}({})},21283:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var n=r(73220),s=r(34184),a=r(5010),i=r(35063);function o(){let e=(0,a.useRouter)(),t=(0,a.useSearchParams)();return(0,s.useEffect)(()=>{let r=t.get("success"),n=t.get("canceled");if("true"===r){i.oR.success("Subscription activated successfully! You can now enjoy premium features.");let t=window.location.pathname;e.replace(t)}else if("true"===n){i.oR.info("Subscription process cancelled");let t=window.location.pathname;e.replace(t)}},[t,e]),null}function l(){return(0,n.jsx)(s.Suspense,{fallback:null,children:(0,n.jsx)(o,{})})}},22152:(e,t,r)=>{"use strict";r.d(t,{J:()=>c});var n=r(73220),s=r(34184),a=r(72852),i=r(36746),o=r(85425);let l=(0,i.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)(a.b,{ref:t,className:(0,o.cn)(l(),r),...s})});c.displayName=a.b.displayName},22594:(e,t,r)=>{"use strict";r.d(t,{$:()=>c,r:()=>l});var n=r(73220),s=r(34184),a=r(55840),i=r(36746),o=r(85425);let l=(0,i.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=s.forwardRef((e,t)=>{let{className:r,variant:s,size:i,asChild:c=!1,...u}=e,d=c?a.DX:"button";return(0,n.jsx)(d,{className:(0,o.cn)(l({variant:s,size:i,className:r})),ref:t,...u})});c.displayName="Button"},32587:(e,t,r)=>{"use strict";r.d(t,{E:()=>o});var n=r(73220);r(34184);var s=r(36746),a=r(85425);let i=(0,s.F)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:r,...s}=e;return(0,n.jsx)("div",{className:(0,a.cn)(i({variant:r}),t),...s})}},38478:(e,t,r)=>{"use strict";r.d(t,{PW:()=>a,np:()=>i,pr:()=>s});var n=r(38765);let s=e=>{let t=localStorage.getItem(e);if(!t)return null;let r=t.split(":");if(!r||r.length<2)return null;let s=Number(r[0]),a=(0,n.lg)();if(-1!==s&&s<a)return i(e),null;let o=r[0]+":";return t.replace(o,"")},a=(e,t,r)=>{localStorage.setItem(e,r+":"+t)}
1,i=e=>{localStorage.removeItem(e)}},38765:(e,t,r)=>{"use strict";r.d(t,{lg:()=>n});let n=()=>Date.parse(new Date().toUTCString())/1e3},39937:(e,t,r)=>{"use strict";r.d(t,{wD:()=>n});let n={Theme:"THEME",InviteCode:"INVITE_CODE"}},49924:(e,t,r)=>{"use strict";r.d(t,{AppContextProvider:()=>f,U:()=>m});var n=r(73220),s=r(34184),a=r(38478),i=r(39937),o=r(54526),l=r.n(o),c=r(66687),u=r.n(c),d=r(35990);let p=(0,s.createContext)({}),m=()=>(0,s.useContext)(p),f=e=>{let{children:t}=e;!function(){let{data:e,status:t}=(0,d.wV)(),r=async function(){u()({client_id:"258569507873-cr3cskovmogt8576b9q3985m7j41r7gr.apps.googleusercontent.com",auto_select:!1,cancel_on_tap_outside:!1,context:"signin"},e=>{console.log("onetap login ok",e),a(e.credential)})},a=async function(e){console.log("signIn ok",await (0,d.Jv)("google-one-tap",{credential:e,redirect:!1}))};(0,s.useEffect)(()=>{if("unauthenticated"===t){r();let e=setInterval(()=>{r()},3e3);return()=>{clearInterval(e)}}},[t]),n.Fragment}();let{data:r}=(0,d.wV)(),[o,c]=(0,s.useState)(()=>"light"),[m,f]=(0,s.useState)(!1),[g,h]=(0,s.useState)(!1),[v,x]=(0,s.use
1State)(!1),[b,y]=(0,s.useState)({currentCredits:0,creditsRequired:1}),[j,w]=(0,s.useState)(null),N=async function(){try{let e=await fetch("/api/get-user-info",{method:"POST"});if(!e.ok)throw Error("fetch user info failed with status: "+e.status);let{code:t,message:r,data:n}=await e.json();if(0!==t)throw Error(r);w(n),_(n)}catch(e){console.log("fetch user info failed")}},_=async e=>{try{if(e.invited_by){console.log("user already been invited",e.invited_by);return}let t=(0,a.pr)(i.wD.InviteCode);if(!t)return;let r=l()(e.created_at).unix(),n=l()().unix(),s=Number(n-r);if(s<=0||s>7200){console.log("user created more than 2 hours");return}console.log("update invite",t,e.uuid);let o={invite_code:t,user_uuid:e.uuid},c=await fetch("/api/update-invite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!c.ok)throw Error("update invite failed with status: "+c.status);let{code:u,message:d,data:p}=await c.json();if(0!==u)throw Error(d);w(p),(0,a.np)(i.wD.InviteCode)}catch(e){console.log("update invite failed: ",e)}};return(0,s.useEffect)(()=>{r&&r.user&&N()},[r]),(0,n.jsx)(p.Provider,{value:{theme:o,setTheme:c,showSignModal:m,setShowSignModal:f,showInsufficientCreditsModal:g,setShowInsufficientCreditsModal:h,showAnonymousCreditsModal:v,setShowAnonymousCreditsModal:x,insufficientCreditsData:b,setInsufficientCreditsData:y,user:j,setUser:w},children:t})}},53664:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});
1let n=(0,r(13243).A)("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]])},60296:(e,t,r)=>{"use strict";r.d(t,{c:()=>v});var n,s="https://js.stripe.com",a="".concat(s,"/v3"),i=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,o=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,l=function(){for(var e=document.querySelectorAll('script[src^="'.concat(s,'"]')),t=0;t<e.length;t++){var r,n=e[t];if(r=n.src,i.test(r)||o.test(r))return n}return null},c=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(a).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:"5.10.0",startTime:t})},d=null,p=null,m=null,f=function(e,t,r){if(null===e)return null;var n,s=t[0].match(/^pk_test/),a=3===(n=e.version)?"v3":n;s&&"v3"!==a&&console.warn("Stripe.js@".concat(a," was loaded on the page, but @stripe/stripe-js@").concat("5.10.0"," expected Stripe.js@").concat("v3",". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var i=e.apply(void 0,t);return u(i,r),i},g=!1,h=function(){return n?n:n=(null!==d?d:(d=new Promise(function(e,t){if("undefined"==typeof window||"undefined"==typeof document){e(null);return}if(window.Stripe,window.Stripe){e(window.Stripe);return}try{var r,n=l();n?n&&null!==m&&null!==p&&(n.removeEventListener("load",m),n.removeEventListener("error",p),null===(r=n.parentNode)||void 0===r||r.removeChild(n),n=c(null)):n=c(null),m=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",m),n.addEventListener("error",p)}catch(e){t(e);return}})).catch(function(e){return d=null,Promise.reject(e)})).catch(function(e){return n=null,Promise.reject(e)})};Promise.resolve().then(function(){return h()}).catch(function(e){g||console.warn(e)});var v=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];g=!0;var n=Date.now();return h().then(function(e){return f(e,t,n)})}},77236:(e,t,r)=>{Promise.resolve().then(r.bind(r,7005)),Promise.resolve().then(r.bind(r,21283))},85425:(e,t,r)=>{"use strict";r.d(t,{cn:()=>a});var n=r(20184),s=r(11021);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.QP)((0,n.$)(t))}},87185:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(13243).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])}},e=>{var t=t=>e(e.s=t);e.O(0,[5719,8548,5221,5063,6533,5186,5990,3718,86,1055,7358],()=>t(77236)),_N_E=e.O()}]);

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.