!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="280c2454-e4e6-463b-bb1b-98ddd8b55cba",e._sentryDebugIdIdentifier="sentry-dbid-280c2454-e4e6-463b-bb1b-98ddd8b55cba")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7700],{99336:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(57217);let o=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),s=function(){for(var e=arguments.length,t=Array(e),r=0;r!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let l=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:o=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:c="",children:d,iconNode:u,...m}=e;return(0,n.createElement)("svg",{ref:t,...a,width:o,height:o,stroke:r,strokeWidth:i?24*Number(l)/Number(o):l,className:s("lucide",c),...m},[...u.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(d)?d:[d]])}),i=(e,t)=>{let r=(0,n.forwardRef)((r,a)=>{let{className:i,...c}=r;return(0,n.createElement)(l,{ref:a,iconNode:t,className:s("lucide-".concat(o(e)),i),...c})});return r.displayName="".concat(e),r}},44037:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(99336).A)("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])},11707:(e,t,r)=>{r.d(t,{default:()=>o.a});var n=r(95152),o=r.n(n)},95152:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return i},getImageProps:function(){return l}});let n=r(40408),o=r(2228),s=r(74408),a=n._(r(46944));function l(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:a.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let i=s.Image},56706:(e,t,r)=>{r.d(t,{ErrorBoundary:()=>a});var n=r(57217);let o=(0,n.createContext)(null),s={didCatch:!1,error:null};class a extends n.Component{static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(null!==e){for(var t,r,n=arguments.length,o=Array(n),a=0;a0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,r)=>!Object.is(e,t[r]))}(e.resetKeys,n)){var o,a;null===(o=(a=this.props).onReset)||void 0===o||o.call(a,{next:n,prev:e.resetKeys,reason:"keys"}),this.setState(s)}}render(){let{children:e,fallbackRender:t,FallbackComponent:r,fallback:s}=this.props,{didCatch:a,error:l}=this.state,i=e;if(a){let e={error:l,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)i=t(e);else if(r)i=(0,n.createElement)(r,e);else if(void 0!==s)i=s;else throw l}return(0,n.createElement)(o.Provider,{value:{didCatch:a,error:l,resetErrorBoundary:this.resetErrorBoundary}},i)}constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=s}}},510:(e,t,r)=>{r.d(t,{v:()=>m});var n=r(28261),o=r(24746),s=r(2469),a=r(85564),l=r(44037),i=r(57217);let c={active:"text-yellow-400 fill-yellow-400",inactive:"text-gray-300",base:"w-5 h-5"},d=(0,i.memo)(function(e){let{rating:t,maxStars:r=5}=e;return(0,n.jsx)("div",{className:"flex mx-auto mb-2",role:"img","aria-label":"".concat(t," out of ").concat(r," stars"),children:Array.from({length:r},(e,r)=>(0,n.jsx)(l.A,{className:"".concat(c.base," ").concat(r{r.d(t,{ReviewsCarousel:()=>i});var n=r(28261),o=r(57217),s=r(510);let a=(0,o.memo)(function(e){let{review:t,showRating:r,isLast:o}=e;return(0,n.jsx)("div",{className:"w-64 flex-shrink-0 ".concat(o?"":"mr-8"),children:(0,n.jsx)(s.v,{review:t,showRating:r})})}),l=(0,o.memo)(function(e){let{direction:t,show:r,onClick:o}=e;return(0,n.jsx)("button",{onClick:o,className:"absolute ".concat(t,"-0 top-0 bottom-0 w-16 bg-transparent\n no-button-style shadow-none focus:ring-0 focus:outline-none active:bg-transparent \n border-none focus:border-none outline-none\n ").concat(r?"bg-gradient-".concat("left"===t?"to-r":"to-l"," from-white to-transparent"):"pointer-events-none"),"aria-label":"Scroll ".concat(t)})}),i=(0,o.memo)(function(e){let{reviews:t,showRatings:r,title:s="Some reviews",width:i,height:c}=e,d=(0,o.useRef)(null),[u,m]=(0,o.useState)(!1),[h,f]=(0,o.useState)(!0),[x,p]=(0,o.useState)(!1),[b,g]=(0,o.useState)({x:0,scrollLeft:0}),v=(0,o.useCallback)(()=>{if(!d.current)return;let{scrollLeft:e,scrollWidth:t,clientWidth:r}=d.current;m(e>0),f(e{d.current&&d.current.scrollBy({left:"left"===e?-300:300,behavior:"smooth"})},[]),w=(0,o.useCallback)(e=>{d.current&&(p(!0),g({x:e.pageX-d.current.offsetLeft,scrollLeft:d.current.scrollLeft}))},[]),j=(0,o.useCallback)(()=>{p(!1)},[]),k=(0,o.useCallback)(e=>{if(!x||!d.current)return;e.preventDefault();let t=(e.pageX-d.current.offsetLeft-b.x)*2;d.current.scrollLeft=b.scrollLeft-t},[x,b]),N=t.length<2,C=t.length<3&&"lg"===i;return(0,n.jsxs)("section",{className:"".concat("sm"===c?"mt-0 mb-0 p-0":""," section-separator"),children:[(0,n.jsx)("h3",{className:"text-2xl font-bold mb-4",children:s}),(0,n.jsxs)("div",{className:"w-full relative",children:[(0,n.jsx)("div",{className:"mx-auto mb-4 relative overflow-x-auto scrollbar-hide select-none\n max-w-[300px] sm:max-w-[380px] md:max-w-[420px] ".concat("lg"===i?"lg:max-w-[600px]":"","\n cursor-grab active:cursor-grabbing ").concat(N?"flex justify-center":""),ref:d,onScroll:v,onMouseDown:w,onMouseUp:j,onMouseLeave:j,onMouseMove:k,children:(0,n.jsx)("div",{className:"flex ".concat(C?"md:justify-center":""),children:t.map((e,o)=>(0,n.jsx)(a,{review:e,showRating:r,isLast:o===t.length-1},"review-".concat(o)))})}),(0,n.jsx)(l,{direction:"left",show:u,onClick:()=>y("left")}),(0,n.jsx)(l,{direction:"right",show:h,onClick:()=>y("right")})]})]})})},55871:(e,t,r)=>{r.d(t,{BuyBookButton:()=>l});var n=r(28261);r(57217);var o=r(50685),s=r(54743),a=r(38854);let l=e=>{let{book:t}=e,{isOpen:r,onOpen:l,onOpenChange:i}=(0,o.j)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.T,{color:"primary",onPress:l,children:"Buy Now"}),(0,n.jsx)(a.B,{book:t,isOpen:r,onOpen:l,onOpenChange:i})]})}},89019:(e,t,r)=>{r.d(t,{BuyBookLink:()=>l});var n=r(28261);r(57217);var o=r(50685),s=r(64356),a=r(38854);let l=e=>{let{book:t,children:r}=e,{isOpen:l,onOpen:i,onOpenChange:c}=(0,o.j)();return(0,n.jsxs)("div",{className:"mx-auto cursor-pointer",children:[(0,n.jsx)(s.h,{color:"primary",onPress:i,children:r}),(0,n.jsx)(a.B,{book:t,isOpen:l,onOpen:i,onOpenChange:c})]})}},38854:(e,t,r)=>{r.d(t,{B:()=>u});var n=r(28261),o=r(90429),s=r(84884),a=r(18503),l=r(22662),i=r(64356),c=r(54743),d=r(96582);r(57217);let u=e=>{let{book:t,isOpen:r,onOpenChange:u}=e,m=[{type:"Paperback",href:""!=t.amazonLink?t.amazonLink:"/books/preorder"},{type:"eBook",href:""!=t.myStoreLink?t.myStoreLink:"/books/preorder"},...t.hasAudiobook?[{type:"Audiobook",href:t.myStoreLink}]:[]];return(0,n.jsx)(o.Y,{isOpen:r,onOpenChange:u,size:"sm",hideCloseButton:!0,children:(0,n.jsx)(s.g,{className:"pb-0",children:e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.c,{className:"flex flex-col gap-1",children:["Buy ",t.title]}),(0,n.jsx)(l.h,{children:m.map(e=>{let{type:t,href:r}=e;return(0,n.jsx)(i.h,{href:r,children:(0,n.jsx)(c.T,{color:"primary",href:r,className:"w-full",children:t})},t)})}),(0,n.jsx)(d.q,{children:(0,n.jsx)(c.T,{color:"primary",variant:"light",onPress:e,className:"shadow-none text-white",children:"Close"})})]})})})}},88881:(e,t,r)=>{r.d(t,{default:()=>o});var n=r(28261);function o(e){let{error:t,resetErrorBoundary:r}=e;return(0,n.jsxs)("div",{role:"alert",className:"p-4 border border-red-500 rounded-lg bg-red-50",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-red-800 mb-2",children:"Oops! Something went wrong"}),(0,n.jsx)("p",{className:"text-red-700 mb-4",children:"We're sorry, but we couldn't load the contact form. Please try again later."}),(0,n.jsx)("pre",{className:"text-sm bg-red-100 p-2 rounded overflow-auto",children:t.message}),(0,n.jsx)("button",{onClick:r,className:"mt-4 px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 transition-colors",children:"Try again"})]})}r(57217)}}]);