(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1079],{21157:(e,t,a)=>{"use strict";a.d(t,{JB:()=>r,_b:()=>l,nY:()=>i,s9:()=>s});let{useI18n:s,useScopedI18n:n,I18nProviderClient:r,useCurrentLocale:i,useChangeLocale:l}=(0,a(59193).createI18nClient)({en:()=>a.e(9461).then(a.bind(a,99461)),zh:()=>a.e(2350).then(a.bind(a,22350)),zh_TW:()=>a.e(4746).then(a.bind(a,14746))})},57959:(e,t,a)=>{Promise.resolve().then(a.bind(a,87890))},80854:(e,t,a)=>{"use strict";a.d(t,{A4:()=>i,Kq:()=>r,L_:()=>n,Uq:()=>s,h:()=>l});let s=async e=>{let t=await fetch("http://localhost:3333/api/user/handle-tb-subscription",{method:"post",body:JSON.stringify({key:e})});return await t.json()},n=async e=>{let t=await fetch("http://localhost:3333/api/user/get-feature-list",{method:"post",body:JSON.stringify({lang:e})});return await t.json()},r=async e=>{let t=await fetch("http://localhost:3333/api/user/handle-stp-subscription",{method:"post",body:JSON.stringify({ckSessionID:e})});return await t.json()},i=async()=>{let e=await fetch("http://localhost:3333/api/user/check-user-status",{method:"post"});return await e.json()},l=async()=>{let e=await fetch("http://localhost:3333/api/user/get-user-subs",{method:"post"});return await e.json()}},84256:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var s=a(12115),n=a(38935),r=a(15386),i=a(35881),l=a(82700),o=a(81063),u=a(57692),d=a(81112);function c(e){return(0,d.Ay)("MuiCard",e)}(0,u.A)("MuiCard",["root"]);var h=a(95155);let b=e=>{let{classes:t}=e;return(0,r.A)({root:["root"]},c,t)},g=(0,i.Ay)(o.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),p=s.forwardRef(function(e,t){let a=(0,l.b)({props:e,name:"MuiCard"}),{className:s,raised:r=!1,...i}=a,o={...a,raised:r},u=b(o);return(0,h.jsx)(g,{className:(0,n.A)(u.root,s),elevation:r?8:void 0,ref:t,ownerState:o,...i})})},87890:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>g});var s=a(95155);a(96343);var n=a(52269),r=a(84256),i=a(77498),l=a(80329),o=a(30540),u=a(21157),d=a(5451),c=a(12115),h=a(80854),b=a(35695);let g=()=>{let e=(0,u.s9)(),t=(0,u.nY)(),a=(0,u._b)(),[g,p]=(0,c.useState)("Not subscribed"),[f,m]=(0,c.useState)("-");(0,b.useRouter)(),(0,c.useEffect)(()=>{(0,h.h)().then(e=>{m(function(e){if(null==e)return"";let t=new Date(1e3*(e=null==e?void 0:e.trim())),a=t.getFullYear(),s=t.getMonth()+1;s=s<10?"0"+s:s;let n=t.getDate();return a+"-"+s+"-"+(n=n<10?"0"+n:n)}(e.data.et)),"exd"==e.data.status?p("Expired"):"sbd"==e.data.status?p("Subscribed"):p("Not subscribed")})},[]);let v=[{code:"en",name:"English"},{code:"zh",name:"简体中文"}];return(0,s.jsx)(n.A,{className:"main-content",children:(0,s.jsx)(r.A,{sx:{mb:2,background:"#f7fcfb"},children:(0,s.jsxs)(n.A,{sx:{p:4},children:[(0,s.jsx)("h3",{children:e("settings")}),(0,s.jsxs)(i.A,{variant:"standard",label:"language",children:[(0,s.jsx)(l.A,{id:"language-setting",children:e("languages")}),(0,s.jsx)(o.A,{labelId:"language-list",id:"language-list",label:"Languages",value:t,onChange:e=>{a(e.target.value)},children:null==v?void 0:v.map((e,t)=>(0,s.jsx)(d.A,{value:e.code,children:e.name},t))})]})]})})})}}},e=>{var t=t=>e(e.s=t);e.O(0,[1869,7117,1240,3073,7927,2955,335,8441,1684,7358],()=>t(57959)),_N_E=e.O()}]);