1import{a as z}from"./chunk-VV42GHYZ.js";import{a as J}from"./chunk-HW44AFLC.js";import{a as H}from"./chunk-LOMFTJVK.js";import{a as G}from"./chunk-U64ONAGY.js";import{p as X}from"./chunk-6HD6EQFO.js";import{l as T}from"./chunk-5JWU52HN.js";import{a as $}from"./chunk-X7NRWKZT.js";import{a as v}from"./chunk-OZQXZYN5.js";import{E as U,F as W,L as N,d as k,h as I}from"./chunk-HMSTZCTR.js";import{d as V,f as D,ga as j,ia as q,ja as B}from"./chunk-ISVXNFVV.js";import{Bb as A,Eb as C,Fb as c,Nb as s,Ob as E,Pb as f,Sa as i,W as y,Zb as R,_b as h,ab as S,ca as P,da as _,fb as u,nb as M,ob as a,qb as d,ra as b,rb as O,sb as m,ub as L,vb as F,wb as w,xb as l,yb as o,zb as p}from"./chunk-6TFHNCXV.js";var x=n=>({"text-foreground/90":n});function ne(n,r){if(n&1&&(p(0,"div",16),l(1,"div",17),s(2),o()),n&2){let t=c();a("ngClass",t.light?"border-green-500":"border-emerald-500/60"),i(),a("ngClass",t.light?"bg-green-500 text-white":"bg-emerald-950 text-emerald-300 border border-emerald-500/40"),i(),f(" ",t.highlightText," ")}}function re(n,r){if(n&1&&(l(0,"span",23),s(1),o()),n&2){let t=c(2);d("text-gray-400",t.light)("text-muted-foreground",!t.light),i(),f("$",t.round(t.price.amount/100/12),"")}}function le(n,r){if(n&1&&(l(0,"span",24),s(1),o(),l(2,"div")(3,"span",25),s(4),o(),s(5),o()),n&2){let t=c(2);a("ngClass",t.light?"bg-green-100 text-green-700":"bg-emerald-500/15 text-emerald-400"),i(),f(" ",r.label," "),i(3),f("$",t.price.amount/100,""),i(),f(" $",t.round(t.discountedAmount(t.price.amount)/100)," billed annually")}}function oe(n,r){if(n&1&&(l(0,"span",24),s(1),o(),l(2,"div"),s(3),o()),n&2){let t=c(2);a("ngClass",t.light?"bg-green-100 text-green-700":"bg-emerald-500/15 text-emerald-400"),i(),f(" Save ",t.price.id.endsWith("-lower")?"4":"3"," months "),i(2),f("billed annually as $",t.price.amount/100,"")}}function ae(n,r){if(n&1&&(l(0,"div",5)(1,"div",18),u(2,re,2,5,"span",19),l(3,"span",20),s(4,"$"),o(),s(5),l(6,"span",21),s(7,"/month"),o()(),l(8,"div",22),u(9,le,6,4)(10,oe,4,3),o()()),n&2){let t,e=c();i(),d("text-gray-900",e.light)("text-foreground",!e.light),i(),m(e.discountOffer?2:-1),i(),d("text-gray-500",e.light)("text-muted-foreground",!e.light),i(2),E(e.round(e.discountedAmount(e.price.amount)/100/12)),i(),d("text-gray-500",e.light)("text-muted-foreground",!e.light),i(2),d("text-gray-500",e.light)("text-muted-foreground",!e.light),i(),m((t=e.discountOffer)?9:10,t)}}function de(n,r){if(n&1&&(l(0,"span",23),s(1),o()),n&2){let t=c(2);d("text-gray-400",t.light)("text-muted-foreground",!t.light),i(),f("$",t.round(t.price.amount/100),"")}}function se(n,r){if(n&1&&(l(0,"span",27),s(1),o()),n&2){let t=c(2);a("ngClass",t.light?"bg-green-100 text-green-700":"bg-emerald-500/15 text-emerald-400"),i(),f(" ",r.label," ")}}function ce(n,r){n&1&&s(0," billed monthly ")}function pe(n,r){if(n&1&&(l(0,"div",5)(1,"div",26),u(2,de,2,5,"span",19),l(3,"span",20),s(4,"$"),o(),s(5),l(6,"span",21),s(7,"/month"),o()(),l(8,"div",22),u(9,se,2,2,"span",27)(10,ce,1,0),o()()),n&2){let t,e=c();i(),d("text-gray-900",e.light)("text-foreground",!e.light),i(),m(e.discountOffer?2:-1),i(),d("text-gray-500",e.light)("text-muted-foreground",!e.light),i(2),E(e.round(e.discountedAmount(e.price.amount)/100)),i(),d("text-gray-500",e.light)("text-muted-foreground",!e.light),i(2),d("text-gray-500",e.light)("text-muted-foreground",!e.light),i(),m((t=e.discountOffer)?9:10,t)}}function ge(n,r){if(n&1&&p(0,"lucide-icon",10),n&2){let t=c();d("text-green-600",t.light)("text-emerald-400",!t.light),a("img",t.Check)}}function me(n,r){if(n&1&&p(0,"lucide-icon",14),n&2){let t=c();a("img",t.X)}}function ue(n,r){if(n&1&&p(0,"lucide-icon",10),n&2){let t=c();d("text-green-600",t.light)("text-emerald-400",!t.light),a("img",t.Check)}}function he(n,r){if(n&1&&p(0,"lucide-icon",14),n&2){let t=c();a("img",t.X)}}var Y=class n{appStateService=y(T);router=y(U);price;product;highlightText;light=!1;X=j;Check=D;get currentUser(){return this.appStateService.currentUser()}get highlighted(){return this.highlightText!==void 0}get discountOffer(){return this.appStateService.discountOffer()}discountedAmount(r){let t=this.discountOffer;return t?r*(1-t.percentOff/100):r}round(r){return r.toFixed(r%1===0?0:2)}getStringFromRecordingLimit(r){return r>5400?`${r/60/60} hour`:`${r/60} minute`}async handleProductPriceClick(r,t){v.capture("Select Plan Clicked",{"Product ID":r.id,"Price ID":t.id,"Price Amount":t.amount,"Price Frequency":t.frequency}
1),this.currentUser?await this.handleCheckout(t.id):(H({priceId:t.id,productId:r.id,productName:r.name,frequency:t.frequency==="MONTHLY"?"MONTHLY":"YEARLY",amountCents:t.amount}),await this.router.navigate(["/signup"]))}async handleCheckout(r){console.log("Starting checkout for price:",r),await this.appStateService.startCheckout(r)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=S({type:n,selectors:[["app-plan"]],inputs:{price:"price",product:"product",highlightText:"highlightText",light:"light"},decls:71,vars:132,consts:[[1,"relative","h-full"],["variant","default",1,"flex-col","h-full",3,"light"],[1,"p-6","pt-5","flex","flex-col","flex-grow"],[1,"text-center","mb-5"],[1,"text-xl","font-bold"],[1,"text-center","mb-6"],[1,"flex-grow","mb-6"],[1,"space-y-3"],[1,"flex","items-center","gap-3"],[1,"w-5","h-5","flex-shrink-0","rounded-full","flex","items-center","justify-center",3,"ngClass"],[1,"w-3","h-3",3,"img"],[1,"text-sm",3,"ngClass"],[1,"border-t","my-4"],[1,"w-3","h-3",3,"img","text-green-600","text-emerald-400"],[1,"w-3","h-3","text-red-400",3,"img"],[3,"click"],[1,"absolute","inset-0","z-10","border-2","rounded-2xl","pointer-events-none",3,"ngClass"],[1,"absolute","-top-3","left-1/2","z-20","-translate-x-1/2","whitespace-nowrap","px-3","py-1","text-xs","font-semibold","rounded-full","shadow",3,"ngClass"],[1,"text-4xl","font-bold","mb-2"],[1,"text-lg","line-through","mr-2",3,"text-gray-400","text-muted-foreground"],[1,"text-xl","mr-1"],[1,"text-lg","ml-1"],[1,"text-sm"],[1,"text-lg","line-through","mr-2"],[1,"inline-flex","items-center","px-2.5","py-1","rounded-full","text-xs","font-medium","mb-1",3,"ngClass"],[1,"line-through"],[1,"text-4xl","font-bold","mb-1"],[1,"inline-flex","items-center","px-2.5","py-1","rounded-full","text-xs","font-medium",3,"ngClass"]],template:function(t,e){t&1&&(l(0,"div",0),u(1,ne,3,3),l(2,"app-card",1)(3,"div",2)(4,"div",3)(5,"span",4),s(6),o()(),u(7,ae,11,19,"div",5)(8,pe,11,19,"div",5),l(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9),p(13,"lucide-icon",10),o(),l(14,"span",11),s(15,"Works on Mac and web"),o()(),l(16,"div",8)(17,"div",9),p(18,"lucide-icon",10),o(),l(19,"span",11),s(20,"Unlimited words every month"),o()(),l(21,"div",8)(22,"div",9),p(23,"lucide-icon",10),o(),l(24,"span",11),s(25),o()(),p(26,"div",12),l(27,"div",8)(28,"div",9),p(29,"lucide-icon",10),o(),l(30,"span",11),s(31,"Dictate into any Mac app"),o()(),l(32,"div",8)(33,"div",9),p(34,"lucide-icon",10),o(),l(35,"span",11),s(36,"Verbatim transcripts"),o()(),l(37,"div",8)(38,"div",9),p(39,"lucide-icon",10),o(),l(40,"span",11),s(41,"Grammar clean-ups"),o()(),l(42,"div",8)(43,"div",9),p(44,"lucide-icon",10),o(),l(45,"span",11),s(46,"Polished rewrites"),o()(),l(47,"div",8)(48,"div",9),p(49,"lucide-icon",10),o(),l(50,"span",11),s(51,"One-click summaries"),o()(),l(52,"div",8)(53,"div",9),p(54,"lucide-icon",10),o(),l(55,"span",11),s(56,"Action-item lists"),o()(),l(57,"div",8)(58,"div",9),u(59,ge,1,5,"lucide-icon",13)(60,me,1,1,"lucide-icon",14),o(),l(61,"span",11),s(62,"Upload pre-recorded audio"),o()(),l(63,"div",8)(64,"div",9),u(65,ue,1,5,"lucide-icon",13)(66,he,1,1,"lucide-icon",14),o(),l(67,"span",11),s(68,"Mimic your writing style"),o()()()(),l(69,"button",15),C("click",function(){return e.handleProductPriceClick(e.product,e.price)}),s(70," Select plan "),o()()()()),t&2&&(i(),m(e.highlightText?1:-1),i(),a("light",e.light),i(3),d("text-gray-900",e.light)("text-foreground",!e.light),i(),E(e.product.name),i(),m(e.price.frequency==="YEARLY"?7:8),i(5),a("ngClass",e.light?"bg-green-100":"bg-emerald-500/15"),i(),d("text-green-600",e.light)("text-emerald-400",!e.light),a("img",e.Check),i(),d("text-gray-700",e.light),a("ngClass",h(110,x,!e.light)),i(3),a("ngClass",e.light?"bg-green-100":"bg-emerald-500/15"),i(),d("text-green-600",e.light)("text-emerald-400",!e.light),a("img",e.Check),i(),d("text-gray-700",e.light),a("ngClass",h(112,x,!e.light)),i(3),a("ngClass",e.light?"bg-green-100":"bg-emerald-500/15"),i(),d("text-green-600",e.light)("text-emerald-400",!e.light),a("img",e.Check),i(),d("text-gray-700",e.light),a("ngClass",h(114,x,!e.light)),i(),f("Up to ",e.getStringFromRecordingLimit(e.product.maxRecordingSeconds),"s per recording"),i(),d("border-gray-200",e.light)("border-border",!e.light),i(2),a("ngClass",e.light?"bg-green-100":"bg-emerald-500/15"),i(),d("text-green-600",e.light)("text-emerald-400",!e.light),a("img",e.Check),i(),d("text-gray-700",e.light),a("ngClass",h(116,x,!e.light)),i(3),a("ngClass",e.light?"bg-green-100":"bg-emerald-500/15"),i(),d("text-green-600",e.light)("text-emerald-400",!e.light),a("img",e.Check),i(),d("text-gray-700",e.light),a("ngClass",h(118,x,
1!e.light)),i(3),a("ngClass",e.light?"bg-green-100":"bg-emerald-500/15"),i(),d("text-green-600",e.light)("text-emerald-400",!e.light),a("img",e.Check),i(),d("text-gray-700",e.light),a("ngClass",h(120,x,!e.light)),i(3),a("ngClass",e.light?"bg-green-100":"bg-emerald-500/15"),i(),d("text-green-600",e.light)("text-emerald-400",!e.light),a("img",e.Check),i(),d("text-gray-700",e.light),a("ngClass",h(122,x,!e.light)),i(3),a("ngClass",e.light?"bg-green-100":"bg-emerald-500/15"),i(),d("text-green-600",e.light)("text-emerald-400",!e.light),a("img",e.Check),i(),d("text-gray-700",e.light),a("ngClass",h(124,x,!e.light)),i(3),a("ngClass",e.light?"bg-green-100":"bg-emerald-500/15"),i(),d("text-green-600",e.light)("text-emerald-400",!e.light),a("img",e.Check),i(),d("text-gray-700",e.light),a("ngClass",h(126,x,!e.light)),i(3),a("ngClass",e.product.canUploadFile?e.light?"bg-green-100":"bg-emerald-500/15":e.light?"bg-red-50":"bg-destructive/15"),i(),m(e.product.canUploadFile?59:60),i(2),d("text-gray-700",e.light&&e.product.canUploadFile)("text-gray-400",!e.product.canUploadFile),a("ngClass",h(128,x,!e.light&&e.product.canUploadFile)),i(3),a("ngClass",e.product.canMimicWritingStyle?e.light?"bg-green-100":"bg-emerald-500/15":e.light?"bg-red-50":"bg-destructive/15"),i(),m(e.product.canMimicWritingStyle?65:66),i(2),d("text-gray-700",e.light&&e.product.canMimicWritingStyle)("text-gray-400",!e.product.canMimicWritingStyle),a("ngClass",h(130,x,!e.light&&e.product.canMimicWritingStyle)),i(2),O(e.light?"btn-primary-dark w-full":"btn-primary w-full"))},dependencies:[I,k,B,q,G],encapsulation:2})};var fe=()=>[0,1,2],Q=(n,r)=>r.id;function xe(n,r){if(n&1&&p(0,"div",10),n&2){let t=c(3);a("ngClass",t.light?"border-gray-200 bg-gray-100":"border-border bg-muted/30")}}function ye(n,r){n&1&&F(0,xe,1,1,"div",10,L),n&2&&w(R(0,fe))}function Ce(n,r){if(n&1&&p(0,"app-plan",11),n&2){let t=r.$implicit,e=c().$implicit,g=c(2);a("product",e)("price",t)("light",g.light)("highlightText",g.highlightFor(e))}}function ve(n,r){if(n&1&&F(0,Ce,1,4,"app-plan",11,Q),n&2){let t=r.$implicit,e=c(2);w(e.getPricesForFrequency(t))}}function Pe(n,r){if(n&1){let t=A();l(0,"div",2)(1,"span",3),C("click",function(){P(t);let g=c();return _(g.setMonthlyBilling())}),s(2," Billed monthly "),o(),l(3,"div",4)(4,"button",5),C("click",function(){P(t);let g=c();return _(g.toggleBillingFrequency())}),l(5,"span",6),s(6,"Enable yearly billing"),o(),p(7,"span",7),o()(),l(8,"span",8),C("click",function(){P(t);let g=c();return _(g.setYearlyBilling())}),s(9," Billed yearly "),o()(),l(10,"div",9),u(11,ye,2,1),F(12,ve,2,0,null,null,Q),o()}if(n&2){let t=c();i(),d("text-muted-foreground",t.isYearlyBillingFrequency()&&!t.light)("text-foreground",!t.isYearlyBillingFrequency()&&!t.light)("text-gray-400",t.isYearlyBillingFrequency()&&t.light)("text-gray-700",!t.isYearlyBillingFrequency()&&t.light),i(3),d("focus:ring-offset-background",!t.light)("focus:ring-offset-white",t.light)("bg-emerald-500",t.isYearlyBillingFrequency())("bg-muted",!t.isYearlyBillingFrequency()),M("aria-checked",t.isYearlyBillingFrequency()),i(3),d("translate-x-6",t.isYearlyBillingFrequency())("translate-x-1",!t.isYearlyBillingFrequency()),i(),d("text-muted-foreground",!t.isYearlyBillingFrequency()&&!t.light)("text-foreground",t.isYearlyBillingFrequency()&&!t.light)("text-gray-400",!t.isYearlyBillingFrequency()&&t.light)("text-gray-700",t.isYearlyBillingFrequency()&&t.light),i(3),m(t.productsPending()&&t.getFilteredProducts().length===0?11:-1),i(),w(t.getFilteredProducts())}}function _e(n,r){if(n&1&&(l(0,"a",12),s(1," Create a free account "),o()),n&2){let t=c(2);a("ngClass",t.light?"text-gray-700 hover:text-gray-900":"text-foreground/90 hover:text-foreground")}}function be(n,r){if(n&1&&(l(0,"div",0),s(1," Or get started for free: 1,000 words every month on Mac and web. No card needed. "),u(2,_e,2,1,"a",12),o()),n&2){let t=c();a("ngClass",t.light?"text-gray-500":"text-muted-foreground"),i(2),m(t.currentUser?-1:2)}}function Se(n,r){if(n&1){let t=A();l(0,"div",1)(1,"div",13)(2,"div",14)(3,"div",15)(4,"div",16),p(5,"lucide-icon",17),o(),l(6,"div")(7,"h3",18),s(8,"Enterprise"),o(),l(9,"p",19),s(10,"Contact us to discu
1ss volume discounts for your business"),o()()(),l(11,"button",20),C("click",function(){P(t);let g=c();return _(g.openLiveChat())}),s(12," Contact sales "),o()()()()}if(n&2){let t=c();i(),a("ngClass",t.light?"bg-white border-gray-200":"bg-card border-border"),i(3),a("ngClass",t.light?"bg-gray-100":"bg-secondary"),i(),d("text-gray-600",t.light)("text-muted-foreground",!t.light),a("img",t.Building2),i(2),d("text-gray-900",t.light)("text-foreground",!t.light),i(2),d("text-gray-500",t.light)("text-muted-foreground",!t.light)}}var K=class n{appStateService=y(T);toastService=y($);pendingPlan=y(J);Building2=V;hiddenProductIds=[];hideEnterprise=!1;light=!1;showFreeCallout=!0;isYearlyBillingFrequency=b(!0);abPricingPrices=b("LOWER");productsPending=b(!0);get currentUser(){return this.appStateService.currentUser()}async ngOnInit(){let r=this.pendingPlan.reservedPlan();r&&this.isYearlyBillingFrequency.set(r.frequency==="YEARLY"),await this.fetchProducts()}highlightFor(r){return this.pendingPlan.reservedPlan()?.productId===r.id?"Your pick":r.id==="plus"?"Most popular":void 0}async fetchProducts(){try{await this.appStateService.fetchProducts()}catch(r){console.error("Failed to fetch products:",r)}finally{this.productsPending.set(!1)}}setYearlyBilling(){this.isYearlyBillingFrequency.set(!0),v.capture("Billing Frequency Changed",{Frequency:"yearly"})}setMonthlyBilling(){this.isYearlyBillingFrequency.set(!1),v.capture("Billing Frequency Changed",{Frequency:"monthly"})}toggleBillingFrequency(){this.isYearlyBillingFrequency.set(!this.isYearlyBillingFrequency());let r=this.isYearlyBillingFrequency()?"yearly":"monthly";v.capture("Billing Frequency Changed",{Frequency:r})}openLiveChat(){v.capture("Enterprise Contact Clicked"),z()||this.toastService.show("Live chat is still loading \u2014 please try again in a moment.","info")}getFilteredProducts(){return this.appStateService.products().filter(r=>!this.hiddenProductIds.includes(r.id))}getPricesForFrequency(r){let t=this.isYearlyBillingFrequency()?"YEARLY":"MONTHLY",e=this.abPricingPrices();return r.prices.filter(g=>g.frequency!==t||g.id.endsWith("-single")?!1:e==="LOWER"?g.id.endsWith("-lower"):!g.id.endsWith("-lower"))}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=S({type:n,selectors:[["app-plan-chooser"]],inputs:{hiddenProductIds:"hiddenProductIds",hideEnterprise:"hideEnterprise",light:"light",showFreeCallout:"showFreeCallout"},decls:3,vars:3,consts:[[1,"mt-8","text-center","text-sm",3,"ngClass"],[1,"mt-12","max-w-4xl","mx-auto"],[1,"text-center","mb-8"],[1,"cursor-pointer","mr-4","font-medium",3,"click"],[1,"inline-flex","items-center","mx-2"],["role","switch",1,"relative","inline-flex","h-6","w-11","items-center","rounded-full","transition-colors","duration-200","focus:outline-none","focus:ring-2","focus:ring-emerald-500","cursor-pointer","hover:brightness-110",3,"click"],[1,"sr-only"],[1,"inline-block","h-4","w-4","transform","rounded-full","bg-white","transition-transform","duration-200"],[1,"cursor-pointer","ml-4","font-medium",3,"click"],[1,"flex","flex-wrap","justify-center","gap-6","mx-auto","max-w-5xl"],[1,"w-full","sm:w-80","md:w-72","lg:w-80","h-[26rem]","rounded-xl","border","animate-pulse",3,"ngClass"],[1,"w-full","sm:w-80","md:w-72","lg:w-80",3,"product","price","light","highlightText"],["routerLink","/signup",1,"underline","font-medium",3,"ngClass"],[1,"rounded-2xl","border","shadow-md","overflow-hidden",3,"ngClass"],[1,"flex","flex-col","md:flex-row","items-center","justify-between","p-6"],[1,"flex","items-center","mb-4","md:mb-0"],[1,"p-2","mr-3","rounded-full",3,"ngClass"],[1,"w-5","h-5",3,"img"],[1,"text-lg","font-semibold","mb-1"],[1,"text-sm"],[1,"btn-secondary","flex-shrink-0",3,"click"]],template:function(t,e){t&1&&u(0,Pe,14,30)(1,be,3,2,"div",0)(2,Se,13,15,"div",1),t&2&&(m(e.abPricingPrices()==="ORIGINAL"||e.abPricingPrices()==="LOWER"?0:-1),i(),m(e.showFreeCallout?1:-1),i(),m(e.hideEnterprise?-1:2))},dependencies:[I,k,X,Y,B,q,N,W],encapsulation:2})};export{K as a};
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.