PageSourceSearch

https://www.urantiahub.com/_next/static/chunks/pages/settings-f56e339489922617.js

js urantiahub.com collected 2026-10-09 23:14:37 UTC 18,100 bytes, 1 lines download raw bytes

1!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]="42bf4ab0-3ab9-41cc-898f-444741d1e53f",e._sentryDebugIdIdentifier="sentry-dbid-42bf4ab0-3ab9-41cc-898f-444741d1e53f")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[199],{817:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings",function(){return r(1664)}])},956:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(7876);let s=e=>(0,a.jsxs)("div",{className:"".concat(e.className||""," spinner"),style:e.style,"data-sentry-component":"Spinner","data-sentry-source-file":"Spinner.tsx",children:[(0,a.jsx)("div",{className:"dot1"}),(0,a.jsx)("div",{className:"dot2"})]})},1300:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(7876),s=r(5002),n=r(4232);let l=e=>{let{children:t,onClose:r}=e;return(0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&r&&r()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[r]),(0,n.useEffect)(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}),[]),(0,a.jsxs)("aside",{className:"fixed z-20 flex items-center justify-center top-0 left-0 right-0 bottom-0 p-4 h-full w-full","data-sentry-component":"Modal","data-sentry-source-file":"Modal.tsx",children:[(0,a.jsx)("div",{className:"h-full w-full absolute bg-slate-200/50 dark:bg-zinc-900/50 backdrop-filter backdrop-blur-sm mix-blend-normal",onClick:r}),(0,a.jsxs)("div",{className:"relative flex flex-col rounded max-h-full max-w-3xl w-full bg-white dark:bg-zinc-800 shadow-lg",children:[t,r&&(0,a.jsx)("button",{"aria-label":"Close modal",className:"absolute top-4 right-4 dark:top-4 dark:right-4 text-lg bg-transparent border-0 dark:border-0 p-0 dark:p-0 m-0 focus:outline-none focus:dark:outline-none text-gray-400 dark:text-gray-400 hover:text-gray-600 hover:dark:text-white transition duration-300 ease-in-out",onClick:r,children:(0,a.jsx)(s.A,{className:"w-6 h-6"})})]})]})}},1664:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var a=r(7876),s=r(553),n=r(4232),l=r(1300);let d=e=>{let{onClose:t}=e,[r,d]=(0,n.useState)(!1),[i,o]=(0,n.useState)(""),c=async()=>{"DELETE"===i&&(r||(d(!0),await fetch("/api/user",{method:"DELETE"}),await (0,s.signOut)({callbackUrl:"/"})))};return(0,a.jsx)(l.A,{onClose:t,"data-sentry-element":"Modal","data-sentry-component":"DeleteUser","data-sentry-source-file":"DeleteUser.tsx",children:(0,a.jsxs)("div",{className:"flex flex-col px-4 py-3",children:[(0,a.jsx)("h2",{className:"text-2xl mb-2",children:"Are you sure?"}),(0,a.jsxs)("p",{className:"text-gray-400 mb-4",children:["This action is irreversible. Your account will be deleted immediately and all of your progress will be lost. Type"," ",(0,a.jsx)("code",{className:"text-gray-600 dark:text-white font-bold dark:font-base dark:text-sm",children:"DELETE"})," ","below to confirm."]}),(0,a.jsx)("input",{autoFocus:!0,className:"text-sm focus:outline-none focus:dark:outline-none border-0 dark:border-0 bg-slate-200 text-gray-600 dark:bg-zinc-900 dark:text-white rounded py-2 px-3 dark:py-2 dark:px-3 mb-4",onChange:e=>o(e.target.value),placeholder:"Type DELETE to confirm",type:"text",value:i}),(0,a.jsxs)("div",{className:"flex justify-center items-center",children:[(0,a.jsx)("button",{className:"mb-2 md:mb-0 mr-0 md:mr-2 py-2 px-3 border-0 dark:py-2 dark:px-3 dark:border-0 text-center rounded bg-slate-200 hover:bg-slate-300 dark:bg-zinc-700 hover:dark:bg-zinc-700 hover:no-underline transition-colors duration-300 ease-in-out",onClick:t,type:"button",children:"Cancel"}),(0,a.jsx)("button",{className:"mb-2 md:mb-0 mr-0 md:mr-2 py-2 px-3 border-0 dark:py-2 dark:px-3 dark:border-0 text-center rounded dark:bg-zinc-700 hover:dark:bg-zinc-700 hover:no-underline transition-colors duration-300 ease-in-out ".concat("DELETE"!==i||r?"bg-red-200 hover:bg-red-200 dark:bg-red-950 hover:dark:bg-red-950 cursor-not-allowed":"bg-red-500 hover:bg-red-600 dark:bg-red-800 hover:dark:bg-red-900"),disabled:"DELETE"!==i||r,onClick:c,type:"button",children:r?"Deleting...":"Delete Account"})]})]})})};var i=r(2632),o=r(194),c=r(8230),x=r.n(c),m=r(7242);let u=e=>{let{onClose:t}
1=e,[r,s]=(0,n.useState)(!1),[d,i]=(0,n.useState)(""),o=async()=>{"RESET"===d&&(r||(s(!0),await fetch("/api/user/nodes/progress",{method:"DELETE"}),s(!1),null==t||t()))};return(0,a.jsx)(l.A,{onClose:t,"data-sentry-element":"Modal","data-sentry-component":"ResetProgress","data-sentry-source-file":"ResetProgress.tsx",children:(0,a.jsxs)("div",{className:"flex flex-col px-4 py-3",children:[(0,a.jsx)("h2",{className:"text-2xl mb-2",children:"Are you sure?"}),(0,a.jsxs)("p",{className:"text-gray-400 mb-4",children:["This action is irreversible. Your reading progress will be fully reset and your last known position in the papers will be lost. Type"," ",(0,a.jsx)("code",{className:"text-gray-600 dark:text-white font-bold dark:font-base dark:text-sm",children:"RESET"})," ","below to confirm."]}),(0,a.jsx)("input",{autoFocus:!0,className:"text-sm focus:outline-none focus:dark:outline-none border-0 dark:border-0 bg-slate-200 text-gray-600 dark:bg-zinc-900 dark:text-white rounded py-2 px-3 dark:py-2 dark:px-3 mb-4",onChange:e=>i(e.target.value),placeholder:"Type RESET to confirm",type:"text",value:d}),(0,a.jsxs)("div",{className:"flex justify-center items-center",children:[(0,a.jsx)("button",{className:"mb-2 md:mb-0 mr-0 md:mr-2 py-2 px-3 border-0 dark:py-2 dark:px-3 dark:border-0 text-center rounded bg-slate-200 hover:bg-slate-300 dark:bg-zinc-700 hover:dark:bg-zinc-700 hover:no-underline transition-colors duration-300 ease-in-out",onClick:t,type:"button",children:"Cancel"}),(0,a.jsx)("button",{className:"mb-2 md:mb-0 mr-0 md:mr-2 py-2 px-3 border-0 dark:py-2 dark:px-3 dark:border-0 text-center rounded dark:bg-zinc-700 hover:dark:bg-zinc-700 hover:no-underline transition-colors duration-300 ease-in-out ".concat("RESET"!==d||r?"bg-red-200 hover:bg-red-200 dark:bg-red-950 hover:dark:bg-red-950 cursor-not-allowed":"bg-red-500 hover:bg-red-600 dark:bg-red-800 hover:dark:bg-red-900"),disabled:"RESET"!==d||r,onClick:o,type:"button",children:r?"Resetting...":"Reset Progress"})]})]})})};var b=r(956),h=r(2217);let g=e=>{let{className:t}=e,{theme:r,setTheme:s}=(0,h.D)();return(0,a.jsxs)("select",{className:t||"",onChange:e=>{s(e.target.value)},value:r,"data-sentry-component":"ThemeSwitcher","data-sentry-source-file":"ThemeSwitcher.tsx",children:[(0,a.jsx)("option",{value:"system",children:"System"}),(0,a.jsx)("option",{value:"light",children:"Light"}),(0,a.jsx)("option",{value:"dark",children:"Dark"})]})},f=e=>{let{enabled:t,loading:r,onClick:s,disabled:n=!1}=e;return(0,a.jsx)("button",{onClick:s,disabled:n||r,className:"\n      relative inline-flex h-7 w-12 items-center rounded-full border-none\n      transition-colors duration-200 ease-in-out focus:outline-none\n      ".concat(t?"bg-blue-400 dark:bg-blue-500":"bg-gray-200 dark:bg-zinc-600","\n      ").concat(n?"opacity-50 cursor-not-allowed":"cursor-pointer","\n    "),"data-sentry-component":"ToggleSwitch","data-sentry-source-file":"ToggleSwitch.tsx",children:(0,a.jsx)("span",{className:"\n        ".concat(t?"translate-x-4":"-translate-x-1","\n        inline-block h-5 w-5 transform rounded-full bg-white shadow-md\n        transition duration-200 ease-in-out\n      ")})})},y=()=>{var e,t;let r=(0,s.useSession)(),[l,c]=(0,n.useState)(!1),[h,y]=(0,n.useState)(!1),[k,p]=(0,n.useState)(!1),[j,v]=(0,n.use
1State)(!1),[w,N]=(0,n.useState)(!1),[E,C]=(0,n.useState)(!1),[S,z]=(0,n.useState)(!1),[D,T]=(0,n.useState)(!1),[A,R]=(0,n.useState)("system");(0,n.useEffect)(()=>{"authenticated"===r.status&&fetch("/api/user").then(e=>e.json()).then(e=>{N(e.emailNotificationsEnabled),C(e.emailDailyQuoteEnabled),z(e.emailContinueReadingEnabled),T(e.emailChangelogEnabled),R(e.theme),c(e.isAdmin||!1)}),"unauthenticated"===r.status&&(window.location.href="/")},[r.status]);let L=async e=>{v(!0);let t={};switch(e){case"all":let r=!w;t.emailNotificationsEnabled=r,t.emailDailyQuoteEnabled=r,t.emailContinueReadingEnabled=r,t.emailChangelogEnabled=r;break;case"dailyQuote":t.emailDailyQuoteEnabled=!E;break;case"continueReading":t.emailContinueReadingEnabled=!S;break;case"changelog":t.emailChangelogEnabled=!D}await fetch("/api/user",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),void 0!==t.emailNotificationsEnabled&&N(t.emailNotificationsEnabled),void 0!==t.emailDailyQuoteEnabled&&C(t.emailDailyQuoteEnabled),void 0!==t.emailContinueReadingEnabled&&z(t.emailContinueReadingEnabled),void 0!==t.emailChangelogEnabled&&T(t.emailChangelogEnabled),v(!1)};return(0,a.jsxs)("div",{className:"flex flex-col min-h-screen bg-slate-100 text-gray-700 dark:bg-neutral-800 dark:text-white","data-sentry-component":"Settings","data-sentry-source-file":"index.tsx",children:[(0,a.jsx)(o.A,{metaDescription:"Customize your UrantiaHub experience in Settings, tailoring the platform to suit your reading preferences and accessibility needs.",titlePrefix:"Settings","data-sentry-element":"HeadTag","data-sentry-source-file":"index.tsx"}),(0,a.jsx)(m.A,{"data-sentry-element":"Navbar","data-sentry-source-file":"index.tsx"}),h&&(0,a.jsx)(d,{onClose:()=>y(!1)}),k&&(0,a.jsx)(u,{onClose:()=>p(!1)}),(0,a.jsxs)("main",{className:"mt-8 flex-grow container mx-auto px-4 my-4 max-w-3xl paper-content min-h-screen",children:[(0,a.jsx)("h1",{className:"text-2xl md:text-4xl dark:text-white font-bold mb-8 text-center",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col w-full",children:["loading"===r.status&&(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center mb-8",children:[(0,a.jsx)("p",{className:"dark:text-white mb-4",children:"Loading..."}),(0,a.jsx)(b.A,{style:{margin:0}})]}),"authenticated"===r.status&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:"text-right text-gray-400 dark:text-gray-500 text-xs",children:["Logged in as ",null==r||null==(t=r.data)||null==(e=t.user)?void 0:e.email]}),(0,a.jsx)("h2",{className:"text-xl md:text-2xl dark:text-white font-bold mb-4",children:"Personal"}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row justify-end border border-gray-300 dark:border-zinc-700 rounded-lg p-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex flex-col w-full justify-center text-base flex-1 mb-4 md:mb-0",children:[(0,a.jsx)("h3",{className:"dark:text-white font-bold mb-1 mt-0",children:"Light / Dark Mode"}),(0,a.jsx)("p",{className:"text-gray-500 dark:text-gray-300 text-sm",children:"Select the theme that suits your reading preferences."})]}),(0,a.jsx)("div",{className:"flex flex-col justify-center flex-1",children:(0,a.jsx)(g,{className:"border-0 dark:border-0 text-center rounded bg-white hover:bg-white text-gray-400 dark:bg-zinc-700 hover:dark:bg-zinc-700 hover:no-underline transition-colors duration-300 ease-in-out cursor-pointer"})})]}),(0,a.jsx)("div",{className:"flex flex-col border border-gray-300 dark:border-zinc-700 rounded-lg p-6 mb-4",children:(0,a.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Email Notifications"}),(0,a.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Manage your email preferences"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-base text-gray-900 dark:text-white",children:"All notifications"}),(0,a.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Control all email notifications"})]}),(0,a.jsx)(f,{enabled:w,loading:j,onClick:()=>L("all")})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-base text-gray-900 dark:text-white",children:"Daily Quotes"}),(0,a.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Receive daily inspirational quotes"})]}),(0,a.jsx)(f,{enabled:E,loading:j,onClick:()=>L("dailyQuote"),disabled:!w})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-base text-gray-900 dark:text-white",children:"Continue Reading"}),(0,a.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Get reminders to continue your reading"})]}),(0,a.jsx)(f,{enabled:S,loading:j,onClick:()=>L("continueReading"),disabled:!w})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-base text-gray-900 dark:text-white",children:"Feature Updates"}),(0,a.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Stay informed about new features"})]}),(0,a.jsx)(f,{enabled:D,loading:j,onClick:()=>L("changelog"),disabled:!w})]})]})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row justify-end border border-gray-300 dark:border-zinc-700 rounded-lg p-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex flex-col w-full justify-center text-base flex-1 mb-4 md:mb-0",children:[(0,a.jsx)("h3",{className:"dark:text-white font-bold mb-1 mt-0",children:"Your Interests"}),(0,a.jsx)("p",{className:"text-gray-500 dark:text-gray-300 text-sm",children:"Update interests to get relevant recommendations."})]}),(0,a.jsx)("div",{className:"flex flex-col justify-center flex-1",children:(0,a.jsx)(x(),{className:"border-0 dark:border-0 text-center rounded bg-white hover:bg-white text-gray-400 dark:text-white dark:bg-zinc-700 hover:dark:bg-zinc-700 hover:no-underline transition-colors duration-300 ease-in-out py-2 px-4",href:"/settings/interests",children:"Update Interests"})})]}),(0,a.jsx)("h2",{className:"text-xl md:text-2xl dark:text-white font-bold mb-4 text-red-500",children:"Danger Zone"}),(0,a.jsxs)("div",{className:"dark:bg-zinc-900 flex flex-col border border-red-600 dark:border-red-600 rounded-lg p-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex flex-col md:flex-row justify-end mb-6 md:mb-5",children:[(0,a.jsxs)("div",{className:"flex flex-col w-full justify-center text-base flex-1 mb-4 md:mb-0",children:[(0,a.jsx)("h3",{className:"dark:text-white font-bold mb-1 mt-0",children:"Reset Progress"}),(0,a.jsx)("p",{className:"text-gray-500 dark:text-gray-300 text-sm",children:"Reset your reading progress and start over from the beginning."})]}),(0,a.jsx)("div",{className:"flex flex-col justify-center flex-1",children:(0,a.jsx)("button",{className:"border-0 dark:border-0 text-center rounded bg-red-500 text-white hover:bg-red-600 dark:bg-zinc-800 dark:text-red-500 hover:dark:bg-zinc-700 hover:no-underline transition-colors duration-300 ease-in-out",onClick:()=>p(!0),type:"button",children:"Reset Progress"})})]}),(0,a.jsx)("hr",{className:"border-t border-gray-300 dark:border-zinc-600"}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row justify-end mt-4",children:[(0,a.jsxs)("div",{className:"flex flex-col w-full justify-center text-base flex-1 mb-4 md:mb-0",children:[(0,a.jsx)("h3",{className:"dark:text-white font-bold mb-1 mt-0",children:"Delete Account"}),(0,a.jsx)("p",{className:"text-gray-500 dark:text-gray-300 text-sm",children:"Once you delete your account, there is no going back. Please be certain."})]}),(0,a.jsx)("div",{className:"flex flex-col justify-center flex-1",children:(0,a.jsx)("button",{className:"border-0 dark:border-0 text-center rounded bg-red-500 text-white hover:bg-red-600 dark:bg-zinc-800 dark:text-red-500 hover:dark:bg-zinc-700 hover:no-underline transition-colors duration-300 ease-in-out",onClick:()=>y(!0),type:"button",children:"Delete Account"})})]})]}),l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-xl md:text-2xl dark:text-white font-bold mb-4",children:"Admin"}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row justify-end border border-gray-300 dark:border-zinc-700 rounded-lg p-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex flex-col w-full justify-center text-base flex-1 mb-4 md:mb-0",children:[(0,a.jsx)("h3",{className:"dark:text-white font-bold mb-1 mt-0",children:"Daily Quote Emails"}),(0,a.jsx)("p",{className:"text-gray-500 dark:text-gray-300 text-sm",children:"Manage curated quotes for daily email campaigns."})]}),(0,a.jsx)("div",{className:"flex flex-col justify-center flex-1",children:(0,a.jsx)(x(),{className:"border-0 dark:border-0 text-center rounded bg-white hover:bg-white text-gray-400 dark:text-white dark:bg-zinc-700 hover:dark:bg-zinc-700 hover:no-underline transition-colors duration-300 ease-in-out py-2 px-4",href:"/admin/curated-quotes",children:"Manage"})})]})]})]})]})]}),(0,a.jsx)(i.A,{"data-sentry-element":"Footer","data-sentry-source-file":"index.tsx"})]})}},5002:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(7161).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
1],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},7161:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var a=r(4232);let s=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var n={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,a.forwardRef)((e,t)=>{let{color:r="currentColor",size:l=24,strokeWidth:d=2,absoluteStrokeWidth:i,className:o="",children:c,iconNode:x,...m}=e;return(0,a.createElement)("svg",{ref:t,...n,width:l,height:l,stroke:r,strokeWidth:i?24*Number(d)/Number(l):d,className:s("lucide",o),...m},[...x.map(e=>{let[t,r]=e;return(0,a.createElement)(t,r)}),...Array.isArray(c)?c:[c]])}),d=(e,t)=>{let r=(0,a.forwardRef)((r,n)=>{let{className:d,...i}=r;return(0,a.createElement)(l,{ref:n,iconNode:t,className:s("lucide-".concat(e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),d),...i})});return r.displayName="".concat(e),r}}},e=>{e.O(0,[695,542,242,636,593,792],()=>e(e.s=817)),_N_E=e.O()}]);

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.