(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5602],{74522:function(t,e,n){Promise.resolve().then(n.bind(n,47839))},7379:function(t,e,n){"use strict";n.d(e,{FD:function(){return s},RW:function(){return r},S_:function(){return u},UB:function(){return a},rE:function(){return i}});let r=async t=>{let e=await fetch("http://localhost:3333/api/user/handle-tb-subscription",{method:"post",body:JSON.stringify({key:t})});return await e.json()},a=async t=>{let e=await fetch("http://localhost:3333/api/user/get-feature-list",{method:"post",body:JSON.stringify({lang:t})});return await e.json()},s=async t=>{let e=await fetch("http://localhost:3333/api/user/handle-stp-subscription",{method:"post",body:JSON.stringify({ckSessionID:t})});return await e.json()},u=async()=>{let t=await fetch("http://localhost:3333/api/user/check-user-status",{method:"post"});return await t.json()},i=async()=>{let t=await fetch("http://localhost:3333/api/user/get-user-subs",{method:"post"});return await t.json()}},47839:function(t,e,n){"use strict";n.r(e);var r=n(57437);n(21590);var a=n(61538),s=n(70270),u=n(28549),i=n(56065),o=n(53137),c=n(32846),l=n(16557),d=n(2265),f=n(7379),h=n(16463);e.default=()=>{let t=(0,c.QT)(),e=(0,c.eV)(),n=(0,c.Zt)(),[g,b]=(0,d.useState)("Not subscribed"),[p,Z]=(0,d.useState)("-");(0,h.useRouter)(),(0,d.useEffect)(()=>{(0,f.rE)().then(t=>{Z(function(t){if(null==t)return"";let e=new Date(1e3*(t=null==t?void 0:t.trim())),n=e.getFullYear(),r=e.getMonth()+1;r=r<10?"0"+r:r;let a=e.getDate();return n+"-"+r+"-"+(a=a<10?"0"+a:a)}(t.data.et)),"exd"==t.data.status?b("Expired"):"sbd"==t.data.status?b("Subscribed"):b("Not subscribed")})},[]);let m=[{code:"en",name:"English"},{code:"zh",name:"简体中文"}];return(0,r.jsx)(a.Z,{className:"main-content",children:(0,r.jsx)(s.Z,{sx:{mb:2,background:"#f7fcfb"},children:(0,r.jsxs)(a.Z,{sx:{p:4},children:[(0,r.jsx)("h3",{children:t("settings")}),(0,r.jsxs)(u.Z,{variant:"standard",label:"language",children:[(0,r.jsx)(i.Z,{id:"language-setting",children:t("languages")}),(0,r.jsx)(o.Z,{labelId:"language-list",id:"language-list",label:"Languages",value:e,onChange:t=>{n(t.target.value)},children:null==m?void 0:m.map((t,e)=>(0,r.jsx)(l.Z,{value:t.code,children:t.name},e))})]})]})})})}},32846:function(t,e,n){"use strict";n.d(e,{QT:function(){return r},Zt:function(){return i},e4:function(){return s},eV:function(){return u}});let{useI18n:r,useScopedI18n:a,I18nProviderClient:s,useCurrentLocale:u,useChangeLocale:i}=(0,n(43609).createI18nClient)({en:()=>n.e(3817).then(n.bind(n,53817)),zh:()=>n.e(2759).then(n.bind(n,62759)),zh_TW:()=>n.e(354).then(n.bind(n,80354))})},70270:function(t,e,n){"use strict";n.d(e,{Z:function(){return b}});var r=n(2265),a=n(58807),s=n(76990),u=n(48024),i=n(95885),o=n(28027),c=n(72296),l=n(70587);function d(t){return(0,l.ZP)("MuiCard",t)}(0,c.Z)("MuiCard",["root"]);var f=n(57437);let h=t=>{let{classes:e}=t;return(0,s.Z)({root:["root"]},d,e)},g=(0,u.ZP)(o.Z,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})({overflow:"hidden"});var b=r.forwardRef(function(t,e){let n=(0,i.i)({props:t,name:"MuiCard"}),{className:r,raised:s=!1,...u}=n,o={...n,raised:s},c=h(o);return(0,f.jsx)(g,{className:(0,a.Z)(c.root,r),elevation:s?8:void 0,ref:e,ownerState:o,...u})})},69281:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=n(48762),a=n(87547),s=n(52737);function u(t){let{props:e,name:n}=t;return(0,r.Z)({props:e,name:n,defaultTheme:a.Z,themeId:s.Z})}},48762:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(69430),a=n(75735);function s(t){let{props:e,name:n,defaultTheme:s,themeId:u}=t,i=(0,a.Z)(s);return u&&(i=i[u]||i),(0,r.Z)({theme:i,name:n,props:e})}}},function(t){t.O(0,[532,9662,1280,550,2686,5714,2971,7023,1744],function(){return t(t.s=74522)}),_N_E=t.O()}]);