From 3b8206284f0ad300a7e2a55c2802c543ffe407bd Mon Sep 17 00:00:00 2001 From: abingyyds Date: Wed, 25 Mar 2026 03:46:01 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=89=80=E6=9C=89=E6=A8=A1=E6=9D=BF=20?= =?UTF-8?q?Home=20=E9=A1=B5=E5=A5=97=E9=A4=90=E5=8D=A1=E7=89=87=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=AE=98=E6=96=B9=E4=BB=B7=E6=A0=BC=E7=AD=89=E4=BB=B7?= =?UTF-8?q?=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 提取 calcOfficialEquiv 为公共工具函数,7 个 Home 模板和 Packages 页面共用,自动选择折扣比例最大的模型展示等价额度。 Co-Authored-By: Claude Sonnet 4.6 --- dist/assets/CountUp-B7vSEX1I.js | 1 - dist/assets/CountUp-DKNTcuWU.js | 1 + dist/assets/Dashboard-IbzjFIoV.js | 1 + dist/assets/Dashboard-elfJRGHo.js | 1 - ...nt-DNRHLB7E.js => FadeContent-Cswq021Y.js} | 2 +- dist/assets/Home-BJajDktc.js | 1 + dist/assets/Home-BShPF6nt.js | 1 - dist/assets/Home-BVEmtewU.js | 1 + dist/assets/Home-BbUuLGZD.js | 1 - dist/assets/Home-BuMqQaGJ.js | 1 + dist/assets/Home-C-GxmmCZ.js | 1 - dist/assets/Home-Dfjnl6IJ.js | 1 - dist/assets/Home-Drv_Yrfd.js | 1 - dist/assets/Home-DvtKf7X7.js | 1 - dist/assets/Home-Ji7N4uDe.js | 1 + dist/assets/Home-KZsq5hsI.js | 1 + dist/assets/Home-ahtkcEPh.js | 1 - dist/assets/Home-jCVAuf09.js | 1 + dist/assets/Home-jHukPhWm.js | 1 + ...BGa_hr1Z.js => LanguageSwitch-B7-4CWQP.js} | 2 +- ...{Layout-B4YlzwXv.js => Layout-B2Isp14g.js} | 2 +- ...{Layout-BZYZ8jj1.js => Layout-DltGFkEN.js} | 2 +- ...{Layout-D1kE7Hv7.js => Layout-Dvtbvg20.js} | 2 +- ...{Layout-s3BpODFZ.js => Layout-NPp3SVTh.js} | 2 +- ...{Layout-4QA5HuBu.js => Layout-kkdZeTHc.js} | 2 +- ...{Layout-CtOOKniM.js => Layout-nk7MlPO7.js} | 2 +- ...{Layout-BtrGQcOw.js => Layout-rCXoKNs7.js} | 2 +- .../{Login-Xik2Nht3.js => Login-C6BPG0T7.js} | 2 +- dist/assets/Packages-BOtvAbP1.js | 1 + dist/assets/Packages-CBRMcF8w.js | 1 - dist/assets/Pricing-CfO9rFBZ.js | 1 - dist/assets/Pricing-EipPrIaV.js | 1 + ...ister-BgbUTYo5.js => Register-DYiVAcZJ.js} | 2 +- dist/assets/SpotlightCard-a-a6koSS.js | 1 - dist/assets/Tokens-BdD2zQiB.js | 73 +++++++++++++++ dist/assets/Tokens-DqFd9l1i.js | 73 --------------- dist/assets/Topup-BAYKs2M5.js | 1 - dist/assets/Topup-bHBPVOgP.js | 1 + dist/assets/index-BcDLrnx0.css | 1 + .../{index-Cvtin-Z6.js => index-ClhW4pXr.js} | 4 +- dist/assets/index-Dbm04DbP.css | 1 - dist/assets/officialEquiv-COyn5GUF.js | 1 + ...BeJE8l6a.js => useTranslation-Pq_l7wMn.js} | 2 +- dist/index.html | 4 +- src/pages/Packages.jsx | 91 ++++--------------- src/themes/claude/Home.jsx | 13 ++- src/themes/clean/Home.jsx | 13 ++- src/themes/corporate/Home.jsx | 13 ++- src/themes/dark/Home.jsx | 13 ++- src/themes/default/Home.jsx | 13 ++- src/themes/minimal/Home.jsx | 13 ++- src/themes/starter/Home.jsx | 13 ++- src/utils/officialEquiv.js | 66 ++++++++++++++ 53 files changed, 255 insertions(+), 199 deletions(-) delete mode 100644 dist/assets/CountUp-B7vSEX1I.js create mode 100644 dist/assets/CountUp-DKNTcuWU.js create mode 100644 dist/assets/Dashboard-IbzjFIoV.js delete mode 100644 dist/assets/Dashboard-elfJRGHo.js rename dist/assets/{FadeContent-DNRHLB7E.js => FadeContent-Cswq021Y.js} (91%) create mode 100644 dist/assets/Home-BJajDktc.js delete mode 100644 dist/assets/Home-BShPF6nt.js create mode 100644 dist/assets/Home-BVEmtewU.js delete mode 100644 dist/assets/Home-BbUuLGZD.js create mode 100644 dist/assets/Home-BuMqQaGJ.js delete mode 100644 dist/assets/Home-C-GxmmCZ.js delete mode 100644 dist/assets/Home-Dfjnl6IJ.js delete mode 100644 dist/assets/Home-Drv_Yrfd.js delete mode 100644 dist/assets/Home-DvtKf7X7.js create mode 100644 dist/assets/Home-Ji7N4uDe.js create mode 100644 dist/assets/Home-KZsq5hsI.js delete mode 100644 dist/assets/Home-ahtkcEPh.js create mode 100644 dist/assets/Home-jCVAuf09.js create mode 100644 dist/assets/Home-jHukPhWm.js rename dist/assets/{LanguageSwitch-BGa_hr1Z.js => LanguageSwitch-B7-4CWQP.js} (86%) rename dist/assets/{Layout-B4YlzwXv.js => Layout-B2Isp14g.js} (97%) rename dist/assets/{Layout-BZYZ8jj1.js => Layout-DltGFkEN.js} (97%) rename dist/assets/{Layout-D1kE7Hv7.js => Layout-Dvtbvg20.js} (96%) rename dist/assets/{Layout-s3BpODFZ.js => Layout-NPp3SVTh.js} (96%) rename dist/assets/{Layout-4QA5HuBu.js => Layout-kkdZeTHc.js} (97%) rename dist/assets/{Layout-CtOOKniM.js => Layout-nk7MlPO7.js} (97%) rename dist/assets/{Layout-BtrGQcOw.js => Layout-rCXoKNs7.js} (97%) rename dist/assets/{Login-Xik2Nht3.js => Login-C6BPG0T7.js} (94%) create mode 100644 dist/assets/Packages-BOtvAbP1.js delete mode 100644 dist/assets/Packages-CBRMcF8w.js delete mode 100644 dist/assets/Pricing-CfO9rFBZ.js create mode 100644 dist/assets/Pricing-EipPrIaV.js rename dist/assets/{Register-BgbUTYo5.js => Register-DYiVAcZJ.js} (96%) delete mode 100644 dist/assets/SpotlightCard-a-a6koSS.js create mode 100644 dist/assets/Tokens-BdD2zQiB.js delete mode 100644 dist/assets/Tokens-DqFd9l1i.js delete mode 100644 dist/assets/Topup-BAYKs2M5.js create mode 100644 dist/assets/Topup-bHBPVOgP.js create mode 100644 dist/assets/index-BcDLrnx0.css rename dist/assets/{index-Cvtin-Z6.js => index-ClhW4pXr.js} (74%) delete mode 100644 dist/assets/index-Dbm04DbP.css create mode 100644 dist/assets/officialEquiv-COyn5GUF.js rename dist/assets/{useTranslation-BeJE8l6a.js => useTranslation-Pq_l7wMn.js} (98%) create mode 100644 src/utils/officialEquiv.js diff --git a/dist/assets/CountUp-B7vSEX1I.js b/dist/assets/CountUp-B7vSEX1I.js deleted file mode 100644 index ed381c3..0000000 --- a/dist/assets/CountUp-B7vSEX1I.js +++ /dev/null @@ -1 +0,0 @@ -import{r as F,j as te}from"./index-Cvtin-Z6.js";function kt(t){const e=F.useRef(null);return e.current===null&&(e.current=t()),e.current}const ee=typeof window<"u",se=ee?F.useLayoutEffect:F.useEffect;function ne(t,e){t.indexOf(e)===-1&&t.push(e)}function re(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}const U=(t,e,s)=>s>e?e:s{};const dt={},et=t=>t,ie=(t,e)=>s=>e(t(s)),pt=(...t)=>t.reduce(ie),Et=(t,e,s)=>{const r=e-t;return r===0?1:(s-t)/r};class oe{constructor(){this.subscriptions=[]}add(e){return ne(this.subscriptions,e),()=>re(this.subscriptions,e)}notify(e,s,r){const n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](e,s,r);else for(let i=0;it*1e3,N=t=>t/1e3;function Pt(t,e){return e?t*(1e3/e):0}const Nt=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,ae=1e-7,ce=12;function ue(t,e,s,r,n){let i,o,a=0;do o=e+(s-e)/2,i=Nt(o,r,n)-t,i>0?s=o:e=o;while(Math.abs(i)>ae&&++aue(i,0,1,t,s);return i=>i===0||i===1?i:Nt(n(i),e,r)}const Rt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ot=t=>e=>1-t(1-e),Ut=$(.33,1.53,.69,.99),mt=Ot(Ut),le=Rt(mt),fe=t=>t>=1?1:(t*=2)<1?.5*mt(t):.5*(2-Math.pow(2,-10*(t-1))),gt=t=>1-Math.sin(Math.acos(t)),he=Ot(gt),de=Rt(gt),pe=$(.42,0,1,1),me=$(0,0,.58,1),Kt=$(.42,0,.58,1),ge=t=>Array.isArray(t)&&typeof t[0]!="number",ye=t=>Array.isArray(t)&&typeof t[0]=="number",be={linear:et,easeIn:pe,easeInOut:Kt,easeOut:me,circIn:gt,circInOut:de,circOut:he,backIn:mt,backInOut:le,backOut:Ut,anticipate:fe},ve=t=>typeof t=="string",Mt=t=>{if(ye(t)){It(t.length===4);const[e,s,r,n]=t;return $(e,s,r,n)}else if(ve(t))return be[t];return t},J=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Te(t,e){let s=new Set,r=new Set,n=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(c){o.has(c)&&(l.schedule(c),t()),c(a)}const l={schedule:(c,f=!1,d=!1)=>{const x=d&&n?s:r;return f&&o.add(c),x.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,n){i=!0;return}n=!0;const f=s;s=r,r=f,s.forEach(u),s.clear(),n=!1,i&&(i=!1,l.process(c))}};return l}const xe=40;function Me(t,e){let s=!1,r=!0;const n={delta:0,timestamp:0,isProcessing:!1},i=()=>s=!0,o=J.reduce((v,g)=>(v[g]=Te(i),v),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:c,update:f,preRender:d,render:M,postRender:x}=o,m=()=>{const v=dt.useManualTiming,g=v?n.timestamp:performance.now();s=!1,v||(n.delta=r?1e3/60:Math.max(Math.min(g-n.timestamp,xe),1)),n.timestamp=g,n.isProcessing=!0,a.process(n),u.process(n),l.process(n),c.process(n),f.process(n),d.process(n),M.process(n),x.process(n),n.isProcessing=!1,s&&e&&(r=!1,t(m))},T=()=>{s=!0,r=!0,n.isProcessing||t(m)};return{schedule:J.reduce((v,g)=>{const y=o[g];return v[g]=(S,C=!1,b=!1)=>(s||T(),y.schedule(S,C,b)),v},{}),cancel:v=>{for(let g=0;g(H===void 0&&k.set(X.isProcessing||dt.useManualTiming?X.timestamp:performance.now()),H),set:t=>{H=t,queueMicrotask(Ae)}},Lt=t=>e=>typeof e=="string"&&e.startsWith(t),Ps=Lt("--"),Se=Lt("var(--"),De=t=>Se(t)?Fe.test(t.split("/*")[0].trim()):!1,Fe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ns(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const yt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},qt={...yt,transform:t=>U(0,1,t)},Rs={...yt,default:1},q=t=>Math.round(t*1e5)/1e5,Wt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function we(t){return t==null}const Ve=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bt=(t,e)=>s=>!!(typeof s=="string"&&Ve.test(s)&&s.startsWith(t)||e&&!we(s)&&Object.prototype.hasOwnProperty.call(s,e)),Bt=(t,e,s)=>r=>{if(typeof r!="string")return r;const[n,i,o,a]=r.match(Wt);return{[t]:parseFloat(n),[e]:parseFloat(i),[s]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ce=t=>U(0,255,t),rt={...yt,transform:t=>Math.round(Ce(t))},O={test:bt("rgb","red"),parse:Bt("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:r=1})=>"rgba("+rt.transform(t)+", "+rt.transform(e)+", "+rt.transform(s)+", "+q(qt.transform(r))+")"};function ke(t){let e="",s="",r="",n="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),r=t.substring(5,7),n=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),r=t.substring(3,4),n=t.substring(4,5),e+=e,s+=s,r+=r,n+=n),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(r,16),alpha:n?parseInt(n,16)/255:1}}const ut={test:bt("#"),parse:ke,transform:O.transform},z=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Os=z("deg"),W=z("%"),Us=z("px"),Ks=z("vh"),Gs=z("vw"),Ls={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(t*100)},G={test:bt("hsl","hue"),parse:Bt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:r=1})=>"hsla("+Math.round(t)+", "+W.transform(q(e))+", "+W.transform(q(s))+", "+q(qt.transform(r))+")"},I={test:t=>O.test(t)||ut.test(t)||G.test(t),parse:t=>O.test(t)?O.parse(t):G.test(t)?G.parse(t):ut.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?O.transform(t):G.transform(t),getAnimatableNone:t=>{const e=I.parse(t);return e.alpha=0,I.transform(e)}},Ie=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ee(t){var e,s;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Wt))==null?void 0:e.length)||0)+(((s=t.match(Ie))==null?void 0:s.length)||0)>0}const _t="number",jt="color",Pe="var",Ne="var(",At="${}",Re=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function j(t){const e=t.toString(),s=[],r={color:[],number:[],var:[]},n=[];let i=0;const a=e.replace(Re,u=>(I.test(u)?(r.color.push(i),n.push(jt),s.push(I.parse(u))):u.startsWith(Ne)?(r.var.push(i),n.push(Pe),s.push(u)):(r.number.push(i),n.push(_t),s.push(parseFloat(u))),++i,At)).split(At);return{values:s,split:a,indexes:r,types:n}}function Oe(t){return j(t).values}function $t({split:t,types:e}){const s=t.length;return r=>{let n="";for(let i=0;itypeof t=="number"?0:I.test(t)?I.getAnimatableNone(t):t,Ge=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:Ke(t);function Le(t){const e=j(t);return $t(e)(e.values.map((r,n)=>Ge(r,e.split[n])))}const qe={test:Ee,parse:Oe,createTransformer:Ue,getAnimatableNone:Le};function it(t,e,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+(e-t)*6*s:s<1/2?e:s<2/3?t+(e-t)*(2/3-s)*6:t}function We({hue:t,saturation:e,lightness:s,alpha:r}){t/=360,e/=100,s/=100;let n=0,i=0,o=0;if(!e)n=i=o=s;else{const a=s<.5?s*(1+e):s+e-s*e,u=2*s-a;n=it(u,a,t+1/3),i=it(u,a,t),o=it(u,a,t-1/3)}return{red:Math.round(n*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Q(t,e){return s=>s>0?e:t}const nt=(t,e,s)=>t+(e-t)*s,ot=(t,e,s)=>{const r=t*t,n=s*(e*e-r)+r;return n<0?0:Math.sqrt(n)},Be=[ut,O,G],_e=t=>Be.find(e=>e.test(t));function St(t){const e=_e(t);if(!e)return!1;let s=e.parse(t);return e===G&&(s=We(s)),s}const Dt=(t,e)=>{const s=St(t),r=St(e);if(!s||!r)return Q(t,e);const n={...s};return i=>(n.red=ot(s.red,r.red,i),n.green=ot(s.green,r.green,i),n.blue=ot(s.blue,r.blue,i),n.alpha=nt(s.alpha,r.alpha,i),O.transform(n))},lt=new Set(["none","hidden"]);function je(t,e){return lt.has(t)?s=>s<=0?t:e:s=>s>=1?e:t}function $e(t,e){return s=>nt(t,e,s)}function vt(t){return typeof t=="number"?$e:typeof t=="string"?De(t)?Q:I.test(t)?Dt:Je:Array.isArray(t)?zt:typeof t=="object"?I.test(t)?Dt:ze:Q}function zt(t,e){const s=[...t],r=s.length,n=t.map((i,o)=>vt(i)(i,e[o]));return i=>{for(let o=0;o{for(const i in r)s[i]=r[i](n);return s}}function Ze(t,e){const s=[],r={color:0,var:0,number:0};for(let n=0;n{const s=qe.createTransformer(e),r=j(t),n=j(e);return r.indexes.var.length===n.indexes.var.length&&r.indexes.color.length===n.indexes.color.length&&r.indexes.number.length>=n.indexes.number.length?lt.has(t)&&!n.values.length||lt.has(e)&&!r.values.length?je(t,e):pt(zt(Ze(r,n),n.values),s):Q(t,e)};function Zt(t,e,s){return typeof t=="number"&&typeof e=="number"&&typeof s=="number"?nt(t,e,s):vt(t)(t,e)}const He=t=>{const e=({timestamp:s})=>t(s);return{start:(s=!0)=>st.update(e,s),stop:()=>Gt(e),now:()=>X.isProcessing?X.timestamp:k.now()}},Xe=(t,e,s=10)=>{let r="";const n=Math.max(Math.round(e/s),2);for(let i=0;i=Y?1/0:e}function Qe(t,e=100,s){const r=s({...t,keyframes:[0,e]}),n=Math.min(Tt(r),Y);return{type:"keyframes",ease:i=>r.next(n*i).value/e,duration:N(n)}}const A={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ft(t,e){return t*Math.sqrt(1-e*e)}const Ye=12;function ts(t,e,s){let r=s;for(let n=1;n{const c=l*o,f=c*t,d=c-s,M=ft(l,o),x=Math.exp(-f);return at-d/M*x},i=l=>{const f=l*o*t,d=f*s+s,M=Math.pow(o,2)*Math.pow(l,2)*t,x=Math.exp(-f),m=ft(Math.pow(l,2),o);return(-n(l)+at>0?-1:1)*((d-M)*x)/m}):(n=l=>{const c=Math.exp(-l*t),f=(l-s)*t+1;return-at+c*f},i=l=>{const c=Math.exp(-l*t),f=(s-l)*(t*t);return c*f});const a=5/t,u=ts(n,i,a);if(t=L(t),isNaN(u))return{stiffness:A.stiffness,damping:A.damping,duration:t};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:o*2*Math.sqrt(r*l),duration:t}}}const ss=["duration","bounce"],ns=["stiffness","damping","mass"];function Ft(t,e){return e.some(s=>t[s]!==void 0)}function rs(t){let e={velocity:A.velocity,stiffness:A.stiffness,damping:A.damping,mass:A.mass,isResolvedFromDuration:!1,...t};if(!Ft(t,ns)&&Ft(t,ss))if(e.velocity=0,t.visualDuration){const s=t.visualDuration,r=2*Math.PI/(s*1.2),n=r*r,i=2*U(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:A.mass,stiffness:n,damping:i}}else{const s=es({...t,velocity:0});e={...e,...s,mass:A.mass},e.isResolvedFromDuration=!0}return e}function tt(t=A.visualDuration,e=A.bounce){const s=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:n}=s;const i=s.keyframes[0],o=s.keyframes[s.keyframes.length-1],a={done:!1,value:i},{stiffness:u,damping:l,mass:c,duration:f,velocity:d,isResolvedFromDuration:M}=rs({...s,velocity:-N(s.velocity||0)}),x=d||0,m=l/(2*Math.sqrt(u*c)),T=o-i,p=N(Math.sqrt(u/c)),w=Math.abs(T)<5;r||(r=w?A.restSpeed.granular:A.restSpeed.default),n||(n=w?A.restDelta.granular:A.restDelta.default);let v,g,y,S,C,b;if(m<1)y=ft(p,m),S=(x+m*p*T)/y,v=h=>{const D=Math.exp(-m*p*h);return o-D*(S*Math.sin(y*h)+T*Math.cos(y*h))},C=m*p*S+T*y,b=m*p*T-S*y,g=h=>Math.exp(-m*p*h)*(C*Math.sin(y*h)+b*Math.cos(y*h));else if(m===1){v=D=>o-Math.exp(-p*D)*(T+(x+p*T)*D);const h=x+p*T;g=D=>Math.exp(-p*D)*(p*h*D-x)}else{const h=p*Math.sqrt(m*m-1);v=P=>{const K=Math.exp(-m*p*P),R=Math.min(h*P,300);return o-K*((x+m*p*T)*Math.sinh(R)+h*T*Math.cosh(R))/h};const D=(x+m*p*T)/h,E=m*p*D-T*h,Z=m*p*T-D*h;g=P=>{const K=Math.exp(-m*p*P),R=Math.min(h*P,300);return K*(E*Math.sinh(R)+Z*Math.cosh(R))}}const V={calculatedDuration:M&&f||null,velocity:h=>L(g(h)),next:h=>{if(!M&&m<1){const E=Math.exp(-m*p*h),Z=Math.sin(y*h),P=Math.cos(y*h),K=o-E*(S*Z+T*P),R=L(E*(C*Z+b*P));return a.done=Math.abs(R)<=r&&Math.abs(o-K)<=n,a.value=a.done?o:K,a}const D=v(h);if(M)a.done=h>=f;else{const E=L(g(h));a.done=Math.abs(E)<=r&&Math.abs(o-D)<=n}return a.value=a.done?o:D,a},toString:()=>{const h=Math.min(Tt(V),Y),D=Xe(E=>V.next(h*E).value,h,30);return h+"ms "+D},toTransition:()=>{}};return V}tt.applyToOptions=t=>{const e=Qe(t,100,tt);return t.ease=e.ease,t.duration=L(e.duration),t.type="keyframes",t};const is=5;function Jt(t,e,s){const r=Math.max(e-is,0);return Pt(s-t(r),e-r)}function ht({keyframes:t,velocity:e=0,power:s=.8,timeConstant:r=325,bounceDamping:n=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const f=t[0],d={done:!1,value:f},M=b=>a!==void 0&&bu,x=b=>a===void 0?u:u===void 0||Math.abs(a-b)-m*Math.exp(-b/r),v=b=>p+w(b),g=b=>{const V=w(b),h=v(b);d.done=Math.abs(V)<=l,d.value=d.done?p:h};let y,S;const C=b=>{M(d.value)&&(y=b,S=tt({keyframes:[d.value,x(d.value)],velocity:Jt(v,b,d.value),damping:n,stiffness:i,restDelta:l,restSpeed:c}))};return C(0),{calculatedDuration:null,next:b=>{let V=!1;return!S&&y===void 0&&(V=!0,g(b),C(b)),y!==void 0&&b>=y?S.next(b-y):(!V&&g(b),d)}}}function os(t,e,s){const r=[],n=s||dt.mix||Zt,i=t.length-1;for(let o=0;oe[0];if(i===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=os(e,r,n),u=a.length,l=c=>{if(o&&c1)for(;fl(U(t[0],t[i-1],c)):l}function as(t,e){const s=t[t.length-1];for(let r=1;r<=e;r++){const n=Et(0,e,r);t.push(nt(s,1,n))}}function cs(t){const e=[0];return as(e,t.length-1),e}function us(t,e){return t.map(s=>s*e)}function ls(t,e){return t.map(()=>e||Kt).splice(0,t.length-1)}function B({duration:t=300,keyframes:e,times:s,ease:r="easeInOut"}){const n=ge(r)?r.map(Mt):Mt(r),i={done:!1,value:e[0]},o=us(s&&s.length===e.length?s:cs(e),t),a=Ht(o,e,{ease:Array.isArray(n)?n:ls(e,n)});return{calculatedDuration:t,next:u=>(i.value=a(u),i.done=u>=t,i)}}const fs=t=>t!==null;function hs(t,{repeat:e,repeatType:s="loop"},r,n=1){const i=t.filter(fs),a=n<0||e&&s!=="loop"&&e%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const ds={decay:ht,inertia:ht,tween:B,keyframes:B,spring:tt};function ps(t){typeof t.type=="string"&&(t.type=ds[t.type])}class ms{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,s){return this.finished.then(e,s)}}const gs=t=>t/100;class ys extends ms{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,n;const{motionValue:s}=this.options;s&&s.updatedAt!==k.now()&&this.tick(k.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(n=(r=this.options).onStop)==null||n.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;ps(e);const{type:s=B,repeat:r=0,repeatDelay:n=0,repeatType:i,velocity:o=0}=e;let{keyframes:a}=e;const u=s||B;u!==B&&typeof a[0]!="number"&&(this.mixKeyframes=pt(gs,Zt(a[0],a[1])),a=[0,100]);const l=u({...e,keyframes:a});i==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=Tt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=l}updateTime(e){const s=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(e,s=!1){const{generator:r,totalDuration:n,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:M,type:x,onUpdate:m,finalKeyframe:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),s?this.currentTime=e:this.updateTime(e);const p=this.currentTime-l*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?p<0:p>n;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let v=this.currentTime,g=r;if(f){const b=Math.min(this.currentTime,n)/a;let V=Math.floor(b),h=b%1;!h&&b>=1&&(h=1),h===1&&V--,V=Math.min(V,f+1),!!(V%2)&&(d==="reverse"?(h=1-h,M&&(h-=M/a)):d==="mirror"&&(g=o)),v=U(0,1,h)*a}let y;w?(this.delayState.value=c[0],y=this.delayState):y=g.next(v),i&&!w&&(y.value=i(y.value));let{done:S}=y;!w&&u!==null&&(S=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return C&&x!==ht&&(y.value=hs(c,this.options,T,this.speed)),m&&m(y.value),C&&this.finish(),y}then(e,s){return this.finished.then(e,s)}get duration(){return N(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+N(e)}get time(){return N(this.currentTime)}set time(e){e=L(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const s=this.generator.next(e).value;return Jt(r=>this.generator.next(r).value,e,s)}get speed(){return this.playbackSpeed}set speed(e){const s=this.playbackSpeed!==e;s&&this.driver&&this.updateTime(k.now()),this.playbackSpeed=e,s&&this.driver&&(this.time=N(this.currentTime))}play(){var n,i;if(this.isStopped)return;const{driver:e=He,startTime:s}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(i=(n=this.options).onPlay)==null||i.call(n);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=s??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(k.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(e=this.options).onComplete)==null||s.call(e)}cancel(){var e,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(e=this.options).onCancel)==null||s.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),e.observe(this)}}const wt=30,bs=t=>!isNaN(parseFloat(t)),_={current:void 0};class vs{constructor(e,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const n=k.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=s.owner}setCurrent(e){this.current=e,this.updatedAt=k.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=bs(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,s){this.events[e]||(this.events[e]=new oe);const r=this.events[e].add(s);return e==="change"?()=>{r(),st.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,s){this.passiveEffect=e,this.stopPassiveEffect=s}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,s,r){this.set(s),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,s=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return _.current&&_.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=k.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>wt)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,wt);return Pt(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(e){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=e(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,s;(e=this.dependents)==null||e.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ts(t,e){return new vs(t,e)}const Xt=t=>!!(t&&t.getVelocity);function xs(t,e,s){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const n=document.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t).filter(r=>r!=null)}function Ms(...t){const e=!Array.isArray(t[0]),s=e?0:-1,r=t[0+s],n=t[1+s],i=t[2+s],o=t[3+s],a=Ht(n,i,o);return e?a(r):a}function As(t,e,s={}){const r=t.get();let n=null,i=r,o;const a=typeof r=="string"?r.replace(/[\d.-]/g,""):void 0,u=()=>{n&&(n.stop(),n=null),t.animation=void 0},l=()=>{const f=Vt(t.get()),d=Vt(i);if(f===d){u();return}const M=n?n.getGeneratorVelocity():t.getVelocity();u(),n=new ys({keyframes:[f,d],velocity:M,type:"spring",restDelta:.001,restSpeed:.01,...s,onUpdate:o})},c=()=>{var f;l(),t.animation=n??void 0,(f=t.events.animationStart)==null||f.notify(),n==null||n.then(()=>{var d;t.animation=void 0,(d=t.events.animationComplete)==null||d.notify()})};if(t.attach((f,d)=>{i=f,o=M=>d(ct(M,a)),st.postRender(c)},u),Xt(e)){let f=s.skipInitialAnimation===!0;const d=e.on("change",x=>{f?(f=!1,t.jump(ct(x,a),!1)):t.set(ct(x,a))}),M=t.on("destroy",d);return()=>{d(),M()}}return u}function ct(t,e){return e?t+e:t}function Vt(t){return typeof t=="number"?t:parseFloat(t)}const Qt=F.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function xt(t){const e=kt(()=>Ts(t)),{isStatic:s}=F.useContext(Qt);if(s){const[,r]=F.useState(t);F.useEffect(()=>e.on("change",r),[])}return e}function Yt(t,e){const s=xt(e()),r=()=>s.set(e());return r(),se(()=>{const n=()=>st.preRender(r,!1,!0),i=t.map(o=>o.on("change",n));return()=>{i.forEach(o=>o()),Gt(r)}}),s}function Ss(t){_.current=[],t();const e=Yt(_.current,t);return _.current=void 0,e}function Ds(t,e,s,r){if(typeof t=="function")return Ss(t);const i=typeof e=="function"?e:Ms(e,s,r),o=Array.isArray(t)?Ct(t,i):Ct([t],([u])=>i(u)),a=Array.isArray(t)?void 0:t.accelerate;return a&&!a.isTransformed&&typeof e!="function"&&Array.isArray(s)&&(r==null?void 0:r.clamp)!==!1&&(o.accelerate={...a,times:e,keyframes:s,isTransformed:!0}),o}function Ct(t,e){const s=kt(()=>[]);return Yt(t,()=>{s.length=0;const r=t.length;for(let n=0;nXt(t)?t.get():t;if(s)return Ds(r);const n=xt(r());return F.useInsertionEffect(()=>As(n,t,e),[n,JSON.stringify(e)]),n}function ws(t,e={}){return Fs(t,{type:"spring",...e})}const Vs={some:0,all:1};function Cs(t,e,{root:s,margin:r,amount:n="some"}={}){const i=xs(t),o=new WeakMap,a=l=>{l.forEach(c=>{const f=o.get(c.target);if(c.isIntersecting!==!!f)if(c.isIntersecting){const d=e(c.target,c);typeof d=="function"?o.set(c.target,d):u.unobserve(c.target)}else typeof f=="function"&&(f(c),o.delete(c.target))})},u=new IntersectionObserver(a,{root:s,rootMargin:r,threshold:typeof n=="number"?n:Vs[n]});return i.forEach(l=>u.observe(l)),()=>u.disconnect()}function ks(t,{root:e,margin:s,amount:r,once:n=!1,initial:i=!1}={}){const[o,a]=F.useState(i);return F.useEffect(()=>{if(!t.current||n&&o)return;const u=()=>(a(!0),n?void 0:()=>a(!1)),l={root:e&&e.current||void 0,margin:s,amount:r};return Cs(t.current,u,l)},[e,t,s,n,r]),o}function qs({to:t,from:e=0,direction:s="up",delay:r=0,duration:n=2,className:i="",startWhen:o=!0,separator:a="",onStart:u,onEnd:l}){const c=F.useRef(null),f=xt(s==="down"?t:e),d=20+40*(1/n),M=100*(1/n),x=ws(f,{damping:d,stiffness:M}),m=ks(c,{once:!0,margin:"0px"}),T=v=>{const g=v.toString();if(g.includes(".")){const y=g.split(".")[1];if(parseInt(y)!==0)return y.length}return 0},p=Math.max(T(e),T(t)),w=F.useCallback(v=>{const g=p>0,y={useGrouping:!!a,minimumFractionDigits:g?p:0,maximumFractionDigits:g?p:0},S=Intl.NumberFormat("en-US",y).format(v);return a?S.replace(/,/g,a):S},[p,a]);return F.useEffect(()=>{c.current&&(c.current.textContent=w(s==="down"?t:e))},[e,t,s,w]),F.useEffect(()=>{if(m&&o){typeof u=="function"&&u();const v=setTimeout(()=>{f.set(s==="down"?e:t)},r*1e3),g=setTimeout(()=>{typeof l=="function"&&l()},r*1e3+n*1e3);return()=>{clearTimeout(v),clearTimeout(g)}}},[m,o,f,s,e,t,r,u,l,n]),F.useEffect(()=>{const v=x.on("change",g=>{c.current&&(c.current.textContent=w(g))});return()=>v()},[x,w]),te.jsx("span",{className:i,ref:c})}export{qt as A,Rs as B,I as C,j as D,Ns as E,Me as F,xs as G,Gt as H,nt as I,ys as J,Ps as K,Et as L,dt as M,he as N,ne as O,re as P,X as Q,Es as R,oe as S,kt as T,Qt as U,se as V,ms as W,pt as X,xt as Y,Ds as Z,qs as _,It as a,hs as b,et as c,de as d,le as e,st as f,Xe as g,fe as h,ye as i,U as j,qe as k,De as l,N as m,yt as n,Ts as o,Us as p,Xt as q,ps as r,L as s,k as t,W as u,Os as v,Gs as w,Ks as x,Wt as y,Ls as z}; diff --git a/dist/assets/CountUp-DKNTcuWU.js b/dist/assets/CountUp-DKNTcuWU.js new file mode 100644 index 0000000..60862dd --- /dev/null +++ b/dist/assets/CountUp-DKNTcuWU.js @@ -0,0 +1 @@ +import{r as S,j as Qt}from"./index-ClhW4pXr.js";function kt(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const Yt=typeof window<"u",te=Yt?S.useLayoutEffect:S.useEffect;function ee(t,e){t.indexOf(e)===-1&&t.push(e)}function ne(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const U=(t,e,n)=>n>e?e:n{};const ft={},Y=t=>t,se=(t,e)=>n=>e(t(n)),ht=(...t)=>t.reduce(se),Vt=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class re{constructor(){this.subscriptions=[]}add(e){return ee(this.subscriptions,e),()=>ne(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;it*1e3,P=t=>t/1e3;function It(t,e){return e?t*(1e3/e):0}const Et=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ie=1e-7,oe=12;function ae(t,e,n,r,s){let i,o,a=0;do o=e+(n-e)/2,i=Et(o,r,s)-t,i>0?n=o:e=o;while(Math.abs(i)>ie&&++aae(i,0,1,t,n);return i=>i===0||i===1?i:Et(s(i),e,r)}const Rt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Pt=t=>e=>1-t(1-e),Nt=j(.33,1.53,.69,.99),dt=Pt(Nt),ce=Rt(dt),ue=t=>t>=1?1:(t*=2)<1?.5*dt(t):.5*(2-Math.pow(2,-10*(t-1))),pt=t=>1-Math.sin(Math.acos(t)),le=Pt(pt),fe=Rt(pt),he=j(.42,0,1,1),de=j(0,0,.58,1),Ot=j(.42,0,.58,1),pe=t=>Array.isArray(t)&&typeof t[0]!="number",me=t=>Array.isArray(t)&&typeof t[0]=="number",ge={linear:Y,easeIn:he,easeInOut:Ot,easeOut:de,circIn:pt,circInOut:fe,circOut:le,backIn:dt,backInOut:ce,backOut:Nt,anticipate:ue},ye=t=>typeof t=="string",Tt=t=>{if(me(t)){Ct(t.length===4);const[e,n,r,s]=t;return j(e,n,r,s)}else if(ye(t))return ge[t];return t},z=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function be(t,e){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(c){o.has(c)&&(l.schedule(c),t()),c(a)}const l={schedule:(c,f=!1,d=!1)=>{const x=d&&s?n:r;return f&&o.add(c),x.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,s){i=!0;return}s=!0;const f=n;n=r,r=f,n.forEach(u),n.clear(),s=!1,i&&(i=!1,l.process(c))}};return l}const Te=40;function ve(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=z.reduce((T,g)=>(T[g]=be(i),T),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:c,update:f,preRender:d,render:M,postRender:x}=o,m=()=>{const T=ft.useManualTiming,g=T?s.timestamp:performance.now();n=!1,T||(s.delta=r?1e3/60:Math.max(Math.min(g-s.timestamp,Te),1)),s.timestamp=g,s.isProcessing=!0,a.process(s),u.process(s),l.process(s),c.process(s),f.process(s),d.process(s),M.process(s),x.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(m))},v=()=>{n=!0,r=!0,s.isProcessing||t(m)};return{schedule:z.reduce((T,g)=>{const y=o[g];return T[g]=(D,C=!1,b=!1)=>(n||v(),y.schedule(D,C,b)),T},{}),cancel:T=>{for(let g=0;g(Z===void 0&&V.set(J.isProcessing||ft.useManualTiming?J.timestamp:performance.now()),Z),set:t=>{Z=t,queueMicrotask(xe)}},Me=t=>e=>typeof e=="string"&&e.startsWith(t),Ae=Me("var(--"),De=t=>Ae(t)?Fe.test(t.split("/*")[0].trim()):!1,Fe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Kt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Gt={...Kt,transform:t=>U(0,1,t)},q=t=>Math.round(t*1e5)/1e5,Lt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Se(t){return t==null}const we=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mt=(t,e)=>n=>!!(typeof n=="string"&&we.test(n)&&n.startsWith(t)||e&&!Se(n)&&Object.prototype.hasOwnProperty.call(n,e)),qt=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Lt);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ke=t=>U(0,255,t),nt={...Kt,transform:t=>Math.round(ke(t))},O={test:mt("rgb","red"),parse:qt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+nt.transform(t)+", "+nt.transform(e)+", "+nt.transform(n)+", "+q(Gt.transform(r))+")"};function Ce(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const at={test:mt("#"),parse:Ce,transform:O.transform},Ve=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),vt=Ve("%"),G={test:mt("hsl","hue"),parse:qt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+vt.transform(q(e))+", "+vt.transform(q(n))+", "+q(Gt.transform(r))+")"},I={test:t=>O.test(t)||at.test(t)||G.test(t),parse:t=>O.test(t)?O.parse(t):G.test(t)?G.parse(t):at.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?O.transform(t):G.transform(t),getAnimatableNone:t=>{const e=I.parse(t);return e.alpha=0,I.transform(e)}},Ie=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ee(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Lt))==null?void 0:e.length)||0)+(((n=t.match(Ie))==null?void 0:n.length)||0)>0}const Wt="number",Bt="color",Re="var",Pe="var(",xt="${}",Ne=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function _(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=e.replace(Ne,u=>(I.test(u)?(r.color.push(i),s.push(Bt),n.push(I.parse(u))):u.startsWith(Pe)?(r.var.push(i),s.push(Re),n.push(u)):(r.number.push(i),s.push(Wt),n.push(parseFloat(u))),++i,xt)).split(xt);return{values:n,split:a,indexes:r,types:s}}function Oe(t){return _(t).values}function _t({split:t,types:e}){const n=t.length;return r=>{let s="";for(let i=0;itypeof t=="number"?0:I.test(t)?I.getAnimatableNone(t):t,Ge=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:Ke(t);function Le(t){const e=_(t);return _t(e)(e.values.map((r,s)=>Ge(r,e.split[s])))}const qe={test:Ee,parse:Oe,createTransformer:Ue,getAnimatableNone:Le};function st(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function We({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let s=0,i=0,o=0;if(!e)s=i=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,u=2*n-a;s=st(u,a,t+1/3),i=st(u,a,t),o=st(u,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function H(t,e){return n=>n>0?e:t}const et=(t,e,n)=>t+(e-t)*n,rt=(t,e,n)=>{const r=t*t,s=n*(e*e-r)+r;return s<0?0:Math.sqrt(s)},Be=[at,O,G],_e=t=>Be.find(e=>e.test(t));function Mt(t){const e=_e(t);if(!e)return!1;let n=e.parse(t);return e===G&&(n=We(n)),n}const At=(t,e)=>{const n=Mt(t),r=Mt(e);if(!n||!r)return H(t,e);const s={...n};return i=>(s.red=rt(n.red,r.red,i),s.green=rt(n.green,r.green,i),s.blue=rt(n.blue,r.blue,i),s.alpha=et(n.alpha,r.alpha,i),O.transform(s))},ct=new Set(["none","hidden"]);function je(t,e){return ct.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function $e(t,e){return n=>et(t,e,n)}function gt(t){return typeof t=="number"?$e:typeof t=="string"?De(t)?H:I.test(t)?At:Je:Array.isArray(t)?jt:typeof t=="object"?I.test(t)?At:ze:H}function jt(t,e){const n=[...t],r=n.length,s=t.map((i,o)=>gt(i)(i,e[o]));return i=>{for(let o=0;o{for(const i in r)n[i]=r[i](s);return n}}function Ze(t,e){const n=[],r={color:0,var:0,number:0};for(let s=0;s{const n=qe.createTransformer(e),r=_(t),s=_(e);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?ct.has(t)&&!s.values.length||ct.has(e)&&!r.values.length?je(t,e):ht(jt(Ze(r,s),s.values),n):H(t,e)};function $t(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?et(t,e,n):gt(t)(t,e)}const He=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>tt.update(e,n),stop:()=>Ut(e),now:()=>J.isProcessing?J.timestamp:V.now()}},Xe=(t,e,n=10)=>{let r="";const s=Math.max(Math.round(e/n),2);for(let i=0;i=X?1/0:e}function Qe(t,e=100,n){const r=n({...t,keyframes:[0,e]}),s=Math.min(yt(r),X);return{type:"keyframes",ease:i=>r.next(s*i).value/e,duration:P(s)}}const A={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ut(t,e){return t*Math.sqrt(1-e*e)}const Ye=12;function tn(t,e,n){let r=n;for(let s=1;s{const c=l*o,f=c*t,d=c-n,M=ut(l,o),x=Math.exp(-f);return it-d/M*x},i=l=>{const f=l*o*t,d=f*n+n,M=Math.pow(o,2)*Math.pow(l,2)*t,x=Math.exp(-f),m=ut(Math.pow(l,2),o);return(-s(l)+it>0?-1:1)*((d-M)*x)/m}):(s=l=>{const c=Math.exp(-l*t),f=(l-n)*t+1;return-it+c*f},i=l=>{const c=Math.exp(-l*t),f=(n-l)*(t*t);return c*f});const a=5/t,u=tn(s,i,a);if(t=L(t),isNaN(u))return{stiffness:A.stiffness,damping:A.damping,duration:t};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:o*2*Math.sqrt(r*l),duration:t}}}const nn=["duration","bounce"],sn=["stiffness","damping","mass"];function Dt(t,e){return e.some(n=>t[n]!==void 0)}function rn(t){let e={velocity:A.velocity,stiffness:A.stiffness,damping:A.damping,mass:A.mass,isResolvedFromDuration:!1,...t};if(!Dt(t,sn)&&Dt(t,nn))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*U(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:A.mass,stiffness:s,damping:i}}else{const n=en({...t,velocity:0});e={...e,...n,mass:A.mass},e.isResolvedFromDuration=!0}return e}function Q(t=A.visualDuration,e=A.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:u,damping:l,mass:c,duration:f,velocity:d,isResolvedFromDuration:M}=rn({...n,velocity:-P(n.velocity||0)}),x=d||0,m=l/(2*Math.sqrt(u*c)),v=o-i,p=P(Math.sqrt(u/c)),w=Math.abs(v)<5;r||(r=w?A.restSpeed.granular:A.restSpeed.default),s||(s=w?A.restDelta.granular:A.restDelta.default);let T,g,y,D,C,b;if(m<1)y=ut(p,m),D=(x+m*p*v)/y,T=h=>{const F=Math.exp(-m*p*h);return o-F*(D*Math.sin(y*h)+v*Math.cos(y*h))},C=m*p*D+v*y,b=m*p*v-D*y,g=h=>Math.exp(-m*p*h)*(C*Math.sin(y*h)+b*Math.cos(y*h));else if(m===1){T=F=>o-Math.exp(-p*F)*(v+(x+p*v)*F);const h=x+p*v;g=F=>Math.exp(-p*F)*(p*h*F-x)}else{const h=p*Math.sqrt(m*m-1);T=R=>{const K=Math.exp(-m*p*R),N=Math.min(h*R,300);return o-K*((x+m*p*v)*Math.sinh(N)+h*v*Math.cosh(N))/h};const F=(x+m*p*v)/h,E=m*p*F-v*h,$=m*p*v-F*h;g=R=>{const K=Math.exp(-m*p*R),N=Math.min(h*R,300);return K*(E*Math.sinh(N)+$*Math.cosh(N))}}const k={calculatedDuration:M&&f||null,velocity:h=>L(g(h)),next:h=>{if(!M&&m<1){const E=Math.exp(-m*p*h),$=Math.sin(y*h),R=Math.cos(y*h),K=o-E*(D*$+v*R),N=L(E*(C*$+b*R));return a.done=Math.abs(N)<=r&&Math.abs(o-K)<=s,a.value=a.done?o:K,a}const F=T(h);if(M)a.done=h>=f;else{const E=L(g(h));a.done=Math.abs(E)<=r&&Math.abs(o-F)<=s}return a.value=a.done?o:F,a},toString:()=>{const h=Math.min(yt(k),X),F=Xe(E=>k.next(h*E).value,h,30);return h+"ms "+F},toTransition:()=>{}};return k}Q.applyToOptions=t=>{const e=Qe(t,100,Q);return t.ease=e.ease,t.duration=L(e.duration),t.type="keyframes",t};const on=5;function zt(t,e,n){const r=Math.max(e-on,0);return It(n-t(r),e-r)}function lt({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const f=t[0],d={done:!1,value:f},M=b=>a!==void 0&&bu,x=b=>a===void 0?u:u===void 0||Math.abs(a-b)-m*Math.exp(-b/r),T=b=>p+w(b),g=b=>{const k=w(b),h=T(b);d.done=Math.abs(k)<=l,d.value=d.done?p:h};let y,D;const C=b=>{M(d.value)&&(y=b,D=Q({keyframes:[d.value,x(d.value)],velocity:zt(T,b,d.value),damping:s,stiffness:i,restDelta:l,restSpeed:c}))};return C(0),{calculatedDuration:null,next:b=>{let k=!1;return!D&&y===void 0&&(k=!0,g(b),C(b)),y!==void 0&&b>=y?D.next(b-y):(!k&&g(b),d)}}}function an(t,e,n){const r=[],s=n||ft.mix||$t,i=t.length-1;for(let o=0;oe[0];if(i===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=an(e,r,s),u=a.length,l=c=>{if(o&&c1)for(;fl(U(t[0],t[i-1],c)):l}function cn(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=Vt(0,e,r);t.push(et(n,1,s))}}function un(t){const e=[0];return cn(e,t.length-1),e}function ln(t,e){return t.map(n=>n*e)}function fn(t,e){return t.map(()=>e||Ot).splice(0,t.length-1)}function W({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=pe(r)?r.map(Tt):Tt(r),i={done:!1,value:e[0]},o=ln(n&&n.length===e.length?n:un(e),t),a=Zt(o,e,{ease:Array.isArray(s)?s:fn(e,s)});return{calculatedDuration:t,next:u=>(i.value=a(u),i.done=u>=t,i)}}const hn=t=>t!==null;function dn(t,{repeat:e,repeatType:n="loop"},r,s=1){const i=t.filter(hn),a=s<0||e&&n!=="loop"&&e%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const pn={decay:lt,inertia:lt,tween:W,keyframes:W,spring:Q};function mn(t){typeof t.type=="string"&&(t.type=pn[t.type])}class gn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const yn=t=>t/100;class bn extends gn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==V.now()&&this.tick(V.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;mn(e);const{type:n=W,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=e;let{keyframes:a}=e;const u=n||W;u!==W&&typeof a[0]!="number"&&(this.mixKeyframes=ht(yn,$t(a[0],a[1])),a=[0,100]);const l=u({...e,keyframes:a});i==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=yt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=l}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:M,type:x,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-l*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?p<0:p>s;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let T=this.currentTime,g=r;if(f){const b=Math.min(this.currentTime,s)/a;let k=Math.floor(b),h=b%1;!h&&b>=1&&(h=1),h===1&&k--,k=Math.min(k,f+1),!!(k%2)&&(d==="reverse"?(h=1-h,M&&(h-=M/a)):d==="mirror"&&(g=o)),T=U(0,1,h)*a}let y;w?(this.delayState.value=c[0],y=this.delayState):y=g.next(T),i&&!w&&(y.value=i(y.value));let{done:D}=y;!w&&u!==null&&(D=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return C&&x!==lt&&(y.value=dn(c,this.options,v,this.speed)),m&&m(y.value),C&&this.finish(),y}then(e,n){return this.finished.then(e,n)}get duration(){return P(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+P(e)}get time(){return P(this.currentTime)}set time(e){e=L(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return zt(r=>this.generator.next(r).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(V.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=P(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:e=He,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(V.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}const Ft=30,Tn=t=>!isNaN(parseFloat(t)),B={current:void 0};class vn{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=V.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=V.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Tn(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new re);const r=this.events[e].add(n);return e==="change"?()=>{r(),tt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return B.current&&B.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=V.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ft)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ft);return It(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xn(t,e){return new vn(t,e)}const Jt=t=>!!(t&&t.getVelocity);function Mn(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const s=document.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(r=>r!=null)}function An(...t){const e=!Array.isArray(t[0]),n=e?0:-1,r=t[0+n],s=t[1+n],i=t[2+n],o=t[3+n],a=Zt(s,i,o);return e?a(r):a}function Dn(t,e,n={}){const r=t.get();let s=null,i=r,o;const a=typeof r=="string"?r.replace(/[\d.-]/g,""):void 0,u=()=>{s&&(s.stop(),s=null),t.animation=void 0},l=()=>{const f=St(t.get()),d=St(i);if(f===d){u();return}const M=s?s.getGeneratorVelocity():t.getVelocity();u(),s=new bn({keyframes:[f,d],velocity:M,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:o})},c=()=>{var f;l(),t.animation=s??void 0,(f=t.events.animationStart)==null||f.notify(),s==null||s.then(()=>{var d;t.animation=void 0,(d=t.events.animationComplete)==null||d.notify()})};if(t.attach((f,d)=>{i=f,o=M=>d(ot(M,a)),tt.postRender(c)},u),Jt(e)){let f=n.skipInitialAnimation===!0;const d=e.on("change",x=>{f?(f=!1,t.jump(ot(x,a),!1)):t.set(ot(x,a))}),M=t.on("destroy",d);return()=>{d(),M()}}return u}function ot(t,e){return e?t+e:t}function St(t){return typeof t=="number"?t:parseFloat(t)}const Ht=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function bt(t){const e=kt(()=>xn(t)),{isStatic:n}=S.useContext(Ht);if(n){const[,r]=S.useState(t);S.useEffect(()=>e.on("change",r),[])}return e}function Xt(t,e){const n=bt(e()),r=()=>n.set(e());return r(),te(()=>{const s=()=>tt.preRender(r,!1,!0),i=t.map(o=>o.on("change",s));return()=>{i.forEach(o=>o()),Ut(r)}}),n}function Fn(t){B.current=[],t();const e=Xt(B.current,t);return B.current=void 0,e}function Sn(t,e,n,r){if(typeof t=="function")return Fn(t);const i=An(e,n,r),o=Array.isArray(t)?wt(t,i):wt([t],([u])=>i(u)),a=Array.isArray(t)?void 0:t.accelerate;return a&&!a.isTransformed&&typeof e!="function"&&Array.isArray(n)&&(r==null?void 0:r.clamp)!==!1&&(o.accelerate={...a,times:e,keyframes:n,isTransformed:!0}),o}function wt(t,e){const n=kt(()=>[]);return Xt(t,()=>{n.length=0;const r=t.length;for(let s=0;sJt(t)?t.get():t;if(n)return Sn(r);const s=bt(r());return S.useInsertionEffect(()=>Dn(s,t,e),[s,JSON.stringify(e)]),s}function kn(t,e={}){return wn(t,{type:"spring",...e})}const Cn={some:0,all:1};function Vn(t,e,{root:n,margin:r,amount:s="some"}={}){const i=Mn(t),o=new WeakMap,a=l=>{l.forEach(c=>{const f=o.get(c.target);if(c.isIntersecting!==!!f)if(c.isIntersecting){const d=e(c.target,c);typeof d=="function"?o.set(c.target,d):u.unobserve(c.target)}else typeof f=="function"&&(f(c),o.delete(c.target))})},u=new IntersectionObserver(a,{root:n,rootMargin:r,threshold:typeof s=="number"?s:Cn[s]});return i.forEach(l=>u.observe(l)),()=>u.disconnect()}function In(t,{root:e,margin:n,amount:r,once:s=!1,initial:i=!1}={}){const[o,a]=S.useState(i);return S.useEffect(()=>{if(!t.current||s&&o)return;const u=()=>(a(!0),s?void 0:()=>a(!1)),l={root:e&&e.current||void 0,margin:n,amount:r};return Vn(t.current,u,l)},[e,t,n,s,r]),o}function Rn({to:t,from:e=0,direction:n="up",delay:r=0,duration:s=2,className:i="",startWhen:o=!0,separator:a="",onStart:u,onEnd:l}){const c=S.useRef(null),f=bt(n==="down"?t:e),d=20+40*(1/s),M=100*(1/s),x=kn(f,{damping:d,stiffness:M}),m=In(c,{once:!0,margin:"0px"}),v=T=>{const g=T.toString();if(g.includes(".")){const y=g.split(".")[1];if(parseInt(y)!==0)return y.length}return 0},p=Math.max(v(e),v(t)),w=S.useCallback(T=>{const g=p>0,y={useGrouping:!!a,minimumFractionDigits:g?p:0,maximumFractionDigits:g?p:0},D=Intl.NumberFormat("en-US",y).format(T);return a?D.replace(/,/g,a):D},[p,a]);return S.useEffect(()=>{c.current&&(c.current.textContent=w(n==="down"?t:e))},[e,t,n,w]),S.useEffect(()=>{if(m&&o){typeof u=="function"&&u();const T=setTimeout(()=>{f.set(n==="down"?e:t)},r*1e3),g=setTimeout(()=>{typeof l=="function"&&l()},r*1e3+s*1e3);return()=>{clearTimeout(T),clearTimeout(g)}}},[m,o,f,n,e,t,r,u,l,s]),S.useEffect(()=>{const T=x.on("change",g=>{c.current&&(c.current.textContent=w(g))});return()=>T()},[x,w]),Qt.jsx("span",{className:i,ref:c})}export{Rn as C}; diff --git a/dist/assets/Dashboard-IbzjFIoV.js b/dist/assets/Dashboard-IbzjFIoV.js new file mode 100644 index 0000000..ff6dacf --- /dev/null +++ b/dist/assets/Dashboard-IbzjFIoV.js @@ -0,0 +1 @@ +import{u as y,r as o,j as e,Q as g,L as l,g as q,d as k,z as U}from"./index-ClhW4pXr.js";import{C as c}from"./CountUp-DKNTcuWU.js";import{u as w}from"./useTranslation-Pq_l7wMn.js";function L(){const{t:s}=w(),{user:a,refreshUser:u}=y(),[t,b]=o.useState(null),[r,n]=o.useState(""),[i,x]=o.useState(!1),m=async()=>{try{const d=await q();d.data.success&&b(d.data.data)}catch{}};o.useEffect(()=>{m()},[]);const j=async d=>{if(d.preventDefault(),!!r.trim()){x(!0);try{(await k(r.trim())).data.success&&(U.success(s("dashboard.redeemSuccess")),n(""),await Promise.all([m(),u()]))}catch{}x(!1)}},p=(t==null?void 0:t.quota)??(a==null?void 0:a.quota)??0,h=(t==null?void 0:t.used_quota)??(a==null?void 0:a.used_quota)??0,N=(t==null?void 0:t.request_count)??(a==null?void 0:a.request_count)??0,f=p/g;return e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"mb-8",children:[e.jsxs("h1",{className:"text-2xl font-heading font-bold text-page mb-1",children:[s("dashboard.welcome")," ",(a==null?void 0:a.display_name)||(a==null?void 0:a.username)||"User"]}),e.jsx("p",{className:"text-sm text-page-secondary",children:s("dashboard.manageDesc")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-10",children:[e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.balance")}),e.jsxs("div",{className:"text-3xl font-bold text-page",children:["$",e.jsx(c,{from:0,to:f,duration:1.5})]}),e.jsx("p",{className:"text-xs text-page-muted mt-1",children:s("dashboard.quotaUnits",{count:p.toLocaleString()})})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.used")}),e.jsxs("div",{className:"text-3xl font-bold text-page",children:["$",e.jsx(c,{from:0,to:h/g,duration:1.5})]}),e.jsx("p",{className:"text-xs text-page-muted mt-1",children:s("dashboard.quotaUnits",{count:h.toLocaleString()})})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.totalRequests")}),e.jsx("div",{className:"text-3xl font-bold text-page",children:e.jsx(c,{from:0,to:N,duration:1.5})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("dashboard.redeemCode")}),e.jsxs("form",{onSubmit:j,className:"flex gap-3",children:[e.jsx("input",{type:"text",value:r,onChange:d=>n(d.target.value),className:"input flex-1",placeholder:s("dashboard.enterCode")}),e.jsx("button",{type:"submit",disabled:i,className:"btn-primary whitespace-nowrap",children:s(i?"dashboard.redeeming":"dashboard.redeem")})]})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("dashboard.quickLinks")}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs(l,{to:"/tokens",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-page-surface-hover transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-page group-hover:text-page-link transition-colors",children:s("dashboard.apiKeys")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("dashboard.manageKeys")})]}),e.jsxs(l,{to:"/packages",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-page-surface-hover transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-page group-hover:text-page-link transition-colors",children:s("dashboard.packages")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("dashboard.viewPlans")})]}),e.jsxs(l,{to:"/pricing",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-page-surface-hover transition-colors group",children:[e.jsx("p",{className:"text-sm font-medium text-page group-hover:text-page-link transition-colors",children:s("dashboard.pricing")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("dashboard.modelPrices")})]}),e.jsxs("div",{className:"glass-sm !rounded-xl px-4 py-3 opacity-50",children:[e.jsx("p",{className:"text-sm font-medium text-page",children:s("dashboard.apiDocs")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("dashboard.comingSoon")})]})]})]})]})]})}export{L as default}; diff --git a/dist/assets/Dashboard-elfJRGHo.js b/dist/assets/Dashboard-elfJRGHo.js deleted file mode 100644 index 254f702..0000000 --- a/dist/assets/Dashboard-elfJRGHo.js +++ /dev/null @@ -1 +0,0 @@ -import{r as T,j as S,u as Ci,Q as Xe,L as Wt,g as Ei,d as Di,z as Ri}from"./index-Cvtin-Z6.js";import{S as Kt}from"./SpotlightCard-a-a6koSS.js";import{n as Ve,p as g,f as b,g as Mi,i as Li,W as ss,a as ki,b as Ae,m as At,s as tt,c as G,d as ji,e as Bi,h as Ii,r as Fi,J as kt,t as lt,j as Ce,k as W,M as yt,l as is,o as ut,q as D,u as vt,v as z,w as Oi,x as Ni,y as Ui,z as Ye,A as ne,B as Pt,C as B,D as Wi,E as _e,F as Ki,G as os,H as X,S as rs,I as V,K as as,L as se,N as zi,O as ls,P as ie,Q as M,R as zt,T as $i,U as Ee,V as Hi,X as us,Y as Gi,Z as Xi,_ as $t}from"./CountUp-B7vSEX1I.js";import{u as Yi}from"./useTranslation-BeJE8l6a.js";const cs=T.createContext({}),De=T.createContext(null),hs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function fs(t){return typeof t=="object"&&t!==null}const ds=t=>/^0[^.\s]+$/u.test(t);function ms(t){let e;return()=>(e===void 0&&(e=t()),e)}function _i(t){for(let e=1;et*180/Math.PI,oe=t=>{const e=J(Math.atan2(t[1],t[0]));return re(e)},qi={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:oe,rotateZ:oe,skewX:t=>J(Math.atan(t[1])),skewY:t=>J(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},re=t=>(t=t%360,t<0&&(t+=360),t),qe=oe,Ze=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Qe=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Zi={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ze,scaleY:Qe,scale:t=>(Ze(t)+Qe(t))/2,rotateX:t=>re(J(Math.atan2(t[6],t[5]))),rotateY:t=>re(J(Math.atan2(-t[2],t[0]))),rotateZ:qe,rotate:qe,skewX:t=>J(Math.atan(t[4])),skewY:t=>J(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ae(t){return t.includes("scale")?1:0}function le(t,e){if(!t||t==="none")return ae(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Zi,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=qi,i=a}if(!i)return ae(e);const r=s[e],o=i[1].split(",").map(Ji);return typeof r=="function"?r(o):o[r]}const Qi=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return le(n,e)};function Ji(t){return parseFloat(t.trim())}const ct=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ht=new Set(ct),Je=t=>t===Ve||t===g,to=new Set(["x","y","z"]),eo=ct.filter(t=>!to.has(t));function no(t){const e=[];return eo.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const H={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>le(e,"x"),y:(t,{transform:e})=>le(e,"y")};H.translateX=H.x;H.translateY=H.y;const et=new Set;let ue=!1,ce=!1,he=!1;function ps(){if(ce){const t=Array.from(et).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=no(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}ce=!1,ue=!1,et.forEach(t=>t.complete(he)),et.clear()}function gs(){et.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ce=!0)})}function so(){he=!0,gs(),ps(),he=!1}class Re{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(et.add(this),ue||(ue=!0,b.read(gs),b.resolveKeyframes(ps))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i==null?void 0:i.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}_i(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),et.delete(this)}cancel(){this.state==="scheduled"&&(et.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const io=t=>t.startsWith("--");function ys(t,e,n){io(e)?t.style.setProperty(e,n):t.style[e]=n}const oo={};function vs(t,e){const n=ms(t);return()=>oo[e]??n()}const ro=vs(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),xs=vs(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),mt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,tn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mt([0,.65,.55,1]),circOut:mt([.55,0,1,.45]),backIn:mt([.31,.01,.66,-.59]),backOut:mt([.33,1.53,.69,.99])};function Ts(t,e){if(t)return typeof t=="function"?xs()?Mi(t,e):"ease-out":Li(t)?mt(t):Array.isArray(t)?t.map(n=>Ts(n,e)||tn.easeOut):tn[t]}function ao(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Ts(a,i);Array.isArray(h)&&(u.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function ws(t){return typeof t=="function"&&"applyToOptions"in t}function lo({type:t,...e}){return ws(t)&&xs()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ss extends ss{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,ki(typeof e.type!="string");const c=lo(e);this.animation=ao(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=Ae(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),ys(n,s,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,i;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(s=this.animation).commitStyles)==null||i.call(s))}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return At(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+At(e)}get time(){return At(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=tt(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&ro()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),G):i(this)}}const Ps={anticipate:Ii,backInOut:Bi,circInOut:ji};function uo(t){return t in Ps}function co(t){typeof t.ease=="string"&&uo(t.ease)&&(t.ease=Ps[t.ease])}const Ht=10;class ho extends Ss{constructor(e){co(e),Fi(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new kt({...o,autoplay:!1}),l=Math.max(Ht,lt.now()-this.startTime),c=Ce(0,Ht,l-Ht),u=a.sample(l).value,{name:h}=this.options;r&&h&&ys(r,h,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const en=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(W.test(t)||t==="0")&&!t.startsWith("url("));function fo(t){const e=t[0];if(t.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function xo(t){var h;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t;if(!(((h=e==null?void 0:e.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return vo()&&n&&(bs.has(n)||yo.has(n)&&go(a))&&(n!=="transform"||!u)&&!c&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const To=40;class wo extends ss{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){var m;super(),this.stop=()=>{var y,p;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(p=this.keyframeResolver)==null||p.cancel()},this.createdAt=lt.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u,...h},d=(u==null?void 0:u.KeyframeResolver)||Re;this.keyframeResolver=new d(a,(y,p,x)=>this.onKeyframesResolved(y,p,f,!x),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(e,n,s,i){var x,v;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=lt.now();let h=!0;mo(e,r,o,a)||(h=!1,(yt.instantAnimations||!l)&&(u==null||u(Ae(e,s,n))),e[0]=e[e.length-1],fe(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>To?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},m=h&&!c&&xo(d),y=(v=(x=d.motionValue)==null?void 0:x.owner)==null?void 0:v.current;let p;if(m)try{p=new ho({...d,element:y})}catch{p=new kt(d)}else p=new kt(d);p.finished.then(()=>{this.notifyFinished()}).catch(G),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),so()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function Vs(t,e,n,s=0,i=1){const r=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const So=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Po(t){const e=So.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function As(t,e,n=1){const[s,i]=Po(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return hs(o)?parseFloat(o):o}return is(i)?As(i,e,n+1):i}const bo={type:"spring",stiffness:500,damping:25,restSpeed:10},Vo=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ao={type:"keyframes",duration:.8},Co={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Eo=(t,{keyframes:e})=>e.length>2?Ao:ht.has(t)?t.startsWith("scale")?Vo(e[1]):bo:Co;function Cs(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function Me(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?Cs(n,t):n}const Do=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Ro(t){for(const e in t)if(!Do.has(e))return!0;return!1}const Le=(t,e,n,s={},i,r)=>o=>{const a=Me(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-tt(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};Ro(a)||Object.assign(u,Eo(t,u)),u.duration&&(u.duration=tt(u.duration)),u.repeatDelay&&(u.repeatDelay=tt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(fe(u),u.delay===0&&(h=!0)),(yt.instantAnimations||yt.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,fe(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=Ae(u.keyframes,a);if(f!==void 0){b.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new kt(u):new wo(u)};function nn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function ke(t,e,n,s){if(typeof e=="function"){const[i,r]=nn(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=nn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function nt(t,e,n){const s=t.getProps();return ke(s,e,n!==void 0?n:s.custom,t)}const Es=new Set(["width","height","top","left","right","bottom",...ct]),de=t=>Array.isArray(t);function Mo(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ut(n))}function Lo(t){return de(t)?t[t.length-1]||0:t}function ko(t,e){const n=nt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Lo(r[o]);Mo(t,o,a)}}function jo(t){return!!(D(t)&&t.add)}function me(t,e){const n=t.getValue("willChange");if(jo(n))return n.add(e);if(!n&&yt.WillChange){const s=new yt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function je(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Bo="framerAppearId",Ds="data-"+je(Bo);function Rs(t){return t.props[Ds]}function Io({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Ms(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?Cs(r,l):l;const c=r==null?void 0:r.reduceMotion;s&&(r=s);const u=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const d=t.getValue(f,t.latestValues[f]??null),m=a[f];if(m===void 0||h&&Io(h,f))continue;const y={delay:n,...Me(r||{},f)},p=d.get();if(p!==void 0&&!d.isAnimating()&&!Array.isArray(m)&&m===p&&!y.velocity){b.update(()=>d.set(m));continue}let x=!1;if(window.MotionHandoffAnimation){const P=Rs(t);if(P){const C=window.MotionHandoffAnimation(P,f,b);C!==null&&(y.startTime=C,x=!0)}}me(t,f);const v=c??t.shouldReduceMotion;d.start(Le(f,d,m,v&&Es.has(f)?{type:!1}:y,t,x));const w=d.animation;w&&u.push(w)}if(o){const f=()=>b.update(()=>{o&&ko(t,o)});u.length?Promise.all(u).then(f):f()}return u}function pe(t,e,n={}){var l;const s=nt(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Ms(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:f}=i;return Fo(t,e,c,u,h,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[r,o]:[o,r];return c().then(()=>u())}else return Promise.all([r(),o(n.delay)])}function Fo(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(pe(l,e,{...o,delay:n+(typeof s=="function"?0:s)+Vs(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Oo(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>pe(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=pe(t,e,n);else{const i=typeof e=="function"?nt(t,e,n.custom):e;s=Promise.all(Ms(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const No={test:t=>t==="auto",parse:t=>t},Ls=t=>e=>e.test(t),ks=[Ve,g,vt,z,Oi,Ni,No],sn=t=>ks.find(Ls(t));function Uo(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ds(t):!0}const Wo=new Set(["brightness","contrast","saturate","opacity"]);function Ko(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Ui)||[];if(!s)return t;const i=n.replace(s,"");let r=Wo.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const zo=/\b([a-z-]*)\(.*?\)/gu,ge={...W,getAnimatableNone:t=>{const e=t.match(zo);return e?e.map(Ko).join(" "):t}},ye={...W,getAnimatableNone:t=>{const e=W.parse(t);return W.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},on={...Ve,transform:Math.round},$o={rotate:z,rotateX:z,rotateY:z,rotateZ:z,scale:Pt,scaleX:Pt,scaleY:Pt,scaleZ:Pt,skew:z,skewX:z,skewY:z,distance:g,translateX:g,translateY:g,translateZ:g,x:g,y:g,z:g,perspective:g,transformPerspective:g,opacity:ne,originX:Ye,originY:Ye,originZ:g},Be={borderWidth:g,borderTopWidth:g,borderRightWidth:g,borderBottomWidth:g,borderLeftWidth:g,borderRadius:g,borderTopLeftRadius:g,borderTopRightRadius:g,borderBottomRightRadius:g,borderBottomLeftRadius:g,width:g,maxWidth:g,height:g,maxHeight:g,top:g,right:g,bottom:g,left:g,inset:g,insetBlock:g,insetBlockStart:g,insetBlockEnd:g,insetInline:g,insetInlineStart:g,insetInlineEnd:g,padding:g,paddingTop:g,paddingRight:g,paddingBottom:g,paddingLeft:g,paddingBlock:g,paddingBlockStart:g,paddingBlockEnd:g,paddingInline:g,paddingInlineStart:g,paddingInlineEnd:g,margin:g,marginTop:g,marginRight:g,marginBottom:g,marginLeft:g,marginBlock:g,marginBlockStart:g,marginBlockEnd:g,marginInline:g,marginInlineStart:g,marginInlineEnd:g,fontSize:g,backgroundPositionX:g,backgroundPositionY:g,...$o,zIndex:on,fillOpacity:ne,strokeOpacity:ne,numOctaves:on},Ho={...Be,color:B,backgroundColor:B,outlineColor:B,fill:B,stroke:B,borderColor:B,borderTopColor:B,borderRightColor:B,borderBottomColor:B,borderLeftColor:B,filter:ge,WebkitFilter:ge,mask:ye,WebkitMask:ye},js=t=>Ho[t],Go=new Set([ge,ye]);function Bs(t,e){let n=js(t);return Go.has(n)||(n=W),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Xo=new Set(["auto","none","0"]);function Yo(t,e,n){let s=0,i;for(;s{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Is=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function qo(t){return fs(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Ie}=Ki(queueMicrotask,!1),I={x:!1,y:!1};function Fs(){return I.x||I.y}function Zo(t){return t==="x"||t==="y"?I[t]?null:(I[t]=!0,()=>{I[t]=!1}):I.x||I.y?null:(I.x=I.y=!0,()=>{I.x=I.y=!1})}function Os(t,e){const n=os(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Qo(t){return!(t.pointerType==="touch"||Fs())}function Jo(t,e,n={}){const[s,i,r]=Os(t,n);return s.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",m)},h=p=>{c&&(c(p),c=void 0),u()},f=p=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(p))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},m=p=>{if(p.pointerType!=="touch"){if(a){l=!0;return}h(p)}},y=p=>{if(!Qo(p))return;l=!1;const x=e(o,p);typeof x=="function"&&(c=x,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",d,i)}),r}const Ns=(t,e)=>e?t===e?!0:Ns(t,e.parentElement):!1,Fe=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,tr=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function er(t){return tr.has(t.tagName)||t.isContentEditable===!0}const nr=new Set(["INPUT","SELECT","TEXTAREA"]);function sr(t){return nr.has(t.tagName)||t.isContentEditable===!0}const Ct=new WeakSet;function rn(t){return e=>{e.key==="Enter"&&t(e)}}function Gt(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const ir=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=rn(()=>{if(Ct.has(n))return;Gt(n,"down");const i=rn(()=>{Gt(n,"up")}),r=()=>Gt(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function an(t){return Fe(t)&&!Fs()}const ln=new WeakSet;function or(t,e,n={}){const[s,i,r]=Os(t,n),o=a=>{const l=a.currentTarget;if(!an(a)||ln.has(a))return;Ct.add(l),n.stopPropagation&&ln.add(a);const c=e(l,a),u=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Ct.has(l)&&Ct.delete(l),an(d)&&typeof c=="function"&&c(d,{success:m})},h=d=>{u(d,l===window||l===document||n.useGlobalTarget||Ns(l,d.target))},f=d=>{u(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),qo(a)&&(a.addEventListener("focus",c=>ir(c,i)),!er(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Oe(t){return fs(t)&&"ownerSVGElement"in t}const Et=new WeakMap;let $;const Us=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Oe(s)&&"getBBox"in s?s.getBBox()[e]:s[n],rr=Us("inline","width","offsetWidth"),ar=Us("block","height","offsetHeight");function lr({target:t,borderBoxSize:e}){var n;(n=Et.get(t))==null||n.forEach(s=>{s(t,{get width(){return rr(t,e)},get height(){return ar(t,e)}})})}function ur(t){t.forEach(lr)}function cr(){typeof ResizeObserver>"u"||($=new ResizeObserver(ur))}function hr(t,e){$||cr();const n=os(t);return n.forEach(s=>{let i=Et.get(s);i||(i=new Set,Et.set(s,i)),i.add(e),$==null||$.observe(s)}),()=>{n.forEach(s=>{const i=Et.get(s);i==null||i.delete(e),i!=null&&i.size||$==null||$.unobserve(s)})}}const Dt=new Set;let rt;function fr(){rt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Dt.forEach(e=>e(t))},window.addEventListener("resize",rt)}function dr(t){return Dt.add(t),rt||fr(),()=>{Dt.delete(t),!Dt.size&&typeof rt=="function"&&(window.removeEventListener("resize",rt),rt=void 0)}}function un(t,e){return typeof t=="function"?dr(t):hr(t,e)}function mr(t){return Oe(t)&&t.tagName==="svg"}const pr=[...ks,B,W],gr=t=>pr.find(Ls(t)),cn=()=>({translate:0,scale:1,origin:0,originPoint:0}),at=()=>({x:cn(),y:cn()}),hn=()=>({min:0,max:0}),A=()=>({x:hn(),y:hn()}),yr=new WeakMap;function Ot(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function xt(t){return typeof t=="string"||Array.isArray(t)}const Ne=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ue=["initial",...Ne];function Nt(t){return Ot(t.animate)||Ue.some(e=>xt(t[e]))}function Ws(t){return!!(Nt(t)||t.variants)}function vr(t,e,n){for(const s in e){const i=e[s],r=n[s];if(D(i))t.addValue(s,i);else if(D(r))t.addValue(s,ut(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,ut(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ve={current:null},Ks={current:!1},xr=typeof window<"u";function Tr(){if(Ks.current=!0,!!xr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ve.current=t.matches;t.addEventListener("change",e),e()}else ve.current=!1}const fn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let jt={};function zs(t){jt=t}function wr(){return jt}class Sr{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Re,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=lt.now();this.renderScheduledAtthis.bindToMotionValue(r,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ks.current||Tr(),this.shouldReduceMotion=ve.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),X(this.notifyUpdate),X(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&bs.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,h=new Ss({element:this.current,name:e,keyframes:a,times:l,ease:c,duration:tt(u)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=ht.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&b.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in jt){const n=jt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):A()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=ut(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(hs(s)||ds(s))?s=parseFloat(s):!gr(s)&&W.test(n)&&(s=Bs(e,n)),this.setBaseTarget(e,D(s)?s.get():s)),D(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=ke(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!D(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new rs),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Ie.render(this.render)}}class $s extends Sr{constructor(){super(...arguments),this.KeyframeResolver=_o}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;D(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Y{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Hs({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Pr({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function br(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Xt(t){return t===void 0||t===1}function xe({scale:t,scaleX:e,scaleY:n}){return!Xt(t)||!Xt(e)||!Xt(n)}function Q(t){return xe(t)||Gs(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Gs(t){return dn(t.x)||dn(t.y)}function dn(t){return t&&t!=="0%"}function Bt(t,e,n){const s=t-n,i=e*s;return n+i}function mn(t,e,n,s,i){return i!==void 0&&(t=Bt(t,i,s)),Bt(t,n,s)+e}function Te(t,e=0,n=1,s,i){t.min=mn(t.min,e,n,s,i),t.max=mn(t.max,e,n,s,i)}function Xs(t,{x:e,y:n}){Te(t.x,e.translate,e.scale,e.originPoint),Te(t.y,n.translate,n.scale,n.originPoint)}const pn=.999999999999,gn=1.0000000000001;function Vr(t,e,n,s=!1){var a;const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let l=0;lpn&&(e.x=1),e.ypn&&(e.y=1)}function U(t,e){t.min+=e,t.max+=e}function yn(t,e,n,s,i=.5){const r=V(t.min,t.max,i);Te(t,e,n,r,s)}function vn(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Rt(t,e,n){const s=n??t;yn(t.x,vn(e.x,s.x),e.scaleX,e.scale,e.originX),yn(t.y,vn(e.y,s.y),e.scaleY,e.scale,e.originY)}function Ys(t,e){return Hs(br(t.getBoundingClientRect(),e))}function Ar(t,e,n){const s=Ys(t,n),{scroll:i}=e;return i&&(U(s.x,i.offset.x),U(s.y,i.offset.y)),s}const Cr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Er=ct.length;function Dr(t,e,n){let s="",i=!0;for(let r=0;r{if(!e.target)return t;if(typeof t=="string")if(g.test(t))t=parseFloat(t);else return t;const n=xn(t,e.target.x),s=xn(t,e.target.y);return`${n}% ${s}%`}},Rr={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=W.parse(t);if(i.length>5)return s;const r=W.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=V(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}},we={borderRadius:{...dt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:dt,borderTopRightRadius:dt,borderBottomLeftRadius:dt,borderBottomRightRadius:dt,boxShadow:Rr};function qs(t,{layout:e,layoutId:n}){return ht.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!we[t]||t==="opacity")}function Ke(t,e,n){var o;const s=t.style,i=e==null?void 0:e.style,r={};if(!s)return r;for(const a in s)(D(s[a])||i&&D(i[a])||qs(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=s[a]);return r}function Mr(t){return window.getComputedStyle(t)}class Lr extends $s{constructor(){super(...arguments),this.type="html",this.renderInstance=_s}readValueFromInstance(e,n){var s;if(ht.has(n))return(s=this.projection)!=null&&s.isProjecting?ae(n):Qi(e,n);{const i=Mr(e),r=(as(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ys(e,n)}build(e,n,s){We(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ke(e,n,s)}}const kr={offset:"stroke-dashoffset",array:"stroke-dasharray"},jr={offset:"strokeDashoffset",array:"strokeDasharray"};function Br(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?kr:jr;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const Ir=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Zs(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,c,u){if(We(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox);for(const d of Ir)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&Br(h,i,r,o,!1)}const Qs=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Js=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Fr(t,e,n,s){_s(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Qs.has(i)?i:je(i),e.attrs[i])}function ti(t,e,n){const s=Ke(t,e,n);for(const i in t)if(D(t[i])||D(e[i])){const r=ct.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class Or extends $s{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=A}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ht.has(n)){const s=js(n);return s&&s.default||0}return n=Qs.has(n)?n:je(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return ti(e,n,s)}build(e,n,s){Zs(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Fr(e,n,s,i)}mount(e){this.isSVGTag=Js(e.tagName),super.mount(e)}}const Nr=Ue.length;function ei(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ei(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;nPromise.all(e.map(({animation:n,options:s})=>Oo(t,n,s)))}function zr(t){let e=Kr(t),n=Tn(),s=!0,i=!1;const r=c=>(u,h)=>{var d;const f=nt(t,h,c==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:m,transitionEnd:y,...p}=f;u={...u,...p,...y}}return u};function o(c){e=c(t)}function a(c){const{props:u}=t,h=ei(t.parent)||{},f=[],d=new Set;let m={},y=1/0;for(let x=0;xy&&C,_=!1;const k=Array.isArray(P)?P:[P];let K=k.reduce(r(v),{});st===!1&&(K={});const{prevResolvedValues:ft={}}=w,Vi={...ft,...K},He=E=>{O=!0,d.has(E)&&(_=!0,d.delete(E)),w.needsAnimating[E]=!0;const L=t.getValue(E);L&&(L.liveStyle=!1)};for(const E in Vi){const L=K[E],q=ft[E];if(m.hasOwnProperty(E))continue;let it=!1;de(L)&&de(q)?it=!ni(L,q):it=L!==q,it?L!=null?He(E):d.add(E):L!==void 0&&d.has(E)?He(E):w.protectedKeys[E]=!0}w.prevProp=P,w.prevResolvedValues=K,w.isActive&&(m={...m,...K}),(s||i)&&t.blockInitialAnimation&&(O=!1);const Ge=F&&St;O&&(!Ge||_)&&f.push(...k.map(E=>{const L={type:v};if(typeof E=="string"&&(s||i)&&!Ge&&t.manuallyAnimateOnMount&&t.parent){const{parent:q}=t,it=nt(q,E);if(q.enteringChildren&&it){const{delayChildren:Ai}=it.transition||{};L.delay=Vs(q.enteringChildren,t,Ai)}}return{animation:E,options:L}}))}if(d.size){const x={};if(typeof u.initial!="boolean"){const v=nt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(x.transition=v.transition)}d.forEach(v=>{const w=t.getBaseTarget(v),P=t.getValue(v);P&&(P.liveStyle=!0),x[v]=w??null}),f.push({animation:x})}let p=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,i=!1,p?e(f):Promise.resolve()}function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var m;return(m=d.animationState)==null?void 0:m.setActive(c,u)}),n[c].isActive=u;const h=a(c);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Tn(),i=!0}}}function $r(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ni(e,t):!1}function Z(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tn(){return{animate:Z(!0),whileInView:Z(),whileHover:Z(),whileTap:Z(),whileDrag:Z(),whileFocus:Z(),exit:Z()}}function Se(t,e){t.min=e.min,t.max=e.max}function j(t,e){Se(t.x,e.x),Se(t.y,e.y)}function wn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const si=1e-4,Hr=1-si,Gr=1+si,ii=.01,Xr=0-ii,Yr=0+ii;function R(t){return t.max-t.min}function _r(t,e,n){return Math.abs(t-e)<=n}function Sn(t,e,n,s=.5){t.origin=s,t.originPoint=V(e.min,e.max,t.origin),t.scale=R(n)/R(e),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Hr&&t.scale<=Gr||isNaN(t.scale))&&(t.scale=1),(t.translate>=Xr&&t.translate<=Yr||isNaN(t.translate))&&(t.translate=0)}function pt(t,e,n,s){Sn(t.x,e.x,n.x,s?s.originX:void 0),Sn(t.y,e.y,n.y,s?s.originY:void 0)}function Pn(t,e,n,s=0){const i=s?V(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+R(e)}function qr(t,e,n,s){Pn(t.x,e.x,n.x,s==null?void 0:s.x),Pn(t.y,e.y,n.y,s==null?void 0:s.y)}function bn(t,e,n,s=0){const i=s?V(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+R(e)}function It(t,e,n,s){bn(t.x,e.x,n.x,s==null?void 0:s.x),bn(t.y,e.y,n.y,s==null?void 0:s.y)}function Vn(t,e,n,s,i){return t-=e,t=Bt(t,1/n,s),i!==void 0&&(t=Bt(t,1/i,s)),t}function Zr(t,e=0,n=1,s=.5,i,r=t,o=t){if(vt.test(e)&&(e=parseFloat(e),e=V(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=V(r.min,r.max,s);t===r&&(a-=e),t.min=Vn(t.min,e,n,a,i),t.max=Vn(t.max,e,n,a,i)}function An(t,e,[n,s,i],r,o){Zr(t,e[n],e[s],e[i],e.scale,r,o)}const Qr=["x","scaleX","originX"],Jr=["y","scaleY","originY"];function Cn(t,e,n,s){An(t.x,e,Qr,n?n.x:void 0,s?s.x:void 0),An(t.y,e,Jr,n?n.y:void 0,s?s.y:void 0)}function En(t){return t.translate===0&&t.scale===1}function oi(t){return En(t.x)&&En(t.y)}function Dn(t,e){return t.min===e.min&&t.max===e.max}function ta(t,e){return Dn(t.x,e.x)&&Dn(t.y,e.y)}function Rn(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ri(t,e){return Rn(t.x,e.x)&&Rn(t.y,e.y)}function Mn(t){return R(t.x)/R(t.y)}function Ln(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function N(t){return[t("x"),t("y")]}function ea(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const ai=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],na=ai.length,kn=t=>typeof t=="string"?parseFloat(t):t,jn=t=>typeof t=="number"||g.test(t);function sa(t,e,n,s,i,r){i?(t.opacity=V(0,n.opacity??1,ia(s)),t.opacityExit=V(e.opacity??1,0,oa(s))):r&&(t.opacity=V(e.opacity??1,n.opacity??1,s));for(let o=0;ose?1:n(se(t,e,s))}function ra(t,e,n){const s=D(t)?t:ut(t);return s.start(Le("",s,e,n)),s.animation}function Tt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const aa=(t,e)=>t.depth-e.depth;class la{constructor(){this.children=[],this.isDirty=!1}add(e){ls(this.children,e),this.isDirty=!0}remove(e){ie(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(aa),this.isDirty=!1,this.children.forEach(e)}}function ua(t,e){const n=lt.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(X(s),t(r-e))};return b.setup(s,!0),()=>X(s)}function Mt(t){return D(t)?t.get():t}class ca{constructor(){this.members=[]}add(e){ls(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(ie(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(ie(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){var n;for(let s=this.members.indexOf(e)-1;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(e,n){var i;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=s.options,{layoutDependency:o}=e.options;(r===void 0||r!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),(i=e.root)!=null&&i.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,s,i,r,o;(s=(n=e.options).onExitComplete)==null||s.call(n),(o=(i=e.resumingFrom)==null?void 0:(r=i.options).onExitComplete)==null||o.call(r)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const Lt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Yt=["","X","Y","Z"],ha=1e3;let fa=0;function _t(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function ui(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Rs(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",b,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&ui(s)}function ci({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=fa++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(pa),this.nodes.forEach(wa),this.nodes.forEach(Sa),this.nodes.forEach(ga)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;b.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,u&&u(),u=ua(f,250),Lt.hasAnimatedSinceResize&&(Lt.hasAnimatedSinceResize=!1,this.nodes.forEach(On)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||Ca,{onLayoutAnimationStart:y,onLayoutAnimationComplete:p}=c.getProps(),x=!this.targetLayout||!ri(this.targetLayout,d),v=!h&&f;if(this.options.layoutRoot||this.resumeFrom||v||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Me(m,"layout"),onPlay:y,onComplete:p};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,v)}else h||On(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),X(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Pa),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ui(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!R(this.snapshot.measuredBox.x)&&!R(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const C=P/1e3;Nn(h.x,o.x,C),Nn(h.y,o.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(It(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Va(this.relativeTarget,this.relativeTargetOrigin,f,C),w&&ta(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=A()),j(w,this.relativeTarget)),y&&(this.animationValues=u,sa(u,c,this.latestValues,C,v,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(X(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=b.update(()=>{Lt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ut(0)),this.motionValue.jump(0,!1),this.currentAnimation=ra(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ha),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&hi(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||A();const h=R(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=R(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}j(a,l),Rt(a,u),pt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ca),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&_t("z",o,c,this.animationValues);for(let u=0;u{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(In),this.root.sharedNodes.clear()}}}function da(t){t.updateLayout()}function ma(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;if(r==="size")N(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=R(f);f.min=s[h].min,f.max=f.min+d});else if(r==="x"||r==="y"){const h=r==="x"?"y":"x";Se(o?e.measuredBox[h]:e.layoutBox[h],s[h])}else hi(r,e.layoutBox,s)&&N(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=R(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=at();pt(a,s,e.layoutBox);const l=at();o?pt(l,t.applyTransform(i,!0),e.measuredBox):pt(l,s,e.layoutBox);const c=!oi(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=t.options.layoutAnchor||void 0,y=A();It(y,e.layoutBox,f.layoutBox,m);const p=A();It(p,s,d.layoutBox,m),ri(y,p)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=y,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function pa(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ga(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ya(t){t.clearSnapshot()}function In(t){t.clearMeasurements()}function va(t){t.isLayoutDirty=!0,t.updateLayout()}function Fn(t){t.isLayoutDirty=!1}function xa(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Ta(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function On(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function wa(t){t.resolveTargetDelta()}function Sa(t){t.calcProjection()}function Pa(t){t.resetSkewAndRotation()}function ba(t){t.removeLeadSnapshot()}function Nn(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Un(t,e,n,s){t.min=V(e.min,n.min,s),t.max=V(e.max,n.max,s)}function Va(t,e,n,s){Un(t.x,e.x,n.x,s),Un(t.y,e.y,n.y,s)}function Aa(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Ca={duration:.45,ease:[.4,0,.1,1]},Wn=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Kn=Wn("applewebkit/")&&!Wn("chrome/")?Math.round:G;function zn(t){t.min=Kn(t.min),t.max=Kn(t.max)}function Ea(t){zn(t.x),zn(t.y)}function hi(t,e,n){return t==="position"||t==="preserve-aspect"&&!_r(Mn(e),Mn(n),.2)}function Da(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const Ra=ci({attachResizeListener:(t,e)=>Tt(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),qt={current:void 0},fi=ci({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!qt.current){const t=new Ra({});t.mount(window),t.setOptions({layoutScroll:!0}),qt.current=t}return qt.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});function Ma(t=!0){const e=T.useContext(De);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=T.useId();T.useEffect(()=>{if(t)return i(r)},[t]);const o=T.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const di=T.createContext({strict:!1}),$n={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Hn=!1;function La(){if(Hn)return;const t={};for(const e in $n)t[e]={isEnabled:n=>$n[e].some(s=>!!n[s])};zs(t),Hn=!0}function mi(){return La(),wr()}function ka(t){const e=mi();for(const n in t)e[n]={...e[n],...t[n]};zs(e)}const ja=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Ft(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ja.has(t)}let pi=t=>!Ft(t);function Ba(t){typeof t=="function"&&(pi=e=>e.startsWith("on")?!Ft(e):t(e))}try{Ba(require("@emotion/is-prop-valid").default)}catch{}function Ia(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||D(t[i])||(pi(i)||n===!0&&Ft(i)||!e&&!Ft(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Ut=T.createContext({});function Fa(t,e){if(Nt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||xt(n)?n:void 0,animate:xt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Oa(t){const{initial:e,animate:n}=Fa(t,T.useContext(Ut));return T.useMemo(()=>({initial:e,animate:n}),[Gn(e),Gn(n)])}function Gn(t){return Array.isArray(t)?t.join(" "):t}const ze=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gi(t,e,n){for(const s in e)!D(e[s])&&!qs(s,n)&&(t[s]=e[s])}function Na({transformTemplate:t},e){return T.useMemo(()=>{const n=ze();return We(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Ua(t,e){const n=t.style||{},s={};return gi(s,n,t),Object.assign(s,Na(t,e)),s}function Wa(t,e){const n={},s=Ua(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const yi=()=>({...ze(),attrs:{}});function Ka(t,e,n,s){const i=T.useMemo(()=>{const r=yi();return Zs(r,e,Js(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};gi(r,t.style,t),i.style={...r,...i.style}}return i}const za=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function $e(t){return typeof t!="string"||t.includes("-")?!1:!!(za.indexOf(t)>-1||/[A-Z]/u.test(t))}function $a(t,e,n,{latestValues:s},i,r=!1,o){const l=(o??$e(t)?Ka:Wa)(e,s,i,t),c=Ia(e,typeof t=="string",r),u=t!==T.Fragment?{...c,...l,ref:n}:{},{children:h}=e,f=T.useMemo(()=>D(h)?h.get():h,[h]);return T.createElement(t,{...u,children:f})}function Ha({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Ga(n,s,i,t),renderState:e()}}function Ga(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Mt(r[f]);let{initial:o,animate:a}=t;const l=Nt(t),c=Ws(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const h=u?a:o;if(h&&typeof h!="boolean"&&!Ot(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d(e,n)=>{const s=T.useContext(Ut),i=T.useContext(De),r=()=>Ha(t,e,s,i);return n?r():$i(r)},Xa=vi({scrapeMotionValuesFromProps:Ke,createRenderState:ze}),Ya=vi({scrapeMotionValuesFromProps:ti,createRenderState:yi}),_a=Symbol.for("motionComponentSymbol");function qa(t,e,n){const s=T.useRef(n);T.useInsertionEffect(()=>{s.current=n});const i=T.useRef(null);return T.useCallback(r=>{var a;r&&((a=t.onMount)==null||a.call(t,r));const o=s.current;if(typeof o=="function")if(r){const l=o(r);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r);e&&(r?e.mount(r):e.unmount())},[e])}const xi=T.createContext({});function ot(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Za(t,e,n,s,i,r){var w,P;const{visualElement:o}=T.useContext(Ut),a=T.useContext(di),l=T.useContext(De),c=T.useContext(Ee),u=c.reducedMotion,h=c.skipAnimations,f=T.useRef(null),d=T.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,y=T.useContext(xi);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Qa(f.current,n,i,y);const p=T.useRef(!1);T.useInsertionEffect(()=>{m&&p.current&&m.update(n,l)});const x=n[Ds],v=T.useRef(!!x&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,x))&&((P=window.MotionHasOptimisedAnimation)==null?void 0:P.call(window,x)));return Hi(()=>{d.current=!0,m&&(p.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),T.useEffect(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,x)}),v.current=!1),m.enteringChildren=void 0)}),m}function Qa(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ti(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&ot(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function Ti(t){if(t)return t.options.allowProjection!==!1?t.projection:Ti(t.parent)}function Zt(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&ka(s);const r=n?n==="svg":$e(t),o=r?Ya:Xa;function a(c,u){let h;const f={...T.useContext(Ee),...c,layoutId:Ja(c)},{isStatic:d}=f,m=Oa(c),y=o(c,d);if(!d&&typeof window<"u"){tl();const p=el(f);h=p.MeasureLayout,m.visualElement=Za(t,y,f,i,p.ProjectionNode,r)}return S.jsxs(Ut.Provider,{value:m,children:[h&&m.visualElement?S.jsx(h,{visualElement:m.visualElement,...f}):null,$a(t,c,qa(y,m.visualElement,u),y,d,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=T.forwardRef(a);return l[_a]=t,l}function Ja({layoutId:t}){const e=T.useContext(cs).id;return e&&t!==void 0?e+"-"+t:t}function tl(t,e){T.useContext(di).strict}function el(t){const e=mi(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(t)||s!=null&&s.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function nl(t,e){if(typeof Proxy>"u")return Zt;const n=new Map,s=(r,o)=>Zt(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,Zt(o,void 0,t,e)),n.get(o))})}const sl=(t,e)=>e.isSVG??$e(t)?new Or(e):new Lr(e,{allowProjection:t!==T.Fragment});class il extends Y{constructor(e){super(e),e.animationState||(e.animationState=zr(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ot(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let ol=0;class rl extends Y{constructor(){super(...arguments),this.id=ol++,this.isExitComplete=!1}update(){var r;if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const l=nt(this.node,o,a);if(l){const{transition:c,transitionEnd:u,...h}=l;for(const f in h)(r=this.node.getValue(f))==null||r.jump(h[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const al={animation:{Feature:il},exit:{Feature:rl}};function wt(t){return{point:{x:t.pageX,y:t.pageY}}}const ll=t=>e=>Fe(e)&&t(e,wt(e));function gt(t,e,n,s){return Tt(t,e,ll(n),s)}const wi=({current:t})=>t?t.ownerDocument.defaultView:null,Xn=(t,e)=>Math.abs(t-e);function ul(t,e){const n=Xn(t.x,e.x),s=Xn(t.y,e.y);return Math.sqrt(n**2+s**2)}const Yn=new Set(["auto","scroll"]);class Si{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=bt(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Qt(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=ul(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:p}=d,{timestamp:x}=M;this.history.push({...p,timestamp:x});const{onStart:v,onMove:w}=this.handlers;m||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=bt(m,this.transformPagePoint),b.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:y,onSessionEnd:p,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Qt(d.type==="pointercancel"?this.lastMoveEventInfo:bt(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(d,v),p&&p(d,v)},!Fe(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const l=wt(e),c=bt(l,this.transformPagePoint),{point:u}=c,{timestamp:h}=M;this.history=[{...u,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Qt(c,this.history)),this.removeListeners=us(gt(this.contextWindow,"pointermove",this.handlePointerMove),gt(this.contextWindow,"pointerup",this.handlePointerUp),gt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Yn.has(s.overflowX)||Yn.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),b.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),X(this.updatePoint)}}function bt(t,e){return e?{point:e(t.point)}:t}function _n(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Qt({point:t},e){return{point:t,delta:_n(t,Pi(e)),offset:_n(t,cl(e)),velocity:hl(e,.1)}}function cl(t){return t[0]}function Pi(t){return t[t.length-1]}function hl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Pi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>tt(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>tt(e)*2&&(s=t[1]);const r=At(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function fl(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?V(n,t,s.max):Math.min(t,n)),t}function qn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function dl(t,{top:e,left:n,bottom:s,right:i}){return{x:qn(t.x,n,i),y:qn(t.y,e,s)}}function Zn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=se(e.min,e.max-s,t.min):s>i&&(n=se(t.min,t.max-i,e.min)),Ce(0,1,n)}function gl(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Pe=.35;function yl(t=Pe){return t===!1?t=0:t===!0&&(t=Pe),{x:Qn(t,"left","right"),y:Qn(t,"top","bottom")}}function Qn(t,e,n){return{min:Jn(t,e),max:Jn(t,n)}}function Jn(t,e){return typeof t=="number"?t:t[e]||0}const vl=new WeakMap;class xl{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=A(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(wt(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:y}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Zo(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),N(x=>{let v=this.getAxisMotionValue(x).get()||0;if(vt.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const P=w.layout.layoutBox[x];P&&(v=R(P)*(parseFloat(v)/100))}}this.originPoint[x]=v}),y&&b.update(()=>y(h,f),!1,!0),me(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:y,onDrag:p}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:x}=f;if(m&&this.currentDirection===null){this.currentDirection=wl(x),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),p&&b.update(()=>p(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new Si(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:wi(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&b.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Vt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=fl(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,i=this.constraints;e&&ot(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=dl(s.layoutBox,e):this.constraints=!1,this.elastic=yl(n),i!==this.constraints&&!ot(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&N(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=gl(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ot(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Ar(s,i.root,this.visualElement.getTransformPagePoint());let o=ml(i.layout.layoutBox,r);if(n){const a=n(Pr(o));this.hasMutatedConstraints=!!a,a&&(o=Hs(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=N(u=>{if(!Vt(u,n,this.currentDirection))return;let h=l&&l[u]||{};(o===!0||o===u)&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return me(this.visualElement,e),s.start(Le(e,s,0,n,this.visualElement,!1))}stopAnimation(){N(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){N(n=>{const{drag:s}=this.getProps();if(!Vt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=r.get()||0;r.set(e[n]-V(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ot(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};N(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=pl({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),N(o=>{if(!Vt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(V(l,c,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;vl.set(this.visualElement,this);const e=this.visualElement.current,n=gt(e,"pointerdown",c=>{const{drag:u,dragListener:h=!0}=this.getProps(),f=c.target,d=f!==e&&sr(f);u&&h&&!d&&this.start(c)});let s;const i=()=>{const{dragConstraints:c}=this.getProps();ot(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),s||(s=Tl(e,c.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),b.read(i);const a=Tt(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(N(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=c[h].translate,f.set(f.get()+c[h].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Pe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function ts(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function Tl(t,e,n){const s=un(t,ts(n)),i=un(e,ts(n));return()=>{s(),i()}}function Vt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function wl(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Sl extends Y{constructor(e){super(e),this.removeGroupControls=G,this.removeListeners=G,this.controls=new xl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||G}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Jt=t=>(e,n)=>{t&&b.update(()=>t(e,n),!1,!0)};class Pl extends Y{constructor(){super(...arguments),this.removePointerDownListener=G}onPointerDown(e){this.session=new Si(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Jt(e),onStart:Jt(n),onMove:Jt(s),onEnd:(r,o)=>{delete this.session,i&&b.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=gt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let te=!1;class bl extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),te&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Lt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),te=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||b.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Ie.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;te=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function bi(t){const[e,n]=Ma(),s=T.useContext(cs);return S.jsx(bl,{...t,layoutGroup:s,switchLayoutGroup:T.useContext(xi),isPresent:e,safeToRemove:n})}const Vl={pan:{Feature:Pl},drag:{Feature:Sl,ProjectionNode:fi,MeasureLayout:bi}};function es(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&b.postRender(()=>r(e,wt(e)))}class Al extends Y{mount(){const{current:e}=this.node;e&&(this.unmount=Jo(e,(n,s)=>(es(this.node,s,"Start"),i=>es(this.node,i,"End"))))}unmount(){}}class Cl extends Y{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=us(Tt(this.node.current,"focus",()=>this.onFocus()),Tt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ns(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&b.postRender(()=>r(e,wt(e)))}class El extends Y{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=or(e,(i,r)=>(ns(this.node,r,"Start"),(o,{success:a})=>ns(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const be=new WeakMap,ee=new WeakMap,Dl=t=>{const e=be.get(t.target);e&&e(t)},Rl=t=>{t.forEach(Dl)};function Ml({root:t,...e}){const n=t||document;ee.has(n)||ee.set(n,{});const s=ee.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Rl,{root:t,...e})),s[i]}function Ll(t,e,n){const s=Ml(e);return be.set(t,n),s.observe(t),()=>{be.delete(t),s.unobserve(t)}}const kl={some:0,all:1};class jl extends Y{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:kl[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),d=u?h:f;d&&d(c)};this.stopObserver=Ll(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Bl(e,n))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Bl({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Il={inView:{Feature:jl},tap:{Feature:El},focus:{Feature:Cl},hover:{Feature:Al}},Fl={layout:{ProjectionNode:fi,MeasureLayout:bi}},Ol={...al,...Il,...Vl,...Fl},Nl=nl(Ol,sl);function Ul(t){const e=T.useRef(0),{isStatic:n}=T.useContext(Ee);T.useEffect(()=>{if(n)return;const s=({timestamp:i,delta:r})=>{e.current||(e.current=i),t(i-e.current,r)};return b.update(s,!0),()=>X(s)},[t])}const Wl=({text:t,disabled:e=!1,speed:n=2,className:s="",color:i="#b5b5b5",shineColor:r="#ffffff",spread:o=120,yoyo:a=!1,pauseOnHover:l=!1,direction:c="left",delay:u=0})=>{const[h,f]=T.useState(!1),d=Gi(0),m=T.useRef(0),y=T.useRef(null),p=T.useRef(c==="left"?1:-1),x=n*1e3,v=u*1e3;Ul(F=>{if(e||h){y.current=null;return}if(y.current===null){y.current=F;return}const St=F-y.current;if(y.current=F,m.current+=St,a){const O=x+v,_=O*2,k=m.current%_;if(k{p.current=c==="left"?1:-1,m.current=0,d.set(0)},[c]);const w=Xi(d,F=>`${150-F*2}% center`),P=T.useCallback(()=>{l&&f(!0)},[l]),C=T.useCallback(()=>{l&&f(!1)},[l]),st={backgroundImage:`linear-gradient(${o}deg, ${i} 0%, ${i} 35%, ${r} 50%, ${i} 65%, ${i} 100%)`,backgroundSize:"200% auto",WebkitBackgroundClip:"text",backgroundClip:"text",WebkitTextFillColor:"transparent"};return S.jsx(Nl.span,{className:`inline-block ${s}`,style:{...st,backgroundPosition:w},onMouseEnter:P,onMouseLeave:C,children:t})};function Yl(){const{t}=Yi(),{user:e,refreshUser:n}=Ci(),[s,i]=T.useState(null),[r,o]=T.useState(""),[a,l]=T.useState(!1),c=async()=>{try{const y=await Ei();y.data.success&&i(y.data.data)}catch{}};T.useEffect(()=>{c()},[]);const u=async y=>{if(y.preventDefault(),!!r.trim()){l(!0);try{(await Di(r.trim())).data.success&&(Ri.success(t("dashboard.redeemSuccess")),o(""),await Promise.all([c(),n()]))}catch{}l(!1)}},h=(s==null?void 0:s.quota)??(e==null?void 0:e.quota)??0,f=(s==null?void 0:s.used_quota)??(e==null?void 0:e.used_quota)??0,d=(s==null?void 0:s.request_count)??(e==null?void 0:e.request_count)??0,m=h/Xe;return S.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[S.jsxs("div",{className:"mb-8",children:[S.jsxs("h1",{className:"text-2xl font-heading font-bold text-page mb-1",children:[t("dashboard.welcome")," ",S.jsx(Wl,{text:(e==null?void 0:e.display_name)||(e==null?void 0:e.username)||"User",className:"!inline",speed:3,color:"#a5b4fc",shineColor:"#e0e7ff"})]}),S.jsx("p",{className:"text-sm text-page-secondary",children:t("dashboard.manageDesc")})]}),S.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-10",children:[S.jsxs(Kt,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-6",spotlightColor:"rgba(34,197,94,0.15)",children:[S.jsx("p",{className:"text-sm text-page-secondary mb-2",children:t("dashboard.balance")}),S.jsxs("div",{className:"text-3xl font-bold text-page",children:["$",S.jsx($t,{from:0,to:m,duration:1.5})]}),S.jsx("p",{className:"text-xs text-page-muted mt-1",children:t("dashboard.quotaUnits",{count:h.toLocaleString()})})]}),S.jsxs(Kt,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-6",spotlightColor:"rgba(129,140,248,0.15)",children:[S.jsx("p",{className:"text-sm text-page-secondary mb-2",children:t("dashboard.used")}),S.jsxs("div",{className:"text-3xl font-bold text-page",children:["$",S.jsx($t,{from:0,to:f/Xe,duration:1.5})]}),S.jsx("p",{className:"text-xs text-page-muted mt-1",children:t("dashboard.quotaUnits",{count:f.toLocaleString()})})]}),S.jsxs(Kt,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-6",spotlightColor:"rgba(244,114,182,0.15)",children:[S.jsx("p",{className:"text-sm text-page-secondary mb-2",children:t("dashboard.totalRequests")}),S.jsx("div",{className:"text-3xl font-bold text-page",children:S.jsx($t,{from:0,to:d,duration:1.5})})]})]}),S.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[S.jsxs("div",{className:"glass rounded-2xl p-6",children:[S.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:t("dashboard.redeemCode")}),S.jsxs("form",{onSubmit:u,className:"flex gap-3",children:[S.jsx("input",{type:"text",value:r,onChange:y=>o(y.target.value),className:"input flex-1",placeholder:t("dashboard.enterCode")}),S.jsx("button",{type:"submit",disabled:a,className:"btn-primary whitespace-nowrap",children:t(a?"dashboard.redeeming":"dashboard.redeem")})]})]}),S.jsxs("div",{className:"glass rounded-2xl p-6",children:[S.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:t("dashboard.quickLinks")}),S.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[S.jsxs(Wt,{to:"/tokens",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-white/[0.06] transition-colors group",children:[S.jsx("p",{className:"text-sm font-medium text-page group-hover:text-page-link transition-colors",children:t("dashboard.apiKeys")}),S.jsx("p",{className:"text-xs text-page-muted",children:t("dashboard.manageKeys")})]}),S.jsxs(Wt,{to:"/packages",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-white/[0.06] transition-colors group",children:[S.jsx("p",{className:"text-sm font-medium text-page group-hover:text-page-link transition-colors",children:t("dashboard.packages")}),S.jsx("p",{className:"text-xs text-page-muted",children:t("dashboard.viewPlans")})]}),S.jsxs(Wt,{to:"/pricing",className:"glass-sm !rounded-xl px-4 py-3 hover:bg-white/[0.06] transition-colors group",children:[S.jsx("p",{className:"text-sm font-medium text-page group-hover:text-page-link transition-colors",children:t("dashboard.pricing")}),S.jsx("p",{className:"text-xs text-page-muted",children:t("dashboard.modelPrices")})]}),S.jsxs("div",{className:"glass-sm !rounded-xl px-4 py-3 opacity-50",children:[S.jsx("p",{className:"text-sm font-medium text-page",children:t("dashboard.apiDocs")}),S.jsx("p",{className:"text-xs text-page-muted",children:t("dashboard.comingSoon")})]})]})]})]})]})}export{Yl as default}; diff --git a/dist/assets/FadeContent-DNRHLB7E.js b/dist/assets/FadeContent-Cswq021Y.js similarity index 91% rename from dist/assets/FadeContent-DNRHLB7E.js rename to dist/assets/FadeContent-Cswq021Y.js index 49bccdd..bf9077a 100644 --- a/dist/assets/FadeContent-DNRHLB7E.js +++ b/dist/assets/FadeContent-Cswq021Y.js @@ -1 +1 @@ -import{r as n,j as b}from"./index-Cvtin-Z6.js";const $=({children:c,blur:f=!1,duration:e=800,delay:t=0,threshold:o=.1,initialOpacity:l=0,className:u="",...m})=>{const i=n.useRef(null),[s,p]=n.useState(!1);return n.useEffect(()=>{const a=i.current;if(!a)return;const r=new IntersectionObserver(([x])=>{x.isIntersecting&&(p(!0),r.disconnect())},{threshold:o});return r.observe(a),()=>r.disconnect()},[o]),b.jsx("div",{ref:i,className:u,style:{opacity:s?1:l,filter:f?s?"blur(0px)":"blur(10px)":void 0,transform:s?"translateY(0)":"translateY(20px)",transition:`opacity ${e}ms ease-out ${t}ms, filter ${e}ms ease-out ${t}ms, transform ${e}ms ease-out ${t}ms`,willChange:"opacity, filter, transform"},...m,children:c})};export{$ as F}; +import{r as n,j as b}from"./index-ClhW4pXr.js";const $=({children:c,blur:f=!1,duration:e=800,delay:t=0,threshold:o=.1,initialOpacity:l=0,className:u="",...m})=>{const i=n.useRef(null),[s,p]=n.useState(!1);return n.useEffect(()=>{const a=i.current;if(!a)return;const r=new IntersectionObserver(([x])=>{x.isIntersecting&&(p(!0),r.disconnect())},{threshold:o});return r.observe(a),()=>r.disconnect()},[o]),b.jsx("div",{ref:i,className:u,style:{opacity:s?1:l,filter:f?s?"blur(0px)":"blur(10px)":void 0,transform:s?"translateY(0)":"translateY(20px)",transition:`opacity ${e}ms ease-out ${t}ms, filter ${e}ms ease-out ${t}ms, transform ${e}ms ease-out ${t}ms`,willChange:"opacity, filter, transform"},...m,children:c})};export{$ as F}; diff --git a/dist/assets/Home-BJajDktc.js b/dist/assets/Home-BJajDktc.js new file mode 100644 index 0000000..f31fae5 --- /dev/null +++ b/dist/assets/Home-BJajDktc.js @@ -0,0 +1 @@ +import{u as j,a as p,r as c,f as y,l as N,j as e,L as a,Q as v}from"./index-ClhW4pXr.js";import{c as f}from"./officialEquiv-COyn5GUF.js";import{C as x}from"./CountUp-DKNTcuWU.js";import{F as l}from"./FadeContent-Cswq021Y.js";import{u as w}from"./useTranslation-Pq_l7wMn.js";function C(){const{t}=w(),{user:i}=j(),{site:d}=p(),[u,g]=c.useState([]),[m,b]=c.useState([]);c.useEffect(()=>{y().then(s=>{s.data.success&&g(s.data.data||[])}).catch(()=>{}),N().then(s=>{s.data.success&&b(s.data.data||[])}).catch(()=>{})},[]);const r=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(l,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("p",{className:"text-sm font-medium text-blue-600 mb-4 tracking-wide",children:t("home.heroTagline")||"AI API Platform"}),e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-gray-900 leading-[1.1] tracking-tight",children:(d==null?void 0:d.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-gray-500 mt-6 leading-relaxed max-w-xl mx-auto",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:i?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:t("home.getStarted")}),e.jsxs(a,{to:"/pricing",className:"px-7 py-3 text-gray-500 font-medium text-sm hover:text-gray-900 transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(l,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"grid grid-cols-3 gap-8 max-w-lg mx-auto mt-20 pt-10 border-t border-gray-100",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:[e.jsx(x,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:[e.jsx(x,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:["<",e.jsx(x,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-gray-900 mb-3",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-gray-500",children:t("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),color:"blue",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),color:"indigo",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),color:"emerald",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((s,o)=>e.jsxs("div",{className:"p-6 rounded-xl border border-gray-100 hover:border-gray-200 hover:shadow-sm transition-all",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg bg-${s.color}-50 text-${s.color}-600 flex items-center justify-center mb-4`,children:s.icon}),e.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-2",children:s.title}),e.jsx("p",{className:"text-sm text-gray-500 leading-relaxed",children:s.desc})]},o))})]})}),r.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-gray-900 mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-gray-500",children:t("home.availableModelsDesc",{count:r.length})})]}),r.length>8&&e.jsxs(a,{to:"/pricing",className:"text-sm text-blue-600 hover:text-blue-700 transition-colors",children:[t("home.viewAllModels",{count:r.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:r.slice(0,8).map((s,o)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-gray-100 hover:border-gray-200 transition-colors",children:e.jsx("span",{className:"text-sm text-gray-600 font-mono",children:s.display_name||s.model_name})},s.id||o))})]})}),m.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-gray-900 mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-gray-500 mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:m.filter(s=>s.enabled).slice(0,3).map((s,o)=>{const h=s.quota_amount>0?s.quota_amount/v:0,n=f(r,h);return e.jsxs("div",{className:`rounded-xl p-6 flex flex-col border transition-all ${o===1?"border-blue-200 bg-blue-50/50 shadow-sm":"border-gray-100 hover:border-gray-200"}`,children:[o===1&&e.jsx("span",{className:"text-xs text-blue-600 font-semibold mb-2 uppercase tracking-wider",children:t("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-gray-900",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:s.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-gray-900",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-gray-500 line-through ml-2",children:["$",s.original_price]}),s.duration>0&&e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:t("home.days",{count:s.duration})})]}),n&&n.equivDollars>h&&e.jsxs("p",{className:"text-xs text-amber-600 mt-2",children:["🔥 ",t("packages.officialEquiv",{model:n.label,amount:Math.round(n.equivDollars)})]}),e.jsx(a,{to:i?"/packages":"/register",className:`mt-4 py-2.5 rounded-lg font-medium text-sm text-center transition-colors ${o===1?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:t(i?"home.subscribe":"home.getStarted")})]},s.id)})})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(l,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-gray-100 pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-gray-900 mb-3",children:t("home.readyToStart")}),e.jsx("p",{className:"text-gray-500 mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:i?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:[t("home.createFreeAccount")," →"]}),e.jsx(a,{to:"/login",className:"px-7 py-3 text-gray-500 font-medium text-sm hover:text-gray-900 transition-colors",children:t("home.signIn")})]})})]})})})]})}export{C as default}; diff --git a/dist/assets/Home-BShPF6nt.js b/dist/assets/Home-BShPF6nt.js deleted file mode 100644 index 33b1afa..0000000 --- a/dist/assets/Home-BShPF6nt.js +++ /dev/null @@ -1 +0,0 @@ -import{u as p,a as b,r as d,f as g,l as j,j as e,L as l}from"./index-Cvtin-Z6.js";import{_ as c}from"./CountUp-B7vSEX1I.js";import{F as o}from"./FadeContent-DNRHLB7E.js";import{u as N}from"./useTranslation-BeJE8l6a.js";function S(){const{t}=N(),{user:n}=p(),{site:i}=b(),[x,h]=d.useState([]),[m,u]=d.useState([]);d.useEffect(()=>{g().then(s=>{s.data.success&&h(s.data.data||[])}).catch(()=>{}),j().then(s=>{s.data.success&&u(s.data.data||[])}).catch(()=>{})},[]);const r=x.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-24",children:[e.jsx(o,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full border border-emerald-500/20 mb-8",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500"}),e.jsx("span",{className:"text-xs text-emerald-400/80 font-medium tracking-wide",children:t("home.heroTagline")||"All Systems Operational"})]}),e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(i==null?void 0:i.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:n?e.jsxs(l,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-emerald-500 text-black font-semibold text-sm hover:bg-emerald-400 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-7 py-3 rounded-lg bg-emerald-500 text-black font-semibold text-sm hover:bg-emerald-400 transition-colors",children:t("home.getStarted")}),e.jsxs(l,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(o,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 border-t border-neutral-800 pt-10",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-emerald-400",children:[e.jsx(c,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-0",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),accent:"emerald"},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),accent:"cyan"},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),accent:"violet"}].map((s,a)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-neutral-800/60 last:border-0 group",children:[e.jsxs("span",{className:`text-sm font-mono text-${s.accent}-500/60 mt-0.5`,children:["0",a+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-white mb-1 group-hover:text-neutral-300 transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-500 leading-relaxed max-w-lg",children:s.desc})]})]},a))})]})}),r.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:t("home.availableModelsDesc",{count:r.length})})]}),r.length>8&&e.jsxs(l,{to:"/pricing",className:"text-sm text-emerald-400 hover:text-emerald-300 transition-colors",children:[t("home.viewAllModels",{count:r.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:r.slice(0,8).map((s,a)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-neutral-800/60 hover:border-emerald-500/20 transition-colors group",children:e.jsx("span",{className:"text-sm text-neutral-400 font-mono group-hover:text-neutral-300 transition-colors truncate block",children:s.display_name||s.model_name})},s.id||a))})]})}),m.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:m.filter(s=>s.enabled).slice(0,3).map((s,a)=>e.jsxs("div",{className:`rounded-xl p-6 flex flex-col border transition-colors ${a===1?"border-emerald-500/25 bg-emerald-500/[0.04]":"border-neutral-800/60 hover:border-neutral-700"}`,children:[a===1&&e.jsx("span",{className:"text-xs text-emerald-400 font-medium mb-2 uppercase tracking-wider",children:t("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-white",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:s.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-neutral-600 line-through ml-2",children:["$",s.original_price]}),s.duration>0&&e.jsx("p",{className:"text-xs text-neutral-600 mt-1",children:t("home.days",{count:s.duration})})]}),e.jsx(l,{to:n?"/packages":"/register",className:`mt-4 py-2.5 rounded-lg font-medium text-sm text-center transition-colors ${a===1?"bg-emerald-500 text-black hover:bg-emerald-400":"bg-neutral-800 text-white hover:bg-neutral-700"}`,children:t(n?"home.subscribe":"home.getStarted")})]},s.id))})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(o,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-neutral-800 pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:t("home.readyToStart")}),e.jsx("p",{className:"text-neutral-500 mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:n?e.jsxs(l,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-emerald-500 text-black font-semibold text-sm hover:bg-emerald-400 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(l,{to:"/register",className:"px-7 py-3 rounded-lg bg-emerald-500 text-black font-semibold text-sm hover:bg-emerald-400 transition-colors",children:[t("home.createFreeAccount")," →"]}),e.jsx(l,{to:"/login",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:t("home.signIn")})]})})]})})})]})}export{S as default}; diff --git a/dist/assets/Home-BVEmtewU.js b/dist/assets/Home-BVEmtewU.js new file mode 100644 index 0000000..88251be --- /dev/null +++ b/dist/assets/Home-BVEmtewU.js @@ -0,0 +1 @@ +import{u as j,a as g,r as c,f as v,l as f,j as e,L as a,Q as N}from"./index-ClhW4pXr.js";import{c as w}from"./officialEquiv-COyn5GUF.js";import{C as x}from"./CountUp-DKNTcuWU.js";import{F as n}from"./FadeContent-Cswq021Y.js";import{u as y}from"./useTranslation-Pq_l7wMn.js";function L(){const{t}=y(),{user:o}=j(),{site:d}=g(),[u,b]=c.useState([]),[m,p]=c.useState([]);c.useEffect(()=>{v().then(s=>{s.data.success&&b(s.data.data||[])}).catch(()=>{}),f().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{})},[]);const r=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[900px] h-[500px] bg-gradient-radial from-brand-600/15 to-transparent blur-3xl opacity-60"})}),e.jsxs("section",{className:"relative max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(n,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("p",{className:"text-sm font-medium text-brand-400 mb-4 tracking-wide uppercase",children:t("home.heroTagline")||"AI API Platform"}),e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(d==null?void 0:d.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl mx-auto",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:o?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-xl bg-brand-600 text-white font-medium text-sm hover:bg-brand-500 transition-colors shadow-lg shadow-brand-600/20",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-brand-600 text-white font-medium text-sm hover:bg-brand-500 transition-colors shadow-lg shadow-brand-600/20",children:t("home.getStarted")}),e.jsxs(a,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(n,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"grid grid-cols-3 gap-8 max-w-lg mx-auto mt-20 pt-10 border-t border-neutral-800/60",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(x,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(x,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(x,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500",children:t("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((s,l)=>e.jsxs("div",{className:"p-6 rounded-xl border border-neutral-800/60 hover:border-brand-500/25 transition-colors group",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-brand-500/10 text-brand-400 flex items-center justify-center mb-4",children:s.icon}),e.jsx("h3",{className:"text-base font-semibold text-white mb-2",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:s.desc})]},l))})]})}),r.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:t("home.availableModelsDesc",{count:r.length})})]}),r.length>8&&e.jsxs(a,{to:"/pricing",className:"text-sm text-brand-400 hover:text-brand-300 transition-colors",children:[t("home.viewAllModels",{count:r.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:r.slice(0,8).map((s,l)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-neutral-800/60 hover:border-neutral-700 transition-colors",children:e.jsx("span",{className:"text-sm text-neutral-300 font-mono",children:s.display_name||s.model_name})},s.id||l))})]})}),m.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:m.filter(s=>s.enabled).slice(0,3).map((s,l)=>{const h=s.quota_amount>0?s.quota_amount/N:0,i=w(r,h);return e.jsxs("div",{className:`rounded-xl p-6 flex flex-col border transition-colors ${l===1?"border-brand-500/30 bg-brand-500/[0.04]":"border-neutral-800/60 hover:border-neutral-700"}`,children:[l===1&&e.jsx("span",{className:"text-xs text-brand-400 font-medium mb-2 uppercase tracking-wider",children:t("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-white",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:s.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-neutral-600 line-through ml-2",children:["$",s.original_price]}),s.duration>0&&e.jsx("p",{className:"text-xs text-neutral-600 mt-1",children:t("home.days",{count:s.duration})})]}),i&&i.equivDollars>h&&e.jsxs("p",{className:"text-xs text-amber-300/80 mt-2",children:["🔥 ",t("packages.officialEquiv",{model:i.label,amount:Math.round(i.equivDollars)})]}),e.jsx(a,{to:o?"/packages":"/register",className:`mt-4 py-2.5 rounded-lg font-medium text-sm text-center transition-colors ${l===1?"bg-brand-600 text-white hover:bg-brand-500":"bg-neutral-800 text-white hover:bg-neutral-700"}`,children:t(o?"home.subscribe":"home.getStarted")})]},s.id)})})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(n,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-neutral-800 pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:t("home.readyToStart")}),e.jsx("p",{className:"text-neutral-500 mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:o?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-xl bg-brand-600 text-white font-medium text-sm hover:bg-brand-500 transition-colors shadow-lg shadow-brand-600/20",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-brand-600 text-white font-medium text-sm hover:bg-brand-500 transition-colors shadow-lg shadow-brand-600/20",children:[t("home.createFreeAccount")," →"]}),e.jsx(a,{to:"/login",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:t("home.signIn")})]})})]})})})]})}export{L as default}; diff --git a/dist/assets/Home-BbUuLGZD.js b/dist/assets/Home-BbUuLGZD.js deleted file mode 100644 index 5cd500d..0000000 --- a/dist/assets/Home-BbUuLGZD.js +++ /dev/null @@ -1 +0,0 @@ -import{u as j,a as p,r as d,f as b,l as g,j as e,L as a}from"./index-Cvtin-Z6.js";import{_ as c}from"./CountUp-B7vSEX1I.js";import{F as r}from"./FadeContent-DNRHLB7E.js";import{u as N}from"./useTranslation-BeJE8l6a.js";function S(){const{t}=N(),{user:n}=j(),{site:o}=p(),[m,h]=d.useState([]),[x,u]=d.useState([]);d.useEffect(()=>{b().then(s=>{s.data.success&&h(s.data.data||[])}).catch(()=>{}),g().then(s=>{s.data.success&&u(s.data.data||[])}).catch(()=>{})},[]);const l=m.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-24",children:[e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(o==null?void 0:o.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:n?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.getStarted")," →"]}),e.jsx(a,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:t("home.viewPricing")})]})})]})}),e.jsx(r,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 border-t border-neutral-800 pt-10",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:l.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-6",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc")},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc")},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc")}].map((s,i)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-neutral-800/60 last:border-0 group",children:[e.jsxs("span",{className:"text-sm font-mono text-neutral-600 mt-0.5",children:["0",i+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-white mb-1 group-hover:text-neutral-300 transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-500 leading-relaxed max-w-lg",children:s.desc})]})]},i))})]})}),l.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:t("home.availableModelsDesc",{count:l.length})})]}),l.length>8&&e.jsxs(a,{to:"/pricing",className:"text-sm text-neutral-400 hover:text-white transition-colors",children:[t("home.viewAllModels",{count:l.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:l.slice(0,8).map((s,i)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-neutral-800/60 hover:border-neutral-700 transition-colors",children:e.jsx("span",{className:"text-sm text-neutral-300 font-mono",children:s.display_name||s.model_name})},s.id||i))})]})}),x.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:x.filter(s=>s.enabled).slice(0,3).map(s=>e.jsxs("div",{className:"rounded-xl p-6 flex flex-col border border-neutral-800/60 hover:border-neutral-700 transition-colors",children:[e.jsx("h3",{className:"text-base font-semibold text-white",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:s.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-neutral-600 line-through ml-2",children:["$",s.original_price]}),s.duration>0&&e.jsx("p",{className:"text-xs text-neutral-600 mt-1",children:t("home.days",{count:s.duration})})]}),e.jsx(a,{to:n?"/packages":"/register",className:"mt-4 py-2.5 rounded-lg bg-neutral-800 text-white font-medium text-sm text-center hover:bg-neutral-700 transition-colors",children:t(n?"home.subscribe":"home.getStarted")})]},s.id))})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-neutral-800 pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:t("home.readyToStart")}),e.jsx("p",{className:"text-neutral-500 mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:n?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.createFreeAccount")," →"]}),e.jsx(a,{to:"/login",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:t("home.signIn")})]})})]})})})]})}export{S as default}; diff --git a/dist/assets/Home-BuMqQaGJ.js b/dist/assets/Home-BuMqQaGJ.js new file mode 100644 index 0000000..95ff06c --- /dev/null +++ b/dist/assets/Home-BuMqQaGJ.js @@ -0,0 +1 @@ +import{u as j,a as g,r as c,f,l as N,j as e,L as l,Q as v}from"./index-ClhW4pXr.js";import{c as y}from"./officialEquiv-COyn5GUF.js";import{C as m}from"./CountUp-DKNTcuWU.js";import{F as o}from"./FadeContent-Cswq021Y.js";import{u as w}from"./useTranslation-Pq_l7wMn.js";function F(){const{t}=w(),{user:n}=j(),{site:d}=g(),[u,b]=c.useState([]),[x,p]=c.useState([]);c.useEffect(()=>{f().then(s=>{s.data.success&&b(s.data.data||[])}).catch(()=>{}),N().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{})},[]);const r=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-24",children:[e.jsx(o,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full border border-emerald-500/20 mb-8",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500"}),e.jsx("span",{className:"text-xs text-emerald-400/80 font-medium tracking-wide",children:t("home.heroTagline")||"All Systems Operational"})]}),e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(d==null?void 0:d.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:n?e.jsxs(l,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-emerald-500 text-black font-semibold text-sm hover:bg-emerald-400 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-7 py-3 rounded-lg bg-emerald-500 text-black font-semibold text-sm hover:bg-emerald-400 transition-colors",children:t("home.getStarted")}),e.jsxs(l,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(o,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 border-t border-neutral-800 pt-10",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-emerald-400",children:[e.jsx(m,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(m,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(m,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-0",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),accent:"emerald"},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),accent:"cyan"},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),accent:"violet"}].map((s,a)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-neutral-800/60 last:border-0 group",children:[e.jsxs("span",{className:`text-sm font-mono text-${s.accent}-500/60 mt-0.5`,children:["0",a+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-white mb-1 group-hover:text-neutral-300 transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-500 leading-relaxed max-w-lg",children:s.desc})]})]},a))})]})}),r.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:t("home.availableModelsDesc",{count:r.length})})]}),r.length>8&&e.jsxs(l,{to:"/pricing",className:"text-sm text-emerald-400 hover:text-emerald-300 transition-colors",children:[t("home.viewAllModels",{count:r.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:r.slice(0,8).map((s,a)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-neutral-800/60 hover:border-emerald-500/20 transition-colors group",children:e.jsx("span",{className:"text-sm text-neutral-400 font-mono group-hover:text-neutral-300 transition-colors truncate block",children:s.display_name||s.model_name})},s.id||a))})]})}),x.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:x.filter(s=>s.enabled).slice(0,3).map((s,a)=>{const h=s.quota_amount>0?s.quota_amount/v:0,i=y(r,h);return e.jsxs("div",{className:`rounded-xl p-6 flex flex-col border transition-colors ${a===1?"border-emerald-500/25 bg-emerald-500/[0.04]":"border-neutral-800/60 hover:border-neutral-700"}`,children:[a===1&&e.jsx("span",{className:"text-xs text-emerald-400 font-medium mb-2 uppercase tracking-wider",children:t("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-white",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:s.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-neutral-600 line-through ml-2",children:["$",s.original_price]}),s.duration>0&&e.jsx("p",{className:"text-xs text-neutral-600 mt-1",children:t("home.days",{count:s.duration})})]}),i&&i.equivDollars>h&&e.jsxs("p",{className:"text-xs text-amber-300/80 mt-2",children:["🔥 ",t("packages.officialEquiv",{model:i.label,amount:Math.round(i.equivDollars)})]}),e.jsx(l,{to:n?"/packages":"/register",className:`mt-4 py-2.5 rounded-lg font-medium text-sm text-center transition-colors ${a===1?"bg-emerald-500 text-black hover:bg-emerald-400":"bg-neutral-800 text-white hover:bg-neutral-700"}`,children:t(n?"home.subscribe":"home.getStarted")})]},s.id)})})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(o,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-neutral-800 pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:t("home.readyToStart")}),e.jsx("p",{className:"text-neutral-500 mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:n?e.jsxs(l,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-emerald-500 text-black font-semibold text-sm hover:bg-emerald-400 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(l,{to:"/register",className:"px-7 py-3 rounded-lg bg-emerald-500 text-black font-semibold text-sm hover:bg-emerald-400 transition-colors",children:[t("home.createFreeAccount")," →"]}),e.jsx(l,{to:"/login",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:t("home.signIn")})]})})]})})})]})}export{F as default}; diff --git a/dist/assets/Home-C-GxmmCZ.js b/dist/assets/Home-C-GxmmCZ.js deleted file mode 100644 index b7d385f..0000000 --- a/dist/assets/Home-C-GxmmCZ.js +++ /dev/null @@ -1 +0,0 @@ -import{u,a as b,r as d,f as p,l as g,j as e,L as a}from"./index-Cvtin-Z6.js";import{_ as j}from"./CountUp-B7vSEX1I.js";import{F as o}from"./FadeContent-DNRHLB7E.js";import{u as v}from"./useTranslation-BeJE8l6a.js";function k(){const{t:s}=v(),{user:i}=u(),{site:n}=b(),[x,h]=d.useState([]),[c,m]=d.useState([]);d.useEffect(()=>{p().then(t=>{t.data.success&&h(t.data.data||[])}).catch(()=>{}),g().then(t=>{t.data.success&&m(t.data.data||[])}).catch(()=>{})},[]);const r=x.filter(t=>t.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute -top-40 left-1/4 w-[600px] h-[600px] bg-violet-600/10 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute top-20 right-1/4 w-[400px] h-[400px] bg-blue-600/8 rounded-full blur-3xl"})]}),e.jsxs("section",{className:"relative max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(o,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("h1",{className:"text-5xl md:text-7xl font-heading font-extrabold text-white leading-[1.08] tracking-tight",children:(n==null?void 0:n.name)||s("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl mx-auto",children:s("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:i?e.jsx(a,{to:"/dashboard",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.goToDashboard")}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.getStarted")}),e.jsx(a,{to:"/pricing",className:"px-8 py-3.5 rounded-2xl border border-white/15 text-white font-medium text-sm hover:bg-white/5 transition-all",children:s("home.viewPricing")})]})})]})}),e.jsx(o,{blur:!0,duration:800,delay:400,children:e.jsx("div",{className:"grid grid-cols-3 gap-6 max-w-xl mx-auto mt-24",children:[{value:r.length||50,suffix:"+",label:s("home.aiModels")},{value:99.9,suffix:"%",label:s("home.uptime")},{value:50,suffix:"ms",label:s("home.latency"),prefix:"<"}].map((t,l)=>e.jsxs("div",{className:"text-center p-5 rounded-2xl bg-white/[0.03] border border-white/[0.06]",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[t.prefix,e.jsx(j,{from:0,to:t.value,duration:2}),t.suffix]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t.label})]},l))})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:s("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500",children:s("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:s("home.lightningFast"),desc:s("home.lightningFastDesc"),color:"violet",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:s("home.securePrivate"),desc:s("home.securePrivateDesc"),color:"blue",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:s("home.payAsYouGo"),desc:s("home.payAsYouGoDesc"),color:"cyan",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((t,l)=>e.jsxs("div",{className:"p-6 rounded-xl bg-white/[0.02] border border-white/[0.06] hover:border-white/[0.12] transition-colors",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg bg-${t.color}-500/10 text-${t.color}-400 flex items-center justify-center mb-4`,children:t.icon}),e.jsx("h3",{className:"text-base font-semibold text-white mb-2",children:t.title}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:t.desc})]},l))})]})}),r.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:s("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:s("home.availableModelsDesc",{count:r.length})})]}),r.length>8&&e.jsxs(a,{to:"/pricing",className:"text-sm text-violet-400 hover:text-violet-300 transition-colors",children:[s("home.viewAllModels",{count:r.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:r.slice(0,8).map((t,l)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-white/[0.06] hover:border-white/[0.12] transition-colors",children:e.jsx("span",{className:"text-sm text-neutral-300 font-mono",children:t.display_name||t.model_name})},t.id||l))})]})}),c.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:s("home.plansPackages")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:s("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:c.filter(t=>t.enabled).slice(0,3).map((t,l)=>e.jsxs("div",{className:`rounded-2xl p-6 flex flex-col border transition-colors ${l===1?"bg-white/[0.04] border-white/[0.12]":"bg-white/[0.02] border-white/[0.06] hover:border-white/[0.1]"}`,children:[l===1&&e.jsx("span",{className:"text-xs text-violet-400 font-medium mb-2 uppercase tracking-wider",children:s("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-white",children:t.name}),t.description&&e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",t.price]}),t.original_price>t.price&&e.jsxs("span",{className:"text-sm text-neutral-600 line-through ml-2",children:["$",t.original_price]}),t.duration>0&&e.jsx("p",{className:"text-xs text-neutral-600 mt-1",children:s("home.days",{count:t.duration})})]}),e.jsx(a,{to:i?"/packages":"/register",className:`mt-4 py-2.5 rounded-xl font-medium text-sm text-center transition-colors ${l===1?"bg-white text-black hover:bg-neutral-100":"bg-white/[0.06] text-white hover:bg-white/[0.1]"}`,children:s(i?"home.subscribe":"home.getStarted")})]},t.id))})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(o,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-white/[0.06] pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:s("home.readyToStart")}),e.jsx("p",{className:"text-neutral-500 mb-8 max-w-md mx-auto",children:s("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:i?e.jsx(a,{to:"/dashboard",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.goToDashboard")}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.createFreeAccount")}),e.jsx(a,{to:"/login",className:"px-8 py-3.5 rounded-2xl border border-white/15 text-white font-medium text-sm hover:bg-white/5 transition-all",children:s("home.signIn")})]})})]})})})]})}export{k as default}; diff --git a/dist/assets/Home-Dfjnl6IJ.js b/dist/assets/Home-Dfjnl6IJ.js deleted file mode 100644 index 3d6da0f..0000000 --- a/dist/assets/Home-Dfjnl6IJ.js +++ /dev/null @@ -1 +0,0 @@ -import{u as b,a as p,r as d,f as j,l as g,j as e,L as a}from"./index-Cvtin-Z6.js";import{_ as c}from"./CountUp-B7vSEX1I.js";import{F as l}from"./FadeContent-DNRHLB7E.js";import{u as N}from"./useTranslation-BeJE8l6a.js";function k(){const{t}=N(),{user:o}=b(),{site:i}=p(),[m,h]=d.useState([]),[x,u]=d.useState([]);d.useEffect(()=>{j().then(s=>{s.data.success&&h(s.data.data||[])}).catch(()=>{}),g().then(s=>{s.data.success&&u(s.data.data||[])}).catch(()=>{})},[]);const n=m.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[900px] h-[500px] bg-gradient-radial from-brand-600/15 to-transparent blur-3xl opacity-60"})}),e.jsxs("section",{className:"relative max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(l,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("p",{className:"text-sm font-medium text-brand-400 mb-4 tracking-wide uppercase",children:t("home.heroTagline")||"AI API Platform"}),e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(i==null?void 0:i.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl mx-auto",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:o?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-xl bg-brand-600 text-white font-medium text-sm hover:bg-brand-500 transition-colors shadow-lg shadow-brand-600/20",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-brand-600 text-white font-medium text-sm hover:bg-brand-500 transition-colors shadow-lg shadow-brand-600/20",children:t("home.getStarted")}),e.jsxs(a,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(l,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"grid grid-cols-3 gap-8 max-w-lg mx-auto mt-20 pt-10 border-t border-neutral-800/60",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:n.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500",children:t("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((s,r)=>e.jsxs("div",{className:"p-6 rounded-xl border border-neutral-800/60 hover:border-brand-500/25 transition-colors group",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-brand-500/10 text-brand-400 flex items-center justify-center mb-4",children:s.icon}),e.jsx("h3",{className:"text-base font-semibold text-white mb-2",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:s.desc})]},r))})]})}),n.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:t("home.availableModelsDesc",{count:n.length})})]}),n.length>8&&e.jsxs(a,{to:"/pricing",className:"text-sm text-brand-400 hover:text-brand-300 transition-colors",children:[t("home.viewAllModels",{count:n.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:n.slice(0,8).map((s,r)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-neutral-800/60 hover:border-neutral-700 transition-colors",children:e.jsx("span",{className:"text-sm text-neutral-300 font-mono",children:s.display_name||s.model_name})},s.id||r))})]})}),x.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:x.filter(s=>s.enabled).slice(0,3).map((s,r)=>e.jsxs("div",{className:`rounded-xl p-6 flex flex-col border transition-colors ${r===1?"border-brand-500/30 bg-brand-500/[0.04]":"border-neutral-800/60 hover:border-neutral-700"}`,children:[r===1&&e.jsx("span",{className:"text-xs text-brand-400 font-medium mb-2 uppercase tracking-wider",children:t("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-white",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:s.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-neutral-600 line-through ml-2",children:["$",s.original_price]}),s.duration>0&&e.jsx("p",{className:"text-xs text-neutral-600 mt-1",children:t("home.days",{count:s.duration})})]}),e.jsx(a,{to:o?"/packages":"/register",className:`mt-4 py-2.5 rounded-lg font-medium text-sm text-center transition-colors ${r===1?"bg-brand-600 text-white hover:bg-brand-500":"bg-neutral-800 text-white hover:bg-neutral-700"}`,children:t(o?"home.subscribe":"home.getStarted")})]},s.id))})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(l,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-neutral-800 pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:t("home.readyToStart")}),e.jsx("p",{className:"text-neutral-500 mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:o?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-xl bg-brand-600 text-white font-medium text-sm hover:bg-brand-500 transition-colors shadow-lg shadow-brand-600/20",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-brand-600 text-white font-medium text-sm hover:bg-brand-500 transition-colors shadow-lg shadow-brand-600/20",children:[t("home.createFreeAccount")," →"]}),e.jsx(a,{to:"/login",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:t("home.signIn")})]})})]})})})]})}export{k as default}; diff --git a/dist/assets/Home-Drv_Yrfd.js b/dist/assets/Home-Drv_Yrfd.js deleted file mode 100644 index 6cac0a7..0000000 --- a/dist/assets/Home-Drv_Yrfd.js +++ /dev/null @@ -1 +0,0 @@ -import{u as p,a as j,r as d,f as b,l as D,j as e,L as l}from"./index-Cvtin-Z6.js";import{_ as c}from"./CountUp-B7vSEX1I.js";import{F as r}from"./FadeContent-DNRHLB7E.js";import{u as g}from"./useTranslation-BeJE8l6a.js";function E(){const{t}=g(),{user:i}=p(),{site:n}=j(),[m,h]=d.useState([]),[x,u]=d.useState([]);d.useEffect(()=>{b().then(s=>{s.data.success&&h(s.data.data||[])}).catch(()=>{}),D().then(s=>{s.data.success&&u(s.data.data||[])}).catch(()=>{})},[]);const o=m.filter(s=>s.enabled!==!1);return e.jsxs("div",{children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-[#3D3024] leading-[1.1] tracking-tight",children:(n==null?void 0:n.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-[#6B5D4F] mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:i?e.jsxs(l,{to:"/dashboard",className:"px-7 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-7 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:t("home.getStarted")}),e.jsxs(l,{to:"/pricing",className:"px-7 py-3 text-[#8B7D6E] font-medium text-sm hover:text-[#3D3024] transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(r,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 pt-10 border-t border-[#E8DDD0]",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:[e.jsx(c,{from:0,to:o.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"bg-[#F5EEE6]",children:e.jsx("div",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-[#8B7D6E] mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-0",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc")},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc")},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc")}].map((s,a)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-[#E8DDD0] last:border-0 group",children:[e.jsxs("span",{className:"text-sm font-mono text-[#D97757]/50 mt-0.5",children:["0",a+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-[#3D3024] mb-1 group-hover:text-[#D97757] transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-[#6B5D4F] leading-relaxed max-w-lg",children:s.desc})]})]},a))})]})})}),o.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-[#8B7D6E]",children:t("home.availableModelsDesc",{count:o.length})})]}),o.length>8&&e.jsxs(l,{to:"/pricing",className:"text-sm text-[#D97757] hover:text-[#C4613F] transition-colors",children:[t("home.viewAllModels",{count:o.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:o.slice(0,8).map((s,a)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-[#E8DDD0] hover:border-[#D9C5B2] transition-colors",children:e.jsx("span",{className:"text-sm text-[#6B5D4F] font-mono",children:s.display_name||s.model_name})},s.id||a))})]})}),x.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-[#8B7D6E] mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:x.filter(s=>s.enabled).slice(0,3).map((s,a)=>e.jsxs("div",{className:`rounded-xl p-6 flex flex-col border transition-all ${a===1?"border-[#D97757]/30 bg-[#D97757]/[0.04]":"border-[#E8DDD0] hover:border-[#D9C5B2]"}`,children:[a===1&&e.jsx("span",{className:"text-xs text-[#D97757] font-medium mb-2 uppercase tracking-wider",children:t("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-[#3D3024]",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-1",children:s.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-[#3D3024]",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-[#8B7D6E] line-through ml-2",children:["$",s.original_price]}),s.duration>0&&e.jsx("p",{className:"text-xs text-[#8B7D6E] mt-1",children:t("home.days",{count:s.duration})})]}),e.jsx(l,{to:i?"/packages":"/register",className:`mt-4 py-2.5 rounded-full font-medium text-sm text-center transition-colors ${a===1?"bg-[#D97757] text-white hover:bg-[#C4613F]":"bg-[#E8DDD0] text-[#3D3024] hover:bg-[#D9C5B2]"}`,children:t(i?"home.subscribe":"home.getStarted")})]},s.id))})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-[#E8DDD0] pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-3",children:t("home.readyToStart")}),e.jsx("p",{className:"text-[#8B7D6E] mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:i?e.jsxs(l,{to:"/dashboard",className:"px-7 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(l,{to:"/register",className:"px-7 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:[t("home.createFreeAccount")," →"]}),e.jsx(l,{to:"/login",className:"px-7 py-3 text-[#8B7D6E] font-medium text-sm hover:text-[#3D3024] transition-colors",children:t("home.signIn")})]})})]})})})]})}export{E as default}; diff --git a/dist/assets/Home-DvtKf7X7.js b/dist/assets/Home-DvtKf7X7.js deleted file mode 100644 index 7d966f2..0000000 --- a/dist/assets/Home-DvtKf7X7.js +++ /dev/null @@ -1 +0,0 @@ -import{u as p,a as j,r as d,f as g,l as b,j as e,L as a}from"./index-Cvtin-Z6.js";import{_ as c}from"./CountUp-B7vSEX1I.js";import{F as r}from"./FadeContent-DNRHLB7E.js";import{u as N}from"./useTranslation-BeJE8l6a.js";function M(){const{t:s}=N(),{user:i}=p(),{site:n}=j(),[m,h]=d.useState([]),[x,u]=d.useState([]);d.useEffect(()=>{g().then(t=>{t.data.success&&h(t.data.data||[])}).catch(()=>{}),b().then(t=>{t.data.success&&u(t.data.data||[])}).catch(()=>{})},[]);const o=m.filter(t=>t.enabled!==!1);return e.jsxs("div",{children:[e.jsxs("section",{className:"max-w-6xl mx-auto px-6 lg:px-8 pt-32 pb-20",children:[e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-bold text-slate-900 leading-[1.1] tracking-tight",children:(n==null?void 0:n.name)||s("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-slate-500 mt-6 leading-relaxed max-w-xl",children:s("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:i?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-slate-900 text-white font-medium text-sm hover:bg-slate-800 transition-colors",children:[s("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-7 py-3 rounded-lg bg-slate-900 text-white font-medium text-sm hover:bg-slate-800 transition-colors",children:s("home.getStarted")}),e.jsxs(a,{to:"/pricing",className:"px-7 py-3 text-slate-500 font-medium text-sm hover:text-slate-900 transition-colors",children:[s("home.viewPricing")," →"]})]})})]})}),e.jsx(r,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center divide-x divide-slate-200 mt-20 pt-10 border-t border-slate-200",children:[e.jsxs("div",{className:"pr-12",children:[e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:[e.jsx(c,{from:0,to:o.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:s("home.aiModels")})]}),e.jsxs("div",{className:"px-12",children:[e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:s("home.uptime")})]}),e.jsxs("div",{className:"pl-12",children:[e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:s("home.latency")})]})]})})]}),e.jsx("section",{className:"bg-slate-50 border-y border-slate-200",children:e.jsx("div",{className:"max-w-6xl mx-auto px-6 lg:px-8 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:s("home.whyChooseUs")}),e.jsx("p",{className:"text-slate-500 mb-10",children:s("home.whyChooseUsDesc")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{title:s("home.lightningFast"),desc:s("home.lightningFastDesc"),icon:e.jsx("svg",{className:"w-5 h-5 text-slate-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:s("home.securePrivate"),desc:s("home.securePrivateDesc"),icon:e.jsx("svg",{className:"w-5 h-5 text-slate-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:s("home.payAsYouGo"),desc:s("home.payAsYouGoDesc"),icon:e.jsx("svg",{className:"w-5 h-5 text-slate-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((t,l)=>e.jsxs("div",{className:"p-6 rounded-xl bg-white border border-slate-200 hover:shadow-sm transition-all",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-slate-100 flex items-center justify-center mb-4",children:t.icon}),e.jsx("h3",{className:"text-base font-semibold text-slate-900 mb-2",children:t.title}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed",children:t.desc})]},l))})]})})}),o.length>0&&e.jsx("section",{className:"max-w-6xl mx-auto px-6 lg:px-8 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:s("home.availableModels")}),e.jsx("p",{className:"text-slate-500",children:s("home.availableModelsDesc",{count:o.length})})]}),o.length>8&&e.jsxs(a,{to:"/pricing",className:"text-sm text-slate-600 hover:text-slate-900 transition-colors font-medium",children:[s("home.viewAllModels",{count:o.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:o.slice(0,8).map((t,l)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-slate-200 hover:border-slate-300 transition-colors",children:e.jsx("span",{className:"text-sm text-slate-600 font-mono",children:t.display_name||t.model_name})},t.id||l))})]})}),x.length>0&&e.jsx("section",{className:"max-w-6xl mx-auto px-6 lg:px-8 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:s("home.plansPackages")}),e.jsx("p",{className:"text-slate-500 mb-10",children:s("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5 max-w-4xl",children:x.filter(t=>t.enabled).slice(0,3).map((t,l)=>e.jsxs("div",{className:`rounded-xl p-6 flex flex-col border transition-all ${l===1?"border-slate-900 shadow-sm":"border-slate-200 hover:border-slate-300"}`,children:[l===1&&e.jsx("span",{className:"text-xs text-slate-900 font-semibold mb-2 uppercase tracking-wider",children:s("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-slate-900",children:t.name}),t.description&&e.jsx("p",{className:"text-sm text-slate-500 mt-1",children:t.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-slate-900",children:["$",t.price]}),t.original_price>t.price&&e.jsxs("span",{className:"text-sm text-slate-500 line-through ml-2",children:["$",t.original_price]}),t.duration>0&&e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:s("home.days",{count:t.duration})})]}),e.jsx(a,{to:i?"/packages":"/register",className:`mt-4 py-2.5 rounded-lg font-medium text-sm text-center transition-colors ${l===1?"bg-slate-900 text-white hover:bg-slate-800":"bg-slate-100 text-slate-700 hover:bg-slate-200"}`,children:s(i?"home.subscribe":"home.getStarted")})]},t.id))})]})}),e.jsx("section",{className:"bg-slate-900",children:e.jsx("div",{className:"max-w-6xl mx-auto px-6 lg:px-8 py-20 text-center",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-bold text-white mb-3",children:s("home.readyToStart")}),e.jsx("p",{className:"text-slate-400 mb-8 max-w-md mx-auto",children:s("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:i?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-white text-slate-900 font-medium text-sm hover:bg-slate-100 transition-colors",children:[s("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-lg bg-white text-slate-900 font-medium text-sm hover:bg-slate-100 transition-colors",children:[s("home.createFreeAccount")," →"]}),e.jsx(a,{to:"/login",className:"px-7 py-3 text-slate-400 font-medium text-sm hover:text-white transition-colors",children:s("home.signIn")})]})})]})})})]})}export{M as default}; diff --git a/dist/assets/Home-Ji7N4uDe.js b/dist/assets/Home-Ji7N4uDe.js new file mode 100644 index 0000000..74f63ed --- /dev/null +++ b/dist/assets/Home-Ji7N4uDe.js @@ -0,0 +1 @@ +import{u as p,a as b,r as c,f as g,l as f,j as e,L as a,Q as N}from"./index-ClhW4pXr.js";import{c as v}from"./officialEquiv-COyn5GUF.js";import{C as x}from"./CountUp-DKNTcuWU.js";import{F as n}from"./FadeContent-Cswq021Y.js";import{u as w}from"./useTranslation-Pq_l7wMn.js";function F(){const{t}=w(),{user:o}=p(),{site:d}=b(),[h,u]=c.useState([]),[m,j]=c.useState([]);c.useEffect(()=>{g().then(s=>{s.data.success&&u(s.data.data||[])}).catch(()=>{}),f().then(s=>{s.data.success&&j(s.data.data||[])}).catch(()=>{})},[]);const l=h.filter(s=>s.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-24",children:[e.jsx(n,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-white leading-[1.1] tracking-tight",children:(d==null?void 0:d.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:o?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.getStarted")," →"]}),e.jsx(a,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:t("home.viewPricing")})]})})]})}),e.jsx(n,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 border-t border-neutral-800 pt-10",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(x,{from:0,to:l.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(x,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(x,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-6",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc")},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc")},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc")}].map((s,r)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-neutral-800/60 last:border-0 group",children:[e.jsxs("span",{className:"text-sm font-mono text-neutral-600 mt-0.5",children:["0",r+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-white mb-1 group-hover:text-neutral-300 transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-neutral-500 leading-relaxed max-w-lg",children:s.desc})]})]},r))})]})}),l.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:t("home.availableModelsDesc",{count:l.length})})]}),l.length>8&&e.jsxs(a,{to:"/pricing",className:"text-sm text-neutral-400 hover:text-white transition-colors",children:[t("home.viewAllModels",{count:l.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:l.slice(0,8).map((s,r)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-neutral-800/60 hover:border-neutral-700 transition-colors",children:e.jsx("span",{className:"text-sm text-neutral-300 font-mono",children:s.display_name||s.model_name})},s.id||r))})]})}),m.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(n,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:m.filter(s=>s.enabled).slice(0,3).map(s=>{const r=s.quota_amount>0?s.quota_amount/N:0,i=v(l,r);return e.jsxs("div",{className:"rounded-xl p-6 flex flex-col border border-neutral-800/60 hover:border-neutral-700 transition-colors",children:[e.jsx("h3",{className:"text-base font-semibold text-white",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:s.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-neutral-600 line-through ml-2",children:["$",s.original_price]}),s.duration>0&&e.jsx("p",{className:"text-xs text-neutral-600 mt-1",children:t("home.days",{count:s.duration})})]}),i&&i.equivDollars>r&&e.jsxs("p",{className:"text-xs text-amber-300/80 mt-2",children:["🔥 ",t("packages.officialEquiv",{model:i.label,amount:Math.round(i.equivDollars)})]}),e.jsx(a,{to:o?"/packages":"/register",className:"mt-4 py-2.5 rounded-lg bg-neutral-800 text-white font-medium text-sm text-center hover:bg-neutral-700 transition-colors",children:t(o?"home.subscribe":"home.getStarted")})]},s.id)})})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(n,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-neutral-800 pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:t("home.readyToStart")}),e.jsx("p",{className:"text-neutral-500 mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:o?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-lg bg-white text-neutral-900 font-medium text-sm hover:bg-neutral-200 transition-colors",children:[t("home.createFreeAccount")," →"]}),e.jsx(a,{to:"/login",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:t("home.signIn")})]})})]})})})]})}export{F as default}; diff --git a/dist/assets/Home-KZsq5hsI.js b/dist/assets/Home-KZsq5hsI.js new file mode 100644 index 0000000..03844a8 --- /dev/null +++ b/dist/assets/Home-KZsq5hsI.js @@ -0,0 +1 @@ +import{u as b,a as D,r as c,f as g,l as f,j as e,L as l,Q as N}from"./index-ClhW4pXr.js";import{c as v}from"./officialEquiv-COyn5GUF.js";import{C as x}from"./CountUp-DKNTcuWU.js";import{F as r}from"./FadeContent-Cswq021Y.js";import{u as y}from"./useTranslation-Pq_l7wMn.js";function S(){const{t}=y(),{user:i}=b(),{site:d}=D(),[u,p]=c.useState([]),[m,j]=c.useState([]);c.useEffect(()=>{g().then(s=>{s.data.success&&p(s.data.data||[])}).catch(()=>{}),f().then(s=>{s.data.success&&j(s.data.data||[])}).catch(()=>{})},[]);const o=u.filter(s=>s.enabled!==!1);return e.jsxs("div",{children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-[#3D3024] leading-[1.1] tracking-tight",children:(d==null?void 0:d.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-[#6B5D4F] mt-6 leading-relaxed max-w-xl",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:i?e.jsxs(l,{to:"/dashboard",className:"px-7 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-7 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:t("home.getStarted")}),e.jsxs(l,{to:"/pricing",className:"px-7 py-3 text-[#8B7D6E] font-medium text-sm hover:text-[#3D3024] transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(r,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center gap-12 mt-20 pt-10 border-t border-[#E8DDD0]",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:[e.jsx(x,{from:0,to:o.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:[e.jsx(x,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:["<",e.jsx(x,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"bg-[#F5EEE6]",children:e.jsx("div",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-[#8B7D6E] mb-10",children:t("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-0",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc")},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc")},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc")}].map((s,a)=>e.jsxs("div",{className:"flex gap-6 items-start py-6 border-b border-[#E8DDD0] last:border-0 group",children:[e.jsxs("span",{className:"text-sm font-mono text-[#D97757]/50 mt-0.5",children:["0",a+1]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-[#3D3024] mb-1 group-hover:text-[#D97757] transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-[#6B5D4F] leading-relaxed max-w-lg",children:s.desc})]})]},a))})]})})}),o.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-[#8B7D6E]",children:t("home.availableModelsDesc",{count:o.length})})]}),o.length>8&&e.jsxs(l,{to:"/pricing",className:"text-sm text-[#D97757] hover:text-[#C4613F] transition-colors",children:[t("home.viewAllModels",{count:o.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:o.slice(0,8).map((s,a)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-[#E8DDD0] hover:border-[#D9C5B2] transition-colors",children:e.jsx("span",{className:"text-sm text-[#6B5D4F] font-mono",children:s.display_name||s.model_name})},s.id||a))})]})}),m.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-[#8B7D6E] mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:m.filter(s=>s.enabled).slice(0,3).map((s,a)=>{const h=s.quota_amount>0?s.quota_amount/N:0,n=v(o,h);return e.jsxs("div",{className:`rounded-xl p-6 flex flex-col border transition-all ${a===1?"border-[#D97757]/30 bg-[#D97757]/[0.04]":"border-[#E8DDD0] hover:border-[#D9C5B2]"}`,children:[a===1&&e.jsx("span",{className:"text-xs text-[#D97757] font-medium mb-2 uppercase tracking-wider",children:t("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-[#3D3024]",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-1",children:s.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-[#3D3024]",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-[#8B7D6E] line-through ml-2",children:["$",s.original_price]}),s.duration>0&&e.jsx("p",{className:"text-xs text-[#8B7D6E] mt-1",children:t("home.days",{count:s.duration})})]}),n&&n.equivDollars>h&&e.jsxs("p",{className:"text-xs text-[#D97757] mt-2",children:["🔥 ",t("packages.officialEquiv",{model:n.label,amount:Math.round(n.equivDollars)})]}),e.jsx(l,{to:i?"/packages":"/register",className:`mt-4 py-2.5 rounded-full font-medium text-sm text-center transition-colors ${a===1?"bg-[#D97757] text-white hover:bg-[#C4613F]":"bg-[#E8DDD0] text-[#3D3024] hover:bg-[#D9C5B2]"}`,children:t(i?"home.subscribe":"home.getStarted")})]},s.id)})})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-[#E8DDD0] pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-3",children:t("home.readyToStart")}),e.jsx("p",{className:"text-[#8B7D6E] mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:i?e.jsxs(l,{to:"/dashboard",className:"px-7 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(l,{to:"/register",className:"px-7 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:[t("home.createFreeAccount")," →"]}),e.jsx(l,{to:"/login",className:"px-7 py-3 text-[#8B7D6E] font-medium text-sm hover:text-[#3D3024] transition-colors",children:t("home.signIn")})]})})]})})})]})}export{S as default}; diff --git a/dist/assets/Home-ahtkcEPh.js b/dist/assets/Home-ahtkcEPh.js deleted file mode 100644 index 35701b5..0000000 --- a/dist/assets/Home-ahtkcEPh.js +++ /dev/null @@ -1 +0,0 @@ -import{u,a as b,r as d,f as j,l as p,j as e,L as a}from"./index-Cvtin-Z6.js";import{_ as c}from"./CountUp-B7vSEX1I.js";import{F as l}from"./FadeContent-DNRHLB7E.js";import{u as y}from"./useTranslation-BeJE8l6a.js";function k(){const{t}=y(),{user:i}=u(),{site:n}=b(),[m,h]=d.useState([]),[x,g]=d.useState([]);d.useEffect(()=>{j().then(s=>{s.data.success&&h(s.data.data||[])}).catch(()=>{}),p().then(s=>{s.data.success&&g(s.data.data||[])}).catch(()=>{})},[]);const o=m.filter(s=>s.enabled!==!1);return e.jsxs("div",{children:[e.jsxs("section",{className:"max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(l,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("p",{className:"text-sm font-medium text-blue-600 mb-4 tracking-wide",children:t("home.heroTagline")||"AI API Platform"}),e.jsx("h1",{className:"text-5xl md:text-6xl font-heading font-bold text-gray-900 leading-[1.1] tracking-tight",children:(n==null?void 0:n.name)||t("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-gray-500 mt-6 leading-relaxed max-w-xl mx-auto",children:t("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:i?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:t("home.getStarted")}),e.jsxs(a,{to:"/pricing",className:"px-7 py-3 text-gray-500 font-medium text-sm hover:text-gray-900 transition-colors",children:[t("home.viewPricing")," →"]})]})})]})}),e.jsx(l,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"grid grid-cols-3 gap-8 max-w-lg mx-auto mt-20 pt-10 border-t border-gray-100",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:[e.jsx(c,{from:0,to:o.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:t("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:t("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:t("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-gray-900 mb-3",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-gray-500",children:t("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:t("home.lightningFast"),desc:t("home.lightningFastDesc"),color:"blue",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:t("home.securePrivate"),desc:t("home.securePrivateDesc"),color:"indigo",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:t("home.payAsYouGo"),desc:t("home.payAsYouGoDesc"),color:"emerald",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((s,r)=>e.jsxs("div",{className:"p-6 rounded-xl border border-gray-100 hover:border-gray-200 hover:shadow-sm transition-all",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg bg-${s.color}-50 text-${s.color}-600 flex items-center justify-center mb-4`,children:s.icon}),e.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-2",children:s.title}),e.jsx("p",{className:"text-sm text-gray-500 leading-relaxed",children:s.desc})]},r))})]})}),o.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-gray-900 mb-2",children:t("home.availableModels")}),e.jsx("p",{className:"text-gray-500",children:t("home.availableModelsDesc",{count:o.length})})]}),o.length>8&&e.jsxs(a,{to:"/pricing",className:"text-sm text-blue-600 hover:text-blue-700 transition-colors",children:[t("home.viewAllModels",{count:o.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:o.slice(0,8).map((s,r)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-gray-100 hover:border-gray-200 transition-colors",children:e.jsx("span",{className:"text-sm text-gray-600 font-mono",children:s.display_name||s.model_name})},s.id||r))})]})}),x.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(l,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-gray-900 mb-2",children:t("home.plansPackages")}),e.jsx("p",{className:"text-gray-500 mb-10",children:t("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:x.filter(s=>s.enabled).slice(0,3).map((s,r)=>e.jsxs("div",{className:`rounded-xl p-6 flex flex-col border transition-all ${r===1?"border-blue-200 bg-blue-50/50 shadow-sm":"border-gray-100 hover:border-gray-200"}`,children:[r===1&&e.jsx("span",{className:"text-xs text-blue-600 font-semibold mb-2 uppercase tracking-wider",children:t("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-gray-900",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:s.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-gray-900",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-gray-500 line-through ml-2",children:["$",s.original_price]}),s.duration>0&&e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:t("home.days",{count:s.duration})})]}),e.jsx(a,{to:i?"/packages":"/register",className:`mt-4 py-2.5 rounded-lg font-medium text-sm text-center transition-colors ${r===1?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:t(i?"home.subscribe":"home.getStarted")})]},s.id))})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(l,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-gray-100 pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-gray-900 mb-3",children:t("home.readyToStart")}),e.jsx("p",{className:"text-gray-500 mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:i?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:[t("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:[t("home.createFreeAccount")," →"]}),e.jsx(a,{to:"/login",className:"px-7 py-3 text-gray-500 font-medium text-sm hover:text-gray-900 transition-colors",children:t("home.signIn")})]})})]})})})]})}export{k as default}; diff --git a/dist/assets/Home-jCVAuf09.js b/dist/assets/Home-jCVAuf09.js new file mode 100644 index 0000000..9f987c6 --- /dev/null +++ b/dist/assets/Home-jCVAuf09.js @@ -0,0 +1 @@ +import{u as b,a as g,r as c,f as v,l as N,j as e,L as a,Q as f}from"./index-ClhW4pXr.js";import{c as w}from"./officialEquiv-COyn5GUF.js";import{C as x}from"./CountUp-DKNTcuWU.js";import{F as r}from"./FadeContent-Cswq021Y.js";import{u as y}from"./useTranslation-Pq_l7wMn.js";function L(){const{t:s}=y(),{user:i}=b(),{site:d}=g(),[u,p]=c.useState([]),[m,j]=c.useState([]);c.useEffect(()=>{v().then(t=>{t.data.success&&p(t.data.data||[])}).catch(()=>{}),N().then(t=>{t.data.success&&j(t.data.data||[])}).catch(()=>{})},[]);const l=u.filter(t=>t.enabled!==!1);return e.jsxs("div",{children:[e.jsxs("section",{className:"max-w-6xl mx-auto px-6 lg:px-8 pt-32 pb-20",children:[e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-bold text-slate-900 leading-[1.1] tracking-tight",children:(d==null?void 0:d.name)||s("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-slate-500 mt-6 leading-relaxed max-w-xl",children:s("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4 mt-10",children:i?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-slate-900 text-white font-medium text-sm hover:bg-slate-800 transition-colors",children:[s("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-7 py-3 rounded-lg bg-slate-900 text-white font-medium text-sm hover:bg-slate-800 transition-colors",children:s("home.getStarted")}),e.jsxs(a,{to:"/pricing",className:"px-7 py-3 text-slate-500 font-medium text-sm hover:text-slate-900 transition-colors",children:[s("home.viewPricing")," →"]})]})})]})}),e.jsx(r,{blur:!0,duration:800,delay:400,children:e.jsxs("div",{className:"flex items-center divide-x divide-slate-200 mt-20 pt-10 border-t border-slate-200",children:[e.jsxs("div",{className:"pr-12",children:[e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:[e.jsx(x,{from:0,to:l.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:s("home.aiModels")})]}),e.jsxs("div",{className:"px-12",children:[e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:[e.jsx(x,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:s("home.uptime")})]}),e.jsxs("div",{className:"pl-12",children:[e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:["<",e.jsx(x,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:s("home.latency")})]})]})})]}),e.jsx("section",{className:"bg-slate-50 border-y border-slate-200",children:e.jsx("div",{className:"max-w-6xl mx-auto px-6 lg:px-8 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:s("home.whyChooseUs")}),e.jsx("p",{className:"text-slate-500 mb-10",children:s("home.whyChooseUsDesc")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{title:s("home.lightningFast"),desc:s("home.lightningFastDesc"),icon:e.jsx("svg",{className:"w-5 h-5 text-slate-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:s("home.securePrivate"),desc:s("home.securePrivateDesc"),icon:e.jsx("svg",{className:"w-5 h-5 text-slate-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:s("home.payAsYouGo"),desc:s("home.payAsYouGoDesc"),icon:e.jsx("svg",{className:"w-5 h-5 text-slate-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((t,o)=>e.jsxs("div",{className:"p-6 rounded-xl bg-white border border-slate-200 hover:shadow-sm transition-all",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-slate-100 flex items-center justify-center mb-4",children:t.icon}),e.jsx("h3",{className:"text-base font-semibold text-slate-900 mb-2",children:t.title}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed",children:t.desc})]},o))})]})})}),l.length>0&&e.jsx("section",{className:"max-w-6xl mx-auto px-6 lg:px-8 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:s("home.availableModels")}),e.jsx("p",{className:"text-slate-500",children:s("home.availableModelsDesc",{count:l.length})})]}),l.length>8&&e.jsxs(a,{to:"/pricing",className:"text-sm text-slate-600 hover:text-slate-900 transition-colors font-medium",children:[s("home.viewAllModels",{count:l.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:l.slice(0,8).map((t,o)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-slate-200 hover:border-slate-300 transition-colors",children:e.jsx("span",{className:"text-sm text-slate-600 font-mono",children:t.display_name||t.model_name})},t.id||o))})]})}),m.length>0&&e.jsx("section",{className:"max-w-6xl mx-auto px-6 lg:px-8 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:s("home.plansPackages")}),e.jsx("p",{className:"text-slate-500 mb-10",children:s("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5 max-w-4xl",children:m.filter(t=>t.enabled).slice(0,3).map((t,o)=>{const h=t.quota_amount>0?t.quota_amount/f:0,n=w(l,h);return e.jsxs("div",{className:`rounded-xl p-6 flex flex-col border transition-all ${o===1?"border-slate-900 shadow-sm":"border-slate-200 hover:border-slate-300"}`,children:[o===1&&e.jsx("span",{className:"text-xs text-slate-900 font-semibold mb-2 uppercase tracking-wider",children:s("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-slate-900",children:t.name}),t.description&&e.jsx("p",{className:"text-sm text-slate-500 mt-1",children:t.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-slate-900",children:["$",t.price]}),t.original_price>t.price&&e.jsxs("span",{className:"text-sm text-slate-500 line-through ml-2",children:["$",t.original_price]}),t.duration>0&&e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:s("home.days",{count:t.duration})})]}),n&&n.equivDollars>h&&e.jsxs("p",{className:"text-xs text-amber-600 mt-2",children:["🔥 ",s("packages.officialEquiv",{model:n.label,amount:Math.round(n.equivDollars)})]}),e.jsx(a,{to:i?"/packages":"/register",className:`mt-4 py-2.5 rounded-lg font-medium text-sm text-center transition-colors ${o===1?"bg-slate-900 text-white hover:bg-slate-800":"bg-slate-100 text-slate-700 hover:bg-slate-200"}`,children:s(i?"home.subscribe":"home.getStarted")})]},t.id)})})]})}),e.jsx("section",{className:"bg-slate-900",children:e.jsx("div",{className:"max-w-6xl mx-auto px-6 lg:px-8 py-20 text-center",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-bold text-white mb-3",children:s("home.readyToStart")}),e.jsx("p",{className:"text-slate-400 mb-8 max-w-md mx-auto",children:s("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:i?e.jsxs(a,{to:"/dashboard",className:"px-7 py-3 rounded-lg bg-white text-slate-900 font-medium text-sm hover:bg-slate-100 transition-colors",children:[s("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-lg bg-white text-slate-900 font-medium text-sm hover:bg-slate-100 transition-colors",children:[s("home.createFreeAccount")," →"]}),e.jsx(a,{to:"/login",className:"px-7 py-3 text-slate-400 font-medium text-sm hover:text-white transition-colors",children:s("home.signIn")})]})})]})})})]})}export{L as default}; diff --git a/dist/assets/Home-jHukPhWm.js b/dist/assets/Home-jHukPhWm.js new file mode 100644 index 0000000..0648087 --- /dev/null +++ b/dist/assets/Home-jHukPhWm.js @@ -0,0 +1 @@ +import{u as p,a as j,r as c,f as g,l as v,j as e,L as l,Q as f}from"./index-ClhW4pXr.js";import{c as w}from"./officialEquiv-COyn5GUF.js";import{C as N}from"./CountUp-DKNTcuWU.js";import{F as o}from"./FadeContent-Cswq021Y.js";import{u as y}from"./useTranslation-Pq_l7wMn.js";function q(){const{t:s}=y(),{user:i}=p(),{site:d}=j(),[h,u]=c.useState([]),[x,b]=c.useState([]);c.useEffect(()=>{g().then(t=>{t.data.success&&u(t.data.data||[])}).catch(()=>{}),v().then(t=>{t.data.success&&b(t.data.data||[])}).catch(()=>{})},[]);const r=h.filter(t=>t.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute -top-40 left-1/4 w-[600px] h-[600px] bg-violet-600/10 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute top-20 right-1/4 w-[400px] h-[400px] bg-blue-600/8 rounded-full blur-3xl"})]}),e.jsxs("section",{className:"relative max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(o,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("h1",{className:"text-5xl md:text-7xl font-heading font-extrabold text-white leading-[1.08] tracking-tight",children:(d==null?void 0:d.name)||s("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl mx-auto",children:s("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:i?e.jsx(l,{to:"/dashboard",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.goToDashboard")}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.getStarted")}),e.jsx(l,{to:"/pricing",className:"px-8 py-3.5 rounded-2xl border border-white/15 text-white font-medium text-sm hover:bg-white/5 transition-all",children:s("home.viewPricing")})]})})]})}),e.jsx(o,{blur:!0,duration:800,delay:400,children:e.jsx("div",{className:"grid grid-cols-3 gap-6 max-w-xl mx-auto mt-24",children:[{value:r.length||50,suffix:"+",label:s("home.aiModels")},{value:99.9,suffix:"%",label:s("home.uptime")},{value:50,suffix:"ms",label:s("home.latency"),prefix:"<"}].map((t,a)=>e.jsxs("div",{className:"text-center p-5 rounded-2xl bg-white/[0.03] border border-white/[0.06]",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[t.prefix,e.jsx(N,{from:0,to:t.value,duration:2}),t.suffix]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t.label})]},a))})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:s("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500",children:s("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:s("home.lightningFast"),desc:s("home.lightningFastDesc"),color:"violet",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:s("home.securePrivate"),desc:s("home.securePrivateDesc"),color:"blue",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:s("home.payAsYouGo"),desc:s("home.payAsYouGoDesc"),color:"cyan",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((t,a)=>e.jsxs("div",{className:"p-6 rounded-xl bg-white/[0.02] border border-white/[0.06] hover:border-white/[0.12] transition-colors",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg bg-${t.color}-500/10 text-${t.color}-400 flex items-center justify-center mb-4`,children:t.icon}),e.jsx("h3",{className:"text-base font-semibold text-white mb-2",children:t.title}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:t.desc})]},a))})]})}),r.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:s("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:s("home.availableModelsDesc",{count:r.length})})]}),r.length>8&&e.jsxs(l,{to:"/pricing",className:"text-sm text-violet-400 hover:text-violet-300 transition-colors",children:[s("home.viewAllModels",{count:r.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:r.slice(0,8).map((t,a)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-white/[0.06] hover:border-white/[0.12] transition-colors",children:e.jsx("span",{className:"text-sm text-neutral-300 font-mono",children:t.display_name||t.model_name})},t.id||a))})]})}),x.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:s("home.plansPackages")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:s("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:x.filter(t=>t.enabled).slice(0,3).map((t,a)=>{const m=t.quota_amount>0?t.quota_amount/f:0,n=w(r,m);return e.jsxs("div",{className:`rounded-2xl p-6 flex flex-col border transition-colors ${a===1?"bg-white/[0.04] border-white/[0.12]":"bg-white/[0.02] border-white/[0.06] hover:border-white/[0.1]"}`,children:[a===1&&e.jsx("span",{className:"text-xs text-violet-400 font-medium mb-2 uppercase tracking-wider",children:s("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-white",children:t.name}),t.description&&e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",t.price]}),t.original_price>t.price&&e.jsxs("span",{className:"text-sm text-neutral-600 line-through ml-2",children:["$",t.original_price]}),t.duration>0&&e.jsx("p",{className:"text-xs text-neutral-600 mt-1",children:s("home.days",{count:t.duration})})]}),n&&n.equivDollars>m&&e.jsxs("p",{className:"text-xs text-amber-300/80 mt-2",children:["🔥 ",s("packages.officialEquiv",{model:n.label,amount:Math.round(n.equivDollars)})]}),e.jsx(l,{to:i?"/packages":"/register",className:`mt-4 py-2.5 rounded-xl font-medium text-sm text-center transition-colors ${a===1?"bg-white text-black hover:bg-neutral-100":"bg-white/[0.06] text-white hover:bg-white/[0.1]"}`,children:s(i?"home.subscribe":"home.getStarted")})]},t.id)})})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(o,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-white/[0.06] pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:s("home.readyToStart")}),e.jsx("p",{className:"text-neutral-500 mb-8 max-w-md mx-auto",children:s("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:i?e.jsx(l,{to:"/dashboard",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.goToDashboard")}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.createFreeAccount")}),e.jsx(l,{to:"/login",className:"px-8 py-3.5 rounded-2xl border border-white/15 text-white font-medium text-sm hover:bg-white/5 transition-all",children:s("home.signIn")})]})})]})})})]})}export{q as default}; diff --git a/dist/assets/LanguageSwitch-BGa_hr1Z.js b/dist/assets/LanguageSwitch-B7-4CWQP.js similarity index 86% rename from dist/assets/LanguageSwitch-BGa_hr1Z.js rename to dist/assets/LanguageSwitch-B7-4CWQP.js index 3b1e106..cdcb81d 100644 --- a/dist/assets/LanguageSwitch-BGa_hr1Z.js +++ b/dist/assets/LanguageSwitch-B7-4CWQP.js @@ -1 +1 @@ -import{j as n}from"./index-Cvtin-Z6.js";import{u as a}from"./useTranslation-BeJE8l6a.js";function u({className:t=""}){var s;const{i18n:e}=a(),o=(s=e.language)==null?void 0:s.startsWith("zh"),r=()=>{e.changeLanguage(o?"en":"zh")};return n.jsxs("button",{onClick:r,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs transition-colors ${t}`,"aria-label":"Switch language",children:[n.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:[n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.6 9h16.8M3.6 15h16.8"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3a15.3 15.3 0 0 1 4 9 15.3 15.3 0 0 1-4 9 15.3 15.3 0 0 1-4-9 15.3 15.3 0 0 1 4-9Z"})]}),n.jsx("span",{children:o?"EN":"中文"})]})}export{u as L}; +import{j as n}from"./index-ClhW4pXr.js";import{u as a}from"./useTranslation-Pq_l7wMn.js";function u({className:t=""}){var s;const{i18n:e}=a(),o=(s=e.language)==null?void 0:s.startsWith("zh"),r=()=>{e.changeLanguage(o?"en":"zh")};return n.jsxs("button",{onClick:r,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs transition-colors ${t}`,"aria-label":"Switch language",children:[n.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:[n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.6 9h16.8M3.6 15h16.8"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3a15.3 15.3 0 0 1 4 9 15.3 15.3 0 0 1-4 9 15.3 15.3 0 0 1-4-9 15.3 15.3 0 0 1 4-9Z"})]}),n.jsx("span",{children:o?"EN":"中文"})]})}export{u as L}; diff --git a/dist/assets/Layout-B4YlzwXv.js b/dist/assets/Layout-B2Isp14g.js similarity index 97% rename from dist/assets/Layout-B4YlzwXv.js rename to dist/assets/Layout-B2Isp14g.js index ee87cd6..319ed4e 100644 --- a/dist/assets/Layout-B4YlzwXv.js +++ b/dist/assets/Layout-B2Isp14g.js @@ -1 +1 @@ -import{u as h,a as u,b as p,c as b,r as g,j as e,L as l,O as v}from"./index-Cvtin-Z6.js";import{L as j}from"./LanguageSwitch-BGa_hr1Z.js";import{u as f}from"./useTranslation-BeJE8l6a.js";function M(){const{t:a}=f(),{user:n,logout:o}=h(),{site:t}=u(),m=p(),x=b(),[i,c]=g.useState(!1),r=(t==null?void 0:t.name)||"AI Platform",d=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.auth||n);return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-brand-600/20 border-b border-brand-500/20 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-brand-200",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-xl bg-black/60 border-b border-white/[0.06]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(l,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:r,className:"h-8 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-brand-500 to-purple-600 flex items-center justify-center text-white font-bold text-sm",children:r.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-white group-hover:text-brand-400 transition-colors",children:r})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:d.map(s=>e.jsx(N,{to:s.to,active:x.pathname===s.to,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"text-neutral-400 hover:text-white hover:bg-white/5"}),n?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-400 hidden sm:block",children:n.display_name||n.username}),e.jsx("button",{onClick:async()=>{await o(),m("/")},className:"text-sm text-neutral-400 hover:text-white transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/login",className:"text-sm text-neutral-300 hover:text-white transition-colors px-3 py-1.5 hidden sm:block",children:a("nav.login")}),e.jsx(l,{to:"/register",className:"btn-primary text-sm !px-4 !py-1.5",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded-lg hover:bg-white/5 transition-colors",onClick:()=>c(!i),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-neutral-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),i&&e.jsx("div",{className:"md:hidden border-t border-white/[0.06] bg-black/90 backdrop-blur-xl",children:e.jsxs("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:[d.map(s=>e.jsx(l,{to:s.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded-lg transition-colors ${x.pathname===s.to?"text-brand-400 bg-brand-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:s.label},s.to)),!n&&e.jsx(l,{to:"/login",onClick:()=>c(!1),className:"px-3 py-2 text-sm text-neutral-400 hover:text-white rounded-lg hover:bg-white/5 transition-colors sm:hidden",children:a("nav.login")})]})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-white/[0.06] mt-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-neutral-500",children:["© ",new Date().getFullYear()," ",r,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-neutral-500 hover:text-neutral-300 transition-colors",children:a("nav.contact")})})]})})]})}function N({to:a,children:n,active:o}){return e.jsx(l,{to:a,className:`px-3 py-1.5 text-sm rounded-lg transition-all ${o?"text-brand-400 bg-brand-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:n})}export{M as default}; +import{u as h,a as u,b as p,c as b,r as g,j as e,L as l,O as v}from"./index-ClhW4pXr.js";import{L as j}from"./LanguageSwitch-B7-4CWQP.js";import{u as f}from"./useTranslation-Pq_l7wMn.js";function M(){const{t:a}=f(),{user:n,logout:o}=h(),{site:t}=u(),m=p(),x=b(),[i,c]=g.useState(!1),r=(t==null?void 0:t.name)||"AI Platform",d=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.auth||n);return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-brand-600/20 border-b border-brand-500/20 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-brand-200",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-xl bg-black/60 border-b border-white/[0.06]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(l,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:r,className:"h-8 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-brand-500 to-purple-600 flex items-center justify-center text-white font-bold text-sm",children:r.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-white group-hover:text-brand-400 transition-colors",children:r})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:d.map(s=>e.jsx(N,{to:s.to,active:x.pathname===s.to,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"text-neutral-400 hover:text-white hover:bg-white/5"}),n?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-400 hidden sm:block",children:n.display_name||n.username}),e.jsx("button",{onClick:async()=>{await o(),m("/")},className:"text-sm text-neutral-400 hover:text-white transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/login",className:"text-sm text-neutral-300 hover:text-white transition-colors px-3 py-1.5 hidden sm:block",children:a("nav.login")}),e.jsx(l,{to:"/register",className:"btn-primary text-sm !px-4 !py-1.5",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded-lg hover:bg-white/5 transition-colors",onClick:()=>c(!i),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-neutral-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),i&&e.jsx("div",{className:"md:hidden border-t border-white/[0.06] bg-black/90 backdrop-blur-xl",children:e.jsxs("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:[d.map(s=>e.jsx(l,{to:s.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded-lg transition-colors ${x.pathname===s.to?"text-brand-400 bg-brand-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:s.label},s.to)),!n&&e.jsx(l,{to:"/login",onClick:()=>c(!1),className:"px-3 py-2 text-sm text-neutral-400 hover:text-white rounded-lg hover:bg-white/5 transition-colors sm:hidden",children:a("nav.login")})]})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-white/[0.06] mt-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-neutral-500",children:["© ",new Date().getFullYear()," ",r,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-neutral-500 hover:text-neutral-300 transition-colors",children:a("nav.contact")})})]})})]})}function N({to:a,children:n,active:o}){return e.jsx(l,{to:a,className:`px-3 py-1.5 text-sm rounded-lg transition-all ${o?"text-brand-400 bg-brand-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:n})}export{M as default}; diff --git a/dist/assets/Layout-BZYZ8jj1.js b/dist/assets/Layout-DltGFkEN.js similarity index 97% rename from dist/assets/Layout-BZYZ8jj1.js rename to dist/assets/Layout-DltGFkEN.js index 7f8f0df..e302898 100644 --- a/dist/assets/Layout-BZYZ8jj1.js +++ b/dist/assets/Layout-DltGFkEN.js @@ -1 +1 @@ -import{u as h,a as u,b as p,c as b,r as f,j as e,L as s,O as g}from"./index-Cvtin-Z6.js";import{L as j}from"./LanguageSwitch-BGa_hr1Z.js";import{u as v}from"./useTranslation-BeJE8l6a.js";function L(){const{t:o}=v(),{user:r,logout:i}=h(),{site:t}=u(),x=p(),m=b(),[n,d]=f.useState(!1),l=(t==null?void 0:t.name)||"AI Platform",c=[{to:"/",label:o("nav.home"),auth:!1},{to:"/pricing",label:o("nav.pricing"),auth:!1},{to:"/packages",label:o("nav.packages"),auth:!1},{to:"/dashboard",label:o("nav.dashboard"),auth:!0},{to:"/tokens",label:o("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:o("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||r);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-[#030712] text-white",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-emerald-500/5 border-b border-emerald-500/10 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-emerald-300/80 font-mono",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-xl bg-[#030712]/80 border-b border-emerald-500/[0.08]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-14 flex items-center justify-between",children:[e.jsxs(s,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:l,className:"h-7 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded bg-emerald-500/10 border border-emerald-500/20 flex items-center justify-center text-emerald-400 font-bold font-mono text-sm",children:l.charAt(0)}),e.jsx("span",{className:"text-base font-semibold text-emerald-400 font-mono group-hover:text-emerald-300 transition-colors tracking-wide",children:l})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:c.map(a=>e.jsx(s,{to:a.to,className:`px-3 py-1.5 text-sm font-mono rounded transition-all ${m.pathname===a.to?"text-emerald-400 bg-emerald-500/10":"text-neutral-500 hover:text-emerald-400"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"text-neutral-500 hover:text-emerald-400 hover:bg-emerald-500/5 font-mono"}),r?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-500 font-mono hidden sm:block",children:r.display_name||r.username}),e.jsx("button",{onClick:async()=>{await i(),x("/")},className:"text-sm text-neutral-500 hover:text-emerald-400 font-mono transition-colors",children:o("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(s,{to:"/login",className:"text-sm text-neutral-500 hover:text-emerald-400 font-mono transition-colors hidden sm:block px-3 py-1.5",children:o("nav.login")}),e.jsx(s,{to:"/register",className:"px-4 py-1.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-sm font-mono hover:bg-emerald-500/15 transition-all",children:o("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded hover:bg-white/5",onClick:()=>d(!n),children:e.jsx("svg",{className:"w-5 h-5 text-emerald-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),n&&e.jsx("div",{className:"md:hidden border-t border-emerald-500/[0.08] bg-[#030712]/95 backdrop-blur-xl",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:c.map(a=>e.jsx(s,{to:a.to,onClick:()=>d(!1),className:`px-3 py-2 text-sm font-mono rounded transition-colors ${m.pathname===a.to?"text-emerald-400 bg-emerald-500/10":"text-neutral-500 hover:text-emerald-400"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(g,{})}),e.jsx("footer",{className:"border-t border-emerald-500/[0.08] mt-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-xs text-neutral-600 font-mono",children:["© ",new Date().getFullYear()," ",l]}),(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-xs text-neutral-600 hover:text-emerald-400 font-mono transition-colors",children:o("nav.contact")})]})})]})}export{L as default}; +import{u as h,a as u,b as p,c as b,r as f,j as e,L as s,O as g}from"./index-ClhW4pXr.js";import{L as j}from"./LanguageSwitch-B7-4CWQP.js";import{u as v}from"./useTranslation-Pq_l7wMn.js";function L(){const{t:o}=v(),{user:r,logout:i}=h(),{site:t}=u(),x=p(),m=b(),[n,d]=f.useState(!1),l=(t==null?void 0:t.name)||"AI Platform",c=[{to:"/",label:o("nav.home"),auth:!1},{to:"/pricing",label:o("nav.pricing"),auth:!1},{to:"/packages",label:o("nav.packages"),auth:!1},{to:"/dashboard",label:o("nav.dashboard"),auth:!0},{to:"/tokens",label:o("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:o("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||r);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-[#030712] text-white",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-emerald-500/5 border-b border-emerald-500/10 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-emerald-300/80 font-mono",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-xl bg-[#030712]/80 border-b border-emerald-500/[0.08]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-14 flex items-center justify-between",children:[e.jsxs(s,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:l,className:"h-7 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded bg-emerald-500/10 border border-emerald-500/20 flex items-center justify-center text-emerald-400 font-bold font-mono text-sm",children:l.charAt(0)}),e.jsx("span",{className:"text-base font-semibold text-emerald-400 font-mono group-hover:text-emerald-300 transition-colors tracking-wide",children:l})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:c.map(a=>e.jsx(s,{to:a.to,className:`px-3 py-1.5 text-sm font-mono rounded transition-all ${m.pathname===a.to?"text-emerald-400 bg-emerald-500/10":"text-neutral-500 hover:text-emerald-400"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"text-neutral-500 hover:text-emerald-400 hover:bg-emerald-500/5 font-mono"}),r?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-500 font-mono hidden sm:block",children:r.display_name||r.username}),e.jsx("button",{onClick:async()=>{await i(),x("/")},className:"text-sm text-neutral-500 hover:text-emerald-400 font-mono transition-colors",children:o("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(s,{to:"/login",className:"text-sm text-neutral-500 hover:text-emerald-400 font-mono transition-colors hidden sm:block px-3 py-1.5",children:o("nav.login")}),e.jsx(s,{to:"/register",className:"px-4 py-1.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-sm font-mono hover:bg-emerald-500/15 transition-all",children:o("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded hover:bg-white/5",onClick:()=>d(!n),children:e.jsx("svg",{className:"w-5 h-5 text-emerald-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),n&&e.jsx("div",{className:"md:hidden border-t border-emerald-500/[0.08] bg-[#030712]/95 backdrop-blur-xl",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:c.map(a=>e.jsx(s,{to:a.to,onClick:()=>d(!1),className:`px-3 py-2 text-sm font-mono rounded transition-colors ${m.pathname===a.to?"text-emerald-400 bg-emerald-500/10":"text-neutral-500 hover:text-emerald-400"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(g,{})}),e.jsx("footer",{className:"border-t border-emerald-500/[0.08] mt-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-xs text-neutral-600 font-mono",children:["© ",new Date().getFullYear()," ",l]}),(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-xs text-neutral-600 hover:text-emerald-400 font-mono transition-colors",children:o("nav.contact")})]})})]})}export{L as default}; diff --git a/dist/assets/Layout-D1kE7Hv7.js b/dist/assets/Layout-Dvtbvg20.js similarity index 96% rename from dist/assets/Layout-D1kE7Hv7.js rename to dist/assets/Layout-Dvtbvg20.js index 4df54ab..3941168 100644 --- a/dist/assets/Layout-D1kE7Hv7.js +++ b/dist/assets/Layout-Dvtbvg20.js @@ -1 +1 @@ -import{u as d,a as u,b as p,c as b,r as j,j as e,L as n,O as g}from"./index-Cvtin-Z6.js";import{L as v}from"./LanguageSwitch-BGa_hr1Z.js";import{u as f}from"./useTranslation-BeJE8l6a.js";function L(){const{t:s}=f(),{user:l,logout:m}=d(),{site:t}=u(),h=p(),i=b(),[r,c]=j.useState(!1),o=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||l);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-neutral-950 text-white",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"border-b border-neutral-800/60 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-neutral-400",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-lg bg-neutral-950/80 border-b border-neutral-800/40",children:[e.jsxs("div",{className:"max-w-5xl mx-auto px-6 h-14 flex items-center justify-between",children:[e.jsxs(n,{to:"/",className:"flex items-center gap-2.5 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:o,className:"h-7 w-auto"}):e.jsx("span",{className:"text-base font-semibold text-white",children:o}),(t==null?void 0:t.logo)&&e.jsx("span",{className:"text-base font-semibold text-white",children:o})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-6",children:x.map(a=>e.jsx(n,{to:a.to,className:`text-sm transition-colors ${i.pathname===a.to?"text-white":"text-neutral-500 hover:text-white"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(v,{className:"text-neutral-500 hover:text-white hover:bg-white/5"}),l?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-500 hidden sm:block",children:l.display_name||l.username}),e.jsx("button",{onClick:async()=>{await m(),h("/")},className:"text-sm text-neutral-500 hover:text-white transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(n,{to:"/login",className:"text-sm text-neutral-500 hover:text-white transition-colors hidden sm:block",children:s("nav.login")}),e.jsx(n,{to:"/register",className:"px-4 py-1.5 rounded-lg bg-white text-neutral-900 text-sm font-medium hover:bg-neutral-200 transition-colors",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1",onClick:()=>c(!r),children:e.jsx("svg",{className:"w-5 h-5 text-neutral-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-neutral-800/40 bg-neutral-950/95",children:e.jsx("nav",{className:"max-w-5xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(n,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded transition-colors ${i.pathname===a.to?"text-white":"text-neutral-500 hover:text-white"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(g,{})}),e.jsx("footer",{className:"border-t border-neutral-800/40 mt-auto",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-6 flex flex-col md:flex-row items-center justify-between gap-3",children:[e.jsxs("p",{className:"text-xs text-neutral-600",children:["© ",new Date().getFullYear()," ",o]}),(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-xs text-neutral-600 hover:text-white transition-colors",children:s("nav.contact")})]})})]})}export{L as default}; +import{u as d,a as u,b as p,c as b,r as j,j as e,L as n,O as g}from"./index-ClhW4pXr.js";import{L as v}from"./LanguageSwitch-B7-4CWQP.js";import{u as f}from"./useTranslation-Pq_l7wMn.js";function L(){const{t:s}=f(),{user:l,logout:m}=d(),{site:t}=u(),h=p(),i=b(),[r,c]=j.useState(!1),o=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||l);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-neutral-950 text-white",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"border-b border-neutral-800/60 text-center py-2 px-4",children:e.jsx("p",{className:"text-sm text-neutral-400",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-lg bg-neutral-950/80 border-b border-neutral-800/40",children:[e.jsxs("div",{className:"max-w-5xl mx-auto px-6 h-14 flex items-center justify-between",children:[e.jsxs(n,{to:"/",className:"flex items-center gap-2.5 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:o,className:"h-7 w-auto"}):e.jsx("span",{className:"text-base font-semibold text-white",children:o}),(t==null?void 0:t.logo)&&e.jsx("span",{className:"text-base font-semibold text-white",children:o})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-6",children:x.map(a=>e.jsx(n,{to:a.to,className:`text-sm transition-colors ${i.pathname===a.to?"text-white":"text-neutral-500 hover:text-white"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(v,{className:"text-neutral-500 hover:text-white hover:bg-white/5"}),l?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-500 hidden sm:block",children:l.display_name||l.username}),e.jsx("button",{onClick:async()=>{await m(),h("/")},className:"text-sm text-neutral-500 hover:text-white transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(n,{to:"/login",className:"text-sm text-neutral-500 hover:text-white transition-colors hidden sm:block",children:s("nav.login")}),e.jsx(n,{to:"/register",className:"px-4 py-1.5 rounded-lg bg-white text-neutral-900 text-sm font-medium hover:bg-neutral-200 transition-colors",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1",onClick:()=>c(!r),children:e.jsx("svg",{className:"w-5 h-5 text-neutral-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-neutral-800/40 bg-neutral-950/95",children:e.jsx("nav",{className:"max-w-5xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(n,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded transition-colors ${i.pathname===a.to?"text-white":"text-neutral-500 hover:text-white"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(g,{})}),e.jsx("footer",{className:"border-t border-neutral-800/40 mt-auto",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-6 flex flex-col md:flex-row items-center justify-between gap-3",children:[e.jsxs("p",{className:"text-xs text-neutral-600",children:["© ",new Date().getFullYear()," ",o]}),(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-xs text-neutral-600 hover:text-white transition-colors",children:s("nav.contact")})]})})]})}export{L as default}; diff --git a/dist/assets/Layout-s3BpODFZ.js b/dist/assets/Layout-NPp3SVTh.js similarity index 96% rename from dist/assets/Layout-s3BpODFZ.js rename to dist/assets/Layout-NPp3SVTh.js index d4df4e4..63ce463 100644 --- a/dist/assets/Layout-s3BpODFZ.js +++ b/dist/assets/Layout-NPp3SVTh.js @@ -1 +1 @@ -import{u as h,a as g,b as u,c as b,r as p,j as e,L as r,O as v}from"./index-Cvtin-Z6.js";import{L as j}from"./LanguageSwitch-BGa_hr1Z.js";import{u as y}from"./useTranslation-BeJE8l6a.js";function L(){const{t:s}=y(),{user:o,logout:m}=h(),{site:t}=g(),d=u(),i=b(),[n,c]=p.useState(!1),l=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||o);return e.jsxs("div",{className:"theme-light min-h-screen flex flex-col bg-white text-gray-900",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-blue-50 border-b border-blue-100 text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-blue-700",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 bg-white/80 backdrop-blur-xl border-b border-gray-100",children:[e.jsxs("div",{className:"max-w-6xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(r,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:l,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-blue-600 to-indigo-600 flex items-center justify-center text-white font-bold text-sm shadow-sm",children:l.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-gray-900 group-hover:text-blue-600 transition-colors",children:l})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:x.map(a=>e.jsx(r,{to:a.to,className:`px-3.5 py-2 text-sm rounded-lg transition-all ${i.pathname===a.to?"text-blue-600 bg-blue-50 font-medium":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"text-gray-400 hover:text-gray-700 hover:bg-gray-50"}),o?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-gray-500 hidden sm:block",children:o.display_name||o.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-gray-400 hover:text-gray-700 transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(r,{to:"/login",className:"text-sm text-gray-500 hover:text-gray-900 px-3 py-2 hidden sm:block transition-colors",children:s("nav.login")}),e.jsx(r,{to:"/register",className:"px-5 py-2 rounded-lg bg-blue-600 text-white text-sm font-medium hover:bg-blue-700 transition-colors shadow-sm",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-2 rounded-lg hover:bg-gray-50 transition-colors",onClick:()=>c(!n),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),n&&e.jsx("div",{className:"md:hidden border-t border-gray-100 bg-white",children:e.jsx("nav",{className:"max-w-6xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(r,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2.5 text-sm rounded-lg transition-colors ${i.pathname===a.to?"text-blue-600 bg-blue-50 font-medium":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-gray-100 mt-auto bg-gray-50/50",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-gray-400",children:["© ",new Date().getFullYear()," ",l,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-gray-400 hover:text-gray-600 transition-colors",children:s("nav.contact")})})]})})]})}export{L as default}; +import{u as h,a as g,b as u,c as b,r as p,j as e,L as r,O as v}from"./index-ClhW4pXr.js";import{L as j}from"./LanguageSwitch-B7-4CWQP.js";import{u as y}from"./useTranslation-Pq_l7wMn.js";function L(){const{t:s}=y(),{user:o,logout:m}=h(),{site:t}=g(),d=u(),i=b(),[n,c]=p.useState(!1),l=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||o);return e.jsxs("div",{className:"theme-light min-h-screen flex flex-col bg-white text-gray-900",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-blue-50 border-b border-blue-100 text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-blue-700",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 bg-white/80 backdrop-blur-xl border-b border-gray-100",children:[e.jsxs("div",{className:"max-w-6xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(r,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:l,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-blue-600 to-indigo-600 flex items-center justify-center text-white font-bold text-sm shadow-sm",children:l.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-gray-900 group-hover:text-blue-600 transition-colors",children:l})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:x.map(a=>e.jsx(r,{to:a.to,className:`px-3.5 py-2 text-sm rounded-lg transition-all ${i.pathname===a.to?"text-blue-600 bg-blue-50 font-medium":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"text-gray-400 hover:text-gray-700 hover:bg-gray-50"}),o?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-gray-500 hidden sm:block",children:o.display_name||o.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-gray-400 hover:text-gray-700 transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(r,{to:"/login",className:"text-sm text-gray-500 hover:text-gray-900 px-3 py-2 hidden sm:block transition-colors",children:s("nav.login")}),e.jsx(r,{to:"/register",className:"px-5 py-2 rounded-lg bg-blue-600 text-white text-sm font-medium hover:bg-blue-700 transition-colors shadow-sm",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-2 rounded-lg hover:bg-gray-50 transition-colors",onClick:()=>c(!n),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),n&&e.jsx("div",{className:"md:hidden border-t border-gray-100 bg-white",children:e.jsx("nav",{className:"max-w-6xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(r,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2.5 text-sm rounded-lg transition-colors ${i.pathname===a.to?"text-blue-600 bg-blue-50 font-medium":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-gray-100 mt-auto bg-gray-50/50",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-gray-400",children:["© ",new Date().getFullYear()," ",l,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-gray-400 hover:text-gray-600 transition-colors",children:s("nav.contact")})})]})})]})}export{L as default}; diff --git a/dist/assets/Layout-4QA5HuBu.js b/dist/assets/Layout-kkdZeTHc.js similarity index 97% rename from dist/assets/Layout-4QA5HuBu.js rename to dist/assets/Layout-kkdZeTHc.js index 205f3be..2bad688 100644 --- a/dist/assets/Layout-4QA5HuBu.js +++ b/dist/assets/Layout-kkdZeTHc.js @@ -1 +1 @@ -import{u as h,a as u,b,c as p,r as g,j as e,L as l,O as v}from"./index-Cvtin-Z6.js";import{L as f}from"./LanguageSwitch-BGa_hr1Z.js";import{u as j}from"./useTranslation-BeJE8l6a.js";function L(){const{t:s}=j(),{user:o,logout:d}=h(),{site:t}=u(),m=b(),i=p(),[r,c]=g.useState(!1),n=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||o);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-[#09090b]",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-gradient-to-r from-violet-600/10 via-blue-600/10 to-cyan-600/10 border-b border-white/[0.06] text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-neutral-300",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-2xl bg-[#09090b]/80 border-b border-white/[0.06]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(l,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:n,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-violet-500 via-blue-500 to-cyan-500 flex items-center justify-center text-white font-bold text-sm shadow-lg shadow-blue-500/20",children:n.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-white group-hover:text-blue-400 transition-colors",children:n})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1 bg-white/[0.04] rounded-full px-1.5 py-1 border border-white/[0.06]",children:x.map(a=>e.jsx(l,{to:a.to,className:`px-4 py-1.5 text-sm rounded-full transition-all ${i.pathname===a.to?"text-white bg-white/[0.08]":"text-neutral-400 hover:text-white"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{className:"text-neutral-400 hover:text-white hover:bg-white/5"}),o?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-400 hidden sm:block",children:o.display_name||o.username}),e.jsx("button",{onClick:async()=>{await d(),m("/")},className:"text-sm text-neutral-400 hover:text-white transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/login",className:"text-sm text-neutral-400 hover:text-white transition-colors px-3 py-1.5 hidden sm:block",children:s("nav.login")}),e.jsx(l,{to:"/register",className:"px-5 py-2 rounded-full bg-white text-black text-sm font-medium hover:bg-neutral-100 transition-all",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded-lg hover:bg-white/5 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-neutral-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-white/[0.06] bg-[#09090b]/95 backdrop-blur-2xl",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(l,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded-lg transition-colors ${i.pathname===a.to?"text-blue-400 bg-blue-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-white/[0.06] mt-auto bg-[#09090b]",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-neutral-500",children:["© ",new Date().getFullYear()," ",n,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-neutral-500 hover:text-neutral-300 transition-colors",children:s("nav.contact")})})]})})]})}export{L as default}; +import{u as h,a as u,b,c as p,r as g,j as e,L as l,O as v}from"./index-ClhW4pXr.js";import{L as f}from"./LanguageSwitch-B7-4CWQP.js";import{u as j}from"./useTranslation-Pq_l7wMn.js";function L(){const{t:s}=j(),{user:o,logout:d}=h(),{site:t}=u(),m=b(),i=p(),[r,c]=g.useState(!1),n=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.auth||o);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-[#09090b]",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-gradient-to-r from-violet-600/10 via-blue-600/10 to-cyan-600/10 border-b border-white/[0.06] text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-neutral-300",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 backdrop-blur-2xl bg-[#09090b]/80 border-b border-white/[0.06]",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(l,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:n,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-violet-500 via-blue-500 to-cyan-500 flex items-center justify-center text-white font-bold text-sm shadow-lg shadow-blue-500/20",children:n.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-white group-hover:text-blue-400 transition-colors",children:n})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1 bg-white/[0.04] rounded-full px-1.5 py-1 border border-white/[0.06]",children:x.map(a=>e.jsx(l,{to:a.to,className:`px-4 py-1.5 text-sm rounded-full transition-all ${i.pathname===a.to?"text-white bg-white/[0.08]":"text-neutral-400 hover:text-white"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{className:"text-neutral-400 hover:text-white hover:bg-white/5"}),o?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-400 hidden sm:block",children:o.display_name||o.username}),e.jsx("button",{onClick:async()=>{await d(),m("/")},className:"text-sm text-neutral-400 hover:text-white transition-colors",children:s("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/login",className:"text-sm text-neutral-400 hover:text-white transition-colors px-3 py-1.5 hidden sm:block",children:s("nav.login")}),e.jsx(l,{to:"/register",className:"px-5 py-2 rounded-full bg-white text-black text-sm font-medium hover:bg-neutral-100 transition-all",children:s("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-1.5 rounded-lg hover:bg-white/5 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-neutral-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-white/[0.06] bg-[#09090b]/95 backdrop-blur-2xl",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(a=>e.jsx(l,{to:a.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded-lg transition-colors ${i.pathname===a.to?"text-blue-400 bg-blue-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:a.label},a.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(v,{})}),e.jsx("footer",{className:"border-t border-white/[0.06] mt-auto bg-[#09090b]",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-neutral-500",children:["© ",new Date().getFullYear()," ",n,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-neutral-500 hover:text-neutral-300 transition-colors",children:s("nav.contact")})})]})})]})}export{L as default}; diff --git a/dist/assets/Layout-CtOOKniM.js b/dist/assets/Layout-nk7MlPO7.js similarity index 97% rename from dist/assets/Layout-CtOOKniM.js rename to dist/assets/Layout-nk7MlPO7.js index fc6f3f9..a9d5eaa 100644 --- a/dist/assets/Layout-CtOOKniM.js +++ b/dist/assets/Layout-nk7MlPO7.js @@ -1 +1 @@ -import{u as h,a as u,b as p,c as g,r as b,j as e,L as o,O as D}from"./index-Cvtin-Z6.js";import{L as f}from"./LanguageSwitch-BGa_hr1Z.js";import{u as v}from"./useTranslation-BeJE8l6a.js";function w(){const{t:a}=v(),{user:l,logout:m}=h(),{site:t}=u(),d=p(),i=g(),[r,c]=b.useState(!1),n=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.auth||l);return e.jsxs("div",{className:"theme-light theme-claude min-h-screen flex flex-col bg-[#FAF6F1] text-[#3D3024]",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-[#D97757] text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-white font-medium",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 bg-[#FAF6F1]/85 backdrop-blur-xl border-b border-[#E8DDD0]",children:[e.jsxs("div",{className:"max-w-6xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(o,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:n,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-2xl bg-gradient-to-br from-[#D97757] to-[#C4613F] flex items-center justify-center text-white font-bold text-sm shadow-sm",children:n.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-[#3D3024] group-hover:text-[#D97757] transition-colors",children:n})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:x.map(s=>e.jsx(o,{to:s.to,className:`px-3.5 py-2 text-sm rounded-lg transition-all ${i.pathname===s.to?"text-[#D97757] bg-[#D97757]/8 font-medium":"text-[#6B5D4F] hover:text-[#3D3024] hover:bg-[#E8DDD0]/50"}`,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{className:"text-[#8B7D6E] hover:text-[#3D3024] hover:bg-[#E8DDD0]/50"}),l?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-[#6B5D4F] hidden sm:block",children:l.display_name||l.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-[#8B7D6E] hover:text-[#3D3024] transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(o,{to:"/login",className:"text-sm text-[#6B5D4F] hover:text-[#3D3024] px-3 py-2 hidden sm:block transition-colors",children:a("nav.login")}),e.jsx(o,{to:"/register",className:"px-5 py-2 rounded-full bg-[#D97757] text-white text-sm font-medium hover:bg-[#C4613F] transition-colors shadow-sm",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-2 rounded-lg hover:bg-[#E8DDD0]/50 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-[#6B5D4F]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-[#E8DDD0] bg-[#FAF6F1]",children:e.jsx("nav",{className:"max-w-6xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(s=>e.jsx(o,{to:s.to,onClick:()=>c(!1),className:`px-3 py-2.5 text-sm rounded-lg transition-colors ${i.pathname===s.to?"text-[#D97757] bg-[#D97757]/8 font-medium":"text-[#6B5D4F] hover:text-[#3D3024] hover:bg-[#E8DDD0]/50"}`,children:s.label},s.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(D,{})}),e.jsx("footer",{className:"border-t border-[#E8DDD0] mt-auto bg-[#F5EEE6]",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-[#8B7D6E]",children:["© ",new Date().getFullYear()," ",n,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-[#8B7D6E] hover:text-[#D97757] transition-colors",children:a("nav.contact")})})]})})]})}export{w as default}; +import{u as h,a as u,b as p,c as g,r as b,j as e,L as o,O as D}from"./index-ClhW4pXr.js";import{L as f}from"./LanguageSwitch-B7-4CWQP.js";import{u as v}from"./useTranslation-Pq_l7wMn.js";function w(){const{t:a}=v(),{user:l,logout:m}=h(),{site:t}=u(),d=p(),i=g(),[r,c]=b.useState(!1),n=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.auth||l);return e.jsxs("div",{className:"theme-light theme-claude min-h-screen flex flex-col bg-[#FAF6F1] text-[#3D3024]",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-[#D97757] text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-white font-medium",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 bg-[#FAF6F1]/85 backdrop-blur-xl border-b border-[#E8DDD0]",children:[e.jsxs("div",{className:"max-w-6xl mx-auto px-6 h-16 flex items-center justify-between",children:[e.jsxs(o,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:n,className:"h-8 w-auto"}):e.jsx("div",{className:"w-9 h-9 rounded-2xl bg-gradient-to-br from-[#D97757] to-[#C4613F] flex items-center justify-center text-white font-bold text-sm shadow-sm",children:n.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-[#3D3024] group-hover:text-[#D97757] transition-colors",children:n})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:x.map(s=>e.jsx(o,{to:s.to,className:`px-3.5 py-2 text-sm rounded-lg transition-all ${i.pathname===s.to?"text-[#D97757] bg-[#D97757]/8 font-medium":"text-[#6B5D4F] hover:text-[#3D3024] hover:bg-[#E8DDD0]/50"}`,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{className:"text-[#8B7D6E] hover:text-[#3D3024] hover:bg-[#E8DDD0]/50"}),l?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-[#6B5D4F] hidden sm:block",children:l.display_name||l.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-[#8B7D6E] hover:text-[#3D3024] transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(o,{to:"/login",className:"text-sm text-[#6B5D4F] hover:text-[#3D3024] px-3 py-2 hidden sm:block transition-colors",children:a("nav.login")}),e.jsx(o,{to:"/register",className:"px-5 py-2 rounded-full bg-[#D97757] text-white text-sm font-medium hover:bg-[#C4613F] transition-colors shadow-sm",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-2 rounded-lg hover:bg-[#E8DDD0]/50 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-[#6B5D4F]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-[#E8DDD0] bg-[#FAF6F1]",children:e.jsx("nav",{className:"max-w-6xl mx-auto px-6 py-3 flex flex-col gap-1",children:x.map(s=>e.jsx(o,{to:s.to,onClick:()=>c(!1),className:`px-3 py-2.5 text-sm rounded-lg transition-colors ${i.pathname===s.to?"text-[#D97757] bg-[#D97757]/8 font-medium":"text-[#6B5D4F] hover:text-[#3D3024] hover:bg-[#E8DDD0]/50"}`,children:s.label},s.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(D,{})}),e.jsx("footer",{className:"border-t border-[#E8DDD0] mt-auto bg-[#F5EEE6]",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8 flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("p",{className:"text-sm text-[#8B7D6E]",children:["© ",new Date().getFullYear()," ",n,"."]}),e.jsx("div",{className:"flex items-center gap-4",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-[#8B7D6E] hover:text-[#D97757] transition-colors",children:a("nav.contact")})})]})})]})}export{w as default}; diff --git a/dist/assets/Layout-BtrGQcOw.js b/dist/assets/Layout-rCXoKNs7.js similarity index 97% rename from dist/assets/Layout-BtrGQcOw.js rename to dist/assets/Layout-rCXoKNs7.js index 4eb8261..2d3799a 100644 --- a/dist/assets/Layout-BtrGQcOw.js +++ b/dist/assets/Layout-rCXoKNs7.js @@ -1 +1 @@ -import{u as h,a as u,b as p,c as g,r as b,j as e,L as o,O as j}from"./index-Cvtin-Z6.js";import{L as f}from"./LanguageSwitch-BGa_hr1Z.js";import{u as v}from"./useTranslation-BeJE8l6a.js";function L(){const{t:a}=v(),{user:n,logout:m}=h(),{site:t}=u(),d=p(),i=g(),[r,c]=b.useState(!1),l=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.auth||n);return e.jsxs("div",{className:"theme-light min-h-screen flex flex-col bg-white text-gray-900",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-slate-900 text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-slate-200",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 bg-white border-b border-gray-200",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 lg:px-8 h-16 flex items-center justify-between",children:[e.jsxs(o,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:l,className:"h-8 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded-lg bg-slate-900 flex items-center justify-center text-white font-bold text-sm",children:l.charAt(0)}),e.jsx("span",{className:"text-lg font-bold text-slate-900 tracking-tight",children:l})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-0.5",children:x.map(s=>e.jsx(o,{to:s.to,className:`px-4 py-2 text-sm font-medium transition-colors ${i.pathname===s.to?"text-slate-900 border-b-2 border-slate-900":"text-slate-500 hover:text-slate-900"}`,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(f,{className:"text-slate-400 hover:text-slate-700 hover:bg-slate-50"}),n?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-slate-600 hidden sm:block font-medium",children:n.display_name||n.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-slate-400 hover:text-slate-700 transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(o,{to:"/login",className:"text-sm text-slate-600 hover:text-slate-900 px-3 py-2 hidden sm:block transition-colors font-medium",children:a("nav.login")}),e.jsx(o,{to:"/register",className:"px-5 py-2 rounded-lg bg-slate-900 text-white text-sm font-medium hover:bg-slate-800 transition-colors",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-2 rounded-lg hover:bg-slate-50 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-slate-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-gray-200 bg-white",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col",children:x.map(s=>e.jsx(o,{to:s.to,onClick:()=>c(!1),className:`px-4 py-3 text-sm font-medium border-b border-gray-100 last:border-0 transition-colors ${i.pathname===s.to?"text-slate-900 bg-slate-50":"text-slate-500 hover:text-slate-900"}`,children:s.label},s.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(j,{})}),e.jsx("footer",{className:"border-t border-gray-200 mt-auto bg-white",children:e.jsx("div",{className:"max-w-7xl mx-auto px-6 lg:px-8 py-10",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-6",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-sm font-bold text-slate-900 tracking-tight",children:l}),e.jsxs("p",{className:"text-xs text-slate-400 mt-1",children:["© ",new Date().getFullYear()," ",l,". All rights reserved."]})]}),e.jsx("div",{className:"flex items-center gap-6",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-slate-400 hover:text-slate-600 transition-colors",children:a("nav.contact")})})]})})})]})}export{L as default}; +import{u as h,a as u,b as p,c as g,r as b,j as e,L as o,O as j}from"./index-ClhW4pXr.js";import{L as f}from"./LanguageSwitch-B7-4CWQP.js";import{u as v}from"./useTranslation-Pq_l7wMn.js";function L(){const{t:a}=v(),{user:n,logout:m}=h(),{site:t}=u(),d=p(),i=g(),[r,c]=b.useState(!1),l=(t==null?void 0:t.name)||"AI Platform",x=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.auth||n);return e.jsxs("div",{className:"theme-light min-h-screen flex flex-col bg-white text-gray-900",children:[(t==null?void 0:t.announcement)&&e.jsx("div",{className:"bg-slate-900 text-center py-2.5 px-4",children:e.jsx("p",{className:"text-sm text-slate-200",children:t.announcement})}),e.jsxs("header",{className:"sticky top-0 z-50 bg-white border-b border-gray-200",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 lg:px-8 h-16 flex items-center justify-between",children:[e.jsxs(o,{to:"/",className:"flex items-center gap-3 group",children:[t!=null&&t.logo?e.jsx("img",{src:t.logo,alt:l,className:"h-8 w-auto"}):e.jsx("div",{className:"w-8 h-8 rounded-lg bg-slate-900 flex items-center justify-center text-white font-bold text-sm",children:l.charAt(0)}),e.jsx("span",{className:"text-lg font-bold text-slate-900 tracking-tight",children:l})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-0.5",children:x.map(s=>e.jsx(o,{to:s.to,className:`px-4 py-2 text-sm font-medium transition-colors ${i.pathname===s.to?"text-slate-900 border-b-2 border-slate-900":"text-slate-500 hover:text-slate-900"}`,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(f,{className:"text-slate-400 hover:text-slate-700 hover:bg-slate-50"}),n?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-slate-600 hidden sm:block font-medium",children:n.display_name||n.username}),e.jsx("button",{onClick:async()=>{await m(),d("/")},className:"text-sm text-slate-400 hover:text-slate-700 transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(o,{to:"/login",className:"text-sm text-slate-600 hover:text-slate-900 px-3 py-2 hidden sm:block transition-colors font-medium",children:a("nav.login")}),e.jsx(o,{to:"/register",className:"px-5 py-2 rounded-lg bg-slate-900 text-white text-sm font-medium hover:bg-slate-800 transition-colors",children:a("nav.signUp")})]}),e.jsx("button",{className:"md:hidden p-2 rounded-lg hover:bg-slate-50 transition-colors",onClick:()=>c(!r),"aria-label":"Toggle menu",children:e.jsx("svg",{className:"w-5 h-5 text-slate-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),r&&e.jsx("div",{className:"md:hidden border-t border-gray-200 bg-white",children:e.jsx("nav",{className:"max-w-7xl mx-auto px-6 py-3 flex flex-col",children:x.map(s=>e.jsx(o,{to:s.to,onClick:()=>c(!1),className:`px-4 py-3 text-sm font-medium border-b border-gray-100 last:border-0 transition-colors ${i.pathname===s.to?"text-slate-900 bg-slate-50":"text-slate-500 hover:text-slate-900"}`,children:s.label},s.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(j,{})}),e.jsx("footer",{className:"border-t border-gray-200 mt-auto bg-white",children:e.jsx("div",{className:"max-w-7xl mx-auto px-6 lg:px-8 py-10",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-6",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-sm font-bold text-slate-900 tracking-tight",children:l}),e.jsxs("p",{className:"text-xs text-slate-400 mt-1",children:["© ",new Date().getFullYear()," ",l,". All rights reserved."]})]}),e.jsx("div",{className:"flex items-center gap-6",children:(t==null?void 0:t.contact_email)&&e.jsx("a",{href:`mailto:${t.contact_email}`,className:"text-sm text-slate-400 hover:text-slate-600 transition-colors",children:a("nav.contact")})})]})})})]})}export{L as default}; diff --git a/dist/assets/Login-Xik2Nht3.js b/dist/assets/Login-C6BPG0T7.js similarity index 94% rename from dist/assets/Login-Xik2Nht3.js rename to dist/assets/Login-C6BPG0T7.js index 76f0089..97428fb 100644 --- a/dist/assets/Login-Xik2Nht3.js +++ b/dist/assets/Login-C6BPG0T7.js @@ -1 +1 @@ -import{u as v,a as w,b as y,c as k,r as p,j as e,N as L,L as S,z as x}from"./index-Cvtin-Z6.js";import{u as C}from"./useTranslation-BeJE8l6a.js";function A(){var c,m;const{t:s}=C(),{login:g,user:h}=v(),{site:n}=w(),f=y(),l=k(),[t,o]=p.useState({username:"",password:""}),[r,i]=p.useState(!1);if(h){const a=((m=(c=l.state)==null?void 0:c.from)==null?void 0:m.pathname)||"/dashboard";return e.jsx(L,{to:a,replace:!0})}const b=async a=>{var u,d;if(a.preventDefault(),!t.username||!t.password){x.error(s("login.fillAllFields"));return}i(!0);try{if((await g(t.username,t.password)).success){x.success(s("login.welcomeBackToast"));const N=((d=(u=l.state)==null?void 0:u.from)==null?void 0:d.pathname)||"/dashboard";f(N,{replace:!0});return}}catch{}i(!1)};return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-6",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page mb-2",children:s("login.welcomeBack")}),e.jsx("p",{className:"text-sm text-page-secondary",children:n!=null&&n.name?s("login.signInTo",{name:n.name}):s("login.signInToDefault")})]}),e.jsxs("form",{onSubmit:b,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("login.username")}),e.jsx("input",{type:"text",value:t.username,onChange:a=>o({...t,username:a.target.value}),className:"input",placeholder:s("login.enterUsername"),autoComplete:"username",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("login.password")}),e.jsx("input",{type:"password",value:t.password,onChange:a=>o({...t,password:a.target.value}),className:"input",placeholder:s("login.enterPassword"),autoComplete:"current-password",required:!0})]}),e.jsxs("button",{type:"submit",disabled:r,className:"btn-primary w-full flex items-center justify-center gap-2",children:[r&&e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),s(r?"login.signingIn":"login.signInBtn")]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-page-secondary",children:[s("login.noAccount")," ",e.jsx(S,{to:"/register",className:"text-page-link hover:text-page-link transition-colors font-medium",children:s("login.createOne")})]})})]})})})}export{A as default}; +import{u as v,a as w,b as y,c as k,r as p,j as e,N as L,L as S,z as x}from"./index-ClhW4pXr.js";import{u as C}from"./useTranslation-Pq_l7wMn.js";function A(){var c,m;const{t:s}=C(),{login:g,user:h}=v(),{site:n}=w(),f=y(),l=k(),[t,o]=p.useState({username:"",password:""}),[r,i]=p.useState(!1);if(h){const a=((m=(c=l.state)==null?void 0:c.from)==null?void 0:m.pathname)||"/dashboard";return e.jsx(L,{to:a,replace:!0})}const b=async a=>{var u,d;if(a.preventDefault(),!t.username||!t.password){x.error(s("login.fillAllFields"));return}i(!0);try{if((await g(t.username,t.password)).success){x.success(s("login.welcomeBackToast"));const N=((d=(u=l.state)==null?void 0:u.from)==null?void 0:d.pathname)||"/dashboard";f(N,{replace:!0});return}}catch{}i(!1)};return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-6",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page mb-2",children:s("login.welcomeBack")}),e.jsx("p",{className:"text-sm text-page-secondary",children:n!=null&&n.name?s("login.signInTo",{name:n.name}):s("login.signInToDefault")})]}),e.jsxs("form",{onSubmit:b,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("login.username")}),e.jsx("input",{type:"text",value:t.username,onChange:a=>o({...t,username:a.target.value}),className:"input",placeholder:s("login.enterUsername"),autoComplete:"username",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("login.password")}),e.jsx("input",{type:"password",value:t.password,onChange:a=>o({...t,password:a.target.value}),className:"input",placeholder:s("login.enterPassword"),autoComplete:"current-password",required:!0})]}),e.jsxs("button",{type:"submit",disabled:r,className:"btn-primary w-full flex items-center justify-center gap-2",children:[r&&e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),s(r?"login.signingIn":"login.signInBtn")]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-page-secondary",children:[s("login.noAccount")," ",e.jsx(S,{to:"/register",className:"text-page-link hover:text-page-link transition-colors font-medium",children:s("login.createOne")})]})})]})})})}export{A as default}; diff --git a/dist/assets/Packages-BOtvAbP1.js b/dist/assets/Packages-BOtvAbP1.js new file mode 100644 index 0000000..865500b --- /dev/null +++ b/dist/assets/Packages-BOtvAbP1.js @@ -0,0 +1 @@ +import{u as B,b as E,r as c,l as $,f as A,m as N,j as e,Q as o,L as W,s as z,z as k}from"./index-ClhW4pXr.js";import{c as I}from"./officialEquiv-COyn5GUF.js";import{u as Q}from"./useTranslation-Pq_l7wMn.js";const v={never:"packages.resetNever",daily:"packages.resetDaily",weekly:"packages.resetWeekly",monthly:"packages.resetMonthly"};function y(a){return a?new Date(a*1e3).toLocaleDateString():""}function K(){const{t:a}=Q(),{user:l,refreshUser:w}=B(),S=E(),[_,L]=c.useState([]),[g,q]=c.useState([]),[M,P]=c.useState(!0),[d,h]=c.useState(null),[b,f]=c.useState([]),[i,u]=c.useState(null),p=s=>a(v[s]||v.never);c.useEffect(()=>{Promise.all([$().then(s=>{s.data.success&&L(s.data.data||[])}).catch(()=>{}),A().then(s=>{s.data.success&&q(s.data.data||[])}).catch(()=>{})]).finally(()=>P(!1))},[]),c.useEffect(()=>{l&&N().then(s=>{s.data.success&&f(s.data.data||[])}).catch(()=>{})},[l]);const C=async s=>{if(!l){S("/register");return}u(s)},F=async()=>{if(!i)return;const s=i.id;h(s);try{const n=await z(s);n.data.success?(k.success(a("packages.subscribedSuccess")),u(null),await w(),N().then(t=>{t.data.success&&f(t.data.data||[])}).catch(()=>{})):k.error(n.data.message||a("common.requestFailed"))}catch{}h(null)},D=c.useMemo(()=>g.filter(s=>s.enabled!==!1),[g]);if(M)return e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})});const j=_.filter(s=>s.enabled);return e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-3xl font-heading font-bold text-page mb-3",children:a("packages.title")}),e.jsx("p",{className:"text-page-secondary max-w-xl mx-auto",children:a("packages.subtitle")})]}),b.length>0&&e.jsxs("div",{className:"max-w-3xl mx-auto mb-10",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:a("packages.mySubscriptions")}),e.jsx("div",{className:"space-y-3",children:b.map(s=>{const n=s.amount_total||0,t=s.amount_used||0,r=Math.max(0,n-t),x=n>0?Math.min(100,t/n*100):0;return e.jsxs("div",{className:"glass rounded-xl p-4 border border-page-divider",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-page",children:a("packages.subscriptionId",{id:s.id})}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-green-500/10 text-page-success border border-green-500/20",children:a("packages.active")})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-page-secondary mb-3",children:[e.jsxs("span",{children:[a("packages.expires"),": ",y(s.end_time)]}),s.next_reset_time>0&&e.jsxs("span",{children:[a("packages.nextReset"),": ",y(s.next_reset_time)]})]}),e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx("div",{className:"flex-1 h-2 bg-page-surface rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-brand-500 to-purple-500 transition-all",style:{width:`${x}%`}})}),e.jsxs("span",{className:"text-xs text-page-secondary whitespace-nowrap",children:["$",(r/o).toFixed(2)," / $",(n/o).toFixed(2)]})]})]},s.id)})})]}),j.length===0?e.jsxs("div",{className:"text-center py-12 text-page-secondary",children:[e.jsx("p",{children:a("packages.noPackages")}),e.jsxs(W,{to:"/pricing",className:"text-page-link hover:text-page-link transition-colors mt-2 inline-block",children:[a("packages.checkPricing")," →"]})]}):e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto",children:j.map((s,n)=>{const t=s.quota_reset_period||"never",r=t!=="never",x=s.quota_amount>0?s.quota_amount/o:0,m=I(D,x);return e.jsx("div",{className:"glass rounded-2xl flex flex-col",children:e.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"text-xl font-semibold text-page",children:s.name}),r&&e.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-purple-500/10 text-page-info border border-purple-500/20",children:p(t)})]}),s.description&&e.jsx("p",{className:"text-sm text-page-secondary mt-1",children:s.description})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-4xl font-bold text-page",children:["$",Number(s.price).toFixed(2)]}),s.original_price>0&&s.original_price>s.price&&e.jsxs("span",{className:"text-lg text-page-muted line-through",children:["$",Number(s.original_price).toFixed(2)]})]}),s.duration>0&&e.jsx("p",{className:"text-sm text-page-muted mt-1",children:a("packages.daysAccess",{count:s.duration})})]}),m&&m.equivDollars>x&&e.jsx("div",{className:"bg-gradient-to-r from-amber-500/10 to-orange-500/10 border border-amber-500/20 rounded-xl p-3 mb-4",children:e.jsxs("p",{className:"text-xs text-page-warning font-medium",children:["🔥 ",a("packages.officialEquiv",{model:m.label,amount:Math.round(m.equivDollars)})]})}),e.jsxs("ul",{className:"space-y-2 mb-6 flex-1",children:[s.quota_amount>0&&e.jsxs("li",{className:"flex items-center gap-2 text-sm text-page-label",children:[e.jsx("svg",{className:"w-4 h-4 text-page-success flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),r?a("packages.periodicQuota",{amount:(s.quota_amount/o).toFixed(2),period:p(t)}):a("packages.creditIncluded",{amount:(s.quota_amount/o).toFixed(2)})]}),r&&e.jsxs("li",{className:"flex items-center gap-2 text-sm text-page-label",children:[e.jsx("svg",{className:"w-4 h-4 text-page-warning flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),a("packages.unusedQuotaExpires")]}),e.jsxs("li",{className:"flex items-center gap-2 text-sm text-page-label",children:[e.jsx("svg",{className:"w-4 h-4 text-page-success flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),a("packages.allModels")]}),e.jsxs("li",{className:"flex items-center gap-2 text-sm text-page-label",children:[e.jsx("svg",{className:"w-4 h-4 text-page-success flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),a("packages.openaiApi")]})]}),e.jsx("button",{onClick:()=>C(s),disabled:d===s.id,className:"btn-primary w-full text-center",children:d===s.id?a("packages.processing"):a(l?"packages.subscribeNow":"packages.signUpToSubscribe")})]})},s.id)})}),i&&(()=>{const s=((l==null?void 0:l.quota)||0)/o,n=Number(i.price),t=s!d&&u(null),children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-sm",onClick:m=>m.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-3",children:a("packages.confirmTitle")}),e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:a("packages.confirmDesc",{name:i.name,price:n.toFixed(2)})}),x&&e.jsx("div",{className:"bg-purple-500/10 border border-purple-500/20 rounded-xl p-3 mb-3",children:e.jsx("p",{className:"text-xs text-page-info",children:a("packages.subscriptionInfo",{period:p(r),days:i.duration||30,amount:(i.quota_amount/o).toFixed(2)})})}),e.jsxs("p",{className:"text-sm text-page-secondary mb-4",children:[a("packages.yourBalance")," ",e.jsxs("span",{className:`font-medium ${t?"text-page-danger":"text-page-success"}`,children:["$",s.toFixed(2)]})]}),t&&e.jsx("div",{className:"bg-red-500/10 border border-red-500/20 rounded-xl p-3 mb-4",children:e.jsx("p",{className:"text-sm text-page-danger",children:a("packages.insufficientBalance")})}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>u(null),disabled:d,className:"btn-secondary",children:a("tokens.cancel")}),e.jsx("button",{onClick:F,disabled:t||d,className:"btn-primary",children:a(d?"packages.processing":"packages.confirm")})]})]})})})()]})}export{K as default}; diff --git a/dist/assets/Packages-CBRMcF8w.js b/dist/assets/Packages-CBRMcF8w.js deleted file mode 100644 index 448a4eb..0000000 --- a/dist/assets/Packages-CBRMcF8w.js +++ /dev/null @@ -1 +0,0 @@ -import{u as E,b as I,r as l,l as B,f as O,m as S,j as e,Q as d,L as $,s as A,z as _}from"./index-Cvtin-Z6.js";import{S as G}from"./SpotlightCard-a-a6koSS.js";import{u as R}from"./useTranslation-BeJE8l6a.js";const L={never:"packages.resetNever",daily:"packages.resetDaily",weekly:"packages.resetWeekly",monthly:"packages.resetMonthly"},W=[{pattern:"claude-4-sonnet",label:"Claude Sonnet 4",inputPerMtok:3},{pattern:"claude-sonnet-4",label:"Claude Sonnet 4",inputPerMtok:3},{pattern:"claude-4.5-sonnet",label:"Claude 4.5 Sonnet",inputPerMtok:3},{pattern:"claude-4.6-sonnet",label:"Claude 4.6 Sonnet",inputPerMtok:3},{pattern:"claude-4-opus",label:"Claude Opus 4",inputPerMtok:15},{pattern:"claude-opus-4",label:"Claude Opus 4",inputPerMtok:15},{pattern:"claude-4.1-opus",label:"Claude Opus 4.1",inputPerMtok:15},{pattern:"claude-4.5-opus",label:"Claude Opus 4.5",inputPerMtok:5},{pattern:"claude-4.6-opus",label:"Claude Opus 4.6",inputPerMtok:5},{pattern:"claude-3.5-haiku",label:"Claude 3.5 Haiku",inputPerMtok:.8},{pattern:"claude-3-5-haiku",label:"Claude 3.5 Haiku",inputPerMtok:.8},{pattern:"gpt-5.1",label:"GPT-5.1",inputPerMtok:1.25},{pattern:"gpt-5.2",label:"GPT-5.2",inputPerMtok:1.75},{pattern:"gpt-5.3",label:"GPT-5.3",inputPerMtok:1.75},{pattern:"gpt-5.4",label:"GPT-5.4",inputPerMtok:2.5},{pattern:"gpt-4o",label:"GPT-4o",inputPerMtok:2.5},{pattern:"gpt-4.1",label:"GPT-4.1",inputPerMtok:2}];function q(s){return s?new Date(s*1e3).toLocaleDateString():""}function z(s,r){if(!s||s.length===0||r<=0)return null;let u=null;for(const g of s){const b=Number(g.input_price);if(!b||b<=0)continue;const N=(g.model_name||"").toLowerCase();for(const o of W)if(N.includes(o.pattern.toLowerCase())){const h=b*1e3,f=o.inputPerMtok/h,k=r*f;(!u||k>u.equivDollars)&&(u={label:o.label,equivDollars:k,ratio:f,officialPrice:o.inputPerMtok,sitePrice:h});break}}return u}function K(){const{t:s}=R(),{user:r,refreshUser:u}=E(),g=I(),[b,N]=l.useState([]),[o,h]=l.useState([]),[f,k]=l.useState(!0),[p,P]=l.useState(null),[y,M]=l.useState([]),[i,j]=l.useState(null),v=t=>s(L[t]||L.never);l.useEffect(()=>{Promise.all([B().then(t=>{t.data.success&&N(t.data.data||[])}).catch(()=>{}),O().then(t=>{t.data.success&&h(t.data.data||[])}).catch(()=>{})]).finally(()=>k(!1))},[]),l.useEffect(()=>{r&&S().then(t=>{t.data.success&&M(t.data.data||[])}).catch(()=>{})},[r]);const F=async t=>{if(!r){g("/register");return}j(t)},D=async()=>{if(!i)return;const t=i.id;P(t);try{const a=await A(t);a.data.success?(_.success(s("packages.subscribedSuccess")),j(null),await u(),S().then(n=>{n.data.success&&M(n.data.data||[])}).catch(()=>{})):_.error(a.data.message||s("common.requestFailed"))}catch{}P(null)},T=l.useMemo(()=>o.filter(t=>t.enabled!==!1),[o]);if(f)return e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})});const w=b.filter(t=>t.enabled),C=["rgba(129,140,248,0.15)","rgba(192,132,252,0.15)","rgba(244,114,182,0.15)","rgba(34,197,94,0.15)"];return e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-3xl font-heading font-bold text-page mb-3",children:s("packages.title")}),e.jsx("p",{className:"text-page-secondary max-w-xl mx-auto",children:s("packages.subtitle")})]}),y.length>0&&e.jsxs("div",{className:"max-w-3xl mx-auto mb-10",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("packages.mySubscriptions")}),e.jsx("div",{className:"space-y-3",children:y.map(t=>{const a=t.amount_total||0,n=t.amount_used||0,c=Math.max(0,a-n),x=a>0?Math.min(100,n/a*100):0;return e.jsxs("div",{className:"glass rounded-xl p-4 border border-neutral-800/50",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-page",children:s("packages.subscriptionId",{id:t.id})}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-green-500/10 text-green-400 border border-green-500/20",children:s("packages.active")})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-page-secondary mb-3",children:[e.jsxs("span",{children:[s("packages.expires"),": ",q(t.end_time)]}),t.next_reset_time>0&&e.jsxs("span",{children:[s("packages.nextReset"),": ",q(t.next_reset_time)]})]}),e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx("div",{className:"flex-1 h-2 bg-neutral-800 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-brand-500 to-purple-500 transition-all",style:{width:`${x}%`}})}),e.jsxs("span",{className:"text-xs text-page-secondary whitespace-nowrap",children:["$",(c/d).toFixed(2)," / $",(a/d).toFixed(2)]})]})]},t.id)})})]}),w.length===0?e.jsxs("div",{className:"text-center py-12 text-page-secondary",children:[e.jsx("p",{children:s("packages.noPackages")}),e.jsxs($,{to:"/pricing",className:"text-page-link hover:text-page-link transition-colors mt-2 inline-block",children:[s("packages.checkPricing")," →"]})]}):e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto",children:w.map((t,a)=>{const n=t.quota_reset_period||"never",c=n!=="never",x=t.quota_amount>0?t.quota_amount/d:0,m=z(T,x);return e.jsx(G,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-0 !rounded-2xl flex flex-col",spotlightColor:C[a%C.length],children:e.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"text-xl font-semibold text-page",children:t.name}),c&&e.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-purple-500/10 text-purple-400 border border-purple-500/20",children:v(n)})]}),t.description&&e.jsx("p",{className:"text-sm text-page-secondary mt-1",children:t.description})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-4xl font-bold text-page",children:["$",Number(t.price).toFixed(2)]}),t.original_price>0&&t.original_price>t.price&&e.jsxs("span",{className:"text-lg text-page-muted line-through",children:["$",Number(t.original_price).toFixed(2)]})]}),t.duration>0&&e.jsx("p",{className:"text-sm text-page-muted mt-1",children:s("packages.daysAccess",{count:t.duration})})]}),m&&m.equivDollars>x&&e.jsx("div",{className:"bg-gradient-to-r from-amber-500/10 to-orange-500/10 border border-amber-500/20 rounded-xl p-3 mb-4",children:e.jsxs("p",{className:"text-xs text-amber-300 font-medium",children:["🔥 ",s("packages.officialEquiv",{model:m.label,amount:Math.round(m.equivDollars)})]})}),e.jsxs("ul",{className:"space-y-2 mb-6 flex-1",children:[t.quota_amount>0&&e.jsxs("li",{className:"flex items-center gap-2 text-sm text-page-label",children:[e.jsx("svg",{className:"w-4 h-4 text-green-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),c?s("packages.periodicQuota",{amount:(t.quota_amount/d).toFixed(2),period:v(n)}):s("packages.creditIncluded",{amount:(t.quota_amount/d).toFixed(2)})]}),c&&e.jsxs("li",{className:"flex items-center gap-2 text-sm text-page-label",children:[e.jsx("svg",{className:"w-4 h-4 text-amber-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),s("packages.unusedQuotaExpires")]}),e.jsxs("li",{className:"flex items-center gap-2 text-sm text-page-label",children:[e.jsx("svg",{className:"w-4 h-4 text-green-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),s("packages.allModels")]}),e.jsxs("li",{className:"flex items-center gap-2 text-sm text-page-label",children:[e.jsx("svg",{className:"w-4 h-4 text-green-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),s("packages.openaiApi")]})]}),e.jsx("button",{onClick:()=>F(t),disabled:p===t.id,className:"btn-primary w-full text-center",children:p===t.id?s("packages.processing"):s(r?"packages.subscribeNow":"packages.signUpToSubscribe")})]})},t.id)})}),i&&(()=>{const t=((r==null?void 0:r.quota)||0)/d,a=Number(i.price),n=t!p&&j(null),children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-sm",onClick:m=>m.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-3",children:s("packages.confirmTitle")}),e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("packages.confirmDesc",{name:i.name,price:a.toFixed(2)})}),x&&e.jsx("div",{className:"bg-purple-500/10 border border-purple-500/20 rounded-xl p-3 mb-3",children:e.jsx("p",{className:"text-xs text-purple-300",children:s("packages.subscriptionInfo",{period:v(c),days:i.duration||30,amount:(i.quota_amount/d).toFixed(2)})})}),e.jsxs("p",{className:"text-sm text-page-secondary mb-4",children:[s("packages.yourBalance")," ",e.jsxs("span",{className:`font-medium ${n?"text-red-400":"text-green-400"}`,children:["$",t.toFixed(2)]})]}),n&&e.jsx("div",{className:"bg-red-500/10 border border-red-500/20 rounded-xl p-3 mb-4",children:e.jsx("p",{className:"text-sm text-red-300",children:s("packages.insufficientBalance")})}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>j(null),disabled:p,className:"btn-secondary",children:s("tokens.cancel")}),e.jsx("button",{onClick:D,disabled:n||p,className:"btn-primary",children:s(p?"packages.processing":"packages.confirm")})]})]})})})()]})}export{K as default}; diff --git a/dist/assets/Pricing-CfO9rFBZ.js b/dist/assets/Pricing-CfO9rFBZ.js deleted file mode 100644 index fe7099b..0000000 --- a/dist/assets/Pricing-CfO9rFBZ.js +++ /dev/null @@ -1 +0,0 @@ -import{r as n,f as j,j as t}from"./index-Cvtin-Z6.js";import{u as N}from"./useTranslation-BeJE8l6a.js";function w(){const{t:s}=N(),[m,h]=n.useState([]),[d,u]=n.useState([]),[l,g]=n.useState(""),[r,c]=n.useState(""),[b,f]=n.useState(!0);n.useEffect(()=>{j().then(e=>{e.data.success&&(h(e.data.data||[]),u(e.data.vendors||[]))}).catch(()=>{}).finally(()=>f(!1))},[]);const i=m.filter(e=>e.enabled!==!1),x=n.useMemo(()=>{const e=new Set(i.map(a=>a.vendor_name).filter(Boolean));return d.filter(a=>e.has(a.name))},[i,d]),p=n.useMemo(()=>{let e=i;if(r&&(e=e.filter(a=>a.vendor_name===r)),l){const a=l.toLowerCase();e=e.filter(o=>(o.display_name||o.model_name||"").toLowerCase().includes(a))}return e=[...e].sort((a,o)=>(Number(a.input_price)||0)-(Number(o.input_price)||0)),e},[i,r,l]);return b?t.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:t.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):t.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[t.jsxs("div",{className:"text-center mb-10",children:[t.jsx("h1",{className:"text-3xl font-heading font-bold text-page mb-3",children:s("pricing.title")}),t.jsx("p",{className:"text-page-secondary max-w-xl mx-auto",children:s("pricing.subtitle")})]}),x.length>0&&t.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mb-6",children:[t.jsx("button",{onClick:()=>c(""),className:`inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl text-sm font-medium transition-all ${r?"glass-sm text-page-secondary hover:text-page hover:bg-white/[0.08]":"bg-brand-500 text-white shadow-lg shadow-brand-500/25"}`,children:s("pricing.allVendors")}),x.map(e=>t.jsx("button",{onClick:()=>c(e.name),className:`inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl text-sm font-medium transition-all ${r===e.name?"bg-brand-500 text-white shadow-lg shadow-brand-500/25":"glass-sm text-page-secondary hover:text-page hover:bg-white/[0.08]"}`,children:e.name},e.id))]}),t.jsx("div",{className:"max-w-md mx-auto mb-8",children:t.jsxs("div",{className:"relative",children:[t.jsx("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-page-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),t.jsx("input",{type:"text",value:l,onChange:e=>g(e.target.value),className:"input !pl-10",placeholder:s("pricing.searchPlaceholder")})]})}),p.length===0?t.jsx("div",{className:"text-center py-12 text-page-secondary",children:s(l||r?"pricing.noMatch":"pricing.noModels")}):t.jsx("div",{className:"glass-sm rounded-xl overflow-hidden",children:t.jsxs("table",{className:"w-full text-sm",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-white/[0.06]",children:[t.jsx("th",{className:"text-left px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.model")}),t.jsx("th",{className:"text-right px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.inputPrice")}),t.jsx("th",{className:"text-right px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.outputPrice")}),t.jsx("th",{className:"text-center px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.status")})]})}),t.jsx("tbody",{children:p.map((e,a)=>t.jsxs("tr",{className:"border-b border-white/[0.04] last:border-0 hover:bg-white/[0.02] transition-colors",children:[t.jsx("td",{className:"px-5 py-3.5",children:t.jsx("span",{className:"font-mono text-page",children:e.display_name||e.model_name})}),t.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-page-label",children:e.input_price!=null?`$${(Number(e.input_price)*1e3).toFixed(4)}`:"-"}),t.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-page-label",children:e.output_price!=null?`$${(Number(e.output_price)*1e3).toFixed(4)}`:"-"}),t.jsx("td",{className:"px-5 py-3.5 text-center",children:t.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs border ${e.status==="healthy"?"bg-green-500/10 text-green-400 border-green-500/20":"bg-neutral-500/10 text-page-secondary border-neutral-500/20"}`,children:[t.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${e.status==="healthy"?"bg-green-500":"bg-neutral-500"}`}),e.status==="healthy"?s("pricing.online"):s("pricing.unknown")]})})]},e.model_name||a))})]})})]})}export{w as default}; diff --git a/dist/assets/Pricing-EipPrIaV.js b/dist/assets/Pricing-EipPrIaV.js new file mode 100644 index 0000000..560473a --- /dev/null +++ b/dist/assets/Pricing-EipPrIaV.js @@ -0,0 +1 @@ +import{r as n,f as j,j as t}from"./index-ClhW4pXr.js";import{u as N}from"./useTranslation-Pq_l7wMn.js";function w(){const{t:s}=N(),[m,u]=n.useState([]),[d,h]=n.useState([]),[l,g]=n.useState(""),[r,c]=n.useState(""),[f,b]=n.useState(!0);n.useEffect(()=>{j().then(e=>{e.data.success&&(u(e.data.data||[]),h(e.data.vendors||[]))}).catch(()=>{}).finally(()=>b(!1))},[]);const i=m.filter(e=>e.enabled!==!1),x=n.useMemo(()=>{const e=new Set(i.map(a=>a.vendor_name).filter(Boolean));return d.filter(a=>e.has(a.name))},[i,d]),p=n.useMemo(()=>{let e=i;if(r&&(e=e.filter(a=>a.vendor_name===r)),l){const a=l.toLowerCase();e=e.filter(o=>(o.display_name||o.model_name||"").toLowerCase().includes(a))}return e=[...e].sort((a,o)=>(Number(a.input_price)||0)-(Number(o.input_price)||0)),e},[i,r,l]);return f?t.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:t.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):t.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[t.jsxs("div",{className:"text-center mb-10",children:[t.jsx("h1",{className:"text-3xl font-heading font-bold text-page mb-3",children:s("pricing.title")}),t.jsx("p",{className:"text-page-secondary max-w-xl mx-auto",children:s("pricing.subtitle")})]}),x.length>0&&t.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mb-6",children:[t.jsx("button",{onClick:()=>c(""),className:`inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl text-sm font-medium transition-all ${r?"glass-sm text-page-secondary hover:text-page hover:bg-page-surface-hover":"bg-brand-500 text-white shadow-lg shadow-brand-500/25"}`,children:s("pricing.allVendors")}),x.map(e=>t.jsx("button",{onClick:()=>c(e.name),className:`inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl text-sm font-medium transition-all ${r===e.name?"bg-brand-500 text-white shadow-lg shadow-brand-500/25":"glass-sm text-page-secondary hover:text-page hover:bg-page-surface-hover"}`,children:e.name},e.id))]}),t.jsx("div",{className:"max-w-md mx-auto mb-8",children:t.jsxs("div",{className:"relative",children:[t.jsx("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-page-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),t.jsx("input",{type:"text",value:l,onChange:e=>g(e.target.value),className:"input !pl-10",placeholder:s("pricing.searchPlaceholder")})]})}),p.length===0?t.jsx("div",{className:"text-center py-12 text-page-secondary",children:s(l||r?"pricing.noMatch":"pricing.noModels")}):t.jsx("div",{className:"glass-sm rounded-xl overflow-hidden",children:t.jsxs("table",{className:"w-full text-sm",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-page-divider",children:[t.jsx("th",{className:"text-left px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.model")}),t.jsx("th",{className:"text-right px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.inputPrice")}),t.jsx("th",{className:"text-right px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.outputPrice")}),t.jsx("th",{className:"text-center px-5 py-3.5 font-medium text-page-secondary",children:s("pricing.status")})]})}),t.jsx("tbody",{children:p.map((e,a)=>t.jsxs("tr",{className:"border-b border-page-divider last:border-0 hover:bg-page-surface transition-colors",children:[t.jsx("td",{className:"px-5 py-3.5",children:t.jsx("span",{className:"font-mono text-page",children:e.display_name||e.model_name})}),t.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-page-label",children:e.input_price!=null?`$${(Number(e.input_price)*1e3).toFixed(4)}`:"-"}),t.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-page-label",children:e.output_price!=null?`$${(Number(e.output_price)*1e3).toFixed(4)}`:"-"}),t.jsx("td",{className:"px-5 py-3.5 text-center",children:t.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs border ${e.status==="healthy"?"bg-green-500/10 text-page-success border-green-500/20":"bg-page-surface text-page-secondary border-page-divider"}`,children:[t.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${e.status==="healthy"?"bg-green-500":"bg-neutral-500"}`}),e.status==="healthy"?s("pricing.online"):s("pricing.unknown")]})})]},e.model_name||a))})]})})]})}export{w as default}; diff --git a/dist/assets/Register-BgbUTYo5.js b/dist/assets/Register-DYiVAcZJ.js similarity index 96% rename from dist/assets/Register-BgbUTYo5.js rename to dist/assets/Register-DYiVAcZJ.js index 1019be4..964e13e 100644 --- a/dist/assets/Register-BgbUTYo5.js +++ b/dist/assets/Register-DYiVAcZJ.js @@ -1 +1 @@ -import{u as x,a as h,b as w,r as c,j as e,N as f,L as b,z as a}from"./index-Cvtin-Z6.js";import{u as j}from"./useTranslation-BeJE8l6a.js";function y(){const{t:s}=j(),{register:d,user:m}=x(),{site:l}=h(),u=w(),[r,i]=c.useState({username:"",password:"",password2:"",email:""}),[n,o]=c.useState(!1);if(m)return e.jsx(f,{to:"/dashboard",replace:!0});const p=async t=>{if(t.preventDefault(),!r.username||!r.password){a.error(s("register.fillRequired"));return}if(r.password!==r.password2){a.error(s("register.passwordMismatch"));return}if(r.password.length<8){a.error(s("register.passwordLength"));return}if(r.password.length>20){a.error(s("register.passwordLength"));return}o(!0);try{if((await d({username:r.username,password:r.password,email:r.email||void 0})).success){a.success(s("register.accountCreated")),u("/login",{replace:!0});return}}catch{}o(!1)};return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-6",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page mb-2",children:s("register.createAccount")}),e.jsx("p",{className:"text-sm text-page-secondary",children:l!=null&&l.name?s("register.getStartedWith",{name:l.name}):s("register.getStartedDefault")})]}),e.jsxs("form",{onSubmit:p,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:[s("register.username")," *"]}),e.jsx("input",{type:"text",value:r.username,onChange:t=>i({...r,username:t.target.value}),className:"input",placeholder:s("register.chooseUsername"),autoComplete:"username",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("register.email")}),e.jsx("input",{type:"email",value:r.email,onChange:t=>i({...r,email:t.target.value}),className:"input",placeholder:s("register.emailPlaceholder"),autoComplete:"email"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:[s("register.password")," *"]}),e.jsx("input",{type:"password",value:r.password,onChange:t=>i({...r,password:t.target.value}),className:"input",placeholder:s("register.passwordPlaceholder"),autoComplete:"new-password",required:!0})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:[s("register.confirmPassword")," *"]}),e.jsx("input",{type:"password",value:r.password2,onChange:t=>i({...r,password2:t.target.value}),className:"input",placeholder:s("register.repeatPassword"),autoComplete:"new-password",required:!0})]}),e.jsxs("button",{type:"submit",disabled:n,className:"btn-primary w-full flex items-center justify-center gap-2",children:[n&&e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),s(n?"register.creating":"register.createAccountBtn")]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-page-secondary",children:[s("register.hasAccount")," ",e.jsx(b,{to:"/login",className:"text-page-link hover:text-page-link transition-colors font-medium",children:s("register.signIn")})]})})]})})})}export{y as default}; +import{u as x,a as h,b as w,r as c,j as e,N as f,L as b,z as a}from"./index-ClhW4pXr.js";import{u as j}from"./useTranslation-Pq_l7wMn.js";function y(){const{t:s}=j(),{register:d,user:m}=x(),{site:l}=h(),u=w(),[r,i]=c.useState({username:"",password:"",password2:"",email:""}),[n,o]=c.useState(!1);if(m)return e.jsx(f,{to:"/dashboard",replace:!0});const p=async t=>{if(t.preventDefault(),!r.username||!r.password){a.error(s("register.fillRequired"));return}if(r.password!==r.password2){a.error(s("register.passwordMismatch"));return}if(r.password.length<8){a.error(s("register.passwordLength"));return}if(r.password.length>20){a.error(s("register.passwordLength"));return}o(!0);try{if((await d({username:r.username,password:r.password,email:r.email||void 0})).success){a.success(s("register.accountCreated")),u("/login",{replace:!0});return}}catch{}o(!1)};return e.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-6",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page mb-2",children:s("register.createAccount")}),e.jsx("p",{className:"text-sm text-page-secondary",children:l!=null&&l.name?s("register.getStartedWith",{name:l.name}):s("register.getStartedDefault")})]}),e.jsxs("form",{onSubmit:p,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:[s("register.username")," *"]}),e.jsx("input",{type:"text",value:r.username,onChange:t=>i({...r,username:t.target.value}),className:"input",placeholder:s("register.chooseUsername"),autoComplete:"username",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("register.email")}),e.jsx("input",{type:"email",value:r.email,onChange:t=>i({...r,email:t.target.value}),className:"input",placeholder:s("register.emailPlaceholder"),autoComplete:"email"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:[s("register.password")," *"]}),e.jsx("input",{type:"password",value:r.password,onChange:t=>i({...r,password:t.target.value}),className:"input",placeholder:s("register.passwordPlaceholder"),autoComplete:"new-password",required:!0})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:[s("register.confirmPassword")," *"]}),e.jsx("input",{type:"password",value:r.password2,onChange:t=>i({...r,password2:t.target.value}),className:"input",placeholder:s("register.repeatPassword"),autoComplete:"new-password",required:!0})]}),e.jsxs("button",{type:"submit",disabled:n,className:"btn-primary w-full flex items-center justify-center gap-2",children:[n&&e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),s(n?"register.creating":"register.createAccountBtn")]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-page-secondary",children:[s("register.hasAccount")," ",e.jsx(b,{to:"/login",className:"text-page-link hover:text-page-link transition-colors font-medium",children:s("register.signIn")})]})})]})})})}export{y as default}; diff --git a/dist/assets/SpotlightCard-a-a6koSS.js b/dist/assets/SpotlightCard-a-a6koSS.js deleted file mode 100644 index c204509..0000000 --- a/dist/assets/SpotlightCard-a-a6koSS.js +++ /dev/null @@ -1 +0,0 @@ -import{r as t,j as c}from"./index-Cvtin-Z6.js";const b=({children:i,className:u="",spotlightColor:l="rgba(255, 255, 255, 0.25)"})=>{const o=t.useRef(null),[d,n]=t.useState(!1),[s,p]=t.useState({x:0,y:0}),[x,e]=t.useState(0),v=r=>{if(!o.current||d)return;const a=o.current.getBoundingClientRect();p({x:r.clientX-a.left,y:r.clientY-a.top})},f=()=>{n(!0),e(.6)},h=()=>{n(!1),e(0)},y=()=>{e(.6)},M=()=>{e(0)};return c.jsxs("div",{ref:o,onMouseMove:v,onFocus:f,onBlur:h,onMouseEnter:y,onMouseLeave:M,className:`relative rounded-3xl border border-neutral-800 bg-neutral-900 overflow-hidden p-8 ${u}`,children:[c.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-500 ease-in-out",style:{opacity:x,background:`radial-gradient(circle at ${s.x}px ${s.y}px, ${l}, transparent 80%)`}}),i]})};export{b as S}; diff --git a/dist/assets/Tokens-BdD2zQiB.js b/dist/assets/Tokens-BdD2zQiB.js new file mode 100644 index 0000000..364b67b --- /dev/null +++ b/dist/assets/Tokens-BdD2zQiB.js @@ -0,0 +1,73 @@ +import{r as o,e as E,f as I,j as e,z as C,h as P,i as W,k as U}from"./index-ClhW4pXr.js";import{u as K}from"./useTranslation-Pq_l7wMn.js";const F=()=>{var D;const{t}=K(),[v,_]=o.useState([]),[i,L]=o.useState(null),[S,m]=o.useState([]),[l,j]=o.useState(""),[p,A]=o.useState("claudecode"),[H,$]=o.useState(!0),[y,M]=o.useState(!1),[u,x]=o.useState(""),[h,k]=o.useState(!1),T=o.useRef(null),d=window.location.origin,N=[{id:"claudecode",name:"Claude Code",path:"~/.claude/settings.json"},{id:"openclaw",name:"OpenClaw",path:"~/.openclaw/openclaw.json"},{id:"opencode",name:"OpenCode",path:"~/.config/opencode/opencode.json"},{id:"cursor",name:"Cursor",path:"Settings → Models → OpenAI API Key"},{id:"curl",name:"cURL",path:"Terminal"},{id:"python",name:"Python SDK",path:"main.py"},{id:"anthropic",name:"Anthropic SDK",path:"main.py"}];o.useEffect(()=>{a()},[]),o.useEffect(()=>{i&&f(i)},[i]),o.useEffect(()=>{const s=n=>{T.current&&!T.current.contains(n.target)&&k(!1)};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);const a=async()=>{$(!0);try{const s=await E();if(s.data.success){const n=s.data.data||[];_(n),n.length>0&&L(n[0])}}catch{}$(!1)},f=async s=>{try{if(s.model_limits_enabled&&s.model_limits){const r=s.model_limits.split(",").filter(g=>g.trim());m(r),r.length>0&&j(r[0]);return}const n=await I();if(n.data.success&&n.data.data){const g=(Array.isArray(n.data.data)?n.data.data:n.data.data.items||[]).map(b=>b.model_name||b.id||b);m(g),g.length>0&&j(g[0])}}catch{}},c=s=>{const n=s.toLowerCase();return n.includes("claude")?{provider:"anthropic",api:"anthropic-messages"}:n.includes("gpt")||n.includes("o1")||n.includes("o3")?{provider:"openai",api:"openai-chat"}:n.includes("gemini")?{provider:"google",api:"google-chat"}:{provider:"openai",api:"openai-chat"}},w=()=>{if(!i||!l)return"";const s="sk-"+i.key;switch(p){case"claudecode":return`{ + "env": { + "ANTHROPIC_API_KEY": "${s}", + "ANTHROPIC_BASE_URL": "${d}/", + "ANTHROPIC_MODEL": "${l}" + } +}`;case"openclaw":{const n=c(l);return`{ + "provider": "${n.provider}", + "base_url": "${d}/", + "api": "${n.api}", + "api_key": "${s}", + "model": { + "id": "${l}", + "name": "${l}" + } +}`}case"opencode":return`{ + "provider": { + "openai": { + "options": { + "baseURL": "${d}/v1", + "apiKey": "${s}" + }, + "models": { + "${l}": { + "name": "${l}", + "options": { + "store": false + } + } + } + } + }, + "$schema": "https://opencode.ai/config.json" +}`;case"cursor":return`API Key: ${s} +Base URL: ${d}/v1 +Model: ${l}`;case"curl":return`curl ${d}/v1/chat/completions \\ + -H "Content-Type: application/json" \\ + -H "Authorization: Bearer ${s}" \\ + -d '{ + "model": "${l}", + "messages": [ + {"role": "user", "content": "Hello!"} + ] + }'`;case"python":return`from openai import OpenAI + +client = OpenAI( + api_key="${s}", + base_url="${d}/v1" +) + +response = client.chat.completions.create( + model="${l}", + messages=[ + {"role": "user", "content": "Hello!"} + ] +) + +print(response.choices[0].message.content)`;case"anthropic":return`import anthropic + +client = anthropic.Anthropic( + api_key="${s}", + base_url="${d}/" +) + +message = client.messages.create( + model="${l}", + max_tokens=1024, + messages=[ + {"role": "user", "content": "Hello!"} + ] +) + +print(message.content[0].text)`;default:return""}},z=()=>{var s;switch(p){case"curl":return"api-call.sh";case"python":return"main.py";case"anthropic":return"main.py";case"cursor":return"cursor-config.txt";default:return((s=N.find(n=>n.id===p))==null?void 0:s.path.split("/").pop())||"config.json"}},O=async()=>{const s=w();try{await navigator.clipboard.writeText(s)}catch{const r=document.createElement("textarea");r.value=s,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r)}M(!0),C.success(t("config.copied")),setTimeout(()=>M(!1),2e3)},R=()=>{const s=w(),n=z(),r=new Blob([s],{type:"text/plain"}),g=URL.createObjectURL(r),b=document.createElement("a");b.href=g,b.download=n,b.click(),URL.revokeObjectURL(g),C.success(t("config.downloaded"))};if(H)return e.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-page-secondary",children:t("config.loading")})]});if(v.length===0)return e.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[e.jsx("svg",{className:"w-8 h-8 mx-auto mb-3 text-page-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})}),e.jsx("p",{className:"text-sm text-page-secondary mb-1",children:t("config.loginPrompt")}),e.jsx("p",{className:"text-xs text-page-muted",children:t("config.loginDesc")})]});const B=w();return e.jsxs("div",{className:"glass rounded-2xl overflow-hidden",children:[e.jsxs("div",{className:"px-5 py-4 border-b border-page-divider",children:[e.jsxs("h4",{className:"font-semibold text-sm text-page flex items-center gap-2",children:[e.jsx("svg",{className:"w-4 h-4 text-brand-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),t("config.title")]}),e.jsx("p",{className:"text-xs text-page-muted mt-1",children:t("config.subtitle")})]}),e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center gap-2 text-xs font-medium text-page-label mb-2",children:[e.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})}),t("config.selectKey")]}),e.jsx("select",{value:(i==null?void 0:i.id)||"",onChange:s=>{const n=v.find(r=>r.id===parseInt(s.target.value));L(n)},className:"input",children:v.map(s=>e.jsxs("option",{value:s.id,children:[s.name," (sk-",s.key.substring(0,16),"...)"]},s.id))})]}),S.length>0&&e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center gap-2 text-xs font-medium text-page-label mb-2",children:[e.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})}),t("config.selectModel")]}),e.jsxs("div",{className:"relative",ref:T,children:[e.jsx("input",{type:"text",value:h?u:l,onChange:s=>{x(s.target.value),k(!0)},onFocus:()=>{x(""),k(!0)},className:"input pr-8",placeholder:t("config.searchModel")}),e.jsx("svg",{className:"w-3.5 h-3.5 absolute right-3 top-1/2 -translate-y-1/2 text-page-muted pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),h&&e.jsxs("div",{className:"absolute z-50 mt-1 w-full max-h-60 overflow-y-auto rounded-lg glass shadow-xl",children:[S.filter(s=>s.toLowerCase().includes(u.toLowerCase())).map(s=>e.jsx("button",{onClick:()=>{j(s),k(!1),x("")},className:`w-full text-left px-3 py-2 text-sm transition-colors hover:bg-page-surface-hover ${s===l?"text-brand-400 bg-brand-500/10":"text-page-secondary"}`,children:s},s)),S.filter(s=>s.toLowerCase().includes(u.toLowerCase())).length===0&&e.jsx("p",{className:"px-3 py-3 text-xs text-page-muted text-center",children:t("config.noModelMatch")})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium text-page-label mb-2 block",children:t("config.selectTool")}),e.jsx("div",{className:"flex flex-wrap gap-2",children:N.map(s=>e.jsx("button",{onClick:()=>A(s.id),className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-all ${p===s.id?"bg-brand-500 text-white shadow-sm":"bg-page-surface text-page-secondary hover:bg-page-surface-hover"}`,children:s.name},s.id))})]})]}),e.jsxs("div",{className:"border-t border-page-divider",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 bg-page-inset",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-red-400"}),e.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-yellow-400"}),e.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-green-400"})]}),e.jsx("span",{className:"text-xs text-page-muted ml-1",children:(D=N.find(s=>s.id===p))==null?void 0:D.path})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:O,className:"p-1.5 rounded-md hover:bg-page-surface-hover transition-colors text-page-muted hover:text-page",title:t("config.copy"),children:y?e.jsx("svg",{className:"w-3.5 h-3.5 text-page-success",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):e.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),e.jsx("button",{onClick:R,className:"p-1.5 rounded-md hover:bg-page-surface-hover transition-colors text-page-muted hover:text-page",title:t("config.download"),children:e.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})})]})]}),e.jsx("pre",{className:"p-4 text-xs leading-relaxed overflow-x-auto max-h-64 font-mono text-page-success",children:e.jsx("code",{children:B})})]})]})};function Y(){const{t}=K(),[v,_]=o.useState([]),[i,L]=o.useState(!0),[S,m]=o.useState(!1),[l,j]=o.useState(""),[p,A]=o.useState(!1),[H,$]=o.useState(null),[y,M]=o.useState(null),[u,x]=o.useState(null),h=o.useCallback(async()=>{L(!0);try{const a=await E();a.data.success&&_(a.data.data||[])}catch{}L(!1)},[]);o.useEffect(()=>{h()},[h]);const k=async a=>{var f;if(a.preventDefault(),!l.trim()){C.error(t("tokens.enterName"));return}A(!0);try{const c=await P({name:l.trim()});if(c.data.success){j(""),m(!1);const w=(f=c.data.data)==null?void 0:f.key;w&&M(w),await h()}}catch{}A(!1)},T=async a=>{try{(await W(a.id,{status:a.status===1?2:1})).data.success&&(C.success(a.status===1?t("tokens.tokenDisabled"):t("tokens.tokenEnabled")),await h())}catch{}},d=async()=>{if(u)try{(await U(u.id)).data.success&&(C.success(t("tokens.tokenDeleted")),x(null),await h())}catch{}},N=async a=>{try{await navigator.clipboard.writeText(a)}catch{const c=document.createElement("textarea");c.value=a,c.style.position="fixed",c.style.opacity="0",document.body.appendChild(c),c.select(),document.execCommand("copy"),document.body.removeChild(c)}$(a),C.success(t("tokens.copiedToClipboard")),setTimeout(()=>$(null),2e3)};return i?e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"flex items-center justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page",children:t("tokens.title")}),e.jsx("p",{className:"text-sm text-page-secondary mt-1",children:t("tokens.subtitle")})]}),e.jsx("button",{onClick:()=>m(!0),className:"btn-primary",children:t("tokens.newKey")})]}),S&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>m(!1),children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-md",onClick:a=>a.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:t("tokens.createApiKey")}),e.jsxs("form",{onSubmit:k,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:t("tokens.name")}),e.jsx("input",{type:"text",value:l,onChange:a=>j(a.target.value),className:"input",placeholder:t("tokens.namePlaceholder"),autoFocus:!0,required:!0})]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:()=>m(!1),className:"btn-secondary",children:t("tokens.cancel")}),e.jsx("button",{type:"submit",disabled:p,className:"btn-primary",children:t(p?"tokens.creating":"tokens.create")})]})]})]})}),y&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-lg",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-2",children:t("tokens.newApiKey")}),e.jsx("div",{className:"bg-yellow-500/10 border border-yellow-500/20 rounded-xl p-3 mb-4",children:e.jsx("p",{className:"text-sm text-page-warning",children:t("tokens.keyWarning")})}),e.jsxs("div",{className:"bg-page-inset rounded-xl p-4 flex items-center gap-3",children:[e.jsx("code",{className:"text-sm font-mono text-page-success flex-1 break-all select-all",children:y}),e.jsx("button",{onClick:()=>N(y),className:"btn-primary !px-4 !py-1.5 flex-shrink-0",children:t(H===y?"tokens.copied":"tokens.copy")})]}),e.jsx("div",{className:"flex justify-end mt-4",children:e.jsx("button",{onClick:()=>M(null),className:"btn-secondary",children:t("tokens.savedKey")})})]})}),u&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>x(null),children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-sm",onClick:a=>a.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-3",children:t("tokens.deleteToken")}),e.jsx("p",{className:"text-sm text-page-secondary mb-4",children:t("tokens.deleteConfirm",{name:u.name})}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>x(null),className:"btn-secondary",children:t("tokens.cancel")}),e.jsx("button",{onClick:d,className:"px-6 py-2.5 rounded-xl bg-red-600 text-white text-sm font-medium hover:bg-red-500 transition-colors",children:t("tokens.delete")})]})]})}),v.length===0?e.jsxs("div",{className:"glass rounded-2xl p-12 text-center",children:[e.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-2xl bg-page-surface flex items-center justify-center",children:e.jsx("svg",{className:"w-8 h-8 text-page-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})})}),e.jsx("p",{className:"text-page-secondary mb-4",children:t("tokens.noKeys")}),e.jsx("button",{onClick:()=>m(!0),className:"btn-primary",children:t("tokens.createFirst")})]}):e.jsx("div",{className:"space-y-3",children:v.map(a=>e.jsxs("div",{className:"glass-sm rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:`w-2.5 h-2.5 rounded-full flex-shrink-0 ${a.status===1?"bg-green-500":"bg-page-muted"}`}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("p",{className:"text-sm font-medium text-page",children:a.name})}),e.jsx("span",{className:"text-xs text-page-muted hidden md:block",children:a.created_time?new Date(a.created_time*1e3).toLocaleDateString():""}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>T(a),className:`px-3 py-1 text-xs rounded-lg border transition-colors ${a.status===1?"border-green-500/30 text-page-success hover:bg-green-500/10":"border-page-divider text-page-secondary hover:bg-page-surface-hover"}`,children:a.status===1?t("tokens.enabled"):t("tokens.disabled")}),e.jsx("button",{onClick:()=>x(a),className:"px-3 py-1 text-xs rounded-lg border border-red-500/20 text-page-danger hover:bg-red-500/10 transition-colors",children:t("tokens.delete")})]})]}),a.key&&e.jsxs("div",{className:"mt-3 flex items-center gap-2 bg-page-inset rounded-lg px-3 py-2",children:[e.jsxs("code",{className:"text-xs font-mono text-page-muted flex-1 break-all select-all",children:["sk-",a.key]}),e.jsx("button",{onClick:()=>N("sk-"+a.key),className:"flex-shrink-0 px-2.5 py-1 text-xs rounded-md bg-page-surface text-page-secondary hover:bg-page-surface-hover hover:text-page transition-colors",children:H==="sk-"+a.key?t("tokens.copied"):t("tokens.copy")})]})]},a.id))}),e.jsx("div",{className:"mt-8",children:e.jsx(F,{})})]})}export{Y as default}; diff --git a/dist/assets/Tokens-DqFd9l1i.js b/dist/assets/Tokens-DqFd9l1i.js deleted file mode 100644 index 689cb8b..0000000 --- a/dist/assets/Tokens-DqFd9l1i.js +++ /dev/null @@ -1,73 +0,0 @@ -import{r as o,e as E,f as I,j as e,z as C,h as P,i as W,k as U}from"./index-Cvtin-Z6.js";import{u as K}from"./useTranslation-BeJE8l6a.js";const F=()=>{var D;const{t:s}=K(),[j,_]=o.useState([]),[i,L]=o.useState(null),[S,m]=o.useState([]),[l,v]=o.useState(""),[x,A]=o.useState("claudecode"),[H,$]=o.useState(!0),[k,M]=o.useState(!1),[u,p]=o.useState(""),[h,y]=o.useState(!1),T=o.useRef(null),d=window.location.origin,w=[{id:"claudecode",name:"Claude Code",path:"~/.claude/settings.json"},{id:"openclaw",name:"OpenClaw",path:"~/.openclaw/openclaw.json"},{id:"opencode",name:"OpenCode",path:"~/.config/opencode/opencode.json"},{id:"cursor",name:"Cursor",path:"Settings → Models → OpenAI API Key"},{id:"curl",name:"cURL",path:"Terminal"},{id:"python",name:"Python SDK",path:"main.py"},{id:"anthropic",name:"Anthropic SDK",path:"main.py"}];o.useEffect(()=>{a()},[]),o.useEffect(()=>{i&&f(i)},[i]),o.useEffect(()=>{const t=n=>{T.current&&!T.current.contains(n.target)&&y(!1)};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[]);const a=async()=>{$(!0);try{const t=await E();if(t.data.success){const n=t.data.data||[];_(n),n.length>0&&L(n[0])}}catch{}$(!1)},f=async t=>{try{if(t.model_limits_enabled&&t.model_limits){const r=t.model_limits.split(",").filter(g=>g.trim());m(r),r.length>0&&v(r[0]);return}const n=await I();if(n.data.success&&n.data.data){const g=(Array.isArray(n.data.data)?n.data.data:n.data.data.items||[]).map(b=>b.model_name||b.id||b);m(g),g.length>0&&v(g[0])}}catch{}},c=t=>{const n=t.toLowerCase();return n.includes("claude")?{provider:"anthropic",api:"anthropic-messages"}:n.includes("gpt")||n.includes("o1")||n.includes("o3")?{provider:"openai",api:"openai-chat"}:n.includes("gemini")?{provider:"google",api:"google-chat"}:{provider:"openai",api:"openai-chat"}},N=()=>{if(!i||!l)return"";const t="sk-"+i.key;switch(x){case"claudecode":return`{ - "env": { - "ANTHROPIC_API_KEY": "${t}", - "ANTHROPIC_BASE_URL": "${d}/", - "ANTHROPIC_MODEL": "${l}" - } -}`;case"openclaw":{const n=c(l);return`{ - "provider": "${n.provider}", - "base_url": "${d}/", - "api": "${n.api}", - "api_key": "${t}", - "model": { - "id": "${l}", - "name": "${l}" - } -}`}case"opencode":return`{ - "provider": { - "openai": { - "options": { - "baseURL": "${d}/v1", - "apiKey": "${t}" - }, - "models": { - "${l}": { - "name": "${l}", - "options": { - "store": false - } - } - } - } - }, - "$schema": "https://opencode.ai/config.json" -}`;case"cursor":return`API Key: ${t} -Base URL: ${d}/v1 -Model: ${l}`;case"curl":return`curl ${d}/v1/chat/completions \\ - -H "Content-Type: application/json" \\ - -H "Authorization: Bearer ${t}" \\ - -d '{ - "model": "${l}", - "messages": [ - {"role": "user", "content": "Hello!"} - ] - }'`;case"python":return`from openai import OpenAI - -client = OpenAI( - api_key="${t}", - base_url="${d}/v1" -) - -response = client.chat.completions.create( - model="${l}", - messages=[ - {"role": "user", "content": "Hello!"} - ] -) - -print(response.choices[0].message.content)`;case"anthropic":return`import anthropic - -client = anthropic.Anthropic( - api_key="${t}", - base_url="${d}/" -) - -message = client.messages.create( - model="${l}", - max_tokens=1024, - messages=[ - {"role": "user", "content": "Hello!"} - ] -) - -print(message.content[0].text)`;default:return""}},z=()=>{var t;switch(x){case"curl":return"api-call.sh";case"python":return"main.py";case"anthropic":return"main.py";case"cursor":return"cursor-config.txt";default:return((t=w.find(n=>n.id===x))==null?void 0:t.path.split("/").pop())||"config.json"}},O=async()=>{const t=N();try{await navigator.clipboard.writeText(t)}catch{const r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r)}M(!0),C.success(s("config.copied")),setTimeout(()=>M(!1),2e3)},R=()=>{const t=N(),n=z(),r=new Blob([t],{type:"text/plain"}),g=URL.createObjectURL(r),b=document.createElement("a");b.href=g,b.download=n,b.click(),URL.revokeObjectURL(g),C.success(s("config.downloaded"))};if(H)return e.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-page-secondary",children:s("config.loading")})]});if(j.length===0)return e.jsxs("div",{className:"glass rounded-2xl p-6 text-center",children:[e.jsx("svg",{className:"w-8 h-8 mx-auto mb-3 text-page-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})}),e.jsx("p",{className:"text-sm text-page-secondary mb-1",children:s("config.loginPrompt")}),e.jsx("p",{className:"text-xs text-page-muted",children:s("config.loginDesc")})]});const B=N();return e.jsxs("div",{className:"glass rounded-2xl overflow-hidden",children:[e.jsxs("div",{className:"px-5 py-4 border-b border-white/5",children:[e.jsxs("h4",{className:"font-semibold text-sm text-page flex items-center gap-2",children:[e.jsx("svg",{className:"w-4 h-4 text-brand-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),s("config.title")]}),e.jsx("p",{className:"text-xs text-page-muted mt-1",children:s("config.subtitle")})]}),e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center gap-2 text-xs font-medium text-page-label mb-2",children:[e.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})}),s("config.selectKey")]}),e.jsx("select",{value:(i==null?void 0:i.id)||"",onChange:t=>{const n=j.find(r=>r.id===parseInt(t.target.value));L(n)},className:"input",children:j.map(t=>e.jsxs("option",{value:t.id,children:[t.name," (sk-",t.key.substring(0,16),"...)"]},t.id))})]}),S.length>0&&e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center gap-2 text-xs font-medium text-page-label mb-2",children:[e.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})}),s("config.selectModel")]}),e.jsxs("div",{className:"relative",ref:T,children:[e.jsx("input",{type:"text",value:h?u:l,onChange:t=>{p(t.target.value),y(!0)},onFocus:()=>{p(""),y(!0)},className:"input pr-8",placeholder:s("config.searchModel")}),e.jsx("svg",{className:"w-3.5 h-3.5 absolute right-3 top-1/2 -translate-y-1/2 text-page-muted pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),h&&e.jsxs("div",{className:"absolute z-50 mt-1 w-full max-h-60 overflow-y-auto rounded-lg border border-white/10 bg-neutral-900 shadow-xl",children:[S.filter(t=>t.toLowerCase().includes(u.toLowerCase())).map(t=>e.jsx("button",{onClick:()=>{v(t),y(!1),p("")},className:`w-full text-left px-3 py-2 text-sm transition-colors hover:bg-white/10 ${t===l?"text-brand-400 bg-brand-500/10":"text-page-secondary"}`,children:t},t)),S.filter(t=>t.toLowerCase().includes(u.toLowerCase())).length===0&&e.jsx("p",{className:"px-3 py-3 text-xs text-page-muted text-center",children:s("config.noModelMatch")})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium text-page-label mb-2 block",children:s("config.selectTool")}),e.jsx("div",{className:"flex flex-wrap gap-2",children:w.map(t=>e.jsx("button",{onClick:()=>A(t.id),className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-all ${x===t.id?"bg-brand-500 text-white shadow-sm":"bg-white/5 text-page-secondary hover:bg-white/10"}`,children:t.name},t.id))})]})]}),e.jsxs("div",{className:"border-t border-white/5",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 bg-black/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-red-400"}),e.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-yellow-400"}),e.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-green-400"})]}),e.jsx("span",{className:"text-xs text-page-muted ml-1",children:(D=w.find(t=>t.id===x))==null?void 0:D.path})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:O,className:"p-1.5 rounded-md hover:bg-white/10 transition-colors text-page-muted hover:text-page",title:s("config.copy"),children:k?e.jsx("svg",{className:"w-3.5 h-3.5 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):e.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),e.jsx("button",{onClick:R,className:"p-1.5 rounded-md hover:bg-white/10 transition-colors text-page-muted hover:text-page",title:s("config.download"),children:e.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})})]})]}),e.jsx("pre",{className:"p-4 text-xs leading-relaxed overflow-x-auto max-h-64 font-mono text-green-400",children:e.jsx("code",{children:B})})]})]})};function Y(){const{t:s}=K(),[j,_]=o.useState([]),[i,L]=o.useState(!0),[S,m]=o.useState(!1),[l,v]=o.useState(""),[x,A]=o.useState(!1),[H,$]=o.useState(null),[k,M]=o.useState(null),[u,p]=o.useState(null),h=o.useCallback(async()=>{L(!0);try{const a=await E();a.data.success&&_(a.data.data||[])}catch{}L(!1)},[]);o.useEffect(()=>{h()},[h]);const y=async a=>{var f;if(a.preventDefault(),!l.trim()){C.error(s("tokens.enterName"));return}A(!0);try{const c=await P({name:l.trim()});if(c.data.success){v(""),m(!1);const N=(f=c.data.data)==null?void 0:f.key;N&&M(N),await h()}}catch{}A(!1)},T=async a=>{try{(await W(a.id,{status:a.status===1?2:1})).data.success&&(C.success(a.status===1?s("tokens.tokenDisabled"):s("tokens.tokenEnabled")),await h())}catch{}},d=async()=>{if(u)try{(await U(u.id)).data.success&&(C.success(s("tokens.tokenDeleted")),p(null),await h())}catch{}},w=async a=>{try{await navigator.clipboard.writeText(a)}catch{const c=document.createElement("textarea");c.value=a,c.style.position="fixed",c.style.opacity="0",document.body.appendChild(c),c.select(),document.execCommand("copy"),document.body.removeChild(c)}$(a),C.success(s("tokens.copiedToClipboard")),setTimeout(()=>$(null),2e3)};return i?e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"flex items-center justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page",children:s("tokens.title")}),e.jsx("p",{className:"text-sm text-page-secondary mt-1",children:s("tokens.subtitle")})]}),e.jsx("button",{onClick:()=>m(!0),className:"btn-primary",children:s("tokens.newKey")})]}),S&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>m(!1),children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-md",onClick:a=>a.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("tokens.createApiKey")}),e.jsxs("form",{onSubmit:y,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-1.5",children:s("tokens.name")}),e.jsx("input",{type:"text",value:l,onChange:a=>v(a.target.value),className:"input",placeholder:s("tokens.namePlaceholder"),autoFocus:!0,required:!0})]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:()=>m(!1),className:"btn-secondary",children:s("tokens.cancel")}),e.jsx("button",{type:"submit",disabled:x,className:"btn-primary",children:s(x?"tokens.creating":"tokens.create")})]})]})]})}),k&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-lg",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-2",children:s("tokens.newApiKey")}),e.jsx("div",{className:"bg-yellow-500/10 border border-yellow-500/20 rounded-xl p-3 mb-4",children:e.jsx("p",{className:"text-sm text-yellow-300",children:s("tokens.keyWarning")})}),e.jsxs("div",{className:"bg-black/40 rounded-xl p-4 flex items-center gap-3",children:[e.jsx("code",{className:"text-sm font-mono text-green-400 flex-1 break-all select-all",children:k}),e.jsx("button",{onClick:()=>w(k),className:"btn-primary !px-4 !py-1.5 flex-shrink-0",children:s(H===k?"tokens.copied":"tokens.copy")})]}),e.jsx("div",{className:"flex justify-end mt-4",children:e.jsx("button",{onClick:()=>M(null),className:"btn-secondary",children:s("tokens.savedKey")})})]})}),u&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>p(null),children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-sm",onClick:a=>a.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-3",children:s("tokens.deleteToken")}),e.jsx("p",{className:"text-sm text-page-secondary mb-4",children:s("tokens.deleteConfirm",{name:u.name})}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>p(null),className:"btn-secondary",children:s("tokens.cancel")}),e.jsx("button",{onClick:d,className:"px-6 py-2.5 rounded-xl bg-red-600 text-white text-sm font-medium hover:bg-red-500 transition-colors",children:s("tokens.delete")})]})]})}),j.length===0?e.jsxs("div",{className:"glass rounded-2xl p-12 text-center",children:[e.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-2xl bg-neutral-800/50 flex items-center justify-center",children:e.jsx("svg",{className:"w-8 h-8 text-neutral-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})})}),e.jsx("p",{className:"text-page-secondary mb-4",children:s("tokens.noKeys")}),e.jsx("button",{onClick:()=>m(!0),className:"btn-primary",children:s("tokens.createFirst")})]}):e.jsx("div",{className:"space-y-3",children:j.map(a=>e.jsxs("div",{className:"glass-sm rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:`w-2.5 h-2.5 rounded-full flex-shrink-0 ${a.status===1?"bg-green-500":"bg-neutral-600"}`}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("p",{className:"text-sm font-medium text-page",children:a.name})}),e.jsx("span",{className:"text-xs text-page-muted hidden md:block",children:a.created_time?new Date(a.created_time*1e3).toLocaleDateString():""}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>T(a),className:`px-3 py-1 text-xs rounded-lg border transition-colors ${a.status===1?"border-green-500/30 text-green-400 hover:bg-green-500/10":"border-neutral-600 text-page-secondary hover:bg-neutral-800"}`,children:a.status===1?s("tokens.enabled"):s("tokens.disabled")}),e.jsx("button",{onClick:()=>p(a),className:"px-3 py-1 text-xs rounded-lg border border-red-500/20 text-red-400 hover:bg-red-500/10 transition-colors",children:s("tokens.delete")})]})]}),a.key&&e.jsxs("div",{className:"mt-3 flex items-center gap-2 bg-black/30 rounded-lg px-3 py-2",children:[e.jsxs("code",{className:"text-xs font-mono text-page-muted flex-1 break-all select-all",children:["sk-",a.key]}),e.jsx("button",{onClick:()=>w("sk-"+a.key),className:"flex-shrink-0 px-2.5 py-1 text-xs rounded-md bg-white/10 text-page-secondary hover:bg-white/20 hover:text-page transition-colors",children:H==="sk-"+a.key?s("tokens.copied"):s("tokens.copy")})]})]},a.id))}),e.jsx("div",{className:"mt-8",children:e.jsx(F,{})})]})}export{Y as default}; diff --git a/dist/assets/Topup-BAYKs2M5.js b/dist/assets/Topup-BAYKs2M5.js deleted file mode 100644 index 29e523c..0000000 --- a/dist/assets/Topup-BAYKs2M5.js +++ /dev/null @@ -1 +0,0 @@ -import{u as $e,a as Te,r as n,g as Oe,n as Me,j as e,Q as se,d as Ee,z as d,o as Le,p as Ue,q as He,t as Re,v as De,w as Fe,x as ze}from"./index-Cvtin-Z6.js";import{S as L}from"./SpotlightCard-a-a6koSS.js";import{_ as U}from"./CountUp-B7vSEX1I.js";import{u as Be}from"./useTranslation-BeJE8l6a.js";function Ke(){var I;const{t:s}=Be(),{user:i,refreshUser:H}=$e(),{site:r}=Te(),[m,ae]=n.useState(null),[l,le]=n.useState(null),[ne,R]=n.useState(!0),[T,D]=n.useState(""),[F,z]=n.useState(!1),[h,O]=n.useState(""),[re,M]=n.useState(null),[B,W]=n.useState(null),[oe,Q]=n.useState(!1),[b,y]=n.useState(!1),[E,f]=n.useState(""),[C,S]=n.useState(null),[ce,j]=n.useState(!1),[p,J]=n.useState(""),[k,de]=n.useState("usdt"),[N,ie]=n.useState(null),[P,me]=n.useState(!1),[V,pe]=n.useState([]),[ue,G]=n.useState(!1);r!=null&&r.enable_topup,r==null||r.topup_config;const A=n.useCallback(async()=>{var t;R(!0);try{const[a,o]=await Promise.all([Oe(),r!=null&&r.enable_topup?Me().catch(()=>null):Promise.resolve(null)]);a.data.success&&ae(a.data.data),(t=o==null?void 0:o.data)!=null&&t.data&&le(o.data.data)}catch{}R(!1)},[r==null?void 0:r.enable_topup]);n.useEffect(()=>{A()},[A]);const K=(m==null?void 0:m.quota)??(i==null?void 0:i.quota)??0,xe=(m==null?void 0:m.used_quota)??(i==null?void 0:i.used_quota)??0,ge=(m==null?void 0:m.request_count)??(i==null?void 0:i.request_count)??0,he=K/se,be=async t=>{if(t.preventDefault(),!!T.trim()){z(!0);try{(await Ee(T.trim())).data.success&&(d.success(s("topup.redeemSuccess")),D(""),await Promise.all([A(),H()]))}catch{}z(!1)}},X=async t=>{if(!t||t<=0){W(null);return}Q(!0);try{const a=await Le({amount:parseInt(t)});a.data.message==="success"&&W(a.data.data)}catch{}Q(!1)},ye=t=>{M(t),O(t),X(t)},fe=t=>["stripe","alipay","wxpay"].includes(t)&&!t.startsWith("epay_"),je=async t=>{var o;const a=parseInt(h);if(!a||a<=0){d.error(s("topup.enterAmount"));return}y(!0),f(t);try{const u=window.location.origin+"/topup",_={amount:a,payment_method:t,return_url:u};if(fe(t)){const c=await Ue(_);if(c.data.message==="success"&&((o=c.data.data)!=null&&o.pay_link))window.open(c.data.data.pay_link,"_blank");else if(c.data.message!=="success"){const x=typeof c.data.data=="string"?c.data.data:c.data.message;d.error(x||s("common.requestFailed"))}}else{const c=await He(_);if(c.data.message==="success"){const x=c.data.data,ee=c.data.url;if(ee&&x){const g=document.createElement("form");g.action=ee,g.method="POST",navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<1||(g.target="_blank");for(const te in x){const $=document.createElement("input");$.type="hidden",$.name=te,$.value=x[te],g.appendChild($)}document.body.appendChild(g),g.submit(),document.body.removeChild(g)}}else{const x=typeof c.data.data=="string"?c.data.data:c.data.message;d.error(x||s("common.requestFailed"))}}}catch{}y(!1),f("")},Ne=async t=>{var a;y(!0),f("creem");try{const o=await Re({product_id:t.productId,payment_method:"creem"});if(o.data.message==="success"&&((a=o.data.data)!=null&&a.checkout_url))window.open(o.data.data.checkout_url,"_blank");else if(o.data.message!=="success"){const u=typeof o.data.data=="string"?o.data.data:o.data.message;d.error(u||s("common.requestFailed"))}}catch{}y(!1),f("")},ve=async()=>{const t=parseInt(h);if(!t||t<=0){d.error(s("topup.enterAmount"));return}if(!p){d.error(s("topup.selectChain"));return}if(!k){d.error(s("topup.selectToken"));return}y(!0),f("crypto");try{const a=await De({amount:t,chain:p,token:k});if(a.data.message==="success"&&a.data.data)S(a.data.data),we(a.data.data.trade_no);else if(a.data.message!=="success"){const o=typeof a.data.data=="string"?a.data.data:a.data.message;d.error(o||s("common.requestFailed"))}}catch{}y(!1),f("")},we=t=>{j(!0);const a=setInterval(async()=>{var u,_;try{const c=await Fe(t);((u=c.data.data)==null?void 0:u.status)==="success"?(clearInterval(a),j(!1),S(null),d.success(s("topup.paymentSuccess")),await Promise.all([A(),H()])):((_=c.data.data)==null?void 0:_.status)==="expired"&&(clearInterval(a),j(!1),d.error(s("topup.orderExpired")))}catch{clearInterval(a),j(!1)}},5e3),o=((l==null?void 0:l.crypto_expiry_minutes)||30)*60*1e3;setTimeout(()=>{clearInterval(a),j(!1)},o)},v=(l==null?void 0:l.crypto_wallets)||{},w=n.useMemo(()=>{const t=[];return v.tron&&t.push({key:"tron",label:"TRON (TRC20)"}),v.eth&&t.push({key:"eth",label:"Ethereum (ERC20)"}),v.bsc&&t.push({key:"bsc",label:"BSC (BEP20)"}),t},[v.tron,v.eth,v.bsc]);n.useEffect(()=>{w.length>0&&!p&&J(w[0].key)},[w,p]);const Y=n.useMemo(()=>{if(!(l!=null&&l.creem_products))return[];try{const t=typeof l.creem_products=="string"?JSON.parse(l.creem_products):l.creem_products;return Array.isArray(t)?t:[]}catch{return[]}},[l==null?void 0:l.creem_products]),Ce=async()=>{var t;G(!0);try{const a=await ze({page:1,page_size:20});(t=a.data.data)!=null&&t.items&&pe(a.data.data.items)}catch{}G(!1)},_e=(l==null?void 0:l.amount_options)||[1,5,10,20,50,100],q=(l==null?void 0:l.min_topup)||1,Se=(l==null?void 0:l.pay_methods)||[],ke=l==null?void 0:l.enable_online_topup,Pe=l==null?void 0:l.enable_stripe_topup,Ae=l==null?void 0:l.enable_creem_topup,qe=l==null?void 0:l.enable_crypto_topup,Z=Se.filter(t=>t.type!=="creem"&&t.type!=="crypto");return ne?e.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):e.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page mb-1",children:s("topup.title")}),e.jsx("p",{className:"text-sm text-page-secondary",children:s("topup.subtitle")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-10",children:[e.jsxs(L,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-6",spotlightColor:"rgba(34,197,94,0.15)",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.balance")}),e.jsxs("div",{className:"text-3xl font-bold text-page",children:["$",e.jsx(U,{from:0,to:he,duration:1.5})]}),e.jsx("p",{className:"text-xs text-page-muted mt-1",children:s("dashboard.quotaUnits",{count:K.toLocaleString()})})]}),e.jsxs(L,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-6",spotlightColor:"rgba(129,140,248,0.15)",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.used")}),e.jsxs("div",{className:"text-3xl font-bold text-page",children:["$",e.jsx(U,{from:0,to:xe/se,duration:1.5})]})]}),e.jsxs(L,{className:"!bg-neutral-900/60 !border-neutral-800/60 !p-6",spotlightColor:"rgba(244,114,182,0.15)",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.totalRequests")}),e.jsx("div",{className:"text-3xl font-bold text-page",children:e.jsx(U,{from:0,to:ge,duration:1.5})})]})]}),(r==null?void 0:r.enable_topup)&&(ke||Pe)&&Z.length>0&&e.jsxs("div",{className:"glass rounded-2xl p-6 mb-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page",children:s("topup.onlineTopup")}),e.jsx("button",{onClick:()=>{me(!P),P||Ce()},className:"text-sm text-page-secondary hover:text-page transition-colors",children:s(P?"topup.hideHistory":"topup.viewHistory")})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-3",children:s("topup.selectAmount")}),e.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2",children:_e.map(t=>e.jsxs("button",{onClick:()=>ye(t),className:`py-2.5 px-3 rounded-xl text-sm font-medium transition-all ${re===t?"bg-brand-500 text-white shadow-lg shadow-brand-500/25":"glass-sm text-page-label hover:text-page hover:bg-white/[0.08]"}`,children:["$",t]},t))})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("topup.customAmount")}),e.jsx("div",{className:"flex gap-3",children:e.jsx("input",{type:"number",value:h,onChange:t=>{O(t.target.value),M(null)},onBlur:t=>X(t.target.value),min:q,placeholder:s("topup.amountPlaceholder",{min:q}),className:"input flex-1"})}),oe?e.jsx("p",{className:"text-xs text-page-muted mt-2",children:s("topup.calculating")}):B?e.jsxs("p",{className:"text-xs text-page-secondary mt-2",children:[s("topup.payAmountLabel"),": ",e.jsxs("span",{className:"text-green-400 font-medium",children:["¥",B]})]}):null]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-3",children:s("topup.paymentMethod")}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Z.map(t=>{const a=b&&E===t.type;return e.jsx("button",{onClick:()=>je(t.type),disabled:b||!h,className:"px-4 py-2.5 rounded-xl text-sm font-medium glass-sm text-page-label hover:text-page hover:bg-white/[0.08] disabled:opacity-40 disabled:cursor-not-allowed transition-all",children:a?s("topup.processing"):t.name},t.type)})})]})]}),(r==null?void 0:r.enable_topup)&&Ae&&Y.length>0&&e.jsxs("div",{className:"glass rounded-2xl p-6 mb-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("topup.creemPayment")||"Creem Payment"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:Y.map(t=>e.jsxs("div",{className:`glass-sm rounded-xl p-4 cursor-pointer transition-all ${(N==null?void 0:N.productId)===t.productId?"ring-2 ring-brand-500 bg-brand-500/10":"hover:bg-white/[0.06]"}`,onClick:()=>ie(t),children:[e.jsx("h3",{className:"text-sm font-semibold text-page mb-1",children:t.name}),e.jsxs("p",{className:"text-xl font-bold text-green-400 mb-1",children:["$",t.price," ",e.jsx("span",{className:"text-xs text-page-muted font-normal",children:t.currency||"USD"})]}),t.quota&&e.jsx("p",{className:"text-xs text-page-secondary",children:s("topup.quotaIncluded")||`${t.quota} quota`})]},t.productId))}),N&&e.jsx("div",{className:"mt-4 flex justify-end",children:e.jsx("button",{onClick:()=>Ne(N),disabled:b,className:"btn-primary px-6",children:b&&E==="creem"?s("topup.processing"):`${s("topup.payNow")||"Pay"} $${N.price}`})})]}),(r==null?void 0:r.enable_topup)&&qe&&w.length>0&&e.jsxs("div",{className:"glass rounded-2xl p-6 mb-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("topup.cryptoPayment")}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("topup.amount")}),e.jsx("input",{type:"number",value:h,onChange:t=>{O(t.target.value),M(null)},min:q,placeholder:s("topup.amountPlaceholder",{min:q}),className:"input w-full"})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("topup.chain")}),e.jsx("div",{className:"flex flex-wrap gap-2",children:w.map(t=>e.jsx("button",{onClick:()=>J(t.key),className:`px-4 py-2 rounded-xl text-sm font-medium transition-all ${p===t.key?"bg-brand-500 text-white shadow-lg shadow-brand-500/25":"glass-sm text-page-label hover:text-page hover:bg-white/[0.08]"}`,children:t.label},t.key))})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("topup.token")||"Token"}),e.jsx("div",{className:"flex gap-2",children:["usdt","usdc"].map(t=>e.jsx("button",{onClick:()=>de(t),className:`px-4 py-2 rounded-xl text-sm font-medium transition-all ${k===t?"bg-brand-500 text-white shadow-lg shadow-brand-500/25":"glass-sm text-page-label hover:text-page hover:bg-white/[0.08]"}`,children:t.toUpperCase()},t))})]}),e.jsx("button",{onClick:ve,disabled:b||!h,className:"btn-primary w-full",children:b&&E==="crypto"?s("topup.processing"):`${s("topup.payWith")||"Pay with"} ${k.toUpperCase()} (${((I=w.find(t=>t.key===p))==null?void 0:I.label)||p})`})]}),C&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>S(null),children:e.jsxs("div",{className:"glass rounded-2xl p-6 max-w-md w-full mx-4",onClick:t=>t.stopPropagation(),children:[e.jsx("h3",{className:"text-lg font-semibold text-page mb-4",children:s("topup.cryptoPayment")}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"glass-sm rounded-xl p-4",children:[e.jsx("p",{className:"text-xs text-page-secondary mb-1",children:s("topup.walletAddress")}),e.jsx("p",{className:"text-sm text-page font-mono break-all",children:C.wallet})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"glass-sm rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-page-secondary mb-1",children:s("topup.amount")}),e.jsxs("p",{className:"text-sm text-page font-medium",children:[C.amount," ",C.token]})]}),e.jsxs("div",{className:"glass-sm rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-page-secondary mb-1",children:s("topup.chain")}),e.jsx("p",{className:"text-sm text-page font-medium",children:C.chain})]})]}),ce&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-page-secondary",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"}),s("topup.waitingPayment")]}),e.jsx("button",{onClick:()=>{S(null),j(!1)},className:"w-full py-2 rounded-xl text-sm glass-sm text-page-secondary hover:text-page transition-colors",children:s("topup.close")})]})]})}),P&&e.jsxs("div",{className:"glass rounded-2xl p-6 mb-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("topup.history")}),ue?e.jsx("div",{className:"flex justify-center py-8",children:e.jsx("div",{className:"w-6 h-6 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):V.length===0?e.jsx("p",{className:"text-sm text-page-muted text-center py-8",children:s("topup.noHistory")}):e.jsx("div",{className:"space-y-2",children:V.map((t,a)=>e.jsxs("div",{className:"flex items-center justify-between glass-sm rounded-xl px-4 py-3",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm text-page",children:["$",t.amount]}),e.jsxs("p",{className:"text-xs text-page-muted",children:[new Date(t.create_time*1e3).toLocaleString()," · ",t.payment_method||s("topup.redeemCode")]})]}),e.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${t.status==="success"?"bg-green-500/10 text-green-400":t.status==="pending"?"bg-yellow-500/10 text-yellow-400":"bg-red-500/10 text-red-400"}`,children:t.status==="success"?s("topup.statusSuccess"):t.status==="pending"?s("topup.statusPending"):s("topup.statusFailed")})]},a))})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("topup.redeemTitle")}),e.jsxs("form",{onSubmit:be,className:"flex gap-3",children:[e.jsx("input",{type:"text",value:T,onChange:t=>D(t.target.value),className:"input flex-1",placeholder:s("topup.enterRedeemCode")}),e.jsx("button",{type:"submit",disabled:F,className:"btn-primary whitespace-nowrap",children:s(F?"topup.redeeming":"topup.redeem")})]})]})]})}export{Ke as default}; diff --git a/dist/assets/Topup-bHBPVOgP.js b/dist/assets/Topup-bHBPVOgP.js new file mode 100644 index 0000000..e6c6b5c --- /dev/null +++ b/dist/assets/Topup-bHBPVOgP.js @@ -0,0 +1 @@ +import{u as qe,a as $e,r as n,g as Te,n as Oe,j as e,Q as te,d as Me,z as d,o as Ee,p as Le,q as Ue,t as He,v as Re,w as De,x as Fe}from"./index-ClhW4pXr.js";import{C as L}from"./CountUp-DKNTcuWU.js";import{u as ze}from"./useTranslation-Pq_l7wMn.js";function Ve(){var Z;const{t:s}=ze(),{user:i,refreshUser:U}=qe(),{site:r}=$e(),[m,se]=n.useState(null),[l,ae]=n.useState(null),[le,H]=n.useState(!0),[T,R]=n.useState(""),[D,F]=n.useState(!1),[h,O]=n.useState(""),[ne,M]=n.useState(null),[z,B]=n.useState(null),[re,W]=n.useState(!1),[b,y]=n.useState(!1),[E,f]=n.useState(""),[C,S]=n.useState(null),[ce,j]=n.useState(!1),[p,Q]=n.useState(""),[k,oe]=n.useState("usdt"),[N,de]=n.useState(null),[P,ie]=n.useState(!1),[J,me]=n.useState([]),[pe,V]=n.useState(!1);r!=null&&r.enable_topup,r==null||r.topup_config;const A=n.useCallback(async()=>{var t;H(!0);try{const[a,c]=await Promise.all([Te(),r!=null&&r.enable_topup?Oe().catch(()=>null):Promise.resolve(null)]);a.data.success&&se(a.data.data),(t=c==null?void 0:c.data)!=null&&t.data&&ae(c.data.data)}catch{}H(!1)},[r==null?void 0:r.enable_topup]);n.useEffect(()=>{A()},[A]);const G=(m==null?void 0:m.quota)??(i==null?void 0:i.quota)??0,ue=(m==null?void 0:m.used_quota)??(i==null?void 0:i.used_quota)??0,xe=(m==null?void 0:m.request_count)??(i==null?void 0:i.request_count)??0,ge=G/te,he=async t=>{if(t.preventDefault(),!!T.trim()){F(!0);try{(await Me(T.trim())).data.success&&(d.success(s("topup.redeemSuccess")),R(""),await Promise.all([A(),U()]))}catch{}F(!1)}},K=async t=>{if(!t||t<=0){B(null);return}W(!0);try{const a=await Ee({amount:parseInt(t)});a.data.message==="success"&&B(a.data.data)}catch{}W(!1)},be=t=>{M(t),O(t),K(t)},ye=t=>["stripe","alipay","wxpay"].includes(t)&&!t.startsWith("epay_"),fe=async t=>{var c;const a=parseInt(h);if(!a||a<=0){d.error(s("topup.enterAmount"));return}y(!0),f(t);try{const u=window.location.origin+"/topup",_={amount:a,payment_method:t,return_url:u};if(ye(t)){const o=await Le(_);if(o.data.message==="success"&&((c=o.data.data)!=null&&c.pay_link))window.open(o.data.data.pay_link,"_blank");else if(o.data.message!=="success"){const x=typeof o.data.data=="string"?o.data.data:o.data.message;d.error(x||s("common.requestFailed"))}}else{const o=await Ue(_);if(o.data.message==="success"){const x=o.data.data,I=o.data.url;if(I&&x){const g=document.createElement("form");g.action=I,g.method="POST",navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<1||(g.target="_blank");for(const ee in x){const $=document.createElement("input");$.type="hidden",$.name=ee,$.value=x[ee],g.appendChild($)}document.body.appendChild(g),g.submit(),document.body.removeChild(g)}}else{const x=typeof o.data.data=="string"?o.data.data:o.data.message;d.error(x||s("common.requestFailed"))}}}catch{}y(!1),f("")},je=async t=>{var a;y(!0),f("creem");try{const c=await He({product_id:t.productId,payment_method:"creem"});if(c.data.message==="success"&&((a=c.data.data)!=null&&a.checkout_url))window.open(c.data.data.checkout_url,"_blank");else if(c.data.message!=="success"){const u=typeof c.data.data=="string"?c.data.data:c.data.message;d.error(u||s("common.requestFailed"))}}catch{}y(!1),f("")},Ne=async()=>{const t=parseInt(h);if(!t||t<=0){d.error(s("topup.enterAmount"));return}if(!p){d.error(s("topup.selectChain"));return}if(!k){d.error(s("topup.selectToken"));return}y(!0),f("crypto");try{const a=await Re({amount:t,chain:p,token:k});if(a.data.message==="success"&&a.data.data)S(a.data.data),ve(a.data.data.trade_no);else if(a.data.message!=="success"){const c=typeof a.data.data=="string"?a.data.data:a.data.message;d.error(c||s("common.requestFailed"))}}catch{}y(!1),f("")},ve=t=>{j(!0);const a=setInterval(async()=>{var u,_;try{const o=await De(t);((u=o.data.data)==null?void 0:u.status)==="success"?(clearInterval(a),j(!1),S(null),d.success(s("topup.paymentSuccess")),await Promise.all([A(),U()])):((_=o.data.data)==null?void 0:_.status)==="expired"&&(clearInterval(a),j(!1),d.error(s("topup.orderExpired")))}catch{clearInterval(a),j(!1)}},5e3),c=((l==null?void 0:l.crypto_expiry_minutes)||30)*60*1e3;setTimeout(()=>{clearInterval(a),j(!1)},c)},v=(l==null?void 0:l.crypto_wallets)||{},w=n.useMemo(()=>{const t=[];return v.tron&&t.push({key:"tron",label:"TRON (TRC20)"}),v.eth&&t.push({key:"eth",label:"Ethereum (ERC20)"}),v.bsc&&t.push({key:"bsc",label:"BSC (BEP20)"}),t},[v.tron,v.eth,v.bsc]);n.useEffect(()=>{w.length>0&&!p&&Q(w[0].key)},[w,p]);const X=n.useMemo(()=>{if(!(l!=null&&l.creem_products))return[];try{const t=typeof l.creem_products=="string"?JSON.parse(l.creem_products):l.creem_products;return Array.isArray(t)?t:[]}catch{return[]}},[l==null?void 0:l.creem_products]),we=async()=>{var t;V(!0);try{const a=await Fe({page:1,page_size:20});(t=a.data.data)!=null&&t.items&&me(a.data.data.items)}catch{}V(!1)},Ce=(l==null?void 0:l.amount_options)||[1,5,10,20,50,100],q=(l==null?void 0:l.min_topup)||1,_e=(l==null?void 0:l.pay_methods)||[],Se=l==null?void 0:l.enable_online_topup,ke=l==null?void 0:l.enable_stripe_topup,Pe=l==null?void 0:l.enable_creem_topup,Ae=l==null?void 0:l.enable_crypto_topup,Y=_e.filter(t=>t.type!=="creem"&&t.type!=="crypto");return le?e.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):e.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page mb-1",children:s("topup.title")}),e.jsx("p",{className:"text-sm text-page-secondary",children:s("topup.subtitle")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-10",children:[e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.balance")}),e.jsxs("div",{className:"text-3xl font-bold text-page",children:["$",e.jsx(L,{from:0,to:ge,duration:1.5})]}),e.jsx("p",{className:"text-xs text-page-muted mt-1",children:s("dashboard.quotaUnits",{count:G.toLocaleString()})})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.used")}),e.jsxs("div",{className:"text-3xl font-bold text-page",children:["$",e.jsx(L,{from:0,to:ue/te,duration:1.5})]})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("p",{className:"text-sm text-page-secondary mb-2",children:s("dashboard.totalRequests")}),e.jsx("div",{className:"text-3xl font-bold text-page",children:e.jsx(L,{from:0,to:xe,duration:1.5})})]})]}),(r==null?void 0:r.enable_topup)&&(Se||ke)&&Y.length>0&&e.jsxs("div",{className:"glass rounded-2xl p-6 mb-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page",children:s("topup.onlineTopup")}),e.jsx("button",{onClick:()=>{ie(!P),P||we()},className:"text-sm text-page-secondary hover:text-page transition-colors",children:s(P?"topup.hideHistory":"topup.viewHistory")})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-3",children:s("topup.selectAmount")}),e.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2",children:Ce.map(t=>e.jsxs("button",{onClick:()=>be(t),className:`py-2.5 px-3 rounded-xl text-sm font-medium transition-all ${ne===t?"bg-brand-500 text-white shadow-lg shadow-brand-500/25":"glass-sm text-page-label hover:text-page hover:bg-page-surface-hover"}`,children:["$",t]},t))})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("topup.customAmount")}),e.jsx("div",{className:"flex gap-3",children:e.jsx("input",{type:"number",value:h,onChange:t=>{O(t.target.value),M(null)},onBlur:t=>K(t.target.value),min:q,placeholder:s("topup.amountPlaceholder",{min:q}),className:"input flex-1"})}),re?e.jsx("p",{className:"text-xs text-page-muted mt-2",children:s("topup.calculating")}):z?e.jsxs("p",{className:"text-xs text-page-secondary mt-2",children:[s("topup.payAmountLabel"),": ",e.jsxs("span",{className:"text-page-success font-medium",children:["¥",z]})]}):null]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-3",children:s("topup.paymentMethod")}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Y.map(t=>{const a=b&&E===t.type;return e.jsx("button",{onClick:()=>fe(t.type),disabled:b||!h,className:"px-4 py-2.5 rounded-xl text-sm font-medium glass-sm text-page-label hover:text-page hover:bg-page-surface-hover disabled:opacity-40 disabled:cursor-not-allowed transition-all",children:a?s("topup.processing"):t.name},t.type)})})]})]}),(r==null?void 0:r.enable_topup)&&Pe&&X.length>0&&e.jsxs("div",{className:"glass rounded-2xl p-6 mb-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("topup.creemPayment")||"Creem Payment"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:X.map(t=>e.jsxs("div",{className:`glass-sm rounded-xl p-4 cursor-pointer transition-all ${(N==null?void 0:N.productId)===t.productId?"ring-2 ring-brand-500 bg-brand-500/10":"hover:bg-page-surface"}`,onClick:()=>de(t),children:[e.jsx("h3",{className:"text-sm font-semibold text-page mb-1",children:t.name}),e.jsxs("p",{className:"text-xl font-bold text-page-success mb-1",children:["$",t.price," ",e.jsx("span",{className:"text-xs text-page-muted font-normal",children:t.currency||"USD"})]}),t.quota&&e.jsx("p",{className:"text-xs text-page-secondary",children:s("topup.quotaIncluded")||`${t.quota} quota`})]},t.productId))}),N&&e.jsx("div",{className:"mt-4 flex justify-end",children:e.jsx("button",{onClick:()=>je(N),disabled:b,className:"btn-primary px-6",children:b&&E==="creem"?s("topup.processing"):`${s("topup.payNow")||"Pay"} $${N.price}`})})]}),(r==null?void 0:r.enable_topup)&&Ae&&w.length>0&&e.jsxs("div",{className:"glass rounded-2xl p-6 mb-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("topup.cryptoPayment")}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("topup.amount")}),e.jsx("input",{type:"number",value:h,onChange:t=>{O(t.target.value),M(null)},min:q,placeholder:s("topup.amountPlaceholder",{min:q}),className:"input w-full"})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("topup.chain")}),e.jsx("div",{className:"flex flex-wrap gap-2",children:w.map(t=>e.jsx("button",{onClick:()=>Q(t.key),className:`px-4 py-2 rounded-xl text-sm font-medium transition-all ${p===t.key?"bg-brand-500 text-white shadow-lg shadow-brand-500/25":"glass-sm text-page-label hover:text-page hover:bg-page-surface-hover"}`,children:t.label},t.key))})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("topup.token")||"Token"}),e.jsx("div",{className:"flex gap-2",children:["usdt","usdc"].map(t=>e.jsx("button",{onClick:()=>oe(t),className:`px-4 py-2 rounded-xl text-sm font-medium transition-all ${k===t?"bg-brand-500 text-white shadow-lg shadow-brand-500/25":"glass-sm text-page-label hover:text-page hover:bg-page-surface-hover"}`,children:t.toUpperCase()},t))})]}),e.jsx("button",{onClick:Ne,disabled:b||!h,className:"btn-primary w-full",children:b&&E==="crypto"?s("topup.processing"):`${s("topup.payWith")||"Pay with"} ${k.toUpperCase()} (${((Z=w.find(t=>t.key===p))==null?void 0:Z.label)||p})`})]}),C&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>S(null),children:e.jsxs("div",{className:"glass rounded-2xl p-6 max-w-md w-full mx-4",onClick:t=>t.stopPropagation(),children:[e.jsx("h3",{className:"text-lg font-semibold text-page mb-4",children:s("topup.cryptoPayment")}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"glass-sm rounded-xl p-4",children:[e.jsx("p",{className:"text-xs text-page-secondary mb-1",children:s("topup.walletAddress")}),e.jsx("p",{className:"text-sm text-page font-mono break-all",children:C.wallet})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"glass-sm rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-page-secondary mb-1",children:s("topup.amount")}),e.jsxs("p",{className:"text-sm text-page font-medium",children:[C.amount," ",C.token]})]}),e.jsxs("div",{className:"glass-sm rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-page-secondary mb-1",children:s("topup.chain")}),e.jsx("p",{className:"text-sm text-page font-medium",children:C.chain})]})]}),ce&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-page-secondary",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"}),s("topup.waitingPayment")]}),e.jsx("button",{onClick:()=>{S(null),j(!1)},className:"w-full py-2 rounded-xl text-sm glass-sm text-page-secondary hover:text-page transition-colors",children:s("topup.close")})]})]})}),P&&e.jsxs("div",{className:"glass rounded-2xl p-6 mb-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("topup.history")}),pe?e.jsx("div",{className:"flex justify-center py-8",children:e.jsx("div",{className:"w-6 h-6 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):J.length===0?e.jsx("p",{className:"text-sm text-page-muted text-center py-8",children:s("topup.noHistory")}):e.jsx("div",{className:"space-y-2",children:J.map((t,a)=>e.jsxs("div",{className:"flex items-center justify-between glass-sm rounded-xl px-4 py-3",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm text-page",children:["$",t.amount]}),e.jsxs("p",{className:"text-xs text-page-muted",children:[new Date(t.create_time*1e3).toLocaleString()," · ",t.payment_method||s("topup.redeemCode")]})]}),e.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${t.status==="success"?"bg-green-500/10 text-page-success":t.status==="pending"?"bg-yellow-500/10 text-page-warning":"bg-red-500/10 text-page-danger"}`,children:t.status==="success"?s("topup.statusSuccess"):t.status==="pending"?s("topup.statusPending"):s("topup.statusFailed")})]},a))})]}),e.jsxs("div",{className:"glass rounded-2xl p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("topup.redeemTitle")}),e.jsxs("form",{onSubmit:he,className:"flex gap-3",children:[e.jsx("input",{type:"text",value:T,onChange:t=>R(t.target.value),className:"input flex-1",placeholder:s("topup.enterRedeemCode")}),e.jsx("button",{type:"submit",disabled:D,className:"btn-primary whitespace-nowrap",children:s(D?"topup.redeeming":"topup.redeem")})]})]})]})}export{Ve as default}; diff --git a/dist/assets/index-BcDLrnx0.css b/dist/assets/index-BcDLrnx0.css new file mode 100644 index 0000000..07e817e --- /dev/null +++ b/dist/assets/index-BcDLrnx0.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,Noto Sans SC,system-ui,-apple-system,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,Fira Code,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--brand: 99 102 241;--page-text: 255 255 255;--page-text-secondary: 163 163 163;--page-text-muted: 115 115 115;--page-label: 212 212 212;--page-link: 129 140 248;--page-card-bg: rgba(255,255,255,.03);--page-card-border: rgba(255,255,255,.06);--page-input-bg: rgba(255,255,255,.04);--page-input-border: rgba(255,255,255,.1);--page-surface: rgba(255,255,255,.04);--page-surface-hover: rgba(255,255,255,.08);--page-divider: rgba(255,255,255,.06);--page-inset: rgba(0,0,0,.4);--page-success: 74 222 128;--page-success-text: 74 222 128;--page-warning: 250 204 21;--page-warning-text: 253 224 71;--page-danger: 248 113 113;--page-danger-text: 248 113 113;--page-info: 192 132 252;--page-info-text: 192 132 252}body{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));font-feature-settings:"cv02","cv03","cv04","cv11"}::-moz-selection{background-color:#6366f14d}::selection{background-color:#6366f14d}::-webkit-scrollbar{width:.375rem}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}.theme-light ::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(212 212 212 / var(--tw-bg-opacity, 1))}.theme-light{--page-text: 17 24 39;--page-text-secondary: 107 114 128;--page-text-muted: 156 163 175;--page-label: 55 65 81;--page-link: 79 70 229;--page-card-bg: rgba(255,255,255,.85);--page-card-border: rgb(229,231,235);--page-input-bg: #fff;--page-input-border: rgb(209,213,219);--page-surface: rgba(0,0,0,.03);--page-surface-hover: rgba(0,0,0,.06);--page-divider: rgb(229,231,235);--page-inset: rgba(0,0,0,.04);--page-success: 22 163 74;--page-success-text: 22 163 74;--page-warning: 202 138 4;--page-warning-text: 161 98 7;--page-danger: 220 38 38;--page-danger-text: 220 38 38;--page-info: 124 58 237;--page-info-text: 124 58 237}.theme-claude{--page-link: 217 119 87;--page-card-bg: rgba(255,255,255,.7);--page-card-border: #E8DDD0;--page-surface: rgba(61,48,36,.04);--page-surface-hover: rgba(61,48,36,.08);--page-divider: #E8DDD0;--page-inset: rgba(61,48,36,.06)}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.glass{background:var(--page-card-bg);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid var(--page-card-border);border-radius:1rem}.glass-sm{background:var(--page-card-bg);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--page-card-border);border-radius:.75rem}.btn-primary{border-radius:.75rem;--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1));padding:.625rem 1.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-shadow-color: rgb(79 70 229 / .2);--tw-shadow: var(--tw-shadow-colored);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}.btn-primary:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.btn-primary:active{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity, 1))}.btn-primary:disabled{cursor:not-allowed;opacity:.5}.btn-primary{color:#fff}.btn-secondary{border-radius:.75rem;padding:.625rem 1.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}.btn-secondary:disabled{cursor:not-allowed;opacity:.5}.btn-secondary{border:1px solid var(--page-input-border);color:rgb(var(--page-label))}.btn-secondary:hover{background:rgba(var(--page-text),.05)}.input{width:100%;border-radius:.75rem;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.input:focus{border-color:#6366f199;outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(99 102 241 / .4)}.input{background:var(--page-input-bg);border:1px solid var(--page-input-border);color:rgb(var(--page-text))}.input::-moz-placeholder{color:rgb(var(--page-text-muted))}.input::placeholder{color:rgb(var(--page-text-muted))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.-top-40{top:-10rem}.bottom-\[-11px\]{bottom:-11px}.left-0{left:0}.left-1\/2{left:50%}.left-1\/4{left:25%}.left-3{left:.75rem}.left-\[-250\%\]{left:-250%}.right-1\/4{right:25%}.right-3{right:.75rem}.right-\[-250\%\]{right:-250%}.top-0{top:0}.top-1\/2{top:50%}.top-20{top:5rem}.top-4{top:1rem}.top-\[-10px\]{top:-10px}.isolate{isolation:isolate}.z-0{z-index:0}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[2\]{z-index:2}.z-\[3\]{z-index:3}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-14{margin-bottom:3.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[4\/5\]{aspect-ratio:4/5}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[0\.5rem\]{height:.5rem}.h-\[400px\]{height:400px}.h-\[50\%\]{height:50%}.h-\[500px\]{height:500px}.h-\[600px\]{height:600px}.h-full{height:100%}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.min-h-\[50vh\]{min-height:50vh}.min-h-\[60vh\]{min-height:60vh}.min-h-\[70vh\]{min-height:70vh}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-16{width:4rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[0\.5rem\]{width:.5rem}.w-\[300\%\]{width:300%}.w-\[300px\]{width:300px}.w-\[400px\]{width:400px}.w-\[600px\]{width:600px}.w-\[900px\]{width:900px}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}@keyframes star-movement-bottom{0%{transform:translate(0);opacity:1}to{transform:translate(-100%);opacity:0}}.animate-star-movement-bottom{animation:star-movement-bottom linear infinite alternate}@keyframes star-movement-top{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}.animate-star-movement-top{animation:star-movement-top linear infinite alternate}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-12{gap:3rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-slate-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(226 232 240 / var(--tw-divide-opacity, 1))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.\!rounded-xl{border-radius:.75rem!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[1\.25rem\]{border-radius:1.25rem}.rounded-\[15px\]{border-radius:15px}.rounded-\[20px\]{border-radius:20px}.rounded-\[25px\]{border-radius:25px}.rounded-\[4px\]{border-radius:4px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-t{border-top-width:1px}.border-\[\#27272a\]{--tw-border-opacity: 1;border-color:rgb(39 39 42 / var(--tw-border-opacity, 1))}.border-\[\#D97757\]\/30{border-color:#d977574d}.border-\[\#E8DDD0\]{--tw-border-opacity: 1;border-color:rgb(232 221 208 / var(--tw-border-opacity, 1))}.border-amber-500\/20{border-color:#f59e0b33}.border-blue-100{--tw-border-opacity: 1;border-color:rgb(219 234 254 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-brand-500\/20{border-color:#6366f133}.border-brand-500\/30{border-color:#6366f14d}.border-cyan-500\/10{border-color:#06b6d41a}.border-cyan-500\/100{border-color:#06b6d4}.border-cyan-500\/15{border-color:#06b6d426}.border-cyan-500\/20{border-color:#06b6d433}.border-cyan-500\/25{border-color:#06b6d440}.border-emerald-500\/10{border-color:#10b9811a}.border-emerald-500\/100{border-color:#10b981}.border-emerald-500\/15{border-color:#10b98126}.border-emerald-500\/20{border-color:#10b98133}.border-emerald-500\/25{border-color:#10b98140}.border-emerald-500\/\[0\.08\]{border-color:#10b98114}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-green-500\/20{border-color:#22c55e33}.border-green-500\/30{border-color:#22c55e4d}.border-neutral-800{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-neutral-800\/40{border-color:#26262666}.border-neutral-800\/60{border-color:#26262699}.border-purple-500\/20{border-color:#a855f733}.border-red-500\/20{border-color:#ef444433}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-900{--tw-border-opacity: 1;border-color:rgb(15 23 42 / var(--tw-border-opacity, 1))}.border-violet-500\/10{border-color:#8b5cf61a}.border-violet-500\/100{border-color:#8b5cf6}.border-violet-500\/15{border-color:#8b5cf626}.border-violet-500\/20{border-color:#8b5cf633}.border-violet-500\/25{border-color:#8b5cf640}.border-white\/15{border-color:#ffffff26}.border-white\/20{border-color:#fff3}.border-white\/30{border-color:#ffffff4d}.border-white\/\[0\.06\]{border-color:#ffffff0f}.border-white\/\[0\.12\]{border-color:#ffffff1f}.border-yellow-500\/20{border-color:#eab30833}.border-t-brand-500{--tw-border-opacity: 1;border-top-color:rgb(99 102 241 / var(--tw-border-opacity, 1))}.border-t-white{--tw-border-opacity: 1;border-top-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-t-white\/70{border-top-color:#ffffffb3}.bg-\[\#030712\]{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity, 1))}.bg-\[\#030712\]\/80{background-color:#030712cc}.bg-\[\#030712\]\/95{background-color:#030712f2}.bg-\[\#09090b\]{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity, 1))}.bg-\[\#09090b\]\/80{background-color:#09090bcc}.bg-\[\#09090b\]\/95{background-color:#09090bf2}.bg-\[\#160000\]{--tw-bg-opacity: 1;background-color:rgb(22 0 0 / var(--tw-bg-opacity, 1))}.bg-\[\#D97757\]{--tw-bg-opacity: 1;background-color:rgb(217 119 87 / var(--tw-bg-opacity, 1))}.bg-\[\#D97757\]\/\[0\.04\]{background-color:#d977570a}.bg-\[\#E8DDD0\]{--tw-bg-opacity: 1;background-color:rgb(232 221 208 / var(--tw-bg-opacity, 1))}.bg-\[\#F5EEE6\]{--tw-bg-opacity: 1;background-color:rgb(245 238 230 / var(--tw-bg-opacity, 1))}.bg-\[\#FAF6F1\]{--tw-bg-opacity: 1;background-color:rgb(250 246 241 / var(--tw-bg-opacity, 1))}.bg-\[\#FAF6F1\]\/85{background-color:#faf6f1d9}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/60{background-color:#0009}.bg-black\/90{background-color:#000000e6}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-50\/50{background-color:#eff6ff80}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-brand-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.bg-brand-500\/10{background-color:#6366f11a}.bg-brand-500\/\[0\.04\]{background-color:#6366f10a}.bg-brand-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1))}.bg-brand-600\/20{background-color:#4f46e533}.bg-cyan-500\/10{background-color:#06b6d41a}.bg-cyan-500\/100{background-color:#06b6d4}.bg-cyan-500\/15{background-color:#06b6d426}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/100{background-color:#10b981}.bg-emerald-500\/15{background-color:#10b98126}.bg-emerald-500\/5{background-color:#10b9810d}.bg-emerald-500\/\[0\.04\]{background-color:#10b9810a}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50\/50{background-color:#f9fafb80}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity, 1))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-neutral-500{--tw-bg-opacity: 1;background-color:rgb(115 115 115 / var(--tw-bg-opacity, 1))}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity, 1))}.bg-neutral-950{--tw-bg-opacity: 1;background-color:rgb(10 10 10 / var(--tw-bg-opacity, 1))}.bg-neutral-950\/80{background-color:#0a0a0acc}.bg-neutral-950\/95{background-color:#0a0a0af2}.bg-page-muted{--tw-bg-opacity: 1;background-color:rgb(var(--page-text-muted) / var(--tw-bg-opacity, 1))}.bg-purple-500\/10{background-color:#a855f71a}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-violet-500\/10{background-color:#8b5cf61a}.bg-violet-500\/100{background-color:#8b5cf6}.bg-violet-500\/15{background-color:#8b5cf626}.bg-violet-600\/10{background-color:#7c3aed1a}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/80{background-color:#fffc}.bg-white\/\[0\.02\]{background-color:#ffffff05}.bg-white\/\[0\.03\]{background-color:#ffffff08}.bg-white\/\[0\.04\]{background-color:#ffffff0a}.bg-white\/\[0\.06\]{background-color:#ffffff0f}.bg-white\/\[0\.08\]{background-color:#ffffff14}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[\#D97757\]{--tw-gradient-from: #D97757 var(--tw-gradient-from-position);--tw-gradient-to: rgb(217 119 87 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-amber-500\/10{--tw-gradient-from: rgb(245 158 11 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 158 11 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-black{--tw-gradient-from: #000 var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-600{--tw-gradient-from: #2563eb var(--tw-gradient-from-position);--tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-brand-500{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-brand-600\/15{--tw-gradient-from: rgb(79 70 229 / .15) var(--tw-gradient-from-position);--tw-gradient-to: rgb(79 70 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500\/10{--tw-gradient-from: rgb(6 182 212 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500\/100{--tw-gradient-from: rgb(6 182 212 / 1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500\/50{--tw-gradient-from: rgb(6 182 212 / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-emerald-500\/10{--tw-gradient-from: rgb(16 185 129 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(16 185 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-emerald-500\/100{--tw-gradient-from: rgb(16 185 129 / 1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(16 185 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-emerald-500\/50{--tw-gradient-from: rgb(16 185 129 / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(16 185 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500{--tw-gradient-from: #8b5cf6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500\/10{--tw-gradient-from: rgb(139 92 246 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500\/100{--tw-gradient-from: rgb(139 92 246 / 1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500\/50{--tw-gradient-from: rgb(139 92 246 / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-600\/10{--tw-gradient-from: rgb(124 58 237 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(124 58 237 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-blue-500{--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #3b82f6 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-600\/10{--tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(37 99 235 / .1) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-\[\#C4613F\]{--tw-gradient-to: #C4613F var(--tw-gradient-to-position)}.to-cyan-500{--tw-gradient-to: #06b6d4 var(--tw-gradient-to-position)}.to-cyan-500\/10{--tw-gradient-to: rgb(6 182 212 / .1) var(--tw-gradient-to-position)}.to-cyan-500\/100{--tw-gradient-to: rgb(6 182 212 / 1) var(--tw-gradient-to-position)}.to-cyan-600\/10{--tw-gradient-to: rgb(8 145 178 / .1) var(--tw-gradient-to-position)}.to-emerald-500\/10{--tw-gradient-to: rgb(16 185 129 / .1) var(--tw-gradient-to-position)}.to-emerald-500\/100{--tw-gradient-to: rgb(16 185 129 / 1) var(--tw-gradient-to-position)}.to-gray-900{--tw-gradient-to: #111827 var(--tw-gradient-to-position)}.to-indigo-600{--tw-gradient-to: #4f46e5 var(--tw-gradient-to-position)}.to-orange-500\/10{--tw-gradient-to: rgb(249 115 22 / .1) var(--tw-gradient-to-position)}.to-purple-500{--tw-gradient-to: #a855f7 var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #9333ea var(--tw-gradient-to-position)}.to-teal-500\/10{--tw-gradient-to: rgb(20 184 166 / .1) var(--tw-gradient-to-position)}.to-teal-500\/100{--tw-gradient-to: rgb(20 184 166 / 1) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-violet-500\/10{--tw-gradient-to: rgb(139 92 246 / .1) var(--tw-gradient-to-position)}.to-violet-500\/100{--tw-gradient-to: rgb(139 92 246 / 1) var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.\!px-4{padding-left:1rem!important;padding-right:1rem!important}.\!py-1\.5{padding-top:.375rem!important;padding-bottom:.375rem!important}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[10px\]{padding-left:10px;padding-right:10px}.px-\[26px\]{padding-left:26px;padding-right:26px}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[16px\]{padding-top:16px;padding-bottom:16px}.py-\[4px\]{padding-top:4px;padding-bottom:4px}.\!pl-10{padding-left:2.5rem!important}.pb-20{padding-bottom:5rem}.pb-24{padding-bottom:6rem}.pl-12{padding-left:3rem}.pr-12{padding-right:3rem}.pr-8{padding-right:2rem}.pt-10{padding-top:2.5rem}.pt-16{padding-top:4rem}.pt-32{padding-top:8rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-heading{font-family:Inter,Noto Sans SC,system-ui,-apple-system,sans-serif}.font-mono{font-family:JetBrains Mono,Fira Code,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[16px\]{font-size:16px}.text-\[clamp\(2rem\,10vw\,8rem\)\]{font-size:clamp(2rem,10vw,8rem)}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-\[1\.08\]{line-height:1.08}.leading-\[1\.1\]{line-height:1.1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#2d2d2d\]{--tw-text-opacity: 1;color:rgb(45 45 45 / var(--tw-text-opacity, 1))}.text-\[\#3D3024\]{--tw-text-opacity: 1;color:rgb(61 48 36 / var(--tw-text-opacity, 1))}.text-\[\#6B5D4F\]{--tw-text-opacity: 1;color:rgb(107 93 79 / var(--tw-text-opacity, 1))}.text-\[\#8B7D6E\]{--tw-text-opacity: 1;color:rgb(139 125 110 / var(--tw-text-opacity, 1))}.text-\[\#D97757\]{--tw-text-opacity: 1;color:rgb(217 119 87 / var(--tw-text-opacity, 1))}.text-\[\#D97757\]\/50{color:#d9775780}.text-amber-300\/80{color:#fcd34dcc}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-brand-200{--tw-text-opacity: 1;color:rgb(199 210 254 / var(--tw-text-opacity, 1))}.text-brand-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-cyan-400\/0{color:#22d3ee00}.text-cyan-400\/10{color:#22d3ee1a}.text-cyan-400\/100{color:#22d3ee}.text-cyan-400\/15{color:#22d3ee26}.text-cyan-400\/20{color:#22d3ee33}.text-cyan-400\/25{color:#22d3ee40}.text-cyan-400\/30{color:#22d3ee4d}.text-cyan-400\/35{color:#22d3ee59}.text-cyan-400\/40{color:#22d3ee66}.text-cyan-400\/45{color:#22d3ee73}.text-cyan-400\/5{color:#22d3ee0d}.text-cyan-400\/50{color:#22d3ee80}.text-cyan-400\/55{color:#22d3ee8c}.text-cyan-400\/60{color:#22d3ee99}.text-cyan-400\/65{color:#22d3eea6}.text-cyan-400\/70{color:#22d3eeb3}.text-cyan-400\/75{color:#22d3eebf}.text-cyan-400\/80{color:#22d3eecc}.text-cyan-400\/85{color:#22d3eed9}.text-cyan-400\/90{color:#22d3eee6}.text-cyan-400\/95{color:#22d3eef2}.text-emerald-300\/80{color:#6ee7b7cc}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-emerald-400\/0{color:#34d39900}.text-emerald-400\/10{color:#34d3991a}.text-emerald-400\/100{color:#34d399}.text-emerald-400\/15{color:#34d39926}.text-emerald-400\/20{color:#34d39933}.text-emerald-400\/25{color:#34d39940}.text-emerald-400\/30{color:#34d3994d}.text-emerald-400\/35{color:#34d39959}.text-emerald-400\/40{color:#34d39966}.text-emerald-400\/45{color:#34d39973}.text-emerald-400\/5{color:#34d3990d}.text-emerald-400\/50{color:#34d39980}.text-emerald-400\/55{color:#34d3998c}.text-emerald-400\/60{color:#34d39999}.text-emerald-400\/65{color:#34d399a6}.text-emerald-400\/70{color:#34d399b3}.text-emerald-400\/75{color:#34d399bf}.text-emerald-400\/80{color:#34d399cc}.text-emerald-400\/85{color:#34d399d9}.text-emerald-400\/90{color:#34d399e6}.text-emerald-400\/95{color:#34d399f2}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.text-neutral-900{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}.text-page{--tw-text-opacity: 1;color:rgb(var(--page-text) / var(--tw-text-opacity, 1))}.text-page-danger{--tw-text-opacity: 1;color:rgb(var(--page-danger-text) / var(--tw-text-opacity, 1))}.text-page-info{--tw-text-opacity: 1;color:rgb(var(--page-info-text) / var(--tw-text-opacity, 1))}.text-page-label{--tw-text-opacity: 1;color:rgb(var(--page-label) / var(--tw-text-opacity, 1))}.text-page-link{--tw-text-opacity: 1;color:rgb(var(--page-link) / var(--tw-text-opacity, 1))}.text-page-muted{--tw-text-opacity: 1;color:rgb(var(--page-text-muted) / var(--tw-text-opacity, 1))}.text-page-secondary{--tw-text-opacity: 1;color:rgb(var(--page-text-secondary) / var(--tw-text-opacity, 1))}.text-page-success{--tw-text-opacity: 1;color:rgb(var(--page-success-text) / var(--tw-text-opacity, 1))}.text-page-warning{--tw-text-opacity: 1;color:rgb(var(--page-warning-text) / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-violet-400{--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.text-violet-400\/0{color:#a78bfa00}.text-violet-400\/10{color:#a78bfa1a}.text-violet-400\/100{color:#a78bfa}.text-violet-400\/15{color:#a78bfa26}.text-violet-400\/20{color:#a78bfa33}.text-violet-400\/25{color:#a78bfa40}.text-violet-400\/30{color:#a78bfa4d}.text-violet-400\/35{color:#a78bfa59}.text-violet-400\/40{color:#a78bfa66}.text-violet-400\/45{color:#a78bfa73}.text-violet-400\/5{color:#a78bfa0d}.text-violet-400\/50{color:#a78bfa80}.text-violet-400\/55{color:#a78bfa8c}.text-violet-400\/60{color:#a78bfa99}.text-violet-400\/65{color:#a78bfaa6}.text-violet-400\/70{color:#a78bfab3}.text-violet-400\/75{color:#a78bfabf}.text-violet-400\/80{color:#a78bfacc}.text-violet-400\/85{color:#a78bfad9}.text-violet-400\/90{color:#a78bfae6}.text-violet-400\/95{color:#a78bfaf2}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/20{--tw-shadow-color: rgb(59 130 246 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-brand-500\/25{--tw-shadow-color: rgb(99 102 241 / .25);--tw-shadow: var(--tw-shadow-colored)}.shadow-brand-600\/20{--tw-shadow-color: rgb(79 70 229 / .2);--tw-shadow: var(--tw-shadow-colored)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-brand-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity, 1))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-2xl{--tw-backdrop-blur: blur(40px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.ease-\[cubic-bezier\(0\.5\,1\,0\.89\,1\)\]{transition-timing-function:cubic-bezier(.5,1,.89,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.will-change-\[transform\,filter\,opacity\]{will-change:transform,filter,opacity}.will-change-transform{will-change:transform}.\[perspective\:800px\]{perspective:800px}.\[transform-style\:preserve-3d\]{transform-style:preserve-3d}.\[transform\:translateZ\(0\)\]{transform:translateZ(0)}.\[transform\:translateZ\(30px\)\]{transform:translateZ(30px)}.theme-light{color:#111827}.theme-light .glass,.theme-light .glass-sm{box-shadow:0 1px 3px #0000000f}.theme-light .input:focus{border-color:#6366f1;box-shadow:0 0 0 3px #6366f126}.theme-light .card-glow:before{background:linear-gradient(to right,#6366f10f,#a855f70f,#ec48990f)}.theme-claude .btn-primary{background-color:#d97757;box-shadow:0 4px 14px #d9775726}.theme-claude .btn-primary:hover{background-color:#c4613f}.theme-claude .btn-primary:active{background-color:#a85232}.theme-claude .glass,.theme-claude .glass-sm{border-color:#e8ddd0}.theme-claude .input{border-color:#d9c5b2}.theme-claude .input:focus{border-color:#d97757;box-shadow:0 0 0 3px #d9775726}.theme-claude .btn-secondary{border-color:#d9c5b2;color:#6b5d4f}.theme-claude .btn-secondary:hover{background-color:#d977570d}.surface{background:var(--page-surface)}.surface-hover:hover{background:var(--page-surface-hover)}.bg-page-inset{background:var(--page-inset)}.divide-page>*+*{border-color:var(--page-divider)}.border-page-divider{border-color:var(--page-divider)}.bg-page-surface{background:var(--page-surface)}.bg-page-surface-hover{background:var(--page-surface-hover)}.hover\:bg-page-surface:hover{background:var(--page-surface)}.hover\:bg-page-surface-hover:hover{background:var(--page-surface-hover)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:left-\[-10px\]:before{content:var(--tw-content);left:-10px}.before\:top-0:before{content:var(--tw-content);top:0}.before\:overflow-hidden:before{content:var(--tw-content);overflow:hidden}.before\:bg-\[\#060010\]:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(6 0 16 / var(--tw-bg-opacity, 1))}.before\:text-white:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.before\:opacity-0:before{content:var(--tw-content);opacity:0}.before\:content-\[\'\'\]:before{--tw-content: "";content:var(--tw-content)}.before\:content-\[attr\(data-text\)\]:before{--tw-content: attr(data-text);content:var(--tw-content)}.before\:\[clip-path\:inset\(0_0_0_0\)\]:before{content:var(--tw-content);clip-path:inset(0 0 0 0)}.before\:\[text-shadow\:var\(--before-shadow\)\]:before{content:var(--tw-content);text-shadow:var(--before-shadow)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[10px\]:after{content:var(--tw-content);left:10px}.after\:top-0:after{content:var(--tw-content);top:0}.after\:overflow-hidden:after{content:var(--tw-content);overflow:hidden}.after\:bg-\[\#060010\]:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(6 0 16 / var(--tw-bg-opacity, 1))}.after\:text-white:after{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.after\:content-\[attr\(data-text\)\]:after{--tw-content: attr(data-text);content:var(--tw-content)}.after\:\[clip-path\:inset\(0_0_0_0\)\]:after{content:var(--tw-content);clip-path:inset(0 0 0 0)}.after\:\[text-shadow\:var\(--after-shadow\)\]:after{content:var(--tw-content);text-shadow:var(--after-shadow)}.last\:border-0:last-child{border-width:0px}.hover\:border-\[\#D9C5B2\]:hover{--tw-border-opacity: 1;border-color:rgb(217 197 178 / var(--tw-border-opacity, 1))}.hover\:border-brand-500\/25:hover{border-color:#6366f140}.hover\:border-emerald-500\/20:hover{border-color:#10b98133}.hover\:border-gray-200:hover{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.hover\:border-neutral-700:hover{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity, 1))}.hover\:border-slate-300:hover{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.hover\:border-white\/\[0\.12\]:hover{border-color:#ffffff1f}.hover\:border-white\/\[0\.1\]:hover{border-color:#ffffff1a}.hover\:bg-\[\#C4613F\]:hover{--tw-bg-opacity: 1;background-color:rgb(196 97 63 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#D9C5B2\]:hover{--tw-bg-opacity: 1;background-color:rgb(217 197 178 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#E8DDD0\]\/50:hover{background-color:#e8ddd080}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-brand-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-400:hover{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-500\/15:hover{background-color:#10b98126}.hover\:bg-emerald-500\/5:hover{background-color:#10b9810d}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-green-500\/10:hover{background-color:#22c55e1a}.hover\:bg-neutral-100:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-700:hover{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-50:hover{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:bg-white\/\[0\.1\]:hover{background-color:#ffffff1a}.hover\:text-\[\#3D3024\]:hover{--tw-text-opacity: 1;color:rgb(61 48 36 / var(--tw-text-opacity, 1))}.hover\:text-\[\#C4613F\]:hover{--tw-text-opacity: 1;color:rgb(196 97 63 / var(--tw-text-opacity, 1))}.hover\:text-\[\#D97757\]:hover{--tw-text-opacity: 1;color:rgb(217 119 87 / var(--tw-text-opacity, 1))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.hover\:text-brand-300:hover{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.hover\:text-emerald-300:hover{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.hover\:text-emerald-400:hover{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\:text-neutral-300:hover{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.hover\:text-page:hover{--tw-text-opacity: 1;color:rgb(var(--page-text) / var(--tw-text-opacity, 1))}.hover\:text-page-link:hover{--tw-text-opacity: 1;color:rgb(var(--page-link) / var(--tw-text-opacity, 1))}.hover\:text-slate-600:hover{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.hover\:text-slate-700:hover{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.hover\:text-slate-900:hover{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.hover\:text-violet-300:hover{--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:shadow-sm:hover{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:before\:opacity-100:hover:before{content:var(--tw-content);opacity:1}.hover\:before\:content-\[attr\(data-text\)\]:hover:before{--tw-content: attr(data-text);content:var(--tw-content)}.hover\:before\:\[text-shadow\:var\(--before-shadow\)\]:hover:before{content:var(--tw-content);text-shadow:var(--before-shadow)}.hover\:after\:opacity-100:hover:after{content:var(--tw-content);opacity:1}.hover\:after\:content-\[attr\(data-text\)\]:hover:after{--tw-content: attr(data-text);content:var(--tw-content)}.hover\:after\:\[text-shadow\:var\(--after-shadow\)\]:hover:after{content:var(--tw-content);text-shadow:var(--after-shadow)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.group:hover .group-hover\:text-\[\#D97757\]{--tw-text-opacity: 1;color:rgb(217 119 87 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-brand-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-page-link{--tw-text-opacity: 1;color:rgb(var(--page-link) / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:block{display:block}.sm\:hidden{display:none}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media (min-width: 768px){.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-7xl{font-size:4.5rem;line-height:1}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}} diff --git a/dist/assets/index-Cvtin-Z6.js b/dist/assets/index-ClhW4pXr.js similarity index 74% rename from dist/assets/index-Cvtin-Z6.js rename to dist/assets/index-ClhW4pXr.js index d45e1ca..3f9e541 100644 --- a/dist/assets/index-Cvtin-Z6.js +++ b/dist/assets/index-ClhW4pXr.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Home-Dfjnl6IJ.js","assets/CountUp-B7vSEX1I.js","assets/FadeContent-DNRHLB7E.js","assets/useTranslation-BeJE8l6a.js","assets/Layout-B4YlzwXv.js","assets/LanguageSwitch-BGa_hr1Z.js","assets/Home-C-GxmmCZ.js","assets/Layout-4QA5HuBu.js","assets/Home-BShPF6nt.js","assets/Layout-BZYZ8jj1.js","assets/Home-BbUuLGZD.js","assets/Layout-D1kE7Hv7.js","assets/Home-ahtkcEPh.js","assets/Layout-s3BpODFZ.js","assets/Home-DvtKf7X7.js","assets/Layout-BtrGQcOw.js","assets/Home-Drv_Yrfd.js","assets/Layout-CtOOKniM.js","assets/Login-Xik2Nht3.js","assets/Register-BgbUTYo5.js","assets/Dashboard-elfJRGHo.js","assets/SpotlightCard-a-a6koSS.js","assets/Tokens-DqFd9l1i.js","assets/Packages-CBRMcF8w.js","assets/Pricing-CfO9rFBZ.js","assets/Topup-BAYKs2M5.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Home-BVEmtewU.js","assets/officialEquiv-COyn5GUF.js","assets/CountUp-DKNTcuWU.js","assets/FadeContent-Cswq021Y.js","assets/useTranslation-Pq_l7wMn.js","assets/Layout-B2Isp14g.js","assets/LanguageSwitch-B7-4CWQP.js","assets/Home-jHukPhWm.js","assets/Layout-kkdZeTHc.js","assets/Home-BuMqQaGJ.js","assets/Layout-DltGFkEN.js","assets/Home-Ji7N4uDe.js","assets/Layout-Dvtbvg20.js","assets/Home-BJajDktc.js","assets/Layout-NPp3SVTh.js","assets/Home-jCVAuf09.js","assets/Layout-rCXoKNs7.js","assets/Home-KZsq5hsI.js","assets/Layout-nk7MlPO7.js","assets/Login-C6BPG0T7.js","assets/Register-DYiVAcZJ.js","assets/Dashboard-IbzjFIoV.js","assets/Tokens-BdD2zQiB.js","assets/Packages-BOtvAbP1.js","assets/Pricing-EipPrIaV.js","assets/Topup-bHBPVOgP.js"])))=>i.map(i=>d[i]); function Vp(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Hp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ic={exports:{}},go={},Dc={exports:{}},z={};/** * @license React * react.production.min.js @@ -246,4 +246,4 @@ to { `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[rc]=this[rc]={accessors:{}}).accessors,i=this.prototype;function o(s){const l=lr(s);r[l]||(x0(i,s),r[l]=!0)}return S.isArray(t)?t.forEach(o):o(t),this}};De.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);S.reduceDescriptors(De.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});S.freezeMethods(De);function ys(e,t){const n=this||ei,r=t||n,i=De.from(r.headers);let o=r.data;return S.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Ep(e){return!!(e&&e.__CANCEL__)}let ti=class extends A{constructor(t,n,r){super(t??"canceled",A.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Cp(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new A("Request failed with status code "+n.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function E0(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function C0(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(a){const u=Date.now(),c=r[o];s||(s=u),n[i]=a,r[i]=u;let f=o,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-s{n=c,i=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-n;f>=r?s(u,c):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const fo=(e,t,n=3)=>{let r=0;const i=C0(50,250);return P0(o=>{const s=o.loaded,l=o.lengthComputable?o.total:void 0,a=s-r,u=i(a),c=s<=l;r=s;const f={loaded:s,total:l,progress:l?s/l:void 0,bytes:a,rate:u||void 0,estimated:u&&l&&c?(l-s)/u:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},ic=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},oc=e=>(...t)=>S.asap(()=>e(...t)),O0=we.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,we.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(we.origin),we.navigator&&/(msie|trident)/i.test(we.navigator.userAgent)):()=>!0,R0=we.hasStandardBrowserEnv?{write(e,t,n,r,i,o,s){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];S.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),S.isString(r)&&l.push(`path=${r}`),S.isString(i)&&l.push(`domain=${i}`),o===!0&&l.push("secure"),S.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _0(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function L0(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Pp(e,t,n){let r=!_0(t);return e&&(r||n==!1)?L0(e,t):t}const sc=e=>e instanceof De?{...e}:e;function hn(e,t){t=t||{};const n={};function r(u,c,f,p){return S.isPlainObject(u)&&S.isPlainObject(c)?S.merge.call({caseless:p},u,c):S.isPlainObject(c)?S.merge({},c):S.isArray(c)?c.slice():c}function i(u,c,f,p){if(S.isUndefined(c)){if(!S.isUndefined(u))return r(void 0,u,f,p)}else return r(u,c,f,p)}function o(u,c){if(!S.isUndefined(c))return r(void 0,c)}function s(u,c){if(S.isUndefined(c)){if(!S.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function l(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const a={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(u,c,f)=>i(sc(u),sc(c),f,!0)};return S.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const f=S.hasOwnProp(a,c)?a[c]:i,p=f(e[c],t[c],c);S.isUndefined(p)&&f!==l||(n[c]=p)}),n}const Op=e=>{const t=hn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:l}=t;if(t.headers=s=De.from(s),t.url=kp(Pp(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),S.isFormData(n)){if(we.hasStandardBrowserEnv||we.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(S.isFunction(n.getHeaders)){const a=n.getHeaders(),u=["content-type","content-length"];Object.entries(a).forEach(([c,f])=>{u.includes(c.toLowerCase())&&s.set(c,f)})}}if(we.hasStandardBrowserEnv&&(r&&S.isFunction(r)&&(r=r(t)),r||r!==!1&&O0(t.url))){const a=i&&o&&R0.read(o);a&&s.set(i,a)}return t},T0=typeof XMLHttpRequest<"u",N0=T0&&function(e){return new Promise(function(n,r){const i=Op(e);let o=i.data;const s=De.from(i.headers).normalize();let{responseType:l,onUploadProgress:a,onDownloadProgress:u}=i,c,f,p,y,d;function v(){y&&y(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(i.method.toUpperCase(),i.url,!0),w.timeout=i.timeout;function m(){if(!w)return;const g=De.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),E={data:!l||l==="text"||l==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:g,config:e,request:w};Cp(function(P){n(P),v()},function(P){r(P),v()},E),w=null}"onloadend"in w?w.onloadend=m:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(m)},w.onabort=function(){w&&(r(new A("Request aborted",A.ECONNABORTED,e,w)),w=null)},w.onerror=function(k){const E=k&&k.message?k.message:"Network Error",R=new A(E,A.ERR_NETWORK,e,w);R.event=k||null,r(R),w=null},w.ontimeout=function(){let k=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||La;i.timeoutErrorMessage&&(k=i.timeoutErrorMessage),r(new A(k,E.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,e,w)),w=null},o===void 0&&s.setContentType(null),"setRequestHeader"in w&&S.forEach(s.toJSON(),function(k,E){w.setRequestHeader(E,k)}),S.isUndefined(i.withCredentials)||(w.withCredentials=!!i.withCredentials),l&&l!=="json"&&(w.responseType=i.responseType),u&&([p,d]=fo(u,!0),w.addEventListener("progress",p)),a&&w.upload&&([f,y]=fo(a),w.upload.addEventListener("progress",f),w.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(c=g=>{w&&(r(!g||g.type?new ti(null,e,w):g),w.abort(),w=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const h=E0(i.url);if(h&&we.protocols.indexOf(h)===-1){r(new A("Unsupported protocol "+h+":",A.ERR_BAD_REQUEST,e));return}w.send(o||null)})},A0=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,l();const c=u instanceof Error?u:this.reason;r.abort(c instanceof A?c:new ti(c instanceof Error?c.message:c))}};let s=t&&setTimeout(()=>{s=null,o(new A(`timeout of ${t}ms exceeded`,A.ETIMEDOUT))},t);const l=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>S.asap(l),a}},I0=function*(e,t){let n=e.byteLength;if(n{const i=D0(e,t);let o=0,s,l=a=>{s||(s=!0,r&&r(a))};return new ReadableStream({async pull(a){try{const{done:u,value:c}=await i.next();if(u){l(),a.close();return}let f=c.byteLength;if(n){let p=o+=f;n(p)}a.enqueue(new Uint8Array(c))}catch(u){throw l(u),u}},cancel(a){return l(a),i.return()}},{highWaterMark:2})},ac=64*1024,{isFunction:ki}=S,j0=(({Request:e,Response:t})=>({Request:e,Response:t}))(S.global),{ReadableStream:uc,TextEncoder:cc}=S.global,fc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},$0=e=>{e=S.merge.call({skipUndefined:!0},j0,e);const{fetch:t,Request:n,Response:r}=e,i=t?ki(t):typeof fetch=="function",o=ki(n),s=ki(r);if(!i)return!1;const l=i&&ki(uc),a=i&&(typeof cc=="function"?(d=>v=>d.encode(v))(new cc):async d=>new Uint8Array(await new n(d).arrayBuffer())),u=o&&l&&fc(()=>{let d=!1;const v=new n(we.origin,{body:new uc,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!v}),c=s&&l&&fc(()=>S.isReadableStream(new r("").body)),f={stream:c&&(d=>d.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!f[d]&&(f[d]=(v,w)=>{let m=v&&v[d];if(m)return m.call(v);throw new A(`Response type '${d}' is not supported`,A.ERR_NOT_SUPPORT,w)})});const p=async d=>{if(d==null)return 0;if(S.isBlob(d))return d.size;if(S.isSpecCompliantForm(d))return(await new n(we.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(S.isArrayBufferView(d)||S.isArrayBuffer(d))return d.byteLength;if(S.isURLSearchParams(d)&&(d=d+""),S.isString(d))return(await a(d)).byteLength},y=async(d,v)=>{const w=S.toFiniteNumber(d.getContentLength());return w??p(v)};return async d=>{let{url:v,method:w,data:m,signal:h,cancelToken:g,timeout:k,onDownloadProgress:E,onUploadProgress:R,responseType:P,headers:L,withCredentials:$="same-origin",fetchOptions:T}=Op(d),pe=t||fetch;P=P?(P+"").toLowerCase():"text";let be=A0([h,g&&g.toAbortSignal()],k),V=null;const X=be&&be.unsubscribe&&(()=>{be.unsubscribe()});let Yt;try{if(R&&u&&w!=="get"&&w!=="head"&&(Yt=await y(L,m))!==0){let F=new n(v,{method:"POST",body:m,duplex:"half"}),U;if(S.isFormData(m)&&(U=F.headers.get("content-type"))&&L.setContentType(U),F.body){const[Re,ke]=ic(Yt,fo(oc(R)));m=lc(F.body,ac,Re,ke)}}S.isString($)||($=$?"include":"omit");const b=o&&"credentials"in n.prototype,he={...T,signal:be,method:w.toUpperCase(),headers:L.normalize().toJSON(),body:m,duplex:"half",credentials:b?$:void 0};V=o&&new n(v,he);let O=await(o?pe(V,T):pe(v,he));const N=c&&(P==="stream"||P==="response");if(c&&(E||N&&X)){const F={};["status","statusText","headers"].forEach(ft=>{F[ft]=O[ft]});const U=S.toFiniteNumber(O.headers.get("content-length")),[Re,ke]=E&&ic(U,fo(oc(E),!0))||[];O=new r(lc(O.body,ac,Re,()=>{ke&&ke(),X&&X()}),F)}P=P||"text";let j=await f[S.findKey(f,P)||"text"](O,d);return!N&&X&&X(),await new Promise((F,U)=>{Cp(F,U,{data:j,headers:De.from(O.headers),status:O.status,statusText:O.statusText,config:d,request:V})})}catch(b){throw X&&X(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new A("Network Error",A.ERR_NETWORK,d,V,b&&b.response),{cause:b.cause||b}):A.from(b,b&&b.code,d,V,b&&b.response)}}},z0=new Map,Rp=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,l=s,a,u,c=z0;for(;l--;)a=o[l],u=c.get(a),u===void 0&&c.set(a,u=l?new Map:$0(t)),c=u;return u};Rp();const Na={http:t0,xhr:N0,fetch:{get:Rp}};S.forEach(Na,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const dc=e=>`- ${e}`,U0=e=>S.isFunction(e)||e===null||e===!1;function M0(e,t){e=S.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=n?s.length>1?`since : `+s.map(dc).join(` `):" "+dc(s[0]):"as no adapter specified";throw new A("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return i}const _p={getAdapter:M0,adapters:Na};function vs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ti(null,e)}function pc(e){return vs(e),e.headers=De.from(e.headers),e.data=ys.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),_p.getAdapter(e.adapter||ei.adapter,e)(e).then(function(r){return vs(e),r.data=ys.call(e,e.transformResponse,r),r.headers=De.from(r.headers),r},function(r){return Ep(r)||(vs(e),r&&r.response&&(r.response.data=ys.call(e,e.transformResponse,r.response),r.response.headers=De.from(r.response.headers))),Promise.reject(r)})}const Lp="1.13.6",Uo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Uo[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const hc={};Uo.transitional=function(t,n,r){function i(o,s){return"[Axios v"+Lp+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,l)=>{if(t===!1)throw new A(i(s," has been removed"+(n?" in "+n:"")),A.ERR_DEPRECATED);return n&&!hc[s]&&(hc[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,l):!0}};Uo.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function b0(e,t,n){if(typeof e!="object")throw new A("options must be an object",A.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const l=e[o],a=l===void 0||s(l,o,e);if(a!==!0)throw new A("option "+o+" must be "+a,A.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new A("Unknown option "+o,A.ERR_BAD_OPTION)}}const zi={assertOptions:b0,validators:Uo},Be=zi.validators;let an=class{constructor(t){this.defaults=t||{},this.interceptors={request:new nc,response:new nc}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=hn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&zi.assertOptions(r,{silentJSONParsing:Be.transitional(Be.boolean),forcedJSONParsing:Be.transitional(Be.boolean),clarifyTimeoutError:Be.transitional(Be.boolean),legacyInterceptorReqResOrdering:Be.transitional(Be.boolean)},!1),i!=null&&(S.isFunction(i)?n.paramsSerializer={serialize:i}:zi.assertOptions(i,{encode:Be.function,serialize:Be.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zi.assertOptions(n,{baseUrl:Be.spelling("baseURL"),withXsrfToken:Be.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&S.merge(o.common,o[n.method]);o&&S.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=De.concat(s,o);const l=[];let a=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;a=a&&v.synchronous;const w=n.transitional||La;w&&w.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,p;if(!a){const d=[pc.bind(this),void 0];for(d.unshift(...l),d.push(...u),p=d.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,l){r.reason||(r.reason=new ti(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Tp(function(i){t=i}),cancel:t}}};function V0(e){return function(n){return e.apply(null,n)}}function H0(e){return S.isObject(e)&&e.isAxiosError===!0}const Cl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Cl).forEach(([e,t])=>{Cl[t]=e});function Np(e){const t=new an(e),n=cp(an.prototype.request,t);return S.extend(n,an.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Np(hn(e,i))},n}const re=Np(ei);re.Axios=an;re.CanceledError=ti;re.CancelToken=B0;re.isCancel=Ep;re.VERSION=Lp;re.toFormData=zo;re.AxiosError=A;re.Cancel=re.CanceledError;re.all=function(t){return Promise.all(t)};re.spread=V0;re.isAxiosError=H0;re.mergeConfig=hn;re.AxiosHeaders=De;re.formToJSON=e=>xp(S.isHTMLForm(e)?new FormData(e):e);re.getAdapter=_p.getAdapter;re.HttpStatusCode=Cl;re.default=re;const{Axios:d1,AxiosError:p1,CanceledError:h1,isCancel:m1,CancelToken:g1,VERSION:y1,all:v1,Cancel:w1,isAxiosError:S1,spread:k1,toFormData:x1,AxiosHeaders:E1,HttpStatusCode:C1,formToJSON:P1,getAdapter:O1,mergeConfig:R1}=re,_1=5e5,Q=re.create({baseURL:"",timeout:3e4,withCredentials:!0,headers:{"Content-Type":"application/json"}});Q.interceptors.request.use(e=>{const t=localStorage.getItem("dist_user_id");return t&&(e.headers["New-Api-User"]=t),e});Q.interceptors.response.use(e=>(e.data&&e.data.success===!1&&e.data.message&&hs.error(e.data.message),e),e=>{var n,r,i;const t=((r=(n=e.response)==null?void 0:n.data)==null?void 0:r.message)||e.message||"Request failed";return((i=e.response)==null?void 0:i.status)===401?(localStorage.removeItem("dist_user_id"),window.dispatchEvent(new Event("auth:logout")),hs.error("Session expired, please log in again")):hs.error(t),Promise.reject(e)});const K0=()=>Q.get("/api/dist/site/info"),L1=()=>Q.get("/api/dist/site/models"),T1=()=>Q.get("/api/dist/site/packages"),W0=e=>Q.post("/api/dist/user/register",e),Q0=e=>Q.post("/api/dist/user/login",e),q0=()=>Q.post("/api/dist/user/logout"),ws=()=>Q.get("/api/dist/user/self"),N1=()=>Q.get("/api/dist/user/usage"),A1=()=>Q.get("/api/dist/token/list"),I1=e=>Q.post("/api/dist/token/create",e),D1=(e,t)=>Q.put(`/api/dist/token/${e}`,t),F1=e=>Q.delete(`/api/dist/token/${e}`),j1=e=>Q.post("/api/dist/topup/redeem",{key:e}),$1=e=>Q.post("/api/dist/package/subscribe",{package_id:e}),z1=()=>Q.get("/api/dist/package/subscriptions"),U1=()=>Q.get("/api/dist/topup/info"),M1=e=>Q.post("/api/dist/topup/amount",e),b1=e=>Q.post("/api/dist/topup/pay",e),B1=e=>Q.post("/api/dist/topup/stripe/pay",e),V1=e=>Q.post("/api/dist/topup/creem/pay",e),H1=e=>Q.post("/api/dist/topup/crypto/pay",e),K1=e=>Q.get(`/api/dist/topup/crypto/status?trade_no=${e}`),W1=e=>Q.get("/api/dist/topup/history",{params:e}),Ap=x.createContext(null);function J0({children:e}){const[t,n]=x.useState(null),[r,i]=x.useState(!0),o=x.useCallback(async()=>{try{const u=await ws();if(u.data.success)return n(u.data.data),u.data.data}catch{}return null},[]);x.useEffect(()=>{localStorage.getItem("dist_user_id")?ws().then(c=>{c.data.success?n(c.data.data):localStorage.removeItem("dist_user_id")}).catch(()=>{localStorage.removeItem("dist_user_id")}).finally(()=>i(!1)):i(!1)},[]),x.useEffect(()=>{const u=()=>{n(null)};return window.addEventListener("auth:logout",u),()=>window.removeEventListener("auth:logout",u)},[]);const s=x.useCallback(async(u,c)=>{const f=await Q0({username:u,password:c});if(f.data.success){const p=f.data.data;p!=null&&p.id&&localStorage.setItem("dist_user_id",String(p.id));const y=await ws();return y.data.success?n(y.data.data):n(p),{success:!0}}return{success:!1,message:f.data.message}},[]),l=x.useCallback(async u=>{const c=await W0(u);return c.data.success?{success:!0,needsLogin:!0}:{success:!1,message:c.data.message}},[]),a=x.useCallback(async()=>{try{await q0()}catch{}localStorage.removeItem("dist_user_id"),n(null)},[]);return I.jsx(Ap.Provider,{value:{user:t,loading:r,login:s,register:l,logout:a,refreshUser:o},children:e})}function Y0(){const e=x.useContext(Ap);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}function G0(){const{user:e,loading:t}=Y0(),n=Gn();return t?I.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:I.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):e?I.jsx(cy,{}):I.jsx(np,{to:"/login",state:{from:n},replace:!0})}const Ip=x.createContext(null);function X0({children:e}){const[t,n]=x.useState(null),[r,i]=x.useState(!0);return x.useEffect(()=>{K0().then(o=>{var s,l;if(o.data.success&&(n(o.data.data),(s=o.data.data)!=null&&s.name&&(document.title=o.data.data.name),(l=o.data.data)!=null&&l.favicon)){const a=document.querySelector("link[rel~='icon']")||document.createElement("link");a.rel="icon",a.href=o.data.data.favicon,document.head.appendChild(a)}}).catch(()=>{}).finally(()=>i(!1))},[]),I.jsx(Ip.Provider,{value:{site:t,loading:r},children:e})}function Z0(){const e=x.useContext(Ip);if(!e)throw new Error("useSite must be used within SiteProvider");return e}const Dp=x.createContext(null),mc={starter:{Home:ye.lazy(()=>ee(()=>import("./Home-Dfjnl6IJ.js"),__vite__mapDeps([0,1,2,3]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-B4YlzwXv.js"),__vite__mapDeps([4,5,3])))},default:{Home:ye.lazy(()=>ee(()=>import("./Home-C-GxmmCZ.js"),__vite__mapDeps([6,1,2,3]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-4QA5HuBu.js"),__vite__mapDeps([7,5,3])))},dark:{Home:ye.lazy(()=>ee(()=>import("./Home-BShPF6nt.js"),__vite__mapDeps([8,1,2,3]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-BZYZ8jj1.js"),__vite__mapDeps([9,5,3])))},minimal:{Home:ye.lazy(()=>ee(()=>import("./Home-BbUuLGZD.js"),__vite__mapDeps([10,1,2,3]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-D1kE7Hv7.js"),__vite__mapDeps([11,5,3])))},clean:{Home:ye.lazy(()=>ee(()=>import("./Home-ahtkcEPh.js"),__vite__mapDeps([12,1,2,3]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-s3BpODFZ.js"),__vite__mapDeps([13,5,3])))},corporate:{Home:ye.lazy(()=>ee(()=>import("./Home-DvtKf7X7.js"),__vite__mapDeps([14,1,2,3]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-BtrGQcOw.js"),__vite__mapDeps([15,5,3])))},claude:{Home:ye.lazy(()=>ee(()=>import("./Home-Drv_Yrfd.js"),__vite__mapDeps([16,1,2,3]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-CtOOKniM.js"),__vite__mapDeps([17,5,3])))}};function ew(){return I.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-950",children:I.jsx("div",{className:"w-8 h-8 border-2 border-white/20 border-t-white/70 rounded-full animate-spin"})})}function tw({children:e}){const{site:t,loading:n}=Z0();if(n)return I.jsx(ew,{});const r=(t==null?void 0:t.theme_template)||"starter";return I.jsx(nw,{themeName:r,children:e})}function nw({themeName:e,children:t}){const n=x.useMemo(()=>{const r=mc[e]||mc.starter;return{name:e,...r}},[e]);return I.jsx(Dp.Provider,{value:n,children:t})}function rw(){const e=x.useContext(Dp);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const iw=x.lazy(()=>ee(()=>import("./Login-Xik2Nht3.js"),__vite__mapDeps([18,3]))),ow=x.lazy(()=>ee(()=>import("./Register-BgbUTYo5.js"),__vite__mapDeps([19,3]))),sw=x.lazy(()=>ee(()=>import("./Dashboard-elfJRGHo.js"),__vite__mapDeps([20,21,1,3]))),lw=x.lazy(()=>ee(()=>import("./Tokens-DqFd9l1i.js"),__vite__mapDeps([22,3]))),aw=x.lazy(()=>ee(()=>import("./Packages-CBRMcF8w.js"),__vite__mapDeps([23,21,3]))),uw=x.lazy(()=>ee(()=>import("./Pricing-CfO9rFBZ.js"),__vite__mapDeps([24,3]))),cw=x.lazy(()=>ee(()=>import("./Topup-BAYKs2M5.js"),__vite__mapDeps([25,21,1,3]))),fw=()=>I.jsx("div",{className:"flex items-center justify-center min-h-screen",children:I.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})});function dw(){const{Home:e,Layout:t}=rw();return I.jsx(x.Suspense,{fallback:I.jsx(fw,{}),children:I.jsxs(dy,{children:[I.jsxs(Ve,{element:I.jsx(t,{}),children:[I.jsx(Ve,{path:"/",element:I.jsx(e,{})}),I.jsx(Ve,{path:"/pricing",element:I.jsx(uw,{})}),I.jsx(Ve,{path:"/packages",element:I.jsx(aw,{})}),I.jsx(Ve,{path:"/login",element:I.jsx(iw,{})}),I.jsx(Ve,{path:"/register",element:I.jsx(ow,{})}),I.jsxs(Ve,{element:I.jsx(G0,{}),children:[I.jsx(Ve,{path:"/dashboard",element:I.jsx(sw,{})}),I.jsx(Ve,{path:"/tokens",element:I.jsx(lw,{})}),I.jsx(Ve,{path:"/topup",element:I.jsx(cw,{})})]})]}),I.jsx(Ve,{path:"*",element:I.jsx(np,{to:"/",replace:!0})})]})})}function pw(){return I.jsx(tw,{children:I.jsx(dw,{})})}const D=e=>typeof e=="string",ar=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},gc=e=>e==null?"":""+e,hw=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},mw=/###/g,yc=e=>e&&e.indexOf("###")>-1?e.replace(mw,"."):e,vc=e=>!e||D(e),xr=(e,t,n)=>{const r=D(t)?t.split("."):t;let i=0;for(;i{const{obj:r,k:i}=xr(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],s=t.slice(0,t.length-1),l=xr(e,s,Object);for(;l.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),l=xr(e,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},gw=(e,t,n,r)=>{const{obj:i,k:o}=xr(e,t,Object);i[o]=i[o]||[],i[o].push(n)},po=(e,t)=>{const{obj:n,k:r}=xr(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},yw=(e,t,n)=>{const r=po(e,n);return r!==void 0?r:po(t,n)},Fp=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?D(e[r])||e[r]instanceof String||D(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Fp(e[r],t[r],n):e[r]=t[r]);return e},Xt=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var vw={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ww=e=>D(e)?e.replace(/[&<>"'\/]/g,t=>vw[t]):e;class Sw{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const kw=[" ",",","?","!",";"],xw=new Sw(20),Ew=(e,t,n)=>{t=t||"",n=n||"";const r=kw.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=xw.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o},Pl=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o-1&&ae==null?void 0:e.replace(/_/g,"-"),Cw={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class ho{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Cw,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(D(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new ho(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ho(this.logger,t)}}var at=new ho;class Mo{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,o])=>{for(let s=0;s{for(let s=0;s-1&&this.options.ns.splice(n,1)}getResource(t,n,r,i={}){var u,c;const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):D(r)&&o?l.push(...r.split(o)):l.push(r)));const a=po(this.data,l);return!a&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),a||!s||!D(r)?a:Pl((c=(u=this.data)==null?void 0:u[t])==null?void 0:c[n],r,o)}addResource(t,n,r,i,o={silent:!1}){const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(l=t.split("."),i=n,n=l[1]),this.addNamespaces(n),wc(this.data,l,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r,i={silent:!1}){for(const o in r)(D(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o,s={silent:!1,skipCopy:!1}){let l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),i=r,r=n,n=l[1]),this.addNamespaces(n);let a=po(this.data,l)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Fp(a,r,o):a={...a,...r},wc(this.data,l,a),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var jp={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{var s;t=((s=this.processors[o])==null?void 0:s.process(t,n,r,i))??t}),t}};const $p=Symbol("i18next/PATH_KEY");function Pw(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>{var o;return(o=n==null?void 0:n.revoke)==null||o.call(n),i===$p?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Er(e,t){const{[$p]:n}=e(Pw()),r=(t==null?void 0:t.keySeparator)??".",i=(t==null?void 0:t.nsSeparator)??":";if(n.length>1&&i){const o=t==null?void 0:t.ns,s=Array.isArray(o)?o:null;if(s&&s.length>1&&s.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}const kc={},Ss=e=>!D(e)&&typeof e!="boolean"&&typeof e!="number";class mo extends Mo{constructor(t,n={}){super(),hw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=at.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const i=this.resolve(t,r);if((i==null?void 0:i.res)===void 0)return!1;const o=Ss(i.res);return!(r.returnObjects===!1&&o)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Ew(t,r,i);if(s&&!l){const a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:D(o)?[o]:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return{key:t,namespaces:D(o)?[o]:o}}translate(t,n,r){let i=typeof n=="object"?{...n}:n;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),t==null)return"";typeof t=="function"&&(t=Er(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(V=>typeof V=="function"?Er(V,{...this.options,...i}):String(V));const o=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:l,namespaces:a}=this.extractFromKey(t[t.length-1],i),u=a[a.length-1];let c=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const f=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return p?o?{res:`${u}${c}${l}`,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${c}${l}`:o?{res:l,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:l;const y=this.resolve(t,i);let d=y==null?void 0:y.res;const v=(y==null?void 0:y.usedKey)||l,w=(y==null?void 0:y.exactUsedKey)||l,m=["[object Number]","[object Function]","[object RegExp]"],h=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,k=i.count!==void 0&&!D(i.count),E=mo.hasDefaultValue(i),R=k?this.pluralResolver.getSuffix(f,i.count,i):"",P=i.ordinal&&k?this.pluralResolver.getSuffix(f,i.count,{ordinal:!1}):"",L=k&&!i.ordinal&&i.count===0,$=L&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${R}`]||i[`defaultValue${P}`]||i.defaultValue;let T=d;g&&!d&&E&&(T=$);const pe=Ss(T),be=Object.prototype.toString.apply(T);if(g&&T&&pe&&m.indexOf(be)<0&&!(D(h)&&Array.isArray(T))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const V=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,T,{...i,ns:a}):`key '${l} (${this.language})' returned an object instead of string.`;return o?(y.res=V,y.usedParams=this.getUsedParamsDetails(i),y):V}if(s){const V=Array.isArray(T),X=V?[]:{},Yt=V?w:v;for(const b in T)if(Object.prototype.hasOwnProperty.call(T,b)){const he=`${Yt}${s}${b}`;E&&!d?X[b]=this.translate(he,{...i,defaultValue:Ss($)?$[b]:void 0,joinArrays:!1,ns:a}):X[b]=this.translate(he,{...i,joinArrays:!1,ns:a}),X[b]===he&&(X[b]=T[b])}d=X}}else if(g&&D(h)&&Array.isArray(d))d=d.join(h),d&&(d=this.extendTranslation(d,t,i,r));else{let V=!1,X=!1;!this.isValidLookup(d)&&E&&(V=!0,d=$),this.isValidLookup(d)||(X=!0,d=l);const b=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&X?void 0:d,he=E&&$!==d&&this.options.updateMissing;if(X||V||he){if(this.logger.log(he?"updateKey":"missingKey",f,u,l,he?$:d),s){const F=this.resolve(l,{...i,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let O=[];const N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&N&&N[0])for(let F=0;F{var ft;const ke=E&&Re!==d?Re:b;this.options.missingKeyHandler?this.options.missingKeyHandler(F,u,U,ke,he,i):(ft=this.backendConnector)!=null&&ft.saveMissing&&this.backendConnector.saveMissing(F,u,U,ke,he,i),this.emit("missingKey",F,u,U,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?O.forEach(F=>{const U=this.pluralResolver.getSuffixes(F,i);L&&i[`defaultValue${this.options.pluralSeparator}zero`]&&U.indexOf(`${this.options.pluralSeparator}zero`)<0&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(Re=>{j([F],l+Re,i[`defaultValue${Re}`]||$)})}):j(O,l,$))}d=this.extendTranslation(d,t,i,y,r),X&&d===l&&this.options.appendNamespaceToMissingKey&&(d=`${u}${c}${l}`),(X||V)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${l}`:l,V?d:void 0,i))}return o?(y.res=d,y.usedParams=this.getUsedParamsDetails(i),y):d}extendTranslation(t,n,r,i,o){var a,u;if((a=this.i18nFormat)!=null&&a.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=D(t)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(c){const y=t.match(this.interpolator.nestingRegexp);f=y&&y.length}let p=r.replace&&!D(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||i.usedLng,r),c){const y=t.match(this.interpolator.nestingRegexp),d=y&&y.length;f(o==null?void 0:o[0])===y[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`),null):this.translate(...y,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,l=D(s)?[s]:s;return t!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(t=jp.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,i,o,s,l;return D(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(a=>typeof a=="function"?Er(a,{...this.options,...n}):a)),t.forEach(a=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(a,n),c=u.key;i=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=n.count!==void 0&&!D(n.count),y=p&&!n.ordinal&&n.count===0,d=n.context!==void 0&&(D(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(w=>{var m,h;this.isValidLookup(r)||(l=w,!kc[`${v[0]}-${w}`]&&((m=this.utils)!=null&&m.hasLoadedNamespace)&&!((h=this.utils)!=null&&h.hasLoadedNamespace(l))&&(kc[`${v[0]}-${w}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(g=>{var R;if(this.isValidLookup(r))return;s=g;const k=[c];if((R=this.i18nFormat)!=null&&R.addLookupKeys)this.i18nFormat.addLookupKeys(k,c,g,w,n);else{let P;p&&(P=this.pluralResolver.getSuffix(g,n.count,n));const L=`${this.options.pluralSeparator}zero`,$=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(n.ordinal&&P.indexOf($)===0&&k.push(c+P.replace($,this.options.pluralSeparator)),k.push(c+P),y&&k.push(c+L)),d){const T=`${c}${this.options.contextSeparator||"_"}${n.context}`;k.push(T),p&&(n.ordinal&&P.indexOf($)===0&&k.push(T+P.replace($,this.options.pluralSeparator)),k.push(T+P),y&&k.push(T+L))}}let E;for(;E=k.pop();)this.isValidLookup(r)||(o=E,r=this.getResource(g,w,E,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,i={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!D(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class xc{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=at.create("languageUtils")}getScriptPartFromCode(t){if(t=Hr(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Hr(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(D(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getScriptPartFromCode(r);if(this.isSupportedCode(i))return n=i;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(s=>{if(s===o)return s;if(!(s.indexOf("-")<0&&o.indexOf("-")<0)&&(s.indexOf("-")>0&&o.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===o||s.indexOf(o)===0&&o.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),D(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return D(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):D(t)&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}const Ec={zero:0,one:1,two:2,few:3,many:4,other:5},Cc={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Ow{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=at.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Hr(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Cc;if(!t.match(/-|_/))return Cc;const a=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(a,n)}return this.pluralRulesCache[o]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>Ec[i]-Ec[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n,r={}){const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const Pc=(e,t,n,r=".",i=!0)=>{let o=yw(e,t,n);return!o&&i&&D(n)&&(o=Pl(e,n,r),o===void 0&&(o=Pl(t,n,r))),o},ks=e=>e.replace(/\$/g,"$$$$");class Oc{constructor(t={}){var n;this.logger=at.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:l,suffixEscaped:a,formatSeparator:u,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:p,nestingPrefixEscaped:y,nestingSuffix:d,nestingSuffixEscaped:v,nestingOptionsSeparator:w,maxReplaces:m,alwaysFormat:h}=t.interpolation;this.escape=n!==void 0?n:ww,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Xt(o):s||"{{",this.suffix=l?Xt(l):a||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=p?Xt(p):y||Xt("$t("),this.nestingSuffix=d?Xt(d):v||Xt(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=m||1e3,this.alwaysFormat=h!==void 0?h:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,i){var y;let o,s,l;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=d=>{if(d.indexOf(this.formatSeparator)<0){const h=Pc(n,a,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(h,void 0,r,{...i,...n,interpolationkey:d}):h}const v=d.split(this.formatSeparator),w=v.shift().trim(),m=v.join(this.formatSeparator).trim();return this.format(Pc(n,a,w,this.options.keySeparator,this.options.ignoreJSONStructure),m,r,{...i,...n,interpolationkey:w})};this.resetRegExp();const c=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((y=i==null?void 0:i.interpolation)==null?void 0:y.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>ks(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?ks(this.escape(d)):ks(d)}].forEach(d=>{for(l=0;o=d.regex.exec(t);){const v=o[1].trim();if(s=u(v),s===void 0)if(typeof c=="function"){const m=c(t,o,i);s=D(m)?m:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))s="";else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),s="";else!D(s)&&!this.useRawValueToEscape&&(s=gc(s));const w=d.safeValue(s);if(t=t.replace(o[0],w),f?(d.regex.lastIndex+=s.length,d.regex.lastIndex-=o[0].length):d.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n,r={}){let i,o,s;const l=(a,u)=>{const c=this.nestingOptionsSeparator;if(a.indexOf(c)<0)return a;const f=a.split(new RegExp(`${Xt(c)}[ ]*{`));let p=`{${f[1]}`;a=f[0],p=this.interpolate(p,s);const y=p.match(/'/g),d=p.match(/"/g);(((y==null?void 0:y.length)??0)%2===0&&!d||((d==null?void 0:d.length)??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),u&&(s={...u,...s})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${a}`,v),`${a}${c}${p}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,a};for(;i=this.nestingRegexp.exec(t);){let a=[];s={...r},s=s.replace&&!D(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(u!==-1&&(a=i[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),o=n(l.call(this,i[1].trim(),s),s),o&&i[0]===t&&!D(o))return o;D(o)||(o=gc(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),a.length&&(o=a.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const Rw=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(s){const[l,...a]=s.split(":"),u=a.join(":").trim().replace(/^'+|'+$/g,""),c=l.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Rc=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=r+JSON.stringify(o);let l=t[s];return l||(l=e(Hr(r),i),t[s]=l),l(n)}},_w=e=>(t,n,r)=>e(Hr(n),r)(t);class Lw{constructor(t={}){this.logger=at.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Rc:_w;this.formats={number:r((i,o)=>{const s=new Intl.NumberFormat(i,{...o});return l=>s.format(l)}),currency:r((i,o)=>{const s=new Intl.NumberFormat(i,{...o,style:"currency"});return l=>s.format(l)}),datetime:r((i,o)=>{const s=new Intl.DateTimeFormat(i,{...o});return l=>s.format(l)}),relativetime:r((i,o)=>{const s=new Intl.RelativeTimeFormat(i,{...o});return l=>s.format(l,o.range||"day")}),list:r((i,o)=>{const s=new Intl.ListFormat(i,{...o});return l=>s.format(l)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Rc(n)}format(t,n,r,i={}){const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(l=>l.indexOf(")")>-1)){const l=o.findIndex(a=>a.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,a)=>{var f;const{formatName:u,formatOptions:c}=Rw(a);if(this.formats[u]){let p=l;try{const y=((f=i==null?void 0:i.formatParams)==null?void 0:f[i.interpolationkey])||{},d=y.locale||y.lng||i.locale||i.lng||r;p=this.formats[u](l,d,{...c,...i,...y})}catch(y){this.logger.warn(y)}return p}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const Tw=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Nw extends Mo{constructor(t,n,r,i={}){var o,s;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=at.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(s=(o=this.backend)==null?void 0:o.init)==null||s.call(o,r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},l={},a={};return t.forEach(u=>{let c=!0;n.forEach(f=>{const p=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,c=!1,s[p]===void 0&&(s[p]=!0),o[p]===void 0&&(o[p]=!0),a[f]===void 0&&(a[f]=!0)))}),c||(l[u]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(a)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),!n&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(a=>{gw(a.loaded,[o],s),Tw(a,t),n&&a.errors.push(n),a.pendingCount===0&&!a.done&&(Object.keys(a.loaded).forEach(u=>{l[u]||(l[u]={});const c=a.loaded[u];c.length&&c.forEach(f=>{l[u][f]===void 0&&(l[u][f]=!0)})}),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(a=>!a.done)}read(t,n,r,i=0,o=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const l=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&c&&i{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(u,c)},a=this.backend[r].bind(this.backend);if(a.length===2){try{const u=a(t,n);u&&typeof u.then=="function"?u.then(c=>l(null,c)).catch(l):l(null,u)}catch(u){l(u)}return}return a(t,n,l)}prepareLoading(t,n,r={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();D(t)&&(t=this.languageUtils.toResolveHierarchy(t)),D(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,l),this.loaded(t,s,l)})}saveMissing(t,n,r,i,o,s={},l=()=>{}){var a,u,c,f,p;if((u=(a=this.services)==null?void 0:a.utils)!=null&&u.hasLoadedNamespace&&!((f=(c=this.services)==null?void 0:c.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((p=this.backend)!=null&&p.create){const y={...s,isUpdate:o},d=this.backend.create.bind(this.backend);if(d.length<6)try{let v;d.length===5?v=d(t,n,r,i,y):v=d(t,n,r,i),v&&typeof v.then=="function"?v.then(w=>l(null,w)).catch(l):l(null,v)}catch(v){l(v)}else d(t,n,r,i,l,y)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const xs=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),D(e[1])&&(t.defaultValue=e[1]),D(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_c=e=>{var t,n;return D(e.ns)&&(e.ns=[e.ns]),D(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),D(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},xi=()=>{},Aw=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})},zp="__i18next_supportNoticeShown",Iw=()=>typeof globalThis<"u"&&!!globalThis[zp],Dw=()=>{typeof globalThis<"u"&&(globalThis[zp]=!0)},Fw=e=>{var t,n,r,i,o,s,l,a,u,c,f,p,y;return!!(((r=(n=(t=e==null?void 0:e.modules)==null?void 0:t.backend)==null?void 0:n.name)==null?void 0:r.indexOf("Locize"))>0||((l=(s=(o=(i=e==null?void 0:e.modules)==null?void 0:i.backend)==null?void 0:o.constructor)==null?void 0:s.name)==null?void 0:l.indexOf("Locize"))>0||(u=(a=e==null?void 0:e.options)==null?void 0:a.backend)!=null&&u.backends&&e.options.backend.backends.some(d=>{var v,w,m;return((v=d==null?void 0:d.name)==null?void 0:v.indexOf("Locize"))>0||((m=(w=d==null?void 0:d.constructor)==null?void 0:w.name)==null?void 0:m.indexOf("Locize"))>0})||(f=(c=e==null?void 0:e.options)==null?void 0:c.backend)!=null&&f.projectId||(y=(p=e==null?void 0:e.options)==null?void 0:p.backend)!=null&&y.backendOptions&&e.options.backend.backendOptions.some(d=>d==null?void 0:d.projectId))};class Cr extends Mo{constructor(t={},n){if(super(),this.options=_c(t),this.services={},this.logger=at,this.modules={external:[]},Aw(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(D(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=xs();this.options={...r,...this.options,..._c(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Fw(this)&&!Iw()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),Dw());const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?at.init(i(this.modules.logger),this.options):at.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Lw;const c=new xc(this.options);this.store=new Sc(this.options.resources,this.options);const f=this.services;f.logger=at,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new Ow(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=i(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Oc(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Nw(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(y,...d)=>{this.emit(y,...d)}),this.modules.languageDetector&&(f.languageDetector=i(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=i(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new mo(this.services,this.options),this.translator.on("*",(y,...d)=>{this.emit(y,...d)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,n||(n=xi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const l=ar(),a=()=>{const u=(c,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),n(c,f)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),l}loadResources(t,n=xi){var o,s;let r=n;const i=D(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const l=[],a=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&l.indexOf(f)<0&&l.push(f)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),(s=(o=this.options.preload)==null?void 0:o.forEach)==null||s.call(o,u=>a(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const i=ar();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=xi),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&jp.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=ar();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,a)=>{a?this.isLanguageChangingTo===t&&(i(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(l,(...u)=>this.t(...u))},s=l=>{var c,f;!t&&!l&&this.services.languageDetector&&(l=[]);const a=D(l)?l:l&&l[0],u=this.store.hasLanguageSomeTranslations(a)?a:this.services.languageUtils.getBestMatchFromCodes(D(l)?[l]:l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),(f=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||f.call(c,u)),this.loadResources(u,p=>{o(p,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r){const i=(o,s,...l)=>{let a;typeof s!="object"?a=this.options.overloadTranslationOptionHandler([o,s].concat(l)):a={...s},a.lng=a.lng||i.lng,a.lngs=a.lngs||i.lngs,a.ns=a.ns||i.ns,a.keyPrefix!==""&&(a.keyPrefix=a.keyPrefix||r||i.keyPrefix);const u={...this.options,...a},c=this.options.keySeparator||".";let f;return a.keyPrefix&&Array.isArray(o)?f=o.map(p=>(typeof p=="function"&&(p=Er(p,u)),`${a.keyPrefix}${c}${p}`)):(typeof o=="function"&&(o=Er(o,u)),f=a.keyPrefix?`${a.keyPrefix}${c}${o}`:o),this.t(f,a)};return D(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(l,a)=>{const u=this.services.backendConnector.state[`${l}|${a}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=ar();return this.options.ns?(D(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ar();D(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var i,o;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const s=new Intl.Locale(t);if(s&&s.getTextInfo){const l=s.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((o=this.services)==null?void 0:o.languageUtils)||new xc(xs());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new Cr(t,n);return r.createInstance=Cr.createInstance,r}cloneInstance(t={},n=xi){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Cr(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const l=Object.keys(this.store.data).reduce((a,u)=>(a[u]={...this.store.data[u]},a[u]=Object.keys(a[u]).reduce((c,f)=>(c[f]={...a[u][f]},c),a[u]),a),{});o.store=new Sc(l,i),o.services.resourceStore=o.store}if(t.interpolation){const a={...xs().interpolation,...this.options.interpolation,...t.interpolation},u={...i,interpolation:a};o.services.interpolator=new Oc(u)}return o.translator=new mo(o.services,i),o.translator.on("*",(l,...a)=>{o.emit(l,...a)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Oe=Cr.createInstance();Oe.createInstance;Oe.dir;Oe.init;Oe.loadResources;Oe.reloadResources;Oe.use;Oe.changeLanguage;Oe.getFixedT;Oe.t;Oe.exists;Oe.setDefaultNamespace;Oe.hasLoadedNamespace;Oe.loadNamespaces;Oe.loadLanguages;const jw=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,$w={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},zw=e=>$w[e],Uw=e=>e.replace(jw,zw);let Ol={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Uw,transDefaultProps:void 0};const Mw=(e={})=>{Ol={...Ol,...e}},Q1=()=>Ol;let Up;const bw=e=>{Up=e},q1=()=>Up,Bw={type:"3rdParty",init(e){Mw(e.options.react),bw(e)}},{slice:Vw,forEach:Hw}=[];function Kw(e){return Hw.call(Vw.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Ww(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const Lc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Qw=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!Lc.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!Lc.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},Tc={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Qw(e,t,i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let l=0;l0&&s[l].substring(0,a)===t&&(n=s[l].substring(a+1))}}return n}},Yw={name:"hash",lookup(e){var i;let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const s=o.substring(1);if(t){const l=s.split("&");for(let a=0;a0&&l[a].substring(0,u)===t&&(r=l[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const l=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?(i=l[typeof n=="number"?n:0])==null?void 0:i.replace("/",""):void 0}}}return r}};let vn=null;const Nc=()=>{if(vn!==null)return vn;try{if(vn=typeof window<"u"&&window.localStorage!==null,!vn)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{vn=!1}return vn};var Gw={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Nc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Nc()&&window.localStorage.setItem(n,e)}};let wn=null;const Ac=()=>{if(wn!==null)return wn;try{if(wn=typeof window<"u"&&window.sessionStorage!==null,!wn)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{wn=!1}return wn};var Xw={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Ac())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Ac()&&window.sessionStorage.setItem(n,e)}},Zw={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o0?t:void 0}},e1={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},t1={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},n1={name:"subdomain",lookup(e){var i,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(i=window.location)==null?void 0:i.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let Mp=!1;try{document.cookie,Mp=!0}catch{}const bp=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Mp||bp.splice(1,1);const r1=()=>({order:bp,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Bp{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Kw(n,this.options||{},r1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(qw),this.addDetector(Jw),this.addDetector(Gw),this.addDetector(Xw),this.addDetector(Zw),this.addDetector(e1),this.addDetector(t1),this.addDetector(n1),this.addDetector(Yw)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.filter(r=>r!=null&&!Ww(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Bp.type="languageDetector";const i1={"nav.home":"Home","nav.pricing":"Pricing","nav.packages":"Packages","nav.dashboard":"Dashboard","nav.apiKeys":"API Keys","nav.login":"Login","nav.signUp":"Sign Up","nav.logout":"Logout","nav.contact":"Contact","home.heroSubtitle":"Access the world's most powerful AI models through a single API endpoint. Simple, affordable, reliable.","home.getStarted":"Get Started Free","home.viewPricing":"View Pricing","home.goToDashboard":"Go to Dashboard","home.aiModels":"AI Models","home.uptime":"Uptime","home.latency":"Latency","home.whyChooseUs":"Why Choose Us","home.whyChooseUsDesc":"Everything you need to build AI-powered applications","home.lightningFast":"Lightning Fast","home.lightningFastDesc":"Optimized routing and caching deliver responses with minimal latency. Load-balanced across multiple providers for maximum reliability.","home.securePrivate":"Secure & Private","home.securePrivateDesc":"Enterprise-grade security with encrypted API keys. No request logging by default. Your data stays your data.","home.payAsYouGo":"Pay As You Go","home.payAsYouGoDesc":"Transparent pricing with no hidden fees. Only pay for what you use. Multiple top-up options and subscription packages available.","home.availableModels":"Available Models","home.availableModelsDesc":"Access {{count}} AI models through a unified API","home.viewAllModels":"View all {{count}} models","home.plansPackages":"Plans & Packages","home.choosePlan":"Choose a plan that fits your needs","home.subscribe":"Subscribe","home.days":"{{count}} days","home.readyToStart":"Ready to Get Started?","home.readyToStartDesc":"Create your account and start building with AI in minutes. No credit card required.","home.createFreeAccount":"Create Free Account","home.signIn":"Sign In","home.defaultHeroTitle":"AI API Platform","login.welcomeBack":"Welcome Back","login.signInTo":"Sign in to {{name}}","login.signInToDefault":"Sign in to your account","login.username":"Username","login.password":"Password","login.enterUsername":"Enter your username","login.enterPassword":"Enter your password","login.signingIn":"Signing in...","login.signInBtn":"Sign In","login.noAccount":"Don't have an account?","login.createOne":"Create one","login.fillAllFields":"Please fill in all fields","login.welcomeBackToast":"Welcome back!","register.createAccount":"Create Account","register.getStartedWith":"Get started with {{name}}","register.getStartedDefault":"Get started with our platform","register.username":"Username","register.email":"Email","register.password":"Password","register.confirmPassword":"Confirm Password","register.chooseUsername":"Choose a username","register.emailPlaceholder":"your@email.com (optional)","register.passwordPlaceholder":"8-20 characters","register.repeatPassword":"Repeat your password","register.creating":"Creating...","register.createAccountBtn":"Create Account","register.hasAccount":"Already have an account?","register.signIn":"Sign in","register.fillRequired":"Please fill in all required fields","register.passwordMismatch":"Passwords do not match","register.passwordLength":"Password must be 8-20 characters","register.accountCreated":"Account created! Please sign in.","dashboard.welcome":"Welcome,","dashboard.manageDesc":"Manage your API usage, keys, and account","dashboard.balance":"Balance","dashboard.quotaUnits":"{{count}} quota units","dashboard.used":"Used","dashboard.totalRequests":"Total Requests","dashboard.redeemCode":"Redeem Code","dashboard.enterCode":"Enter redemption code","dashboard.redeeming":"Redeeming...","dashboard.redeem":"Redeem","dashboard.redeemSuccess":"Code redeemed successfully!","dashboard.quickLinks":"Quick Links","dashboard.apiKeys":"API Keys","dashboard.manageKeys":"Manage your keys","dashboard.packages":"Packages","dashboard.viewPlans":"View plans","dashboard.pricing":"Pricing","dashboard.modelPrices":"Model prices","dashboard.apiDocs":"API Docs","dashboard.comingSoon":"Coming soon","tokens.title":"API Keys","tokens.subtitle":"Manage your API access tokens","tokens.newKey":"+ New Key","tokens.createApiKey":"Create API Key","tokens.name":"Name","tokens.namePlaceholder":"e.g. my-app-key","tokens.cancel":"Cancel","tokens.creating":"Creating...","tokens.create":"Create","tokens.newApiKey":"Your New API Key","tokens.keyWarning":"This is the only time you'll see this key. Copy it now and store it securely.","tokens.copied":"Copied!","tokens.copy":"Copy","tokens.copiedToClipboard":"Copied to clipboard!","tokens.savedKey":"I've saved my key","tokens.deleteToken":"Delete Token","tokens.deleteConfirm":'Delete "{{name}}"? This cannot be undone.',"tokens.delete":"Delete","tokens.noKeys":"No API keys yet","tokens.createFirst":"Create Your First Key","tokens.enabled":"Enabled","tokens.disabled":"Disabled","tokens.tokenDisabled":"Token disabled","tokens.tokenEnabled":"Token enabled","tokens.tokenDeleted":"Token deleted","tokens.enterName":"Please enter a name","tokens.quickStart":"Quick Start","tokens.quickStartComment":"# Use your API key with OpenAI-compatible endpoint","config.title":"Config File Export","config.subtitle":"Select your API Key and model to generate config files","config.selectKey":"Select API Key","config.selectModel":"Select Model","config.selectTool":"Select Tool","config.copy":"Copy","config.download":"Download","config.copied":"Copied to clipboard!","config.downloaded":"Config file downloaded","config.loading":"Loading...","config.loginPrompt":"Log in to generate your config","config.loginDesc":"Select your API Key and model to auto-fill config files","config.searchModel":"Search models...","config.noModelMatch":"No models match your search","pricing.title":"Model Pricing","pricing.subtitle":"Transparent, pay-as-you-go pricing for all available models. Prices shown per 1M tokens.","pricing.searchPlaceholder":"Search models...","pricing.noMatch":"No models match your search","pricing.noModels":"No models available","pricing.model":"Model","pricing.inputPrice":"Input / 1M tokens","pricing.outputPrice":"Output / 1M tokens","pricing.status":"Status","pricing.online":"Online","pricing.unknown":"Unknown","pricing.vendor":"Vendor","pricing.allVendors":"All","packages.title":"Packages & Plans","packages.subtitle":"Choose a package that fits your usage. All plans include access to all available models.","packages.noPackages":"No packages available at the moment.","packages.checkPricing":"Check model pricing","packages.daysAccess":"{{count}} days access","packages.creditIncluded":"${{amount}} credit included","packages.requestsMin":"{{count}} requests/min","packages.allModels":"All models access","packages.openaiApi":"OpenAI-compatible API","packages.subscribeNow":"Subscribe Now","packages.signUpToSubscribe":"Sign Up to Subscribe","packages.processing":"Processing...","packages.confirmTitle":"Confirm Subscription","packages.confirmDesc":"Subscribe to {{name}} for ${{price}}?","packages.yourBalance":"Your balance:","packages.insufficientBalance":"Insufficient balance. Please top up before subscribing.","packages.confirm":"Confirm","packages.subscribedSuccess":"Subscribed successfully!","packages.mySubscriptions":"My Subscriptions","packages.subscriptionId":"Subscription #{{id}}","packages.active":"Active","packages.expires":"Expires","packages.nextReset":"Next reset","packages.remaining":"Remaining","packages.unusedQuotaExpires":"Unused quota expires each period","packages.resetNever":"One-time","packages.resetDaily":"Resets daily","packages.resetWeekly":"Resets weekly","packages.resetMonthly":"Resets monthly","packages.periodicQuota":"${{amount}} {{period}} quota","packages.subscriptionInfo":"This is a subscription ({{period}}), valid for {{days}} days. Each period grants ${{amount}} quota. Unused quota expires.","packages.officialEquiv":"Equivalent to ${{amount}} at {{model}} official pricing","common.sessionExpired":"Session expired, please log in again","common.requestFailed":"Request failed","nav.topup":"Top Up","topup.title":"Top Up","topup.subtitle":"Recharge your account balance via online payment or redemption code","topup.onlineTopup":"Online Top Up","topup.selectAmount":"Select Amount","topup.customAmount":"Custom Amount","topup.amountPlaceholder":"Enter amount (min ${{min}})","topup.paymentMethod":"Payment Method","topup.processing":"Processing...","topup.calculating":"Calculating...","topup.payAmountLabel":"Amount to pay","topup.enterAmount":"Please enter a top-up amount","topup.paymentSuccess":"Payment successful! Balance updated.","topup.orderExpired":"Payment order expired","topup.viewHistory":"View History","topup.hideHistory":"Hide History","topup.history":"Top-Up History","topup.noHistory":"No top-up records yet","topup.statusSuccess":"Success","topup.statusPending":"Pending","topup.statusFailed":"Failed","topup.redeemTitle":"Redeem Code","topup.enterRedeemCode":"Enter redemption code","topup.redeeming":"Redeeming...","topup.redeem":"Redeem","topup.redeemCode":"Redeem Code","topup.redeemSuccess":"Code redeemed successfully!","topup.cryptoPayment":"Crypto Payment","topup.walletAddress":"Wallet Address","topup.amount":"Amount","topup.chain":"Chain","topup.waitingPayment":"Waiting for payment...","topup.close":"Close","topup.selectChain":"Please select a blockchain network","topup.selectToken":"Please select a token","topup.token":"Token","topup.payWith":"Pay with","topup.payNow":"Pay","topup.quotaIncluded":"{{count}} quota included","topup.creemPayment":"Creem Payment"},o1={translation:i1},s1={"nav.home":"首页","nav.pricing":"定价","nav.packages":"套餐","nav.dashboard":"控制台","nav.apiKeys":"API 密钥","nav.login":"登录","nav.signUp":"注册","nav.logout":"退出","nav.contact":"联系我们","home.heroSubtitle":"通过单一 API 端点访问全球最强大的 AI 模型。简单、实惠、可靠。","home.getStarted":"免费开始","home.viewPricing":"查看定价","home.goToDashboard":"进入控制台","home.aiModels":"AI 模型","home.uptime":"在线率","home.latency":"延迟","home.whyChooseUs":"为什么选择我们","home.whyChooseUsDesc":"构建 AI 应用所需的一切","home.lightningFast":"极速响应","home.lightningFastDesc":"优化的路由和缓存以最低延迟交付响应。跨多个供应商负载均衡,确保最大可靠性。","home.securePrivate":"安全可靠","home.securePrivateDesc":"企业级安全性,API 密钥加密存储。默认不记录请求日志。您的数据由您掌控。","home.payAsYouGo":"按量付费","home.payAsYouGoDesc":"透明定价,无隐藏费用。按使用量付费。提供多种充值方式和订阅套餐。","home.availableModels":"可用模型","home.availableModelsDesc":"通过统一 API 访问 {{count}} 个 AI 模型","home.viewAllModels":"查看全部 {{count}} 个模型","home.plansPackages":"套餐方案","home.choosePlan":"选择适合您需求的方案","home.subscribe":"订阅","home.days":"{{count}} 天","home.readyToStart":"准备好了吗?","home.readyToStartDesc":"创建账户,几分钟内即可开始使用 AI 构建应用。无需信用卡。","home.createFreeAccount":"免费创建账户","home.signIn":"登录","home.defaultHeroTitle":"AI API 平台","login.welcomeBack":"欢迎回来","login.signInTo":"登录到 {{name}}","login.signInToDefault":"登录您的账户","login.username":"用户名","login.password":"密码","login.enterUsername":"请输入用户名","login.enterPassword":"请输入密码","login.signingIn":"登录中...","login.signInBtn":"登录","login.noAccount":"还没有账户?","login.createOne":"立即注册","login.fillAllFields":"请填写所有字段","login.welcomeBackToast":"欢迎回来!","register.createAccount":"创建账户","register.getStartedWith":"开始使用 {{name}}","register.getStartedDefault":"开始使用我们的平台","register.username":"用户名","register.email":"邮箱","register.password":"密码","register.confirmPassword":"确认密码","register.chooseUsername":"请选择用户名","register.emailPlaceholder":"your@email.com(可选)","register.passwordPlaceholder":"8-20 个字符","register.repeatPassword":"请再次输入密码","register.creating":"创建中...","register.createAccountBtn":"创建账户","register.hasAccount":"已有账户?","register.signIn":"立即登录","register.fillRequired":"请填写所有必填字段","register.passwordMismatch":"两次密码不一致","register.passwordLength":"密码长度需为 8-20 个字符","register.accountCreated":"账户创建成功!请登录。","dashboard.welcome":"欢迎,","dashboard.manageDesc":"管理您的 API 用量、密钥和账户","dashboard.balance":"余额","dashboard.quotaUnits":"{{count}} 额度单位","dashboard.used":"已使用","dashboard.totalRequests":"总请求数","dashboard.redeemCode":"兑换码","dashboard.enterCode":"请输入兑换码","dashboard.redeeming":"兑换中...","dashboard.redeem":"兑换","dashboard.redeemSuccess":"兑换码兑换成功!","dashboard.quickLinks":"快捷入口","dashboard.apiKeys":"API 密钥","dashboard.manageKeys":"管理您的密钥","dashboard.packages":"套餐","dashboard.viewPlans":"查看方案","dashboard.pricing":"定价","dashboard.modelPrices":"模型价格","dashboard.apiDocs":"API 文档","dashboard.comingSoon":"即将推出","tokens.title":"API 密钥","tokens.subtitle":"管理您的 API 访问令牌","tokens.newKey":"+ 新建密钥","tokens.createApiKey":"创建 API 密钥","tokens.name":"名称","tokens.namePlaceholder":"例如 my-app-key","tokens.cancel":"取消","tokens.creating":"创建中...","tokens.create":"创建","tokens.newApiKey":"您的新 API 密钥","tokens.keyWarning":"这是您唯一一次看到此密钥的机会。请立即复制并安全保存。","tokens.copied":"已复制!","tokens.copy":"复制","tokens.copiedToClipboard":"已复制到剪贴板!","tokens.savedKey":"我已保存密钥","tokens.deleteToken":"删除令牌","tokens.deleteConfirm":'删除 "{{name}}"?此操作不可撤销。',"tokens.delete":"删除","tokens.noKeys":"暂无 API 密钥","tokens.createFirst":"创建您的第一个密钥","tokens.enabled":"已启用","tokens.disabled":"已禁用","tokens.tokenDisabled":"令牌已禁用","tokens.tokenEnabled":"令牌已启用","tokens.tokenDeleted":"令牌已删除","tokens.enterName":"请输入名称","tokens.quickStart":"快速开始","tokens.quickStartComment":"# 使用 OpenAI 兼容端点调用 API","config.title":"配置文件导出","config.subtitle":"选择您的 API Key 和模型,一键生成配置文件","config.selectKey":"选择 API Key","config.selectModel":"选择模型","config.selectTool":"选择工具","config.copy":"复制","config.download":"下载","config.copied":"已复制到剪贴板","config.downloaded":"配置文件已下载","config.loading":"加载中...","config.loginPrompt":"登录后可生成您的专属配置","config.loginDesc":"选择 API Key 和模型,自动填充到配置文件中","config.searchModel":"搜索模型...","config.noModelMatch":"没有匹配的模型","pricing.title":"模型定价","pricing.subtitle":"透明的按量付费定价。价格以每百万 token 计。","pricing.searchPlaceholder":"搜索模型...","pricing.noMatch":"没有匹配的模型","pricing.noModels":"暂无可用模型","pricing.model":"模型","pricing.inputPrice":"输入 / 百万 token","pricing.outputPrice":"输出 / 百万 token","pricing.status":"状态","pricing.online":"在线","pricing.unknown":"未知","pricing.vendor":"厂商","pricing.allVendors":"全部","packages.title":"套餐方案","packages.subtitle":"选择适合您用量的套餐。所有方案均可访问全部可用模型。","packages.noPackages":"暂无可用套餐。","packages.checkPricing":"查看模型定价","packages.daysAccess":"{{count}} 天有效期","packages.creditIncluded":"含 ${{amount}} 额度","packages.requestsMin":"{{count}} 次请求/分钟","packages.allModels":"全部模型可用","packages.openaiApi":"OpenAI 兼容 API","packages.subscribeNow":"立即订阅","packages.signUpToSubscribe":"注册后订阅","packages.processing":"处理中...","packages.confirmTitle":"确认订阅","packages.confirmDesc":"订阅 {{name}},价格 ${{price}}?","packages.yourBalance":"您的余额:","packages.insufficientBalance":"余额不足,请先充值。","packages.confirm":"确认","packages.subscribedSuccess":"订阅成功!","packages.mySubscriptions":"我的订阅","packages.subscriptionId":"订阅 #{{id}}","packages.active":"活跃","packages.expires":"到期","packages.nextReset":"下次重置","packages.remaining":"剩余","packages.unusedQuotaExpires":"未用完额度到期作废","packages.resetNever":"一次性","packages.resetDaily":"每日重置","packages.resetWeekly":"每周重置","packages.resetMonthly":"每月重置","packages.periodicQuota":"{{period}}额度 ${{amount}}","packages.subscriptionInfo":"📋 此套餐为周期订阅({{period}}),有效期 {{days}} 天。每个周期获得 ${{amount}} 额度,未用完作废。","packages.officialEquiv":"相当于 {{model}} 官方 ${{amount}} 额度","common.sessionExpired":"会话已过期,请重新登录","common.requestFailed":"请求失败","nav.topup":"充值","topup.title":"充值中心","topup.subtitle":"通过在线支付或兑换码为账户充值","topup.onlineTopup":"在线充值","topup.selectAmount":"选择金额","topup.customAmount":"自定义金额","topup.amountPlaceholder":"输入金额(最低 ${{min}})","topup.paymentMethod":"支付方式","topup.processing":"处理中...","topup.calculating":"计算中...","topup.payAmountLabel":"实付金额","topup.enterAmount":"请输入充值金额","topup.paymentSuccess":"支付成功!余额已更新。","topup.orderExpired":"支付订单已过期","topup.viewHistory":"查看记录","topup.hideHistory":"隐藏记录","topup.history":"充值记录","topup.noHistory":"暂无充值记录","topup.statusSuccess":"成功","topup.statusPending":"待支付","topup.statusFailed":"失败","topup.redeemTitle":"兑换码充值","topup.enterRedeemCode":"请输入兑换码","topup.redeeming":"兑换中...","topup.redeem":"兑换","topup.redeemCode":"兑换码","topup.redeemSuccess":"兑换码兑换成功!","topup.cryptoPayment":"加密货币支付","topup.walletAddress":"钱包地址","topup.amount":"金额","topup.chain":"链","topup.waitingPayment":"等待支付中...","topup.close":"关闭","topup.selectChain":"请选择区块链网络","topup.selectToken":"请选择代币","topup.token":"代币","topup.payWith":"使用","topup.payNow":"支付","topup.quotaIncluded":"含 {{count}} 额度","topup.creemPayment":"Creem 支付"},l1={translation:s1};Oe.use(Bp).use(Bw).init({load:"languageOnly",resources:{en:o1,zh:l1},fallbackLng:"en",interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator","htmlTag","querystring"],caches:["localStorage"]}});Es.createRoot(document.getElementById("root")).render(I.jsx(ye.StrictMode,{children:I.jsx(wy,{children:I.jsx(X0,{children:I.jsxs(J0,{children:[I.jsx(pw,{}),I.jsx(cv,{position:"top-center",toastOptions:{duration:3e3,style:{background:"#1a1a2e",color:"#fff",border:"1px solid rgba(255,255,255,0.08)",borderRadius:"12px",fontSize:"14px"}}})]})})})}));export{q1 as A,a1 as L,np as N,cy as O,_1 as Q,Z0 as a,Gd as b,Gn as c,j1 as d,A1 as e,L1 as f,N1 as g,I1 as h,D1 as i,I as j,F1 as k,T1 as l,z1 as m,U1 as n,M1 as o,B1 as p,b1 as q,x as r,$1 as s,V1 as t,Y0 as u,H1 as v,K1 as w,W1 as x,Q1 as y,hs as z}; +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=hn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&zi.assertOptions(r,{silentJSONParsing:Be.transitional(Be.boolean),forcedJSONParsing:Be.transitional(Be.boolean),clarifyTimeoutError:Be.transitional(Be.boolean),legacyInterceptorReqResOrdering:Be.transitional(Be.boolean)},!1),i!=null&&(S.isFunction(i)?n.paramsSerializer={serialize:i}:zi.assertOptions(i,{encode:Be.function,serialize:Be.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zi.assertOptions(n,{baseUrl:Be.spelling("baseURL"),withXsrfToken:Be.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&S.merge(o.common,o[n.method]);o&&S.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=De.concat(s,o);const l=[];let a=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;a=a&&v.synchronous;const w=n.transitional||La;w&&w.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,p;if(!a){const d=[pc.bind(this),void 0];for(d.unshift(...l),d.push(...u),p=d.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,l){r.reason||(r.reason=new ti(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Tp(function(i){t=i}),cancel:t}}};function V0(e){return function(n){return e.apply(null,n)}}function H0(e){return S.isObject(e)&&e.isAxiosError===!0}const Cl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Cl).forEach(([e,t])=>{Cl[t]=e});function Np(e){const t=new an(e),n=cp(an.prototype.request,t);return S.extend(n,an.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Np(hn(e,i))},n}const re=Np(ei);re.Axios=an;re.CanceledError=ti;re.CancelToken=B0;re.isCancel=Ep;re.VERSION=Lp;re.toFormData=zo;re.AxiosError=A;re.Cancel=re.CanceledError;re.all=function(t){return Promise.all(t)};re.spread=V0;re.isAxiosError=H0;re.mergeConfig=hn;re.AxiosHeaders=De;re.formToJSON=e=>xp(S.isHTMLForm(e)?new FormData(e):e);re.getAdapter=_p.getAdapter;re.HttpStatusCode=Cl;re.default=re;const{Axios:d1,AxiosError:p1,CanceledError:h1,isCancel:m1,CancelToken:g1,VERSION:y1,all:v1,Cancel:w1,isAxiosError:S1,spread:k1,toFormData:x1,AxiosHeaders:E1,HttpStatusCode:C1,formToJSON:P1,getAdapter:O1,mergeConfig:R1}=re,_1=5e5,Q=re.create({baseURL:"",timeout:3e4,withCredentials:!0,headers:{"Content-Type":"application/json"}});Q.interceptors.request.use(e=>{const t=localStorage.getItem("dist_user_id");return t&&(e.headers["New-Api-User"]=t),e});Q.interceptors.response.use(e=>(e.data&&e.data.success===!1&&e.data.message&&hs.error(e.data.message),e),e=>{var n,r,i;const t=((r=(n=e.response)==null?void 0:n.data)==null?void 0:r.message)||e.message||"Request failed";return((i=e.response)==null?void 0:i.status)===401?(localStorage.removeItem("dist_user_id"),window.dispatchEvent(new Event("auth:logout")),hs.error("Session expired, please log in again")):hs.error(t),Promise.reject(e)});const K0=()=>Q.get("/api/dist/site/info"),L1=()=>Q.get("/api/dist/site/models"),T1=()=>Q.get("/api/dist/site/packages"),W0=e=>Q.post("/api/dist/user/register",e),Q0=e=>Q.post("/api/dist/user/login",e),q0=()=>Q.post("/api/dist/user/logout"),ws=()=>Q.get("/api/dist/user/self"),N1=()=>Q.get("/api/dist/user/usage"),A1=()=>Q.get("/api/dist/token/list"),I1=e=>Q.post("/api/dist/token/create",e),D1=(e,t)=>Q.put(`/api/dist/token/${e}`,t),F1=e=>Q.delete(`/api/dist/token/${e}`),j1=e=>Q.post("/api/dist/topup/redeem",{key:e}),$1=e=>Q.post("/api/dist/package/subscribe",{package_id:e}),z1=()=>Q.get("/api/dist/package/subscriptions"),U1=()=>Q.get("/api/dist/topup/info"),M1=e=>Q.post("/api/dist/topup/amount",e),b1=e=>Q.post("/api/dist/topup/pay",e),B1=e=>Q.post("/api/dist/topup/stripe/pay",e),V1=e=>Q.post("/api/dist/topup/creem/pay",e),H1=e=>Q.post("/api/dist/topup/crypto/pay",e),K1=e=>Q.get(`/api/dist/topup/crypto/status?trade_no=${e}`),W1=e=>Q.get("/api/dist/topup/history",{params:e}),Ap=x.createContext(null);function J0({children:e}){const[t,n]=x.useState(null),[r,i]=x.useState(!0),o=x.useCallback(async()=>{try{const u=await ws();if(u.data.success)return n(u.data.data),u.data.data}catch{}return null},[]);x.useEffect(()=>{localStorage.getItem("dist_user_id")?ws().then(c=>{c.data.success?n(c.data.data):localStorage.removeItem("dist_user_id")}).catch(()=>{localStorage.removeItem("dist_user_id")}).finally(()=>i(!1)):i(!1)},[]),x.useEffect(()=>{const u=()=>{n(null)};return window.addEventListener("auth:logout",u),()=>window.removeEventListener("auth:logout",u)},[]);const s=x.useCallback(async(u,c)=>{const f=await Q0({username:u,password:c});if(f.data.success){const p=f.data.data;p!=null&&p.id&&localStorage.setItem("dist_user_id",String(p.id));const y=await ws();return y.data.success?n(y.data.data):n(p),{success:!0}}return{success:!1,message:f.data.message}},[]),l=x.useCallback(async u=>{const c=await W0(u);return c.data.success?{success:!0,needsLogin:!0}:{success:!1,message:c.data.message}},[]),a=x.useCallback(async()=>{try{await q0()}catch{}localStorage.removeItem("dist_user_id"),n(null)},[]);return I.jsx(Ap.Provider,{value:{user:t,loading:r,login:s,register:l,logout:a,refreshUser:o},children:e})}function Y0(){const e=x.useContext(Ap);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}function G0(){const{user:e,loading:t}=Y0(),n=Gn();return t?I.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:I.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):e?I.jsx(cy,{}):I.jsx(np,{to:"/login",state:{from:n},replace:!0})}const Ip=x.createContext(null);function X0({children:e}){const[t,n]=x.useState(null),[r,i]=x.useState(!0);return x.useEffect(()=>{K0().then(o=>{var s,l;if(o.data.success&&(n(o.data.data),(s=o.data.data)!=null&&s.name&&(document.title=o.data.data.name),(l=o.data.data)!=null&&l.favicon)){const a=document.querySelector("link[rel~='icon']")||document.createElement("link");a.rel="icon",a.href=o.data.data.favicon,document.head.appendChild(a)}}).catch(()=>{}).finally(()=>i(!1))},[]),I.jsx(Ip.Provider,{value:{site:t,loading:r},children:e})}function Z0(){const e=x.useContext(Ip);if(!e)throw new Error("useSite must be used within SiteProvider");return e}const Dp=x.createContext(null),mc={starter:{Home:ye.lazy(()=>ee(()=>import("./Home-BVEmtewU.js"),__vite__mapDeps([0,1,2,3,4]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-B2Isp14g.js"),__vite__mapDeps([5,6,4])))},default:{Home:ye.lazy(()=>ee(()=>import("./Home-jHukPhWm.js"),__vite__mapDeps([7,1,2,3,4]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-kkdZeTHc.js"),__vite__mapDeps([8,6,4])))},dark:{Home:ye.lazy(()=>ee(()=>import("./Home-BuMqQaGJ.js"),__vite__mapDeps([9,1,2,3,4]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-DltGFkEN.js"),__vite__mapDeps([10,6,4])))},minimal:{Home:ye.lazy(()=>ee(()=>import("./Home-Ji7N4uDe.js"),__vite__mapDeps([11,1,2,3,4]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-Dvtbvg20.js"),__vite__mapDeps([12,6,4])))},clean:{Home:ye.lazy(()=>ee(()=>import("./Home-BJajDktc.js"),__vite__mapDeps([13,1,2,3,4]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-NPp3SVTh.js"),__vite__mapDeps([14,6,4])))},corporate:{Home:ye.lazy(()=>ee(()=>import("./Home-jCVAuf09.js"),__vite__mapDeps([15,1,2,3,4]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-rCXoKNs7.js"),__vite__mapDeps([16,6,4])))},claude:{Home:ye.lazy(()=>ee(()=>import("./Home-KZsq5hsI.js"),__vite__mapDeps([17,1,2,3,4]))),Layout:ye.lazy(()=>ee(()=>import("./Layout-nk7MlPO7.js"),__vite__mapDeps([18,6,4])))}};function ew(){return I.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-950",children:I.jsx("div",{className:"w-8 h-8 border-2 border-white/20 border-t-white/70 rounded-full animate-spin"})})}function tw({children:e}){const{site:t,loading:n}=Z0();if(n)return I.jsx(ew,{});const r=(t==null?void 0:t.theme_template)||"starter";return I.jsx(nw,{themeName:r,children:e})}function nw({themeName:e,children:t}){const n=x.useMemo(()=>{const r=mc[e]||mc.starter;return{name:e,...r}},[e]);return I.jsx(Dp.Provider,{value:n,children:t})}function rw(){const e=x.useContext(Dp);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const iw=x.lazy(()=>ee(()=>import("./Login-C6BPG0T7.js"),__vite__mapDeps([19,4]))),ow=x.lazy(()=>ee(()=>import("./Register-DYiVAcZJ.js"),__vite__mapDeps([20,4]))),sw=x.lazy(()=>ee(()=>import("./Dashboard-IbzjFIoV.js"),__vite__mapDeps([21,2,4]))),lw=x.lazy(()=>ee(()=>import("./Tokens-BdD2zQiB.js"),__vite__mapDeps([22,4]))),aw=x.lazy(()=>ee(()=>import("./Packages-BOtvAbP1.js"),__vite__mapDeps([23,1,4]))),uw=x.lazy(()=>ee(()=>import("./Pricing-EipPrIaV.js"),__vite__mapDeps([24,4]))),cw=x.lazy(()=>ee(()=>import("./Topup-bHBPVOgP.js"),__vite__mapDeps([25,2,4]))),fw=()=>I.jsx("div",{className:"flex items-center justify-center min-h-screen",children:I.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})});function dw(){const{Home:e,Layout:t}=rw();return I.jsx(x.Suspense,{fallback:I.jsx(fw,{}),children:I.jsxs(dy,{children:[I.jsxs(Ve,{element:I.jsx(t,{}),children:[I.jsx(Ve,{path:"/",element:I.jsx(e,{})}),I.jsx(Ve,{path:"/pricing",element:I.jsx(uw,{})}),I.jsx(Ve,{path:"/packages",element:I.jsx(aw,{})}),I.jsx(Ve,{path:"/login",element:I.jsx(iw,{})}),I.jsx(Ve,{path:"/register",element:I.jsx(ow,{})}),I.jsxs(Ve,{element:I.jsx(G0,{}),children:[I.jsx(Ve,{path:"/dashboard",element:I.jsx(sw,{})}),I.jsx(Ve,{path:"/tokens",element:I.jsx(lw,{})}),I.jsx(Ve,{path:"/topup",element:I.jsx(cw,{})})]})]}),I.jsx(Ve,{path:"*",element:I.jsx(np,{to:"/",replace:!0})})]})})}function pw(){return I.jsx(tw,{children:I.jsx(dw,{})})}const D=e=>typeof e=="string",ar=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},gc=e=>e==null?"":""+e,hw=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},mw=/###/g,yc=e=>e&&e.indexOf("###")>-1?e.replace(mw,"."):e,vc=e=>!e||D(e),xr=(e,t,n)=>{const r=D(t)?t.split("."):t;let i=0;for(;i{const{obj:r,k:i}=xr(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],s=t.slice(0,t.length-1),l=xr(e,s,Object);for(;l.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),l=xr(e,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},gw=(e,t,n,r)=>{const{obj:i,k:o}=xr(e,t,Object);i[o]=i[o]||[],i[o].push(n)},po=(e,t)=>{const{obj:n,k:r}=xr(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},yw=(e,t,n)=>{const r=po(e,n);return r!==void 0?r:po(t,n)},Fp=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?D(e[r])||e[r]instanceof String||D(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Fp(e[r],t[r],n):e[r]=t[r]);return e},Xt=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var vw={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ww=e=>D(e)?e.replace(/[&<>"'\/]/g,t=>vw[t]):e;class Sw{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const kw=[" ",",","?","!",";"],xw=new Sw(20),Ew=(e,t,n)=>{t=t||"",n=n||"";const r=kw.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=xw.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o},Pl=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o-1&&ae==null?void 0:e.replace(/_/g,"-"),Cw={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class ho{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Cw,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(D(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new ho(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ho(this.logger,t)}}var at=new ho;class Mo{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,o])=>{for(let s=0;s{for(let s=0;s-1&&this.options.ns.splice(n,1)}getResource(t,n,r,i={}){var u,c;const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):D(r)&&o?l.push(...r.split(o)):l.push(r)));const a=po(this.data,l);return!a&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),a||!s||!D(r)?a:Pl((c=(u=this.data)==null?void 0:u[t])==null?void 0:c[n],r,o)}addResource(t,n,r,i,o={silent:!1}){const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(l=t.split("."),i=n,n=l[1]),this.addNamespaces(n),wc(this.data,l,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r,i={silent:!1}){for(const o in r)(D(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o,s={silent:!1,skipCopy:!1}){let l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),i=r,r=n,n=l[1]),this.addNamespaces(n);let a=po(this.data,l)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Fp(a,r,o):a={...a,...r},wc(this.data,l,a),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var jp={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{var s;t=((s=this.processors[o])==null?void 0:s.process(t,n,r,i))??t}),t}};const $p=Symbol("i18next/PATH_KEY");function Pw(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>{var o;return(o=n==null?void 0:n.revoke)==null||o.call(n),i===$p?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Er(e,t){const{[$p]:n}=e(Pw()),r=(t==null?void 0:t.keySeparator)??".",i=(t==null?void 0:t.nsSeparator)??":";if(n.length>1&&i){const o=t==null?void 0:t.ns,s=Array.isArray(o)?o:null;if(s&&s.length>1&&s.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}const kc={},Ss=e=>!D(e)&&typeof e!="boolean"&&typeof e!="number";class mo extends Mo{constructor(t,n={}){super(),hw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=at.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const i=this.resolve(t,r);if((i==null?void 0:i.res)===void 0)return!1;const o=Ss(i.res);return!(r.returnObjects===!1&&o)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Ew(t,r,i);if(s&&!l){const a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:D(o)?[o]:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return{key:t,namespaces:D(o)?[o]:o}}translate(t,n,r){let i=typeof n=="object"?{...n}:n;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),t==null)return"";typeof t=="function"&&(t=Er(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(V=>typeof V=="function"?Er(V,{...this.options,...i}):String(V));const o=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:l,namespaces:a}=this.extractFromKey(t[t.length-1],i),u=a[a.length-1];let c=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const f=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return p?o?{res:`${u}${c}${l}`,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${c}${l}`:o?{res:l,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:l;const y=this.resolve(t,i);let d=y==null?void 0:y.res;const v=(y==null?void 0:y.usedKey)||l,w=(y==null?void 0:y.exactUsedKey)||l,m=["[object Number]","[object Function]","[object RegExp]"],h=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,k=i.count!==void 0&&!D(i.count),E=mo.hasDefaultValue(i),R=k?this.pluralResolver.getSuffix(f,i.count,i):"",P=i.ordinal&&k?this.pluralResolver.getSuffix(f,i.count,{ordinal:!1}):"",L=k&&!i.ordinal&&i.count===0,$=L&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${R}`]||i[`defaultValue${P}`]||i.defaultValue;let T=d;g&&!d&&E&&(T=$);const pe=Ss(T),be=Object.prototype.toString.apply(T);if(g&&T&&pe&&m.indexOf(be)<0&&!(D(h)&&Array.isArray(T))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const V=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,T,{...i,ns:a}):`key '${l} (${this.language})' returned an object instead of string.`;return o?(y.res=V,y.usedParams=this.getUsedParamsDetails(i),y):V}if(s){const V=Array.isArray(T),X=V?[]:{},Yt=V?w:v;for(const b in T)if(Object.prototype.hasOwnProperty.call(T,b)){const he=`${Yt}${s}${b}`;E&&!d?X[b]=this.translate(he,{...i,defaultValue:Ss($)?$[b]:void 0,joinArrays:!1,ns:a}):X[b]=this.translate(he,{...i,joinArrays:!1,ns:a}),X[b]===he&&(X[b]=T[b])}d=X}}else if(g&&D(h)&&Array.isArray(d))d=d.join(h),d&&(d=this.extendTranslation(d,t,i,r));else{let V=!1,X=!1;!this.isValidLookup(d)&&E&&(V=!0,d=$),this.isValidLookup(d)||(X=!0,d=l);const b=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&X?void 0:d,he=E&&$!==d&&this.options.updateMissing;if(X||V||he){if(this.logger.log(he?"updateKey":"missingKey",f,u,l,he?$:d),s){const F=this.resolve(l,{...i,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let O=[];const N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&N&&N[0])for(let F=0;F{var ft;const ke=E&&Re!==d?Re:b;this.options.missingKeyHandler?this.options.missingKeyHandler(F,u,U,ke,he,i):(ft=this.backendConnector)!=null&&ft.saveMissing&&this.backendConnector.saveMissing(F,u,U,ke,he,i),this.emit("missingKey",F,u,U,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?O.forEach(F=>{const U=this.pluralResolver.getSuffixes(F,i);L&&i[`defaultValue${this.options.pluralSeparator}zero`]&&U.indexOf(`${this.options.pluralSeparator}zero`)<0&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(Re=>{j([F],l+Re,i[`defaultValue${Re}`]||$)})}):j(O,l,$))}d=this.extendTranslation(d,t,i,y,r),X&&d===l&&this.options.appendNamespaceToMissingKey&&(d=`${u}${c}${l}`),(X||V)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${l}`:l,V?d:void 0,i))}return o?(y.res=d,y.usedParams=this.getUsedParamsDetails(i),y):d}extendTranslation(t,n,r,i,o){var a,u;if((a=this.i18nFormat)!=null&&a.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=D(t)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(c){const y=t.match(this.interpolator.nestingRegexp);f=y&&y.length}let p=r.replace&&!D(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||i.usedLng,r),c){const y=t.match(this.interpolator.nestingRegexp),d=y&&y.length;f(o==null?void 0:o[0])===y[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`),null):this.translate(...y,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,l=D(s)?[s]:s;return t!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(t=jp.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,i,o,s,l;return D(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(a=>typeof a=="function"?Er(a,{...this.options,...n}):a)),t.forEach(a=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(a,n),c=u.key;i=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=n.count!==void 0&&!D(n.count),y=p&&!n.ordinal&&n.count===0,d=n.context!==void 0&&(D(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(w=>{var m,h;this.isValidLookup(r)||(l=w,!kc[`${v[0]}-${w}`]&&((m=this.utils)!=null&&m.hasLoadedNamespace)&&!((h=this.utils)!=null&&h.hasLoadedNamespace(l))&&(kc[`${v[0]}-${w}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(g=>{var R;if(this.isValidLookup(r))return;s=g;const k=[c];if((R=this.i18nFormat)!=null&&R.addLookupKeys)this.i18nFormat.addLookupKeys(k,c,g,w,n);else{let P;p&&(P=this.pluralResolver.getSuffix(g,n.count,n));const L=`${this.options.pluralSeparator}zero`,$=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(n.ordinal&&P.indexOf($)===0&&k.push(c+P.replace($,this.options.pluralSeparator)),k.push(c+P),y&&k.push(c+L)),d){const T=`${c}${this.options.contextSeparator||"_"}${n.context}`;k.push(T),p&&(n.ordinal&&P.indexOf($)===0&&k.push(T+P.replace($,this.options.pluralSeparator)),k.push(T+P),y&&k.push(T+L))}}let E;for(;E=k.pop();)this.isValidLookup(r)||(o=E,r=this.getResource(g,w,E,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,i={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!D(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class xc{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=at.create("languageUtils")}getScriptPartFromCode(t){if(t=Hr(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Hr(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(D(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getScriptPartFromCode(r);if(this.isSupportedCode(i))return n=i;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(s=>{if(s===o)return s;if(!(s.indexOf("-")<0&&o.indexOf("-")<0)&&(s.indexOf("-")>0&&o.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===o||s.indexOf(o)===0&&o.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),D(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return D(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):D(t)&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}const Ec={zero:0,one:1,two:2,few:3,many:4,other:5},Cc={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Ow{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=at.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Hr(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Cc;if(!t.match(/-|_/))return Cc;const a=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(a,n)}return this.pluralRulesCache[o]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>Ec[i]-Ec[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n,r={}){const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const Pc=(e,t,n,r=".",i=!0)=>{let o=yw(e,t,n);return!o&&i&&D(n)&&(o=Pl(e,n,r),o===void 0&&(o=Pl(t,n,r))),o},ks=e=>e.replace(/\$/g,"$$$$");class Oc{constructor(t={}){var n;this.logger=at.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:l,suffixEscaped:a,formatSeparator:u,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:p,nestingPrefixEscaped:y,nestingSuffix:d,nestingSuffixEscaped:v,nestingOptionsSeparator:w,maxReplaces:m,alwaysFormat:h}=t.interpolation;this.escape=n!==void 0?n:ww,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Xt(o):s||"{{",this.suffix=l?Xt(l):a||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=p?Xt(p):y||Xt("$t("),this.nestingSuffix=d?Xt(d):v||Xt(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=m||1e3,this.alwaysFormat=h!==void 0?h:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,i){var y;let o,s,l;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=d=>{if(d.indexOf(this.formatSeparator)<0){const h=Pc(n,a,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(h,void 0,r,{...i,...n,interpolationkey:d}):h}const v=d.split(this.formatSeparator),w=v.shift().trim(),m=v.join(this.formatSeparator).trim();return this.format(Pc(n,a,w,this.options.keySeparator,this.options.ignoreJSONStructure),m,r,{...i,...n,interpolationkey:w})};this.resetRegExp();const c=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((y=i==null?void 0:i.interpolation)==null?void 0:y.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>ks(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?ks(this.escape(d)):ks(d)}].forEach(d=>{for(l=0;o=d.regex.exec(t);){const v=o[1].trim();if(s=u(v),s===void 0)if(typeof c=="function"){const m=c(t,o,i);s=D(m)?m:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))s="";else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),s="";else!D(s)&&!this.useRawValueToEscape&&(s=gc(s));const w=d.safeValue(s);if(t=t.replace(o[0],w),f?(d.regex.lastIndex+=s.length,d.regex.lastIndex-=o[0].length):d.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n,r={}){let i,o,s;const l=(a,u)=>{const c=this.nestingOptionsSeparator;if(a.indexOf(c)<0)return a;const f=a.split(new RegExp(`${Xt(c)}[ ]*{`));let p=`{${f[1]}`;a=f[0],p=this.interpolate(p,s);const y=p.match(/'/g),d=p.match(/"/g);(((y==null?void 0:y.length)??0)%2===0&&!d||((d==null?void 0:d.length)??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),u&&(s={...u,...s})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${a}`,v),`${a}${c}${p}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,a};for(;i=this.nestingRegexp.exec(t);){let a=[];s={...r},s=s.replace&&!D(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(u!==-1&&(a=i[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),o=n(l.call(this,i[1].trim(),s),s),o&&i[0]===t&&!D(o))return o;D(o)||(o=gc(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),a.length&&(o=a.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const Rw=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(s){const[l,...a]=s.split(":"),u=a.join(":").trim().replace(/^'+|'+$/g,""),c=l.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Rc=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=r+JSON.stringify(o);let l=t[s];return l||(l=e(Hr(r),i),t[s]=l),l(n)}},_w=e=>(t,n,r)=>e(Hr(n),r)(t);class Lw{constructor(t={}){this.logger=at.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Rc:_w;this.formats={number:r((i,o)=>{const s=new Intl.NumberFormat(i,{...o});return l=>s.format(l)}),currency:r((i,o)=>{const s=new Intl.NumberFormat(i,{...o,style:"currency"});return l=>s.format(l)}),datetime:r((i,o)=>{const s=new Intl.DateTimeFormat(i,{...o});return l=>s.format(l)}),relativetime:r((i,o)=>{const s=new Intl.RelativeTimeFormat(i,{...o});return l=>s.format(l,o.range||"day")}),list:r((i,o)=>{const s=new Intl.ListFormat(i,{...o});return l=>s.format(l)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Rc(n)}format(t,n,r,i={}){const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(l=>l.indexOf(")")>-1)){const l=o.findIndex(a=>a.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,a)=>{var f;const{formatName:u,formatOptions:c}=Rw(a);if(this.formats[u]){let p=l;try{const y=((f=i==null?void 0:i.formatParams)==null?void 0:f[i.interpolationkey])||{},d=y.locale||y.lng||i.locale||i.lng||r;p=this.formats[u](l,d,{...c,...i,...y})}catch(y){this.logger.warn(y)}return p}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const Tw=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Nw extends Mo{constructor(t,n,r,i={}){var o,s;super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=at.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(s=(o=this.backend)==null?void 0:o.init)==null||s.call(o,r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},l={},a={};return t.forEach(u=>{let c=!0;n.forEach(f=>{const p=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,c=!1,s[p]===void 0&&(s[p]=!0),o[p]===void 0&&(o[p]=!0),a[f]===void 0&&(a[f]=!0)))}),c||(l[u]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(a)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),!n&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(a=>{gw(a.loaded,[o],s),Tw(a,t),n&&a.errors.push(n),a.pendingCount===0&&!a.done&&(Object.keys(a.loaded).forEach(u=>{l[u]||(l[u]={});const c=a.loaded[u];c.length&&c.forEach(f=>{l[u][f]===void 0&&(l[u][f]=!0)})}),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(a=>!a.done)}read(t,n,r,i=0,o=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const l=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&c&&i{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(u,c)},a=this.backend[r].bind(this.backend);if(a.length===2){try{const u=a(t,n);u&&typeof u.then=="function"?u.then(c=>l(null,c)).catch(l):l(null,u)}catch(u){l(u)}return}return a(t,n,l)}prepareLoading(t,n,r={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();D(t)&&(t=this.languageUtils.toResolveHierarchy(t)),D(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,l),this.loaded(t,s,l)})}saveMissing(t,n,r,i,o,s={},l=()=>{}){var a,u,c,f,p;if((u=(a=this.services)==null?void 0:a.utils)!=null&&u.hasLoadedNamespace&&!((f=(c=this.services)==null?void 0:c.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((p=this.backend)!=null&&p.create){const y={...s,isUpdate:o},d=this.backend.create.bind(this.backend);if(d.length<6)try{let v;d.length===5?v=d(t,n,r,i,y):v=d(t,n,r,i),v&&typeof v.then=="function"?v.then(w=>l(null,w)).catch(l):l(null,v)}catch(v){l(v)}else d(t,n,r,i,l,y)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const xs=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),D(e[1])&&(t.defaultValue=e[1]),D(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_c=e=>{var t,n;return D(e.ns)&&(e.ns=[e.ns]),D(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),D(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},xi=()=>{},Aw=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})},zp="__i18next_supportNoticeShown",Iw=()=>typeof globalThis<"u"&&!!globalThis[zp],Dw=()=>{typeof globalThis<"u"&&(globalThis[zp]=!0)},Fw=e=>{var t,n,r,i,o,s,l,a,u,c,f,p,y;return!!(((r=(n=(t=e==null?void 0:e.modules)==null?void 0:t.backend)==null?void 0:n.name)==null?void 0:r.indexOf("Locize"))>0||((l=(s=(o=(i=e==null?void 0:e.modules)==null?void 0:i.backend)==null?void 0:o.constructor)==null?void 0:s.name)==null?void 0:l.indexOf("Locize"))>0||(u=(a=e==null?void 0:e.options)==null?void 0:a.backend)!=null&&u.backends&&e.options.backend.backends.some(d=>{var v,w,m;return((v=d==null?void 0:d.name)==null?void 0:v.indexOf("Locize"))>0||((m=(w=d==null?void 0:d.constructor)==null?void 0:w.name)==null?void 0:m.indexOf("Locize"))>0})||(f=(c=e==null?void 0:e.options)==null?void 0:c.backend)!=null&&f.projectId||(y=(p=e==null?void 0:e.options)==null?void 0:p.backend)!=null&&y.backendOptions&&e.options.backend.backendOptions.some(d=>d==null?void 0:d.projectId))};class Cr extends Mo{constructor(t={},n){if(super(),this.options=_c(t),this.services={},this.logger=at,this.modules={external:[]},Aw(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(D(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=xs();this.options={...r,...this.options,..._c(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Fw(this)&&!Iw()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),Dw());const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?at.init(i(this.modules.logger),this.options):at.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Lw;const c=new xc(this.options);this.store=new Sc(this.options.resources,this.options);const f=this.services;f.logger=at,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new Ow(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=i(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Oc(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Nw(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(y,...d)=>{this.emit(y,...d)}),this.modules.languageDetector&&(f.languageDetector=i(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=i(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new mo(this.services,this.options),this.translator.on("*",(y,...d)=>{this.emit(y,...d)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,n||(n=xi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const l=ar(),a=()=>{const u=(c,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),n(c,f)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),l}loadResources(t,n=xi){var o,s;let r=n;const i=D(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const l=[],a=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&l.indexOf(f)<0&&l.push(f)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),(s=(o=this.options.preload)==null?void 0:o.forEach)==null||s.call(o,u=>a(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const i=ar();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=xi),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&jp.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=ar();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,a)=>{a?this.isLanguageChangingTo===t&&(i(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(l,(...u)=>this.t(...u))},s=l=>{var c,f;!t&&!l&&this.services.languageDetector&&(l=[]);const a=D(l)?l:l&&l[0],u=this.store.hasLanguageSomeTranslations(a)?a:this.services.languageUtils.getBestMatchFromCodes(D(l)?[l]:l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),(f=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||f.call(c,u)),this.loadResources(u,p=>{o(p,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r){const i=(o,s,...l)=>{let a;typeof s!="object"?a=this.options.overloadTranslationOptionHandler([o,s].concat(l)):a={...s},a.lng=a.lng||i.lng,a.lngs=a.lngs||i.lngs,a.ns=a.ns||i.ns,a.keyPrefix!==""&&(a.keyPrefix=a.keyPrefix||r||i.keyPrefix);const u={...this.options,...a},c=this.options.keySeparator||".";let f;return a.keyPrefix&&Array.isArray(o)?f=o.map(p=>(typeof p=="function"&&(p=Er(p,u)),`${a.keyPrefix}${c}${p}`)):(typeof o=="function"&&(o=Er(o,u)),f=a.keyPrefix?`${a.keyPrefix}${c}${o}`:o),this.t(f,a)};return D(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(l,a)=>{const u=this.services.backendConnector.state[`${l}|${a}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=ar();return this.options.ns?(D(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ar();D(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var i,o;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const s=new Intl.Locale(t);if(s&&s.getTextInfo){const l=s.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((o=this.services)==null?void 0:o.languageUtils)||new xc(xs());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new Cr(t,n);return r.createInstance=Cr.createInstance,r}cloneInstance(t={},n=xi){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Cr(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const l=Object.keys(this.store.data).reduce((a,u)=>(a[u]={...this.store.data[u]},a[u]=Object.keys(a[u]).reduce((c,f)=>(c[f]={...a[u][f]},c),a[u]),a),{});o.store=new Sc(l,i),o.services.resourceStore=o.store}if(t.interpolation){const a={...xs().interpolation,...this.options.interpolation,...t.interpolation},u={...i,interpolation:a};o.services.interpolator=new Oc(u)}return o.translator=new mo(o.services,i),o.translator.on("*",(l,...a)=>{o.emit(l,...a)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Oe=Cr.createInstance();Oe.createInstance;Oe.dir;Oe.init;Oe.loadResources;Oe.reloadResources;Oe.use;Oe.changeLanguage;Oe.getFixedT;Oe.t;Oe.exists;Oe.setDefaultNamespace;Oe.hasLoadedNamespace;Oe.loadNamespaces;Oe.loadLanguages;const jw=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,$w={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},zw=e=>$w[e],Uw=e=>e.replace(jw,zw);let Ol={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Uw,transDefaultProps:void 0};const Mw=(e={})=>{Ol={...Ol,...e}},Q1=()=>Ol;let Up;const bw=e=>{Up=e},q1=()=>Up,Bw={type:"3rdParty",init(e){Mw(e.options.react),bw(e)}},{slice:Vw,forEach:Hw}=[];function Kw(e){return Hw.call(Vw.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Ww(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const Lc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Qw=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!Lc.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!Lc.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},Tc={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Qw(e,t,i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let l=0;l0&&s[l].substring(0,a)===t&&(n=s[l].substring(a+1))}}return n}},Yw={name:"hash",lookup(e){var i;let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const s=o.substring(1);if(t){const l=s.split("&");for(let a=0;a0&&l[a].substring(0,u)===t&&(r=l[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const l=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?(i=l[typeof n=="number"?n:0])==null?void 0:i.replace("/",""):void 0}}}return r}};let vn=null;const Nc=()=>{if(vn!==null)return vn;try{if(vn=typeof window<"u"&&window.localStorage!==null,!vn)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{vn=!1}return vn};var Gw={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Nc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Nc()&&window.localStorage.setItem(n,e)}};let wn=null;const Ac=()=>{if(wn!==null)return wn;try{if(wn=typeof window<"u"&&window.sessionStorage!==null,!wn)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{wn=!1}return wn};var Xw={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Ac())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Ac()&&window.sessionStorage.setItem(n,e)}},Zw={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o0?t:void 0}},e1={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},t1={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},n1={name:"subdomain",lookup(e){var i,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(i=window.location)==null?void 0:i.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let Mp=!1;try{document.cookie,Mp=!0}catch{}const bp=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Mp||bp.splice(1,1);const r1=()=>({order:bp,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Bp{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Kw(n,this.options||{},r1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(qw),this.addDetector(Jw),this.addDetector(Gw),this.addDetector(Xw),this.addDetector(Zw),this.addDetector(e1),this.addDetector(t1),this.addDetector(n1),this.addDetector(Yw)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.filter(r=>r!=null&&!Ww(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Bp.type="languageDetector";const i1={"nav.home":"Home","nav.pricing":"Pricing","nav.packages":"Packages","nav.dashboard":"Dashboard","nav.apiKeys":"API Keys","nav.login":"Login","nav.signUp":"Sign Up","nav.logout":"Logout","nav.contact":"Contact","home.heroSubtitle":"Access the world's most powerful AI models through a single API endpoint. Simple, affordable, reliable.","home.getStarted":"Get Started Free","home.viewPricing":"View Pricing","home.goToDashboard":"Go to Dashboard","home.aiModels":"AI Models","home.uptime":"Uptime","home.latency":"Latency","home.whyChooseUs":"Why Choose Us","home.whyChooseUsDesc":"Everything you need to build AI-powered applications","home.lightningFast":"Lightning Fast","home.lightningFastDesc":"Optimized routing and caching deliver responses with minimal latency. Load-balanced across multiple providers for maximum reliability.","home.securePrivate":"Secure & Private","home.securePrivateDesc":"Enterprise-grade security with encrypted API keys. No request logging by default. Your data stays your data.","home.payAsYouGo":"Pay As You Go","home.payAsYouGoDesc":"Transparent pricing with no hidden fees. Only pay for what you use. Multiple top-up options and subscription packages available.","home.availableModels":"Available Models","home.availableModelsDesc":"Access {{count}} AI models through a unified API","home.viewAllModels":"View all {{count}} models","home.plansPackages":"Plans & Packages","home.choosePlan":"Choose a plan that fits your needs","home.subscribe":"Subscribe","home.days":"{{count}} days","home.readyToStart":"Ready to Get Started?","home.readyToStartDesc":"Create your account and start building with AI in minutes. No credit card required.","home.createFreeAccount":"Create Free Account","home.signIn":"Sign In","home.defaultHeroTitle":"AI API Platform","login.welcomeBack":"Welcome Back","login.signInTo":"Sign in to {{name}}","login.signInToDefault":"Sign in to your account","login.username":"Username","login.password":"Password","login.enterUsername":"Enter your username","login.enterPassword":"Enter your password","login.signingIn":"Signing in...","login.signInBtn":"Sign In","login.noAccount":"Don't have an account?","login.createOne":"Create one","login.fillAllFields":"Please fill in all fields","login.welcomeBackToast":"Welcome back!","register.createAccount":"Create Account","register.getStartedWith":"Get started with {{name}}","register.getStartedDefault":"Get started with our platform","register.username":"Username","register.email":"Email","register.password":"Password","register.confirmPassword":"Confirm Password","register.chooseUsername":"Choose a username","register.emailPlaceholder":"your@email.com (optional)","register.passwordPlaceholder":"8-20 characters","register.repeatPassword":"Repeat your password","register.creating":"Creating...","register.createAccountBtn":"Create Account","register.hasAccount":"Already have an account?","register.signIn":"Sign in","register.fillRequired":"Please fill in all required fields","register.passwordMismatch":"Passwords do not match","register.passwordLength":"Password must be 8-20 characters","register.accountCreated":"Account created! Please sign in.","dashboard.welcome":"Welcome,","dashboard.manageDesc":"Manage your API usage, keys, and account","dashboard.balance":"Balance","dashboard.quotaUnits":"{{count}} quota units","dashboard.used":"Used","dashboard.totalRequests":"Total Requests","dashboard.redeemCode":"Redeem Code","dashboard.enterCode":"Enter redemption code","dashboard.redeeming":"Redeeming...","dashboard.redeem":"Redeem","dashboard.redeemSuccess":"Code redeemed successfully!","dashboard.quickLinks":"Quick Links","dashboard.apiKeys":"API Keys","dashboard.manageKeys":"Manage your keys","dashboard.packages":"Packages","dashboard.viewPlans":"View plans","dashboard.pricing":"Pricing","dashboard.modelPrices":"Model prices","dashboard.apiDocs":"API Docs","dashboard.comingSoon":"Coming soon","tokens.title":"API Keys","tokens.subtitle":"Manage your API access tokens","tokens.newKey":"+ New Key","tokens.createApiKey":"Create API Key","tokens.name":"Name","tokens.namePlaceholder":"e.g. my-app-key","tokens.cancel":"Cancel","tokens.creating":"Creating...","tokens.create":"Create","tokens.newApiKey":"Your New API Key","tokens.keyWarning":"This is the only time you'll see this key. Copy it now and store it securely.","tokens.copied":"Copied!","tokens.copy":"Copy","tokens.copiedToClipboard":"Copied to clipboard!","tokens.savedKey":"I've saved my key","tokens.deleteToken":"Delete Token","tokens.deleteConfirm":'Delete "{{name}}"? This cannot be undone.',"tokens.delete":"Delete","tokens.noKeys":"No API keys yet","tokens.createFirst":"Create Your First Key","tokens.enabled":"Enabled","tokens.disabled":"Disabled","tokens.tokenDisabled":"Token disabled","tokens.tokenEnabled":"Token enabled","tokens.tokenDeleted":"Token deleted","tokens.enterName":"Please enter a name","tokens.quickStart":"Quick Start","tokens.quickStartComment":"# Use your API key with OpenAI-compatible endpoint","config.title":"Config File Export","config.subtitle":"Select your API Key and model to generate config files","config.selectKey":"Select API Key","config.selectModel":"Select Model","config.selectTool":"Select Tool","config.copy":"Copy","config.download":"Download","config.copied":"Copied to clipboard!","config.downloaded":"Config file downloaded","config.loading":"Loading...","config.loginPrompt":"Log in to generate your config","config.loginDesc":"Select your API Key and model to auto-fill config files","config.searchModel":"Search models...","config.noModelMatch":"No models match your search","pricing.title":"Model Pricing","pricing.subtitle":"Transparent, pay-as-you-go pricing for all available models. Prices shown per 1M tokens.","pricing.searchPlaceholder":"Search models...","pricing.noMatch":"No models match your search","pricing.noModels":"No models available","pricing.model":"Model","pricing.inputPrice":"Input / 1M tokens","pricing.outputPrice":"Output / 1M tokens","pricing.status":"Status","pricing.online":"Online","pricing.unknown":"Unknown","pricing.vendor":"Vendor","pricing.allVendors":"All","packages.title":"Packages & Plans","packages.subtitle":"Choose a package that fits your usage. All plans include access to all available models.","packages.noPackages":"No packages available at the moment.","packages.checkPricing":"Check model pricing","packages.daysAccess":"{{count}} days access","packages.creditIncluded":"${{amount}} credit included","packages.requestsMin":"{{count}} requests/min","packages.allModels":"All models access","packages.openaiApi":"OpenAI-compatible API","packages.subscribeNow":"Subscribe Now","packages.signUpToSubscribe":"Sign Up to Subscribe","packages.processing":"Processing...","packages.confirmTitle":"Confirm Subscription","packages.confirmDesc":"Subscribe to {{name}} for ${{price}}?","packages.yourBalance":"Your balance:","packages.insufficientBalance":"Insufficient balance. Please top up before subscribing.","packages.confirm":"Confirm","packages.subscribedSuccess":"Subscribed successfully!","packages.mySubscriptions":"My Subscriptions","packages.subscriptionId":"Subscription #{{id}}","packages.active":"Active","packages.expires":"Expires","packages.nextReset":"Next reset","packages.remaining":"Remaining","packages.unusedQuotaExpires":"Unused quota expires each period","packages.resetNever":"One-time","packages.resetDaily":"Resets daily","packages.resetWeekly":"Resets weekly","packages.resetMonthly":"Resets monthly","packages.periodicQuota":"${{amount}} {{period}} quota","packages.subscriptionInfo":"This is a subscription ({{period}}), valid for {{days}} days. Each period grants ${{amount}} quota. Unused quota expires.","packages.officialEquiv":"Equivalent to ${{amount}} at {{model}} official pricing","common.sessionExpired":"Session expired, please log in again","common.requestFailed":"Request failed","nav.topup":"Top Up","topup.title":"Top Up","topup.subtitle":"Recharge your account balance via online payment or redemption code","topup.onlineTopup":"Online Top Up","topup.selectAmount":"Select Amount","topup.customAmount":"Custom Amount","topup.amountPlaceholder":"Enter amount (min ${{min}})","topup.paymentMethod":"Payment Method","topup.processing":"Processing...","topup.calculating":"Calculating...","topup.payAmountLabel":"Amount to pay","topup.enterAmount":"Please enter a top-up amount","topup.paymentSuccess":"Payment successful! Balance updated.","topup.orderExpired":"Payment order expired","topup.viewHistory":"View History","topup.hideHistory":"Hide History","topup.history":"Top-Up History","topup.noHistory":"No top-up records yet","topup.statusSuccess":"Success","topup.statusPending":"Pending","topup.statusFailed":"Failed","topup.redeemTitle":"Redeem Code","topup.enterRedeemCode":"Enter redemption code","topup.redeeming":"Redeeming...","topup.redeem":"Redeem","topup.redeemCode":"Redeem Code","topup.redeemSuccess":"Code redeemed successfully!","topup.cryptoPayment":"Crypto Payment","topup.walletAddress":"Wallet Address","topup.amount":"Amount","topup.chain":"Chain","topup.waitingPayment":"Waiting for payment...","topup.close":"Close","topup.selectChain":"Please select a blockchain network","topup.selectToken":"Please select a token","topup.token":"Token","topup.payWith":"Pay with","topup.payNow":"Pay","topup.quotaIncluded":"{{count}} quota included","topup.creemPayment":"Creem Payment"},o1={translation:i1},s1={"nav.home":"首页","nav.pricing":"定价","nav.packages":"套餐","nav.dashboard":"控制台","nav.apiKeys":"API 密钥","nav.login":"登录","nav.signUp":"注册","nav.logout":"退出","nav.contact":"联系我们","home.heroSubtitle":"通过单一 API 端点访问全球最强大的 AI 模型。简单、实惠、可靠。","home.getStarted":"免费开始","home.viewPricing":"查看定价","home.goToDashboard":"进入控制台","home.aiModels":"AI 模型","home.uptime":"在线率","home.latency":"延迟","home.whyChooseUs":"为什么选择我们","home.whyChooseUsDesc":"构建 AI 应用所需的一切","home.lightningFast":"极速响应","home.lightningFastDesc":"优化的路由和缓存以最低延迟交付响应。跨多个供应商负载均衡,确保最大可靠性。","home.securePrivate":"安全可靠","home.securePrivateDesc":"企业级安全性,API 密钥加密存储。默认不记录请求日志。您的数据由您掌控。","home.payAsYouGo":"按量付费","home.payAsYouGoDesc":"透明定价,无隐藏费用。按使用量付费。提供多种充值方式和订阅套餐。","home.availableModels":"可用模型","home.availableModelsDesc":"通过统一 API 访问 {{count}} 个 AI 模型","home.viewAllModels":"查看全部 {{count}} 个模型","home.plansPackages":"套餐方案","home.choosePlan":"选择适合您需求的方案","home.subscribe":"订阅","home.days":"{{count}} 天","home.readyToStart":"准备好了吗?","home.readyToStartDesc":"创建账户,几分钟内即可开始使用 AI 构建应用。无需信用卡。","home.createFreeAccount":"免费创建账户","home.signIn":"登录","home.defaultHeroTitle":"AI API 平台","login.welcomeBack":"欢迎回来","login.signInTo":"登录到 {{name}}","login.signInToDefault":"登录您的账户","login.username":"用户名","login.password":"密码","login.enterUsername":"请输入用户名","login.enterPassword":"请输入密码","login.signingIn":"登录中...","login.signInBtn":"登录","login.noAccount":"还没有账户?","login.createOne":"立即注册","login.fillAllFields":"请填写所有字段","login.welcomeBackToast":"欢迎回来!","register.createAccount":"创建账户","register.getStartedWith":"开始使用 {{name}}","register.getStartedDefault":"开始使用我们的平台","register.username":"用户名","register.email":"邮箱","register.password":"密码","register.confirmPassword":"确认密码","register.chooseUsername":"请选择用户名","register.emailPlaceholder":"your@email.com(可选)","register.passwordPlaceholder":"8-20 个字符","register.repeatPassword":"请再次输入密码","register.creating":"创建中...","register.createAccountBtn":"创建账户","register.hasAccount":"已有账户?","register.signIn":"立即登录","register.fillRequired":"请填写所有必填字段","register.passwordMismatch":"两次密码不一致","register.passwordLength":"密码长度需为 8-20 个字符","register.accountCreated":"账户创建成功!请登录。","dashboard.welcome":"欢迎,","dashboard.manageDesc":"管理您的 API 用量、密钥和账户","dashboard.balance":"余额","dashboard.quotaUnits":"{{count}} 额度单位","dashboard.used":"已使用","dashboard.totalRequests":"总请求数","dashboard.redeemCode":"兑换码","dashboard.enterCode":"请输入兑换码","dashboard.redeeming":"兑换中...","dashboard.redeem":"兑换","dashboard.redeemSuccess":"兑换码兑换成功!","dashboard.quickLinks":"快捷入口","dashboard.apiKeys":"API 密钥","dashboard.manageKeys":"管理您的密钥","dashboard.packages":"套餐","dashboard.viewPlans":"查看方案","dashboard.pricing":"定价","dashboard.modelPrices":"模型价格","dashboard.apiDocs":"API 文档","dashboard.comingSoon":"即将推出","tokens.title":"API 密钥","tokens.subtitle":"管理您的 API 访问令牌","tokens.newKey":"+ 新建密钥","tokens.createApiKey":"创建 API 密钥","tokens.name":"名称","tokens.namePlaceholder":"例如 my-app-key","tokens.cancel":"取消","tokens.creating":"创建中...","tokens.create":"创建","tokens.newApiKey":"您的新 API 密钥","tokens.keyWarning":"这是您唯一一次看到此密钥的机会。请立即复制并安全保存。","tokens.copied":"已复制!","tokens.copy":"复制","tokens.copiedToClipboard":"已复制到剪贴板!","tokens.savedKey":"我已保存密钥","tokens.deleteToken":"删除令牌","tokens.deleteConfirm":'删除 "{{name}}"?此操作不可撤销。',"tokens.delete":"删除","tokens.noKeys":"暂无 API 密钥","tokens.createFirst":"创建您的第一个密钥","tokens.enabled":"已启用","tokens.disabled":"已禁用","tokens.tokenDisabled":"令牌已禁用","tokens.tokenEnabled":"令牌已启用","tokens.tokenDeleted":"令牌已删除","tokens.enterName":"请输入名称","tokens.quickStart":"快速开始","tokens.quickStartComment":"# 使用 OpenAI 兼容端点调用 API","config.title":"配置文件导出","config.subtitle":"选择您的 API Key 和模型,一键生成配置文件","config.selectKey":"选择 API Key","config.selectModel":"选择模型","config.selectTool":"选择工具","config.copy":"复制","config.download":"下载","config.copied":"已复制到剪贴板","config.downloaded":"配置文件已下载","config.loading":"加载中...","config.loginPrompt":"登录后可生成您的专属配置","config.loginDesc":"选择 API Key 和模型,自动填充到配置文件中","config.searchModel":"搜索模型...","config.noModelMatch":"没有匹配的模型","pricing.title":"模型定价","pricing.subtitle":"透明的按量付费定价。价格以每百万 token 计。","pricing.searchPlaceholder":"搜索模型...","pricing.noMatch":"没有匹配的模型","pricing.noModels":"暂无可用模型","pricing.model":"模型","pricing.inputPrice":"输入 / 百万 token","pricing.outputPrice":"输出 / 百万 token","pricing.status":"状态","pricing.online":"在线","pricing.unknown":"未知","pricing.vendor":"厂商","pricing.allVendors":"全部","packages.title":"套餐方案","packages.subtitle":"选择适合您用量的套餐。所有方案均可访问全部可用模型。","packages.noPackages":"暂无可用套餐。","packages.checkPricing":"查看模型定价","packages.daysAccess":"{{count}} 天有效期","packages.creditIncluded":"含 ${{amount}} 额度","packages.requestsMin":"{{count}} 次请求/分钟","packages.allModels":"全部模型可用","packages.openaiApi":"OpenAI 兼容 API","packages.subscribeNow":"立即订阅","packages.signUpToSubscribe":"注册后订阅","packages.processing":"处理中...","packages.confirmTitle":"确认订阅","packages.confirmDesc":"订阅 {{name}},价格 ${{price}}?","packages.yourBalance":"您的余额:","packages.insufficientBalance":"余额不足,请先充值。","packages.confirm":"确认","packages.subscribedSuccess":"订阅成功!","packages.mySubscriptions":"我的订阅","packages.subscriptionId":"订阅 #{{id}}","packages.active":"活跃","packages.expires":"到期","packages.nextReset":"下次重置","packages.remaining":"剩余","packages.unusedQuotaExpires":"未用完额度到期作废","packages.resetNever":"一次性","packages.resetDaily":"每日重置","packages.resetWeekly":"每周重置","packages.resetMonthly":"每月重置","packages.periodicQuota":"{{period}}额度 ${{amount}}","packages.subscriptionInfo":"📋 此套餐为周期订阅({{period}}),有效期 {{days}} 天。每个周期获得 ${{amount}} 额度,未用完作废。","packages.officialEquiv":"相当于 {{model}} 官方 ${{amount}} 额度","common.sessionExpired":"会话已过期,请重新登录","common.requestFailed":"请求失败","nav.topup":"充值","topup.title":"充值中心","topup.subtitle":"通过在线支付或兑换码为账户充值","topup.onlineTopup":"在线充值","topup.selectAmount":"选择金额","topup.customAmount":"自定义金额","topup.amountPlaceholder":"输入金额(最低 ${{min}})","topup.paymentMethod":"支付方式","topup.processing":"处理中...","topup.calculating":"计算中...","topup.payAmountLabel":"实付金额","topup.enterAmount":"请输入充值金额","topup.paymentSuccess":"支付成功!余额已更新。","topup.orderExpired":"支付订单已过期","topup.viewHistory":"查看记录","topup.hideHistory":"隐藏记录","topup.history":"充值记录","topup.noHistory":"暂无充值记录","topup.statusSuccess":"成功","topup.statusPending":"待支付","topup.statusFailed":"失败","topup.redeemTitle":"兑换码充值","topup.enterRedeemCode":"请输入兑换码","topup.redeeming":"兑换中...","topup.redeem":"兑换","topup.redeemCode":"兑换码","topup.redeemSuccess":"兑换码兑换成功!","topup.cryptoPayment":"加密货币支付","topup.walletAddress":"钱包地址","topup.amount":"金额","topup.chain":"链","topup.waitingPayment":"等待支付中...","topup.close":"关闭","topup.selectChain":"请选择区块链网络","topup.selectToken":"请选择代币","topup.token":"代币","topup.payWith":"使用","topup.payNow":"支付","topup.quotaIncluded":"含 {{count}} 额度","topup.creemPayment":"Creem 支付"},l1={translation:s1};Oe.use(Bp).use(Bw).init({load:"languageOnly",resources:{en:o1,zh:l1},fallbackLng:"en",interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator","htmlTag","querystring"],caches:["localStorage"]}});Es.createRoot(document.getElementById("root")).render(I.jsx(ye.StrictMode,{children:I.jsx(wy,{children:I.jsx(X0,{children:I.jsxs(J0,{children:[I.jsx(pw,{}),I.jsx(cv,{position:"top-center",toastOptions:{duration:3e3,style:{background:"#1a1a2e",color:"#fff",border:"1px solid rgba(255,255,255,0.08)",borderRadius:"12px",fontSize:"14px"}}})]})})})}));export{q1 as A,a1 as L,np as N,cy as O,_1 as Q,Z0 as a,Gd as b,Gn as c,j1 as d,A1 as e,L1 as f,N1 as g,I1 as h,D1 as i,I as j,F1 as k,T1 as l,z1 as m,U1 as n,M1 as o,B1 as p,b1 as q,x as r,$1 as s,V1 as t,Y0 as u,H1 as v,K1 as w,W1 as x,Q1 as y,hs as z}; diff --git a/dist/assets/index-Dbm04DbP.css b/dist/assets/index-Dbm04DbP.css deleted file mode 100644 index 7906628..0000000 --- a/dist/assets/index-Dbm04DbP.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,Noto Sans SC,system-ui,-apple-system,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,Fira Code,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--brand: 99 102 241;--page-text: 255 255 255;--page-text-secondary: 163 163 163;--page-text-muted: 115 115 115;--page-label: 212 212 212;--page-card-bg: rgba(255,255,255,.03);--page-card-border: rgba(255,255,255,.06);--page-input-bg: rgba(255,255,255,.04);--page-input-border: rgba(255,255,255,.1);--page-link: 129 140 248}body{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));font-feature-settings:"cv02","cv03","cv04","cv11"}::-moz-selection{background-color:#6366f14d}::selection{background-color:#6366f14d}::-webkit-scrollbar{width:.375rem}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}.theme-light ::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(212 212 212 / var(--tw-bg-opacity, 1))}.theme-light{--page-text: 17 24 39;--page-text-secondary: 107 114 128;--page-text-muted: 156 163 175;--page-label: 55 65 81;--page-card-bg: rgba(255,255,255,.85);--page-card-border: rgb(229,231,235);--page-input-bg: #fff;--page-input-border: rgb(209,213,219);--page-link: 79 70 229}.theme-claude{--page-link: 217 119 87}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.glass{background:var(--page-card-bg);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid var(--page-card-border);border-radius:1rem}.glass-sm{background:var(--page-card-bg);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--page-card-border);border-radius:.75rem}.btn-primary{border-radius:.75rem;--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1));padding:.625rem 1.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-shadow-color: rgb(79 70 229 / .2);--tw-shadow: var(--tw-shadow-colored);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}.btn-primary:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.btn-primary:active{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity, 1))}.btn-primary:disabled{cursor:not-allowed;opacity:.5}.btn-primary{color:#fff}.btn-secondary{border-radius:.75rem;padding:.625rem 1.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}.btn-secondary:disabled{cursor:not-allowed;opacity:.5}.btn-secondary{border:1px solid var(--page-input-border);color:rgb(var(--page-label))}.btn-secondary:hover{background:rgba(var(--page-text),.05)}.input{width:100%;border-radius:.75rem;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.input:focus{border-color:#6366f199;outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(99 102 241 / .4)}.input{background:var(--page-input-bg);border:1px solid var(--page-input-border);color:rgb(var(--page-text))}.input::-moz-placeholder{color:rgb(var(--page-text-muted))}.input::placeholder{color:rgb(var(--page-text-muted))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.-top-40{top:-10rem}.bottom-\[-11px\]{bottom:-11px}.left-0{left:0}.left-1\/2{left:50%}.left-1\/4{left:25%}.left-3{left:.75rem}.left-\[-250\%\]{left:-250%}.right-1\/4{right:25%}.right-3{right:.75rem}.right-\[-250\%\]{right:-250%}.top-0{top:0}.top-1\/2{top:50%}.top-20{top:5rem}.top-4{top:1rem}.top-\[-10px\]{top:-10px}.isolate{isolation:isolate}.z-0{z-index:0}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[2\]{z-index:2}.z-\[3\]{z-index:3}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-14{margin-bottom:3.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[4\/5\]{aspect-ratio:4/5}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[0\.5rem\]{height:.5rem}.h-\[400px\]{height:400px}.h-\[50\%\]{height:50%}.h-\[500px\]{height:500px}.h-\[600px\]{height:600px}.h-full{height:100%}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.min-h-\[50vh\]{min-height:50vh}.min-h-\[60vh\]{min-height:60vh}.min-h-\[70vh\]{min-height:70vh}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-16{width:4rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[0\.5rem\]{width:.5rem}.w-\[300\%\]{width:300%}.w-\[300px\]{width:300px}.w-\[400px\]{width:400px}.w-\[600px\]{width:600px}.w-\[900px\]{width:900px}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}@keyframes star-movement-bottom{0%{transform:translate(0);opacity:1}to{transform:translate(-100%);opacity:0}}.animate-star-movement-bottom{animation:star-movement-bottom linear infinite alternate}@keyframes star-movement-top{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}.animate-star-movement-top{animation:star-movement-top linear infinite alternate}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-12{gap:3rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-slate-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(226 232 240 / var(--tw-divide-opacity, 1))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.\!rounded-2xl{border-radius:1rem!important}.\!rounded-xl{border-radius:.75rem!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[1\.25rem\]{border-radius:1.25rem}.rounded-\[15px\]{border-radius:15px}.rounded-\[20px\]{border-radius:20px}.rounded-\[25px\]{border-radius:25px}.rounded-\[4px\]{border-radius:4px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-t{border-top-width:1px}.\!border-neutral-800\/60{border-color:#26262699!important}.border-\[\#27272a\]{--tw-border-opacity: 1;border-color:rgb(39 39 42 / var(--tw-border-opacity, 1))}.border-\[\#D97757\]\/30{border-color:#d977574d}.border-\[\#E8DDD0\]{--tw-border-opacity: 1;border-color:rgb(232 221 208 / var(--tw-border-opacity, 1))}.border-amber-500\/20{border-color:#f59e0b33}.border-blue-100{--tw-border-opacity: 1;border-color:rgb(219 234 254 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-brand-500\/20{border-color:#6366f133}.border-brand-500\/30{border-color:#6366f14d}.border-cyan-500\/10{border-color:#06b6d41a}.border-cyan-500\/100{border-color:#06b6d4}.border-cyan-500\/15{border-color:#06b6d426}.border-cyan-500\/20{border-color:#06b6d433}.border-cyan-500\/25{border-color:#06b6d440}.border-emerald-500\/10{border-color:#10b9811a}.border-emerald-500\/100{border-color:#10b981}.border-emerald-500\/15{border-color:#10b98126}.border-emerald-500\/20{border-color:#10b98133}.border-emerald-500\/25{border-color:#10b98140}.border-emerald-500\/\[0\.08\]{border-color:#10b98114}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-green-500\/20{border-color:#22c55e33}.border-green-500\/30{border-color:#22c55e4d}.border-neutral-500\/20{border-color:#73737333}.border-neutral-600{--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity, 1))}.border-neutral-800{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-neutral-800\/40{border-color:#26262666}.border-neutral-800\/50{border-color:#26262680}.border-neutral-800\/60{border-color:#26262699}.border-purple-500\/20{border-color:#a855f733}.border-red-500\/20{border-color:#ef444433}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-900{--tw-border-opacity: 1;border-color:rgb(15 23 42 / var(--tw-border-opacity, 1))}.border-violet-500\/10{border-color:#8b5cf61a}.border-violet-500\/100{border-color:#8b5cf6}.border-violet-500\/15{border-color:#8b5cf626}.border-violet-500\/20{border-color:#8b5cf633}.border-violet-500\/25{border-color:#8b5cf640}.border-white\/10{border-color:#ffffff1a}.border-white\/15{border-color:#ffffff26}.border-white\/20{border-color:#fff3}.border-white\/30{border-color:#ffffff4d}.border-white\/5{border-color:#ffffff0d}.border-white\/\[0\.04\]{border-color:#ffffff0a}.border-white\/\[0\.06\]{border-color:#ffffff0f}.border-white\/\[0\.12\]{border-color:#ffffff1f}.border-yellow-500\/20{border-color:#eab30833}.border-t-brand-500{--tw-border-opacity: 1;border-top-color:rgb(99 102 241 / var(--tw-border-opacity, 1))}.border-t-white{--tw-border-opacity: 1;border-top-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-t-white\/70{border-top-color:#ffffffb3}.\!bg-neutral-900\/60{background-color:#17171799!important}.bg-\[\#030712\]{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity, 1))}.bg-\[\#030712\]\/80{background-color:#030712cc}.bg-\[\#030712\]\/95{background-color:#030712f2}.bg-\[\#09090b\]{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity, 1))}.bg-\[\#09090b\]\/80{background-color:#09090bcc}.bg-\[\#09090b\]\/95{background-color:#09090bf2}.bg-\[\#160000\]{--tw-bg-opacity: 1;background-color:rgb(22 0 0 / var(--tw-bg-opacity, 1))}.bg-\[\#D97757\]{--tw-bg-opacity: 1;background-color:rgb(217 119 87 / var(--tw-bg-opacity, 1))}.bg-\[\#D97757\]\/\[0\.04\]{background-color:#d977570a}.bg-\[\#E8DDD0\]{--tw-bg-opacity: 1;background-color:rgb(232 221 208 / var(--tw-bg-opacity, 1))}.bg-\[\#F5EEE6\]{--tw-bg-opacity: 1;background-color:rgb(245 238 230 / var(--tw-bg-opacity, 1))}.bg-\[\#FAF6F1\]{--tw-bg-opacity: 1;background-color:rgb(250 246 241 / var(--tw-bg-opacity, 1))}.bg-\[\#FAF6F1\]\/85{background-color:#faf6f1d9}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/20{background-color:#0003}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/60{background-color:#0009}.bg-black\/90{background-color:#000000e6}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-50\/50{background-color:#eff6ff80}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-brand-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.bg-brand-500\/10{background-color:#6366f11a}.bg-brand-500\/\[0\.04\]{background-color:#6366f10a}.bg-brand-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1))}.bg-brand-600\/20{background-color:#4f46e533}.bg-cyan-500\/10{background-color:#06b6d41a}.bg-cyan-500\/100{background-color:#06b6d4}.bg-cyan-500\/15{background-color:#06b6d426}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/100{background-color:#10b981}.bg-emerald-500\/15{background-color:#10b98126}.bg-emerald-500\/5{background-color:#10b9810d}.bg-emerald-500\/\[0\.04\]{background-color:#10b9810a}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50\/50{background-color:#f9fafb80}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity, 1))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-neutral-500{--tw-bg-opacity: 1;background-color:rgb(115 115 115 / var(--tw-bg-opacity, 1))}.bg-neutral-500\/10{background-color:#7373731a}.bg-neutral-600{--tw-bg-opacity: 1;background-color:rgb(82 82 82 / var(--tw-bg-opacity, 1))}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.bg-neutral-800\/50{background-color:#26262680}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity, 1))}.bg-neutral-950{--tw-bg-opacity: 1;background-color:rgb(10 10 10 / var(--tw-bg-opacity, 1))}.bg-neutral-950\/80{background-color:#0a0a0acc}.bg-neutral-950\/95{background-color:#0a0a0af2}.bg-purple-500\/10{background-color:#a855f71a}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-violet-500\/10{background-color:#8b5cf61a}.bg-violet-500\/100{background-color:#8b5cf6}.bg-violet-500\/15{background-color:#8b5cf626}.bg-violet-600\/10{background-color:#7c3aed1a}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/5{background-color:#ffffff0d}.bg-white\/80{background-color:#fffc}.bg-white\/\[0\.02\]{background-color:#ffffff05}.bg-white\/\[0\.03\]{background-color:#ffffff08}.bg-white\/\[0\.04\]{background-color:#ffffff0a}.bg-white\/\[0\.06\]{background-color:#ffffff0f}.bg-white\/\[0\.08\]{background-color:#ffffff14}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[\#D97757\]{--tw-gradient-from: #D97757 var(--tw-gradient-from-position);--tw-gradient-to: rgb(217 119 87 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-amber-500\/10{--tw-gradient-from: rgb(245 158 11 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 158 11 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-black{--tw-gradient-from: #000 var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-600{--tw-gradient-from: #2563eb var(--tw-gradient-from-position);--tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-brand-500{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-brand-600\/15{--tw-gradient-from: rgb(79 70 229 / .15) var(--tw-gradient-from-position);--tw-gradient-to: rgb(79 70 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500\/10{--tw-gradient-from: rgb(6 182 212 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500\/100{--tw-gradient-from: rgb(6 182 212 / 1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500\/50{--tw-gradient-from: rgb(6 182 212 / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-emerald-500\/10{--tw-gradient-from: rgb(16 185 129 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(16 185 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-emerald-500\/100{--tw-gradient-from: rgb(16 185 129 / 1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(16 185 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-emerald-500\/50{--tw-gradient-from: rgb(16 185 129 / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(16 185 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500{--tw-gradient-from: #8b5cf6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500\/10{--tw-gradient-from: rgb(139 92 246 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500\/100{--tw-gradient-from: rgb(139 92 246 / 1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500\/50{--tw-gradient-from: rgb(139 92 246 / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-600\/10{--tw-gradient-from: rgb(124 58 237 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(124 58 237 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-blue-500{--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #3b82f6 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-600\/10{--tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(37 99 235 / .1) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-\[\#C4613F\]{--tw-gradient-to: #C4613F var(--tw-gradient-to-position)}.to-cyan-500{--tw-gradient-to: #06b6d4 var(--tw-gradient-to-position)}.to-cyan-500\/10{--tw-gradient-to: rgb(6 182 212 / .1) var(--tw-gradient-to-position)}.to-cyan-500\/100{--tw-gradient-to: rgb(6 182 212 / 1) var(--tw-gradient-to-position)}.to-cyan-600\/10{--tw-gradient-to: rgb(8 145 178 / .1) var(--tw-gradient-to-position)}.to-emerald-500\/10{--tw-gradient-to: rgb(16 185 129 / .1) var(--tw-gradient-to-position)}.to-emerald-500\/100{--tw-gradient-to: rgb(16 185 129 / 1) var(--tw-gradient-to-position)}.to-gray-900{--tw-gradient-to: #111827 var(--tw-gradient-to-position)}.to-indigo-600{--tw-gradient-to: #4f46e5 var(--tw-gradient-to-position)}.to-orange-500\/10{--tw-gradient-to: rgb(249 115 22 / .1) var(--tw-gradient-to-position)}.to-purple-500{--tw-gradient-to: #a855f7 var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #9333ea var(--tw-gradient-to-position)}.to-teal-500\/10{--tw-gradient-to: rgb(20 184 166 / .1) var(--tw-gradient-to-position)}.to-teal-500\/100{--tw-gradient-to: rgb(20 184 166 / 1) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-violet-500\/10{--tw-gradient-to: rgb(139 92 246 / .1) var(--tw-gradient-to-position)}.to-violet-500\/100{--tw-gradient-to: rgb(139 92 246 / 1) var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-cover{-o-object-fit:cover;object-fit:cover}.\!p-0{padding:0!important}.\!p-6{padding:1.5rem!important}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.\!px-4{padding-left:1rem!important;padding-right:1rem!important}.\!py-1\.5{padding-top:.375rem!important;padding-bottom:.375rem!important}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[10px\]{padding-left:10px;padding-right:10px}.px-\[26px\]{padding-left:26px;padding-right:26px}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[16px\]{padding-top:16px;padding-bottom:16px}.py-\[4px\]{padding-top:4px;padding-bottom:4px}.\!pl-10{padding-left:2.5rem!important}.pb-20{padding-bottom:5rem}.pb-24{padding-bottom:6rem}.pl-12{padding-left:3rem}.pr-12{padding-right:3rem}.pr-8{padding-right:2rem}.pt-10{padding-top:2.5rem}.pt-16{padding-top:4rem}.pt-32{padding-top:8rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-heading{font-family:Inter,Noto Sans SC,system-ui,-apple-system,sans-serif}.font-mono{font-family:JetBrains Mono,Fira Code,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[16px\]{font-size:16px}.text-\[clamp\(2rem\,10vw\,8rem\)\]{font-size:clamp(2rem,10vw,8rem)}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-\[1\.08\]{line-height:1.08}.leading-\[1\.1\]{line-height:1.1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#2d2d2d\]{--tw-text-opacity: 1;color:rgb(45 45 45 / var(--tw-text-opacity, 1))}.text-\[\#3D3024\]{--tw-text-opacity: 1;color:rgb(61 48 36 / var(--tw-text-opacity, 1))}.text-\[\#6B5D4F\]{--tw-text-opacity: 1;color:rgb(107 93 79 / var(--tw-text-opacity, 1))}.text-\[\#8B7D6E\]{--tw-text-opacity: 1;color:rgb(139 125 110 / var(--tw-text-opacity, 1))}.text-\[\#D97757\]{--tw-text-opacity: 1;color:rgb(217 119 87 / var(--tw-text-opacity, 1))}.text-\[\#D97757\]\/50{color:#d9775780}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-brand-200{--tw-text-opacity: 1;color:rgb(199 210 254 / var(--tw-text-opacity, 1))}.text-brand-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-cyan-400\/0{color:#22d3ee00}.text-cyan-400\/10{color:#22d3ee1a}.text-cyan-400\/100{color:#22d3ee}.text-cyan-400\/15{color:#22d3ee26}.text-cyan-400\/20{color:#22d3ee33}.text-cyan-400\/25{color:#22d3ee40}.text-cyan-400\/30{color:#22d3ee4d}.text-cyan-400\/35{color:#22d3ee59}.text-cyan-400\/40{color:#22d3ee66}.text-cyan-400\/45{color:#22d3ee73}.text-cyan-400\/5{color:#22d3ee0d}.text-cyan-400\/50{color:#22d3ee80}.text-cyan-400\/55{color:#22d3ee8c}.text-cyan-400\/60{color:#22d3ee99}.text-cyan-400\/65{color:#22d3eea6}.text-cyan-400\/70{color:#22d3eeb3}.text-cyan-400\/75{color:#22d3eebf}.text-cyan-400\/80{color:#22d3eecc}.text-cyan-400\/85{color:#22d3eed9}.text-cyan-400\/90{color:#22d3eee6}.text-cyan-400\/95{color:#22d3eef2}.text-emerald-300\/80{color:#6ee7b7cc}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-emerald-400\/0{color:#34d39900}.text-emerald-400\/10{color:#34d3991a}.text-emerald-400\/100{color:#34d399}.text-emerald-400\/15{color:#34d39926}.text-emerald-400\/20{color:#34d39933}.text-emerald-400\/25{color:#34d39940}.text-emerald-400\/30{color:#34d3994d}.text-emerald-400\/35{color:#34d39959}.text-emerald-400\/40{color:#34d39966}.text-emerald-400\/45{color:#34d39973}.text-emerald-400\/5{color:#34d3990d}.text-emerald-400\/50{color:#34d39980}.text-emerald-400\/55{color:#34d3998c}.text-emerald-400\/60{color:#34d39999}.text-emerald-400\/65{color:#34d399a6}.text-emerald-400\/70{color:#34d399b3}.text-emerald-400\/75{color:#34d399bf}.text-emerald-400\/80{color:#34d399cc}.text-emerald-400\/85{color:#34d399d9}.text-emerald-400\/90{color:#34d399e6}.text-emerald-400\/95{color:#34d399f2}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.text-neutral-900{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}.text-page{--tw-text-opacity: 1;color:rgb(var(--page-text) / var(--tw-text-opacity, 1))}.text-page-label{--tw-text-opacity: 1;color:rgb(var(--page-label) / var(--tw-text-opacity, 1))}.text-page-link{--tw-text-opacity: 1;color:rgb(var(--page-link) / var(--tw-text-opacity, 1))}.text-page-muted{--tw-text-opacity: 1;color:rgb(var(--page-text-muted) / var(--tw-text-opacity, 1))}.text-page-secondary{--tw-text-opacity: 1;color:rgb(var(--page-text-secondary) / var(--tw-text-opacity, 1))}.text-purple-300{--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-violet-400{--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.text-violet-400\/0{color:#a78bfa00}.text-violet-400\/10{color:#a78bfa1a}.text-violet-400\/100{color:#a78bfa}.text-violet-400\/15{color:#a78bfa26}.text-violet-400\/20{color:#a78bfa33}.text-violet-400\/25{color:#a78bfa40}.text-violet-400\/30{color:#a78bfa4d}.text-violet-400\/35{color:#a78bfa59}.text-violet-400\/40{color:#a78bfa66}.text-violet-400\/45{color:#a78bfa73}.text-violet-400\/5{color:#a78bfa0d}.text-violet-400\/50{color:#a78bfa80}.text-violet-400\/55{color:#a78bfa8c}.text-violet-400\/60{color:#a78bfa99}.text-violet-400\/65{color:#a78bfaa6}.text-violet-400\/70{color:#a78bfab3}.text-violet-400\/75{color:#a78bfabf}.text-violet-400\/80{color:#a78bfacc}.text-violet-400\/85{color:#a78bfad9}.text-violet-400\/90{color:#a78bfae6}.text-violet-400\/95{color:#a78bfaf2}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/20{--tw-shadow-color: rgb(59 130 246 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-brand-500\/25{--tw-shadow-color: rgb(99 102 241 / .25);--tw-shadow: var(--tw-shadow-colored)}.shadow-brand-600\/20{--tw-shadow-color: rgb(79 70 229 / .2);--tw-shadow: var(--tw-shadow-colored)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-brand-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity, 1))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-2xl{--tw-backdrop-blur: blur(40px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.ease-\[cubic-bezier\(0\.5\,1\,0\.89\,1\)\]{transition-timing-function:cubic-bezier(.5,1,.89,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.will-change-\[transform\,filter\,opacity\]{will-change:transform,filter,opacity}.will-change-transform{will-change:transform}.\[perspective\:800px\]{perspective:800px}.\[transform-style\:preserve-3d\]{transform-style:preserve-3d}.\[transform\:translateZ\(0\)\]{transform:translateZ(0)}.\[transform\:translateZ\(30px\)\]{transform:translateZ(30px)}.theme-light{color:#111827}.theme-light .glass,.theme-light .glass-sm{box-shadow:0 1px 3px #0000000f}.theme-light .input:focus{border-color:#6366f1;box-shadow:0 0 0 3px #6366f126}.theme-light .card-glow:before{background:linear-gradient(to right,#6366f10f,#a855f70f,#ec48990f)}.theme-claude .btn-primary{background-color:#d97757;box-shadow:0 4px 14px #d9775726}.theme-claude .btn-primary:hover{background-color:#c4613f}.theme-claude .btn-primary:active{background-color:#a85232}.theme-claude .glass,.theme-claude .glass-sm{border-color:#e8ddd0}.theme-claude .input{border-color:#d9c5b2}.theme-claude .input:focus{border-color:#d97757;box-shadow:0 0 0 3px #d9775726}.theme-claude .btn-secondary{border-color:#d9c5b2;color:#6b5d4f}.theme-claude .btn-secondary:hover{background-color:#d977570d}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:left-\[-10px\]:before{content:var(--tw-content);left:-10px}.before\:top-0:before{content:var(--tw-content);top:0}.before\:overflow-hidden:before{content:var(--tw-content);overflow:hidden}.before\:bg-\[\#060010\]:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(6 0 16 / var(--tw-bg-opacity, 1))}.before\:text-white:before{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.before\:opacity-0:before{content:var(--tw-content);opacity:0}.before\:content-\[\'\'\]:before{--tw-content: "";content:var(--tw-content)}.before\:content-\[attr\(data-text\)\]:before{--tw-content: attr(data-text);content:var(--tw-content)}.before\:\[clip-path\:inset\(0_0_0_0\)\]:before{content:var(--tw-content);clip-path:inset(0 0 0 0)}.before\:\[text-shadow\:var\(--before-shadow\)\]:before{content:var(--tw-content);text-shadow:var(--before-shadow)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[10px\]:after{content:var(--tw-content);left:10px}.after\:top-0:after{content:var(--tw-content);top:0}.after\:overflow-hidden:after{content:var(--tw-content);overflow:hidden}.after\:bg-\[\#060010\]:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(6 0 16 / var(--tw-bg-opacity, 1))}.after\:text-white:after{content:var(--tw-content);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.after\:content-\[attr\(data-text\)\]:after{--tw-content: attr(data-text);content:var(--tw-content)}.after\:\[clip-path\:inset\(0_0_0_0\)\]:after{content:var(--tw-content);clip-path:inset(0 0 0 0)}.after\:\[text-shadow\:var\(--after-shadow\)\]:after{content:var(--tw-content);text-shadow:var(--after-shadow)}.last\:border-0:last-child{border-width:0px}.hover\:border-\[\#D9C5B2\]:hover{--tw-border-opacity: 1;border-color:rgb(217 197 178 / var(--tw-border-opacity, 1))}.hover\:border-brand-500\/25:hover{border-color:#6366f140}.hover\:border-emerald-500\/20:hover{border-color:#10b98133}.hover\:border-gray-200:hover{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.hover\:border-neutral-700:hover{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity, 1))}.hover\:border-slate-300:hover{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.hover\:border-white\/\[0\.12\]:hover{border-color:#ffffff1f}.hover\:border-white\/\[0\.1\]:hover{border-color:#ffffff1a}.hover\:bg-\[\#C4613F\]:hover{--tw-bg-opacity: 1;background-color:rgb(196 97 63 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#D9C5B2\]:hover{--tw-bg-opacity: 1;background-color:rgb(217 197 178 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#E8DDD0\]\/50:hover{background-color:#e8ddd080}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-brand-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-400:hover{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-500\/15:hover{background-color:#10b98126}.hover\:bg-emerald-500\/5:hover{background-color:#10b9810d}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-green-500\/10:hover{background-color:#22c55e1a}.hover\:bg-neutral-100:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-700:hover{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-50:hover{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/20:hover{background-color:#fff3}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:bg-white\/\[0\.02\]:hover{background-color:#ffffff05}.hover\:bg-white\/\[0\.06\]:hover{background-color:#ffffff0f}.hover\:bg-white\/\[0\.08\]:hover{background-color:#ffffff14}.hover\:bg-white\/\[0\.1\]:hover{background-color:#ffffff1a}.hover\:text-\[\#3D3024\]:hover{--tw-text-opacity: 1;color:rgb(61 48 36 / var(--tw-text-opacity, 1))}.hover\:text-\[\#C4613F\]:hover{--tw-text-opacity: 1;color:rgb(196 97 63 / var(--tw-text-opacity, 1))}.hover\:text-\[\#D97757\]:hover{--tw-text-opacity: 1;color:rgb(217 119 87 / var(--tw-text-opacity, 1))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.hover\:text-brand-300:hover{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.hover\:text-emerald-300:hover{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.hover\:text-emerald-400:hover{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\:text-neutral-300:hover{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.hover\:text-page:hover{--tw-text-opacity: 1;color:rgb(var(--page-text) / var(--tw-text-opacity, 1))}.hover\:text-page-link:hover{--tw-text-opacity: 1;color:rgb(var(--page-link) / var(--tw-text-opacity, 1))}.hover\:text-slate-600:hover{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.hover\:text-slate-700:hover{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.hover\:text-slate-900:hover{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.hover\:text-violet-300:hover{--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:shadow-sm:hover{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:before\:opacity-100:hover:before{content:var(--tw-content);opacity:1}.hover\:before\:content-\[attr\(data-text\)\]:hover:before{--tw-content: attr(data-text);content:var(--tw-content)}.hover\:before\:\[text-shadow\:var\(--before-shadow\)\]:hover:before{content:var(--tw-content);text-shadow:var(--before-shadow)}.hover\:after\:opacity-100:hover:after{content:var(--tw-content);opacity:1}.hover\:after\:content-\[attr\(data-text\)\]:hover:after{--tw-content: attr(data-text);content:var(--tw-content)}.hover\:after\:\[text-shadow\:var\(--after-shadow\)\]:hover:after{content:var(--tw-content);text-shadow:var(--after-shadow)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.group:hover .group-hover\:text-\[\#D97757\]{--tw-text-opacity: 1;color:rgb(217 119 87 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-brand-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-page-link{--tw-text-opacity: 1;color:rgb(var(--page-link) / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:block{display:block}.sm\:hidden{display:none}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media (min-width: 768px){.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-7xl{font-size:4.5rem;line-height:1}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}} diff --git a/dist/assets/officialEquiv-COyn5GUF.js b/dist/assets/officialEquiv-COyn5GUF.js new file mode 100644 index 0000000..b21cef5 --- /dev/null +++ b/dist/assets/officialEquiv-COyn5GUF.js @@ -0,0 +1 @@ +import"./index-ClhW4pXr.js";const c=[{pattern:"claude-4-sonnet",label:"Claude Sonnet 4",inputPerMtok:3},{pattern:"claude-sonnet-4",label:"Claude Sonnet 4",inputPerMtok:3},{pattern:"claude-4.5-sonnet",label:"Claude 4.5 Sonnet",inputPerMtok:3},{pattern:"claude-4.6-sonnet",label:"Claude 4.6 Sonnet",inputPerMtok:3},{pattern:"claude-4-opus",label:"Claude Opus 4",inputPerMtok:15},{pattern:"claude-opus-4",label:"Claude Opus 4",inputPerMtok:15},{pattern:"claude-4.1-opus",label:"Claude Opus 4.1",inputPerMtok:15},{pattern:"claude-4.5-opus",label:"Claude Opus 4.5",inputPerMtok:5},{pattern:"claude-4.6-opus",label:"Claude Opus 4.6",inputPerMtok:5},{pattern:"claude-3.5-haiku",label:"Claude 3.5 Haiku",inputPerMtok:.8},{pattern:"claude-3-5-haiku",label:"Claude 3.5 Haiku",inputPerMtok:.8},{pattern:"gpt-5.1",label:"GPT-5.1",inputPerMtok:1.25},{pattern:"gpt-5.2",label:"GPT-5.2",inputPerMtok:1.75},{pattern:"gpt-5.3",label:"GPT-5.3",inputPerMtok:1.75},{pattern:"gpt-5.4",label:"GPT-5.4",inputPerMtok:2.5},{pattern:"gpt-4o",label:"GPT-4o",inputPerMtok:2.5},{pattern:"gpt-4.1",label:"GPT-4.1",inputPerMtok:2}];function P(e,n){if(!e||e.length===0||n<=0)return null;let t=null;for(const u of e){const a=Number(u.input_price);if(!a||a<=0)continue;const r=(u.model_name||"").toLowerCase();for(const l of c)if(r.includes(l.pattern.toLowerCase())){const i=a*1e3,p=l.inputPerMtok/i,o=n*p;(!t||o>t.equivDollars)&&(t={label:l.label,equivDollars:o,ratio:p});break}}return t}export{P as c}; diff --git a/dist/assets/useTranslation-BeJE8l6a.js b/dist/assets/useTranslation-Pq_l7wMn.js similarity index 98% rename from dist/assets/useTranslation-BeJE8l6a.js rename to dist/assets/useTranslation-Pq_l7wMn.js index 9d1ab8a..b25bb90 100644 --- a/dist/assets/useTranslation-BeJE8l6a.js +++ b/dist/assets/useTranslation-Pq_l7wMn.js @@ -1,4 +1,4 @@ -import{r as l,y as q,A as B}from"./index-Cvtin-Z6.js";const H=(e,t,r,i)=>{var n,d,y,g;const s=[r,{code:t,...i||{}}];if((d=(n=e==null?void 0:e.services)==null?void 0:n.logger)!=null&&d.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);p(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(g=(y=e==null?void 0:e.services)==null?void 0:y.logger)!=null&&g.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},z={},U=(e,t,r,i)=>{p(r)&&z[r]||(p(r)&&(z[r]=new Date),H(e,t,r,i))},F=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},O=(e,t,r)=>{e.loadNamespaces(t,F(e,r))},A=(e,t,r,i)=>{if(p(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return O(e,r,i);r.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,F(e,i))},J=(e,t,r={})=>!t.languages||!t.languages.length?(U(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(i,s)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}),p=e=>typeof e=="string",K=e=>typeof e=="object"&&e!==null,Q=l.createContext();class V{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var M={exports:{}},$={};/** +import{r as l,y as q,A as B}from"./index-ClhW4pXr.js";const H=(e,t,r,i)=>{var n,d,y,g;const s=[r,{code:t,...i||{}}];if((d=(n=e==null?void 0:e.services)==null?void 0:n.logger)!=null&&d.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);p(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(g=(y=e==null?void 0:e.services)==null?void 0:y.logger)!=null&&g.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},z={},U=(e,t,r,i)=>{p(r)&&z[r]||(p(r)&&(z[r]=new Date),H(e,t,r,i))},F=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},O=(e,t,r)=>{e.loadNamespaces(t,F(e,r))},A=(e,t,r,i)=>{if(p(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return O(e,r,i);r.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,F(e,i))},J=(e,t,r={})=>!t.languages||!t.languages.length?(U(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(i,s)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}),p=e=>typeof e=="string",K=e=>typeof e=="object"&&e!==null,Q=l.createContext();class V{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var M={exports:{}},$={};/** * @license React * use-sync-external-store-shim.production.js * diff --git a/dist/index.html b/dist/index.html index 6eeefb4..1113f8c 100644 --- a/dist/index.html +++ b/dist/index.html @@ -7,8 +7,8 @@ AI Platform - - + +
diff --git a/src/pages/Packages.jsx b/src/pages/Packages.jsx index a65b84b..8f8e9ab 100644 --- a/src/pages/Packages.jsx +++ b/src/pages/Packages.jsx @@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next'; import { useAuth } from '../context/AuthContext'; import { getSitePackages, getSiteModels, subscribePackage, getActiveSubscriptions, Q } from '../api'; import SpotlightCard from '../components/bits/SpotlightCard'; +import { calcOfficialEquiv } from '../utils/officialEquiv'; import toast from 'react-hot-toast'; const resetLabelKeys = { @@ -13,70 +14,11 @@ const resetLabelKeys = { monthly: 'packages.resetMonthly', }; -// Official prices (input $/1K tokens) for reference models -const OFFICIAL_PRICES = [ - { pattern: 'claude-4-sonnet', label: 'Claude Sonnet 4', inputPerMtok: 3 }, - { pattern: 'claude-sonnet-4', label: 'Claude Sonnet 4', inputPerMtok: 3 }, - { pattern: 'claude-4.5-sonnet', label: 'Claude 4.5 Sonnet', inputPerMtok: 3 }, - { pattern: 'claude-4.6-sonnet', label: 'Claude 4.6 Sonnet', inputPerMtok: 3 }, - { pattern: 'claude-4-opus', label: 'Claude Opus 4', inputPerMtok: 15 }, - { pattern: 'claude-opus-4', label: 'Claude Opus 4', inputPerMtok: 15 }, - { pattern: 'claude-4.1-opus', label: 'Claude Opus 4.1', inputPerMtok: 15 }, - { pattern: 'claude-4.5-opus', label: 'Claude Opus 4.5', inputPerMtok: 5 }, - { pattern: 'claude-4.6-opus', label: 'Claude Opus 4.6', inputPerMtok: 5 }, - { pattern: 'claude-3.5-haiku', label: 'Claude 3.5 Haiku', inputPerMtok: 0.8 }, - { pattern: 'claude-3-5-haiku', label: 'Claude 3.5 Haiku', inputPerMtok: 0.8 }, - { pattern: 'gpt-5.1', label: 'GPT-5.1', inputPerMtok: 1.25 }, - { pattern: 'gpt-5.2', label: 'GPT-5.2', inputPerMtok: 1.75 }, - { pattern: 'gpt-5.3', label: 'GPT-5.3', inputPerMtok: 1.75 }, - { pattern: 'gpt-5.4', label: 'GPT-5.4', inputPerMtok: 2.5 }, - { pattern: 'gpt-4o', label: 'GPT-4o', inputPerMtok: 2.5 }, - { pattern: 'gpt-4.1', label: 'GPT-4.1', inputPerMtok: 2 }, -]; - function formatDate(unix) { if (!unix) return ''; return new Date(unix * 1000).toLocaleDateString(); } -// Find the best official equivalent for the package -function calcOfficialEquiv(models, quotaDollars) { - if (!models || models.length === 0 || quotaDollars <= 0) return null; - - // For each model on this site, find its official counterpart - let bestResult = null; - - for (const m of models) { - const siteInputPrice = Number(m.input_price); // $/1K tokens - if (!siteInputPrice || siteInputPrice <= 0) continue; - - const modelName = (m.model_name || '').toLowerCase(); - - for (const official of OFFICIAL_PRICES) { - if (modelName.includes(official.pattern.toLowerCase())) { - // Site price is per 1K tokens, official is per 1M tokens - // Convert site price to per 1M: siteInputPrice * 1000 - const sitePricePerMtok = siteInputPrice * 1000; - const ratio = official.inputPerMtok / sitePricePerMtok; - const equivDollars = quotaDollars * ratio; - - if (!bestResult || equivDollars > bestResult.equivDollars) { - bestResult = { - label: official.label, - equivDollars, - ratio, - officialPrice: official.inputPerMtok, - sitePrice: sitePricePerMtok, - }; - } - break; - } - } - } - - return bestResult; -} - export default function Packages() { const { t } = useTranslation(); const { user, refreshUser } = useAuth(); @@ -180,12 +122,12 @@ export default function Packages() { const remain = Math.max(0, total - used); const pct = total > 0 ? Math.min(100, (used / total) * 100) : 0; return ( -
+
{t('packages.subscriptionId', { id: sub.id })} - + {t('packages.active')}
@@ -196,7 +138,7 @@ export default function Packages() { )}
-
+
@@ -227,10 +169,9 @@ export default function Packages() { const equiv = calcOfficialEquiv(enabledModels, quotaDollars); return ( -
{/* Header */} @@ -238,7 +179,7 @@ export default function Packages() {

{pkg.name}

{isSubscription && ( - + {getResetLabel(resetPeriod)} )} @@ -264,7 +205,7 @@ export default function Packages() { {/* Official Equiv Banner */} {equiv && equiv.equivDollars > quotaDollars && (
-

+

🔥 {t('packages.officialEquiv', { model: equiv.label, amount: Math.round(equiv.equivDollars), @@ -277,7 +218,7 @@ export default function Packages() {

    {pkg.quota_amount > 0 && (
  • - + {isSubscription @@ -288,20 +229,20 @@ export default function Packages() { )} {isSubscription && (
  • - + {t('packages.unusedQuotaExpires')}
  • )}
  • - + {t('packages.allModels')}
  • - + {t('packages.openaiApi')} @@ -317,7 +258,7 @@ export default function Packages() { {subscribing === pkg.id ? t('packages.processing') : user ? t('packages.subscribeNow') : t('packages.signUpToSubscribe')}
- +
)})}
)} @@ -338,7 +279,7 @@ export default function Packages() {

{isSubscription && (
-

+

{t('packages.subscriptionInfo', { period: getResetLabel(resetPeriod), days: confirmPkg.duration || 30, @@ -348,11 +289,11 @@ export default function Packages() {

)}

- {t('packages.yourBalance')} ${userBalance.toFixed(2)} + {t('packages.yourBalance')} ${userBalance.toFixed(2)}

{insufficient && (
-

{t('packages.insufficientBalance')}

+

{t('packages.insufficientBalance')}

)}
diff --git a/src/themes/claude/Home.jsx b/src/themes/claude/Home.jsx index de51f3a..062aaeb 100644 --- a/src/themes/claude/Home.jsx +++ b/src/themes/claude/Home.jsx @@ -3,7 +3,8 @@ import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useAuth } from '../../context/AuthContext'; import { useSite } from '../../context/SiteContext'; -import { getSiteModels, getSitePackages } from '../../api'; +import { getSiteModels, getSitePackages, Q } from '../../api'; +import { calcOfficialEquiv } from '../../utils/officialEquiv'; import CountUp from '../../components/bits/CountUp'; import FadeContent from '../../components/bits/FadeContent'; @@ -139,7 +140,10 @@ export default function ClaudeHome() {

{t('home.choosePlan')}

- {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => ( + {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => { + const quotaDollars = pkg.quota_amount > 0 ? pkg.quota_amount / Q : 0; + const equiv = calcOfficialEquiv(enabledModels, quotaDollars); + return (
@@ -153,6 +157,9 @@ export default function ClaudeHome() { )} {pkg.duration > 0 &&

{t('home.days', { count: pkg.duration })}

}
+ {equiv && equiv.equivDollars > quotaDollars && ( +

🔥 {t('packages.officialEquiv', { model: equiv.label, amount: Math.round(equiv.equivDollars) })}

+ )}
- ))} + )})}
diff --git a/src/themes/clean/Home.jsx b/src/themes/clean/Home.jsx index fc01131..a5815ec 100644 --- a/src/themes/clean/Home.jsx +++ b/src/themes/clean/Home.jsx @@ -3,7 +3,8 @@ import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useAuth } from '../../context/AuthContext'; import { useSite } from '../../context/SiteContext'; -import { getSiteModels, getSitePackages } from '../../api'; +import { getSiteModels, getSitePackages, Q } from '../../api'; +import { calcOfficialEquiv } from '../../utils/officialEquiv'; import CountUp from '../../components/bits/CountUp'; import FadeContent from '../../components/bits/FadeContent'; @@ -152,7 +153,10 @@ export default function CleanHome() {

{t('home.choosePlan')}

- {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => ( + {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => { + const quotaDollars = pkg.quota_amount > 0 ? pkg.quota_amount / Q : 0; + const equiv = calcOfficialEquiv(enabledModels, quotaDollars); + return (
@@ -166,6 +170,9 @@ export default function CleanHome() { )} {pkg.duration > 0 &&

{t('home.days', { count: pkg.duration })}

}
+ {equiv && equiv.equivDollars > quotaDollars && ( +

🔥 {t('packages.officialEquiv', { model: equiv.label, amount: Math.round(equiv.equivDollars) })}

+ )}
- ))} + )})}
diff --git a/src/themes/corporate/Home.jsx b/src/themes/corporate/Home.jsx index e8a2eb7..ede61bc 100644 --- a/src/themes/corporate/Home.jsx +++ b/src/themes/corporate/Home.jsx @@ -3,7 +3,8 @@ import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useAuth } from '../../context/AuthContext'; import { useSite } from '../../context/SiteContext'; -import { getSiteModels, getSitePackages } from '../../api'; +import { getSiteModels, getSitePackages, Q } from '../../api'; +import { calcOfficialEquiv } from '../../utils/officialEquiv'; import CountUp from '../../components/bits/CountUp'; import FadeContent from '../../components/bits/FadeContent'; @@ -151,7 +152,10 @@ export default function CorporateHome() {

{t('home.choosePlan')}

- {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => ( + {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => { + const quotaDollars = pkg.quota_amount > 0 ? pkg.quota_amount / Q : 0; + const equiv = calcOfficialEquiv(enabledModels, quotaDollars); + return (
@@ -165,6 +169,9 @@ export default function CorporateHome() { )} {pkg.duration > 0 &&

{t('home.days', { count: pkg.duration })}

}
+ {equiv && equiv.equivDollars > quotaDollars && ( +

🔥 {t('packages.officialEquiv', { model: equiv.label, amount: Math.round(equiv.equivDollars) })}

+ )}
- ))} + )})}
diff --git a/src/themes/dark/Home.jsx b/src/themes/dark/Home.jsx index 4addecc..2917cd5 100644 --- a/src/themes/dark/Home.jsx +++ b/src/themes/dark/Home.jsx @@ -3,7 +3,8 @@ import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useAuth } from '../../context/AuthContext'; import { useSite } from '../../context/SiteContext'; -import { getSiteModels, getSitePackages } from '../../api'; +import { getSiteModels, getSitePackages, Q } from '../../api'; +import { calcOfficialEquiv } from '../../utils/officialEquiv'; import CountUp from '../../components/bits/CountUp'; import FadeContent from '../../components/bits/FadeContent'; @@ -142,7 +143,10 @@ export default function DarkHome() {

{t('home.choosePlan')}

- {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => ( + {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => { + const quotaDollars = pkg.quota_amount > 0 ? pkg.quota_amount / Q : 0; + const equiv = calcOfficialEquiv(enabledModels, quotaDollars); + return (
@@ -156,6 +160,9 @@ export default function DarkHome() { )} {pkg.duration > 0 &&

{t('home.days', { count: pkg.duration })}

}
+ {equiv && equiv.equivDollars > quotaDollars && ( +

🔥 {t('packages.officialEquiv', { model: equiv.label, amount: Math.round(equiv.equivDollars) })}

+ )}
- ))} + )})}
diff --git a/src/themes/default/Home.jsx b/src/themes/default/Home.jsx index 902d547..fed6249 100644 --- a/src/themes/default/Home.jsx +++ b/src/themes/default/Home.jsx @@ -3,7 +3,8 @@ import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useAuth } from '../../context/AuthContext'; import { useSite } from '../../context/SiteContext'; -import { getSiteModels, getSitePackages } from '../../api'; +import { getSiteModels, getSitePackages, Q } from '../../api'; +import { calcOfficialEquiv } from '../../utils/officialEquiv'; import CountUp from '../../components/bits/CountUp'; import FadeContent from '../../components/bits/FadeContent'; @@ -151,7 +152,10 @@ export default function DefaultHome() {

{t('home.choosePlan')}

- {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => ( + {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => { + const quotaDollars = pkg.quota_amount > 0 ? pkg.quota_amount / Q : 0; + const equiv = calcOfficialEquiv(enabledModels, quotaDollars); + return (
@@ -165,6 +169,9 @@ export default function DefaultHome() { )} {pkg.duration > 0 &&

{t('home.days', { count: pkg.duration })}

}
+ {equiv && equiv.equivDollars > quotaDollars && ( +

🔥 {t('packages.officialEquiv', { model: equiv.label, amount: Math.round(equiv.equivDollars) })}

+ )}
- ))} + )})}
diff --git a/src/themes/minimal/Home.jsx b/src/themes/minimal/Home.jsx index 79fbe28..342d17f 100644 --- a/src/themes/minimal/Home.jsx +++ b/src/themes/minimal/Home.jsx @@ -3,7 +3,8 @@ import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useAuth } from '../../context/AuthContext'; import { useSite } from '../../context/SiteContext'; -import { getSiteModels, getSitePackages } from '../../api'; +import { getSiteModels, getSitePackages, Q } from '../../api'; +import { calcOfficialEquiv } from '../../utils/officialEquiv'; import CountUp from '../../components/bits/CountUp'; import FadeContent from '../../components/bits/FadeContent'; @@ -137,7 +138,10 @@ export default function MinimalHome() {

{t('home.choosePlan')}

- {packages.filter(p => p.enabled).slice(0, 3).map((pkg) => ( + {packages.filter(p => p.enabled).slice(0, 3).map((pkg) => { + const quotaDollars = pkg.quota_amount > 0 ? pkg.quota_amount / Q : 0; + const equiv = calcOfficialEquiv(enabledModels, quotaDollars); + return (

{pkg.name}

{pkg.description &&

{pkg.description}

} @@ -148,11 +152,14 @@ export default function MinimalHome() { )} {pkg.duration > 0 &&

{t('home.days', { count: pkg.duration })}

}
+ {equiv && equiv.equivDollars > quotaDollars && ( +

🔥 {t('packages.officialEquiv', { model: equiv.label, amount: Math.round(equiv.equivDollars) })}

+ )} {user ? t('home.subscribe') : t('home.getStarted')}
- ))} + )})} diff --git a/src/themes/starter/Home.jsx b/src/themes/starter/Home.jsx index 7409d96..ad9a675 100644 --- a/src/themes/starter/Home.jsx +++ b/src/themes/starter/Home.jsx @@ -3,7 +3,8 @@ import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useAuth } from '../../context/AuthContext'; import { useSite } from '../../context/SiteContext'; -import { getSiteModels, getSitePackages } from '../../api'; +import { getSiteModels, getSitePackages, Q } from '../../api'; +import { calcOfficialEquiv } from '../../utils/officialEquiv'; import CountUp from '../../components/bits/CountUp'; import FadeContent from '../../components/bits/FadeContent'; @@ -157,7 +158,10 @@ export default function StarterHome() {

{t('home.choosePlan')}

- {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => ( + {packages.filter(p => p.enabled).slice(0, 3).map((pkg, i) => { + const quotaDollars = pkg.quota_amount > 0 ? pkg.quota_amount / Q : 0; + const equiv = calcOfficialEquiv(enabledModels, quotaDollars); + return (
@@ -171,6 +175,9 @@ export default function StarterHome() { )} {pkg.duration > 0 &&

{t('home.days', { count: pkg.duration })}

}
+ {equiv && equiv.equivDollars > quotaDollars && ( +

🔥 {t('packages.officialEquiv', { model: equiv.label, amount: Math.round(equiv.equivDollars) })}

+ )}
- ))} + )})} diff --git a/src/utils/officialEquiv.js b/src/utils/officialEquiv.js new file mode 100644 index 0000000..9232d91 --- /dev/null +++ b/src/utils/officialEquiv.js @@ -0,0 +1,66 @@ +import { Q } from '../api'; + +// Official prices (input $/1M tokens) for reference models +const OFFICIAL_PRICES = [ + { pattern: 'claude-4-sonnet', label: 'Claude Sonnet 4', inputPerMtok: 3 }, + { pattern: 'claude-sonnet-4', label: 'Claude Sonnet 4', inputPerMtok: 3 }, + { pattern: 'claude-4.5-sonnet', label: 'Claude 4.5 Sonnet', inputPerMtok: 3 }, + { pattern: 'claude-4.6-sonnet', label: 'Claude 4.6 Sonnet', inputPerMtok: 3 }, + { pattern: 'claude-4-opus', label: 'Claude Opus 4', inputPerMtok: 15 }, + { pattern: 'claude-opus-4', label: 'Claude Opus 4', inputPerMtok: 15 }, + { pattern: 'claude-4.1-opus', label: 'Claude Opus 4.1', inputPerMtok: 15 }, + { pattern: 'claude-4.5-opus', label: 'Claude Opus 4.5', inputPerMtok: 5 }, + { pattern: 'claude-4.6-opus', label: 'Claude Opus 4.6', inputPerMtok: 5 }, + { pattern: 'claude-3.5-haiku', label: 'Claude 3.5 Haiku', inputPerMtok: 0.8 }, + { pattern: 'claude-3-5-haiku', label: 'Claude 3.5 Haiku', inputPerMtok: 0.8 }, + { pattern: 'gpt-5.1', label: 'GPT-5.1', inputPerMtok: 1.25 }, + { pattern: 'gpt-5.2', label: 'GPT-5.2', inputPerMtok: 1.75 }, + { pattern: 'gpt-5.3', label: 'GPT-5.3', inputPerMtok: 1.75 }, + { pattern: 'gpt-5.4', label: 'GPT-5.4', inputPerMtok: 2.5 }, + { pattern: 'gpt-4o', label: 'GPT-4o', inputPerMtok: 2.5 }, + { pattern: 'gpt-4.1', label: 'GPT-4.1', inputPerMtok: 2 }, +]; + +/** + * Find the best official equivalent for a given quota. + * Picks the model with the highest ratio (biggest discount advantage). + * + * @param {Array} models - site models with input_price ($/1K tokens) + * @param {number} quotaDollars - package quota in USD + * @returns {{ label: string, equivDollars: number } | null} + */ +export function calcOfficialEquiv(models, quotaDollars) { + if (!models || models.length === 0 || quotaDollars <= 0) return null; + + let bestResult = null; + + for (const m of models) { + const siteInputPrice = Number(m.input_price); + if (!siteInputPrice || siteInputPrice <= 0) continue; + + const modelName = (m.model_name || '').toLowerCase(); + + for (const official of OFFICIAL_PRICES) { + if (modelName.includes(official.pattern.toLowerCase())) { + const sitePricePerMtok = siteInputPrice * 1000; + const ratio = official.inputPerMtok / sitePricePerMtok; + const equivDollars = quotaDollars * ratio; + + if (!bestResult || equivDollars > bestResult.equivDollars) { + bestResult = { label: official.label, equivDollars, ratio }; + } + break; + } + } + } + + return bestResult; +} + +/** + * Convenience: compute equiv from raw quota units + models. + */ +export function calcPkgEquiv(models, quotaAmount) { + const quotaDollars = quotaAmount > 0 ? quotaAmount / Q : 0; + return calcOfficialEquiv(models, quotaDollars); +}