1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[203],{3860:e=>{(()=>{"use strict";var t={d:(e,a)=>{for(var s in a)t.o(a,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:a[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},a={};t.r(a),t.d(a,{default:()=>l});var s=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")}return e=[{key:"changeHeightWidth",value:function(e,t,a,s,l,i){return a>s&&(e=Math.round(e*s/a),a=s),e>t&&(a=Math.round(a*t/e),e=t),l&&a<l&&(e=Math.round(e*l/a),a=l),i&&e<i&&(a=Math.round(a*i/e),e=i),{height:e,width:a}}},{key:"resizeAndRotateImage",value:function(e,t,a,s,l){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"jpeg",r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:100,n=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,o=document.createElement("canvas"),d=e.width,c=e.height,m=this.changeHeightWidth(c,a,d,t,s,l);n&&(90===n||270===n)?(o.width=m.height,o.height=m.width):(o.width=m.width,o.height=m.height),d=m.width,c=m.height;var u=o.getContext("2d");return u.fillStyle="rgba(0, 0, 0, 0)",u.fillRect(0,0,d,c),u.imageSmoothingEnabled&&u.imageSmoothingQuality&&(u.imageSmoothingQuality="high"),n&&(u.rotate(n*Math.PI/180),90===n?u.translate(0,-o.width):180===n?u.translate(-o.width,-o.height):270===n?u.translate(-o.height,0):0!==n&&360!==n||u.translate(0,0)),u.drawImage(e,0,0,d,c),o.toDataURL("image/".concat(i),r/100)}},{key:"b64toByteArrays",value:function(e,t){t=t||"image/jpeg";for(var a=atob(e.toString().replace(/^data:image\/(png|jpeg|jpg|webp);base64,/,"")),s=[],l=0;l<a.length;l+=512){for(var i=a.slice(l,l+512),r=Array(i.length),n=0;n<i.length;n++)r[n]=i.charCodeAt(n);var o=new Uint8Array(r);s.push(o)}return s}},{key:"b64toBlob",value:function(e,t){return new Blob(this.b64toByteArrays(e,t),{type:t,lastModified:new Date})}},{key:"b64toFile",value:function(e,t,a){return new File(this.b64toByteArrays(e,a),t,{type:a,lastModified:new Date})}},{key:"createResizedImage",value:function(e,a,s,l,i,r,n){var o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"base64",d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null,m=new FileReader;if(!e)throw Error("File Not Found!");if(e.type&&!e.type.includes("image"))throw Error("File Is NOT Image!");m.readAsDataURL(e),m.onload=function(){var u=new Image;u.src=m.result,u.onload=function(){var m=t.resizeAndRotateImage(u,a,s,d,c,l,i,r),h="image/".concat(l);switch(o){case"blob":n(t.b64toBlob(m,h));break;case"base64":default:n(m);break;case"file":var p=e.name.toString().replace(/(png|jpeg|jpg|webp)$/i,"").concat(l.toString());n(t.b64toFile(m,p,h))}}},m.onerror=function(e){throw Error(e)}}}],function(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}(t,e),t}();let l={imageFileResizer:function(e,t,a,l,i,r,n,o,d,c){return s.createResizedImage(e,t,a,l,i,r,n,o,d,c)}};e.exports=a})()},7873:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var s=a(6029),l=a(55729),i=a(58578),r=a(35460),n=a(14187),o=a(38544),d=a(32764),c=a(83248),m=a(35270),u=a(36919);function h(e){var t,a;let{onClose:h}=e,{t:p}=(0,n.Bd)(),{data:x}=(0,r.useSession)(),{data:f}=(0,o.Jd)(),[g,b]=(0,l.useState)(""),[v,j]=(0,l.useState)(),[w,y]=(0,l.useState)(),[_,N]=(0,l.useState)(""),[k,R]=(0,l.useState)(!1),S=(null==f?void 0:f.hasPassword)?""!==g:"confirm"===_.trim(),A=async()=>{if(!S||k)return;R(!0);let e=i.oR.loading(p("deleting_message")),t=await fetch("/api/v1/users/".concat(null==x?void 0:x.user.id),{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:g,cancellation_details:{comment:v,feedback:w}})}),a=(await t.json()).response;i.oR.dismiss(e),t.ok?(0,r.signOut)():(i.oR.error(a),R(!1))};return(0,s.jsxs)(d.A,{toggleModal:h,children:[(0,s.jsx)("p",{className:"text-xl font-thin text-red-500",children:p("delete_account")}
1),(0,s.jsx)(u.w,{className:"my-3"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("p",{children:p("delete_warning")}),(null==f||null==(t=f.subscription)?void 0:t.active)&&"APPLE"===f.subscription.provider&&(0,s.jsxs)("p",{children:[p("delete_account_apple_subscription_notice")," ",(0,s.jsx)("a",{className:"underline text-primary",href:"https://apps.apple.com/account/subscriptions",target:"_blank",rel:"noreferrer",children:"https://apps.apple.com/account/subscriptions"})]}),(null==f||null==(a=f.subscription)?void 0:a.active)&&"GOOGLE"===f.subscription.provider&&(0,s.jsx)("p",{children:p("delete_account_google_subscription_notice")}),(null==f?void 0:f.hasPassword)?(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2 font-semibold",children:p("confirm_password")}),(0,s.jsx)(c.A,{value:g,onChange:e=>b(e.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢",className:"bg-base-100",type:"password"})]}):(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2 font-semibold",children:p("type_confirm_to_delete")}),(0,s.jsx)(c.A,{value:_,onChange:e=>N(e.target.value),placeholder:"confirm",className:"bg-base-100",autoComplete:"off"})]}),(0,s.jsxs)("fieldset",{className:"border rounded-md p-2 border-primary",children:[(0,s.jsxs)("legend",{className:"px-3 py-1 text-sm sm:text-base border rounded-md border-primary",children:[(0,s.jsx)("b",{children:p("optional")})," ",(0,s.jsx)("i",{children:p("feedback_help")})]}),(0,s.jsxs)("label",{className:"w-full flex min-[430px]:items-center items-start gap-2 mb-3 min-[430px]:flex-row flex-col",children:[(0,s.jsxs)("p",{className:"text-sm",children:[p("reason_for_cancellation"),":"]}),(0,s.jsxs)("select",{className:"rounded-md p-1 outline-none bg-base-100",value:w,onChange:e=>y(e.target.value),children:[(0,s.jsx)("option",{value:void 0,children:p("please_specify")}),(0,s.jsx)("option",{value:"customer_service",children:p("customer_service")}),(0,s.jsx)("option",{value:"low_quality",children:p("low_quality")}),(0,s.jsx)("option",{value:"missing_features",children:p("missing_features")}),(0,s.jsx)("option",{value:"switched_service",children:p("switched_service")}),(0,s.jsx)("option",{value:"too_complex",children:p("too_complex")}),(0,s.jsx)("option",{value:"too_expensive",children:p("too_expensive")}),(0,s.jsx)("option",{value:"unused",children:p("unused")}),(0,s.jsx)("option",{value:"other",children:p("other")})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm mb-2",children:p("more_information")}),(0,s.jsx)("textarea",{value:v,onChange:e=>j(e.target.value),placeholder:p("feedback_placeholder"),className:"resize-none w-full rounded-md p-2 border-neutral-content bg-base-100 focus:border-sky-300 dark:focus:border-sky-600 border-solid border outline-none duration-100"})]})]}),(0,s.jsxs)(m.$,{className:"ml-auto",variant:"destructive",disabled:!S||k,onClick:A,children:[(0,s.jsx)("i",{className:"bi-trash text-xl"}),p("delete_your_account")]})]})]})}},20667:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var s=a(6029),l=a(55729);function i(e){let t=0;for(;e;){let a=window.getComputedStyle(e).getPropertyValue("z-index"),s=Number(a);if("auto"!==a&&!isNaN(s)){t=s;break}e=e.parentElement}return t}function r(e){let{children:t,onClickOutside:a,className:r,style:n,onMount:o}=e,d=(0,l.useRef)(null);return(0,l.useEffect)(()=>{function e(e){let t=e.target;if(!t.closest("[data-ignore-click-away]")&&d.current&&!d.current.contains(t)){let s=i(d.current);i(t)<=s&&a(e)}}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[d,a]),(0,l.useEffect)(()=>{d.current&&o&&o(d.current.getBoundingClientRect())},[]),(0,s.jsx)("div",{ref:d,className:r,style:n,children:t})}},30439:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/account",function(){return a(89711)}])},32764:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var s=a(6029),l=a(55729),i=a(56760),r=a(20667),n=a(60087),o=a(67665),d=a(35270);function c(e){let{toggleModal:t,className:a,children:c,dismissible:m=!0,hideCloseButton:u}=e,[h,p]=l.useState(!0),{width:x}=(0,o.A)();return((0,l.useEffect)(()=>
1{if(x>=640)return document.body.style.overflow="hidden",document.body.style.position="relative",()=>{document.body.style.overflow="auto",document.body.style.position=""}},[]),x<640)?(0,s.jsx)(n._s.Root,{open:h,onClose:()=>m&&p(!1),onAnimationEnd:e=>!e&&t(),dismissible:m,children:(0,s.jsxs)(n._s.Portal,{children:[(0,s.jsx)(n._s.Overlay,{className:"fixed inset-0 bg-black/40 z-40"}),(0,s.jsx)(n._s.Content,{className:"flex flex-col rounded-t-xl h-[90%] mt-24 fixed bottom-0 left-0 right-0 z-50",children:(0,s.jsxs)("div",{className:"p-4 bg-base-100 rounded-t-xl flex-1 border-neutral-content border-t overflow-y-auto","data-testid":"mobile-modal-container",children:[(0,s.jsx)("div",{className:"mx-auto w-12 h-1.5 flex-shrink-0 rounded-full bg-neutral mb-5","data-testid":"mobile-modal-slider"}),c]})})]})}):i.createPortal((0,s.jsx)("div",{className:"overflow-y-auto pt-2 sm:py-2 fixed top-0 bottom-0 right-0 left-0 bg-black bg-opacity-10 backdrop-blur-sm flex justify-center items-center fade-in z-40","data-testid":"modal-outer",children:(0,s.jsx)(r.A,{onClickOutside:()=>m&&t(),className:"w-full mt-auto sm:m-auto sm:w-11/12 sm:max-w-xl ".concat(a||""),children:(0,s.jsxs)("div",{className:"slide-up mt-auto sm:m-auto relative border-neutral-content rounded-t-xl sm:rounded-xl border-t sm:border shadow-xl p-5 bg-base-100 overflow-y-auto sm:overflow-y-visible","data-testid":"modal-container",children:[m&&!u&&(0,s.jsx)(d.$,{variant:"ghost",size:"icon",onClick:t,className:"absolute top-4 right-3 z-10 rounded-full",children:(0,s.jsx)("i",{className:"bi-x text-neutral text-xl","data-testid":"close-modal-button"})}),c]})})}),document.body)}},44756:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var s=a(6029);a(55729);var l=a(19784),i=a(58578),r=a(639),n=a.n(r);let o=async e=>{let t=Object.keys(e.files).filter(t=>{let a=e.files[t];return t.startsWith("metadata_")&&!a.dir});return JSON.stringify((await Promise.all(t.map(async t=>JSON.parse(await e.files[t].async("string"))||[]))).flat())},d=async(e,t)=>{let a=e.target.files&&e.target.files[0];if(a){let e=new FileReader;t===l.Km.omnivore?e.readAsArrayBuffer(a):e.readAsText(a,"UTF-8"),e.onload=async function(e){var a;let s=i.oR.loading("Importing..."),r=null==(a=e.target)?void 0:a.result;if(t===l.Km.omnivore)try{let e=await n().loadAsync(r);r=await o(e)}catch(e){console.error("Failed to parse zip file:",e),i.oR.dismiss(s),i.oR.error("Failed to parse the zip file. Please try again.");return}let d={format:t,data:r};try{let e=await fetch("/api/v1/migration",{method:"POST",body:JSON.stringify(d)});if(!e.ok){let t=await e.json();i.oR.dismiss(s),i.oR.error(t.response||"Failed to import bookmarks. Please try again.");return}await e.json(),i.oR.dismiss(s),i.oR.success("Imported the Bookmarks! Reloading the page..."),setTimeout(()=>{location.reload()},2e3)}catch(e){console.error("Request failed",e),i.oR.dismiss(s),i.oR.error("An error occurred while importing bookmarks. Please check the logs for more info.")}},e.onerror=function(e){console.log("Error reading file:",e),i.oR.error("Failed to read the file. Please make sure the file is correct and try again.")}}};var c=a(14187),m=a(73639),u=a(35270);let h=e=>{let{}=e,{t}=(0,c.Bd)();return(0,s.jsxs)(m.rI,{children:[(0,s.jsx)(m.ty,{asChild:!0,children:(0,s.jsxs)(u.$,{variant:"metal",children:[(0,s.jsx)("i",{className:"bi-cloud-upload text-xl"}),t("import_links")]})}),(0,s.jsx)(m.SQ,{side:"bottom",align:"start",children:[{id:"import-linkwarden-file",format:l.Km.linkwarden,label:t("from_linkwarden")},{id:"import-html-file",format:l.Km.htmlFile,label:t("from_html")},{id:"import-pocket-file",format:l.Km.pocket,label:t("from_pocket")},{id:"import-wallabag-file",format:l.Km.wallabag,label:t("from_wallabag")},{id:"import-omnivore-file",format:l.Km.omnivore,label:t("from_omnivore")}].map(e=>(0,s.jsx)(m._2,{asChild:!0,onSelect:e=>e.preventDefault(),children:(0,s.jsxs)("label",{htmlFor:e.id,className:"whitespace-nowrap w-full",children:[e.label,(0,s.jsx)("input",{type:"file",id:e.id,accept:"import-html-file"===e.id?".html":"import-omnivore-file"===e.id?".zip":"import-pocket-file"===e.id?".csv":".json",className:"hidden",onChange:t=>d(t,e.format)})]})},e.id))})]})}},57343:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var s=a(6029),l=a(82203),i=a.n(l),r=a(81278),n=a(55729),o=a(14187),d=a(2871),c=a(1525),m=a(35270),u=a(45933);function h(e){let{links:t,className:a,toggleSidebar:l,sidebarIsCollapsed:h}=e,{t:p}
1=(0,o.Bd)(),x=(0,r.useRouter)(),[f,g]=(0,n.useState)("");return(0,n.useEffect)(()=>{g(x.asPath)},[x]),(0,s.jsx)(d.A,{className:a,toggleSidebar:l,sidebarIsCollapsed:h,children:e=>{let{collapsed:a}=e,l=(0,s.jsx)("div",{className:(0,u.cn)("flex flex-col gap-2",a&&"gap-3"),children:t.map(e=>(0,s.jsx)(c.A,{title:e.title,href:e.href,icon:e.icon,active:f===e.href,sidebarIsCollapsed:a},e.href))});return(0,s.jsxs)(s.Fragment,{children:[a?(0,s.jsx)("div",{className:"flex flex-col items-center shrink-0",children:(0,s.jsx)(d.M,{icon:"bi-chevron-left",variant:"ghost",label:p("back_to_dashboard"),tooltipSide:"right",onClick:()=>x.push("/dashboard")})}):(0,s.jsx)("div",{className:"shrink-0 pt-1 px-1",children:(0,s.jsx)(m.$,{asChild:!0,size:"sm",variant:"ghost",className:"justify-start w-full h-8",children:(0,s.jsxs)(i(),{href:"/dashboard",children:[(0,s.jsx)("i",{className:"bi-chevron-left text-md"}),(0,s.jsx)("p",{children:p("back_to_dashboard")})]})})}),a?(0,s.jsx)("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center",children:l}):(0,s.jsx)("div",{className:"flex-1 min-h-0 overflow-y-auto mt-1 p-1",children:l})]})}})}},83248:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var s=a(6029),l=a(23994);let i=(0,a(55729).forwardRef)((e,t)=>{let{className:a,type:i="text",...r}=e;return(0,s.jsx)("input",{ref:t,type:i,className:(0,l.cn)("w-full rounded-md p-2 border-neutral-content border-solid border outline-none focus:border-primary duration-100",a),...r})});i.displayName="TextInput";let r=i},89711:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSP:()=>R,default:()=>S});var s=a(6029),l=a(55729),i=a(58578),r=a(98558),n=a(83248),o=a(3860),d=a.n(o),c=a(37812),m=a(82203),u=a.n(m),h=a(32764),p=a(14187),x=a(35270),f=a(36919),g=a(43003);function b(e){let{onClose:t,onSubmit:a,oldEmail:i,newEmail:r}=e,{t:o}=(0,p.Bd)(),[d,c]=(0,l.useState)(""),{data:m}=(0,g.UK)();return(0,s.jsxs)(h.A,{toggleModal:t,children:[(0,s.jsx)("p",{className:"text-xl font-thin",children:o("confirm_password")}),(0,s.jsx)(f.w,{className:"my-3"}),(0,s.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,s.jsxs)("p",{children:[o("password_change_warning"),(null==m?void 0:m.STRIPE_ENABLED)&&o("stripe_update_note")]}),(0,s.jsx)("p",{children:o("sso_will_be_removed_warning",{service:(null==m?void 0:m.GOOGLE_ENABLED)?"Google":""})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:o("old_email")}),(0,s.jsx)("p",{className:"text-neutral",children:i})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:o("new_email")}),(0,s.jsx)("p",{className:"text-neutral",children:r})]}),(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsx)("p",{className:"mb-2",children:o("password")}),(0,s.jsx)(n.A,{value:d,onChange:e=>c(e.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢",className:"bg-base-200",type:"password",autoFocus:!0})]}),(0,s.jsx)("div",{className:"flex justify-end items-center",children:(0,s.jsx)(x.$,{variant:"primary",onClick:()=>a(d),children:o("confirm")})})]})]})}var v=a(7873),j=a(95823),w=a(38544),y=a(14759),_=a(44756),N=a(73639);let k=()=>{let[e,t]=(0,l.useState)(!1),[a,r]=(0,l.useState)(!1),[o,m]=(0,l.useState)(!1),{data:h}=(0,w.Jd)(),k=(0,w.Qc)(),[R,S]=(0,l.useState)((null==h?void 0:h.id)?h:{id:null,name:"",username:"",email:"",emailVerified:null,password:void 0,image:"",createdAt:null}),{data:A}=(0,g.UK)(),{t:E}=(0,p.Bd)();(0,l.useEffect)(()=>{(null==h?void 0:h.id)&&S({...h})},[h]);let C=async e=>{var t,a;let s=null==(t=e.target.files)?void 0:t[0];if(!s)return i.oR.error(E("image_upload_no_file_error"));if(["png","jpeg","jpg"].includes(null==(a=s.name.split(".").pop())?void 0:a.toLowerCase())){let e=await new Promise(e=>{d().imageFileResizer(s,150,150,"JPEG",100,0,t=>{e(t)},"blob")});if(e.size<1048576){let t=new FileReader;t.onload=()=>{S({...R,image:t.result})},t.readAsDataURL(e)}else i.oR.error(E("image_upload_size_error"))}else i.oR.error(E("image_upload_format_error"))},P=async e=>{if(!(null==h?void 0:h.id)||!z)return;if(!/^[a-z0-9_-]{3,50}$/.test(R.username||""))return i.oR.error(E("username_invalid_guide"));let a=y.YjP().trim().email().toLowerCase().safeParse(R.email||"");if((null==A?void 0:A.EMAIL_PROVIDER)&&!a.success)return i.oR.error(E("email_invalid"));m(!0);let s=i.oR.loading(E("applying_settings"));await k.mutateAsync({id:h.id,name:R.name,username:R.username,email:R.email,locale:R.locale,image:R.image,isPrivate:R.isPrivate,password:e||void 0},{onSettled:(e,a)=>{m(!1),i.oR.dismiss(s),a?i.oR.error(a.message):(e.response.email!==R.email&&(i.oR.success(E("email_change_request")),t(!1)),i.oR.success(E("settings_applied")))}}),R.locale!==(null==h?void 0:h.locale)&&setTimeout(()=>{location.reload()},1e3)},z=(0,l.useMemo)(()=>!!(null==h?void 0:h.id)&&((R.name||"")!==(h.name||"")||(R.username||"")!==(h.username||"")||(R.email||"")!==(h.email||"")||(R.locale||"")!==(h.locale||"")||(R.image||"")!==(h.image||"")),[h,R]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("i",{className:"bi-person text-primary text-2xl"}),(0,s.jsx)("p",{className:"capitalize text-3xl font-thin inline",children:E("accountSettings")})]}),(0,s.jsx)(f.w,{className:"my-3"}),(0,s.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,s.jsxs)("div",{className:"grid sm:grid-cols-2 gap-3 auto-rows-auto max-w-screen-lg",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2",children:E("display_name")}),(0,s.jsx)(n.A,{value:R.name||"",className:"bg-base-200",onChange:e=>S({...R,name:e.target.value})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2",children:E("username")}),(0,s.jsx)(n.A,{value:R.username||"",className:"bg-base-200",onChange:e=>S({...R,username:e.target.value})})]}),(null==A?void 0:A.EMAIL_PROVIDER)&&(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2",children:E("email")}),(0,s.jsx)(n.A,{value:R.email||"",type:"email",className:"bg-base-200",onChange:e=>S({...R,email:e.target.value})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2",children:E("language")}),(0,s.jsxs)("select",{value:R.locale||"",onChange:e=>{S({...R,locale:e.target.value})},className:"select border border-neutral-content focus:outline-none focus:border-primary duration-100 w-full bg-base-200 rounded-[0.375rem] min-h-0 h-[2.625rem] leading-4 p-2",children:[j.i18n.locales.map(e=>(0,s.jsx)("option",{value:e,className:"capitalize",children:new Intl.DisplayNames(e,{type:"language"}).of(e)||""},e)),(0,s.jsx)("option",{disabled:!0,children:E("more_coming_soon")})]})]})]}),(0,s.jsxs)("div",{className:"sm:row-span-2 sm:justify-self-center my-3",children:[(0,s.jsx)("p",{className:"mb-2 sm:text-center",children:E("profile_photo")}),(0,s.jsxs)("div",{className:"w-28 h-28 flex gap-3 sm:flex-col items-center",children:[(0,s.jsx)(c.A,{priority:!0,src:R.image?R.image:void 0,large:!0}),(0,s.jsxs)(N.rI,{children:[(0,s.jsx)(N.ty,{asChild:!0,children:(0,s.jsxs)(x.$,{variant:"metal",size:"sm",className:"text-sm",children:[(0,s.jsx)("i",{className:"bi-pencil-square text-md"}),E("edit")]})}),(0,s.jsxs)(N.SQ,{align:"start",className:"bg-base-200 border border-neutral-content roun
1ded-box p-1",children:[(0,s.jsxs)(N._2,{onSelect:e=>e.preventDefault(),children:[(0,s.jsx)("i",{className:"bi-upload text-md"}),(0,s.jsxs)("label",{className:"w-full flex items-center justify-between cursor-pointer whitespace-nowrap",children:[E("upload_new_photo"),(0,s.jsx)("input",{type:"file",name:"photo",id:"upload-photo",accept:".png, .jpeg, .jpg",className:"hidden",onChange:C})]})]}),R.image&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.mB,{}),(0,s.jsxs)(N._2,{onClick:()=>{S({...R,image:""})},className:"text-error",children:[(0,s.jsx)("i",{className:"bi-trash text-md"}),E("remove_photo")]})]})]})]})]})]})]}),(0,s.jsx)(x.$,{variant:"primary",onClick:()=>{(null==h?void 0:h.email)!==R.email?t(!0):P()},disabled:o||!z,className:"w-full sm:w-fit",children:E("save_changes")}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("i",{className:"bi-arrow-down-up text-primary text-2xl"}),(0,s.jsx)("p",{className:"capitalize text-3xl font-thin inline",children:E("import_export")})]}),(0,s.jsx)(f.w,{className:"my-3"}),(0,s.jsxs)("div",{className:"flex gap-3 flex-col",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2",children:E("import_data")}),(0,s.jsx)(_.A,{})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2",children:E("download_data")}),(0,s.jsx)(u(),{className:"w-fit",href:"/api/v1/migration",children:(0,s.jsxs)("div",{className:"select-none relative duration-200 rounded-lg text-sm text-center w-fit flex justify-center items-center gap-2 disabled:pointer-events-none disabled:opacity-50 bg-neutral-content text-base-content hover:bg-neutral-content/80 border border-neutral/30 h-10 px-4 py-2",children:[(0,s.jsx)("i",{className:"bi-cloud-download text-xl duration-100"}),(0,s.jsx)("p",{children:E("export_data")})]})})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center gap-2 w-full rounded-md h-8",children:(0,s.jsx)("p",{className:"text-red-500 dark:text-red-500 truncate w-full pr-7 text-3xl font-thin",children:E("delete_account")})}),(0,s.jsx)(f.w,{className:"my-3"}),(0,s.jsxs)("p",{children:[E("delete_account_warning"),(null==A?void 0:A.STRIPE_ENABLED)&&" "+E("cancel_subscription_notice")]})]}),(0,s.jsx)(x.$,{onClick:()=>r(!0),variant:"destructive",size:"sm",className:"w-fit",children:E("delete_account")})]}),a&&(0,s.jsx)(v.A,{onClose:()=>r(!1)}),e&&(0,s.jsx)(b,{onClose:()=>t(!1),onSubmit:P,oldEmail:(null==h?void 0:h.email)||"",newEmail:R.email||""})]})};k.getLayout=function(e){return(0,s.jsx)(r.A,{children:e})};var R=!0;let S=k},95823:e=>{"use strict";e.exports={i18n:{defaultLocale:"en",locales:["en","it","fr","zh","zh-TW","uk","pt-BR","ja","es","de","nl","tr","pl","ru"]},reloadOnPrerender:!1}},98558:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var s=a(6029),l=a(14187),i=a(38544),r=a(43003),n=a(57343);function o(e){let{className:t,toggleSidebar:a,sidebarIsCollapsed:o}=e,{t:d}=(0,l.Bd)(),{data:c}=(0,i.Jd)(),{data:m}=(0,r.UK)(),u=[{title:d("account"),href:"/settings/account",icon:"bi-person"},{title:d("preference"),href:"/settings/preference",icon:"bi-sliders"},{title:"RSS Subscriptions",href:"/settings/rss-subscriptions",icon:"bi-rss"},{title:d("access_tokens"),href:"/settings/access-tokens",icon:"bi-key"},{title:d("password"),href:"/settings/password",icon:"bi-lock"}];return(null==m?void 0:m.STRIPE_ENABLED)&&!(null==c?void 0:c.parentSubscriptionId)&&u.push({title:d("billing"),href:"/settings/billing",icon:"bi-credit-card"}),(0,s.jsx)(n.A,{className:t,toggleSidebar:a,sidebarIsCollapsed:o,links:u})}a(55729);var d=a(62127);function c(e){let{children:t}=e,{sidebarIsCollapsed:a,toggleSidebar:l}=(0,d.A)();return(0,s.jsxs)("div",{className:"flex","data-testid":"settings-wrapper",children:[(0,s.jsx)(o,{toggleSidebar:l,sidebarIsCollapsed:a}),(0,s.jsx)("div",{className:"".concat(a?"":"lg:w-[calc(100%-288px)]"," w-[calc(100%-56px)] sm:pb-0 pb-20 flex flex-col h-screen overflow-y-auto"),children:(0,s.jsx)("div",{className:"p-3 mx-auto w-full max-w-3xl min-[2000px]:max-w-6xl",children:t})})]})}}},e=>{e.O(0,[8986,2203,3458,7129,7113,87,4759,639,5051,636,6593,8792],()=>e(e.s=30439)),_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.