import{M as pe,f as A,N as ot,O as be,r as v,x as _t,D as Ge,o as r,c as d,a as t,_ as J,h as Y,m as Pt,t as s,k as e,F as rt,i as ct,C as T,b as c,w as m,z as N,G as Ht,d as V,j,l as I,b9 as We,T as _e,p as qt,e as Tt,q as Xe,b8 as Rt,u as Zt,S as Ze,A as lt,n as U,Q,H as fe,ba as E,V as Ye,J as Je,E as Qe,bb as Ut,K as Ke,bc as to}from"./BbM7oWSp.js";import{u as Vt}from"./C73uadrq.js";import{g as ve,u as Gt,n as Wt,s as Xt,d as pt,m as xt,G as eo,U as oo,o as bt,F as it}from"./DUFFdlcv.js";import{u as l,a as ge,i as Ot}from"./Dtw5m9mU.js";import{_ as he}from"./BvYfRdrI.js";import{T as so,_ as no}from"./BN4NrjPe.js";import{_ as ye}from"./CQj_4gEJ.js";import{_ as vt}from"./CXEDE_KF.js";import{_ as It}from"./isVL0MLa.js";import{_ as xe}from"./C0i4A9XL.js";import{_ as we}from"./hSUvrEz7.js";import{_ as ke}from"./Bg57NBbs.js";import{_ as Dt}from"./O1GSj4e-.js";import{_ as ao}from"./EpbzSjNi.js";import{_ as io,a as lo}from"./Cc70Ysj0.js";import{_ as $e}from"./Dkp6vjIp.js";import{_ as ro}from"./DE7dyOyN.js";import{_ as co}from"./BSwtlyq4.js";import{_ as uo}from"./DtLbfrZy.js";import{u as Ce,a as Se}from"./DZP8lMC8.js";import{h as ft,c as mo,a as po}from"./2NtTGOhQ.js";import{_ as Pe}from"./kt7lUZWx.js";import{_ as bo}from"./D2njaM6a.js";import{_ as _o,a as fo,b as vo,c as go}from"./DzRWJc7y.js";import{n as wt}from"./DP5D7ssS.js";import{r as ho,a as yo,b as xo}from"./CsfbBe0C.js";import{r as wo}from"./JAi1w5Uq.js";import{r as ko}from"./C87rVtKq.js";import"./CxKJ4wCd.js";import"./Be0eDzQn.js";import"./BZdD9sHG.js";import"./cfEgN4Dm.js";import"./BU_zaBN0.js";import"./ChN9rlx4.js";import"./CwEZE_vF.js";import"./CtEUoXf1.js";import"./ChtUemYS.js";import"./vwy1vR2f.js";import"./D0L_BiNX.js";const $o=pe({name:"QBanner",props:{...Ce,inlineActions:Boolean,dense:Boolean,rounded:Boolean},setup(o,{slots:n}){const{proxy:{$q:x}}=be(),a=Se(o,x),h=A(()=>"q-banner row items-center"+(o.dense===!0?" q-banner--dense":"")+(a.value===!0?" q-banner--dark q-dark":"")+(o.rounded===!0?" rounded-borders":"")),p=A(()=>`q-banner__actions row items-center justify-end col-${o.inlineActions===!0?"auto":"all"}`);return()=>{const b=[ot("div",{class:"q-banner__avatar col-auto row items-center self-start"},ft(n.avatar)),ot("div",{class:"q-banner__content col text-body2"},ft(n.default))],_=ft(n.action);return _!==void 0&&b.push(ot("div",{class:p.value},_)),ot("div",{class:h.value+(o.inlineActions===!1&&_!==void 0?" q-banner--top-padding":""),role:"alert"},b)}}}),Co=pe({name:"QSplitter",props:{...Ce,modelValue:{type:Number,required:!0},reverse:Boolean,unit:{type:String,default:"%",validator:o=>["%","px"].includes(o)},limits:{type:Array,validator:o=>o.length!==2||typeof o[0]!="number"||typeof o[1]!="number"?!1:o[0]>=0&&o[0]<=o[1]},emitImmediately:Boolean,horizontal:Boolean,disable:Boolean,beforeClass:[Array,String,Object],afterClass:[Array,String,Object],separatorClass:[Array,String,Object],separatorStyle:[Array,String,Object]},emits:["update:modelValue"],setup(o,{slots:n,emit:x}){const{proxy:{$q:a}}=be(),h=Se(o,a),p=v(null),b={before:v(null),after:v(null)},_=A(()=>`q-splitter no-wrap ${o.horizontal===!0?"q-splitter--horizontal column":"q-splitter--vertical row"} q-splitter--${o.disable===!0?"disabled":"workable"}`+(h.value===!0?" q-splitter--dark":"")),u=A(()=>o.horizontal===!0?"height":"width"),$=A(()=>o.reverse!==!0?"before":"after"),w=A(()=>o.limits!==void 0?o.limits:o.unit==="%"?[10,90]:[50,1/0]);function y(k){return(o.unit==="%"?k:Math.round(k))+o.unit}const P=A(()=>({[$.value]:{[u.value]:y(o.modelValue)}}));let D,G,W,M,q;function B(k){if(k.isFirst===!0){const g=p.value.getBoundingClientRect()[u.value];D=o.horizontal===!0?"up":"left",G=o.unit==="%"?100:g,W=Math.min(G,w.value[1],Math.max(w.value[0],o.modelValue)),M=(o.reverse!==!0?1:-1)*(o.horizontal===!0?1:a.lang.rtl===!0?-1:1)*(o.unit==="%"?g===0?0:100/g:1),p.value.classList.add("q-splitter--active");return}if(k.isFinal===!0){q!==o.modelValue&&x("update:modelValue",q),p.value.classList.remove("q-splitter--active");return}const L=W+M*(k.direction===D?-1:1)*k.distance[o.horizontal===!0?"y":"x"];q=Math.min(G,w.value[1],Math.max(w.value[0],L)),b[$.value].value.style[u.value]=y(q),o.emitImmediately===!0&&o.modelValue!==q&&x("update:modelValue",q)}const O=A(()=>[[so,B,void 0,{[o.horizontal===!0?"vertical":"horizontal"]:!0,prevent:!0,stop:!0,mouse:!0,mouseAllDir:!0}]]);function F(k,L){k<L[0]?x("update:modelValue",L[0]):k>L[1]&&x("update:modelValue",L[1])}return _t(()=>o.modelValue,k=>{F(k,w.value)}),_t(()=>o.limits,()=>{Ge(()=>{F(o.modelValue,w.value)})}),()=>{const k=[ot("div",{ref:b.before,class:["q-splitter__panel q-splitter__before"+(o.reverse===!0?" col":""),o.beforeClass],style:P.value.before},ft(n.before)),ot("div",{class:["q-splitter__separator",o.separatorClass],style:o.separatorStyle,"aria-disabled":o.disable===!0?"true":void 0},[mo("div",{class:"q-splitter__separator-area absolute-full"},ft(n.separator),"sep",o.disable!==!0,()=>O.value)]),ot("div",{ref:b.after,class:["q-splitter__panel q-splitter__after"+(o.reverse===!0?"":" col"),o.afterClass],style:P.value.after},ft(n.after))];return ot("div",{class:_.value,ref:p},po(n.default,k))}}});function So(o,n){return r(),d("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"})])}function qe(o,n){return r(),d("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"})])}function Po(o,n){return r(),d("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function qo(o,n){return r(),d("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})])}function To(o,n){return r(),d("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"})])}function Vo(o,n){return r(),d("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})])}function Io(o,n){return r(),d("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75"})])}function Do(o,n){return r(),d("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})])}function le(o){const n=o;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{welcome:{t:0,b:{t:2,i:[{t:3}],s:"Welcome to SavoirX!"}},"complete-your-profile":{t:0,b:{t:2,i:[{t:3}],s:"Let's personalize your French writing journey"}},"call-you":{t:0,b:{t:2,i:[{t:3}],s:"What should we call you?"}},"target-level":{t:0,b:{t:2,i:[{t:3}],s:"Which DELF level are you aiming for?"}},"i-agree":{t:0,b:{t:2,i:[{t:3}],s:"I agree to the"}},"terms-of-service":{t:0,b:{t:2,i:[{t:3}],s:"Terms of Service"}},and:{t:0,b:{t:2,i:[{t:3}],s:"and"}},"privacy-policy":{t:0,b:{t:2,i:[{t:3}],s:"Privacy Policy"}},next:{t:0,b:{t:2,i:[{t:3}],s:"Next"}},back:{t:0,b:{t:2,i:[{t:3}],s:"Back"}},finish:{t:0,b:{t:2,i:[{t:3}],s:"Let's begin!"}},"almost-there":{t:0,b:{t:2,i:[{t:3}],s:"Almost there!"}},"help-us-tailor":{t:0,b:{t:2,i:[{t:3}],s:"Help us tailor SavoirX to your needs"}},"what-would-you-like-to-use-savoirx-for":{t:0,b:{t:2,i:[{t:3}],s:"What's your main goal with SavoirX?"}},DELF:{t:0,b:{t:2,i:[{t:3}],s:"DELF exam preparation"}},OtherFrenchExams:{t:0,b:{t:2,i:[{t:3}],s:"Other French exam preparation"}},GeneralWriting:{t:0,b:{t:2,i:[{t:3}],s:"General French writing"}},Other:{t:0,b:{t:2,i:[{t:3}],s:"Other purposes"}},levelChangeDisabled:{t:0,b:{t:2,i:[{t:3}],s:"Level change unavailable until submitted text is reviewed"}}},fr:{welcome:{t:0,b:{t:2,i:[{t:3}],s:"Bienvenue sur SavoirX!"}},"complete-your-profile":{t:0,b:{t:2,i:[{t:3}],s:"Personnalisons votre parcours d'écriture en français"}},"call-you":{t:0,b:{t:2,i:[{t:3}],s:"Comment souhaitez-vous être appelé ?"}},"target-level":{t:0,b:{t:2,i:[{t:3}],s:"Quel niveau DELF visez-vous ?"}},"i-agree":{t:0,b:{t:2,i:[{t:3}],s:"J'accepte les"}},"terms-of-service":{t:0,b:{t:2,i:[{t:3}],s:"Conditions d'utilisation"}},and:{t:0,b:{t:2,i:[{t:3}],s:"et"}},"privacy-policy":{t:0,b:{t:2,i:[{t:3}],s:"Politique de confidentialité"}},next:{t:0,b:{t:2,i:[{t:3}],s:"Suivant"}},back:{t:0,b:{t:2,i:[{t:3}],s:"Retour"}},finish:{t:0,b:{t:2,i:[{t:3}],s:"C'est parti !"}},"almost-there":{t:0,b:{t:2,i:[{t:3}],s:"Presque terminé !"}},"help-us-tailor":{t:0,b:{t:2,i:[{t:3}],s:"Aidez-nous à adapter SavoirX à vos besoins"}},"what-would-you-like-to-use-savoirx-for":{t:0,b:{t:2,i:[{t:3}],s:"Quel est votre objectif principal avec SavoirX ?"}},DELF:{t:0,b:{t:2,i:[{t:3}],s:"Préparation au DELF"}},OtherFrenchExams:{t:0,b:{t:2,i:[{t:3}],s:"Autres examens de français"}},GeneralWriting:{t:0,b:{t:2,i:[{t:3}],s:"Écriture générale en français"}},Other:{t:0,b:{t:2,i:[{t:3}],s:"Autres objectifs"}},levelChangeDisabled:{t:0,b:{t:2,i:[{t:3}],s:"Changement de niveau indisponible jusqu'à ce que le texte soumis soit évalué"}}},zh:{welcome:{t:0,b:{t:2,i:[{t:3}],s:"欢迎来到 SavoirX！"}},"complete-your-profile":{t:0,b:{t:2,i:[{t:3}],s:"让我们为您定制法语写作之旅"}},"call-you":{t:0,b:{t:2,i:[{t:3}],s:"您希望我们如何称呼您"}},"target-level":{t:0,b:{t:2,i:[{t:3}],s:"您的DELF目标级别是"}},"i-agree":{t:0,b:{t:2,i:[{t:3}],s:"我同意"}},"terms-of-service":{t:0,b:{t:2,i:[{t:3}],s:"服务条款"}},and:{t:0,b:{t:2,i:[{t:3}],s:"和"}},"privacy-policy":{t:0,b:{t:2,i:[{t:3}],s:"隐私政策"}},next:{t:0,b:{t:2,i:[{t:3}],s:"下一步"}},back:{t:0,b:{t:2,i:[{t:3}],s:"返回"}},finish:{t:0,b:{t:2,i:[{t:3}],s:"完成"}},"almost-there":{t:0,b:{t:2,i:[{t:3}],s:"即将完成！"}},"help-us-tailor":{t:0,b:{t:2,i:[{t:3}],s:"帮助我们为您量身定制 SavoirX"}},"what-would-you-like-to-use-savoirx-for":{t:0,b:{t:2,i:[{t:3}],s:"您使用 SavoirX 的主要目标是什么？"}},DELF:{t:0,b:{t:2,i:[{t:3}],s:"DELF考试备考"}},OtherFrenchExams:{t:0,b:{t:2,i:[{t:3}],s:"其他法语考试"}},GeneralWriting:{t:0,b:{t:2,i:[{t:3}],s:"法语写作能力提升"}},Other:{t:0,b:{t:2,i:[{t:3}],s:"其他用途"}},levelChangeDisabled:{t:0,b:{t:2,i:[{t:3}],s:"提交的文本未经评阅，暂时无法更改级别"}}}}})}const Mo=o=>(qt("data-v-ec4caf0e"),o=o(),Tt(),o),Lo={class:"max-w-md w-full bg-white shadow-lg border border-gray-200 flex flex-col p-2",style:{"border-radius":"20px"}},Ao={class:"p-6 pb-0"},Bo={class:"flex items-center justify-between mb-4"},No={class:"text-2xl text-gray-800 font-semibold"},zo={class:"flex space-x-2"},Eo={class:"text-sm text-gray-600"},jo={class:"flex-grow overflow-y-auto p-6"},Fo={key:0,class:"space-y-6"},Ro={class:"flex items-center space-x-6"},Uo=["src"],Oo={key:1,class:"w-24 h-24 rounded-full bg-gradient-to-br from-[#e87559] to-[#ff9b84] text-white flex items-center justify-center text-4xl font-semibold"},Ho={class:"flex-grow"},Go={for:"firstName",class:"block text-sm font-medium text-gray-700 mb-1"},Wo=["placeholder"],Xo={class:"space-y-3"},Zo={class:"block text-sm font-medium text-gray-700"},Yo={class:"grid grid-cols-3 gap-4"},Jo=["onClick","disabled"],Qo={class:"flex items-center"},Ko={for:"agree",class:"ml-3 block text-sm text-gray-600"},ts={href:"/terms",target:"_blank",class:"font-medium text-[#e87559] hover:underline"},es={href:"/privacy",target:"_blank",class:"font-medium text-[#e87559] hover:underline"},os={key:1,class:"space-y-6"},ss={class:"space-y-4"},ns={class:"block text-lg font-medium text-gray-800 mb-3"},as={class:"space-y-3"},is=["onClick"],ls=["onClick"],rs={class:"mx-5 pb-6"},cs={key:0,class:"text-right"},us=["disabled"],ds={key:1,class:"flex justify-between items-center"},ms=Mo(()=>t("span",{class:"block max-w-0 group-hover:max-w-full transition-all duration-300 h-0.5 bg-[#e87559]"},null,-1)),Te={__name:"completeProfile",setup(o){const{locale:n}=Y({useScope:"global"}),x=v(!1),{t:a}=Y({useScope:"local"}),h=v(null),p=["DELF","OtherFrenchExams","GeneralWriting","Other"],b=v(null),_=v(null),u=v(!1),$=Vt(),w=v(["profile","survey"]),y=v(0),P=()=>{y.value=1},D=()=>{y.value=0},G=A(()=>b.value&&b.value.trim()!==""&&_.value!==null&&x.value);async function W(){await $.from("userprofile").update({first_name:b.value,lang:n.value,level:_.value,purpose:h.value}).eq("id",l.value.id),l.value.level=_.value,l.value.first_name=b.value,l.value.lang=n.value,await ve();let q={type:"signup",userId:l.value.id,email:l.value.email,level:_.value};await fetch("https://europe-west9-frexam.cloudfunctions.net/userControl",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)})}function M(q){_.value=q}return Pt(async()=>{l.value||await ge();const q=localStorage.getItem("fullName");q&&(b.value=q);const B=localStorage.getItem("pic");B&&(l.value.profilePictureUrl=B);const O=localStorage.getItem("level"),F=localStorage.getItem("trailText");O&&F&&(_.value=O,u.value=!0)}),(q,B)=>{const O=he;return r(),d("div",Lo,[t("div",Ao,[t("div",Bo,[t("h2",No,s(y.value===0?e(a)("welcome"):e(a)("almost-there")),1),t("div",zo,[(r(!0),d(rt,null,ct(w.value,(F,k)=>(r(),d("div",{key:F,class:"relative"},[t("div",{class:T(["w-3 h-3 rounded-full",y.value===k?"bg-[#e87559]":"bg-gray-300"])},null,2)]))),128))])]),t("p",Eo,s(y.value===0?e(a)("complete-your-profile"):e(a)("help-us-tailor")),1)]),t("div",jo,[c(_e,{name:"fade",mode:"out-in"},{default:m(()=>{var F,k,L;return[y.value===0?(r(),d("div",Fo,[t("div",Ro,[(F=e(l))!=null&&F.profilePictureUrl?(r(),d("img",{key:0,src:e(l).profilePictureUrl,class:"h-24 w-24 rounded-full object-cover border-4 border-gray-200 shadow-md"},null,8,Uo)):(r(),d("div",Oo,s((k=e(l))!=null&&k.first_name?(L=e(l))==null?void 0:L.first_name[0].toUpperCase():"U"),1)),t("div",Ho,[t("label",Go,s(e(a)("call-you")),1),N(t("input",{id:"firstName",name:"firstName",type:"text","onUpdate:modelValue":B[0]||(B[0]=g=>b.value=g),required:"",class:"w-full px-3 py-2 border border-gray-300 rounded-md text-gray-900 placeholder-gray-400 text-sm shadow-sm transition duration-150 ease-in-out",placeholder:e(a)("call-you")},null,8,Wo),[[Ht,b.value]])])]),t("div",Xo,[t("label",Zo,s(e(a)("target-level")),1),t("div",Yo,[(r(),d(rt,null,ct(["A2","B1","B2"],g=>t("button",{key:g,onClick:X=>M(g),disabled:u.value&&_.value!==g,class:T(["px-4 py-3 rounded-md text-base font-medium focus:outline-none transition-all duration-200 shadow-sm h-[60px]",_.value===g?"text-white transform scale-105":"bg-opacity-10 text-gray-700 hover:bg-opacity-20",g==="A2"?_.value==="A2"?"bg-emerald-600":"bg-emerald-300 hover:bg-emerald-400":"",g==="B1"?_.value==="B1"?"bg-sky-600":"bg-sky-300 hover:bg-sky-400":"",g==="B2"?_.value==="B2"?"bg-violet-600":"bg-violet-300 hover:bg-violet-400":""])},[V(s(g)+" ",1),u.value&&_.value!==g?(r(),j(O,{key:0,class:"text-body2"},{default:m(()=>[V(s(e(a)("levelChangeDisabled")),1)]),_:1})):I("",!0)],10,Jo)),64))])]),t("div",Qo,[N(t("input",{id:"agree",name:"agree",type:"checkbox","onUpdate:modelValue":B[1]||(B[1]=g=>x.value=g),class:"h-5 w-5 text-[#e87559] focus:ring-[#e87559] border-gray-300 rounded shadow-sm"},null,512),[[We,x.value]]),t("label",Ko,[V(s(e(a)("i-agree"))+" ",1),t("a",ts,s(e(a)("terms-of-service")),1),V(" "+s(e(a)("and"))+" ",1),t("a",es,s(e(a)("privacy-policy")),1)])])])):y.value===1?(r(),d("div",os,[t("div",ss,[t("label",ns,s(e(a)("what-would-you-like-to-use-savoirx-for")),1),t("div",as,[(r(),d(rt,null,ct(p,(g,X)=>t("div",{key:X,class:"flex items-center space-x-3"},[t("div",{onClick:st=>h.value=g,class:T(["w-4 h-4 rounded-full border-2 flex items-center justify-center cursor-pointer transition-all duration-300",{"border-[#e87559]":h.value===g,"border-gray-300":h.value!==g}])},[t("div",{class:T(["w-3 h-3 rounded-full bg-[#e87559] transition-all duration-300",{"scale-100":h.value===g,"scale-0":h.value!==g}])},null,2)],10,is),t("button",{onClick:st=>h.value=g,class:T(["flex-grow px-4 py-3 rounded-md text-base font-medium focus:outline-none transition-all duration-300 shadow-sm text-left",[h.value===g?"bg-[#e87559]  text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"]])},s(e(a)(g)),11,ls)])),64))])])])):I("",!0)]}),_:1})]),t("div",rs,[y.value===0?(r(),d("div",cs,[t("button",{onClick:P,disabled:!e(G),class:"py-3 px-4 text-sm font-medium rounded-lg text-white bg-[#e87559] hover:bg-[#d26a50] disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 shadow-md"},s(e(a)("next")),9,us)])):(r(),d("div",ds,[t("button",{onClick:D,class:"text-[#e87559] font-medium text-base hover:text-[#d26a50] group"},[V(s(e(a)("back"))+" ",1),ms]),t("button",{onClick:W,class:"py-3 px-4 text-sm font-medium rounded-lg text-white bg-[#e87559] hover:bg-[#d26a50] disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 shadow-md"},s(e(a)("finish")),1)]))])])}}};typeof le=="function"&&le(Te);const ps=J(Te,[["__scopeId","data-v-ec4caf0e"]]),bs={class:"relative inline-block"},_s={class:"truncate"},fs=t("svg",{class:"h-5 w-5 text-gray-400 transition-transform duration-150 ease-in-out",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[t("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z","clip-rule":"evenodd"})],-1),vs={class:"p-2 max-h-60 overflow-y-auto"},gs=["onClick"],hs={__name:"DropdownBtn",props:{modelValue:{type:[String,Number],required:!0},options:{type:Array,required:!0},buttonText:{type:String,default:"Select Option"}},emits:["update:modelValue"],setup(o,{emit:n}){const x=o,a=n,h=v(!1),p=v(null),b=v(null),_=A(()=>x.options.find(P=>P.value===x.modelValue)),u=()=>{h.value=!1},$=P=>{a("update:modelValue",P.value),u()},w=P=>{h.value&&!b.value.contains(P.target)&&!p.value.contains(P.target)&&u()},y=P=>{P.key==="Escape"&&h.value&&(u(),p.value.focus())};return Pt(()=>{document.addEventListener("click",w),document.addEventListener("keydown",y)}),Xe(()=>{document.removeEventListener("click",w),document.removeEventListener("keydown",y)}),(P,D)=>{const G=ye,W=vt;return r(),d("div",bs,[t("button",{ref_key:"buttonRef",ref:p,class:"inline-flex items-center justify-between gap-2 rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 transition-colors duration-150 ease-in-out min-w-[120px]"},[t("span",_s,s(_.value?_.value.label:o.buttonText),1),fs,c(G,{ref:"menuRef",offset:[0,4],"transition-show":"jump-down","transition-hide":"jump-up",class:"bg-white rounded-xl shadow-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},{default:m(()=>[t("div",vs,[(r(!0),d(rt,null,ct(o.options,M=>N((r(),d("div",{key:M.value,onClick:q=>$(M),class:T(["block px-4 py-2 my-1 text-sm text-gray-700 transition-colors duration-150 ease-in-out rounded-lg min-w-[100px] cursor-pointer",{"bg-[#e87559] text-white font-medium":M.value===o.modelValue,"hover:bg-gray-200 hover:text-gray-900 ":M.value!==o.modelValue}])},[V(s(M.label),1)],10,gs)),[[W]])),128))])]),_:1},512)],512)])}}},ys={},xs={class:"text-header"};function ws(o,n){const x=It,a=xe,h=we,p=ke,b=Dt,_=vt;return r(),j(b,{class:"report-card"},{default:m(()=>[c(a,{class:"card-header"},{default:m(()=>[t("div",xs,[Rt(o.$slots,"header",{},void 0,!0)]),N(c(x,{flat:"",round:"",dense:"",icon:"close",class:"close-button"},null,512),[[_]])]),_:3}),c(h),c(a,{class:"card-body"},{default:m(()=>[Rt(o.$slots,"body",{},void 0,!0)]),_:3}),o.$slots.actions?(r(),j(p,{key:0,class:"card-actions"},{default:m(()=>[Rt(o.$slots,"actions",{},void 0,!0)]),_:3})):I("",!0)]),_:3})}const Yt=J(ys,[["render",ws],["__scopeId","data-v-0fe6b840"]]);function re(o){const n=o;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{profile:{t:0,b:{t:2,i:[{t:3}],s:"Profile"}},account:{t:0,b:{t:2,i:[{t:3}],s:"Account"}},billing:{t:0,b:{t:2,i:[{t:3}],s:"Billing"}},settings:{t:0,b:{t:2,i:[{t:3}],s:"Settings"}},personalInformation:{t:0,b:{t:2,i:[{t:3}],s:"Personal Information"}},email:{t:0,b:{t:2,i:[{t:3}],s:"Email"}},userName:{t:0,b:{t:2,i:[{t:3}],s:"Name"}},language:{t:0,b:{t:2,i:[{t:3}],s:"Preferred Language"}},accountInformation:{t:0,b:{t:2,i:[{t:3}],s:"Account Information"}},myTargetLevel:{t:0,b:{t:2,i:[{t:3}],s:"My Target Level"}},myCredits:{t:0,b:{t:2,i:[{t:3}],s:"Subscription Credits"}},permaCredits:{t:0,b:{t:2,i:[{t:3}],s:"Permanent Credits"}},creditsTooltip:{t:0,b:{t:2,i:[{t:3}],s:"The credits you have used out of the total credits. Each task evaluated costs 1 credit. The credits are reset every week or month based on your subscription."}},nextBillingDate:{t:0,b:{t:2,i:[{t:3}],s:"Next Billing Date"}},joinedSince:{t:0,b:{t:2,i:[{t:3}],s:"Joined Since"}},subscribedSince:{t:0,b:{t:2,i:[{t:3}],s:"Subscribed Since"}},dangerZone:{t:0,b:{t:2,i:[{t:3}],s:"Danger Zone"}},caution:{t:0,b:{t:2,i:[{t:3}],s:"Caution: Actions in this area are irreversible. Please proceed with care."}},deleteAccount:{t:0,b:{t:2,i:[{t:3}],s:"Delete account"}},cancelSubscription:{t:0,b:{t:2,i:[{t:3}],s:"Cancel Subscription"}},proPlanTitle:{t:0,b:{t:2,i:[{t:3}],s:"Thanks for being a Pro!"}},upgrade:{t:0,b:{t:2,i:[{t:3}],s:"upgrade"}},nameShouldNotBeEmpty:{t:0,b:{t:2,i:[{t:3}],s:"Name should not be empty"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"Cancel"}},confirm:{t:0,b:{t:2,i:[{t:3}],s:"Confirm"}}},fr:{profile:{t:0,b:{t:2,i:[{t:3}],s:"Profil"}},account:{t:0,b:{t:2,i:[{t:3}],s:"Compte"}},billing:{t:0,b:{t:2,i:[{t:3}],s:"Facturation"}},settings:{t:0,b:{t:2,i:[{t:3}],s:"Paramètres"}},personalInformation:{t:0,b:{t:2,i:[{t:3}],s:"Informations personnelles"}},email:{t:0,b:{t:2,i:[{t:3}],s:"E-mail"}},userName:{t:0,b:{t:2,i:[{t:3}],s:"Nom"}},language:{t:0,b:{t:2,i:[{t:3}],s:"Langue préférée"}},accountInformation:{t:0,b:{t:2,i:[{t:3}],s:"Informations sur le compte"}},myTargetLevel:{t:0,b:{t:2,i:[{t:3}],s:"Mon niveau cible"}},myCredits:{t:0,b:{t:2,i:[{t:3}],s:"Crédits d'abonnement"}},permaCredits:{t:0,b:{t:2,i:[{t:3}],s:"Crédits permanents"}},creditsTooltip:{t:0,b:{t:2,i:[{t:3}],s:"Les crédits que vous avez utilisés sur le total des crédits. Chaque tâche évaluée coûte 1 crédit. Les crédits sont réinitialisés chaque semaine ou chaque mois en fonction de votre abonnement."}},nextBillingDate:{t:0,b:{t:2,i:[{t:3}],s:"Prochaine date de facturation"}},joinedSince:{t:0,b:{t:2,i:[{t:3}],s:"Rejoint depuis"}},subscribedSince:{t:0,b:{t:2,i:[{t:3}],s:"Abonné depuis"}},dangerZone:{t:0,b:{t:2,i:[{t:3}],s:"Zone de danger"}},caution:{t:0,b:{t:2,i:[{t:3}],s:"Attention : Les actions dans cette zone sont irréversibles. Veuillez procéder avec prudence."}},deleteAccount:{t:0,b:{t:2,i:[{t:3}],s:"Supprimer le compte"}},cancelSubscription:{t:0,b:{t:2,i:[{t:3}],s:"Annuler l'abonnement"}},proPlanTitle:{t:0,b:{t:2,i:[{t:3}],s:"Merci d'être un Pro !"}},upgrade:{t:0,b:{t:2,i:[{t:3}],s:"mettre à niveau"}},nameShouldNotBeEmpty:{t:0,b:{t:2,i:[{t:3}],s:"Le nom ne doit pas être vide"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"Annuler"}},confirm:{t:0,b:{t:2,i:[{t:3}],s:"Confirmer"}}},zh:{profile:{t:0,b:{t:2,i:[{t:3}],s:"个人资料"}},account:{t:0,b:{t:2,i:[{t:3}],s:"帐户"}},billing:{t:0,b:{t:2,i:[{t:3}],s:"账单"}},settings:{t:0,b:{t:2,i:[{t:3}],s:"设置"}},personalInformation:{t:0,b:{t:2,i:[{t:3}],s:"个人信息"}},email:{t:0,b:{t:2,i:[{t:3}],s:"电子邮件"}},userName:{t:0,b:{t:2,i:[{t:3}],s:"姓名"}},language:{t:0,b:{t:2,i:[{t:3}],s:"首选语言"}},accountInformation:{t:0,b:{t:2,i:[{t:3}],s:"帐户信息"}},myTargetLevel:{t:0,b:{t:2,i:[{t:3}],s:"我的目标 DELF 等级"}},myCredits:{t:0,b:{t:2,i:[{t:3}],s:"套餐积分"}},permaCredits:{t:0,b:{t:2,i:[{t:3}],s:"永久积分"}},creditsTooltip:{t:0,b:{t:2,i:[{t:3}],s:"已使用的积分占总积分的比例。每个评估的练习都需要1个积分。积分会根据套餐每周或每月重置。"}},nextBillingDate:{t:0,b:{t:2,i:[{t:3}],s:"下次结算日期"}},joinedSince:{t:0,b:{t:2,i:[{t:3}],s:"加入日期"}},subscribedSince:{t:0,b:{t:2,i:[{t:3}],s:"套餐开始日期"}},dangerZone:{t:0,b:{t:2,i:[{t:3}],s:"危险区"}},caution:{t:0,b:{t:2,i:[{t:3}],s:"注意：此区域中的操作是不可逆的。请谨慎操作。"}},deleteAccount:{t:0,b:{t:2,i:[{t:3}],s:"删除帐户"}},cancelSubscription:{t:0,b:{t:2,i:[{t:3}],s:"取消订阅"}},proPlanTitle:{t:0,b:{t:2,i:[{t:3}],s:"感谢您使用 Pro 套餐！"}},upgrade:{t:0,b:{t:2,i:[{t:3}],s:"升级"}},nameShouldNotBeEmpty:{t:0,b:{t:2,i:[{t:3}],s:"姓名不能为空"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"取消"}},confirm:{t:0,b:{t:2,i:[{t:3}],s:"确定"}}}}})}const Ve=o=>(qt("data-v-40cf75bc"),o=o(),Tt(),o),ks={class:"flex flex-col space-y-1 py-4 px-2"},$s={class:"font-medium"},Cs={class:"font-medium"},Ss={class:"font-medium"},Ps={class:"q-mb-lg"},qs={class:"row q-mb-md justify-between"},Ts={class:"col-4 label"},Vs={class:"col-auto"},Is={class:"row q-mb-md justify-between items-center"},Ds={class:"col-4 label"},Ms={class:"col-auto flex items-center"},Ls={key:0,class:"flex items-center"},As=Ve(()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t("path",{d:"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"})],-1)),Bs=[As],Ns={key:1,class:"flex items-center"},zs=Ve(()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)),Es=[zs],js={key:0,class:"row justify-between items-start"},Fs={class:"col-4 label"},Rs={class:"col-auto"},Us={class:"flex-grow"},Os={class:"static-info"},Hs={class:"row q-mb-md justify-between"},Gs={class:"col-4 label"},Ws={class:"col-auto"},Xs={class:"row q-mb-md justify-between"},Zs={class:"col-auto label"},Ys={class:"col-5 ml-auto mr-4"},Js={class:"absolute-full flex flex-center"},Qs={class:"row q-mb-md justify-between"},Ks={class:"col-4 label"},tn={class:"col-auto"},en={key:0,class:"mt-auto"},on={class:"flex justify-end"},sn={class:"danger-zone"},nn={class:"warning-text"},an={class:"row delete-account-row"},ln={class:"p-4"},rn={class:"bg-purple-600 text-white rounded-xl mb-4 p-4"},cn={class:"text-2xl font-bold mb-4"},un={class:"grid grid-cols-2 gap-3"},dn={class:"text-sm max-w-56"},mn={class:"row q-mb-md justify-between"},pn={class:"col-4 label"},bn={class:"col-auto"},_n={class:"row q-mb-md justify-between"},fn={class:"col-4 label"},vn={class:"col-auto"},gn={class:"row q-mb-md justify-between"},hn={class:"col-4 label"},yn={class:"col-auto"},Ie={__name:"SettingsCard",emits:["updatePopup"],setup(o,{emit:n}){const x=Zt(),{locale:a,setLocale:h}=Y({useScope:"global"}),p=v(null),b=v("profile"),_=v(20),{t:u}=Y({useScope:"local"}),$=Ze(),w=v(!1),y=v(l.value.level),P=A(()=>y.value!==l.value.level),D=v(l.value.first_name),G=v([{label:"English",value:"en"},{label:"Français",value:"fr"},{label:"中文",value:"zh"}]),W=A(()=>{const z=l.value.is_monthly?"monthly":"weekly";return Array.from({length:9},(C,R)=>u(`index.features.${z}[${R}]`))});_t(p,async z=>{h(z),await L.from("userprofile").update({lang:z}).eq("id",l.value.id)});function M(){w.value=!0}function q(){if(D.value.trim()==""){$.error(u("nameShouldNotBeEmpty"),{position:"bottom-right",timeout:2032,closeOnClick:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:"button",rtl:!1}),B();return}kt(),w.value=!1}function B(){D.value=l.value.first_name,w.value=!1}function O(){y.value=l.value.level}async function F(){const{data:z,error:C}=await L.from("userprofile").update({level:y.value}).eq("id",l.value.id);if(!C){l.value.level=y.value;const R=x({name:"dashboard"});U(R.fullPath).then(()=>{location.reload()})}}const k=v(l.value.created_at),L=Vt(),g=v(!1);function X(){g.value=!g.value}const st=A(()=>{if(l.value.tier>0&&l.value.tier_start_date){const z=new Date(l.value.tier_start_date);return l.value.is_monthly?z.setMonth(z.getMonth()+1):z.setDate(z.getDate()+7),z.toISOString().split("T")[0]}return"--"});v(!1);const Z=n,H=()=>{Z("updatePopup",{popupName:"Upgrade",value:!0})},Lt=()=>{Z("updatePopup",{popupName:"DeleteAccount",value:!0})},gt=()=>{Z("updatePopup",{popupName:"CancelSubscription",value:!0})};async function kt(){const{data:z,error:C}=await L.from("userprofile").update({first_name:D.value}).eq("id",l.value.id);C||(l.value.first_name=D.value)}return Pt(()=>{p.value=a.value}),(z,C)=>{const R=we,At=ao,ut=hs,ht=io,Bt=he,yt=$e,Nt=ro,zt=co,nt=It,Et=uo,jt=lo,$t=Co,f=Yt;return r(),j(f,{style:{width:"800px"}},{header:m(()=>[V(s(e(u)("settings")),1)]),body:m(()=>[c($t,{modelValue:_.value,"onUpdate:modelValue":C[7]||(C[7]=i=>_.value=i),style:{height:"490px"}},{before:m(()=>[t("div",ks,[t("button",{onClick:C[0]||(C[0]=i=>b.value="profile"),class:T(["text-center py-2 px-0 rounded-md transition-all duration-200 ease-in-out",[b.value==="profile"?"bg-gray-300 text-gray-800 ":"bg-transparent text-gray-600 hover:bg-gray-100"]])},[t("span",$s,s(e(u)("profile")),1)],2),t("button",{onClick:C[1]||(C[1]=i=>b.value="account"),class:T(["text-center py-2 px-0 rounded-md transition-all duration-200 ease-in-out",[b.value==="account"?"bg-gray-300 text-gray-800 ":"bg-transparent text-gray-600 hover:bg-gray-100"]])},[t("span",Cs,s(e(u)("account")),1)],2),e(l).tier!==0?(r(),d("button",{key:0,onClick:C[2]||(C[2]=i=>b.value="billing"),class:T(["text-center py-2 px-0 rounded-md transition-all duration-200 ease-in-out",[b.value==="billing"?"bg-gray-300 text-gray-800 ":"bg-transparent text-gray-600 hover:bg-gray-100"]])},[t("span",Ss,s(e(u)("billing")),1)],2)):I("",!0)])]),after:m(()=>[c(jt,{modelValue:b.value,"onUpdate:modelValue":C[6]||(C[6]=i=>b.value=i),vertical:"",class:"full-height px-4 pt-4",style:{"background-color":"var(--q-bg)"}},{default:m(()=>[c(ht,{name:"profile"},{default:m(()=>[t("div",Ps,[t("div",qs,[t("div",Ts,s(e(u)("email")),1),t("div",Vs,s(e(l).email),1)]),c(R,{class:"q-mt-sm q-mb-md"}),t("div",Is,[t("div",Ds,s(e(u)("userName")),1),t("div",Ms,[w.value?(r(),d("div",Ns,[c(At,{modelValue:D.value,"onUpdate:modelValue":C[3]||(C[3]=i=>D.value=i),dense:"",outlined:"",class:"q-mr-sm"},null,8,["modelValue"]),t("button",{onClick:q,class:"bg-[#e87559] text-white px-3 py-1 rounded-md hover:bg-[#d66a4f] transition-colors duration-200"},s(e(u)("confirm")),1),t("button",{onClick:B,class:"ml-2 text-gray-400 hover:text-gray-600 transition-colors duration-200"},Es)])):(r(),d("div",Ls,[t("span",null,s(D.value),1),t("button",{onClick:M,class:"ml-2 text-gray-400 hover:text-[#e87559] transition-colors duration-200"},Bs)]))])]),c(R,{class:"q-my-md"}),p.value?(r(),d("div",js,[t("div",Fs,s(e(u)("language")),1),t("div",Rs,[c(ut,{modelValue:p.value,"onUpdate:modelValue":C[4]||(C[4]=i=>p.value=i),options:G.value,buttonText:"Choose a language"},null,8,["modelValue","options"])])])):I("",!0)])]),_:1}),c(ht,{name:"account",class:"full-height flex flex-col"},{default:m(()=>[t("div",Us,[t("div",Os,[t("div",Hs,[t("div",Gs,s(e(u)("myTargetLevel")),1),t("div",Ws,[c(ut,{modelValue:y.value,"onUpdate:modelValue":C[5]||(C[5]=i=>y.value=i),options:[{label:"A2",value:"A2"},{label:"B1",value:"B1"},{label:"B2",value:"B2"}],buttonText:"Choose a level"},null,8,["modelValue"])])]),c(R,{class:"q-mt-sm q-mb-md"}),t("div",Xs,[t("div",Zs,[V(s(e(u)("myCredits"))+" ",1),c(yt,{name:"help_outline",size:"18px",class:"ml-2 text-[#69a6b4] cursor-help"},{default:m(()=>[c(Bt,{class:"bg-[#69a6b4] text-white text-sm w-[400px]"},{default:m(()=>[V(s(e(u)("creditsTooltip")),1)]),_:1})]),_:1})]),t("div",Ys,[c(zt,{rounded:"",size:"20px",value:e(Gt)/e(Wt),color:"accent"},{default:m(()=>[t("div",Js,[c(Nt,{color:"white","text-color":"accent",label:e(Gt)+" / "+e(Wt)},null,8,["label"])])]),_:1},8,["value"])]),t("div",{class:"col-auto action-link",clickable:"",onClick:H},s(e(u)("upgrade")),1)]),c(R,{class:"q-mt-sm q-mb-md"}),t("div",Qs,[t("div",Ks,s(e(u)("joinedSince")),1),t("div",tn,s(k.value),1)]),c(R,{class:"q-mt-sm q-mb-md"})])]),e(P)?(r(),d("div",en,[t("div",on,[t("button",{onClick:O,class:"px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100 transition-colors duration-200 mr-2"},s(e(u)("cancel")),1),t("button",{onClick:F,class:"px-4 py-2 rounded-md bg-[#e87559] text-white hover:bg-[#d66a4f] transition-colors duration-200"},s(e(u)("confirm")),1)])])):I("",!0),e(l).tier>=10?(r(),d("div",{key:1,class:"section-title danger-zone-trigger",onClick:X},[V(s(e(u)("dangerZone"))+" ",1),c(yt,{name:g.value?"expand_less":"expand_more",class:"q-mr-sm"},null,8,["name"])])):I("",!0),e(l).tier>=10?(r(),j(Et,{key:2},{default:m(()=>[N(t("div",null,[t("div",sn,[t("div",nn,s(e(u)("caution")),1),t("div",an,[c(nt,{flat:"",class:"delete-account-button",onClick:Lt},{default:m(()=>[V(s(e(u)("deleteAccount")),1)]),_:1})])])],512),[[lt,g.value]])]),_:1})):I("",!0)]),_:1}),e(l).tier!==0?(r(),j(ht,{key:0,name:"billing",class:"p-0"},{default:m(()=>[t("div",ln,[t("div",rn,[t("h3",cn,s(e(u)("proPlanTitle")),1),t("div",un,[(r(!0),d(rt,null,ct(e(W),(i,dt)=>(r(),d("div",{key:dt,class:"flex items-start"},[c(yt,{name:"check_circle",class:"text-purple-200 mr-2 flex-shrink-0"}),t("span",dn,s(i),1)]))),128))])]),t("div",mn,[t("div",pn,s(e(u)("subscribedSince")),1),t("div",bn,s(e(l).tier_start_date),1)]),c(R,{class:"q-mt-sm q-mb-md"}),t("div",_n,[t("div",fn,s(e(u)("nextBillingDate")),1),t("div",vn,s(e(st)),1)]),c(R,{class:"q-mt-sm q-mb-md"}),t("div",gn,[t("div",hn,s(e(u)("cancelSubscription")),1),t("div",yn,[t("button",{onClick:gt,class:"bg-[#e87559] text-white font-medium px-4 py-2 rounded-lg"},s(e(u)("cancelSubscription")),1)])])])]),_:1})):I("",!0)]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})}}};typeof re=="function"&&re(Ie);const xn=J(Ie,[["__scopeId","data-v-40cf75bc"]]);function ce(o){const n=o;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{title:{t:0,b:{t:2,i:[{t:3}],s:"Title"}},description:{t:0,b:{t:2,i:[{t:3}],s:"Description"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"Cancel"}},submit:{t:0,b:{t:2,i:[{t:3}],s:"Submit"}},sendFeedback:{t:0,b:{t:2,i:[{t:3}],s:"Send feedback to SavoirX"}}},fr:{title:{t:0,b:{t:2,i:[{t:3}],s:"Titre"}},description:{t:0,b:{t:2,i:[{t:3}],s:"Description"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"Annuler"}},submit:{t:0,b:{t:2,i:[{t:3}],s:"Soumettre"}},sendFeedback:{t:0,b:{t:2,i:[{t:3}],s:"Envoyer des commentaires à SavoirX"}}},zh:{title:{t:0,b:{t:2,i:[{t:3}],s:"标题"}},description:{t:0,b:{t:2,i:[{t:3}],s:"描述"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"取消"}},submit:{t:0,b:{t:2,i:[{t:3}],s:"提交"}},sendFeedback:{t:0,b:{t:2,i:[{t:3}],s:"向 SavoirX 发送反馈"}}}}})}const wn={class:"p-4"},kn=["placeholder"],$n=["placeholder"],Cn={class:"flex flex-col sm:flex-row justify-end gap-3"},Sn={class:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg shadow-sm hover:bg-gray-50 transition-colors duration-150 ease-in-out"},De={__name:"contactMeCard",emits:["updatePopup"],setup(o,{emit:n}){const x=n,{t:a}=Y({useScope:"local"}),h=Vt(),p=v({title:"",description:""});async function b(){await h.from("bugReport").insert({uid:l.value.id,title:p.value.title,description:p.value.description}),x("updatePopup",{popupName:"ReportOver",value:!0})}return(_,u)=>{const $=Yt,w=vt;return r(),j($,null,{header:m(()=>[V(s(e(a)("sendFeedback")),1)]),body:m(()=>[t("div",wn,[N(t("input",{"onUpdate:modelValue":u[0]||(u[0]=y=>p.value.title=y),placeholder:e(a)("title"),class:"input-field"},null,8,kn),[[Ht,p.value.title]]),N(t("textarea",{"onUpdate:modelValue":u[1]||(u[1]=y=>p.value.description=y),placeholder:e(a)("description"),class:"input-field description-field"},null,8,$n),[[Ht,p.value.description]])])]),actions:m(()=>[t("div",Cn,[N((r(),d("button",Sn,[V(s(e(a)("cancel")),1)])),[[w]]),t("button",{class:"px-4 py-2 text-sm font-medium text-white bg-[#e87559] border border-transparent rounded-lg shadow-sm hover:bg-[#d56a51] transition-colors duration-150 ease-in-out",onClick:b},s(e(a)("submit")),1)])]),_:1})}}};typeof ce=="function"&&ce(De);const Pn=J(De,[["__scopeId","data-v-beeb9b2d"]]),qn={class:"text-2xl font-semibold text-gray-800 mb-4"},Tn=["innerHTML"],Vn={class:"flex flex-col sm:flex-row justify-end gap-3"},In={class:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg shadow-sm hover:bg-gray-50 transition-colors duration-150 ease-in-out"},Dn={__name:"CancelSubscription",setup(o){const{t:n,d:x}=Y(),a=A(()=>{if(l.value.tier>0&&l.value.tier_start_date){const b=new Date(l.value.tier_start_date);return l.value.is_monthly?b.setMonth(b.getMonth()+1):b.setDate(b.getDate()+7),b}return null}),h=A(()=>a.value?x(a.value):n("unknownDate")),p=()=>{window.open("https://billing.stripe.com/p/login/7sI02K8gP1t26NGfYY","_blank").focus()};return(b,_)=>{const u=Dt,$=vt;return r(),j(u,{style:{"background-color":"white","border-radius":"16px",padding:"28px"}},{default:m(()=>[t("h2",qn,s(e(n)("dashboard.cancelPlan")),1),t("p",{class:"text-gray-600 mb-6",innerHTML:e(n)("dashboard.cancelMessage",{date:h.value})},null,8,Tn),t("div",Vn,[N((r(),d("button",In,[V(s(e(n)("dashboard.keepSubscription")),1)])),[[$]]),t("button",{onClick:p,class:"px-4 py-2 text-sm font-medium text-white bg-[#e87559] border border-transparent rounded-lg shadow-sm hover:bg-[#d56a51] transition-colors duration-150 ease-in-out"},s(e(n)("dashboard.confirmCancellation")),1)])]),_:1})}}},Mn={class:"bg-white rounded-lg shadow-xl w-full p-2 border border-gray-200"},Ln={class:"text-left"},An={class:"text-xl font-semibold text-gray-900 mb-6 mt-2"},Bn={key:0,class:"mt-2 text-sm text-gray-600"},Nn={key:1,class:"mt-2 text-sm text-gray-600"},zn={key:2,class:"mt-2 text-sm text-gray-600"},En={class:"mt-6 flex justify-end space-x-4"},jn={class:"ml-2"},Fn={__name:"NotEnoughCredit",emits:["upgrade"],setup(o,{expose:n,emit:x}){const a=v(!1),h=x,{t:p}=Y();function b(){a.value=!0}n({openNotEnoughCreditDialog:b});const _=()=>{h("upgrade"),a.value=!1},u=()=>{a.value=!1};return($,w)=>{const y=Dt,P=Pe;return r(),j(P,{modelValue:e(a),"onUpdate:modelValue":w[0]||(w[0]=D=>Q(a)?a.value=D:null)},{default:m(()=>[c(y,{class:"dialog-card"},{default:m(()=>[t("div",Mn,[t("div",Ln,[t("h2",An,s(e(p)("dashboard.learningContinues")),1),e(l).tier==0?(r(),d("p",Bn,s(e(p)("dashboard.NotEnoughCreditMsgFreeVer")),1)):e(l).tier==1?(r(),d("p",Nn,s(e(p)("dashboard.NotEnoughCreditMsgWeeklyVer")),1)):(r(),d("p",zn,s(e(p)("dashboard.NotEnoughCreditMsgMonthlyVer")),1))]),t("div",En,[t("button",{onClick:u,class:"rounded-lg border border-gray-300 bg-white px-4 py-2 text-center text-sm font-medium text-gray-700"},s(e(p)("dashboard.maybeLater")),1),t("button",{onClick:_,class:"px-4 py-2 rounded-lg transition-all duration-300 cursor-pointer overflow-hidden bg-[#e87559] hover:bg-[#f8785b] text-white flex font-medium"},[c(e(qe),{class:"h-5 w-5"}),t("span",jn,s(e(p)("dashboard.upgradeToPro")),1)])])])]),_:1})]),_:1},8,["modelValue"])}}},Rn=J(Fn,[["__scopeId","data-v-a8b28042"]]);function ue(o){const n=o;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{upgradeYourPlan:{t:0,b:{t:2,i:[{t:3}],s:"Upgrade Your Plan"}},weekly:{t:0,b:{t:2,i:[{t:3}],s:"Weekly"}},monthly:{t:0,b:{t:2,i:[{t:3}],s:"Monthly"}},expiredSoon:{t:0,b:{t:2,i:[{t:3}],s:"Your subscription is about to expire. Renew to continue enjoying premium features."}},renew:{t:0,b:{t:2,i:[{t:3}],s:"Renew Now"}},paymentFailed:{t:0,b:{t:2,i:[{t:3}],s:"We encountered an error while processing your payment. Please update your payment method or contact our support team for assistance."}}},fr:{upgradeYourPlan:{t:0,b:{t:2,i:[{t:3}],s:"Mettre à niveau votre plan"}},weekly:{t:0,b:{t:2,i:[{t:3}],s:"Hebdomadaire"}},monthly:{t:0,b:{t:2,i:[{t:3}],s:"Mensuel"}},expiredSoon:{t:0,b:{t:2,i:[{t:3}],s:"Votre abonnement est sur le point d'expirer. Renouvez-vous pour continuer à profiter des fonctionnalités premium."}},renew:{t:0,b:{t:2,i:[{t:3}],s:"Renouvez-vous"}},paymentFailed:{t:0,b:{t:2,i:[{t:3}],s:"Nous avons rencontré une erreur lors du traitement de votre paiement. Veuillez mettre à jour votre mode de paiement ou contacter notre équipe d'assistance pour obtenir de l'aide."}}},zh:{upgradeYourPlan:{t:0,b:{t:2,i:[{t:3}],s:"升级套餐"}},weekly:{t:0,b:{t:2,i:[{t:3}],s:"每周"}},monthly:{t:0,b:{t:2,i:[{t:3}],s:"每月"}},expiredSoon:{t:0,b:{t:2,i:[{t:3}],s:"您的套餐即将到期。重新订阅套餐以继续享受高级功能。"}},renew:{t:0,b:{t:2,i:[{t:3}],s:"立即订阅"}},paymentFailed:{t:0,b:{t:2,i:[{t:3}],s:"处理您的付款时遇到错误。请更新您的支付方式或联系我们的支持团队以获取帮助。"}}}}})}const Un=o=>(qt("data-v-6e616a0e"),o=o(),Tt(),o),On={class:"w-full bg-white"},Hn={class:"text-3xl text-bold text-center mb-8"},Gn={key:0,class:"mb-4 max-w-2xl mx-auto"},Wn={class:"bg-[#f35e3e] bg-opacity-10 rounded-lg px-4 py-3 flex items-center justify-between no-wrap"},Xn={class:"flex items-start space-x-3 no-wrap flex-grow"},Zn=Un(()=>t("svg",{class:"h-5 w-5 text-[#f35e3e] flex-shrink-0",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[t("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z","clip-rule":"evenodd"})],-1)),Yn={key:0,class:"text-sm text-gray-800 m-0"},Jn={key:1,class:"text-sm text-gray-800 m-0"},Qn={class:"ml-3"},Kn={class:"flex flex-wrap justify-center items-start gap-6"},Me={__name:"UpgradePlan",setup(o){const{t:n}=Y();function x(){window.open("https://billing.stripe.com/p/login/test_8wM4kgam37ogdFKeUU","_blank").focus()}return(a,h)=>{const p=bo;return r(),d("div",On,[t("div",Hn,s(e(n)("upgradeYourPlan")),1),("user"in a?a.user:e(l)).sub_status==="cancelled"||("user"in a?a.user:e(l)).sub_status==="payment failed"?(r(),d("div",Gn,[t("div",Wn,[t("div",Xn,[Zn,("user"in a?a.user:e(l)).sub_status==="cancelled"?(r(),d("p",Yn,s(e(n)("expiredSoon")),1)):("user"in a?a.user:e(l)).sub_status==="payment failed"?(r(),d("p",Jn,s(e(n)("paymentFailed")),1)):I("",!0)]),t("div",Qn,[t("button",{onClick:x,type:"button",class:"px-3 py-1.5 text-xs font-medium rounded-full text-white bg-[#f35e3e] hover:bg-opacity-90 whitespace-nowrap"},s(e(n)("renew")),1)])])])):I("",!0),t("div",Kn,[("user"in a?a.user:e(l)).tier==0?(r(),j(p,{key:0,priceType:"Free",upgrading:!0})):I("",!0),c(p,{priceType:"Monthly",upgrading:!0}),c(p,{priceType:"Weekly",upgrading:!0})])])}}};typeof ue=="function"&&ue(Me);const ta=J(Me,[["__scopeId","data-v-6e616a0e"]]),ea={},oa={version:"1.1",x:"0px",y:"0px",viewBox:"0 0 111.94993 125.51857"},sa=fe('<defs id="defs47"></defs><g id="OBJECTS" transform="matrix(1.0351626,0,0,1.0351626,-267.8069,-254.32492)" style="display:inline;"><g id="g15" transform="translate(-113.20112,-0.71797754)"><rect x="365.603" y="265.30899" transform="matrix(0.0019,-1,1,0.0019,118.1911,732.599)" style="display:inline;fill:#f14924;fill-opacity:1;stroke:none;" width="120.967" height="83.567001" id="rect2"></rect><g id="g11"><path style="fill:#f14924;fill-opacity:1;" d="m 392.206,256.466 c -0.003,1.339 -1.091,2.423 -2.43,2.421 l -10.765,-0.02 c -1.34,-0.003 -2.423,-1.091 -2.421,-2.43 v 0 c 0.003,-1.339 1.09,-2.423 2.43,-2.421 l 10.765,0.02 c 1.34,0.003 2.424,1.091 2.421,2.43 z" id="path2"></path><path style="fill:#f14924;fill-opacity:1;" d="m 392.185,267.717 c -0.003,1.34 -1.09,2.423 -2.43,2.421 l -10.765,-0.02 c -1.34,-0.003 -2.423,-1.091 -2.421,-2.43 v 0 c 0.003,-1.34 1.091,-2.423 2.43,-2.421 l 10.765,0.02 c 1.34,0.002 2.424,1.09 2.421,2.43 z" id="path3"></path><path style="fill:#f14924;fill-opacity:1;" d="m 392.164,278.967 c -0.003,1.34 -1.09,2.423 -2.43,2.421 l -10.765,-0.02 c -1.34,-0.003 -2.423,-1.091 -2.421,-2.43 v 0 c 0.003,-1.34 1.091,-2.423 2.43,-2.421 l 10.765,0.02 c 1.34,0.003 2.423,1.091 2.421,2.43 z" id="path4"></path><path style="fill:#f14924;fill-opacity:1;" d="m 392.143,290.217 c -0.003,1.34 -1.09,2.423 -2.43,2.421 l -10.765,-0.02 c -1.34,-0.003 -2.423,-1.091 -2.421,-2.43 v 0 c 0.002,-1.339 1.09,-2.423 2.43,-2.421 l 10.765,0.02 c 1.339,0.003 2.423,1.091 2.421,2.43 z" id="path5"></path><path style="fill:#f14924;fill-opacity:1;" d="m 392.121,301.468 c -0.003,1.34 -1.09,2.423 -2.43,2.421 l -10.765,-0.02 c -1.34,-0.003 -2.423,-1.09 -2.421,-2.43 v 0 c 0.003,-1.34 1.09,-2.423 2.43,-2.421 l 10.765,0.02 c 1.34,0.002 2.424,1.091 2.421,2.43 z" id="path6"></path><path style="fill:#f14924;fill-opacity:1;" d="m 392.1,312.718 c -0.003,1.34 -1.09,2.423 -2.43,2.421 l -10.765,-0.02 c -1.34,-0.003 -2.423,-1.09 -2.421,-2.43 v 0 c 0.003,-1.339 1.09,-2.423 2.43,-2.421 l 10.765,0.02 c 1.34,0.003 2.424,1.091 2.421,2.43 z" id="path7"></path><path style="fill:#f14924;fill-opacity:1;" d="m 392.079,323.969 c -0.003,1.339 -1.091,2.423 -2.43,2.421 l -10.765,-0.02 c -1.34,-0.003 -2.424,-1.09 -2.421,-2.43 v 0 c 0.003,-1.34 1.09,-2.423 2.43,-2.421 l 10.765,0.02 c 1.34,0.002 2.424,1.09 2.421,2.43 z" id="path8"></path><path style="fill:#f14924;fill-opacity:1;" d="m 392.058,335.219 c -0.003,1.34 -1.091,2.423 -2.43,2.421 l -10.765,-0.02 c -1.34,-0.003 -2.423,-1.091 -2.421,-2.43 v 0 c 0.003,-1.339 1.09,-2.423 2.43,-2.421 l 10.765,0.02 c 1.34,0.003 2.423,1.091 2.421,2.43 z" id="path9"></path><path style="fill:#f14924;fill-opacity:1;" d="m 392.037,346.47 c -0.003,1.339 -1.09,2.423 -2.43,2.421 l -10.765,-0.02 c -1.34,-0.003 -2.423,-1.09 -2.421,-2.43 v 0 c 0.003,-1.34 1.09,-2.423 2.43,-2.421 l 10.765,0.02 c 1.339,0.002 2.423,1.09 2.421,2.43 z" id="path10"></path><path style="fill:#f14924;fill-opacity:1;" d="m 392.015,357.72 c -0.003,1.339 -1.09,2.423 -2.43,2.421 l -10.765,-0.02 c -1.34,-0.003 -2.423,-1.09 -2.421,-2.43 v 0 c 0.003,-1.339 1.091,-2.423 2.43,-2.421 l 10.765,0.02 c 1.34,0.003 2.424,1.09 2.421,2.43 z" id="path11"></path></g><rect x="420.41101" y="250.41901" transform="matrix(0.0019,-1,1,0.0019,154.244,700.9487)" style="fill:#ffffff;" width="15.695" height="45.575001" id="rect11"></rect><rect x="426.15799" y="323.75" transform="matrix(0.0019,-1,1,0.0019,80.7762,774.0037)" style="fill:#ffffff;" width="3.924" height="45.574001" id="rect12"></rect><rect x="426.17401" y="315.422" transform="matrix(0.0019,-1,1,0.0019,89.1193,765.7061)" style="fill:#ffffff;" width="3.924" height="45.575001" id="rect13"></rect></g></g>',2),na=[sa];function aa(o,n){return r(),d("svg",oa,na)}const ia=J(ea,[["render",aa]]),la={},ra={version:"1.1",x:"0px",y:"0px",viewBox:"0 0 112.171 125.161","xml:space":"preserve",id:"svg47"},ca=fe('<defs id="defs47" data-v-434b952b></defs><g id="g46" transform="translate(-84.357,-267.172)" data-v-434b952b><path class="custom-polygon inline" d="m 140.55354,280.60414 c 30.89299,0 55.97446,25.08147 55.97446,55.97446 0,30.894 -25.08147,55.97547 -55.97446,55.97547 -30.894,0 -55.97547,-25.08147 -55.97547,-55.97547 0,-30.89299 25.08147,-55.97446 55.97547,-55.97446 z" id="path29" data-v-434b952b></path><path class="custom-path" d="m 140.66403,289.41075 c 25.60525,0 46.39324,20.7889 46.39324,46.39415 0,25.60525 -20.78799,46.39416 -46.39324,46.39416 -25.60617,0 -46.394157,-20.78891 -46.394157,-46.39416 0,-25.60525 20.787987,-46.39415 46.394157,-46.39415 z" id="path30" data-v-434b952b></path><polygon class="custom-polygon inline" points="148.126,282.345 132.76,282.345 136.601,272.484 144.285,272.484 " id="polygon30" data-v-434b952b></polygon><g id="g31" style="display:inline;" data-v-434b952b><defs id="defs30" data-v-434b952b><polygon id="SVGID_00000055688910325212236190000004159917012798438785_" points="132.76,282.345 136.601,272.484 144.285,272.484 148.126,282.345 " data-v-434b952b></polygon></defs><clipPath id="SVGID_00000006705999969453386550000010693046054924471998_" data-v-434b952b><use xlink:href="#SVGID_00000055688910325212236190000004159917012798438785_" style="overflow:visible;" id="use30" data-v-434b952b></use></clipPath><polygon class="custom-polygon inline" points="147.316,277.951 145.331,273.249 135.228,274.674 " clip-path="url(#SVGID_00000006705999969453386550000010693046054924471998_)" id="polygon31" data-v-434b952b></polygon></g><rect x="126.735" y="267.172" class="custom-polygon" width="27.415001" height="7.4920001" id="rect31" data-v-434b952b></rect><polygon class="custom-polygon" points="138.337,338.246 140.481,297.474 142.627,338.246 " id="polygon33" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><polygon class="custom-polygon" points="138.897,338.487 138.897,334.197 172.129,336.342 " id="polygon34" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><circle class="custom-polygon" cx="140.75485" cy="335.88474" r="2.9663055" id="circle34" data-v-434b952b></circle><polygon class="custom-polygon" points="139.364,382.612 140.443,376.436 141.52,382.612 " id="polygon35" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><polygon class="custom-polygon" points="141.52,289.615 140.443,295.79 139.364,289.615 " id="polygon36" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><polygon class="custom-polygon" points="186.941,337.191 180.765,336.113 186.941,335.035 " id="polygon37" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><polygon class="custom-polygon" points="93.944,335.035 100.119,336.113 93.944,337.191 " id="polygon38" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><polygon class="custom-polygon" points="164.626,296.383 160.604,301.192 162.758,295.306 " id="polygon39" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><polygon class="custom-polygon" points="116.26,375.844 120.281,371.034 118.127,376.921 " id="polygon40" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><polygon class="custom-polygon" points="118.127,295.306 120.281,301.192 116.26,296.383 " id="polygon41" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><polygon class="custom-polygon" points="162.758,376.921 160.604,371.034 164.626,375.844 " id="polygon42" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><polygon class="custom-polygon" points="100.712,311.931 105.522,315.952 99.634,313.797 " id="polygon43" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><polygon class="custom-polygon" points="180.173,360.296 175.364,356.275 181.25,358.429 " id="polygon44" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><polygon class="custom-polygon" points="181.25,313.797 175.364,315.952 180.173,311.931 " id="polygon45" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon><polygon class="custom-polygon" points="99.634,358.429 105.522,356.275 100.712,360.296 " id="polygon46" transform="matrix(0.91722495,0,0,0.91722495,11.846205,27.390762)" data-v-434b952b></polygon></g>',2),ua=[ca];function da(o,n){return r(),d("svg",ra,ua)}const ma=J(la,[["render",da],["__scopeId","data-v-434b952b"]]);function de(o){const n=o;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{gettingStarted:{t:0,b:{t:2,i:[{t:3}],s:"Getting started with SavoirX"}},practiceTitle:{t:0,b:{t:2,i:[{t:3}],s:"Practice"}},practiceItem1:{t:0,b:{t:2,i:[{t:3}],s:"Smart Writing Assistant"}},practiceItem2:{t:0,b:{t:2,i:[{t:3}],s:"No time limit"}},practiceItem3:{t:0,b:{t:2,i:[{t:3}],s:"AI Grading and Feedback"}},startPracticing:{t:0,b:{t:2,i:[{t:3}],s:"Start Practicing"}},mockTestTitle:{t:0,b:{t:2,i:[{t:3}],s:"Mock Test"}},mockTestItem1:{t:0,b:{t:2,i:[{t:3}],s:"Realistic Exam Tasks"}},mockTestItem2:{t:0,b:{t:2,i:[{t:3}],s:"Timed Practice"}},mockTestItem3:{t:0,b:{t:2,i:[{t:3}],s:"AI Grading and Feedback"}},takeMockTest:{t:0,b:{t:2,i:[{t:3}],s:"Take a Mock Test"}},remindMeLater:{t:0,b:{t:2,i:[{t:3}],s:"Remind me later"}}},fr:{gettingStarted:{t:0,b:{t:2,i:[{t:3}],s:"Commencez avec SavoirX"}},practiceTitle:{t:0,b:{t:2,i:[{t:3}],s:"Pratique"}},practiceItem1:{t:0,b:{t:2,i:[{t:3}],s:"Assistant d'écriture intelligent"}},practiceItem2:{t:0,b:{t:2,i:[{t:3}],s:"Pas de limite de temps"}},practiceItem3:{t:0,b:{t:2,i:[{t:3}],s:"Correction et retour par IA"}},startPracticing:{t:0,b:{t:2,i:[{t:3}],s:"Commencer à pratiquer"}},mockTestTitle:{t:0,b:{t:2,i:[{t:3}],s:"Examen blanc"}},mockTestItem1:{t:0,b:{t:2,i:[{t:3}],s:"Tâches d'examen réalistes"}},mockTestItem2:{t:0,b:{t:2,i:[{t:3}],s:"Exercice chronométrée"}},mockTestItem3:{t:0,b:{t:2,i:[{t:3}],s:"Correction et retour par IA"}},takeMockTest:{t:0,b:{t:2,i:[{t:3}],s:"Passer un examen blanc"}},remindMeLater:{t:0,b:{t:2,i:[{t:3}],s:"Me rappeler plus tard"}}},zh:{gettingStarted:{t:0,b:{t:2,i:[{t:3}],s:"开始使用 SavoirX"}},practiceTitle:{t:0,b:{t:2,i:[{t:3}],s:"练习"}},practiceItem1:{t:0,b:{t:2,i:[{t:3}],s:"智能写作助手"}},practiceItem2:{t:0,b:{t:2,i:[{t:3}],s:"无时间限制"}},practiceItem3:{t:0,b:{t:2,i:[{t:3}],s:"AI评分和反馈"}},startPracticing:{t:0,b:{t:2,i:[{t:3}],s:"开始练习"}},mockTestTitle:{t:0,b:{t:2,i:[{t:3}],s:"模拟测试"}},mockTestItem1:{t:0,b:{t:2,i:[{t:3}],s:"真实考试任务"}},mockTestItem2:{t:0,b:{t:2,i:[{t:3}],s:"定时练习"}},mockTestItem3:{t:0,b:{t:2,i:[{t:3}],s:"AI评分和反馈"}},takeMockTest:{t:0,b:{t:2,i:[{t:3}],s:"参加模拟测试"}},remindMeLater:{t:0,b:{t:2,i:[{t:3}],s:"稍后提醒我"}}}}})}const pa={class:"row content"},ba={class:"col-6 text-center"},_a={class:"features"},fa={class:"col-6 text-center"},va={class:"features"},ga={class:"footer text-center"},ha={class:"remind-later"},Le={__name:"welcomeChoice",setup(o){const{t:n}=Y({useScope:"local"}),x=Zt();function a(){if(wt.value){toast.error(n("Network error"),{position:"bottom-right",timeout:2032,closeOnClick:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:"button",rtl:!1});return}if(Gt.value>=Wt.value){Xt.value=!0;return}const p=Math.random()>.5?1:2;for(let $=0;$<pt.length;$++)if(!pt[$].submitted&&pt[$].taskIndex===p){if(Math.random()>.5)continue;const w=pt[$].id,y=x({name:"writing",query:{taskID:w}});y&&U(y.fullPath);return}const b=Math.floor(pt.length*Math.random()),_=pt[b].id,u=x({name:"writing",query:{taskID:_}});u&&U(u.fullPath)}function h(){if(wt.value){toast.error(n("Network error"),{position:"bottom-right",timeout:2032,closeOnClick:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:"button",rtl:!1});return}for(let _=0;_<xt.length;_++){const u=xt[_].index;if(!xt[_].submitted){const $=x({name:"writing",query:{examIndex:u}});$&&U($.fullPath);return}}const p=Math.floor(xt.length*Math.random()),b=x({name:"writing",query:{examIndex:xt[p].index}});b&&U(b.fullPath)}return(p,b)=>{const _=ia,u=It,$=ma,w=Yt,y=vt;return r(),j(w,null,{header:m(()=>[V(s(e(n)("gettingStarted")),1)]),body:m(()=>[t("div",pa,[t("div",ba,[c(_,{width:"40px"}),t("h2",null,s(e(n)("practiceTitle")),1),t("ul",_a,[t("li",null,s(e(n)("practiceItem1")),1),t("li",null,s(e(n)("practiceItem2")),1),t("li",null,s(e(n)("practiceItem3")),1)]),c(u,{"no-caps":"",rounded:"",ripple:!1,color:"accent",size:"md",class:"action-button",label:e(n)("startPracticing"),onClick:a},null,8,["label"])]),t("div",fa,[c($,{width:"40px"}),t("h2",null,s(e(n)("mockTestTitle")),1),t("ul",va,[t("li",null,s(e(n)("mockTestItem1")),1),t("li",null,s(e(n)("mockTestItem2")),1),t("li",null,s(e(n)("mockTestItem3")),1)]),c(u,{"no-caps":"",rounded:"",ripple:!1,color:"accent",size:"md",class:"action-button",label:e(n)("takeMockTest"),onClick:h},null,8,["label"])])]),t("div",ga,[N((r(),d("div",ha,[V(s(e(n)("remindMeLater")),1)])),[[y]])])]),_:1})}}};typeof de=="function"&&de(Le);const ya=J(Le,[["__scopeId","data-v-87b0b263"]]);function me(o){const n=o;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{"no-connection":{t:0,b:{t:2,i:[{t:3}],s:"No network connection. Please check your internet."}},"send-feedback":{t:0,b:{t:2,i:[{t:3}],s:"Send Feedback"}},"no-notification":{t:0,b:{t:2,i:[{t:3}],s:"You don't have any notifications."}},"manage-plan":{t:0,b:{t:2,i:[{t:3}],s:"Manage My Plan"}},settings:{t:0,b:{t:2,i:[{t:3}],s:"Settings"}},signout:{t:0,b:{t:2,i:[{t:3}],s:"Sign Out"}},"report-sent":{t:0,b:{t:2,i:[{t:3}],s:"Report Sent"}},"report-sent-message":{t:0,b:{t:2,i:[{t:3}],s:"Your report has been successfully submitted. Thank you for your feedback!"}},close:{t:0,b:{t:2,i:[{t:3}],s:"Close"}},"confirm-delete":{t:0,b:{t:2,i:[{t:3}],s:"Confirm Account Deletion"}},"delete-account":{t:0,b:{t:2,i:[{t:3}],s:"Delete Account"}},"delete-account-message":{t:0,b:{t:2,i:[{t:3}],s:"This action cannot be undone. Are you sure you want to delete your account?"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"Cancel"}},getStarted:{t:0,b:{t:2,i:[{t:3}],s:"Get Started"}},proPlan:{t:0,b:{t:2,i:[{t:3}],s:"Pro Plan"}},upgradeToPro:{t:0,b:{t:2,i:[{t:3}],s:"Upgrade to Pro"}},textReadyForReview:{t:0,b:{t:2,i:[{t:3}],s:"Your text is ready for review"}},reviewConfirmationDescription:{t:0,b:{t:2,i:[{t:3}],s:"Please review your text and decide if you want to submit, edit, or abandon it."}},textPreview:{t:0,b:{t:2,i:[{t:3}],s:"Text Preview"}},viewFullText:{t:0,b:{t:2,i:[{t:3}],s:"View Full Text"}},confirmReview:{t:0,b:{t:2,i:[{t:3}],s:"Confirm and Submit"}},editText:{t:0,b:{t:2,i:[{t:3}],s:"Edit Text"}},abandonAndDelete:{t:0,b:{t:2,i:[{t:3}],s:"Abandon & Delete"}}},fr:{"no-connection":{t:0,b:{t:2,i:[{t:3}],s:"Pas de connexion réseau. Veuillez vérifier votre connexion Internet."}},"send-feedback":{t:0,b:{t:2,i:[{t:3}],s:"Envoyer un feedback"}},"no-notification":{t:0,b:{t:2,i:[{t:3}],s:"Vous n'avez aucune notification."}},"manage-plan":{t:0,b:{t:2,i:[{t:3}],s:"Gérer mon abonnement"}},settings:{t:0,b:{t:2,i:[{t:3}],s:"Paramètres"}},signout:{t:0,b:{t:2,i:[{t:3}],s:"Se déconnecter"}},"report-sent":{t:0,b:{t:2,i:[{t:3}],s:"Rapport envoyé"}},"report-sent-message":{t:0,b:{t:2,i:[{t:3}],s:"Votre rapport a été soumis avec succès. Merci pour votre retour!"}},close:{t:0,b:{t:2,i:[{t:3}],s:"Fermer"}},"confirm-delete":{t:0,b:{t:2,i:[{t:3}],s:"Confirmer la suppression du compte"}},"delete-account":{t:0,b:{t:2,i:[{t:3}],s:"Supprimer le compte"}},"delete-account-message":{t:0,b:{t:2,i:[{t:3}],s:"Cette action ne peut pas être annulée. Êtes-vous sûr de vouloir supprimer votre compte?"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"Annuler"}},getStarted:{t:0,b:{t:2,i:[{t:3}],s:"Démarrer"}},proPlan:{t:0,b:{t:2,i:[{t:3}],s:"Plan Pro"}},upgradeToPro:{t:0,b:{t:2,i:[{t:3}],s:"Passer au Pro"}},textReadyForReview:{t:0,b:{t:2,i:[{t:3}],s:"Votre texte est prêt pour révision"}},reviewConfirmationDescription:{t:0,b:{t:2,i:[{t:3}],s:"Veuillez examiner votre texte et décider si vous voulez le soumettre, le modifier ou l'abandonner."}},textPreview:{t:0,b:{t:2,i:[{t:3}],s:"Aperçu du texte"}},viewFullText:{t:0,b:{t:2,i:[{t:3}],s:"Voir le texte complet"}},confirmReview:{t:0,b:{t:2,i:[{t:3}],s:"Confirmer et soumettre"}},editText:{t:0,b:{t:2,i:[{t:3}],s:"Modifier le texte"}},abandonAndDelete:{t:0,b:{t:2,i:[{t:3}],s:"Abandonner et supprimer"}}},zh:{"no-connection":{t:0,b:{t:2,i:[{t:3}],s:"没有网络连接。请检查你的互联网连接。"}},"send-feedback":{t:0,b:{t:2,i:[{t:3}],s:"发送反馈"}},"no-notification":{t:0,b:{t:2,i:[{t:3}],s:"暂无通知。"}},"manage-plan":{t:0,b:{t:2,i:[{t:3}],s:"管理我的套餐"}},settings:{t:0,b:{t:2,i:[{t:3}],s:"设置"}},signout:{t:0,b:{t:2,i:[{t:3}],s:"登出"}},"report-sent":{t:0,b:{t:2,i:[{t:3}],s:"报告已发送"}},"report-sent-message":{t:0,b:{t:2,i:[{t:3}],s:"你的报告已成功提交。感谢你的反馈！"}},close:{t:0,b:{t:2,i:[{t:3}],s:"关闭"}},"confirm-delete":{t:0,b:{t:2,i:[{t:3}],s:"确认删除帐户"}},"delete-account":{t:0,b:{t:2,i:[{t:3}],s:"删除帐户"}},"delete-account-message":{t:0,b:{t:2,i:[{t:3}],s:"此操作无法撤消。您确定要删除您的帐户吗？"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"取消"}},getStarted:{t:0,b:{t:2,i:[{t:3}],s:"立即开始"}},proPlan:{t:0,b:{t:2,i:[{t:3}],s:"Pro 套餐"}},upgradeToPro:{t:0,b:{t:2,i:[{t:3}],s:"升级到 Pro 套餐"}},textReadyForReview:{t:0,b:{t:2,i:[{t:3}],s:"您的文本已准备好审阅"}},reviewConfirmationDescription:{t:0,b:{t:2,i:[{t:3}],s:"请检查您的文本，并决定是提交、编辑还是放弃它。"}},textPreview:{t:0,b:{t:2,i:[{t:3}],s:"文本预览"}},viewFullText:{t:0,b:{t:2,i:[{t:3}],s:"查看完整文本"}},confirmReview:{t:0,b:{t:2,i:[{t:3}],s:"确认并提交"}},editText:{t:0,b:{t:2,i:[{t:3}],s:"编辑文本"}},abandonAndDelete:{t:0,b:{t:2,i:[{t:3}],s:"放弃并删除"}}}}})}const Mt=o=>(qt("data-v-dddad98f"),o=o(),Tt(),o),xa={class:"sidebar-content flex flex-col h-full"},wa=Mt(()=>t("img",{src:go,alt:"SavoirX",class:"logo"},null,-1)),ka={class:"logo-text"},$a=Mt(()=>t("span",{class:"x-text"},"X",-1)),Ca={class:"inline-flex items-center px-2 py-0.5 rounded-lg text-xs font-bold text-accent border border-[#e87559]"},Sa={class:"mt-6 space-y-1 px-2 flex-grow"},Pa=["onClick"],qa={key:0,class:"mx-3 my-3 border-t border-gray-200"},Ta={class:"mt-auto pt-4 pb-6 px-2"},Va={class:"flex items-center justify-center p-2 transition-all duration-300 hover:text-white hover:bg-[#e87559]"},Ia={class:"text-sm font-medium flex"},Da={key:0,class:"ml-2"},Ma={class:"relative"},La=["src"],Aa={key:1,class:"w-full h-full bg-gradient-to-br from-[#e87559] to-[#ff9b84] text-white flex items-center justify-center text-lg font-semibold"},Ba={class:"text-sm font-medium text-gray-700 max-w-[140px]"},Na=Mt(()=>t("br",null,null,-1)),za={class:"text-sm text-gray-400 block truncate max-w-[140px]"},Ea={class:"space-y-2"},ja={class:"text-sm text-gray-700 group-hover:text-gray-900"},Fa={key:0,class:"text-xs border border-purple-500 text-purple-500 px-1 py-0 rounded-md ml-2"},Ra={class:"text-sm text-gray-700 group-hover:text-gray-900"},Ua=Mt(()=>t("div",{class:"h-px bg-gray-200 mx-4"},null,-1)),Oa={class:"text-sm text-gray-700 group-hover:text-gray-900"},Ha={class:"bg-white shadow-lg rounded-xl p-8 border border-gray-200 max-w-2xl mx-auto"},Ga={class:"text-2xl font-semibold text-gray-800 mb-4"},Wa={class:"text-sm text-gray-600 mb-6"},Xa={class:"mb-6 bg-gray-50 rounded-lg p-4 border border-gray-200"},Za={class:"relative"},Ya={key:0,class:"absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-gray-50 pointer-events-none"},Ja=["innerHTML"],Qa={class:"space-y-4"},Ka={class:"flex justify-between space-x-4"},ti={class:"text-h5",style:{"margin-top":"20px","font-weight":"600",color:"#d32f2f"}},ei={style:{color:"#333","margin-top":"15px"}},oi={class:"text-h6 q-my-md"},si={key:0,class:"modal"},ni={class:"flex justify-end"},Ae={__name:"default",setup(o){E("primary","#333333"),E("primary-light","#2e517c"),E("secondary","#5A7D6A"),E("secondary-text","#394B41"),E("original-accent","#F14924"),E("accent-darker","#d54020"),E("accent","#e87559"),E("accent-bg","#f8785b"),E("accent-light","#FDEAE5"),E("accent-ultra-light","#fef4f2"),E("text-color","#555555"),E("white-text-color","#f4f0fe"),E("error","#A42408"),E("bg","#fbfbfb"),E("dashboard-bg","#f1efee"),E("bg-popup","#fffffc");const n=v(null),{locale:x}=Y({useScope:"global"}),{t:a}=Y({useScope:"local"}),h=A(()=>{var f,i;return W.value&&l.value&&(!((f=l.value)!=null&&f.first_name)||!((i=l.value)!=null&&i.level))}),p=A(()=>W.value&&!h.value&&_.value),b=v(null),_=v(!1),u=v(!1),$=v(!1),w=v(!1),y=v(""),P=v(!1),D=v(!1),G=v(!1),W=v(!1),M=v(!1),q=v(!1),B=v(!1),O=v(!1),F=Ye(),k=Zt(),L=Vt();v();let g=null;const X=v(!1),st=v(!1),Z=v(!0),H=A(()=>X.value&&!st.value);_t(H,f=>{f?(g&&(clearTimeout(g),g=null),Z.value=!1):g=setTimeout(()=>{Z.value=!0},200)});function Lt(f){const i=k({name:f});if(i)return U(i.fullPath)}const gt=()=>{const f=F.currentRoute.value.name.split("__")[0];z.value.includes(f)?X.value=window.innerWidth<1280:X.value=!0};_t(F.currentRoute,f=>{const i=f.name.split("__")[0];z.value.includes(i)?X.value=window.innerWidth<1280:X.value=!0});const kt=v([[{name:"dashboard",icon:Do,to:"dashboard"}],[{name:"vocabulary",icon:ho,to:"vocabulary"},{name:"customPracticeList",icon:Vo,to:"customPracticeList"},{name:"practice",icon:yo,to:"practice"},{name:"mocktest",icon:xo,to:"mocktest"}],[{name:"activity",icon:Po,to:"activity"},{name:"bookmark",icon:wo,to:"bookmark"},{name:"notebook",icon:ko,to:"notebook"}]]),z=v(["dashboard","vocabulary","customPracticeList","vocabulary-word-list","practice","mocktest","activity","bookmark","notebook","settings"]);async function C(){try{let{error:f}=await L.auth.signOut();if(f)throw f;l.value=null,Ot.value=!1;const i=k({name:"login"});if(i)return U(i.fullPath)}catch(f){alert(f.message)}finally{}}function R(){bt.value=!0,P.value=!1,it.value=!1,D.value=!1,G.value=!1}function At(){it.value=!0,bt.value=!1,P.value=!1,D.value=!1,G.value=!1}const ut=f=>{M.value=!1,f.popupName==="Upgrade"?bt.value=!0:f.popupName==="DeleteAccount"?w.value=!0:f.popupName==="ReportOver"?(it.value=!1,O.value=!0):f.popupName==="ContactUs"?it.value=!0:f.popupName==="CancelSubscription"&&(B.value=!0)};_t(Xt,f=>{f&&(n.value.openNotEnoughCreditDialog(),Xt.value=!1)});async function ht(){try{let f=await L.auth.getSession(),i={type:"deleteAccount",userId:l.value.id,token:f.data.session.access_token};await fetch("https://europe-west9-frexam.cloudfunctions.net/userControl",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),location.reload()}catch(f){f.message==="Invalid login credentials"?y.value="Invalid email or password":y.value="An error occurred. Please try again later"+f.message}}function Bt(){if(F.currentRoute.value.name.split("__")[0]==="dashboard"){const i=k({name:"index"});if(i)return U(i.fullPath)}else{const i=k({name:"dashboard"});if(i)return U(i.fullPath)}}function yt(){if(localStorage.getItem("level")==="A2"){localStorage.setItem("action","submit");const i=k({name:"writing",query:{taskID:"04cd4987-3820-4bc6-92e4-7b708af6d932"}});if(i)return _.value=!1,U(i.fullPath)}else{localStorage.setItem("action","submit");const i=k({name:"writing",query:{examIndex:0}});if(i)return _.value=!1,U(i.fullPath)}}function Nt(){if(localStorage.getItem("level")==="A2"){localStorage.setItem("action","edit");const i=k({name:"writing",query:{taskID:"04cd4987-3820-4bc6-92e4-7b708af6d932"}});if(i)return _.value=!1,U(i.fullPath)}else{localStorage.setItem("action","edit");const i=k({name:"writing",query:{examIndex:0}});if(i)return _.value=!1,U(i.fullPath)}}function zt(){localStorage.removeItem("level"),localStorage.removeItem("trailText"),localStorage.removeItem("action"),_.value=!1}function nt(){navigator.onLine?wt.value=!1:wt.value=!0}const Et=()=>{X.value&&(st.value=!0)},jt=()=>{st.value=!1},$t=L.channel("tierSub");return Pt(async()=>{var Ct,St;if(nt(),window.addEventListener("online",nt),window.addEventListener("offline",nt),gt(),window.addEventListener("resize",gt),await ge(),!Ot.value&&Ot.value!==!0){const K=k({name:"login"});return K?U(K.fullPath):void 0}eo.value||oo();const f=localStorage.getItem("level");f!=null&&f!=l.value.level&&(l.value.level=f,await L.from("userprofile").update({level:f}).eq("id",l.value.id));const i=localStorage.getItem("pic");i&&(l.value.profilePictureUrl=i),((St=(Ct=l)==null?void 0:Ct.value)==null?void 0:St.level)!=null&&await ve(),$t.on("postgres_changes",{event:"UPDATE",schema:"public",table:"user",filter:`id=eq.${l.value.id}`},async K=>{K.new.tier!=null&&K.new.tier!=l.value.tier&&(l.value.tier=K.new.tier)}).subscribe();const dt=localStorage.getItem("trailText");f&&dt&&(_.value=!0,b.value=dt.replaceAll(`
`,"<br/>")),$.value=!0,W.value=!0}),Je(()=>{window.removeEventListener("resize",gt),window.removeEventListener("online",nt),window.removeEventListener("offline",nt),$t.unsubscribe()}),(f,i)=>{const dt=$o,Ct=ye,St=_o,K=ps,tt=Pe,Be=to,Ne=no,Jt=$e,Qt=xe,Ft=It,Kt=ke,te=Dt,ze=xn,Ee=Pn,je=Dn,Fe=Rn,Re=ta,Ue=fo,Oe=vo,He=vt;return r(),j(Oe,{view:"hHh lpR fFf"},{default:m(()=>[c(St,{class:"q-py-none q-header"},{default:m(()=>{var S,ee,oe,se,ne,ae,ie;return[e(wt)?(r(),j(dt,{key:0,class:"bg-red-6 text-white text-center q-my-none q-py-none",dense:"",animated:""},{default:m(()=>[V(s(e(a)("no-connection")),1)]),_:1})):I("",!0),N(t("aside",{class:T(["sidebar-container",{"sidebar-shrink":e(H)}]),onMouseenter:Et,onMouseleave:jt},[t("div",xa,[t("div",{class:T(["py-4 transition-all duration-300 ease-in-out",{"px-4":!e(H),"px-2":e(H)}])},[t("div",{class:"logo-container cursor-pointer",onClick:Bt},[wa,c(_e,{"enter-active-class":"transition ease-out duration-300","enter-from-class":"transform opacity-0 -translate-x-4","enter-to-class":"transform opacity-100 translate-x-0",duration:{enter:300,leave:0}},{default:m(()=>{var at,mt;return[N(t("span",ka,[V(" Savoir"),$a,N(t("span",Ca," Pro ",512),[[lt,((at=e(l))==null?void 0:at.tier)&&((mt=e(l))==null?void 0:mt.tier)!=0]])],512),[[lt,e(Z)]])]}),_:1})])],2),t("nav",Sa,[(r(!0),d(rt,null,ct(e(kt),(at,mt)=>(r(),d("div",{key:mt,class:"pb-2"},[(r(!0),d(rt,null,ct(at,et=>(r(),d("a",{key:et.name,href:"#",onClick:Qe(ai=>Lt(et.to?et.to:"dashboard"),["prevent"]),class:T(["flex items-center rounded-lg text-gray-700 transition-all duration-300 relative group",["flex items-center rounded-lg text-gray-700 transition-all duration-300 relative group",e(H)?"justify-center py-3 px-1":"px-4 py-3",(f._.provides[Ut]||f.$route).name.split("__")[0]===et.name?"bg-[#e87559] text-white font-medium":"hover:bg-gray-100"]])},[(r(),j(Ke(et.icon),{class:T(["h-5 w-5 transition-all duration-300",[(f._.provides[Ut]||f.$route).name.split("__")[0]===et.name?"text-white":"text-gray-400 group-hover:text-[#e87559]",{"mr-3":!e(H)},{"h-6 w-6":e(H)}]])},null,8,["class"])),N(t("span",{class:T(["text-sm",(f._.provides[Ut]||f.$route).name.split("__")[0]===et.name?"":"group-hover:text-gray-900"])},s(e(a)("dashboard."+et.name)),3),[[lt,e(Z)]])],10,Pa))),128)),mt<e(kt).length-1?(r(),d("div",qa)):I("",!0)]))),128))]),t("div",Ta,[t("button",{onClick:At,class:T(["w-full flex items-center justify-center py-2 text-sm text-gray-700 bg-gray-100 rounded-lg hover:bg-gray-200 transition-colors duration-300 mb-4",e(H)?"px-2":"px-4"])},[c(e(Io),{class:T(["h-5 w-5",{"mr-2":!e(H)}])},null,8,["class"]),N(t("span",null,s(e(a)("dashboard.send-feedback")),513),[[lt,e(Z)]])],2),((S=e(l))==null?void 0:S.tier)===0?(r(),d("div",{key:0,class:"mb-4 rounded-xl transition-all duration-300 cursor-pointer overflow-hidden border border-[#e87559] text-[#e87559]",onClick:R},[t("div",Va,[t("span",Ia,[c(e(qe),{class:"h-5 w-5"}),e(Z)?(r(),d("span",Da,s(e(a)("upgradeToPro")),1)):I("",!0)])])])):I("",!0),t("div",Ma,[t("button",{class:T(["flex items-center w-full text-left rounded-lg hover:bg-gray-100 transition-colors duration-300",e(H)?"justify-center py-2 px-1":"px-3 py-2"])},[t("div",{class:T(["rounded-full overflow-hidden border-2 ",e(H)?"w-8 h-8":"w-10 h-10 mr-3",((ee=e(l))==null?void 0:ee.tier)===0?"border-gray-200":"border-purple-500"])},[(oe=e(l))!=null&&oe.profilePictureUrl?(r(),d("img",{key:0,src:e(l).profilePictureUrl,alt:"User's profile picture",class:"w-full h-full object-cover",referrerpolicy:"no-referrer"},null,8,La)):(r(),d("div",Aa,s((se=e(l))!=null&&se.first_name?(ne=e(l))==null?void 0:ne.first_name[0].toUpperCase():"U"),1))],2),N(t("span",Ba,[V(s(((ae=e(l))==null?void 0:ae.first_name)||"User")+" ",1),Na,t("span",za,s((ie=e(l))==null?void 0:ie.email),1)],512),[[lt,e(Z)]]),c(Ct,{class:T(["bg-white rounded-xl shadow-lg p-3 border border-gray-100",[e(x)==="zh"?"w-56":e(x)==="en"?"w-64":"w-72"]]),"transition-show":"jump-down","transition-hide":"jump-up","auto-close":""},{default:m(()=>{var at;return[t("div",Ea,[t("a",{onClick:R,class:"flex items-center px-4 py-3 rounded-lg hover:bg-gray-50 transition-colors duration-150 cursor-pointer group"},[c(e(To),{class:"h-5 w-5 text-gray-400 mr-3 group-hover:text-purple-500"}),t("span",ja,s(e(a)("dashboard.manage-plan")),1),((at=e(l))==null?void 0:at.tier)!==0?(r(),d("span",Fa,"Pro")):I("",!0)]),t("a",{onClick:i[0]||(i[0]=mt=>M.value=!0),class:"flex items-center px-4 py-3 rounded-lg hover:bg-gray-50 transition-colors duration-150 cursor-pointer group"},[c(e(qo),{class:"h-5 w-5 text-gray-400 mr-3 group-hover:text-[#e87559]"}),t("span",Ra,s(e(a)("dashboard.settings")),1)]),Ua,t("a",{onClick:C,class:"flex items-center px-4 py-3 rounded-lg hover:bg-gray-50 transition-colors duration-150 cursor-pointer group"},[c(e(So),{class:"h-5 w-5 text-gray-400 mr-3 group-hover:text-[#e87559]"}),t("span",Oa,s(e(a)("dashboard.signout")),1)])])]}),_:1},8,["class"])],2)])])])],34),[[lt,!e(bt)]])]}),_:1}),c(Ue,null,{default:m(()=>[t("main",{class:T({"main-shrink":e(X)})},[c(tt,{modelValue:e(h),"onUpdate:modelValue":i[1]||(i[1]=S=>Q(h)?h.value=S:null),persistent:""},{default:m(()=>[c(K)]),_:1},8,["modelValue"]),c(tt,{modelValue:e(p),"onUpdate:modelValue":i[3]||(i[3]=S=>Q(p)?p.value=S:null)},{default:m(()=>[t("div",Ha,[t("h2",Ga,s(e(a)("textReadyForReview")),1),t("p",Wa,s(e(a)("reviewConfirmationDescription")),1),t("div",Xa,[t("div",Za,[e(u)?I("",!0):(r(),d("div",Ya)),t("div",{class:T(["text-sm text-gray-800 mb-2",{"line-clamp-4":!e(u)}]),innerHTML:e(b)},null,10,Ja)]),e(u)?I("",!0):(r(),d("button",{key:0,onClick:i[2]||(i[2]=S=>u.value=!0),class:"text-sm text-[#e87559] hover:underline focus:outline-none"},s(e(a)("viewFullText")),1))]),t("div",Qa,[t("button",{onClick:yt,class:"w-full px-6 py-3 bg-gradient-to-r from-[#e87559] to-[#ff9b84] text-white rounded-lg text-base font-medium focus:outline-none transition-all duration-300 hover:shadow-md hover:from-[#d56a50] hover:to-[#e87559] transform hover:-translate-y-0.5"},s(e(a)("confirmReview")),1),t("div",Ka,[t("button",{onClick:Nt,class:"flex-1 px-4 py-2 border border-gray-300 text-gray-700 rounded-md text-sm font-medium focus:outline-none transition-all duration-200 hover:bg-gray-50 hover:border-gray-400"},s(e(a)("editText")),1),t("button",{onClick:zt,class:"px-4 py-2 border border-red-300 text-red-600 rounded-md text-sm font-medium focus:outline-none transition-all duration-200 hover:bg-red-50 hover:border-red-400"},s(e(a)("abandonAndDelete")),1)])])])]),_:1},8,["modelValue"]),e($)&&!e(h)&&e(l)?(r(),j(Be,{key:0,class:"page-content","page-key":S=>S.fullPath,onUpdatePopup:ut},null,8,["page-key"])):(r(),j(Ne,{key:1}))],2),c(tt,{modelValue:e(w),"onUpdate:modelValue":i[5]||(i[5]=S=>Q(w)?w.value=S:null)},{default:m(()=>[c(te,{class:"popup-card"},{default:m(()=>[c(Qt,{class:"text-center",style:{padding:"30px"}},{default:m(()=>[c(Jt,{name:"warning",style:{"font-size":"3em",color:"#d32f2f"}}),t("div",ti,s(e(a)("confirm-delete")),1),t("div",ei,s(e(a)("delete-account-message")),1)]),_:1}),c(Kt,{align:"center",style:{padding:"0 30px 30px"}},{default:m(()=>[c(Ft,{flat:"",onClick:i[4]||(i[4]=S=>w.value=!1),color:"primary",style:{"font-weight":"500","text-transform":"none",width:"100%","margin-bottom":"10px"}},{default:m(()=>[V(s(e(a)("cancel")),1)]),_:1}),c(Ft,{flat:"",onClick:ht,style:{"font-weight":"500","text-transform":"none",width:"100%","background-color":"#d32f2f",color:"white"}},{default:m(()=>[V(s(e(a)("delete-account")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),c(tt,{modelValue:e(M),"onUpdate:modelValue":i[6]||(i[6]=S=>Q(M)?M.value=S:null)},{default:m(()=>[c(ze,{onUpdatePopup:ut})]),_:1},8,["modelValue"]),c(tt,{modelValue:e(q),"onUpdate:modelValue":i[7]||(i[7]=S=>Q(q)?q.value=S:null)},{default:m(()=>[c(ya)]),_:1},8,["modelValue"]),c(tt,{modelValue:e(it),"onUpdate:modelValue":i[8]||(i[8]=S=>Q(it)?it.value=S:null)},{default:m(()=>[c(Ee,{onUpdatePopup:ut})]),_:1},8,["modelValue"]),c(tt,{modelValue:e(O),"onUpdate:modelValue":i[9]||(i[9]=S=>Q(O)?O.value=S:null)},{default:m(()=>[c(te,{style:{width:"300px","border-radius":"30px"},class:"q-py-md"},{default:m(()=>[c(Qt,{class:"text-center"},{default:m(()=>[c(Jt,{name:"check_circle",size:"xl",color:"green"}),t("div",oi,s(e(a)("report-sent")),1),t("div",null,s(e(a)("report-sent-message")),1)]),_:1}),c(Kt,{align:"center"},{default:m(()=>[N(c(Ft,{unelevated:"",label:e(a)("close"),color:"accent"},null,8,["label"]),[[He]])]),_:1})]),_:1})]),_:1},8,["modelValue"]),c(tt,{modelValue:e(B),"onUpdate:modelValue":i[10]||(i[10]=S=>Q(B)?B.value=S:null)},{default:m(()=>[c(je)]),_:1},8,["modelValue"]),c(Fe,{onUpgrade:R,ref_key:"notEnoughCreditRef",ref:n},null,512),e(bt)?(r(),d("div",si,[t("div",ni,[t("div",{class:"close",clickable:"",onClick:i[11]||(i[11]=S=>bt.value=!1)}," × ")]),c(Re)])):I("",!0)]),_:1})]),_:1})}}};typeof me=="function"&&me(Ae);const Hi=J(Ae,[["__scopeId","data-v-dddad98f"]]);export{Hi as default};
