PageSourceSearch

https://app.pretask.ai/_next/static/chunks/pages/subscribe-0c4de4a…?dpl=dpl_3VmPiqvc5PELWuywYyaPQ7EU59UA

js pretask.ai collected 2026-10-05 15:45:20 UTC 10,125 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4744],{8557:(e,t,a)=>{"use strict";function n(e,t){let a=e.trim().toLowerCase();return a===t||a.startsWith(`${t} `)}function r(e,t){if(0===e.length)return;let a=function(e){let t=Array.isArray(e)?e[0]:e;if("string"!=typeof t)return null;let a=t.trim().toLowerCase();return"standard"===a||"pro"===a?a:null}(t);if(a){let t=e.find(e=>n(e.name,a));if(t)return t}let r=e.find(e=>n(e.name,"pro"));return r||(e.find(e=>e.recommended)??e[0])}function s(e,t="usd"){return new Intl.NumberFormat("en-US",{style:"currency",currency:(t??"usd").toUpperCase()}).format(e/100)}function i(e,t="usd"){return null==e?null:s(Math.round(e/12),t)}function l(e,t="usd"){let a=i(e,t);return a?`${a} / seat / month`:"Price unavailable"}a.d(t,{Ic:()=>l,LQ:()=>r,PD:()=>o,Ro:()=>s,Sn:()=>d,ps:()=>i});let o="Sign up for a product to start your 30-day free trial. Cancel before the trial ends to avoid a charge. Afterward, you’ll be billed annually, and your subscription will renew each year unless cancelled prior to renewal.";function d(e){return"trialing"===e?"You keep access until the trial ends. Auto-renew turns off and you will not be charged. This does not delete the organization.":"You keep access until the current paid period ends. Auto-renew turns off. This does not delete the organization."}},10653:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/subscribe",function(){return a(58749)}])},58749:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>p});var n=a(37876),r=a(14232),s=a(89099),i=a(91709),l=a(8557),o=a(92725),d=a(71168),c=a(80349),u=a(79361);let m="rounded-full bg-gray-100 px-2.5 py-0.5 text-[11px] font-medium text-gray-600",p=()=>{let e=(0,s.useRouter)(),{isAuthenticated:t,user:a}=(0,u.As)(),[p,x]=(0,r.useState)([]),[h,g]=(0,r.useState)(""),[b,f]=(0,r.useState)(""),[y,w]=(0,r.useState)(5),[k,_]=(0,r.useState)(null),[N,v]=(0,r.useState)(null),[j,E]=(0,r.useState)(!0),[C,S]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await o.u.listCatalog();if(e)return;x(t)}catch(t){e||v(t instanceof Error?t.message:"Failed to load plans")}finally{e||E(!1)}})(),()=>{e=!0}},[]),(0,r.useEffect)(()=>{if(!e.isReady||0===p.length)return;let t=(0,l.LQ)(p,e.query.plan);_(t?.id??null)},[p,e.isReady,e.query.plan]),(0,r.useEffect)(()=>{a?.email&&!b&&f(a.email)},[a?.email,b]);let A=(0,r.useMemo)(()=>p.find(e=>e.id===k)??null,[p,k]),F=async()=>{if(!h.trim()||!b.trim()||y<1||!A)return void v("Enter an organization name, administrator email, and package.");S(!0),v(null);try{let e=await o.u.createCheckoutSession({bundleId:A.id,quantity:y,orgName:h.trim(),email:b.trim()});window.location.assign(e.url)}catch(e){v(e instanceof Error?e.message:"Failed to start checkout"),S(!1)}};return(0,n.jsxs)("div",{className:"min-h-screen bg-[#F4F5F7]",children:[(0,n.jsxs)("header",{className:"flex h-16 items-center justify-between bg-[#1a1d21] px-6 text-white",children:[(0,n.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Pretask.AI"}),(0,n.jsx)("a",{href:c.J.login,className:"text-sm text-white/80 hover:text-white",children:"Sign in"})]}),(0,n.jsx)("main",{className:"mx-auto max-w-3xl px-4 py-12",children:(0,n.jsxs)(i.Zp,{padding:"lg",children:[t?(0,n.jsx)("p",{className:"text-sm text-[#6B7280]",children:"This purchase creates a new organization. If you already have one, you still get a second org. You will be org admin of this org only."}):null,(0,d.K)()?j?(0,n.jsx)("p",{className:"mt-6 text-sm text-[#6B7280]",children:"Loading packages…"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:`block text-xs font-semibold uppercase tracking-wide text-[#9CA3AF]${t?" mt-6":""}`,children:["Organization name",(0,n.jsx)("input",{className:"mt-2 h-11 w-full rounded-lg border border-gray-200 px-3 text-sm text-[#111827]",value:h,onChange:e=>g(e.target.value),placeholder:"Acme Construction"})]}),(0,n.jsxs)("label",{className:"mt-6 block text-xs font-semibold uppercase tracking-wide text-[#9CA3AF]",children:["Administrator email",(0,n.jsx)("input",{type:"email",autoComplete:"email",className:"mt-2 h-11 w-full rounded-lg border border-gray-200 px-3 text-sm text-[#111827]",value:b,onChange:e=>f(e.target.value),placeholder:"[email protected]"})]}),(0,n.jsx)("div",{className:"mt-6 grid gap-3 md:grid-cols-2",children:p.map(e=>{let t=e.id===k;return(0,n.jsxs)("button",{type:"button",onClick:()=>_(e.id),className:`rounded-xl border bg-white p-4 text-left ${t?"border-[#14B8A6] ring-1 ring-[#14B8A6]":"border-gray-200"}`,children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("p",{className:"text-base font-semibold text-[#111827]",children:e.name}),e.recommended?(0,n.jsx)("span",{className:"rounded-full bg-teal-50 px-2 py-0.5 text-[11px] font-semibold text-[#0a6a6e]",children:"Recommended"}):null]}),(0,n.jsxs)("p",{className:"mt-2 text-lg font-semibold text-[#111827]",children:[(0,l.ps)(e.unitAmou
1nt,e.currency)??"Price unavailable",(0,n.jsxs)("span",{className:"text-xs font-medium text-[#6B7280]",children:[" ","/ seat / month"]})]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-[#6B7280]",children:"Exclusive \xb7 one package per member"}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap gap-1.5",children:[e.productLabels.slice(0,1).map(e=>(0,n.jsx)("span",{className:m,children:e},e)),e.productLabels.length>1?(0,n.jsxs)("span",{className:m,children:["+",e.productLabels.length-1]}):null]})]},e.id)})}),(0,n.jsx)("p",{className:"mt-6 text-base font-semibold text-[#111827]",children:l.PD}),(0,n.jsxs)("div",{className:"mt-4 flex items-center gap-3",children:[(0,n.jsx)("span",{className:"text-sm font-medium text-[#111827]",children:"Seats"}),(0,n.jsxs)("div",{className:"inline-flex overflow-hidden rounded-lg border border-gray-200",children:[(0,n.jsx)("button",{type:"button",className:"h-10 w-10 text-lg disabled:text-gray-300",disabled:y<=1,onClick:()=>w(e=>Math.max(1,e-1)),children:"−"}),(0,n.jsx)("span",{className:"flex h-10 w-12 items-center justify-center border-x border-gray-200 text-sm",children:y}),(0,n.jsx)("button",{type:"button",className:"h-10 w-10 text-lg",onClick:()=>w(e=>e+1),children:"+"})]})]}),N?(0,n.jsx)("p",{className:"mt-4 text-sm text-red-600",children:N}):null,(0,n.jsx)("button",{type:"button",disabled:C||!A||!h.trim()||!b.trim(),onClick:()=>void F(),className:"mt-6 h-[42px] w-full rounded-lg bg-[#14B8A6] text-sm font-semibold text-white disabled:opacity-50",children:C?"Redirecting…":"Continue to checkout"}),(0,n.jsx)("p",{className:"mt-3 text-center text-xs text-[#6B7280]",children:"Payments secured by Stripe"}),t?(0,n.jsx)("button",{type:"button",className:"mt-4 text-sm text-[#14B8A6]",onClick:()=>void e.push(c.J.billing),children:"Manage current organization billing"}):null]}):(0,n.jsx)("p",{className:"mt-6 text-sm text-[#6B7280]",children:"Self-serve billing is not available yet. Contact [email protected]."})]})})]})}},71168:(e,t,a)=>{"use strict";a.d(t,{K:()=>s,q:()=>r});var n=a(65364);let r=()=>"true"===n.env.NEXT_PUBLIC_ENABLE_MISSING_FOR_BID,s=()=>"false"!==n.env.NEXT_PUBLIC_ENABLE_SELF_SERVE_BILLING},92725:(e,t,a)=>{"use strict";a.d(t,{u:()=>l});var n=a(27601);let r="backend",s=(e,t)=>{if(e&&"object"==typeof e&&"detail"in e){let t=e.detail;if("string"==typeof t)return t}return t},i=e=>({hasSubscription:e.has_subscription,bundleId:e.bundle_id,bundleName:e.bundle_name,productKeys:e.product_keys??[],productLabels:e.product_labels??[],licenseCount:e.license_count,usedLicenseCount:e.used_license_count,endsAt:e.ends_at,status:e.status,cancelAtPeriodEnd:e.cancel_at_period_end,autoRenew:e.auto_renew,paymentBrand:e.payment_brand,paymentLast4:e.payment_last4,invoices:(e.invoices??[]).map(e=>({id:e.id,date:e.date,description:e.description,amount:e.amount,currency:e.currency,status:e.status}))});class l{static async listCatalog(){let e=await n.ok.get(r,"/api/v1/billing/catalog");if(!e.ok)throw Error(s(e.data,"Failed to load plans"));return(e.data.items??[]).map(e=>({id:e.id,name:e.name,stackingMode:e.stacking_mode,productKeys:e.product_keys??[],productLabels:e.product_labels??[],stripePriceId:e.stripe_price_id,unitAmount:e.unit_amount,currency:e.currency,recommended:!!e.recommended}))}static async createCheckoutSession(e){let t=await n.ok.post(r,"/api/v1/checkout-sessions",{bundle_id:e.bundleId,quantity:e.quantity,org_name:e.orgName,email:e.email});if(!t.ok)throw Error(s(t.data,"Failed to start checkout"));return{url:t.data.url,sessionId:t.data.session_id}}static async getProvisioning(e){let t=await n.ok.get(r,`/api/v1/checkout-sessions/${encodeURIComponent(e)}/provisioning`);if(!t.ok)throw Error(s(t.data,"Failed to check provisioning"));return{status:t.data.status,organizationId:t.data.organization_id,organizationName:t.data.organization_name,checkoutUrl:t.data.checkout_url??null,adminEmail:t.data.admin_email??null}}static async getSummary(){let e=await n.ok.get(r,"/api/v1/billing/summary");if(!e.ok)throw Error(s(e.data,"Failed to load billing"));return i(e.data)}static async createPortalSession(e){let t=await n.ok.post(r,"/api/v1/billing/portal-sessions",{flow:e??null});if(!t.ok)throw Error(s(t.data,"Failed to open Stripe portal"));return t.data.url}static async previewChange(e){let t=await n.ok.post(r,"/api/v1/billing/preview-change",{quantity:e.quantity,bundle_id:e.bundleId});if(!t.ok)throw Error(s(t.data,"Failed to preview billing change"));return{currency:t.data.currency,amountDue:t.data.amount_due,credit:t.data.credit,nextPeriodTotal:t.data.next_period_total}}static async cancelAtPeriodEnd(){let e=await n.ok.post(r,"/api/v1/billing/cancel-at-period-end",{});if(!e.ok)throw Error(s(e.data,"Failed to cancel subscription"));return i(e.data)}static async changeSeats(e){let t=await n.ok.post(r,"/api/v1/billing/change-seats",{quantity:e});if(!t.ok)throw Error(s(t.data,"Failed to update seats"));return i(t.data)}static async changePackage(e){let t=await n.ok.post(r,"/api/v1/billing/change-package",{bundle_id:e});if(!t.ok)throw Error(s(t.data,"Failed to update package"));return i(t.data)}}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=10653)),_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.