PageSourceSearch

https://www.upma.cn/_next/static/chunks/735898a2b8cf8b3b.js

js upma.cn collected 2026-10-06 13:15:31 UTC 16,819 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,998928,e=>{"use strict";let t=(0,e.i(185361).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],998928)},986587,e=>{"use strict";let t=(0,e.i(185361).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",()=>t],986587)},850481,e=>{"use strict";var t=e.i(814347);e.s(["orderApi",0,{createSubscription:e=>(0,t.post)("/orders/subscription",e),createAiCreditPack:e=>(0,t.post)("/orders/ai-credits/pack",e),createAiCreditSubscription:e=>(0,t.post)("/orders/ai-credits/subscription",e),getList:e=>(0,t.get)(`/orders?page=${e?.page||1}&pageSize=${e?.pageSize||20}`),getDetail:e=>(0,t.get)(`/orders/${e}`),checkStatus:e=>(0,t.get)(`/orders/${e}/status`),getAlipayUrl:(e,r="PC")=>(0,t.get)(`/payment/alipay/pay?orderNo=${e}&platform=${r}`),getUpgradePreview:(e,r)=>(0,t.get)(`/orders/upgrade-preview?plan=${e}&period=${r}`)}])},801941,e=>{"use strict";var t=e.i(900778),r=e.i(754219),a=e.i(850481);function i(){let[e,i]=(0,t.useState)(!1),n=(0,t.useRef)(null),s=async(e,t)=>{try{i(!0);let n=await e();if(!n.success)throw Error("创建订单失败");let{orderNo:s}=n.data;r.toast.info("正在创建支付链接...");let l=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),o=await a.orderApi.getAlipayUrl(s,l?"H5":"PC");if(!o.success||!o.data.url)throw Error("获取支付链接失败");((e,t)=>{if(t){window.location.href=e;return}if(!window.open(e,"_blank")){r.toast.warning("弹窗被拦截,请允许弹出窗口或手动点击支付"),window.location.href=e;return}r.toast.info("支付页面已在新窗口打开,请完成支付")})(o.data.url,l),t?.(s)}catch(e){console.error(e),r.toast.error(e instanceof Error?e.message:"支付流程出错")}finally{i(!1)}},l=async e=>{try{let t=await a.orderApi.checkStatus(e);return t.success&&t.data.isPaid}catch{return!1}},o=async(e,t=18e5,r=3e3)=>{let a=Date.now();return n.current=e,new Promise(i=>{let s=async()=>{if(n.current!==e)return void i(!1);if(Date.now()-a>t){n.current=null,i(!1);return}if("undefined"!=typeof document&&document.hidden){let e=()=>{"visible"===document.visibilityState&&(document.removeEventListener("visibilitychange",e),s())};document.addEventListener("visibilitychange",e);return}if(await l(e)){n.current=null,i(!0);return}setTimeout(s,r)};s()})};return{loading:e,createSubscriptionAndPay:async(e,t)=>s(()=>a.orderApi.createSubscription(e),t),createAiCreditPackAndPay:async(e,t)=>s(()=>a.orderApi.createAiCreditPack(e),t),createAiCreditSubscriptionAndPay:async(e,t)=>s(()=>a.orderApi.createAiCreditSubscription(e),t),checkOrderStatus:l,startPolling:o,getUpgradePreview:a.orderApi.getUpgradePreview}}e.s(["useOrder",()=>i])},755291,e=>{"use strict";var t,r=((t={}).ALIPAY="ALIPAY",t.WECHAT="WECHAT",t);e.s(["PayChannel",()=>r])},7284,e=>{"use strict";function t(){for(var e,t,r=0,a="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=function e(t){var r,a,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var n=t.length;for(r=0;r<n;r++)t[r]&&(a=e(t[r]))&&(i&&(i+=" "),i+=a)}else for(a in t)t[a]&&(i&&(i+=" "),i+=a);return i}(e))&&(a&&(a+=" "),a+=t);return a}e.s(["clsx",()=>t,"default",0,t])},144977,e=>{"use strict";var t=e.i(900778);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return t=>{let a=!1,i=e.map(e=>{let i=r(e,t);return a||"function"!=typeof i||(a=!0),i});if(a)return()=>{for(let t=0;t<i.length;t++){let a=i[t];"function"==typeof a?a():r(e[t],null)}}}}function i(...e){return t.useCallback(a(...e),e)}e.s(["composeRefs",()=>a,"useComposedRefs",()=>i])},167881,e=>{"use strict";let t,r,a,i,n;var s=e.i(980506),l=e.i(900778),o=e.i(144977),d=Symbol.for("react.lazy"),c=l[" use ".trim().toString()];function u(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===d&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var p=((n=l.forwardRef((e,t)=>
1{let{children:r,...a}=e;if(u(r)&&"function"==typeof c&&(r=c(r._payload)),l.isValidElement(r)){var i;let e,n,s=(i=r,(n=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(n=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),d=function(e,t){let r={...t};for(let a in t){let i=e[a],n=t[a];/^on[A-Z]/.test(a)?i&&n?r[a]=(...e)=>{let t=n(...e);return i(...e),t}:i&&(r[a]=i):"style"===a?r[a]={...i,...n}:"className"===a&&(r[a]=[i,n].filter(Boolean).join(" "))}return{...e,...r}}(a,r.props);return r.type!==l.Fragment&&(d.ref=t?(0,o.composeRefs)(t,s):s),l.cloneElement(r,d)}return l.Children.count(r)>1?l.Children.only(null):null})).displayName="Slot.SlotClone",t=n,(r=l.forwardRef((e,r)=>{let{children:a,...i}=e;u(a)&&"function"==typeof c&&(a=c(a._payload));let n=l.Children.toArray(a),o=n.find(g);if(o){let e=o.props.children,a=n.map(t=>t!==o?t:l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null);return(0,s.jsx)(t,{...i,ref:r,children:l.isValidElement(e)?l.cloneElement(e,void 0,a):null})}return(0,s.jsx)(t,{...i,ref:r,children:a})})).displayName="Slot.Slot",r),h=Symbol("radix.slottable");function g(e){return l.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===h}var b=e.i(7284);let x=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,f=b.clsx;var m=e.i(647163);let y=(a="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i={variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}},e=>{var t;if((null==i?void 0:i.variants)==null)return f(a,null==e?void 0:e.class,null==e?void 0:e.className);let{variants:r,defaultVariants:n}=i,s=Object.keys(r).map(t=>{let a=null==e?void 0:e[t],i=null==n?void 0:n[t];if(null===a)return null;let s=x(a)||x(i);return r[t][s]}),l=e&&Object.entries(e).reduce((e,t)=>{let[r,a]=t;return void 0===a||(e[r]=a),e},{});return f(a,s,null==i||null==(t=i.compoundVariants)?void 0:t.reduce((e,t)=>{let{class:r,className:a,...i}=t;return Object.entries(i).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...n,...l}[t]):({...n,...l})[t]===r})?[...e,r,a]:e},[]),null==e?void 0:e.class,null==e?void 0:e.className)});function v({className:e,variant:t="default",size:r="default",asChild:a=!1,...i}){return(0,s.jsx)(a?p:"button",{"data-slot":"button","data-variant":t,"data-size":r,className:(0,m.cn)(y({variant:t,size:r,className:e})),...i})}e.s(["Button",()=>v],167881)},879339,770243,e=>{"use strict";var t=e.i(980506),r=e.i(900778),a=e.i(238922),i=e.i(998928),n=e.i(986587);let s={FREE:{monthly:{credits:0,expiresInDays:0,validityLabel:"无赠送积分"},annual:{credits:0,expiresInDays:0,validityLabel:"无赠送积分"}},PRO:{monthly:{credits:50,expiresInDays:30,validityLabel:"30 天有效期"},annual:{credits:500,expiresInDays:365,validityLabel:"一年有效期"}},TEAM:{monthly:{credits:500,expiresInDays:30,validityLabel:"30 天有效期"}
1,annual:{credits:5e3,expiresInDays:365,validityLabel:"一年有效期"}}};function l(e,t){return s[e]?.[t]??s.FREE.monthly}function o({plans:e,currentPlan:s,onSelectPlan:o,isLoading:d}){let[c,u]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("div",{className:"flex justify-center mb-8 md:mb-16",children:(0,t.jsx)("div",{className:"bg-slate-100 dark:bg-[#0F1115] border border-slate-200 dark:border-white/10 p-1 rounded-full flex items-center relative gap-1",children:[{id:"monthly",label:"月付",value:!1},{id:"annual",label:"年付",value:!0,badge:"-20%"}].map(e=>(0,t.jsxs)("button",{onClick:()=>u(e.value),className:`relative px-4 md:px-6 py-2 rounded-full text-sm font-medium transition-colors duration-300 ${c===e.value?"text-slate-900 dark:text-white":"text-slate-500 dark:text-gray-400 hover:text-slate-900 dark:hover:text-white"}`,children:[(0,t.jsxs)("span",{className:"relative z-10 flex items-center gap-2",children:[e.label,e.badge&&(0,t.jsx)("span",{className:"text-emerald-500 dark:text-green-400 text-xs bg-emerald-500/10 dark:bg-green-500/10 px-1.5 py-0.5 rounded-full border border-emerald-500/20 dark:border-green-500/20 whitespace-nowrap",children:e.badge})]}),c===e.value&&(0,t.jsx)(a.motion.div,{layoutId:"toggle-pill",className:"absolute inset-0 bg-white dark:bg-white/10 rounded-full shadow-sm",transition:{type:"spring",stiffness:300,damping:30}})]},e.id))})}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-7xl mx-auto",children:(e||[]).map((e,r)=>{let u=c?e.pricing.annual:e.pricing.monthly,p=e.pricing.monthly>0?c?"/年":"/月":"",h=(c?e.aiCreditGrant?.annual:e.aiCreditGrant?.monthly)??l(e.id,c?"annual":"monthly"),g=!!h?.credits;return(0,t.jsxs)(a.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1*r},className:`relative rounded-3xl p-6 md:p-8 border flex flex-col ${e.popular?"border-blue-500/50 bg-white dark:bg-[#0F1115] shadow-xl shadow-blue-500/10 ring-1 ring-blue-500/20 scale-105 z-10":"border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-[#0A0A0A] hover:border-slate-300 dark:hover:border-white/20 transition"}`,children:[e.popular&&(0,t.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-linear-to-r from-blue-600 to-purple-600 text-white px-4 py-1 rounded-full text-xs font-bold uppercase tracking-wide shadow-lg",children:"Most Popular"}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h3",{className:"text-xl font-bold text-slate-900 dark:text-white mb-2",children:e.name}),(0,t.jsx)("p",{className:"text-slate-500 dark:text-gray-400 text-sm h-10",children:e.description})]}),(0,t.jsxs)("div",{className:"mb-8 flex items-baseline",children:[(0,t.jsxs)("span",{className:"text-4xl font-bold text-slate-900 dark:text-white",children:["¥",u]}),p&&(0,t.jsx)("span",{className:"text-slate-500 dark:text-gray-500 ml-1",children:p})]}),(0,t.jsxs)("ul",{className:"space-y-4 mb-8 flex-1",children:[e.features.map((r,a)=>(0,t.jsxs)("li",{className:"flex items-center text-sm text-slate-600 dark:text-gray-300",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-3 ${e.popular?"text-blue-500 dark:text-blue-400":"text-slate-400 dark:text-gray-500"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),r]},a)),g&&h&&(0,t.jsxs)("li",{className:"flex items-center text-sm font-semibold text-cyan-700 dark:text-cyan-200",children:[(0,t.jsx)(n.Sparkles,{className:"mr-3 h-5 w-5 shrink-0 text-cyan-500 dark:text-cyan-300"}),(0,t.jsxs)("a",{href:"/ai-image",target:"_blank",rel:"noopener noreferrer",className:"inline-flex min-w-0 items-center gap-1.5 rounded-lg bg-cyan-400/10 px-2 py-1 transition hover:bg-cyan-400/15 hover:text-cyan-600 dark:hover:text-cyan-100",children:[(0,t.jsxs)("span",{className:"truncate",children:["赠送 AI 积分:",h.credits.toLocaleString("zh-CN")," ","(",h.validityLabel,")"]}),(0,t.jsx)(i.ExternalLink,{className:"h-3.5 w-3.5 shrink-0"})]})]})]}),(0,t.jsx)("button",{onClick:()=>o&&o(e.id,c),disabled:d||"FREE"===e.id&&!!s,className:`w-full py-3 rounded-xl font-bold transition duration-300 ${"FREE"===e.id&&s?"bg-slate-100 dar
1k:bg-white/5 text-slate-400 dark:text-gray-500 cursor-not-allowed border border-slate-200 dark:border-white/5":s===e.id?"bg-emerald-500/10 dark:bg-green-500/20 text-emerald-600 dark:text-green-400 border border-emerald-500/20 dark:border-green-500/20 hover:bg-emerald-500/20 dark:hover:bg-green-500/30":e.popular?"bg-linear-to-r from-blue-600 to-purple-600 text-white hover:shadow-lg hover:shadow-blue-600/30":"bg-white dark:bg-white/5 text-slate-900 dark:text-white border border-slate-200 dark:border-white/5 hover:bg-slate-50 dark:hover:bg-white/10 hover:border-slate-300 dark:hover:border-white/10"}`,children:"FREE"===e.id?s&&"FREE"!==s?"已享有更高权益":s?"免费版":"开始使用":d?"处理中...":s===e.id?"续费":"立即升级"})]},e.id)})})]})}e.s(["HOSTING_PLAN_AI_CREDIT_GRANTS",0,s,"getHostingPlanAiCreditGrant",()=>l],770243),e.s(["default",()=>o],879339)},964254,e=>{"use strict";var t=e.i(980506),r=e.i(900778),a=e.i(158294),i=e.i(754219),n=e.i(879339),s=e.i(376193),l=e.i(801941),o=e.i(755291),d=e.i(630374),c=e.i(167881);function u({plansConfig:e}){let{isLoggedIn:u,refreshUser:p}=(0,s.useUser)(),{createSubscriptionAndPay:h,loading:g,startPolling:b,getUpgradePreview:x}=(0,l.useOrder)(),f=(0,a.useSearchParams)(),m=(0,a.useRouter)(),[y,v]=(0,r.useState)(!1),[k,w]=(0,r.useState)(!1),[j,A]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=f.get("orderNo");e&&(async()=>{await b(e,1e4)?(i.toast.success("🎉 支付成功!会员权益已生效"),m.push("/dashboard/subscription")):i.toast.warning("订单状态更新稍有延迟,请稍后刷新页面查看")})()},[f,m,b]);let N=(e,t)=>{h({plan:e,period:t,payChannel:o.PayChannel.ALIPAY},e=>{i.toast.loading("正在等待支付结果...",{id:"polling-toast",duration:3e5}),b(e,3e5).then(e=>{i.toast.dismiss("polling-toast"),e?(i.toast.success("🎉 支付成功!会员权益已生效"),p()):i.toast.info("支付结果查询超时,请稍后刷新页面查看")})})},C=e?Object.values(e.plans):[];return(0,t.jsxs)("div",{className:"dark relative px-2.5",children:[(0,t.jsx)(n.default,{plans:C,onSelectPlan:(e,t)=>{if("FREE"===e)return;if(!u)return void i.toast.error("请先登录账户");let r=t?"annual":"monthly";u?(w(!0),x(e,r).then(t=>{w(!1);let{data:a,success:i}=t;if(i&&a.extraDays>0){A({extraDays:a.extraDays,remainingDays:a.remainingDays,plan:e,period:r}),v(!0);return}N(e,r)}).catch(e=>{w(!1),i.toast.error(e.message||"操作失败")})):N(e,r)},isLoading:g||k}),g&&(0,t.jsxs)("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex flex-col items-center justify-center",children:[(0,t.jsx)("div",{className:"w-10 h-10 border-4 border-blue-500 border-t-transparent rounded-full animate-spin mb-4"}),(0,t.jsx)("p",{className:"font-bold text-white",children:"正在跳转支付宝..."})]}),(0,t.jsx)(d.Dialog,{open:y,onOpenChange:v,children:(0,t.jsxs)(d.DialogContent,{children:[(0,t.jsxs)(d.DialogHeader,{children:[(0,t.jsx)(d.DialogTitle,{children:"确认升级套餐?"}),(0,t.jsxs)(d.DialogDescription,{className:"pt-4 space-y-2 text-base",children:[(0,t.jsxs)("p",{children:["您当前套餐剩余 ",(0,t.jsx)("b",{children:j?.remainingDays})," 天。"]}),(0,t.jsxs)("p",{children:["系统已为您自动折算为新套餐的"," ",(0,t.jsx)("b",{className:"text-primary text-lg",children:j?.extraDays})," ","天。"]}),(0,t.jsxs)("p",{children:["订阅后,这 ",j?.extraDays," ","天将自动叠加到您的新有效期中!"]})]})]}),(0,t.jsxs)(d.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>v(!1),disabled:g,children:"取消"}),(0,t.jsx)(c.Button,{onClick:()=>{j&&(v(!1),N(j.plan,j.period))},disabled:g,children:g?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin mr-2"}),"处理中..."]}):"确认支付并升级"})]})]})})]})}e.s(["default",()=>u])}]);

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.