1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[98],{19446:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/appearance",function(){return a(60204)}])},60204:function(e,s,a){"use strict";a.r(s);var l=a(85893),r=a(67294),n=a(9008),o=a.n(n),d=a(81758),i=a(35486),t=a(89121),c=a(54373),u=a(34444),m=a(60174),x=a(26527),h=a(3889),v=a(28886),b=a(10164),f=a.n(b),p=a(86501);let g=()=>{var e,s,a;let{data:n,error:h,isLoading:b,mutate:g}=(0,d.ZP)("/user",e=>c.Z.get(e),{revalidateOnFocus:!1});console.log(m.Rq);let[j,w]=(0,r.useState)(!1),[N,y]=(0,r.useState)(0),[k,_]=(0,r.useState)(""),F=f()["[data-theme=".concat(null==n?void 0:null===(e=n.user)||void 0===e?void 0:e.theme,"]")],z=async e=>{let{theme:s,font:a}=e;if(!k){_(s),(0,p.Am)("Saving...");try{await c.Z.patch("/user/appearence",{theme:s,font:a}),p.Am.success("Saved"),g(),y(e=>e+1||0)}catch(e){console.error(e)}finally{_("")}}};return b?(0,l.jsx)(v.Z,{}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o(),{children:(0,l.jsx)("title",{children:"Indie Page Theme"})}),(0,l.jsxs)("main",{className:"min-h-screen",children:[(0,l.jsx)(u.h,{user:n.user}),(0,l.jsxs)("div",{className:"flex gap-4 h-full p-4 max-w-7xl mx-auto",children:[(0,l.jsxs)("div",{className:"max-w-3xl mx-auto md:basis-3/5 w-full",children:[(0,l.jsxs)("div",{className:"mb-8",children:[(0,l.jsx)("p",{className:"uppercase text-xs text-base-content-secondary mb-2",children:"Font"}),(0,l.jsx)(i.J,{className:"",children:e=>{var s,a,r,o,d,c;let{open:u}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(i.J.Button,{className:"bg-base-200 hover:bg-base-300 duration-200 p-4 rounded-xl text-2xl shadow",style:{fontFamily:(null==n?void 0:null===(s=n.user)||void 0===s?void 0:s.font)&&(null==n?void 0:null===(a=n.user)||void 0===a?void 0:a.font)!=="default"?null===(d=(0,m.qT)(null==n?void 0:null===(c=n.user)||void 0===c?void 0:c.font))||void 0===d?void 0:null===(o=d.font)||void 0===o?void 0:null===(r=o.style)||void 0===r?void 0:r.fontFamily:null==F?void 0:F.fontFamily},children:[(0,l.jsx)("span",{className:"font-bold",children:"A"}),"a"]}),(0,l.jsx)(t.u,{enter:"transition duration-100 ease-out",enterFrom:"transform scale-95 opacity-0",enterTo:"transform scale-100 opacity-100",leave:"transition duration-75 ease-out",leaveFrom:"transform scale-100 opacity-100",leaveTo:"transform scale-95 opacity-0",children:(0,l.jsx)(i.J.Panel,{className:"absolute top-1 z-50 bg-base-100 w-content p-4 rounded-xl shadow-[0_3px_10px_rgb(0,0,0,0.2)]",children:(0,l.jsx)("div",{className:"grid grid-flow-col grid-rows-3 md:grid-rows-3 gap-2 p-1 -m-1 overflow-y-scroll justify-start",children:m.Rq.filter(e=>!1!==e.isShown).map(e=>{var s,a,r;return(0,l.jsx)("div",{className:"relative bg-base-200 text-2xl md:text-4xl hover:bg-base-300 duration-100 cursor-pointer rounded-xl p-4 border ".concat((null==n?void 0:null===(s=n.user)||void 0===s?void 0:s.font)===e.id?"border-[#4397F7]":"border-base-300/25"),onClick:()=>z({font:e.id}),children:(0,l.jsxs)("span",{style:{fontFamily:"default"===e.id?null==F?void 0:F.fontFamily:null==e?void 0:null===(r=e.font)||void 0===r?void 0:null===(a=r.style)||void 0===a?void 0:a.fontFamily},children:[(0,l.jsx)("span",{className:"font-bold",children:"A"}),"a"]})},e.id)})})})})]})}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"uppercase text-xs text-base-content-secondary mb-2",children:"Theme"}),(0,l.jsx)(i.J,{className:"",children:e=>{var s;let{open:a}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.J.Button,{className:"inline-block bg-base-200 rounded-lg hover:bg-base-300 duration-100 ",children:(0,l.jsxs)("div",{className:"h-12 w-20 grid grid-cols-4 bg-transparent rounded-lg shadow m-4","data-theme":null==n?void 0:null===(s=n.user)||void 0===s?void 0:s.theme,children:[(0,l.jsx)("div",{className:"h-full bg-base-100 rounded-l-lg"}),(0,l.jsx)("div",{className:"h-full bg-base-200"}),(0,l.jsx)("div",{className:"h-full bg-base-content"}),(0,l.jsx)("div",{className:"h-full bg-primary rounded-r-lg"})]})}),(0,l.jsx)(t.u,{enter:"transition duration-100 ease-out",enterFrom:"transform scale-95 opacity-0",enterTo:"transform scale-100 opacity-100",leave:"transition duration-75 ease-out",leaveFrom:"transform scale-100 opacity-100",leaveTo:"transform scale-95 opacity-0",children:(0,l.jsx)(i.J.Panel,{className:"absolute top-1.5 z-50 bg-base-100 p-4 rounded-xl shadow-[0_3px_10px_rgb(0,0,0,0.2)]",children:(0,l.jsx)("div",{className:"grid grid-flow-col md: grid-rows-3 md:grid-rows-4 xl:md:grid-rows-5 gap-2 p-1 -m-1 overflow-y-scroll max-w-xs md:max-w-md lg:max-w-xl xl:max-w-2xl justify-start",children:m.np.filter(e=>!1!==e.isShown).map(e=>{var s;return(0,l.jsx)("div",{className:"bg-base-200 hover:bg-base-300 duration-100 cursor-pointer rounded-xl p-4 border ".concat((null==n?void 0:null===(s=n.user)||void 0===s?void 0:s.theme)===e.id?"border-[#4397F7]":"border-base-300/25"),onClick:()=>z({theme:e.id}),children:(0,l.jsx)("div",{className:"rounded-lg relative duration-200 w-20 group drop-shadow-md",children:(0,l.jsxs)("div",{className:"relative z-30 grid h-12 grid-cols-4 roun
1ded-lg overflow-hidden","data-theme":e.id,children:[(0,l.jsx)("div",{className:"h-full bg-base-100"}),(0,l.jsx)("div",{className:"h-full bg-base-200"}),(0,l.jsx)("div",{className:"h-full bg-base-content"}),(0,l.jsx)("div",{className:"h-full bg-primary"})]})})},e.id)})})})})]})}})]})]}),(0,l.jsx)("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 md:hidden z-40",onClick:()=>w(!0),children:(0,l.jsxs)("button",{className:"btn gap-1 shadow-lg",children:[(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-5 h-5",children:[(0,l.jsx)("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z"}),(0,l.jsx)("path",{fillRule:"evenodd",d:"M.664 10.59a1.651 1.651 0 010-1.186A10.004 10.004 0 0110 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0110 17c-4.257 0-7.893-2.66-9.336-6.41zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]}),"Preview"]})}),(null===(s=n.user)||void 0===s?void 0:s.username)&&(0,l.jsx)("div",{className:"hidden md:block md:basis-2/5",children:(0,l.jsx)("div",{className:"relative border-[8px] lg:border-[14px] border-black rounded-3xl lg:rounded-[3.5rem] w-64 lg:w-80 xl:w-96 aspect-[9/19] overflow-hidden max-w-sm mx-auto transitionfix",children:(0,l.jsx)("div",{className:"absolute inset-0 z-10",children:(0,l.jsx)("iframe",{src:"".concat("https://".concat(x.Z.domainName),"/").concat(n.user.username,"?key=").concat(N,"&zoom=80&track=0"),className:"w-full h-full"})})})})]}),j&&(null===(a=n.user)||void 0===a?void 0:a.username)&&(0,l.jsxs)("div",{className:"fixed inset-0 bg-base-100 z-40",children:[(0,l.jsx)("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-40",children:(0,l.jsx)("button",{className:" btn btn-square btn-primary shadow-xl",onClick:()=>w(!1),children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-6 h-6",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})}),(0,l.jsx)("iframe",{src:"".concat("https://".concat(x.Z.domainName),"/").concat(n.user.username,"?track=0"),className:"w-full h-full"})]})]})]})};s.default=g,g.getLayout=function(e){return(0,l.jsx)(h.Z,{children:e})}}},function(e){e.O(0,[664,675,902,154,758,905,823,57,85,97,336,888,774,179],function(){return e(e.s=19446)}),_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.