1"use strict";(self.webpackChunkdaybook=self.webpackChunkdaybook||[]).push([[2997],{97168:(e,t,r)=>{r.d(t,{cU:()=>a,iK:()=>n,k5:()=>s});var i=r(88125);const a=72,s=76,n=(0,i.A)((e=>({toolbar:{minHeight:a,"@media (min-width: 900px)":{minHeight:s}},content:{flexGrow:1,backgroundColor:e.palette.background.default,padding:e.spacing(2)},fab:{position:"fixed",top:e.spacing(11),right:e.spacing(4)},root:{flexGrow:1,display:"flex",flexDirection:"column",position:"relative",paddingBottom:"195px",paddingInline:e.spacing(2),paddingTop:e.spacing(11),maxWidth:"1280px",width:"100%",margin:"0 auto","@media (min-width: 900px)":{paddingBottom:"80.5px",paddingInline:e.spacing(3)},minHeight:"90vh"}})))},55487:(e,t,r)=>{r.d(t,{A:()=>o});r(9950);var i=r(14857),a=r(70971),s=r(44414);const n=()=>{const e=(0,i.A)(),t={backgroundColor:a.WX[e.palette.mode]};return(0,s.jsxs)("div",{className:"dotted-line-spinner",children:[(0,s.jsx)("div",{className:"bounce1",style:t}),(0,s.jsx)("div",{className:"bounce2",style:t}),(0,s.jsx)("div",{className:"bounce3",style:t})]})},o=()=>(0,s.jsx)(n,{})},22997:(e,t,r)=>{r.r(t),r.d(t,{default:()=>_});var i=r(9950),a=r(98341),s=r(65471),n=r(44414);const o=(0,s.A)((0,n.jsx)("path",{d:"M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02z"}),"Phone"),l=(0,s.A)((0,n.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done");var c=r(10226),d=r(46639),u=r(88125),m=r(85913),p=r(72004),h=r(97168),b=r(55487),g=r(73727),x=r(275),f=r(17550),y=r(70967),v=r(39225),k=r(66642),j=r(97563),w=r(94212),A=r(28429);const C=(0,i.lazy)((()=>Promise.all([r.e(7591),r.e(5277),r.e(1618),r.e(5897),r.e(144)]).then(r.bind(r,25679)))),S={Lifetime:{priceId:"",productId:"",type:"lifetime",amtWithoutDiscount:"",amt:"",mode:"payment",desc:"",coupon:""},Monthly:{priceId:"",productId:"",type:"monthly",amtWithoutDiscount:"",amt:"",mode:"subscription",desc:"",coupon:""},Annually:{priceId:"",type:"annually",productId:"",amtWithoutDiscount:"",amt:"",mode:"subscription",desc:"",coupon:""}},P=(0,n.jsxs)("span",{className:"flex items-center",children:[(0,n.jsx)(o,{}),(0,n.jsx)("span",{children:"Contact us"})]}),N=[{title:"Basic",subTitle:"Daybook's basic features for free",description:["Unlimited entries","Sync across multiple devices","Works with Voice assistants","Daily reminders","Works offline"],divId:"basic",buttonText:"Current plan",buttonVariant:"outlined",order:0},{title:"Premium",subTitle:"Make your experience even better",description:["All in basic plan","Gain access to premium on all platforms: IOS, Android, Digital Assistants","Create custom Templates","Personalize with more themes","Upload more photos with higher resolution","Word Analysis","More premium features"],divId:"premium",buttonText:"Try it for free",buttonVariant:"contained",order:1},{title:"Business",subTitle:"Get daybook customized for your enterprise",description:["All in basic plan plus","Guided Journal","Personalize with themes","Unlimited entries"],divId:"premium",buttonText:"Contact us",buttonVariant:"outlined",order:2}],z=[y.EQ,y.z3,y.a7],M=(0,u.A)((e=>({btn:{borderStyle:"solid",borderWidth:"1px",borderColor:"rgba(118, 122, 122, 0.068)"},outlined:{borderRadius:"5px",borderStyle:"solid",borderWidth:"2px",color:"rgb(233, 116, 14)",borderColor:"#fb7500",backgroundColor:"rgb(255, 241, 233)",fontWeight:600},contained:{backgroundColor:"tomato",color:"white","&:hover":{backgroundColor:"#f75031"}},wrapper:{margin:e.spacing(1),position:"relative"},buttonProgress:{color:w.A[500],position:"absolute",top:"50%",left:"50%",marginTop:-12,marginLeft:-30}}))),_=()=>{const e=(0,A.Zp)(),{uid:t,email:s,subscriptionState:o,subscriptionType:u,hadPremium:w,tosUrl:_,privacyPolicyUrl:I}=((0,A.zy)(),(0,a.d4)((0,m.j8)({uid:f.B$,email:f.Hs,subscriptionState:v.wZ,subscriptionType:v.sx,hadPremium:v.F7,tosUrl:j.GR,privacyPolicyUrl:j.Ak}))),$=(0,h.iK)(),D=M(),[T,U]=(0,i.useState)(y.z3),[W,E]=(0,i.useState)(-1),[V,G]=(0,i.useState)(!1),[R,B]=(0,i.useState)(S),[Q,H]=(0,i.useState)(N),F=e=>({basic:"Free",premium:R[e].amt,business:P});(0,i.useEffect)((()=>{G(!1);const e=(0,x.jm)().then((e=>{const t=e.data(),r=Object.values(t).sort(((e,t)=>e.order-t.order));H(r)}
1)).catch((e=>{console.log("Error fetching premium features",e)})),t=(0,x.rU)().then((e=>B(e))).catch((e=>{console.log("Error fetching pricing data: ",e)}));Promise.all([e,t]).finally((()=>G(!0)))}),[]),(0,i.useEffect)((()=>{(s||t)&&(0,x.Yx)(s)}),[s,t]);const O=e=>T===e,K=(e,t)=>1===W&&t===W?"Please wait...":1===t&&(O(y.EQ)||w)?"Unlock Premium":e.buttonText;return(0,n.jsxs)("div",{children:[(0,n.jsx)(i.Suspense,{fallback:(0,n.jsx)(b.A,{}),children:(0,n.jsx)(C,{pageTitle:"Pricing"})}),o===v.Xk.Expired||"stripe"!==u?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:$.content,children:(0,n.jsx)("div",{className:$.toolbar})}),(0,n.jsxs)("div",{id:"pricing-container",children:[(0,n.jsxs)("div",{id:"pricing-left-div",children:[(0,n.jsx)("div",{id:"pricing-title",children:"Safeguard your memories. Choose a plan that suits you best."}),(0,n.jsx)(g.o,{src:r(5780),alt:"feature img",id:"pricing-feature-image"})]}),(0,n.jsxs)("div",{id:"pricing-right-div",children:[(0,n.jsx)("div",{id:"subscription-type",children:z.map(((e,t)=>(0,n.jsxs)(c.A,{className:(0,p.A)(D.btn,O(e)&&"btn-active"),onClick:()=>{U(e)},children:[O(e)&&(0,n.jsx)(l,{}),(0,n.jsx)("span",{children:e})]},t)))}),(0,n.jsx)("h2",{className:"tc",children:R[T].desc}),(0,n.jsx)("div",{id:"subscription-plans",children:Q.map(((r,i)=>(0,n.jsxs)("div",{id:r.divId,className:"class-plans",children:[(0,n.jsx)("h2",{children:r.title}),(0,n.jsx)("span",{children:r.subTitle}),(0,n.jsxs)("h1",{className:V?"":"loading-anim",children:[1===i&&R[T].amt!==R[T].amtWithoutDiscount&&!(0,x.G$)(R[T].coupon_expires)&&(0,n.jsxs)("span",{style:{fontSize:"smaller"},children:[(0,n.jsx)("del",{children:R[T].amtWithoutDiscount})," "]}),F(T)[r.divId]]}),(0,n.jsxs)("div",{className:D.wrapper,children:[(0,n.jsx)(c.A,{id:`${r.divId}-started`,onClick:()=>{var r;1==i?(r=`${R[T].payment_url}?client_reference_id=${t}&prefilled_email=${s}`,window.location.href=r):0==i&&e(k.yZ)},disabled:1===W||!V,className:(0,p.A)(D.btn,D[r.buttonVariant]),variant:r.buttonVariant,children:K(r,i)}),1===W&&i===W&&(0,n.jsx)(d.A,{size:24,className:D.buttonProgress})]}),(0,n.jsx)("ul",{className:"class-features-list",children:r.description.map(((e,t)=>(0,n.jsxs)("li",{children:[(0,n.jsx)(l,{}),(0,n.jsx)("span",{children:e})]},t)))})]},i)))}),(0,n.jsxs)("div",{className:"tc mb3",children:["By continuing, you agree to our"," ",(0,n.jsx)("a",{href:_,target:"_blank",rel:"noopener noreferrer",className:"nav-style link-blue",children:y.Mt})," ","and"," ",(0,n.jsx)("a",{href:I,target:"_blank",rel:"noopener noreferrer",className:"nav-style link-blue",children:y.yf})]})]})]})]}):(0,n.jsx)("h2",{className:"fullCenter",children:"Congrats! You're already premium"})]})}},275:(e,t,r)=>{r.d(t,{G$:()=>c,Yx:()=>u,dT:()=>d,jm:()=>b,rU:()=>h,uO:()=>m});var i=r(90202),a=r(43875),s=r(61273),n=r(70967),o=r(87685);const l="prod",c=e=>(0,o.UO)(e)<=(0,o.UO)(new Date),d=async(e,t,r,n,o,d,u)=>{const m=a.Cn.httpsCallable(`${l}Payment-createCheckoutSession`),p={price:t,success_url:`${window.location.origin}/settings?status=success`,cancel_url:`${window.location.origin}/pricing`,quantity:1,payment_method_types:["card"],mode:r,metadata:{priceId:t,productId:n,planType:o},tax_rates:[],...d||u&&c(u)?{discounts:[{coupon:d}]}:{allow_promotion_codes:!0}},{data:h}=await m(p),{docId:b}=h;if(b){(0,i.Xp)(e).doc(b).onSnapshot((async e=>{const{sessionId:t}=e.data()||{};if(t){const e=await s.t;e&&e.redirectToCheckout({sessionId:t})}}))}},u=async e=>{const t=a.Cn.httpsCallable(`${l}Payment-createStripeCustomer`),r=await t({email:e});return console.log("data: ",r),r},m=async()=>{const e=a.Cn.httpsCallable(`${l}Payment-createPortalLink`),{data:t}=await e({returnUrl:`${window.location.origin}/settings`});window.location.assign(t.url)},p={dybk_std_lifetime:n.EQ,dybk_std_yearly:n.z3,dybk_std_monthly:n.a7},h=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"usd";const t=await(0,i.rV)(l,e).get(),r={};return t.forEach((e=>{r[p[e.id]]=e.data()})),r},b=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-us";return(0,i.KW)(l,e).get()}},97563:(e,t,r)=>{r.d(t,{Ak:()=>x,ED:()=>b,GR:()=>f,IJ:()=>l,Kl:()=>c,RI:()=>h,Uu:()=>y,VV:()=>g,g9:()=>v});var i=r(85913),a=r(72095),s=r(39225),n=r(7093);const o=e=>(0,a.l$)(e,"remoteConfig")?e.remoteConfig:n.l,l=(0,i.Mz)([o],(e=>Number(e.maximumEntryCharacterAllowed))),c=(0,i.Mz)([o],(e=>Number(e.maximumTitleCharacterAllowed))),d=(0,i.Mz)([o],(e=>Number(e.image_quality_premium)/100)),u=(0,i.Mz)([o],(e=>Number(e.image_max_width_premium))),m=(0,i.Mz)([o],(e=>Number(e.image_max_height_premium))),p=(0,i.Mz)([o],(e=>Number(e.mediaUploadCountPremium))),h=(0,i.Mz)([s.QP,d],((e,t)=>
1e?.7:t)),b=(0,i.Mz)([s.QP,u],((e,t)=>e?800:t)),g=(0,i.Mz)([s.QP,m],((e,t)=>e?600:t)),x=(0,i.Mz)([o],(e=>e.appPrivacyPolicyUrl)),f=(0,i.Mz)([o],(e=>e.tosUrl)),y=(0,i.Mz)([o],(e=>e.introBotMessage)),v=(0,i.Mz)([s.QP,p],((e,t)=>e?6:Number(t)))},46639:(e,t,r)=>{r.d(t,{A:()=>N});var i=r(98587),a=r(58168),s=r(9950),n=r(72004),o=r(88465),l=r(88283),c=r(61676),d=r(18463),u=r(59254),m=r(1763),p=r(423);function h(e){return(0,p.Ay)("MuiCircularProgress",e)}(0,m.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var b=r(44414);const g=["className","color","disableShrink","size","style","thickness","value","variant"];let x,f,y,v,k=e=>e;const j=44,w=(0,l.i7)(x||(x=k` 2 0% { 3 transform: rotate(0deg); 4 } 5 6 100% { 7 transform: rotate(360deg); 8 } 9`)),A=(0,l.i7)(f||(f=k` 10 0% { 11 stroke-dasharray: 1px, 200px; 12 stroke-dashoffset: 0; 13 } 14 15 50% { 16 stroke-dasharray: 100px, 200px; 17 stroke-dashoffset: -15px; 18 } 19 20 100% { 21 stroke-dasharray: 100px, 200px; 22 stroke-dashoffset: -125px; 23 } 24`)),C=(0,u.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${(0,c.A)(r.color)}`]]}})((e=>{let{ownerState:t,theme:r}=e;return(0,a.A)({display:"inline-block"},"determinate"===t.variant&&{transition:r.transitions.create("transform")},"inherit"!==t.color&&{color:(r.vars||r).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,l.AH)(y||(y=k` 25 animation: ${0} 1.4s linear infinite; 26 `),w)})),S=(0,u.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),P=(0,u.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${(0,c.A)(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:r}=e;return(0,a.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,l.AH)(v||(v=k` 27 animation: ${0} 1.4s ease-in-out infinite; 28 `),A)})),N=s.forwardRef((function(e,t){const r=(0,d.b)({props:e,name:"MuiCircularProgress"}),{className:s,color:l="primary",disableShrink:u=!1,size:m=40,style:p,thickness:x=3.6,value:f=0,variant:y="indeterminate"}=r,v=(0,i.A)(r,g),k=(0,a.A)({},r,{color:l,disableShrink:u,size:m,thickness:x,value:f,variant:y}),w=(e=>{const{classes:t,variant:r,color:i,disableShrink:a}=e,s={root:["root",r,`color${(0,c.A)(i)}`],svg:["svg"],circle:["circle",`circle${(0,c.A)(r)}`,a&&"circleDisableShrink"]};return(0,o.A)(s,h,t)})(k),A={},N={},z={};if("determinate"===y){const e=2*Math.PI*((j-x)/2);A.strokeDasharray=e.toFixed(3),z["aria-valuenow"]=Math.round(f),A.strokeDashoffset=`${((100-f)/100*e).toFixed(3)}px`,N.transform="rotate(-90deg)"}return(0,b.jsx)(C,(0,a.A)({className:(0,n.A)(w.root,s),style:(0,a.A)({width:m,height:m},N,p),ownerState:k,ref:t,role:"progressbar"},z,v,{children:(0,b.jsx)(S,{className:w.svg,ownerState:k,viewBox:"22 22 44 44",children:(0,b.jsx)(P,{className:w.circle,style:A,ownerState:k,cx:j,cy:j,r:(j-x)/2,fill:"none",strokeWidth:x})})}))}))},5780:(e,t,r)=>{e.exports=r.p+"static/media/feature-image.afa26813fc53748bd0db.png"}}]);
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.