PageSourceSearch

https://pokee.ai/_next/static/chunks/app/%5Blocale%5D/(unauth)/pricing/page-37c679af6e3f99ae.js

js pokee.ai collected 2026-10-02 10:06:52 UTC 48,254 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11235],{6829:(e,r,t)=>{"use strict";t.d(r,{y:()=>s});var a=t(30926);let s=(0,a.createServerReference)("7f26bf95316f0e1721b8db543c63b483094d4f9d31",a.callServer,void 0,a.findSourceMapURL,"invalidateCacheAction")},15145:(e,r,t)=>{"use strict";t.d(r,{lG:()=>d,Cf:()=>x,rr:()=>b,Es:()=>h,c7:()=>g,L3:()=>f,zM:()=>p});var a=t(95155),s=t(12115),i=t(89511),l=t(65229),n=t(77979),o=t(861);let c=s.forwardRef((e,r)=>{let{...t}=e;return(0,a.jsx)(o.bL,{ref:r,...t})});c.displayName=o.bL.displayName;let d=i.bL,p=i.l9,u=i.ZL;i.bm;let m=s.forwardRef((e,r)=>{let{className:t,...s}=e;return(0,a.jsx)(i.hJ,{ref:r,className:(0,n.cn)("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...s})});m.displayName=i.hJ.displayName;let x=s.forwardRef((e,r)=>{let{className:t,children:s,hideCloseButton:o=!1,title:d,...p}=e;return(0,a.jsxs)(u,{children:[(0,a.jsx)(m,{}),(0,a.jsxs)(i.UC,{ref:r,className:(0,n.cn)("fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-4 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:w-full rounded-2xl",t),...p,children:[d&&(0,a.jsx)(c,{children:(0,a.jsx)(i.hE,{children:d})}),s,!o&&(0,a.jsxs)(i.bm,{className:"absolute right-3 top-3 rounded-full bg-gray-100 p-2 opacity-90 ring-offset-background transition-all hover:opacity-100 hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none dark:bg-pokee-gray dark:hover:bg-pokee-dark-h
1over sm:right-4 sm:top-4",children:[(0,a.jsx)(l.A,{className:"h-5 w-5 text-gray-700 dark:text-gray-200 sm:h-4 sm:w-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});x.displayName=i.UC.displayName;let g=e=>{let{className:r,...t}=e;return(0,a.jsx)("div",{className:(0,n.cn)("flex flex-col space-y-1.5 text-center sm:text-left pr-10 sm:pr-8",r),...t})};g.displayName="DialogHeader";let h=e=>{let{className:r,...t}=e;return(0,a.jsx)("div",{className:(0,n.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",r),...t})};h.displayName="DialogFooter";let f=s.forwardRef((e,r)=>{let{className:t,...s}=e;return(0,a.jsx)(i.hE,{ref:r,className:(0,n.cn)("text-lg font-semibold leading-none tracking-tight",t),...s})});f.displayName=i.hE.displayName;let b=s.forwardRef((e,r)=>{let{className:t,...s}=e;return(0,a.jsx)(i.VY,{ref:r,className:(0,n.cn)("text-sm text-muted-foreground",t),...s})});b.displayName=i.VY.displayName},15894:(e,r,t)=>{"use strict";t.d(r,{dj:()=>p,oR:()=>d});var a=t(12115);let s=0,i=new Map,l=e=>{if(i.has(e))return;let r=setTimeout(()=>{i.delete(e),c({type:"REMOVE_TOAST",toastId:e})},1e6);i.set(e,r)},n=[],o={toasts:[]};function c(e){o=((e,r)=>{switch(r.type){case"ADD_TOAST":return{...e,toasts:[r.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===r.toast.id?{...e,...r.toast}:e)};case"DISMISS_TOAST":{let{toastId:t}=r;return t?l(t):e.toasts.forEach(e=>{l(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===t||void 0===t?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===r.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==r.toastId)}}})(o,e),n.forEach(e=>{e(o)})}function d(e){let{...r}=e,t=(s=(s+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>c({type:"DISMISS_TOAST",toastId:t});return c({type:"ADD_TOAST",toast:{...r,id:t,open:!0,onOpenChange:e=>{e||a()}}}),{id:t,dismiss:a,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function p(){let[e,r]=(0,a.useState)(o);return(0,a.useEffect)(()=>(n.push(r),()=>{let e=n.indexOf(r);e>-1&&n.splice(e,1)}),[e]),{...e,toast:d,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}},31120:(e,r,t)=>{"use strict";t.d(r,{T:()=>l});var a=t(95155),s=t(12115),i=t(27139);let l=s.forwardRef((e,r)=>{let{className:t,...s}=e;return(0,a.jsx)("textarea",{className:(0,i.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-all duration-200 ease-in-out resize-none overflow-y-auto placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring hover:border-input/80 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-input md:text-sm dark:!bg-pokee-black dark:border-pokee-gray",t),ref:r,...s})});l.displayName="Textarea"},40069:(e,r,t)=>{"use strict";t.d(r,{default:()=>L});var a=t(95155),s=t(94018),i=t(94511),l=t(49050),n=t(18955),o=t(51567),c=t(12115),d=t(62782),p=t(19224),u=t(93293),m=t(15894),x=t(46292),g=t(3998),h=t(15145),f=t(65142),b=t(76444),v=t(31120);let y=e=>{let{isOpen:r,onClose:t}=e,s=(0,o.Ym)(),i=(0,n.c)(),[l,d]=(0,c.useState)({firstName:"",lastName:"",workEmail:"",companyName:"",message:""}),[p,u]=(0,c.useState)(!1),[m,y]=(0,c.useState)(!1),j=(e,r)=>{d(t=>({...t,[e]:r}))},N=()=>{y(!1),t()},k=async e=>{e.preventDefault(),u(!0);try{let e=await (0,x.t)("api/contact-sales",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({first_name:l.firstName,last_name:l.lastName,work_email:l.workEmail,company_name:l.companyName,message:l.message})});if(e.ok)y(!0),d({firstName:"",lastName:"",workEmail:"",companyName:"",message:""}),setTimeout(()=>{N()},5e3);else{let r=await e.json();console.error("Submission failed: ",r.error)}}catch(e){console.error(e)}finally{u(!1)}};return(0,a.jsx)(h.lG,{open:r,onOpenChange:N,children:(0,a.jsxs)(h.Cf,{className:"font-kumbh-sans overflow-hidden bg-white p-0 text-pokee-gray sm:max-w-lg",children:[(0,a.jsxs)("div",{className:"relative p-6 text-pokee-black",style:{background:"linear-gradient(135deg, rgba(168, 168, 230) 0%, rgba(255, 179, 102) 50%, rgba(179, 217, 255) 100%)"},children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-white/10 to-transparent"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(h.L3,{className:"mb-2 text-2xl font-bold text-pokee-black",children:i("Pricing.enterprise_form.plan")}),(0,a.jsx)(h.rr,{className:"text-base text-pokee-gray",children:i("Pricing.enterprise_form.description")})]})]}),(0,a.jsx)("div",{className:"p-6",children:(0,a.jsxs)("form",{onSubmit:k,className:"space-y-6",children:[(0,a.jsx)("div",{className:"grid grid-cols-2 gap-6",children:"zh"===s||"ja"===s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)(b.J,{htmlFor:"lastName",className:"text-sm font-semibold text-pokee-black",children:[i("Pricing.enterprise_form.last_name")," ","*"]}),(0,a.jsx)(f.p,{id:"lastName",value:l.lastName,onChange:e=>j("lastName",e.target.value),required:!0,placeholder:"",className:"rounded-lg border-2 border-pokee-stroke transition-all duration-200 focus:border-pokee-gray focus:ring-2 focus:ring-pokee-purple-dark-20"})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)(b.J,{htmlFor:"firstName",className:"text-sm font-semibold text-pokee-black",children:[i("Pricing.enterprise_form.first_name")," ","*"]}),(0,a.jsx)(f.p,{id:"firstName",value:l.firstName,onChange:e=>j("firstName",e.target.value),required:!0,placeholder:"",className:"rounded-lg border-2 border-pokee-stroke transition-all duration-200 focus:border-pokee-gray focus:ring-2 focus:ring-pokee-purple-dark-20"})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)(b.J,{htmlFor:"firstName",className:"text-sm font-semibold text-pokee-black",children:[i("Pricing.enterprise_form.first_name")," ","*"]}),(0,a.jsx)(f.p,{id:"firstName",value:l.firstName,onChange:e=>j("firstName",e.target.value),required:!0,placeholder:"",className:"rounded-lg border-2 border-pokee-stroke transition-all duration-200 focus:border-pokee-gray focus:ring-2 focus:ring-pokee-purple-dark-20"})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)(b.J,{htmlFor:"lastName",className:"text-sm font-semibold text-pokee-black",children:[i("Pricing.enterprise_form.last_name")," ","*"]}),(0,a.jsx)(f.p,{id:"lastName",value:l.lastName,onChange:e=>j("lastName",e.target.value),required:!0,placeholder:"",className:"rounded-lg border-2 border-pokee-stroke transition-all duration-200 focus:border-pokee-gray focus:ring-2 focus:ring-pokee-purple-dark-20"})]})]})}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)(b.J,{htmlFor:"workEmail",className:"text-sm font-semibold text-pokee-black",children:[i("Pricing.enterprise_form.work_email")," ","*"]}),(0,a.jsx)(f.p,{id:"workEmail",type:"email",value:l.workEmail,onChange:e=>j("workEmail",e.target.value),required:!0,placeholder:"",className:"rounded-lg border-2 border-pokee-stroke transition-all duration-200 focus:border-pokee-gray focus:ring-2 focus:ring-pokee-purple-dark-20"})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)(b.J,{htmlFor:"companyName",className:"text-sm font-semibold text-pokee-black",children:[i("Pricing.enterprise_form.company_name")," ","*"]}),(0,a.jsx)(f.p,{id:"companyName",value:l.companyName,onChange:e=>j("companyName",e.target.value),required:!0,placeholder:"",className:"rounded-lg border-2 border-pokee-stroke transition-all duration-200 focus:border-pokee-gray focus:ring-2 focus:ring-pokee-purple-dark-20"})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)(b.J,{htmlFor:"message",className:"text-sm font-semibold text-pokee-black",children:i("Pricing.enterprise_form.message")}),(0,a.jsx)(v.T,{id:"message",value:l.message,onChange:e=>j("message",e.target.value),placeholder:i("Pricing.enterprise_form.message_placeholder"),rows:4,className:"resize-none rounded-lg border-2 border-pokee-stroke transition-all duration-200 focus:border-pokee-gray focus:ring-2 focus:ring-pokee-purple-dark-20"})]}),(0,a.jsxs)("div",{className:"flex justify-end space-x-3 pt-6",children:[(0,a.jsx)(g.$,{type:"button",variant:"outline",onClick:N,disabled:p,className:"w-full border-gray-200 text-black hover:bg-gray-50 dark:bg-white dark:hover:text-black sm:w-auto",children:i("Chat.cancel")}),(0,a.jsx)(g.$,{type:"submit",disabled:p,className:"w-full bg-black text-white hover:bg-pokee-black dark:bg-black dark:text-white dark:hover:bg-pokee-black dark:hover:text-white sm:w-auto",children:i(p?"Chat.submitting":"Chat.submit")})]})]})}),m&&(0,a.jsx)("div",{className:"absolute inset-x-0 bottom-0 border-t border-pokee-stroke bg-pokee-black px-6 py-4 text-white shadow-lg duration-300 animate-in slide-in-from-bottom-4",children:(0,a.jsx)("div",{className:"flex items-center justify-center",children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("svg",{className:"size-5 text-white",f
1ill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),(0,a.jsx)("span",{className:"text-sm font-medium",children:i("Pricing.enterprise_form.success_message")})]})})})]})})};var j=t(48007),N=t(65229),k=t(5917),w=t(77979);let _=e=>{let{plan:r,defaultPlan:t,features:i,isLoading:l,handleSubscribe:c,handleUpgrade:d,signInMode:p="redirect",isCurrentPlan:u=!1,isSubscribed:m=!1,currentPlanTier:x=-1,cardPlanTier:g=-1,hideButton:h=!1,forceSubscribeButton:f=!1,isFreePlan:b=!1,duration:v="monthly",isHovered:y=!1,baseCredits:_,isOrgMember:S=!1,isAppleSub:P=!1}=e,C=(0,o.Ym)(),T=(0,n.c)("Pricing"),D=m&&g===x,E=(0,w.cn)("w-full py-3.5 px-6 rounded-full text-sm font-semibold transition-all duration-200",{"bg-pokee-purple text-white hover:bg-pokee-purple-hover":y&&!u,"bg-black text-white hover:bg-pokee-black-hover":!y&&!u,"bg-black/5 text-gray-400 cursor-default":u}),A=(0,w.cn)("w-full py-3.5 px-6 rounded-full text-sm font-semibold transition-all duration-200",{"bg-pokee-purple text-white hover:bg-pokee-purple-hover":y,"bg-black text-white hover:bg-pokee-black-hover":!y});return(0,a.jsxs)("div",{className:"flex flex-col p-6 transition-all duration-300",children:[(0,a.jsx)("h2",{className:"mb-4 text-center text-xl font-semibold text-gray-900",children:(null==r?void 0:r.name)||t.name}),(0,a.jsxs)("div",{className:"mb-6 flex items-start justify-center",children:[(0,a.jsx)("span",{className:"mr-1 mt-1 text-lg font-semibold text-gray-900",children:"$"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,a.jsxs)("span",{className:"overflow-hidden whitespace-nowrap text-4xl font-semibold tracking-tight text-gray-900",children:[r?"yearly"===v&&"yearly"===r.interval?r.price/100/12==0?"0":(r.price/100/12).toFixed(2):r.price/100==0?"0":(r.price/100).toFixed(2):t.price,(0,a.jsxs)("span",{className:"text-sm text-gray-500",children:[" ","/",T("cards.monthly")]})]}),"yearly"===v&&r&&"yearly"===r.interval&&(0,a.jsxs)("span",{className:"mt-1 text-center text-xs text-gray-500",children:["$",r?(r.price/100).toFixed(2):"0"," ",T("cards.annually")]})]})]}),(0,a.jsx)("ul",{className:"mb-4 space-y-3",children:i.map((e,r)=>(0,a.jsxs)("li",{className:"flex items-start justify-center lg:justify-start",children:["Lowest rate limit"===e.title||"最低速度限制"===e.title?(0,a.jsx)("div",{className:"mr-3 mt-1 flex size-5 shrink-0 items-center justify-center rounded-full border border-red-500/30 bg-red-500/10",children:(0,a.jsx)(N.A,{className:"size-3 text-red-500"})}):(0,a.jsx)("div",{className:"border-pokee-purple/30 bg-pokee-purple/10 mr-3 flex size-5 shrink-0 items-center justify-center rounded-full border",children:(0,a.jsx)(k.A,{className:"size-3 text-pokee-purple"})}),(0,a.jsxs)("span",{className:"text-sm font-medium text-gray-600",children:[0===r&&!!_&&(0,a.jsx)("s",{"aria-hidden":"true",className:"mr-1 font-normal text-gray-500",children:_.toLocaleString()}),e.title]})]},e.title))}),(0,a.jsx)("p",{className:"mb-6 text-sm text-gray-500",children:(null==r?void 0:r.description)||t.description}),!h&&(0,a.jsx)("div",{className:"mt-auto",children:b?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.iB,{children:(0,a.jsx)("button",{className:E,onClick:()=>window.location.href="/".concat(C,"/workflow"),"aria-label":"Start Using Pokee",children:T(u?"cards.buttons.currentPlan":"cards.buttons.startUsingPokee")})}),(0,a.jsx)(j.Bl,{children:(0,a.jsx)("button",{className:A,onClick:()=>window.location.href="/sign-up","aria-label":"Try for Free",children:T(u?"cards.buttons.currentPlan":"cards.buttons.tryForFree")})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.iB,{children:S?(0,a.jsx)("a",{href:"en"===C?"/pricing/enterprise":"/".concat(C,"/pricing/enterprise"),className:"flex w-full items-center justify-center rounded-full border border-black/10 bg-black/[0.02] px-6 py-3 text-center font-medium text-gray-900 transition-all hover:border-black/20 hover:bg-black/[0.04]",children:T("cards.buttons.viewEnterprisePlans")}):(0,a.jsx)("button",{onClick:()=>{(null==r?void 0:r.price_id)&&(P||(!f&&(m||D)?d(r.price_id):c(r.price_id,r.plan)))}
1,disabled:l||!r||P||u,className:E,children:u?T("cards.buttons.currentPlan"):P?T("cards.buttons.managedInAppStore"):f?T(l?"cards.buttons.processing":"cards.buttons.choosePlan"):m?l?T("cards.buttons.processing"):m&&g>x?T("cards.buttons.upgradeTo",{planName:(null==r?void 0:r.name)||t.name}):m&&g<x||D?T("cards.buttons.switchTo",{planName:(null==r?void 0:r.name)||t.name}):T("cards.buttons.changePlan"):T(l?"cards.buttons.processing":"cards.buttons.choosePlan")})}),(0,a.jsx)(j.Bl,{children:(0,a.jsx)(s.hZ,{mode:p,fallbackRedirectUrl:"/subscription",children:(0,a.jsx)("button",{className:A,children:T("cards.buttons.signInToSubscribe")})})})]})})]})},S=e=>{let{plans:r,allPlans:t,defaultPlans:s,features:i,loadingStates:l,subscription:o,hasPaidPlan:d,currentPlanTier:p,duration:u,handleSubscribe:m,handleUpgradeClick:g,stripeInterval:h,isStripeDataLoaded:f,onHoveredCardChange:b,isOrgMember:v=!1,isAppleSub:y=!1}=e,j=(0,n.c)("Pricing"),N=r.find(e=>"free"===e.plan),k=r.find(e=>"tier1"===e.plan),w=r.find(e=>"tier2"===e.plan),S=r.find(e=>"tier3"===e.plan),P=t||r,C=P.find(e=>"tier1"===e.plan&&"monthly"===e.interval),T=P.find(e=>"tier2"===e.plan&&"monthly"===e.interval),D=P.find(e=>"tier3"===e.plan&&"monthly"===e.interval),E=(0,c.useCallback)(()=>k?"lite":N?"free":w?"pro":S?"ultra":null,[k,N,w,S]),[A,M]=(0,c.useState)(()=>E()),O=(0,c.useCallback)(e=>{M(e),null==b||b(e)},[b]),I=(0,c.useCallback)(()=>{setTimeout(()=>{let e=E();M(e),null==b||b(e)},200)},[E,b]),[L,F]=(0,c.useState)(()=>!(null==o?void 0:o.stripe_customer_id));(0,c.useEffect)(()=>{(async()=>{if(null==o?void 0:o.stripe_customer_id)try{let e=await (0,x.t)("/api/retrieve-stripe-subscription",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerId:o.stripe_customer_id})});if(e.ok){let r=await e.json();r.data&&r.data.length,F(!0)}else{let r=await e.json();console.error("Error fetching Stripe subscriptions:",r)}}catch(e){console.error("Error fetching Stripe data:",e)}else F(!0)})()},[null==o?void 0:o.stripe_customer_id,u]);let z=!!o&&!!N&&o.plan===N.plan,U=!!o&&!!k&&o.plan===k.plan&&(!h||h===u),R=!!o&&!!w&&o.plan===w.plan&&(!h||h===u),B=!!o&&!!S&&o.plan===S.plan&&(!h||h===u);return(null==o?void 0:o.stripe_customer_id)&&(!f||!L)?(0,a.jsx)("div",{className:"mx-auto max-w-7xl",children:(0,a.jsx)("div",{className:"flex min-h-[600px] items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"border-pokee-purple/30 mx-auto mb-4 size-8 animate-spin rounded-full border-4 border-t-pokee-purple"}),(0,a.jsx)("p",{className:"text-gray-600",children:"Loading pricing..."})]})})}):(0,a.jsx)("div",{className:"mx-auto max-w-7xl",children:(0,a.jsx)("div",{className:"overflow-visible",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-6 overflow-visible lg:grid-cols-[repeat(auto-fit,_minmax(200px,_1fr))]",onMouseLeave:I,children:[N&&(0,a.jsx)("div",{className:"w-full rounded-2xl border p-1 transition-colors duration-300 ".concat("free"===A?"border-pokee-purple/40 bg-pokee-purple/[0.03]":"border-black/10"),onMouseEnter:()=>O("free"),children:(0,a.jsx)(_,{plan:N,defaultPlan:s.free||{name:"Free",price:"0",interval:"monthly",description:"Try Pokee for free"},features:i.free,isLoading:l[(null==N?void 0:N.price_id)||""]||!1,handleSubscribe:()=>m((null==N?void 0:N.price_id)||"",(null==N?void 0:N.plan)||""),handleUpgrade:()=>{},variant:"free",signInMode:"redirect",isCurrentPlan:z,isHovered:"free"===A,isSubscribed:d,cardPlanTier:0,currentPlanTier:p,isFreePlan:!0,duration:u,isOrgMember:v,isAppleSub:y})}),k&&(0,a.jsxs)("div",{className:"relative w-full rounded-2xl border p-1 transition-colors duration-300 ".concat("lite"===A?"border-pokee-purple/40 bg-pokee-purple/[0.03]":"border-black/10"),onMouseEnter:()=>O("lite"),children:[(0,a.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2",children:(0,a.jsx)("span",{className:"rounded-full bg-pokee-purple px-4 py-1 text-xs font-semibold text-white",children:j("mostPopular")})}),(0,a.jsx)(_,{plan:k,defaultPlan:s.tier1||{name:"Lite",price:"19.99",interval:"monthly",description:"Lite plan features"},features:i.lite,isLoading:l[(null==k?void 0:k.price_id)||""]||!1,handleSubscribe:()=>m((null==k?void 0:k.price_id)||"",(null==k?void 0:k.plan)||""),handleUpgrade:()=>g((null==k?void 0:k.price_id)||"",(null==o?void 0:o.subscription_id)||"",(null==o?void 0:o.stripe_customer_id)||""),variant:"tier1",signInMode:"redirect",isCurrentPlan:U,isHovered:"lite"===A,isSubscribed:d,cardPlanTier:1,currentPlanT
1ier:p,forceSubscribeButton:!d,duration:u,showRecommended:!d||z,monthlyPrice:null==C?void 0:C.price,isOrgMember:v,isAppleSub:y})]}),w&&(0,a.jsx)("div",{className:"w-full rounded-2xl border p-1 transition-colors duration-300 ".concat("pro"===A?"border-pokee-purple/40 bg-pokee-purple/[0.03]":"border-black/10"),onMouseEnter:()=>O("pro"),children:(0,a.jsx)(_,{plan:w,defaultPlan:s.tier2||{name:"Pro",price:"49.99",interval:"monthly",description:"Pro plan features"},features:i.pro,isLoading:l[(null==w?void 0:w.price_id)||""]||!1,handleSubscribe:()=>m((null==w?void 0:w.price_id)||"",(null==w?void 0:w.plan)||""),handleUpgrade:()=>g((null==w?void 0:w.price_id)||"",(null==o?void 0:o.subscription_id)||"",(null==o?void 0:o.stripe_customer_id)||""),variant:"tier2",signInMode:"redirect",isCurrentPlan:R,isHovered:"pro"===A,isSubscribed:d,cardPlanTier:2,currentPlanTier:p,forceSubscribeButton:!d,duration:u,monthlyPrice:null==T?void 0:T.price,baseCredits:5e3,isOrgMember:v,isAppleSub:y})}),S&&(0,a.jsx)("div",{className:"w-full rounded-2xl border p-1 transition-colors duration-300 ".concat("ultra"===A?"border-pokee-purple/40 bg-pokee-purple/[0.03]":"border-black/10"),onMouseEnter:()=>O("ultra"),children:(0,a.jsx)(_,{plan:S,defaultPlan:s.tier3||{name:"Ultra",price:"199.99",interval:"monthly",description:"Ultra plan features"},features:i.ultra,isLoading:l[(null==S?void 0:S.price_id)||""]||!1,handleSubscribe:()=>m((null==S?void 0:S.price_id)||"",(null==S?void 0:S.plan)||""),handleUpgrade:()=>g((null==S?void 0:S.price_id)||"",(null==o?void 0:o.subscription_id)||"",(null==o?void 0:o.stripe_customer_id)||""),variant:"tier3",signInMode:"modal",isCurrentPlan:B,isHovered:"ultra"===A,isSubscribed:d,cardPlanTier:3,currentPlanTier:p,forceSubscribeButton:!d,duration:u,monthlyPrice:null==D?void 0:D.price,baseCredits:2e4,isOrgMember:v,isAppleSub:y})})]})})})};var P=t(61362),C=t(78874),T=t(75882),D=t(23327),E=t(46767);function A(e){var r;let{isOpen:t,onClose:s,onConfirm:i,isLoading:l,invoicePreview:o,newPlanName:c,status:d,onRetry:p,isDowngrade:u=!1,isSameTier:m=!1,planInterval:x="",customerBalance:f=0,isAddonUpgrade:b=!1,redirect:v=null}=e,y=(0,n.c)("Pricing");if(!t)return null;let j=(e,r)=>new Intl.NumberFormat("en-US",{style:"currency",currency:r}).format(e/100),N=e=>new Date(1e3*e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),k=e=>{var r;return(null==(r=e.price)?void 0:r.product)&&"object"==typeof e.price.product&&!e.price.product.deleted?e.price.product.name:e.description||"Unknown Item"},w=()=>{if(!o)return{balance:0,charges:0,remainingBalance:0,totalAvailableBalance:Math.abs(f)};let e=0,r=0;o.lines.data.forEach(t=>{t.amount<0?e+=Math.abs(t.amount):r+=t.amount});let t=Math.abs(f),a=t+e,s=Math.max(0,a-r);return{balance:e,charges:r,remainingBalance:s,totalAvailableBalance:a,existingCustomerBalance:t}},_=e=>e.amount<0,S=e=>e.amount>0,A=b?y("upgradeDialog.addonUpgradeTitle"):u||m?y("upgradeDialog.downgradeTitle",{planName:c,interval:"(".concat("yearly"===x?y("toggle.yearly"):y("toggle.monthly"),")")}):y("upgradeDialog.title",{planName:c,interval:"(".concat("yearly"===x?y("toggle.yearly"):y("toggle.monthly"),")")}),M=null!=(r=null==o?void 0:o.amount_due)?r:0,O=l?y("upgradeDialog.buttons.processing"):M>0?y("upgradeDialog.buttons.confirmUpgrade"):y("upgradeDialog.buttons.confirmChange");return(0,a.jsx)(E.Bc,{children:(0,a.jsx)(h.lG,{open:t,onOpenChange:s,children:(0,a.jsx)(h.Cf,{className:"max-h-[90vh] gap-5 overflow-y-auto border-gray-200 bg-white p-5 text-gray-900 sm:max-h-[85vh] sm:p-6",children:(()=>{switch(d){case"success":return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-6 text-center sm:py-8",children:[(0,a.jsx)("div",{className:"flex size-14 items-center justify-center rounded-full bg-green-50",children:(0,a.jsx)(P.A,{className:"size-8 text-green-500"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold sm:text-xl",children:y("upgradeDialog.status.success.title")}),(0,a.jsx)("p",{className:"max-w-sm text-sm sm:text-base",children:"no-redirect"===v?"You can now close this window. Your subscription change has been activated.":y("upgradeDialog.status.success.message")})]});case"error":return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-6 text-center sm:py-8",children:[(0,a.jsx)("div",{className:"flex size-14 items-center justify-center rounded-full bg-red-50",children:(0,a.jsx)(C.A,{className:"size-8 text-red-500"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold sm:text-xl",children:y("upgradeDialog.status.error.title")}),(0,a.jsx)("p",{className:"max-w-sm text-sm sm:text-base",children:y("upgradeDialog.status.error.message")}),(0,a.jsxs)(h.Es,{className:"mt-2 w-full gap-2 sm:mt-3",children:[(0,a.jsx)(g.$,{variant:"outline",onClick:s,className:"w-full rounded-lg sm:w-auto",children:y("upgradeDialog.status.error.cancel")}),(0,a.jsx)(g.$,{onClick:p,className:"w-full rounded-lg bg-black text-white hover:bg-pokee-black-hover sm:w-auto",children:y("upgradeDialog.status.error.tryAgain")})]})]});default:return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(h.c7,{children:[(0,a.jsx)(h.L3,{children:A}),(0,a.jsx)(h.rr,{children:y("upgradeDialog.description")})]}),o?(0,a.jsxs)("div",{className:"space-y-4",children:[f<0&&(0,a.jsxs)("div",{className:"border-pokee-purple/15 bg-pokee-purple/[0.04] flex items-center justify-between rounded-xl border px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(T.A,{className:"size-4"}),(0,a.jsx)("span",{className:"text-sm font-medium",children:y("upgradeDialog.invoicePreview.availableBalance")})]}),(0,a.jsx)("span",{className:"text-sm font-semibold",children:j(Math.abs(f),o.currency)})]}),(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-gray-200",children:[(0,a.jsx)("div",{className:"border-b border-gray-100 bg-gray-50/70 px-4 py-2.5",children:(0,a.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide",children:y("upgradeDialog.invoicePreview.title")})}),(0,a.jsxs)("div",{className:"px-4 py-3.5",children:[o.lines.data.filter(_).map(e=>(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 py-1",children:[(0,a.jsx)("span",{className:"text-sm",children:y("upgradeDialog.invoicePreview.balanceForUnusedTime",{planName:k(e)})}),(0,a.jsx)("span",{className:"shrink-0 text-sm font-medium",children:j(e.amount,e.currency)})]},e.id)),o.lines.data.filter(S).map(e=>(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 py-1",children:[(0,a.jsx)("span",{className:"text-sm",children:y("upgradeDialog.invoicePreview.newSubscription",{planName:k(e)})}),(0,a.jsx)("span",{className:"shrink-0 text-sm font-medium",children:j(e.amount,e.currency)})]},e.id)),(()=>{let{totalAvailableBalance:e,charges:r}=w(),t=Math.min(e,r);return t>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"my-2 h-px bg-gray-100"}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 py-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-sm",children:y("upgradeDialog.invoicePreview.balanceApplied")}),(0,a.jsxs)(E.m_,{children:[(0,a.jsx)(E.k$,{asChild:!0,children:(0,a.jsx)(D.A,{className:"size-3.5"})}),(0,a.jsx)(E.ZI,{side:"top",align:"end",sideOffset:5,className:"border-gray-200 bg-white text-gray-900 shadow-md",children:(0,a.jsx)("p",{className:"max-w-xs text-xs",children:y("upgradeDialog.invoicePreview.balanceAppliedTooltip")})})]})]}),(0,a.jsx)("span",{className:"shrink-0 text-sm font-medium",children:j(t,o.currency)})]})]}):null}
1)(),(0,a.jsx)("div",{className:"my-2.5 h-px bg-gray-200"}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)("span",{className:"text-sm font-semibold",children:y("upgradeDialog.invoicePreview.amountDue")}),(0,a.jsx)("span",{className:"shrink-0 text-xl font-semibold tracking-tight",children:j(M,o.currency)})]})]}),(()=>{let{remainingBalance:e}=w();return e>0?(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-t border-gray-100 bg-gray-50/70 px-4 py-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-sm",children:y("upgradeDialog.invoicePreview.remainingBalance")}),(0,a.jsxs)(E.m_,{children:[(0,a.jsx)(E.k$,{asChild:!0,children:(0,a.jsx)(D.A,{className:"size-3.5"})}),(0,a.jsx)(E.ZI,{side:"top",align:"end",sideOffset:5,className:"border-gray-200 bg-white text-gray-900 shadow-md",children:(0,a.jsx)("p",{className:"max-w-xs text-xs",children:y("upgradeDialog.invoicePreview.remainingBalanceTooltip")})})]})]}),(0,a.jsx)("span",{className:"shrink-0 text-sm font-medium",children:j(e,o.currency)})]}):null})()]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(()=>{let e=o.lines.data.find(e=>!e.proration&&e.amount>0);return(null==e?void 0:e.period.start)&&(null==e?void 0:e.period.end)?(0,a.jsxs)("p",{className:"text-xs",children:[y("upgradeDialog.invoicePreview.newBillingPeriod")," ",N(e.period.start)," ","–"," ",N(e.period.end)]}):null})(),(0,a.jsx)("p",{className:"text-xs",children:y("upgradeDialog.invoicePreview.effectiveImmediately")})]})]}):(0,a.jsx)("div",{className:"flex justify-center py-10",children:(0,a.jsx)("div",{className:"size-8 animate-spin rounded-full border-4 border-pokee-purple border-t-transparent"})}),(0,a.jsxs)(h.Es,{className:"gap-2 pt-1",children:[(0,a.jsx)(g.$,{variant:"outline",onClick:s,disabled:l,className:"w-full rounded-lg sm:w-auto",children:y("upgradeDialog.buttons.cancel")}),(0,a.jsx)(g.$,{onClick:i,disabled:l||!o,className:"w-full rounded-lg bg-black text-white hover:bg-pokee-black-hover sm:w-auto",children:O})]})]})}})()})})})}let M=(0,i.loadStripe)("pk_live_51QmWY2ISPxBPQbjlDCz6SaAqnLS2ttmH8hXW3SfgDQJaMIZNQNucjwUslAEpksWSZCL3sDkO5GsOc92S6uREoxAE00WoQT9BE3"),O=[],I=e=>{let{initialPlans:r=O}=e,t=(0,n.c)(),i=(0,n.c)("Pricing"),g=(0,o.Ym)(),h=(0,c.useMemo)(()=>(e=>[{title:e("Pricing.features.free.0.title"),description:e("Pricing.features.free.0.description")}])(t),[t]),f=(0,c.useMemo)(()=>((e,r)=>[{title:e("Pricing.features.tier1.0.title",r?{credits:r.toLocaleString()}:{credits:"2,000"}),description:e("Pricing.features.tier1.0.description")}])(t,2e3),[t]),b=(0,c.useMemo)(()=>((e,r)=>[{title:e("Pricing.features.tier2.0.title",r?{credits:r.toLocaleString()}:{credits:"6,000"}),description:e("Pricing.features.tier2.0.description")}])(t,6e3),[t]),v=(0,c.useMemo)(()=>((e,r)=>[{title:e("Pricing.features.tier3.0.title",r?{credits:r.toLocaleString()}:{credits:"40,000"}),description:e("Pricing.features.tier3.0.description")}])(t,4e4),[t]),[j,N]=(0,c.useState)(!1),[k,w]=(0,c.useState)(null),[_,P]=(0,c.useState)(()=>r.length>0),C=(0,c.useMemo)(()=>({free:{name:i("plans.free.name"),description:i("plans.free.description"),interval:i("plans.free.interval")},tier1:{name:i("plans.tier1.name"),description:i("plans.tier1.description"),interval:i("plans.tier1.interval")},tier2:{name:i("plans.tier2.name"),description:i("plans.tier2.description"),interval:i("plans.tier2.interval")},tier3:{name:i("plans.tier3.name"),description:i("plans.tier3.description"),interval:i("plans.tier3.interval")}}),[i]),[T,D]=(0,c.useState)({}),[E,I]=(0,c.useState)(r),[L,F]=(0,c.useState)(0===r.length),{user:z,isLoaded:U}=(0,s.Jd)(),[R,B]=(0,c.useState)(null),J=["free","tier1","tier2","tier3"],[$,Y]=(0,c.useState)(!1),[q,Z]=(0,c.useState)(null),[H,Q]=(0,c.useState)(0),[G,W]=(0,c.useState)(null),[V,X]=(0,c.useState)(""),[K,ee]=(0,c.useState)(""),[er,et]=(0,c.useState)(""),[ea,es]=(0,c.useState)(null),[ei,el]=(0,c.useState)("preview"),[en,eo]=(0,c.useState)(!1),[ec,ed]=(0,c.useState)(null);(0,c.useEffect)(()=>{ed(new URLSearchParams(window.location.search).get("redirect"))},[]);let ep={free:{name:i("plans.free.name"),price:i("plans.free.price"),interval:i("plans.free.interval"),description:i("plans.free.description")}
1,tier1:{name:i("plans.tier1.name"),price:i("plans.tier1.price"),interval:i("plans.tier1.interval"),description:i("plans.tier1.description")},tier2:{name:i("plans.tier2.name"),price:i("plans.tier2.price"),interval:i("plans.tier2.interval"),description:i("plans.tier2.description")},tier3:{name:i("plans.tier3.name"),price:i("plans.tier3.price"),interval:i("plans.tier3.interval"),description:i("plans.tier3.description")}},eu=e=>{let r=C[e.plan];return r?{...e,name:r.name,description:r.description}:e};(0,c.useEffect)(()=>{let e=0===r.length;e&&F(!0);let t=e?(0,x.t)("/api/subscription-plans").then(e=>e.json()).then(e=>{let r=(Array.isArray(e)?e:e.plans||[]).filter(e=>J.includes(e.plan)).map(eu);return I(r),r}):Promise.resolve(E);z?Promise.all([t,(0,x.t)("/api/subscription-status",{method:"POST"}).then(e=>e.ok?e.json():null).then(e=>e?(B(e),e):null)]).catch(e=>console.error("Error fetching data:",e)).finally(()=>{e&&F(!1)}):e?t.catch(e=>console.error("Error fetching plans:",e)).finally(()=>{F(!1)}):(0,x.t)("/api/subscription-plans").then(e=>e.json()).then(e=>{let r=(Array.isArray(e)?e:e.plans||[]).filter(e=>J.includes(e.plan));r.length>0&&I(r.map(eu))}).catch(e=>console.error("Error refreshing plans:",e))},[z,C]),(0,c.useEffect)(()=>{(async()=>{if(null==R?void 0:R.stripe_customer_id)try{let e=await (0,x.t)("/api/retrieve-stripe-subscription",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerId:R.stripe_customer_id})});if(e.ok){let r=await e.json();if(r.data&&r.data.length>0){let e=r.data[0].plan.interval;w(e),N("yearly"===e)}P(!0)}else{let r=await e.json();console.error("Error fetching Stripe subscriptions:",r),P(!0)}}catch(e){console.error("Error fetching Stripe data:",e),P(!0)}else P(!0)})()},[null==R?void 0:R.stripe_customer_id]);let em=async(e,r)=>{if((null==R?void 0:R.payment_provider)==="apple_iap")return void(0,m.oR)({title:i("cards.buttons.managedInAppStore"),description:t("User.managed_in_app_store"),variant:"destructive"});D(r=>({...r,[e]:!0}));try{var a;let t=await M;if(!t)return void console.error("Stripe failed to initialize");let s=E.find(r=>r.price_id===e),i=(null==s?void 0:s.interval)||(j?"yearly":"monthly"),l=await (0,x.t)("/api/create-checkout-session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({priceId:e,email:(null==z||null==(a=z.emailAddresses[0])?void 0:a.emailAddress)||"",plan:r,interval:i,redirect:ec})});if(!l.ok){let e=await l.json().catch(()=>({}));(0,m.oR)({title:"Can't start checkout",description:e.error||"Failed to start checkout. Please try again.",variant:"destructive"});return}let{sessionId:n}=await l.json(),o=await t.redirectToCheckout({sessionId:n});o.error&&console.error(o.error)}catch(e){console.error("Subscription error:",e)}finally{D(r=>({...r,[e]:!1}))}},ex=async(e,r,t,a,s)=>{if(e&&r){D(r=>({...r,[e]:!0})),el("preview");try{let i=await (0,x.t)("/api/upgrade-subscription",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({newPriceId:e,newPlan:r,interval:t,prorationDate:a,subscriptionId:s,redirect:ec})});if(!i.ok){let e=await i.json();throw Error(e.error||"Failed to upgrade subscription")}el("success"),"no-redirect"!==ec&&setTimeout(()=>{ec&&"no-redirect"!==ec?window.location.href=ec:window.location.href="/dashboard"},2e3)}catch(e){console.error("Subscription upgrade error:",e),el("error")}finally{D(r=>({...r,[e]:!1}))}}},eg=async(e,r,a)=>{if((null==R?void 0:R.payment_provider)==="apple_iap")return void(0,m.oR)({title:i("cards.buttons.managedInAppStore"),description:t("User.managed_in_app_store"),variant:"destructive"});let s=E.find(r=>r.price_id===e);if(s){W(e),X(s.name),ee(s.plan),et(s.interval),Y(!0),Z(null),es(null),el("preview");try{let t=await (0,x.t)("/api/preview-upgrade-subscription",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({newPriceId:e,subscriptionId:r,customerId:a})});if(!t.ok)throw Error("Failed to fetch invoice preview");let{invoice:s,prorationDate:i,customerBalance:l}=await t.json();Z(s),es(i),Q(l)}catch(e){console.error("Error fetching invoice preview:",e),Y(!1)}}},eh=async()=>{G&&ea&&await ex(G,K,er,ea,(null==R?void 0:R.subscription_id)||"")},ef=(e=>!!e&&(!e.credits_expire_at||new Date(e.credits_expire_at)>new Date)&&"cancelled"!==e.subscription_status)(R)&&!!(null==R?void 0:R.plan)&&J.includes(R.plan)&&"free"!==R.plan,eb=(null==R?void 0:R.payment_provider)==="apple_iap",ev=(null==R?void 0:R.plan)?["free","tier1","tier2","tier3"].indexOf(R.plan):-1,ey=(0,c.useMemo)(()=>E.filter(e=>"free"===e.plan||(j?"yearly"===e.interval:"monthly"===e.interval)),[E,j]),ej=L&&0===E.length,eN=U&&!!z&&!R,ek=U&&!!z&&!!(null==R?void 0:R.stripe_customer_id)&&!_;return(0,a.jsx)(p.DemoDialogProvider,{isLoggedIn:!!z,children:(0,a.jsx)("div",{className:"selection:bg-pokee-purple/30 relative min-h-screen overflow-x-clip bg-white text-gray-900",children:(0,a.jsxs)("div",{className:"relative z-10",children:[(0,a.jsx)(c.Suspense,{children:(0,a.jsx)(u.NavBar,{theme:"light"})}),(0,a.jsxs)("section",{className:"relative overflow-hidden px-6 pb-0 pt-[148px] text-center md:px-8",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute left-1/2 top-0 size-[600px] -translate-x-1/2 -translate-y-1/2 roun
1ded-full bg-[radial-gradient(circle_at_center,rgba(120,76,217,0.12)_0%,transparent_60%)] blur-3xl"}),(0,a.jsxs)("div",{className:"relative z-10 mx-auto max-w-2xl",children:[(0,a.jsx)("h1",{className:"mb-6 mt-12 text-4xl font-medium tracking-tight text-gray-900 md:text-5xl",children:i("page.heading")}),(0,a.jsx)("div",{className:"mb-8 flex justify-center",children:(0,a.jsxs)("div",{className:"inline-flex rounded-full border border-black/10 bg-black/5 p-1 backdrop-blur-md",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>N(!1),className:"relative rounded-full px-6 py-2.5 text-sm font-semibold transition-colors duration-300 ".concat(j?"text-gray-600 hover:text-gray-900":"text-gray-900"),children:[!j&&(0,a.jsx)(l.P.div,{layoutId:"pricingSwitcher",className:"absolute inset-0 rounded-full bg-white/90 shadow-sm backdrop-blur-sm",transition:{type:"spring",stiffness:400,damping:30}}),(0,a.jsx)("span",{className:"relative z-10",children:i("toggle.monthly")})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>N(!0),className:"relative rounded-full px-6 py-2.5 text-sm font-semibold transition-colors duration-300 ".concat(j?"text-gray-900":"text-gray-600 hover:text-gray-900"),children:[j&&(0,a.jsx)(l.P.div,{layoutId:"pricingSwitcher",className:"absolute inset-0 rounded-full bg-white/90 shadow-sm backdrop-blur-sm",transition:{type:"spring",stiffness:400,damping:30}}),(0,a.jsxs)("span",{className:"relative z-10",children:[i("toggle.yearly")," ",(0,a.jsx)("span",{className:"text-pokee-purple",children:i("toggle.discount")})]})]})]})})]})]}),(0,a.jsxs)("div",{className:"container mx-auto p-4",children:[ej||eN||ek?(0,a.jsx)("div",{className:"flex justify-center py-8",children:(0,a.jsx)("div",{className:"size-8 animate-spin rounded-full border-4 border-pokee-purple border-t-transparent"})}):(0,a.jsx)(S,{plans:ey,allPlans:E,defaultPlans:ep,features:{free:h,lite:f,pro:b,ultra:v},loadingStates:T,subscription:R,hasPaidPlan:ef,currentPlanTier:ev,duration:j?"yearly":"monthly",handleSubscribe:em,handleUpgradeClick:eg,stripeInterval:k,isStripeDataLoaded:_,isOrgMember:!!(null==R?void 0:R.org),isAppleSub:eb}),(0,a.jsx)("div",{className:"py-12 text-center",children:(0,a.jsxs)("div",{className:"mx-auto max-w-2xl rounded-2xl border border-black/10 bg-gray-50 p-8",children:[(0,a.jsx)("h2",{className:"mb-2 text-xl font-semibold text-gray-900",children:i("topup_callout.title")}),(0,a.jsx)("p",{className:"mb-6 text-gray-600",children:i("topup_callout.description")}),(0,a.jsx)("a",{href:(null==R?void 0:R.org)?"/".concat(g,"/pricing/enterprise/top-up"):"/pricing/top-up",className:"inline-flex items-center justify-center rounded-full bg-pokee-purple px-6 py-3 font-medium text-white transition-colors hover:bg-pokee-purple-hover",children:i("topup_callout.button")})]})}),(0,a.jsx)("div",{className:"py-16 text-center",children:(0,a.jsxs)("div",{className:"mx-auto max-w-2xl rounded-lg p-8",children:[(0,a.jsx)("h2",{className:"mb-4 text-xl font-semibold text-gray-900",children:i("enterprise_callout.title")}),(0,a.jsx)("p",{className:"mb-8 text-gray-600",children:i("enterprise_callout.description")}),(0,a.jsx)("a",{href:"en"===g?"/pricing/enterprise":"/".concat(g,"/pricing/enterprise"),className:"inline-flex cursor-pointer items-center justify-center rounded-full border border-black/10 px-6 py-3 font-medium text-gray-900 transition-all hover:border-black/20 hover:bg-black/[0.03]",children:i("enterprise_callout.button")})]})}),(0,a.jsx)(A,{isOpen:$,onClose:()=>{Y(!1),el("preview")},onConfirm:eh,isLoading:!!G&&(T[G]||!1),invoicePreview:q,newPlanName:V,status:ei,onRetry:eh,planInterval:j?"yearly":"monthly",customerBalance:H,redirect:ec}),(0,a.jsx)(y,{isOpen:en,onClose:()=>eo(!1)})]}),(0,a.jsx)("div",{className:"border-t border-black/10 px-6 md:px-12",children:(0,a.jsx)(d.default,{})})]})})})};function L(){let{initialPlans:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.jsx)(I,{initialPlans:e})}},46292:(e,r,t)=>{"use strict";t.d(r,{t:()=>a});let a=async(e,r)=>{let t=(()=>{let e=document.cookie.match(/(^|;\s*)__csrf=([^;]*)/);return e?decodeURIComponent(e[2]):""})(),a=new Headers(null==r?void 0:r.headers);t&&a.set("X-CSRF-Token",t);let s=await fetch(e,{...r,headers:a});if(403===s.status)try{let e=await s.clone().json();if((null==e?void 0:e.error)==="CSRF token validation failed"){let e="/sign-in?redirect_url=".concat(encodeURIComponent(window.location.href));return window.location.href=e,new Promise(()=>{})}}catch(e){}return s}},46767:(e,r,t)=>{"use strict";t.d(r,{Bc:()=>n,ZI:()=>d,k$:()=>c,m_:()=>o});var a=t(95155),s=t(47520),i=t(12115),l=t(27139);let n=s.Kq,o=s.bL,c=s.l9,d=i.forwardRef((e,r)=>{let{className:t,sideOffset:i=4,...n}=e;return(0,a.jsx)(s.ZL,{children:(0,a.jsx)(s.UC,{ref:r,sideOffset:i,className:(0,l.cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n})})});d.displayName=s.UC.displayName},61216:(e,r,t)=>{Promise.resolve().then(t.bind(t,40069))},62782:(e,r,t)=>{"use strict";t.d(r,{default:()=>d});var a=t(95155),s=t(15239),i=t(52619),l=t.n(i),n=t(18955),o=t(51567),c=t(12115);function d(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];let e=(0,n.c)("Footer"),r=(0,n.c)("FooterColumns"),t=(0,o.Ym)(),i=(0,c.useMemo)(()=>[{label:r("solutions.finance"),url:"/".concat(t,"/enterprise/finance")},{label:r("solutions.healthcare"),url:"/".concat(t,"/enterprise/healthcare")},{label:r("solutions.ecommerce"),url:"/".concat(t,"/enterprise/e-commerce")},{label:r("solutions.law"),url:"/".concat(t,"/enterprise/law")},{label:r("solutions.education"),url:"/".concat(t,"/enterprise/education")},{label:r("solutions.manufacturing"),url:"/".concat(t,"/enterprise/manufacturing")},{label:r("solutions.technology"),url:"/".concat(t,"/enterprise/technology")}],[r,t]),d=(0,c.useMemo)(()=>[{label:e("general.careers"),url:"/".concat(t,"/careers")},{label:r("company.security"),url:"/".concat(t,"/security")},{label:e("general.contact"),url:"/".concat(t,"/request-demo")}],[e,r,t]),p=(0,c.useMemo)(()=>[{label:e("follow.twitter"),url:"https://x.com/Pokee_AI",external:!0},{label:e("follow.linkedin"),url:"https://www.linkedin.com/company/pokee-ai",external:!0},{label:e("follow.reddit"),url:"https://www.reddit.com/r/PokeeAI/",external:!0},{label:e("follow.discord"),url:"https://discord.gg/vkAx5PPk8j",external:!0}],[e]),u=(0,c.useMemo)(()=>[{label:r("resources.apiDocumentation"),url:"https://docs.pokee.ai",external:!0}],[r]),m=(0,c.useMemo)(()=>[{label:e("resources.terms"),url:"/legal/terms-of-service"},{label:e("resources.privacy"),url:"/legal/privacy-policy"},{label:e("resources.accessibility"),url:"/legal/accessibility"},{label:e("resources.status"),url:"https://status.pokee.ai",external:!0}],[e]),x=e=>{let{label:r,url:t,external:s}=e;return(0,a.jsx)(l(),{href:t,...s?{target:"_blank",rel:"noopener noreferrer"}:{},className:"text-base text-gray-600 transition-colors hover:text-gray-900",children:r},t)};return(0,a.jsxs)("footer",{className:"font-gabarito flex flex-col bg-white py-10 text-black md:py-12",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-14 lg:grid-cols-[minmax(16rem,22rem)_minmax(0,1fr)] lg:items-start lg:gap-x-32 lg:gap-y-0 xl:gap-x-44 2xl:gap-x-56",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-5 flex gap-4",children:[(0,a.jsx)(s.default,{src:"/pokee-circle.png",alt:"Pokee Logo",width:40,height:40}),(0,a.jsx)("h2",{className:"text-3xl font-medium text-black",children:e("blurb_title")})]}),(0,a.jsx)("p",{className:"max-w-prose text-lg leading-relaxed text-gray-800",children:e("blurb_description")})]}),(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-2 gap-x-8 gap-y-12 text-base sm:gap-x-10 lg:grid-cols-5 lg:gap-x-6 lg:gap-y-10 xl:gap-x-8",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"mb-4 text-base font-semibold tracking-wide text-black",children:r("header.solutions")}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:i.map(x)})]}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"mb-4 text-base font-semibold tracking-wide text-black",children:r("header.company")}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:d.map(x)})]}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"mb-4 text-base font-semibold tracking-wide text-black",children:e("follow_title")}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:p.map(x)})]}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"mb-4 text-base font-semibold tracking-wide text-black",children:r("header.resources")}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:u.map(x)})]}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"mb-4 text-base font-semibold tracking-wide text-black",children:r("header.legal")}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:m.map(x)})]})]})]}),(0,a.jsxs)("div",{className:"mt-16 flex flex-col gap-5 pt-2 text-base text-gray-600 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{children:e("bottom.copyright",{year:new Date().getFullYear()})}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-x-10 gap-y-2",children:[(0,a.jsx)(l(),{href:"/legal/terms-of-service",className:"text-gray-600 transition-colors hover:text-gray-900 hover:underline",children:e("bottom.terms_conditions")}),(0,a.jsx)(l(),{href:"/legal/privacy-policy",className:"text-gray-600 transition-colors hover:text-gray-900 hover:underline",children:e("bottom.privacy_policy")})]})]})]})}},65142:(e,r,t)=>{"use strict";t.d(r,{p:()=>l});var a=t(95155),s=t(12115),i=t(77979);let l=s.forwardRef((e,r)=>{let{className:t,type:s,...l}=e;return(0,a.jsx)("input",{type:s,className:(0,i.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-all duration-200 ease-in-out file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring hover:border-input/80 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-input",t),ref:r,...l})});l.displayName="Input"},76444:(e,r,t)=>{"use strict";t.d(r,{J:()=>c});var a=t(95155),s=t(10489),i=t(83101),l=t(12115),n=t(27139);let o=(0,i.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=l.forwardRef((e,r)=>{let{className:t,...i}=e;return(0,a.jsx)(s.b,{ref:r,className:(0,n.cn)(o(),t),...i})});c.displayName=s.b.displayName},77979:(e,r,t)=>{"use strict";t.d(r,{cn:()=>i});var a=t(2821),s=t(75889);function i(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return(0,s.QP)((0,a.$)(r))}},90757:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});var a=t(30926);let s=(0,a.createServerReference)("7fe7ced61a38ab78bf205e604f5c684c4537eff05b",a.callServer,void 0,a.findSourceMapURL,"detectKeylessEnvDriftAction")}},e=>{e.O(0,[24909,94018,51567,81356,52619,76862,76230,3500,49972,40791,49050,12441,47520,48007,52048,58236,93293,28441,31255,77358],()=>e(e.s=61216)),_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.