(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8501,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(58579),s=e.i(51264),n=e.i(88558),o=e.i(62536);e.s(["default",0,function(){let e=(0,s.useUiLang)(),[i,l]=(0,a.useState)(!0),[u,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=()=>{l(window.navigator.onLine),h((0,n.isNative)()?(0,o.getOfflineBibleBundles)().length>0:!!window.navigator.serviceWorker?.controller)};return e(),window.addEventListener("online",e),window.addEventListener("offline",e),window.addEventListener(o.OFFLINE_BUNDLES_CHANGED_EVENT,e),window.navigator.serviceWorker?.addEventListener("controllerchange",e),window.navigator.serviceWorker?.ready.then(e).catch(()=>{}),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",e),window.removeEventListener(o.OFFLINE_BUNDLES_CHANGED_EVENT,e),window.navigator.serviceWorker?.removeEventListener("controllerchange",e)}},[]);let c=(0,r.getUiText)(e),d=i?u?c.offlineStatusReady:c.offlineStatusOnline:c.offlineStatusOffline;return(0,t.jsx)("div",{className:"flex items-center",children:(0,t.jsxs)("button",{type:"button",onClick:()=>window.dispatchEvent(new CustomEvent("open-offline-manager")),className:`inline-flex items-center gap-2 rounded-full border px-3 py-1.5 text-xs font-medium transition hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-gray-900 ${i?u?"border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-800 dark:bg-emerald-950/50 dark:text-emerald-300":"border-slate-200 bg-slate-50 text-slate-700 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200":"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-800 dark:bg-amber-950/50 dark:text-amber-300"}`,children:[(0,t.jsx)("span",{className:"h-2 w-2 rounded-full bg-current opacity-80"}),(0,t.jsx)("span",{children:d}),(0,t.jsx)("span",{className:"text-current/70",children:"·"}),(0,t.jsx)("span",{children:c.offlineManage})]})})}])},12491,e=>{"use strict";var t=e.i(43476),a=e.i(22016),r=e.i(7670),s=e.i(78744),n=e.i(52456);e.s(["default",0,function({tabs:e,className:o}){let{t:i,withQuery:l,pathname:u}=(0,s.useNavLink)();return(0,t.jsx)("nav",{className:(0,r.default)("w-full px-0 sm:px-2 md:px-6",o),children:(0,t.jsx)("div",{className:"flex w-full gap-0.5 rounded-full border border-slate-200 bg-slate-100 p-1 dark:border-slate-700 dark:bg-slate-800/60 sm:inline-flex sm:w-auto sm:gap-1",children:e.map(e=>{let s=u.endsWith(".html")?u.slice(0,-5):u,o=s===e.matchPath||s.startsWith(`${e.matchPath}/`);return(0,t.jsx)(a.default,{href:l(e.path),prefetch:!1,"aria-current":o?"page":void 0,className:(0,r.default)("min-w-0 flex-1 rounded-full px-2 py-1.5 text-center text-sm font-medium transition sm:flex-none sm:px-4",o?"bg-white text-slate-900 shadow-sm dark:bg-slate-900 dark:text-white":"text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-200"),children:(0,t.jsx)(n.default,{children:i[e.key]})},e.path)})})})}])},29599,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(18566),s=e.i(27696),n=e.i(34223),o=e.i(86939),i=e.i(58579);let l=n.default.default,u=l.map(e=>e.book),h=Object.fromEntries(l.map(e=>[e.book,e.chapters]));function c(e){let t={};for(let a of u){let r=h[a],s=e[a]?Object.keys(e[a]).length:0;t[a]={completed:s,total:r,done:s>=r}}return t}let d=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;function m({data:e,onReset:r,lang:s}){let l=n.default.default.reduce((e,t)=>e+t.chapters,0),u=e?.readChapters??{},h=e?Object.values(u).reduce((e,t)=>e+(t?Object.keys(t).length:0),0):0,p=l>0?Math.floor(h/l*100):0,g=e?(e=>{let t=new Set;for(let a of Object.values(e))if(a)for(let e of Object.values(a))t.add(d(new Date(e)));let a=d(new Date),r=new Date;r.setDate(r.getDate()-1);let s=d(r);if(!t.has(a)&&!t.has(s))return 0;let n=t.has(a)?a:s,o=0,i=new Date(`${n}T12:00:00`);for(;t.has(d(i));)o++,i.setDate(i.getDate()-1);return o})(u):0,f=e?c(u):null,b=f?Object.values(f).filter(e=>e.done).length:0,y=f?Object.keys(f).length:0,v=(0,i.getUiText)(s),k=(0,i.getUiLocale)(s),[x,I]=(0,a.useState)(!1);return(0,t.jsxs)("div",{className:"p-4 border rounded-lg shadow-md space-y-2",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:v.overviewTitle}),e?.startedDate?(0,t.jsxs)("ul",{className:"space-y-1 text-sm text-gray-700 dark:text-gray-300",children:[(0,t.jsxs)("li",{children:["📅 ",v.startedAt,": ",new Date(e.startedDate).toLocaleString(k)]}),(0,t.jsxs)("li",{children:["🕓 ",v.lastReadChapter,":"," ",e.lastRead?`${o.bookNameMap[s]?.[e.lastRead.book]??e.lastRead.book} ${e.lastRead.chapter}${v.chapterUnit} (${new Date(e.lastRead.date).toLocaleString(k)})`:v.none]}),(0,t.jsxs)("li",{children:["📖 ",v.readDays,": ",e.readDays,v.dayUnit]}),g>0&&(0,t.jsxs)("li",{children:["🔥 ",v.streak,": ",g,v.dayUnit]}),(0,t.jsxs)("li",{children:["🔁 ",v.rounds,": ",e.completedRounds]}),(0,t.jsxs)("li",{children:["📊 ",v.progress,": ",h," / ",l," ",v.chapterUnit," (",p,"%)"]}),(0,t.jsxs)("li",{children:["🏆 ",v.completedBooks,": ",b," / ",y]})]}):(0,t.jsx)("p",{className:"text-sm text-gray-500",children:v.notStarted}),x?(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 flex-wrap",children:[(0,t.jsx)("span",{className:"text-sm text-red-600 dark:text-red-400",children:v.resetConfirm}),(0,t.jsx)("button",{onClick:()=>{r(),I(!1)},className:"px-3 py-1 bg-red-500 text-white rounded hover:bg-red-600 text-sm",children:v.reset}),(0,t.jsx)("button",{onClick:()=>I(!1),className:"px-3 py-1 border rounded text-sm hover:bg-gray-100 dark:hover:bg-gray-700",children:v.cancel})]}):(0,t.jsx)("button",{onClick:()=>I(!0),className:"mt-2 px-3 py-1 bg-red-500 text-white rounded hover:bg-red-600 text-sm",children:v.reset})]})}var p=e.i(87451);function g({readChapters:e}){let s=(0,r.useRouter)(),l=(0,r.useSearchParams)(),u=l.get("lang")??"ko",h=l.get("version")??"korrv",c=(0,i.getUiText)(u),[d,m]=(0,a.useState)(new Set),f=n.default.default,b=f.findIndex(e=>"Malachi"===e.book),y=f.slice(0,b+1),v=f.slice(b+1),k=(a,r,n=0)=>(0,t.jsxs)("section",{className:"space-y-1",children:[(0,t.jsx)("h2",{className:"text-xl font-bold mt-8 mb-3",children:a}),r.map(({book:a,chapters:r},i)=>{let l=new Set(e[a]?Object.keys(e[a]).map(Number):[]),g=l.size,f=g>=r,b=d.has(a);return(0,t.jsxs)("div",{className:`border-b dark:border-gray-700 ${f?"bg-green-50 dark:bg-green-900/20":""}`,children:[(0,t.jsxs)("button",{className:"w-full flex items-center gap-2 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-800 rounded px-1 transition-colors",onClick:()=>{m(e=>{let t=new Set(e);return t.has(a)?t.delete(a):t.add(a),t})},children:[(0,t.jsx)("span",{className:"text-gray-400 text-xs w-4 shrink-0",children:b?"▶":"▼"}),(0,t.jsxs)("span",{className:"w-5 text-gray-400 text-sm shrink-0 text-right",children:[n+i+1,"."]}),(0,t.jsx)("span",{className:"font-medium",children:o.bookNameMap[u]?.[a]??a}),f?(0,t.jsxs)("span",{className:"ml-auto text-xs font-medium text-green-700 dark:text-green-400 shrink-0",children:["✔ ",c.done]}):(0,t.jsxs)("span",{className:"ml-auto text-xs text-gray-400 shrink-0",children:[g,"/",r]})]}),!b&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2 pb-3 pl-7",children:Array.from({length:r},(e,r)=>{let n=r+1,o=l.has(n);return(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded border ${o?"bg-blue-600 text-white":"bg-gray-200 dark:bg-gray-700 dark:text-white"}`,onClick:()=>s.push((0,p.withStaticHtmlPath)(`/read?book=${encodeURIComponent(a)}&chapter=${n}&lang=${u}&version=${h}`)),children:n},n)})})]},a)})]});return(0,t.jsxs)("div",{className:"space-y-8",children:[k(`📜 ${c.oldTestament}`,y,0),k(`📖 ${c.newTestament}`,v,y.length)]})}var f=e.i(37902),b=e.i(2593);function y({readChapters:e,lang:a}){let r=(0,i.getUiText)(a),s=new Date,n=new Date;n.setFullYear(s.getFullYear()-1);let o=function(e){let t=new Map;for(let a of Object.values(e))if(a)for(let e of Object.values(a)){if(!e)continue;let a=e.slice(0,10);t.set(a,(t.get(a)??0)+1)}return t}(e),l=Array.from(o.values()).reduce((e,t)=>e+t,0),u=Array.from(o.entries()).map(([e,t])=>({date:e,count:t}));return(0,t.jsxs)("div",{className:"jsx-519e488ee2b2172b mt-4",children:[(0,t.jsxs)("p",{className:"jsx-519e488ee2b2172b text-sm text-gray-500 dark:text-gray-400 mb-4",children:[l.toLocaleString()," ",r.readingCalendarChapters]}),(0,t.jsx)(b.default,{startDate:n,endDate:s,values:u,showWeekdayLabels:!0,tooltipDataAttrs:e=>({"data-tip":e?.date?`${e.date}: ${e.count} ${r.readingCalendarChapters}`:`0 ${r.readingCalendarChapters}`}),classForValue:e=>e&&e.count?e.count<3?"color-scale-1":e.count<7?"color-scale-2":e.count<15?"color-scale-3":"color-scale-4":"color-empty"}),(0,t.jsx)(f.default,{id:"519e488ee2b2172b",children:".color-empty{fill:#e2e8f0}.dark .color-empty{fill:#374151}.color-scale-1{fill:#bfdbfe}.color-scale-2{fill:#60a5fa}.color-scale-3{fill:#2563eb}.color-scale-4{fill:#1d4ed8}"})]})}function v({status:e,lang:a,doneLabel:r,oldTestamentLabel:s,newTestamentLabel:n,onBookClick:i}){let l=u.filter(t=>(e[t]?.total??0)>0),h=l.indexOf("Matthew"),c=-1===h?l:l.slice(0,h),d=-1===h?[]:l.slice(h),m=(s,n)=>0===n.length?null:(0,t.jsxs)("section",{className:"mb-6 last:mb-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold mb-2 text-gray-600 dark:text-gray-300",children:s}),(0,t.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(72px,1fr))] gap-2",children:n.map(s=>{let n=e[s],l=o.bookNameMap[a]?.[s]||s,u=n.total>0?Math.round(n.completed/n.total*100):0;return(0,t.jsxs)("div",{onClick:i?()=>i(s):void 0,title:`${l} ${n.completed}/${n.total}`,className:`rounded border px-2 py-2 text-center transition-colors ${i?"cursor-pointer":""} ${n.done?"bg-green-100 dark:bg-green-800 border-green-300 dark:border-green-600":"bg-gray-100 dark:bg-gray-700 border-gray-200 dark:border-gray-600"}`,children:[(0,t.jsx)("div",{className:"text-xs font-medium truncate",children:l}),n.done?(0,t.jsxs)("div",{className:"text-[11px] text-green-700 dark:text-green-300",children:["✔ ",r]}):(0,t.jsx)("div",{className:"mt-1 h-1 w-full rounded-full bg-gray-200 dark:bg-gray-600",children:(0,t.jsx)("div",{className:"h-1 rounded-full bg-blue-500",style:{width:`${u}%`}})})]},s)})})]});return(0,t.jsxs)("div",{children:[m(s,c),m(n,d)]})}var k=e.i(52456);function x({name:e,completedRounds:r,completedAt:s,lang:n,onClose:o}){let l=(0,a.useRef)(null),u=(0,i.getUiText)(n);(0,a.useEffect)(()=>{let t,a,o,h=l.current;if(!h)return;let c=h.getContext("2d");c&&(h.width=800,h.height=500,(t=c.createLinearGradient(0,0,0,500)).addColorStop(0,"#1e3a5f"),t.addColorStop(1,"#0f172a"),c.fillStyle=t,c.fillRect(0,0,800,500),c.strokeStyle="rgba(255,215,0,0.75)",c.lineWidth=7,c.strokeRect(22,22,756,456),c.strokeStyle="rgba(255,215,0,0.3)",c.lineWidth=2,c.strokeRect(34,34,732,432),c.fillStyle="rgba(253,230,138,0.85)",c.font="bold 22px serif",c.textAlign="center",c.fillText("Alaskah Bible",400,84),c.fillStyle="#ffffff",c.font="bold 46px serif",c.fillText(u.certTitle,400,178),c.strokeStyle="rgba(255,215,0,0.45)",c.lineWidth=1,c.beginPath(),c.moveTo(100,198),c.lineTo(700,198),c.stroke(),c.fillStyle="#fde68a",c.font="30px serif",c.fillText(e,400,264),c.fillStyle="rgba(255,255,255,0.85)",c.font="20px sans-serif",c.fillText(u.certRounds.replace("{{n}}",String(r)),400,320),a=(0,i.getUiLocale)(n),o=new Date(s).toLocaleDateString(a,{year:"numeric",month:"long",day:"numeric"}),c.fillStyle="rgba(255,255,255,0.5)",c.font="17px sans-serif",c.fillText(o,400,368),c.fillStyle="rgba(255,215,0,0.65)",c.font="28px serif",c.fillText("✦ ✦ ✦",400,432))},[e,r,s,n,u]);let h=()=>new Promise(e=>l.current?.toBlob(e,"image/png")??e(null)),c=async()=>{let e=await h();if(!e)return;let t=URL.createObjectURL(e),a=document.createElement("a");a.href=t,a.download=`alaskah-cert-${r}.png`,a.click(),setTimeout(()=>URL.revokeObjectURL(t),1e3)},d=async()=>{let e=await h();if(!e)return;let t=new File([e],`alaskah-cert-${r}.png`,{type:"image/png"});navigator.canShare?.({files:[t]})?await navigator.share({files:[t],text:u.certShareText.replace("{{n}}",String(r))}).catch(()=>{}):await c()};return(0,t.jsx)("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/75 p-4",onClick:o,children:(0,t.jsxs)("div",{className:"relative w-full max-w-lg bg-slate-900 rounded-2xl shadow-2xl p-5",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("canvas",{ref:l,className:"w-full rounded-lg",style:{aspectRatio:"8/5"}}),(0,t.jsxs)("div",{className:"mt-4 flex gap-2",children:[(0,t.jsx)("button",{onClick:c,className:"min-w-0 flex-1 py-2.5 rounded-xl bg-yellow-400 text-slate-900 font-semibold text-sm hover:bg-yellow-300 transition",children:(0,t.jsx)(k.default,{children:u.shareCardDownload})}),(0,t.jsx)("button",{onClick:d,className:"min-w-0 flex-1 py-2.5 rounded-xl bg-blue-600 text-white font-semibold text-sm hover:bg-blue-500 transition",children:(0,t.jsx)(k.default,{children:u.shareCardShare})}),(0,t.jsx)("button",{onClick:o,"aria-label":u.close,className:"min-w-0 flex-1 py-2.5 rounded-xl border border-slate-600 text-slate-300 text-sm hover:bg-slate-800 transition",children:(0,t.jsx)(k.default,{children:u.close})})]})]})})}var I=e.i(60502),S=e.i(38835),w=e.i(15132),C=e.i(8501),J=e.i(63398);e.s(["default",0,function(){let{data:e,reset:n}=(0,I.useReadingStorage)(),{isAdmin:o,user:l}=(0,J.useAuth)(),u=(0,r.useRouter)(),h=(0,a.useRef)(null),[d,f]=(0,a.useState)(0),[b,R]=(0,a.useState)(""),[E,T]=(0,a.useState)(!1),j=(0,r.useSearchParams)(),D=j.get("lang"),N=j.get("version"),{lang:_,version:L}=(0,S.useReadingPageSelection)(D,N,o),[P,M]=(0,a.useState)("grid"),O=(0,i.getUiText)(_);(0,a.useEffect)(()=>{_&&L&&(0,w.warmPwaUrls)((0,w.getReadingIndexCacheUrls)(_,L,"/whole-read"))},[_,L]),(0,a.useEffect)(()=>{if(!e)return;let t=e.completedRounds;null!==h.current&&t>h.current&&(f(t),R(new Date().toISOString()),T(!0)),h.current=t},[e?.completedRounds]);let A=l?.name||l?.email?.split("@")[0]||"Reader";return(0,t.jsxs)(t.Fragment,{children:[E&&(0,t.jsx)(x,{name:A,completedRounds:d,completedAt:b,lang:_,onClose:()=>T(!1)}),(0,t.jsxs)("div",{className:"min-h-screen px-0 sm:px-2 md:px-6 py-6 bg-white text-black dark:bg-gray-900 dark:text-white",children:[(0,t.jsxs)("h1",{className:"text-2xl font-bold mb-4",children:["📗 ",O.wholeReadTitle]}),(0,t.jsx)(s.default,{lang:_,version:L}),(0,t.jsx)(C.default,{}),(0,t.jsx)(m,{data:e,onReset:n,lang:_}),(0,t.jsxs)("div",{className:"flex gap-2 mt-4 mb-2",children:[(0,t.jsx)("button",{onClick:()=>M("grid"),className:`min-w-0 flex-1 sm:flex-none px-4 py-1.5 text-sm rounded border transition-colors ${"grid"===P?"bg-blue-600 text-white border-blue-600":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200 border-gray-300 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:(0,t.jsx)(k.default,{children:O.readingTabGrid})}),(0,t.jsx)("button",{onClick:()=>M("calendar"),className:`min-w-0 flex-1 sm:flex-none px-4 py-1.5 text-sm rounded border transition-colors ${"calendar"===P?"bg-blue-600 text-white border-blue-600":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200 border-gray-300 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:(0,t.jsx)(k.default,{children:O.readingTabCalendar})}),(0,t.jsx)("button",{onClick:()=>M("badges"),className:`min-w-0 flex-1 sm:flex-none px-4 py-1.5 text-sm rounded border transition-colors ${"badges"===P?"bg-blue-600 text-white border-blue-600":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200 border-gray-300 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:(0,t.jsx)(k.default,{children:O.readingTabBadges})})]}),"grid"===P&&(0,t.jsx)(g,{readChapters:e?.readChapters??{}}),"calendar"===P&&(0,t.jsx)(y,{readChapters:e?.readChapters??{},lang:_}),"badges"===P&&(0,t.jsx)(v,{status:c(e?.readChapters??{}),lang:_,doneLabel:O.done,oldTestamentLabel:O.oldTestament,newTestamentLabel:O.newTestament,onBookClick:e=>u.push((0,p.withStaticHtmlPath)(`/read?book=${encodeURIComponent(e)}&chapter=1&lang=${_}&version=${L}`))})]})]})}],29599)},60502,e=>{"use strict";e.i(47167);var t=e.i(71645),a=e.i(63398),r=e.i(22677),s=e.i(87922);let n=()=>new Date().toISOString();e.s(["useReadingStorage",0,()=>{let{user:e,sessionReady:o}=(0,a.useAuth)(),i=e?.email||"",[l,u]=(0,t.useState)({email:"",data:null});l.email!==i&&u({email:i,data:null});let h=l.email===i?l.data:null,c=(0,t.useRef)(0),d=(0,t.useRef)(Promise.resolve());(0,t.useEffect)(()=>{c.current+=1},[i]);let m=(0,t.useCallback)(()=>{if(!i||!o)return Promise.resolve();let e=++c.current;return(0,s.fetchWithRetry)(`https://jwhhboergk.execute-api.ap-northeast-2.amazonaws.com/Prod/loadReading?userEmail=${encodeURIComponent(i)}`,{method:"GET",headers:{Authorization:`Bearer ${(0,r.getSessionToken)()}`}}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(t=>{c.current===e&&u({email:i,data:t})}).catch(t=>{console.error("Failed to load reading progress:",t),c.current===e&&u({email:i,data:null})})},[i,o]),p=(0,t.useCallback)(async(e,t)=>{if(!i)return;u({email:i,data:e});let a=async()=>{try{let a=await fetch("https://jwhhboergk.execute-api.ap-northeast-2.amazonaws.com/Prod/saveReading",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${(0,r.getSessionToken)()}`},body:JSON.stringify({userEmail:i,data:e,replace:t?.replace===!0})});a.ok||console.error(`Failed to save reading progress: HTTP ${a.status}`)}catch(e){console.error("Failed to save reading progress:",e)}};d.current=d.current.then(a,a),await d.current},[i]),g=(0,t.useCallback)((e,t)=>{if(!h)return void m();let a=n();p({startedDate:h.startedDate||a,readDays:h.readDays??0,completedRounds:h.completedRounds??0,readChapters:{...h.readChapters||{},[e]:{...h.readChapters?.[e]||{},[t]:a}},lastRead:{book:e,chapter:t,date:a},bookmarkedVerses:h.bookmarkedVerses})},[h,p,m]),f=(0,t.useCallback)(e=>{if(!h)return void m();if(0===e.length)return;let t=n(),a={...h.readChapters||{}};for(let{book:r,chapter:s}of e)a[r]={...a[r]||{},[s]:a[r]?.[s]??t};let r=e[e.length-1];p({startedDate:h.startedDate||t,readDays:h.readDays??0,completedRounds:h.completedRounds??0,readChapters:a,lastRead:h.lastRead??{book:r.book,chapter:r.chapter,date:t},bookmarkedVerses:h.bookmarkedVerses})},[h,p,m]),b=(0,t.useCallback)((e,t,a)=>{if(!h)return void m();let r=h.bookmarkedVerses??[],s=r.findIndex(r=>r.book===e&&r.chapter===t&&r.verse===a),o=s>=0?r.filter((e,t)=>t!==s):[...r,{book:e,chapter:t,verse:a,bookmarkedAt:n()}];p({...h,bookmarkedVerses:o})},[h,p,m]),y=(0,t.useCallback)((e,t,a,r)=>{let s;if(!h)return void m();let o=h.bookmarkedVerses??[],i=o.findIndex(r=>r.book===e&&r.chapter===t&&r.verse===a);s=null===r?o.filter((e,t)=>t!==i):i>=0?o.map((e,t)=>t===i?{...e,color:r}:e):[...o,{book:e,chapter:t,verse:a,bookmarkedAt:n(),color:r}],p({...h,bookmarkedVerses:s})},[h,p,m]),v=(0,t.useCallback)(async()=>{if(!i)return;let e={startedDate:n(),readDays:0,completedRounds:(h?.completedRounds??0)+1,readChapters:{},lastRead:null,bookmarkedVerses:h?.bookmarkedVerses};await p(e,{replace:!0})},[i,h,p]);return(0,t.useEffect)(()=>{m()},[m]),{data:h,load:m,save:p,markChapterRead:g,markChaptersRead:f,toggleBookmark:b,setVerseHighlight:y,reset:v}}])},86939,e=>{"use strict";e.s(["bookNameMap",0,{ko:{Genesis:"창세기",Exodus:"출애굽기",Leviticus:"레위기",Numbers:"민수기",Deuteronomy:"신명기",Joshua:"여호수아",Judges:"사사기",Ruth:"룻기","I Samuel":"사무엘상","II Samuel":"사무엘하","I Kings":"열왕기상","II Kings":"열왕기하","I Chronicles":"역대상","II Chronicles":"역대하",Ezra:"에스라",Nehemiah:"느헤미야",Esther:"에스더",Job:"욥기",Psalms:"시편",Proverbs:"잠언",Ecclesiastes:"전도서","Song of Solomon":"아가",Isaiah:"이사야",Jeremiah:"예레미야",Lamentations:"예레미야 애가",Ezekiel:"에스겔",Daniel:"다니엘",Hosea:"호세아",Joel:"요엘",Amos:"아모스",Obadiah:"오바댜",Jonah:"요나",Micah:"미가",Nahum:"나훔",Habakkuk:"하박국",Zephaniah:"스바냐",Haggai:"학개",Zechariah:"스가랴",Malachi:"말라기",Matthew:"마태복음",Mark:"마가복음",Luke:"누가복음",John:"요한복음",Acts:"사도행전",Romans:"로마서","I Corinthians":"고린도전서","II Corinthians":"고린도후서",Galatians:"갈라디아서",Ephesians:"에베소서",Philippians:"빌립보서",Colossians:"골로새서","I Thessalonians":"데살로니가전서","II Thessalonians":"데살로니가후서","I Timothy":"디모데전서","II Timothy":"디모데후서",Titus:"디도서",Philemon:"빌레몬서",Hebrews:"히브리서",James:"야고보서","I Peter":"베드로전서","II Peter":"베드로후서","I John":"요한일서","II John":"요한이서","III John":"요한삼서",Jude:"유다서","Revelation of John":"요한계시록"},en:{Genesis:"Genesis",Exodus:"Exodus",Leviticus:"Leviticus",Numbers:"Numbers",Deuteronomy:"Deuteronomy",Joshua:"Joshua",Judges:"Judges",Ruth:"Ruth","I Samuel":"1 Samuel","II Samuel":"2 Samuel","I Kings":"1 Kings","II Kings":"2 Kings","I Chronicles":"1 Chronicles","II Chronicles":"2 Chronicles",Ezra:"Ezra",Nehemiah:"Nehemiah",Esther:"Esther",Job:"Job",Psalms:"Psalms",Proverbs:"Proverbs",Ecclesiastes:"Ecclesiastes","Song of Solomon":"Song of Solomon",Isaiah:"Isaiah",Jeremiah:"Jeremiah",Lamentations:"Lamentations",Ezekiel:"Ezekiel",Daniel:"Daniel",Hosea:"Hosea",Joel:"Joel",Amos:"Amos",Obadiah:"Obadiah",Jonah:"Jonah",Micah:"Micah",Nahum:"Nahum",Habakkuk:"Habakkuk",Zephaniah:"Zephaniah",Haggai:"Haggai",Zechariah:"Zechariah",Malachi:"Malachi",Matthew:"Matthew",Mark:"Mark",Luke:"Luke",John:"John",Acts:"Acts",Romans:"Romans","I Corinthians":"1 Corinthians","II Corinthians":"2 Corinthians",Galatians:"Galatians",Ephesians:"Ephesians",Philippians:"Philippians",Colossians:"Colossians","I Thessalonians":"1 Thessalonians","II Thessalonians":"2 Thessalonians","I Timothy":"1 Timothy","II Timothy":"2 Timothy",Titus:"Titus",Philemon:"Philemon",Hebrews:"Hebrews",James:"James","I Peter":"1 Peter","II Peter":"2 Peter","I John":"1 John","II John":"2 John","III John":"3 John",Jude:"Jude","Revelation of John":"Revelation"},fr:{Genesis:"Genese",Exodus:"Exode",Leviticus:"Levitique",Numbers:"Nombres",Deuteronomy:"Deuteronome",Joshua:"Josue",Judges:"Juges",Ruth:"Ruth","I Samuel":"1 Samuel","II Samuel":"2 Samuel","I Kings":"1 Rois","II Kings":"2 Rois","I Chronicles":"1 Chroniques","II Chronicles":"2 Chroniques",Ezra:"Esdras",Nehemiah:"Nehemie",Esther:"Esther",Job:"Job",Psalms:"Psaumes",Proverbs:"Proverbes",Ecclesiastes:"Ecclesiaste","Song of Solomon":"Cantique des cantiques",Isaiah:"Esaie",Jeremiah:"Jeremie",Lamentations:"Lamentations",Ezekiel:"Ezechiel",Daniel:"Daniel",Hosea:"Osee",Joel:"Joel",Amos:"Amos",Obadiah:"Abdias",Jonah:"Jonas",Micah:"Michee",Nahum:"Nahum",Habakkuk:"Habacuc",Zephaniah:"Sophonie",Haggai:"Aggee",Zechariah:"Zacharie",Malachi:"Malachie",Matthew:"Matthieu",Mark:"Marc",Luke:"Luc",John:"Jean",Acts:"Actes",Romans:"Romains","I Corinthians":"1 Corinthiens","II Corinthians":"2 Corinthiens",Galatians:"Galates",Ephesians:"Ephesiens",Philippians:"Philippiens",Colossians:"Colossiens","I Thessalonians":"1 Thessaloniciens","II Thessalonians":"2 Thessaloniciens","I Timothy":"1 Timothee","II Timothy":"2 Timothee",Titus:"Tite",Philemon:"Philemon",Hebrews:"Hebreux",James:"Jacques","I Peter":"1 Pierre","II Peter":"2 Pierre","I John":"1 Jean","II John":"2 Jean","III John":"3 Jean",Jude:"Jude","Revelation of John":"Apocalypse"},de:{Genesis:"1 Mose",Exodus:"2 Mose",Leviticus:"3 Mose",Numbers:"4 Mose",Deuteronomy:"5 Mose",Joshua:"Josua",Judges:"Richter",Ruth:"Ruth","I Samuel":"1 Samuel","II Samuel":"2 Samuel","I Kings":"1 Konige","II Kings":"2 Konige","I Chronicles":"1 Chronik","II Chronicles":"2 Chronik",Ezra:"Esra",Nehemiah:"Nehemia",Esther:"Ester",Job:"Hiob",Psalms:"Psalmen",Proverbs:"Spruche",Ecclesiastes:"Prediger","Song of Solomon":"Hohelied",Isaiah:"Jesaja",Jeremiah:"Jeremia",Lamentations:"Klagelieder",Ezekiel:"Hesekiel",Daniel:"Daniel",Hosea:"Hosea",Joel:"Joel",Amos:"Amos",Obadiah:"Obadja",Jonah:"Jona",Micah:"Micha",Nahum:"Nahum",Habakkuk:"Habakuk",Zephaniah:"Zefanja",Haggai:"Haggai",Zechariah:"Sacharja",Malachi:"Maleachi",Matthew:"Matthaus",Mark:"Markus",Luke:"Lukas",John:"Johannes",Acts:"Apostelgeschichte",Romans:"Romer","I Corinthians":"1 Korinther","II Corinthians":"2 Korinther",Galatians:"Galater",Ephesians:"Epheser",Philippians:"Philipper",Colossians:"Kolosser","I Thessalonians":"1 Thessalonicher","II Thessalonians":"2 Thessalonicher","I Timothy":"1 Timotheus","II Timothy":"2 Timotheus",Titus:"Titus",Philemon:"Philemon",Hebrews:"Hebraer",James:"Jakobus","I Peter":"1 Petrus","II Peter":"2 Petrus","I John":"1 Johannes","II John":"2 Johannes","III John":"3 Johannes",Jude:"Judas","Revelation of John":"Offenbarung"},es:{Genesis:"Genesis",Exodus:"Exodo",Leviticus:"Levitico",Numbers:"Numeros",Deuteronomy:"Deuteronomio",Joshua:"Josue",Judges:"Jueces",Ruth:"Ruth","I Samuel":"1 Samuel","II Samuel":"2 Samuel","I Kings":"1 Reyes","II Kings":"2 Reyes","I Chronicles":"1 Cronicas","II Chronicles":"2 Cronicas",Ezra:"Esdras",Nehemiah:"Nehemias",Esther:"Ester",Job:"Job",Psalms:"Salmos",Proverbs:"Proverbios",Ecclesiastes:"Eclesiastes","Song of Solomon":"Cantares",Isaiah:"Isaias",Jeremiah:"Jeremias",Lamentations:"Lamentaciones",Ezekiel:"Ezequiel",Daniel:"Daniel",Hosea:"Oseas",Joel:"Joel",Amos:"Amos",Obadiah:"Abdias",Jonah:"Jonas",Micah:"Miqueas",Nahum:"Nahum",Habakkuk:"Habacuc",Zephaniah:"Sofonias",Haggai:"Hageo",Zechariah:"Zacarias",Malachi:"Malaquias",Matthew:"Mateo",Mark:"Marcos",Luke:"Lucas",John:"Juan",Acts:"Hechos",Romans:"Romanos","I Corinthians":"1 Corintios","II Corinthians":"2 Corintios",Galatians:"Galatas",Ephesians:"Efesios",Philippians:"Filipenses",Colossians:"Colosenses","I Thessalonians":"1 Tesalonicenses","II Thessalonians":"2 Tesalonicenses","I Timothy":"1 Timoteo","II Timothy":"2 Timoteo",Titus:"Tito",Philemon:"Filemon",Hebrews:"Hebreos",James:"Santiago","I Peter":"1 Pedro","II Peter":"2 Pedro","I John":"1 Juan","II John":"2 Juan","III John":"3 Juan",Jude:"Judas","Revelation of John":"Apocalipsis"},pt:{Genesis:"Genesis",Exodus:"Exodo",Leviticus:"Levitico",Numbers:"Numeros",Deuteronomy:"Deuteronomio",Joshua:"Josue",Judges:"Juizes",Ruth:"Rute","I Samuel":"1 Samuel","II Samuel":"2 Samuel","I Kings":"1 Reis","II Kings":"2 Reis","I Chronicles":"1 Cronicas","II Chronicles":"2 Cronicas",Ezra:"Esdras",Nehemiah:"Neemias",Esther:"Ester",Job:"Jo",Psalms:"Salmos",Proverbs:"Proverbios",Ecclesiastes:"Eclesiastes","Song of Solomon":"Cantares",Isaiah:"Isaias",Jeremiah:"Jeremias",Lamentations:"Lamentacoes",Ezekiel:"Ezequiel",Daniel:"Daniel",Hosea:"Oseias",Joel:"Joel",Amos:"Amos",Obadiah:"Obadias",Jonah:"Jonas",Micah:"Miqueias",Nahum:"Naum",Habakkuk:"Habacuque",Zephaniah:"Sofonias",Haggai:"Ageu",Zechariah:"Zacarias",Malachi:"Malaquias",Matthew:"Mateus",Mark:"Marcos",Luke:"Lucas",John:"Joao",Acts:"Atos",Romans:"Romanos","I Corinthians":"1 Corintios","II Corinthians":"2 Corintios",Galatians:"Galatas",Ephesians:"Efesios",Philippians:"Filipenses",Colossians:"Colossenses","I Thessalonians":"1 Tessalonicenses","II Thessalonians":"2 Tessalonicenses","I Timothy":"1 Timoteo","II Timothy":"2 Timoteo",Titus:"Tito",Philemon:"Filemom",Hebrews:"Hebreus",James:"Tiago","I Peter":"1 Pedro","II Peter":"2 Pedro","I John":"1 Joao","II John":"2 Joao","III John":"3 Joao",Jude:"Judas","Revelation of John":"Apocalipse"},ja:{Genesis:"創世記",Exodus:"出エジプト記",Leviticus:"レビ記",Numbers:"民数記",Deuteronomy:"申命記",Joshua:"ヨシュア記",Judges:"士師記",Ruth:"ルツ記","I Samuel":"サムエル記 上","II Samuel":"サムエル記 下","I Kings":"列王記 上","II Kings":"列王記 下","I Chronicles":"歴代誌 上","II Chronicles":"歴代誌 下",Ezra:"エズラ記",Nehemiah:"ネヘミヤ記",Esther:"エステル記",Job:"ヨブ記",Psalms:"詩篇",Proverbs:"箴言",Ecclesiastes:"コヘレトの言葉","Song of Solomon":"雅歌",Isaiah:"イザヤ書",Jeremiah:"エレミヤ書",Lamentations:"哀歌",Ezekiel:"エゼキエル書",Daniel:"ダニエル書",Hosea:"ホセア書",Joel:"ヨエル書",Amos:"アモス書",Obadiah:"オバデヤ書",Jonah:"ヨナ書",Micah:"ミカ書",Nahum:"ナホム書",Habakkuk:"ハバクク書",Zephaniah:"ゼファニヤ書",Haggai:"ハガイ書",Zechariah:"ゼカリヤ書",Malachi:"マラキ書",Matthew:"マタイによる福音書",Mark:"マルコによる福音書",Luke:"ルカによる福音書",John:"ヨハネによる福音書",Acts:"使徒言行録",Romans:"ローマの信徒への手紙","I Corinthians":"コリントの信徒への手紙 一","II Corinthians":"コリントの信徒への手紙 二",Galatians:"ガラテヤの信徒への手紙",Ephesians:"エフェソの信徒への手紙",Philippians:"フィリピの信徒への手紙",Colossians:"コロサイの信徒への手紙","I Thessalonians":"テサロニケの信徒への手紙 一","II Thessalonians":"テサロニケの信徒への手紙 二","I Timothy":"テモテへの手紙 一","II Timothy":"テモテへの手紙 二",Titus:"テトスへの手紙",Philemon:"フィレモンへの手紙",Hebrews:"ヘブライ人への手紙",James:"ヤコブの手紙","I Peter":"ペトロの手紙 一","II Peter":"ペトロの手紙 二","I John":"ヨハネの手紙 一","II John":"ヨハネの手紙 二","III John":"ヨハネの手紙 三",Jude:"ユダの手紙","Revelation of John":"ヨハネの黙示録"},mn:{Genesis:"Эхлэл",Exodus:"Гарлын ном",Leviticus:"Левийн ном",Numbers:"Тоо бүртгэл",Deuteronomy:"Дэд хууль",Joshua:"Иошуа",Judges:"Шүүгчид",Ruth:"Рут","I Samuel":"I Самуел","II Samuel":"II Самуел","I Kings":"I Хаад","II Kings":"II Хаад","I Chronicles":"I Түүхийн ном","II Chronicles":"II Түүхийн ном",Ezra:"Ездра",Nehemiah:"Неемиа",Esther:"Эстер",Job:"Иов",Psalms:"Дуулал",Proverbs:"Сургаалт үгс",Ecclesiastes:"Номлогч","Song of Solomon":"Дуунуудын дуу",Isaiah:"Исаиа",Jeremiah:"Иеремиа",Lamentations:"Гашуудал",Ezekiel:"Иезекиел",Daniel:"Даниел",Hosea:"Хосеа",Joel:"Иоел",Amos:"Амос",Obadiah:"Обадиа",Jonah:"Иона",Micah:"Мика",Nahum:"Наум",Habakkuk:"Хабаккук",Zephaniah:"Зефани",Haggai:"Хаггай",Zechariah:"Захариа",Malachi:"Малаки",Matthew:"Матай",Mark:"Марк",Luke:"Лук",John:"Иохан",Acts:"Үйлс",Romans:"Ромчуудад","I Corinthians":"I Коринтчуудад","II Corinthians":"II Коринтчуудад",Galatians:"Галатчуудад",Ephesians:"Ефесчүүдэд",Philippians:"Филиппчүүдэд",Colossians:"Колоссчуудад","I Thessalonians":"I Тессалоникчуудад","II Thessalonians":"II Тессалоникчуудад","I Timothy":"I Тимотэд","II Timothy":"II Тимотэд",Titus:"Титд",Philemon:"Филемонд",Hebrews:"Еврейчүүдэд",James:"Иаков","I Peter":"I Петр","II Peter":"II Петр","I John":"I Иохан","II John":"II Иохан","III John":"III Иохан",Jude:"Иуда","Revelation of John":"Илчлэлт"}}])},27696,38835,e=>{"use strict";var t=e.i(43476),a=e.i(18566),r=e.i(40528),s=e.i(58579),n=e.i(87451),o=e.i(63398);e.s(["default",0,function({lang:e,version:i,basePath:l="/whole-read"}){let u=(0,a.useRouter)(),h=(0,a.useSearchParams)(),{isAdmin:c}=(0,o.useAuth)();(0,r.useBibleIndexReady)();let d=(0,s.getUiText)(e),m=(e,t)=>{(0,s.setUiLang)(e);let a=new URLSearchParams(h.toString());a.set("lang",e),a.set("version",t),u.push((0,n.withStaticHtmlPath)(`${l}?${a.toString()}`))},p=(0,r.getVersionsForLang)(e,c);return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-4 mb-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"mr-2",children:[d.language,":"]}),(0,t.jsx)("select",{value:e,onChange:e=>{let t=e.target.value,a=(0,r.getVersionsForLang)(t,c);m(t,a[0]?.version??"")},className:"h-9 px-2 py-1 border rounded bg-white text-black dark:bg-gray-800 dark:text-white",children:(0,r.getBibleLanguages)(c).map(e=>(0,t.jsx)("option",{value:e,children:e.toUpperCase()},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"mr-2",children:[d.version,":"]}),(0,t.jsx)("select",{value:i,onChange:t=>{m(e,t.target.value)},className:"h-9 px-2 py-1 border rounded bg-white text-black dark:bg-gray-800 dark:text-white",children:p.map(e=>(0,t.jsx)("option",{value:e.version,children:e.label},e.version))})]})]})}],27696);var i=e.i(71645),l=e.i(61056),u=e.i(51264);e.s(["useReadingPageSelection",0,function(e,t,a){let n=(0,u.useUiLang)(),o=(0,l.useHydrated)(),h=(0,r.useBibleIndexReady)(),c=(0,i.useMemo)(()=>{if(!o)return null;let n=(0,r.getBibleLanguages)(a);if(0===n.length)return null;let i=(0,s.chooseInitialLang)(n,{queryLang:e,storedLang:window.localStorage.getItem("ui-lang"),browserLang:navigator.language.split("-")[0],fallback:"en"}),l=(0,r.getVersionsForLang)(i,a);return{lang:i,version:l.find(e=>e.version===t)?.version??l[0]?.version??""}},[o,e,t,a,h]),[d,m]=(0,i.useState)("ko"),[p,g]=(0,i.useState)(""),[f,b]=(0,i.useState)(null),[y,v]=(0,i.useState)(n);return c&&c!==f?(b(c),v(n),m(c.lang),g(c.version)):n!==y&&(v(n),m(n)),(0,i.useEffect)(()=>{c&&(0,s.setUiLang)(c.lang)},[c]),{lang:d,version:p}}],38835)},15132,e=>{"use strict";var t=e.i(47167),a=e.i(87451),r=e.i(88558),s=e.i(31582);e.s(["getReadCacheUrls",0,function(e){let{lang:t,version:r,book:n,chapter:o,prevChapter:i,nextChapter:l}=e,u=`lang=${encodeURIComponent(t)}&version=${encodeURIComponent(r)}`,h=[(0,s.bibleIndexUrl)(),(0,s.bibleChapterCountsUrl)(),(0,s.bibleBookUrl)(t,r,n),(0,a.withStaticHtmlPath)(`/read?book=${encodeURIComponent(n)}&chapter=${o}&${u}`)];return i&&h.push((0,a.withStaticHtmlPath)(`/read?book=${encodeURIComponent(n)}&chapter=${i}&${u}`)),l&&h.push((0,a.withStaticHtmlPath)(`/read?book=${encodeURIComponent(n)}&chapter=${l}&${u}`)),h},"getReadingIndexCacheUrls",0,function(e,t,r){let n=`lang=${encodeURIComponent(e)}&version=${encodeURIComponent(t)}`;return[(0,s.bibleIndexUrl)(),(0,s.bibleChapterCountsUrl)(),(0,a.withStaticHtmlPath)(`${r}?${n}`)]},"warmPwaUrls",0,function(e){if((0,r.isNative)())return;let a="true"===t.default.env.NEXT_PUBLIC_ENABLE_PWA_LOCALHOST;if(!("serviceWorker"in navigator)||("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname)&&!a)return;let s=[...new Set(e.filter(Boolean))];0!==s.length&&navigator.serviceWorker.ready.then(e=>{let t=navigator.serviceWorker.controller??e.active;t?.postMessage({type:"CACHE_URLS",urls:s})}).catch(()=>{})}])},16015,(e,t,a)=>{},2593,(e,t,a)=>{e.e,t.exports=function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;function t(){return(t=Object.assign||function(e){for(var t=1;t=this.getNumEmptyDaysAtStart()+this.getDateDifferenceInDays())&&!this.props.showOutOfRangeDays)return null;var o=n(this.getSquareCoordinates(a),2),i=o[0],l=o[1],u=this.getValueForIndex(r),h=e.createElement("rect",t({key:r,width:10,height:10,x:i,y:l,className:this.getClassNameForIndex(r),onClick:function(){return s.handleClick(u)},onMouseOver:function(e){return s.handleMouseOver(e,u)},onMouseLeave:function(e){return s.handleMouseLeave(e,u)}},this.getTooltipDataAttrsForIndex(r)),e.createElement("title",null,this.getTitleForIndex(r))),c=this.props.transformDayElement;return c?c(h,u,r):h}},{key:"renderWeek",value:function(t){var a=this;return e.createElement("g",{key:t,transform:this.getTransformForWeek(t),className:"".concat(f,"week")},g(7).map(function(e){return a.renderSquare(e,7*t+e)}))}},{key:"renderAllWeeks",value:function(){var e=this;return g(this.getWeekCount()).map(function(t){return e.renderWeek(t)})}},{key:"renderMonthLabels",value:function(){var t=this;return this.props.showMonthLabels?g(this.getWeekCount()-1).map(function(a){var r=m(t.getStartDateWithEmptyDays(),(a+1)*7),s=n(t.getMonthLabelCoordinates(a),2),o=s[0],i=s[1];return r.getDate()>=1&&7>=r.getDate()?e.createElement("text",{key:a,x:o,y:i,className:"".concat(f,"month-label")},t.props.monthLabels[r.getMonth()]):null}):null}},{key:"renderWeekdayLabels",value:function(){var t=this;return this.props.showWeekdayLabels?this.props.weekdayLabels.map(function(a,r){var s=n(t.getWeekdayLabelCoordinates(r),2),o=s[0],i=s[1],l="".concat(t.props.horizontal?"":"".concat(f,"small-text")," ").concat(f,"weekday-label");return 1&r?e.createElement("text",{key:"".concat(o).concat(i),x:o,y:i,className:l},a):null}):null}},{key:"render",value:function(){return this.valueCache=this.getValueCache(this.props),e.createElement("svg",{className:"react-calendar-heatmap",viewBox:this.getViewBox()},e.createElement("g",{transform:this.getTransformForMonthLabels(),className:"".concat(f,"month-labels")},this.renderMonthLabels()),e.createElement("g",{transform:this.getTransformForAllWeeks(),className:"".concat(f,"all-weeks")},this.renderAllWeeks()),e.createElement("g",{transform:this.getTransformForWeekdayLabels(),className:"".concat(f,"weekday-labels")},this.renderWeekdayLabels()))}}],function(e,t){for(var a=0;a{var r=e.i(47167);e.r(16015);var s=e.r(71645),n=s&&"object"==typeof s&&"default"in s?s:{default:s},o=void 0!==r.default&&r.default.env&&!0,i=function(e){return"[object String]"===Object.prototype.toString.call(e)},l=function(){function e(e){var t=void 0===e?{}:e,a=t.name,r=void 0===a?"stylesheet":a,s=t.optimizeForSpeed,n=void 0===s?o:s;u(i(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",u("boolean"==typeof n,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=n,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var l="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=l?l.getAttribute("content"):null}var t,a=e.prototype;return a.setOptimizeForSpeed=function(e){u("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),u(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},a.isOptimizeForSpeed=function(){return this._optimizeForSpeed},a.inject=function(){var e=this;if(u(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(o||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,a){return"number"==typeof a?e._serverSheet.cssRules[a]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),a},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},a.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;ttypeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!a.cssRules[e])return e;a.deleteRule(e);try{a.insertRule(t,e)}catch(r){o||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),a.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];u(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},a.deleteRule=function(e){if("u"typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},a.cssRules=function(){var e=this;return"u">>0},c={};function d(e,t){if(!t)return"jsx-"+e;var a=String(t),r=e+a;return c[r]||(c[r]="jsx-"+h(e+"-"+a)),c[r]}function m(e,t){"u"typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var a=this.getIdAndRules(e),r=a.styleId,s=a.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var n=s.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=n,this._instancesCounts[r]=1},t.remove=function(e){var t=this,a=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(a in this._instancesCounts,"styleId: `"+a+"` not found"),this._instancesCounts[a]-=1,this._instancesCounts[a]<1){var r=this._fromServer&&this._fromServer[a];r?(r.parentNode.removeChild(r),delete this._fromServer[a]):(this._indices[a].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[a]),delete this._instancesCounts[a]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],a=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return a[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,a;return t=this.cssRules(),void 0===(a=e)&&(a={}),t.map(function(e){var t=e[0],r=e[1];return n.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:a.nonce?a.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,a=e.dynamic,r=e.id;if(a){var s=d(r,a);return{styleId:s,rules:Array.isArray(t)?t.map(function(e){return m(s,e)}):[m(s,t)]}}return{styleId:d(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),g=s.createContext(null);function f(){return new p}function b(){return s.useContext(g)}g.displayName="StyleSheetContext";var y=n.default.useInsertionEffect||n.default.useLayoutEffect,v="u">typeof window?f():void 0;function k(e){var t=v||b();return t&&("u"{t.exports=e.r(98547).style}]);