PageSourceSearch

https://churchapps.org/_next/static/chunks/7869.31077f26797b17b4.js

js churchapps.org collected 2026-09-24 10:19:29 UTC 5,486 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7869],{47869:(e,t,r)=>{r.r(t),r.d(t,{LessonsPage:()=>p});var n=r(95155),o=r(12115),s=r(82222),i=r(41841),l=r(94992),c=r(73139),u=r(57128),a=r(91057),d=r(37586),h=r(82034),f=r(69205),m=r(89236),x=r(6438);let g=[{match:/\/my\/groups(?:\/|$|\?)/,to:()=>"/mobile/groups"},{match:/\/my\/plans(?:\/|$|\?)/,to:()=>"/mobile/plans"},{match:/\/my\/community(?:\/|$|\?)/,to:()=>"/mobile/community"},{match:/\/my\/checkin(?:\/|$|\?)/,to:()=>"/mobile/checkin"},{match:/\/groups\/details\/([\w-]+)/,to:e=>`/mobile/groups/${e[1]}`},{match:/\/votd(?:\/|$|\?)/,to:()=>"/mobile/votd"},{match:/\/donate(?:\/|$|\?)/,to:()=>"/mobile/donate"}],p=()=>{let e=(0,o.useContext)(h.A),t=(0,s.useRouter)(),r=x.MB.colors,[p,b]=(0,o.useState)(!1),[y,w]=(0,o.useState)(!1),[j,C]=(0,o.useState)(!1),k=(0,o.useRef)(null),L=(0,o.useRef)(null),$=e?.userChurch?.jwt,R=e?.userChurch?.church?.id,{data:M}=(0,m.U)(R,$),B=(0,o.useMemo)(()=>{if(!Array.isArray(M))return null;let e=M.find(e=>"lessons"===(e.linkType||"").toLowerCase());return e?.text||null},[M])||a.h.label("mobile.screens.lessons");(0,o.useEffect)(()=>{b(!0)},[]);let S=$&&R?`${f.y.Common.LessonsRoot}/login?returnUrl=/b1/person&churchId=${R}#jwt=${encodeURIComponent($)}`:null,v=async()=>{try{if(!$)return;let t=await d.tH.postAnonymous("/users/login",{jwt:$},"MembershipApi");if(t?.user){d.tH.setDefaultPermissions(t.user.jwt||""),d.gA.user=t.user,d.gA.userChurches=t.userChurches||[];let r=(t.userChurches||[]).find(e=>e.church?.id===R);r&&(d.gA.currentUserChurch=r,d.gA.setupApiHelper(r),e?.setUser(t.user),e?.setUserChurches(t.userChurches||[]),e?.setUserChurch(r))}}catch(e){console.warn("LessonsPage: profile re-auth failed",e)}};return((0,o.useEffect)(()=>{let e=e=>{try{let t=new URL(f.y.Common.LessonsRoot).origin;if(e.origin&&e.origin!==t)return}catch{}let r=e.data;if(!r)return;let n="string"==typeof r?r:r.type||r.event||r.message||null;if("profile_updated"===n)return void v();if("profile_deleted"===n){window.location.href="/mobile/logout";return}if("print"===n||"autoPrint"===n||r?.autoPrint===1||r?.autoPrint==="1"){try{window.print()}catch(e){console.warn("LessonsPage: print failed",e)}return}if("navigate"===n&&"string"==typeof r?.url){let e=(e=>{try{let t=e.startsWith("http")?new URL(e).pathname+new URL(e).search:e;for(let e of g){let r=t.match(e.match);if(r)return e.to(r)}}catch{}return null})(r.url);e&&t.push(e)}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}},[$,R]),(0,o.useEffect)(()=>{if(S)return w(!1),C(!1),L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{j||w(!0)},15e3),()=>{L.current&&clearTimeout(L.current)}},[S]),$&&R)?y?(0,n.jsx)(i.default,{sx:{p:`${x.MB.spacing.md}px`,bgcolor:r.background,minHeight:"100%"},children:(0,n.jsxs)(i.default,{sx:{bgcolor:r.surface,borderRadius:`${x.MB.radius.xl}px`,p:4,textAlign:"center",boxShadow:x.MB.shadows.md},children:[(0,n.jsx)(i.default,{sx:{width:72,height:72,borderRadius:"36px",bgcolor:r.iconBackground,display:"inline-flex",alignItems:"center",justifyContent:"center",mb:2},children:(0,n.jsx)(l.default,{sx:{fontSize:36,color:r.primary},children:"error_outline"})}),(0,n.jsxs)(c.default,{sx:{fontSize:18,fontWeight:600,color:r.text,mb:1},children:["Unable to load ",B.toLowerCase()]}),(0,n.jsx)(c.default,{sx:{fontSize:14,color:r.textMuted,mb:2},children:"Check your connection and try again."}),(0,n.jsx)(u.default,{variant:"contained",onClick:()=>{w(!1),C(!1),k.current&&S&&(k.current.src=S),L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{j||w(!0)},15e3)},"data-testid":"lessons-retry-button",children:"Retry"})]})}):(0,n.jsx)(i.default,{sx:{bgcolor:r.surface,minHeight:"100%",display:"flex",flexDirection:"column"},children:p&&S?(0,n.jsx)(i.default,{component:"iframe",ref:k,title:B,src:S,onLoad:()=>{C(!0),w(!1),L.current&&clearTimeout(L.current)},onError:()=>{w(!0)},sx:{width:"100%",flex:1,minHeight:`calc(100vh - ${x.MB.headerHeight}px)`,border:0,bgcolor:r.surface}}):(0,n.jsxs)(i.default,{sx:{p:`${x.MB.spacing.md}px`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1},children:[(0,n.jsx)(i.default,{sx:{width:72,height:72,borderRadius:"36px",bgcolor:r.iconBackgroun
1d,display:"inline-flex",alignItems:"center",justifyContent:"center",mb:2},children:(0,n.jsx)(l.default,{sx:{fontSize:36,color:r.primary},children:"menu_book"})}),(0,n.jsxs)(c.default,{sx:{fontSize:16,color:r.textMuted},children:["Loading ",B.toLowerCase(),"..."]})]})}):(0,n.jsx)(i.default,{sx:{p:`${x.MB.spacing.md}px`,bgcolor:r.background,minHeight:"100%"},children:(0,n.jsxs)(i.default,{sx:{bgcolor:r.surface,borderRadius:`${x.MB.radius.xl}px`,p:4,textAlign:"center",boxShadow:x.MB.shadows.md},children:[(0,n.jsx)(i.default,{sx:{width:72,height:72,borderRadius:"36px",bgcolor:r.iconBackground,display:"inline-flex",alignItems:"center",justifyContent:"center",mb:2},children:(0,n.jsx)(l.default,{sx:{fontSize:36,color:r.primary},children:"menu_book"})}),(0,n.jsx)(c.default,{sx:{fontSize:18,fontWeight:600,color:r.text,mb:1},children:a.h.label("mobile.screens.signInToView").replace("{}",B.toLowerCase())}),(0,n.jsx)(c.default,{sx:{fontSize:14,color:r.textMuted,mb:2},children:a.h.label("mobile.screens.signInToViewBody").replace("{}",B)}),(0,n.jsx)(u.default,{variant:"contained",href:"/mobile/login?returnUrl=/mobile/lessons","data-testid":"lessons-signin-button",children:a.h.label("mobile.screens.signIn")})]})})}}}]);

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.