PageSourceSearch

https://www.word2md.net/_next/static/chunks/7153-c692913a26ffb775.js

js word2md.net collected 2026-10-01 14:02:22 UTC 14,205 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7153],{2224:(e,t,i)=>{i.d(t,{E:()=>s});var r=i(56354);i(72330);var n=i(97787),a=i(15724);let l=(0,n.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 s(e){let{className:t,variant:i,...n}=e;return(0,r.jsx)("div",{className:(0,a.cn)(l({variant:i}),t),...n})}},6444:(e,t,i)=>{function r(e,t){if("function"==typeof window.gtag)return void window.gtag("event",e,t);window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("event",e,t)}function n(e){if("number"==typeof e)return e;if("string"==typeof e){let t=parseFloat(e.replace(/[^0-9.]/g,""));return isNaN(t)?0:t}return 0}function a(e){let t=n(e.value);r("begin_checkout",{currency:e.currency,value:t,items:[{item_id:e.item_id,item_name:e.item_name,price:t,quantity:1}]})}function l(e){let t=n(e.value);r("purchase",{transaction_id:e.transaction_id,currency:e.currency,value:t,items:[{item_id:e.item_id,item_name:e.item_name,price:t,quantity:1}]})}i.d(t,{Du:()=>l,sx:()=>r,xS:()=>a})},15724:(e,t,i)=>{i.d(t,{cn:()=>a});var r=i(83555),n=i(48282);function a(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return(0,n.QP)((0,r.$)(t))}},47023:(e,t,i)=>{i.d(t,{$:()=>d,r:()=>o});var r=i(56354),n=i(72330),a=i(26939),l=i(97787),s=i(15724);let o=(0,l.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"}}),d=n.forwardRef((e,t)=>{let{className:i,variant:n,size:l,asChild:d=!1,...c}=e,u=d?a.DX:"button";return(0,r.jsx)(u,{className:(0,s.cn)(o({variant:n,size:l,className:i})),ref:t,...c})});d.displayName="Button"},53303:(e,t,i)=>{i.d(t,{J:()=>d});var r=i(56354),n=i(72330),a=i(69798),l=i(97787),s=i(15724);let o=(0,l.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=n.forwardRef((e,t)=>{let{className:i,...n}=e;return(0,r.jsx)(a.b,{ref:t,className:(0,s.cn)(o(),i),...n})});d.displayName=a.b.displayName},54042:(e,t,i)=>{i.d(t,{AppContextProvider:()=>u,U:()=>d});var r=i(56354),n=i(72330),a=i(57311),l=i(99048),s=i(44981);let o=(0,n.createContext)({}),d=()=>(0,n.useContext)(o);function c(e){let{children:t}=e,{status:d}=(0,s.wV)(),c=async function(e){console.log("signIn ok",await (0,s.Jv)("google-one-tap",{credential:e,redirect:!1}))};(0,n.useEffect)(()=>{if("unauthenticated"!==d)return;let e=!1,t=null,r=async()=>{let{default:t}=await i.e(9510).then(i.t.bind(i,19510,23));e||t({client_id:"1097563425100-sqsf4f741nbqh22lcrc8f9i0i21qq4je.apps.googleusercontent.com",auto_select:!1,cancel_on_tap_outside:!1,context:"signin"},e=>{c(e.credential)})};return t=setTimeout(()=>{(window.requestIdleCallback||(e=>window.setTimeout(e,200)))(()=>{e||r()})},5e3),()=>{e=!0,t&&clearTimeout(t)}},[d]);let{data:u}
1=(0,s.wV)(),[f,m]=(0,n.useState)(()=>"light"),[p,g]=(0,n.useState)(!1),[h,x]=(0,n.useState)(()=>{let e=(0,a.pr)(l.wD.UserInfo);if(!e)return null;try{return JSON.parse(e)}catch{return null}}),b=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:i,data:r}=await e.json();if(0!==t)throw Error(i);x(r),r&&(0,a.PW)(l.wD.UserInfo,JSON.stringify(r),Math.floor(Date.now()/1e3)+86400),y(r)}catch(e){console.log("fetch user info failed")}},y=async e=>{try{if(e.invited_by)return void console.log("user already been invited",e.invited_by);let t=(0,a.pr)(l.wD.InviteCode);if(!t)return;let i=e.created_at?Math.floor(new Date(e.created_at).getTime()/1e3):0,r=Math.floor(Date.now()/1e3),n=Number(r-i);if(n<=0||n>7200)return void console.log("user created more than 2 hours");console.log("update invite",t,e.uuid);let s={invite_code:t,user_uuid:e.uuid},o=await fetch("/api/update-invite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!o.ok)throw Error("update invite failed with status: "+o.status);let{code:d,message:c,data:u}=await o.json();if(0!==d)throw Error(c);x(u),(0,a.np)(l.wD.InviteCode)}catch(e){console.log("update invite failed: ",e)}};return(0,n.useEffect)(()=>{let e=(window.requestIdleCallback||(e=>window.setTimeout(e,200)))(()=>{u&&u.user?b():null===u&&(x(null),(0,a.np)(l.wD.UserInfo))});return()=>{(window.cancelIdleCallback||(e=>window.clearTimeout(e)))(e)}},[u]),(0,r.jsx)(o.Provider,{value:{theme:f,setTheme:m,showSignModal:p,setShowSignModal:g,user:h,setUser:x},children:t})}let u=e=>{let{children:t}=e;return(0,r.jsx)(c,{children:t})}},57311:(e,t,i)=>{i.d(t,{PW:()=>a,np:()=>l,pr:()=>n});var r=i(88426);let n=e=>{let t=localStorage.getItem(e);if(!t)return null;let i=t.split(":");if(!i||i.length<2)return null;let n=Number(i[0]),a=(0,r.lg)();if(-1!==n&&n<a)return l(e),null;let s=i[0]+":";return t.replace(s,"")},a=(e,t,i)=>{localStorage.setItem(e,i+":"+t)},l=e=>{localStorage.removeItem(e)}},79496:(e,t,i)=>{i.r(t),i.d(t,{default:()=>l});var r=i(56354),n=i(10903);let a={RiAddLine:n.Ld_,RiArchiveStackLine:n.Y5$,RiArrowRightUpLine:n.SJ3,RiArticleLine:n.Mzm,RiBankCardLine:n.epY,RiBarChart2Line:n.rHc,RiBookLine:n.lne,RiChat1Line:n.trZ,RiClapperboardAiLine:n.h3W,RiCloudy2Fill:n.vqn,RiCloudyFill:n.ZYe,RiCodeFill:n.Kav,RiCommandLine:n.xbe,RiFileCopy2Line:n.DJI,RiDatabase2Line:n.Lcf,RiDiscordFill:n.r53,RiDiscordLine:n.cyn,RiDownloadCloud2Line:n.tZw,RiDownloadLine:n.Ail,RiEditLine:n.Ics,RiEyeLine:n.tLq,RiFeedbackLine:n.BKq,RiFlashlightFill:n.bwM,RiFootprintLine:n.RAZ,RiFormatClear:n.wdP,RiGithubFill:n.sAW,RiGithubLine:n.DP6,RiHeading:n.Isf,RiHistoryLine:n.WRT,RiHomeLine:n.hwB,RiImageLine:n.fsL,RiIndentIncrease:n.cUm,RiInformationLine:n.CwO,RiKey2Fill:n._Jr,RiKey2Line:n.rhy,RiLayoutMasonryLine:n.$yL,RiLightbulbFlashLine:n.rj3,RiLink:n.Y$G,RiListOrdered:n.jPQ,RiListUnordered:n.wR2,RiMailLine:n.R0Y,RiMoneyCnyCircleFill:n.t0S,RiNextjsFill:n.hHk,RiOrderPlayLine:n.slt,RiParagraph:n.KZ3,RiPlayLine:n.qkT,RiQuestionLine:n.Kt4,RiRefreshLine:n.Ll9,RiRobot2Line:n.mYn,RiRouteLine:n.Pqv,RiServerLine:n.v3I,RiTableLine:n.k6B,RiText:n.NtT,RiTwitterLine:n.Ja9,RiTwitterXFill:n.ase,RiUploadLine:n.$yN,RiUserLine:n.dIq};function l(e){let{name:t,className:i,onClick:n}=e,l=a[t];return l?(0,r.jsx)(l,{className:i,onClick:n,style:{cursor:n?"pointer":"default"}}):null}},87153:(e,t,i)=>{i.r(t),i.d(t,{default:()=>v});var r=i(56354),n=i(67533),a=i(96284),l=i(72330),s=i(5216),o=i(5243),d=i(15724);let c=l.forwardRef((e,t)=>{let{className:i,...n}=e;return(0,r.jsx)(s.bL,{className:(0,d.cn)("grid gap-2",i),...n,ref:t})});c.displayName=s.bL.displayName;let u=l.forwardRef((e,t)=>{let{className:i,...n}=e;return(0,r.jsx)(s.q7,{ref:t,className:(0,d.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",i),...n,children:(0,r.jsx)(s.C1,{className:"flex items-center justify-center",children:(0,r.jsx)(o.A,{className:"h-2.5 w-2.5 fill-current text-current"})})})});u.displayName=s.q7.displayName;var f=i(2224),m=i(47023),p=i(79496),g=i(53303),h=i(70160),x=i(6444),b=i(54042),y=i(21267);function v(e){var t,s,o;let{pricing:d}=e;if(d.disabled)return null;let{user:v,setShowSignModal:w}=(0,b.U)(),_=(0,y.c3)(),[R,N]=(0,l.useState)(null==(s=d.groups)||null==(t=s[0])?void 0:t.name),[j,L]=(0,l.useState)(!1),[k,C]=(0,l.useState)(null),I=e=>e.product_id.includes("ultimate")?_("pricing.api_quota_ultimate"):e.product_id.includes("pro_plus")?_("pricing.api_quota_pro_plus"):e.product_id.includes("pro_")?_("pricing.api_quota_pro"):e.product_id.includes("payg")?_("pricing.api_credit_pack"):null,S=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={item_id:e.product_id,currency:t?"cny":(e.currency||"usd").toLowerCase(),pricing_group:e.group};(0,x.sx)("pricing_buy_click",r);let n="create_session";try{if(!v){(0,x.sx)("checkout_login_required",r),w(!0);return}let a={product_id:e.product_id,currency:t?"cny":e.currency};L(!0),C(e.product_id);let l=await fetch("/api/checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(401===l.status){(0,x.sx)("checkout_login_required",{...r,reason:"session_expired"}),L(!1),C(null),w(!0);return}let{code:s,message:o,data:d}=await l.json();if(0!==s){(0,x.sx)("checkout_error",{...r,stage:n}),h.oR.error(o);return}let{public_key:c,session_id:u}=d;(0,x.xS)({currency:t?"cny":e.currency||"usd",value:((t?e.cn_amount:e.amount)||0)/100,item_id:e.product_id||"",item_name:e.product_name||e.title||""}),n="load_stripe";let{loadStripe:f}=await i.e(9562).then(i.bind(i,69562)),m=await f(c);if(!m){(0,x.sx)("checkout_error",{...r,stage:n}),h.oR.error("checkout failed");return}n="redirect";let p=await m.redirectToCheckout({sessionId:u});p.error&&((0,x.sx)("checkout_error",{...r,stage:n}),h.oR.error(p.error.message))}catch(e){(0,x.sx)("checkout_error",{...r,stage:n}),console.log("checkout failed: ",e),h.oR.error("checkout failed")}finally{L(!1),C(null)}};return(0,l.useEffect)(()=>
1{if(d.items&&d.items.length>0){var e,t;let i=null==(t=d.groups)||null==(e=t[0])?void 0:e.name,r=d.items.find(e=>!i||e.group===i)||d.items[0];N(r.group),C(r.product_id),L(!1)}},[d.items]),(0,r.jsx)("section",{id:d.name,className:"py-16",children:(0,r.jsxs)("div",{className:"container",children:[(0,r.jsxs)("div",{className:"mx-auto mb-12 text-center",children:[(0,r.jsx)("h2",{className:"mb-4 text-4xl font-semibold lg:text-5xl",children:d.title}),(0,r.jsx)("p",{className:"text-muted-foreground lg:text-lg",children:d.description}),(0,r.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:_("pricing.api_quota_description")})]}),(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[d.groups&&d.groups.length>0&&(0,r.jsx)("div",{className:"mb-8 max-w-full rounded-md bg-muted p-1 text-sm sm:text-base",children:(0,r.jsx)(c,{value:R,className:"flex flex-wrap justify-center gap-1",onValueChange:e=>{N(e)},children:d.groups.map((e,t)=>(0,r.jsxs)("div",{className:'h-full rounded-md transition-all has-[button[data-state="checked"]]:bg-white',children:[(0,r.jsx)(u,{value:e.name||"",id:e.name,className:"peer sr-only"}),(0,r.jsxs)(g.J,{htmlFor:e.name,className:"flex h-full cursor-pointer items-center justify-center px-3 py-3 font-semibold sm:px-5 text-foreground/80 peer-data-[state=checked]:text-primary",children:[e.title,e.label&&(0,r.jsx)(f.E,{variant:"outline",className:"border-primary bg-primary px-1.5 ml-1 text-primary-foreground",children:e.label})]})]},t))})}),(0,r.jsx)("div",{className:"mt-0 grid w-full max-w-6xl gap-6 md:grid-cols-2 lg:grid-cols-3",children:null==(o=d.items)?void 0:o.map((e,t)=>e.group&&e.group!==R?null:(0,r.jsx)("div",{className:`rounded-lg p-6 ${e.is_featured?"border-primary border-2 bg-card text-card-foreground":"border-muted border"}`,children:(0,r.jsxs)("div",{className:"flex h-full flex-col justify-between gap-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[e.title&&(0,r.jsx)("h3",{className:"text-xl font-semibold",children:e.title}),(0,r.jsx)("div",{className:"flex-1"}),e.label&&(0,r.jsx)(f.E,{variant:"outline",className:"border-primary bg-primary px-1.5 text-primary-foreground",children:e.label})]}),(0,r.jsxs)("div",{className:"flex items-end gap-2 mb-4",children:[e.original_price&&(0,r.jsx)("span",{className:"text-xl text-muted-foreground font-semibold line-through",children:e.original_price}),e.price&&(0,r.jsx)("span",{className:"text-5xl font-semibold",children:e.price}),e.unit&&(0,r.jsx)("span",{className:"block font-semibold",children:e.unit})]}),e.description&&(0,r.jsx)("p",{className:"text-muted-foreground",children:e.description}),I(e)&&(0,r.jsx)("p",{className:"mt-2 text-sm font-medium text-primary",children:I(e)}),e.features_title&&(0,r.jsx)("p",{className:"mb-3 mt-6 font-semibold",children:e.features_title}),e.features&&(0,r.jsx)("ul",{className:"flex flex-col gap-3",children:e.features.map((e,t)=>(0,r.jsxs)("li",{className:"flex gap-2",children:[(0,r.jsx)(n.A,{className:"mt-1 size-4 shrink-0"}),e]},`feature-${t}`))})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[e.button&&(0,r.jsxs)(m.$,{className:"w-full flex items-center justify-center gap-2 font-semibold",disabled:j,onClick:()=>{j||S(e)},children:[(!j||j&&k!==e.product_id)&&(0,r.jsx)("p",{children:e.button.title}),j&&k===e.product_id&&(0,r.jsx)("p",{children:e.button.title}),j&&k===e.product_id&&(0,r.jsx)(a.A,{className:"mr-2 h-4 w-4 animate-spin"}),e.button.icon&&(0,r.jsx)(p.default,{name:e.button.icon,className:"size-4"})]}),e.tip&&(0,r.jsx)("p",{className:"text-muted-foreground text-sm mt-2",children:e.tip})]})]})},t))})]})]})})}},88426:(e,t,i)=>{i.d(t,{lg:()=>r});let r=()=>Date.parse(new Date().toUTCString())/1e3},99048:(e,t,i)=>{i.d(t,{wD:()=>r});let r={Theme:"THEME",InviteCode:"INVITE_CODE",UserInfo:"USER_INFO"}}}]);

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.