chore: sync pending distributor workspace changes
This commit is contained in:
1 parent
f95687bc2d
commit
75e8062226
31 files changed
+333
-2
No files matched your search
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{r as S,j as Qt}from"./index-5ebNoZ4G.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<t?t:n;let Ct=()=>{};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;i<s;i++){const o=this.subscriptions[i];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const L=t=>t*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&&++a<oe);return o}function j(t,e,n,r){if(t===e&&n===r)return Y;const s=i=>ae(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.length;g++)o[z[g]].cancel(T)},state:s,steps:o}}const{schedule:tt,cancel:Ut,state:J}=ve(typeof requestAnimationFrame<"u"?requestAnimationFrame:Y,!0);let Z;function xe(){Z=void 0}const V={now:()=>(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})=>"Line truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as re,d as ne,a as le,r,g as oe,e as de,Q as c,j as e,L as p,f as ie,z as o,h as ce,t as pe,i as xe}from"./index-5ebNoZ4G.js";import{C}from"./CountUp-EtJN562p.js";import{u as me}from"./useTranslation-DtgXIWa1.js";function fe(){const{t:s}=me(),{user:a,refreshUser:f}=re(),{symbol:d,rate:i}=ne(),{site:b}=le(),[l,O]=r.useState(null),[j,S]=r.useState(""),[A,_]=r.useState(!1),[u,Q]=r.useState(""),[q,B]=r.useState([]),[h,K]=r.useState(!1),[G,E]=r.useState(!1),[L,W]=r.useState(""),[R,F]=r.useState(!1),[H,N]=r.useState(!1),[P,v]=r.useState(""),[w,D]=r.useState(""),[M,T]=r.useState(""),[g,U]=r.useState(!1),x=r.useCallback(async()=>{var t;try{const[n,m]=await Promise.all([oe(),de().catch(()=>null)]);n.data.success&&O(n.data.data),(t=m==null?void 0:m.data)!=null&&t.success&&m.data.data&&Q(`${window.location.origin}/register?aff=${m.data.data}`)}catch{}},[]);r.useEffect(()=>{x()},[x]);const J=async t=>{if(t.preventDefault(),!!j.trim()){_(!0);try{(await ie(j.trim())).data.success&&(o.success(s("dashboard.redeemSuccess")),S(""),await Promise.all([x(),f()]))}catch{}_(!1)}},V=async()=>{E(!0);try{const t=await ce({page:1,page_size:20});t.data.success&&t.data.data&&B(t.data.data)}catch{}E(!1)},X=()=>{u&&navigator.clipboard.writeText(u).then(()=>{o.success(s("topup.copied"))}).catch(()=>{o.error("Copy failed")})},Y=async()=>{const t=parseInt(L);if(!t||t<=0){o.error(s("topup.enterAmount"));return}F(!0);try{const n=await pe({quota:t});n.data.success&&(o.success(n.data.message||s("topup.transferSuccess")),W(""),await Promise.all([x(),f()]))}catch{}F(!1)},y=()=>{v(""),D(""),T("")},Z=()=>{y(),N(!0)},z=()=>{g||(y(),N(!1))},$=(l==null?void 0:l.quota)??(a==null?void 0:a.quota)??0,I=(l==null?void 0:l.used_quota)??(a==null?void 0:a.used_quota)??0,ee=(l==null?void 0:l.request_count)??(a==null?void 0:a.request_count)??0,se=$/c*i,k=((a==null?void 0:a.aff_quota)||0)/c*i,te=Number((a==null?void 0:a.commission_rate)||0),ae=async()=>{const t=Number.parseFloat(P);if(!Number.isFinite(t)||t<=0){o.error(s("topup.invalidWithdrawAmount"));return}if(t-k>1e-8){o.error(s("topup.withdrawExceedsBalance"));return}if(!w.trim()){o.error(s("topup.enterWithdrawMethod"));return}U(!0);try{const n=await xe({amount:t/i,payment_method:w.trim(),remark:M.trim()});n.data.success&&(o.success(n.data.message||s("topup.withdrawSuccess")),N(!1),y(),await Promise.all([x(),f()]))}catch{}U(!1)};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:[d,e.jsx(C,{from:0,to:Math.round(se*100)/100,duration:1.5})]}),e.jsx("p",{className:"text-xs text-page-muted mt-1",children:s("dashboard.quotaUnits",{count:$.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:[d,e.jsx(C,{from:0,to:Math.round(I/c*i*100)/100,duration:1.5})]}),e.jsx("p",{className:"text-xs text-page-muted mt-1",children:s("dashboard.quotaUnits",{count:I.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:ee,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:j,onChange:t=>S(t.target.value),className:"input flex-1",placeholder:s("dashboard.enterCode")}),e.jsx("button",{type:"submit",disabled:A,className:"btn-primary whitespace-nowrap",children:s(A?"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(p,{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("dashboarLine truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{r as n,j as b}from"./index-5ebNoZ4G.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};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as N,a as v,d as y,r as m,q as E,p as w,j as e,L as l,Q as F}from"./index-5ebNoZ4G.js";import{c as B,R as C}from"./RotatingEquiv-DtY8eD1-.js";import{C as h}from"./CountUp-EtJN562p.js";import{F as i}from"./FadeContent-haPY8_9U.js";import{u as q}from"./useTranslation-DtgXIWa1.js";function A(){const{t:s}=q(),{user:n}=N(),{site:c}=v(),{symbol:u}=y(),[D,f]=m.useState([]),[p,g]=m.useState([]);m.useEffect(()=>{E().then(t=>{t.data.success&&f(t.data.data||[])}).catch(()=>{}),w().then(t=>{t.data.success&&g(t.data.data||[])}).catch(()=>{})},[]);const o=D.filter(t=>t.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(i,{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:(c==null?void 0:c.name)||s("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-[#6B5D4F] mt-6 leading-relaxed max-w-xl",children:s("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-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors",children:[s("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:s("home.getStarted")}),e.jsxs(l,{to:"/pricing",className:"px-7 py-3 text-[#8B7D6E] font-medium text-sm hover:text-[#3D3024] transition-colors",children:[s("home.viewPricing")," →"]})]})})]})}),e.jsx(i,{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(h,{from:0,to:o.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:s("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:[e.jsx(h,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:s("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-[#3D3024]",children:["<",e.jsx(h,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-0.5",children:s("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(i,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:s("home.whyChooseUs")}),e.jsx("p",{className:"text-[#8B7D6E] mb-10",children:s("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-0",children:[{title:s("home.lightningFast"),desc:s("home.lightningFastDesc")},{title:s("home.securePrivate"),desc:s("home.securePrivateDesc")},{title:s("home.payAsYouGo"),desc:s("home.payAsYouGoDesc")}].map((t,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:t.title}),e.jsx("p",{className:"text-sm text-[#6B5D4F] leading-relaxed max-w-lg",children:t.desc})]})]},a))})]})})}),o.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(i,{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:s("home.availableModels")}),e.jsx("p",{className:"text-[#8B7D6E]",children:s("home.availableModelsDesc",{count:o.length})})]}),o.length>8&&e.jsxs(l,{to:"/pricing",className:"text-sm text-[#D97757] hover:text-[#C4613F] transition-colors",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,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:t.display_name||t.model_name})},t.id||a))})]})}),p.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(i,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-[#3D3024] mb-2",children:s("home.plansPackages")}),e.jsx("p",{className:"text-[#8B7D6E] mb-10",children:s("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:p.filter(t=>t.enabled).slice(0,3).map((t,a)=>{conLine truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as f,a as v,d as w,r as m,q as M,p as q,j as e,L as a,Q as C}from"./index-5ebNoZ4G.js";import{c as D,R as L}from"./RotatingEquiv-DtY8eD1-.js";import{C as h}from"./CountUp-EtJN562p.js";import{F as i}from"./FadeContent-haPY8_9U.js";import{u as P}from"./useTranslation-DtgXIWa1.js";function T(){const{t:s}=P(),{user:n}=f(),{site:c}=v(),{symbol:u}=w(),[p,y]=m.useState([]),[g,N]=m.useState([]);m.useEffect(()=>{M().then(t=>{t.data.success&&y(t.data.data||[])}).catch(()=>{}),q().then(t=>{t.data.success&&N(t.data.data||[])}).catch(()=>{})},[]);const r=p.filter(t=>t.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(i,{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:s("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:(c==null?void 0:c.name)||s("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-gray-500 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:n?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:[s("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:s("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:[s("home.viewPricing")," →"]})]})})]})}),e.jsx(i,{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(h,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:s("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:[e.jsx(h,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:s("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-gray-900",children:["<",e.jsx(h,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:s("home.latency")})]})]})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(i,{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:s("home.whyChooseUs")}),e.jsx("p",{className:"text-gray-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:"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:s("home.securePrivate"),desc:s("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:s("home.payAsYouGo"),desc:s("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((t,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-${t.color}-50 text-${t.color}-600 flex items-center justify-center mb-4`,children:t.icon}),e.jsx("h3",{className:"text-base font-semibold text-gray-900 mb-2",children:t.title}),e.jsx("p",{className:"text-sm text-gray-500 leading-relaxed",children:t.desc})]},o))})]})}),r.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(i,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.Line truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as f,a as y,d as w,r as m,q as M,p as q,j as e,L as a,Q as C}from"./index-5ebNoZ4G.js";import{c as D,R as L}from"./RotatingEquiv-DtY8eD1-.js";import{C as h}from"./CountUp-EtJN562p.js";import{F as i}from"./FadeContent-haPY8_9U.js";import{u as S}from"./useTranslation-DtgXIWa1.js";function T(){const{t:s}=S(),{user:n}=f(),{site:c}=y(),{symbol:u}=w(),[g,v]=m.useState([]),[p,N]=m.useState([]);m.useEffect(()=>{M().then(t=>{t.data.success&&v(t.data.data||[])}).catch(()=>{}),q().then(t=>{t.data.success&&N(t.data.data||[])}).catch(()=>{})},[]);const l=g.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(i,{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:(c==null?void 0:c.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:n?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(i,{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(h,{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(h,{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(h,{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(i,{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(i,{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.lLine truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as N,a as w,d as y,r as m,q as M,p as q,j as e,L as a,Q as S}from"./index-5ebNoZ4G.js";import{c as D,R as L}from"./RotatingEquiv-DtY8eD1-.js";import{C as h}from"./CountUp-EtJN562p.js";import{F as l}from"./FadeContent-haPY8_9U.js";import{u as P}from"./useTranslation-DtgXIWa1.js";function T(){const{t:s}=P(),{user:i}=N(),{site:c}=w(),{symbol:u}=y(),[g,f]=m.useState([]),[b,v]=m.useState([]);m.useEffect(()=>{M().then(t=>{t.data.success&&f(t.data.data||[])}).catch(()=>{}),q().then(t=>{t.data.success&&v(t.data.data||[])}).catch(()=>{})},[]);const r=g.filter(t=>t.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:s("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:(c==null?void 0:c.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.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:[s("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:s("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:[s("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(h,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:s("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(h,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:s("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(h,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:s("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: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"),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"),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"),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,o)=>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:t.icon}),e.jsx("h3",{className:"text-base font-semibold text-white mb-2",children:t.title}),e.jsx("p",{className:"text-sm
Line truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as N,a as v,d as w,r as x,q as y,p as q,j as e,L as l,Q as D}from"./index-5ebNoZ4G.js";import{c as M,R as S}from"./RotatingEquiv-DtY8eD1-.js";import{C as m}from"./CountUp-EtJN562p.js";import{F as n}from"./FadeContent-haPY8_9U.js";import{u as F}from"./useTranslation-DtgXIWa1.js";function A(){const{t:s}=F(),{user:i}=N(),{site:c}=v(),{symbol:h}=w(),[p,g]=x.useState([]),[u,f]=x.useState([]);x.useEffect(()=>{y().then(t=>{t.data.success&&g(t.data.data||[])}).catch(()=>{}),q().then(t=>{t.data.success&&f(t.data.data||[])}).catch(()=>{})},[]);const r=p.filter(t=>t.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:(c==null?void 0:c.name)||s("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 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(l,{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:[s("home.goToDashboard")," →"]}):e.jsxs(e.Fragment,{children:[e.jsxs(l,{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:[s("home.getStarted")," →"]}),e.jsx(l,{to:"/pricing",className:"px-7 py-3 text-neutral-400 font-medium text-sm hover:text-white transition-colors",children:s("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(m,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:s("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:s("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:s("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:s("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:s("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-6",children:[{title:s("home.lightningFast"),desc:s("home.lightningFastDesc")},{title:s("home.securePrivate"),desc:s("home.securePrivateDesc")},{title:s("home.payAsYouGo"),desc:s("home.payAsYouGoDesc")}].map((t,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-neutral-600 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:t.title}),e.jsx("p",{className:"text-sm text-neutral-500 leading-relaxed max-w-lg",children:t.desc})]})]},a))})]})}),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: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-neutral-400 hover:text-white 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-neutral-800/60 hover:border-neutral-700 transition-colors",children:e.jsx("span",{className:"text-sm text-neutral-300 font-mono",children:t.display_name||t.model_name})},t.id||a))})]})}),u.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: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:u.filter(t=>t.enabled).slice(0,3).map(t=>{const a=t.quota_amount>0?t.quota_aLine truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as v,a as y,d as w,r as x,q,p as D,j as e,L as l,Q as S}from"./index-5ebNoZ4G.js";import{c as F,R as M}from"./RotatingEquiv-DtY8eD1-.js";import{C as h}from"./CountUp-EtJN562p.js";import{F as n}from"./FadeContent-haPY8_9U.js";import{u as P}from"./useTranslation-DtgXIWa1.js";function L(){const{t:s}=P(),{user:i}=v(),{site:c}=y(),{symbol:u}=w(),[g,f]=x.useState([]),[b,N]=x.useState([]);x.useEffect(()=>{q().then(t=>{t.data.success&&f(t.data.data||[])}).catch(()=>{}),D().then(t=>{t.data.success&&N(t.data.data||[])}).catch(()=>{})},[]);const r=g.filter(t=>t.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.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:s("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:(c==null?void 0:c.name)||s("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 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(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:[s("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:s("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:[s("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-emerald-400",children:[e.jsx(h,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:s("home.aiModels")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[e.jsx(h,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:s("home.uptime")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:["<",e.jsx(h,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-0.5",children:s("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:s("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:s("home.whyChooseUsDesc")}),e.jsx("div",{className:"space-y-0",children:[{title:s("home.lightningFast"),desc:s("home.lightningFastDesc"),accent:"emerald"},{title:s("home.securePrivate"),desc:s("home.securePrivateDesc"),accent:"cyan"},{title:s("home.payAsYouGo"),desc:s("home.payAsYouGoDesc"),accent:"violet"}].map((t,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-${t.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:t.title}),e.jsx("p",{className:"text-sm text-neutral-500 leading-relaxed max-w-lg",children:t.desc})]})]},a))})]})}),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: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-emerald-400 hover:text-emerald-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-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:t.display_name||t.model_name})},t.id|Line truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as f,a as w,d as N,r as m,q as y,p as M,j as e,L as l,Q as k}from"./index-5ebNoZ4G.js";import{c as q,R as D}from"./RotatingEquiv-DtY8eD1-.js";import{C as L}from"./CountUp-EtJN562p.js";import{F as i}from"./FadeContent-haPY8_9U.js";import{u as S}from"./useTranslation-DtgXIWa1.js";function T(){const{t:s}=S(),{user:n}=f(),{site:c}=w(),{symbol:h}=N(),[j,g]=m.useState([]),[u,v]=m.useState([]);m.useEffect(()=>{y().then(t=>{t.data.success&&g(t.data.data||[])}).catch(()=>{}),M().then(t=>{t.data.success&&v(t.data.data||[])}).catch(()=>{})},[]);const o=j.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(i,{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:(c==null?void 0:c.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:n?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(i,{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:o.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(L,{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(i,{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))})]})}),o.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(i,{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.avLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{j as n}from"./index-5ebNoZ4G.js";import{u as a}from"./useTranslation-DtgXIWa1.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};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u,a as h,b as p,c as b,r as f,j as e,L as s,O as g}from"./index-5ebNoZ4G.js";import{L as v}from"./LanguageSwitch-Cw_oTQ4Q.js";import{u as j}from"./useTranslation-DtgXIWa1.js";function L(){const{t:a}=j(),{user:l,logout:i}=u(),{site:t}=h(),x=p(),m=b(),[n,d]=f.useState(!1),r=(t==null?void 0:t.name)||"AI Platform",c=[{to:"/",label:a("nav.home"),auth:!1},{to:"/pricing",label:a("nav.pricing"),auth:!1},{to:"/packages",label:a("nav.packages"),auth:!1},...t!=null&&t.allow_sub_dist?[{to:"/sub-site",label:a("subDist.nav"),auth:!1}]:[],{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},{to:"/logs",label:a("nav.logs"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(o=>!o.auth||l);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:r,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:r.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:r})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:c.map(o=>e.jsx(s,{to:o.to,className:`px-3 py-1.5 text-sm font-mono rounded transition-all ${m.pathname===o.to?"text-emerald-400 bg-emerald-500/10":"text-neutral-500 hover:text-emerald-400"}`,children:o.label},o.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{className:"text-neutral-500 hover:text-emerald-400 hover:bg-emerald-500/5 font-mono"}),l?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:l.display_name||l.username}),e.jsx("button",{onClick:async()=>{await i(),x("/")},className:"text-sm text-neutral-500 hover:text-emerald-400 font-mono transition-colors",children:a("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:a("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:a("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(o=>e.jsx(s,{to:o.to,onClick:()=>d(!1),className:`px-3 py-2 text-sm font-mono rounded transition-colors ${m.pathname===o.to?"text-emerald-400 bg-emerald-500/10":"text-neutral-500 hover:text-emerald-400"}`,children:o.label},o.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()," ",r]}),(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:a("nav.contact")})]})})]})}export{L as default};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as h,a as u,b as p,c as b,r as g,j as e,L as o,O as D}from"./index-5ebNoZ4G.js";import{L as v}from"./LanguageSwitch-Cw_oTQ4Q.js";import{u as f}from"./useTranslation-DtgXIWa1.js";function k(){const{t:a}=f(),{user:l,logout:m}=h(),{site:t}=u(),d=p(),i=b(),[r,c]=g.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},...t!=null&&t.allow_sub_dist?[{to:"/sub-site",label:a("subDist.nav"),auth:!1}]:[],{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},{to:"/logs",label:a("nav.logs"),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(v,{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{k as default};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u,a as d,b as p,c as b,r as g,j as e,L as l,O as j}from"./index-5ebNoZ4G.js";import{L as v}from"./LanguageSwitch-Cw_oTQ4Q.js";import{u as f}from"./useTranslation-DtgXIWa1.js";function L(){const{t:a}=f(),{user:n,logout:m}=u(),{site:t}=d(),h=p(),i=b(),[r,c]=g.useState(!1),o=(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},...t!=null&&t.allow_sub_dist?[{to:"/sub-site",label:a("subDist.nav"),auth:!1}]:[],{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},{to:"/logs",label:a("nav.logs"),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 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(l,{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(s=>e.jsx(l,{to:s.to,className:`text-sm transition-colors ${i.pathname===s.to?"text-white":"text-neutral-500 hover:text-white"}`,children:s.label},s.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"}),n?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-500 hidden sm:block",children:n.display_name||n.username}),e.jsx("button",{onClick:async()=>{await m(),h("/")},className:"text-sm text-neutral-500 hover:text-white transition-colors",children:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/login",className:"text-sm text-neutral-500 hover:text-white transition-colors hidden sm:block",children:a("nav.login")}),e.jsx(l,{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:a("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(s=>e.jsx(l,{to:s.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded transition-colors ${i.pathname===s.to?"text-white":"text-neutral-500 hover:text-white"}`,children:s.label},s.to))})})]}),e.jsx("main",{className:"flex-1",children:e.jsx(j,{})}),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:a("nav.contact")})]})})]})}export{L as default};
|
||||
Vendored
+1
@@ -0,0 +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-5ebNoZ4G.js";import{L as v}from"./LanguageSwitch-Cw_oTQ4Q.js";import{u as f}from"./useTranslation-DtgXIWa1.js";function L(){const{t:s}=f(),{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:s("nav.home"),auth:!1},{to:"/pricing",label:s("nav.pricing"),auth:!1},{to:"/packages",label:s("nav.packages"),auth:!1},...t!=null&&t.allow_sub_dist?[{to:"/sub-site",label:s("subDist.nav"),auth:!1}]:[],{to:"/dashboard",label:s("nav.dashboard"),auth:!0},{to:"/tokens",label:s("nav.apiKeys"),auth:!0},{to:"/logs",label:s("nav.logs"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:s("nav.topup"),auth:!0}]:[]].filter(a=>!a.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(a=>e.jsx(o,{to:a.to,className:`px-4 py-2 text-sm font-medium transition-colors ${i.pathname===a.to?"text-slate-900 border-b-2 border-slate-900":"text-slate-500 hover:text-slate-900"}`,children:a.label},a.to))}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(v,{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:s("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:s("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:s("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(a=>e.jsx(o,{to:a.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===a.to?"text-slate-900 bg-slate-50":"text-slate-500 hover:text-slate-900"}`,children:a.label},a.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:s("nav.contact")})})]})})})]})}export{L as default};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as m,a as u,b,c as p,r as g,j as e,L as l,O as v}from"./index-5ebNoZ4G.js";import{L as f}from"./LanguageSwitch-Cw_oTQ4Q.js";import{u as j}from"./useTranslation-DtgXIWa1.js";function L(){const{t:a}=j(),{user:o,logout:d}=m(),{site:t}=u(),h=b(),i=p(),[r,c]=g.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},...t!=null&&t.allow_sub_dist?[{to:"/sub-site",label:a("subDist.nav"),auth:!1}]:[],{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},{to:"/logs",label:a("nav.logs"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.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(s=>e.jsx(l,{to:s.to,className:`px-4 py-1.5 text-sm rounded-full transition-all ${i.pathname===s.to?"text-white bg-white/[0.08]":"text-neutral-400 hover:text-white"}`,children:s.label},s.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(),h("/")},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-400 hover:text-white transition-colors px-3 py-1.5 hidden sm:block",children:a("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:a("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(s=>e.jsx(l,{to:s.to,onClick:()=>c(!1),className:`px-3 py-2 text-sm rounded-lg transition-colors ${i.pathname===s.to?"text-blue-400 bg-blue-500/10":"text-neutral-400 hover:text-white hover:bg-white/5"}`,children:s.label},s.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:a("nav.contact")})})]})})]})}export{L as default};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as h,a as u,b,c as p,r as g,j as e,L as n,O as v}from"./index-5ebNoZ4G.js";import{L as j}from"./LanguageSwitch-Cw_oTQ4Q.js";import{u as f}from"./useTranslation-DtgXIWa1.js";function M(){const{t:a}=f(),{user:l,logout:o}=h(),{site:t}=u(),m=b(),x=p(),[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},...t!=null&&t.allow_sub_dist?[{to:"/sub-site",label:a("subDist.nav"),auth:!1}]:[],{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},{to:"/logs",label:a("nav.logs"),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:"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(n,{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"}),l?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-neutral-400 hidden sm:block",children:l.display_name||l.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(n,{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(n,{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(n,{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)),!l&&e.jsx(n,{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:l,active:o}){return e.jsx(n,{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:l})}export{M as default};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as h,a as u,b as g,c as b,r as p,j as e,L as l,O as v}from"./index-5ebNoZ4G.js";import{L as f}from"./LanguageSwitch-Cw_oTQ4Q.js";import{u as j}from"./useTranslation-DtgXIWa1.js";function L(){const{t:a}=j(),{user:o,logout:m}=h(),{site:t}=u(),d=g(),i=b(),[n,c]=p.useState(!1),r=(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},...t!=null&&t.allow_sub_dist?[{to:"/sub-site",label:a("subDist.nav"),auth:!1}]:[],{to:"/dashboard",label:a("nav.dashboard"),auth:!0},{to:"/tokens",label:a("nav.apiKeys"),auth:!0},{to:"/logs",label:a("nav.logs"),auth:!0},...t!=null&&t.enable_topup?[{to:"/topup",label:a("nav.topup"),auth:!0}]:[]].filter(s=>!s.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(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-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:r.charAt(0)}),e.jsx("span",{className:"text-lg font-semibold text-gray-900 group-hover:text-blue-600 transition-colors",children:r})]}),e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:x.map(s=>e.jsx(l,{to:s.to,className:`px-3.5 py-2 text-sm rounded-lg transition-all ${i.pathname===s.to?"text-blue-600 bg-blue-50 font-medium":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:s.label},s.to))}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{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:a("nav.logout")})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/login",className:"text-sm text-gray-500 hover:text-gray-900 px-3 py-2 hidden sm:block transition-colors",children:a("nav.login")}),e.jsx(l,{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:a("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(s=>e.jsx(l,{to:s.to,onClick:()=>c(!1),className:`px-3 py-2.5 text-sm rounded-lg transition-colors ${i.pathname===s.to?"text-blue-600 bg-blue-50 font-medium":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:s.label},s.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()," ",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-gray-400 hover:text-gray-600 transition-colors",children:a("nav.contact")})})]})})]})}export{L as default};
|
||||
Vendored
+1
@@ -0,0 +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-5ebNoZ4G.js";import{u as C}from"./useTranslation-DtgXIWa1.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};
|
||||
Vendored
+46
@@ -0,0 +1,46 @@
|
||||
import{r as c,d as O,F as U,j as e,R as B,Q as q}from"./index-5ebNoZ4G.js";import{u as I}from"./useTranslation-DtgXIWa1.js";/**
|
||||
* @license lucide-react v1.7.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const W=(...t)=>t.filter((a,n,i)=>!!a&&a.trim()!==""&&i.indexOf(a)===n).join(" ").trim();/**
|
||||
* @license lucide-react v1.7.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Z=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
||||
* @license lucide-react v1.7.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const H=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,n,i)=>i?i.toUpperCase():n.toLowerCase());/**
|
||||
* @license lucide-react v1.7.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const D=t=>{const a=H(t);return a.charAt(0).toUpperCase()+a.slice(1)};/**
|
||||
* @license lucide-react v1.7.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/var $={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||||
* @license lucide-react v1.7.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const J=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1},K=c.createContext({}),Q=()=>c.useContext(K),Y=c.forwardRef(({color:t,size:a,strokeWidth:n,absoluteStrokeWidth:i,className:u="",children:d,iconNode:_,...x},p)=>{const{size:g=24,strokeWidth:f=2,absoluteStrokeWidth:m=!1,color:b="currentColor",className:h=""}=Q()??{},v=i??m?Number(n??f)*24/Number(a??g):n??f;return c.createElement("svg",{ref:p,...$,width:a??g??$.width,height:a??g??$.height,stroke:t??b,strokeWidth:v,className:W("lucide",h,u),...!d&&!J(x)&&{"aria-hidden":"true"},...x},[..._.map(([k,C])=>c.createElement(k,C)),...Array.isArray(d)?d:[d]])});/**
|
||||
* @license lucide-react v1.7.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const P=(t,a)=>{const n=c.forwardRef(({className:i,...u},d)=>c.createElement(Y,{ref:d,iconNode:a,className:W(`lucide-${Z(D(t))}`,`lucide-${t}`,i),...u}));return n.displayName=D(t),n};/**
|
||||
* @license lucide-react v1.7.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const G=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],M=P("chevron-down",G);/**
|
||||
* @license lucide-react v1.7.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const V=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],T=P("chevron-right",V);function A(t){if(!t)return"-";const a=new Date(t*1e3),n=i=>String(i).padStart(2,"0");return`${a.getFullYear()}-${n(a.getMonth()+1)}-${n(a.getDate())} ${n(a.getHours())}:${n(a.getMinutes())}:${n(a.getSeconds())}`}function X(t){if(!t)return null;try{return JSON.parse(t)}catch{return null}}function se(){const{t}=I(),{symbol:a,rate:n}=O(),[i,u]=c.useState([]),[d,_]=c.useState(0),[x,p]=c.useState(1),[g,f]=c.useState(!0),[m,b]=c.useState(""),[h,v]=c.useState(""),[k,C]=c.useState({}),j=20,L=c.useCallback(async()=>{var s,r;f(!0);try{const o={p:x,page_size:j,type:2};m&&(o.model_name=m),h&&(o.token_name=h);const l=await U(o);l.data.success&&(u(((s=l.data.data)==null?void 0:s.items)||[]),_(((r=l.data.data)==null?void 0:r.total)||0))}catch{}f(!1)},[x,m,h]);c.useEffect(()=>{L()},[L]);const S=Math.max(1,Math.ceil(d/j)),F=s=>{C(r=>({...r,[s]:!r[s]}))},E=s=>{const r=X(s.other);if(!r)return[];const o=[];if(r.cache_tokens>0&&o.push({key:t("缓存命中 Tokens"),value:r.cache_tokens.toLocaleString()}),r.cache_creation_tokens>0&&o.push({key:t("缓存创建 Tokens"),value:r.cache_creation_tokens.toLocaleString()}),s.request_id&&o.push({key:"Request ID",value:s.request_id}),s.is_stream!==void 0&&o.push({key:t("流式"),value:s.is_stream?t("是"):t("否")}),s.is_stream&&r.frt){const l=(parseFloat(r.frt)/1e3).toFixed(1);o.push({key:t("首字时间"),value:`${l}s`})}return r.billing_source==="subscription"&&o.push({key:t("计费方式"),value:t("订阅抵扣")}),o};return e.jsxs("div",{className:"max-w-6xl 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:t("logs.title")}),e.jsx("p",{className:"text-sm text-page-secondary",children:t("logs.subtitle")})]}),e.jsx("div",{className:"glass rounded-2xl p-4 mb-6",children:e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsx("div",{className:"flex-1 min-w-[180px]",children:e.jsx("input",{type:"text",value:m,onChange:s=>{b(s.target.value),p(1)},className:"input w-full",placeholder:t("logs.filterModel")})}),e.jsx("div",{className:"flex-1 min-w-[180px]",children:e.jsx("input",{type:"text",value:h,onChange:s=>{v(s.target.value),p(1)},className:"input w-full",placeholder:t("logs.filterToken")})}),e.jsx("button",{onClick:()=>{b(""),v(""),p(1)},className:"btn-secondary text-sm",children:t("logs.clearFilter")})]})}),e.jsx("div",{className:"glass rounded-2xl overflow-hidden",children:g?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx("div",{className:"w-8 h-8 border-2 border-brand-500/30 border-t-brand-500 rounded-full animate-spin"})}):i.length===0?e.jsx("div",{className:"text-center py-16 text-page-secondary",children:e.jsx("p",{children:t("logs.noLogs")})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-page-divider",children:[e.jsx("th",{className:"w-8"}),e.jsx("th",{className:"text-left px-4 py-3 font-medium text-page-secondary",children:t("logs.time")}),e.jsx("th",{className:"text-left px-4 py-3 font-medium text-page-secondary",children:t("logs.model")}),e.jsx("th",{className:"text-left px-4 py-3 font-medium text-page-secondary",children:t("logs.token")}),e.jsx("th",{className:"text-right px-4 py-3 font-medium text-page-secondary",children:t("logs.promptTokens")}),e.jsx("th",{className:"text-right px-4 py-3 font-medium text-page-secondary",children:t("logs.completionTokens")}),e.jsx("th",{className:"text-right px-4 py-3 font-medium text-page-secondary",children:t("logs.cost")}),e.jsx("th",{className:"text-right px-4 py-3 font-medium text-page-secondary",children:t("logs.duration")})]})}),e.jsx("tbody",{children:i.map((s,r)=>{var N,w;const o=E(s),l=o.length>0,y=k[s.id];return e.jsxs(B.Fragment,{children:[e.jsxs("tr",{className:`border-b border-page-divider last:border-0 hover:bg-page-surface transition-colors ${l?"cursor-pointer":""}`,onClick:()=>l&&F(s.id),children:[e.jsx("td",{className:"px-2 py-3 text-page-secondary",children:l&&(y?e.jsx(M,{className:"w-4 h-4"}):e.jsx(T,{className:"w-4 h-4"}))}),e.jsx("td",{className:"px-4 py-3 text-page-secondary text-xs whitespace-nowrap",children:A(s.created_at)}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"font-mono text-xs text-page",children:s.model_name||"-"})}),e.jsx("td",{className:"px-4 py-3 text-xs text-page-secondary",children:s.token_name||"-"}),e.jsx("td",{className:"px-4 py-3 text-right font-mono text-xs text-page-label",children:((N=s.prompt_tokens)==null?void 0:N.toLocaleString())||"0"}),e.jsx("td",{className:"px-4 py-3 text-right font-mono text-xs text-page-label",children:((w=s.completion_tokens)==null?void 0:w.toLocaleString())||"0"}),e.jsx("td",{className:"px-4 py-3 text-right font-mono text-xs text-page-warning",children:s.quota>0?`${Line truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as R,b as W,d as z,r as c,p as I,q as T,s as w,j as e,Q as x,L as U,v as $,z as S}from"./index-5ebNoZ4G.js";import{c as K,R as O}from"./RotatingEquiv-DtY8eD1-.js";import{u as G}from"./useTranslation-DtgXIWa1.js";const _={never:"packages.resetNever",daily:"packages.resetDaily",weekly:"packages.resetWeekly",monthly:"packages.resetMonthly"};function L(a){return a?new Date(a*1e3).toLocaleDateString():""}function X(){const{t:a}=G(),{user:o,refreshUser:q}=R(),M=W(),{symbol:p,rate:m}=z(),[P,C]=c.useState([]),[b,F]=c.useState([]),[D,E]=c.useState(!0),[u,j]=c.useState(null),[N,v]=c.useState([]),[l,g]=c.useState(null),f=s=>a(_[s]||_.never);c.useEffect(()=>{Promise.all([I().then(s=>{s.data.success&&C(s.data.data||[])}).catch(()=>{}),T().then(s=>{s.data.success&&F(s.data.data||[])}).catch(()=>{})]).finally(()=>E(!1))},[]),c.useEffect(()=>{o&&w().then(s=>{s.data.success&&v(s.data.data||[])}).catch(()=>{})},[o]);const B=async s=>{if(!o){M("/register");return}g(s)},A=async()=>{if(!l)return;const s=l.id;j(s);try{const n=await $(s);n.data.success?(S.success(a("packages.subscribedSuccess")),g(null),await q(),w().then(t=>{t.data.success&&v(t.data.data||[])}).catch(()=>{})):S.error(n.data.message||a("common.requestFailed"))}catch{}j(null)},Q=c.useMemo(()=>b.filter(s=>s.enabled!==!1),[b]);if(D)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 k=P.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")})]}),N.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:N.map(s=>{const n=s.amount_total||0,t=s.amount_used||0,i=Math.max(0,n-t),d=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"),": ",L(s.end_time)]}),s.next_reset_time>0&&e.jsxs("span",{children:[a("packages.nextReset"),": ",L(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:`${d}%`}})}),e.jsxs("span",{className:"text-xs text-page-secondary whitespace-nowrap",children:[p,(i/x*m).toFixed(2)," / ",p,(n/x*m).toFixed(2)]})]})]},s.id)})})]}),k.length===0?e.jsxs("div",{className:"text-center py-12 text-page-secondary",children:[e.jsx("p",{children:a("packages.noPackages")}),e.jsxs(U,{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:k.map((s,n)=>{const t=s.quota_reset_period||"never",i=t!=="never",d=s.quota_amount>0?s.quota_amount/x:0;let h=d;if(i&&s.duration>0&&d>0){let r=1;t==="daily"?r=s.duration:t==="weekly"?r=Math.floor(s.duration/7):t==="monthly"&&(r=Math.floor(s.duration/30)),r<1&&(r=1),h=d*r}const y=K(Q,h);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}),i&&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:f(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:[p,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:[p,Number(s.original_price).toFixed(2)]})]}),s.duration>0&&e.jsx("p",{className:"text-sm text-page-muted mt-1",children:a("packages.daysAccess",{cLine truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{d as N,r as n,q as v,j as t}from"./index-5ebNoZ4G.js";import{u as w}from"./useTranslation-DtgXIWa1.js";function S(){const{t:s}=w(),{symbol:d,rate:c}=N(),[h,g]=n.useState([]),[x,f]=n.useState([]),[l,b]=n.useState(""),[r,p]=n.useState(""),[j,y]=n.useState(!0);n.useEffect(()=>{v().then(e=>{e.data.success&&(g(e.data.data||[]),f(e.data.vendors||[]))}).catch(()=>{}).finally(()=>y(!1))},[]);const i=h.filter(e=>e.enabled!==!1),m=n.useMemo(()=>{const e=new Set(i.map(a=>a.vendor_name).filter(Boolean));return x.filter(a=>e.has(a.name))},[i,x]),u=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 j?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")})]}),m.length>0&&t.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mb-6",children:[t.jsx("button",{onClick:()=>p(""),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")}),m.map(e=>t.jsx("button",{onClick:()=>p(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=>b(e.target.value),className:"input !pl-10",placeholder:s("pricing.searchPlaceholder")})]})}),u.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:u.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?`${d}${(Number(e.input_price)*1e3*c).toFixed(4)}`:"-"}),t.jsx("td",{className:"px-5 py-3.5 text-right font-mono text-page-label",children:e.output_price!=null?`${d}${(Number(e.output_price)*1e3*c).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{S as default};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as x,a as h,b as f,r as o,j as e,N as w,L as b,z as r}from"./index-5ebNoZ4G.js";import{u as j}from"./useTranslation-DtgXIWa1.js";function C(){const{t:s}=j(),{register:m,user:u}=x(),{site:l}=h(),p=f(),[a,i]=o.useState({username:"",password:"",password2:"",email:""}),[n,c]=o.useState(!1);if(o.useEffect(()=>{const t=new URLSearchParams(window.location.search).get("aff");t&&localStorage.setItem("dist_aff",t)},[]),u)return e.jsx(w,{to:"/dashboard",replace:!0});const g=async t=>{if(t.preventDefault(),!a.username||!a.password){r.error(s("register.fillRequired"));return}if(a.password!==a.password2){r.error(s("register.passwordMismatch"));return}if(a.password.length<8){r.error(s("register.passwordLength"));return}if(a.password.length>20){r.error(s("register.passwordLength"));return}c(!0);try{const d=new URLSearchParams(window.location.search).get("aff")||localStorage.getItem("dist_aff")||"";if((await m({username:a.username,password:a.password,email:a.email||void 0,aff_code:d||void 0})).success){r.success(s("register.accountCreated")),p("/login",{replace:!0});return}}catch{}c(!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:g,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:a.username,onChange:t=>i({...a,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:a.email,onChange:t=>i({...a,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:a.password,onChange:t=>i({...a,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:a.password2,onChange:t=>i({...a,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{C as default};
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{r as s,j as P}from"./index-5ebNoZ4G.js";const c=[{pattern:"claude-opus-4-5",label:"Claude Opus 4.5",inputPerMtok:5},{pattern:"claude-opus-4-6",label:"Claude Opus 4.6",inputPerMtok:5},{pattern:"claude-opus-4-1",label:"Claude Opus 4.1",inputPerMtok:15},{pattern:"claude-opus-4",label:"Claude Opus 4",inputPerMtok:15},{pattern:"claude-3-opus",label:"Claude 3 Opus",inputPerMtok:15},{pattern:"claude-sonnet-4-5",label:"Claude Sonnet 4.5",inputPerMtok:3},{pattern:"claude-sonnet-4-6",label:"Claude Sonnet 4.6",inputPerMtok:3},{pattern:"claude-sonnet-4",label:"Claude Sonnet 4",inputPerMtok:3},{pattern:"claude-3-7-sonnet",label:"Claude 3.7 Sonnet",inputPerMtok:3},{pattern:"claude-3-5-sonnet",label:"Claude 3.5 Sonnet",inputPerMtok:3},{pattern:"claude-haiku-4-5",label:"Claude Haiku 4.5",inputPerMtok:1},{pattern:"claude-3-5-haiku",label:"Claude 3.5 Haiku",inputPerMtok:.8},{pattern:"claude-3-haiku",label:"Claude 3 Haiku",inputPerMtok:.25},{pattern:"gpt-4o-mini",label:"GPT-4o Mini",inputPerMtok:.15},{pattern:"gpt-4o-2024-05-13",label:"GPT-4o",inputPerMtok:5},{pattern:"chatgpt-4o-latest",label:"GPT-4o",inputPerMtok:5},{pattern:"gpt-4o",label:"GPT-4o",inputPerMtok:2.5},{pattern:"gpt-4.1-mini",label:"GPT-4.1 Mini",inputPerMtok:.4},{pattern:"gpt-4.1-nano",label:"GPT-4.1 Nano",inputPerMtok:.1},{pattern:"gpt-4.1",label:"GPT-4.1",inputPerMtok:2},{pattern:"gpt-5.4",label:"GPT-5.4",inputPerMtok:2.5},{pattern:"gpt-5.3",label:"GPT-5.3",inputPerMtok:1.75},{pattern:"gpt-5.2",label:"GPT-5.2",inputPerMtok:1.75},{pattern:"gpt-5.1",label:"GPT-5.1",inputPerMtok:1.25},{pattern:"gemini-2.5-flash-lite",label:"Gemini 2.5 Flash Lite",inputPerMtok:.04},{pattern:"gemini-2.5-flash",label:"Gemini 2.5 Flash",inputPerMtok:.15},{pattern:"gemini-2.5-pro",label:"Gemini 2.5 Pro",inputPerMtok:1.25},{pattern:"gemini-2.0-flash",label:"Gemini 2.0 Flash",inputPerMtok:.1},{pattern:"gemini-1.5-pro",label:"Gemini 1.5 Pro",inputPerMtok:1.25},{pattern:"gemini-1.5-flash",label:"Gemini 1.5 Flash",inputPerMtok:.075},{pattern:"deepseek-r1",label:"DeepSeek R1",inputPerMtok:.55},{pattern:"deepseek-chat",label:"DeepSeek V3",inputPerMtok:.27},{pattern:"deepseek-v3",label:"DeepSeek V3",inputPerMtok:.27}];function b(e,r){if(!e||e.length===0||r<=0)return[];const l={};for(const t of e){const n=Number(t.input_price);if(!n||n<=0)continue;const o=(t.model_name||"").toLowerCase();for(const a of c)if(o.includes(a.pattern.toLowerCase())){const p=n*1e3,u=a.inputPerMtok/p,i=r*u;i>r&&(!l[a.label]||i>l[a.label])&&(l[a.label]=i);break}}return Object.entries(l).map(([t,n])=>({label:t,equivDollars:Math.round(n)})).sort((t,n)=>n.equivDollars-t.equivDollars).slice(0,3)}function M({items:e,text:r,className:l="",interval:t=3e3}){const[n,o]=s.useState(0),[a,p]=s.useState(!0);return s.useEffect(()=>{if(e.length<=1)return;const u=setInterval(()=>{p(!1),setTimeout(()=>{o(i=>(i+1)%e.length),p(!0)},300)},t);return()=>clearInterval(u)},[e.length,t]),!e||e.length===0?null:P.jsx("span",{className:`inline-block transition-all duration-300 ${a?"opacity-100 translate-y-0":"opacity-0 translate-y-1"} ${l}`,children:r(e[n])})}export{M as R,b as c};
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{u as _,a as k,r as c,G as S,j as e,L as v,z as h,H as w}from"./index-5ebNoZ4G.js";import{u as C}from"./useTranslation-DtgXIWa1.js";function E(s){const n=s.data,m=s.url;if(!n||!m)return;const r=document.createElement("form");r.action=m,r.method="POST",navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<1||(r.target="_blank"),Object.keys(n).forEach(t=>{const o=document.createElement("input");o.type="hidden",o.name=t,o.value=n[t],r.appendChild(o)}),document.body.appendChild(r),r.submit(),document.body.removeChild(r)}function T(){const{t:s}=C(),{user:n}=_(),{site:m}=k(),[r,j]=c.useState(!0),[t,o]=c.useState(null),[y,N]=c.useState(!1),[p,f]=c.useState(null),[a,u]=c.useState({name:"",slug:"",payment_method:"",chain:"tron",token:"usdt"});c.useEffect(()=>{S().then(i=>{var x;if(i.data.success){const d=i.data.data;o(d),((x=d.pay_methods)==null?void 0:x.length)>0&&u(l=>({...l,payment_method:d.pay_methods[0].type}))}}).catch(()=>{}).finally(()=>j(!1))},[]);const b=(t==null?void 0:t.pay_methods)||[],g=c.useMemo(()=>b.find(i=>i.type===a.payment_method),[b,a.payment_method]),D=async i=>{var x;if(i.preventDefault(),!n){h.error(s("subDist.loginRequired"));return}if(!a.name.trim()||!a.slug.trim()){h.error(s("subDist.fillRequired"));return}if(!a.payment_method){h.error(s("subDist.selectPayment"));return}N(!0),f(null);try{const d={name:a.name.trim(),slug:a.slug.trim().toLowerCase(),payment_method:a.payment_method,return_url:(t==null?void 0:t.manage_url)||""};a.payment_method==="crypto"&&(d.chain=a.chain,d.token=a.token);const l=await w(d);l.data.message==="success"?l.data.payment_type==="stripe"&&((x=l.data.data)!=null&&x.pay_link)?window.open(l.data.data.pay_link,"_blank"):l.data.payment_type==="crypto"?f(l.data.data):E(l.data):l.data.data&&h.error(typeof l.data.data=="string"?l.data.data:s("subDist.createFailed"))}catch{}N(!1)};return r?e.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:e.jsx("div",{className:"w-8 h-8 rounded-full border-2 border-white/20 border-t-white animate-spin"})}):e.jsx("div",{className:"max-w-5xl mx-auto px-6 py-12",children:e.jsxs("div",{className:"grid lg:grid-cols-[1.1fr_0.9fr] gap-6 items-start",children:[e.jsxs("div",{className:"glass rounded-3xl p-8",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("p",{className:"text-sm text-page-link font-medium mb-3",children:s("subDist.badge")}),e.jsx("h1",{className:"text-3xl font-heading font-bold text-page mb-3",children:s("subDist.title")}),e.jsx("p",{className:"text-sm text-page-secondary leading-6",children:s("subDist.subtitle",{name:(m==null?void 0:m.name)||s("subDist.defaultSiteName")})})]}),t!=null&&t.enabled?n?e.jsxs("form",{onSubmit:D,className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("subDist.siteName")}),e.jsx("input",{value:a.name,onChange:i=>u({...a,name:i.target.value}),className:"input",placeholder:s("subDist.siteNamePlaceholder"),required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("subDist.siteSlug")}),e.jsx("input",{value:a.slug,onChange:i=>u({...a,slug:i.target.value.toLowerCase()}),className:"input",placeholder:"my-sub-site",required:!0}),e.jsx("p",{className:"text-xs text-page-muted mt-2",children:s("subDist.siteSlugHelp")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("subDist.paymentMethod")}),e.jsx("div",{className:"grid sm:grid-cols-2 gap-3",children:b.map(i=>e.jsxs("label",{className:`rounded-2xl border px-4 py-3 cursor-pointer transition-colors ${a.payment_method===i.type?"border-page-link bg-page-link/10":"border-border hover:bg-page-surface-hover"}`,children:[e.jsx("input",{type:"radio",className:"sr-only",checked:a.payment_method===i.type,onChange:()=>u({...a,payment_method:i.type})}),e.jsx("div",{className:"text-sm font-medium text-page",children:i.name||i.type})]},i.type))})]}),a.payment_method==="crypto"&&e.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("subDist.chain")}),e.jsxs("select",{value:a.chain,onChange:i=>u({...a,chain:i.target.value}),className:"input",children:[e.jsx("option",{value:"tron",children:"TRON (TRC20)"}),e.jsx("option",{value:"eth",children:"Ethereum (ERC20)"}),e.jsx("option",{value:"bsc",children:"BSC (BEP20)"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-page-label mb-2",children:s("subDist.token")}),e.jsxs("select",{value:a.token,onChange:i=>u({...a,token:i.target.value}),className:"input",children:[e.jsx("option",{value:"usdt",children:"USDT"}),e.jsx("option",{value:"usdc",children:"USDC"})]})]})]}),e.jsxs("button",{type:"submit",disabled:y,className:"btn-primary w-full justify-center flex items-center gap-2",children:[y&&e.jsx("span",{cLine truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{r as l,k as M,l as W,j as e,z as k,m as A,n as R,o as $}from"./index-5ebNoZ4G.js";import{u as F}from"./useTranslation-DtgXIWa1.js";function J(){const{t:s}=F(),[p,N]=l.useState([]),[c,u]=l.useState(!0),[r,h]=l.useState(null),[d,w]=l.useState(null),[b,f]=l.useState(null),[g,T]=l.useState([]),[D,o]=l.useState(!1),[v,j]=l.useState(""),[y,i]=l.useState(0),[C,S]=l.useState(!1),x=l.useCallback(async()=>{u(!0);try{const[t,n]=await Promise.all([M(),W().catch(()=>({data:{success:!1}}))]);t.data.success&&N(t.data.data||[]),n.data.success&&T(n.data.data||[])}catch{}u(!1)},[]);l.useEffect(()=>{x()},[x]);const L=l.useMemo(()=>{const t={};return g.forEach(n=>{const a=n.vendor_category||s("tokens.otherGroups");t[a]||(t[a]=[]),t[a].push(n)}),t},[g,s]),z=t=>{t.is_unavailable||(i(t.id),j(t.name),o(!0))},E=()=>{i(0),j(""),o(!0)},H=async t=>{var n;if(t.preventDefault(),!v.trim()){k.error(s("tokens.enterName"));return}S(!0);try{const a={name:v.trim()};y>0&&(a.key_group_id=y);const _=await A(a);if(_.data.success){j(""),o(!1),i(0);const K=(n=_.data.data)==null?void 0:n.key;K&&w(K),await x()}}catch{}S(!1)},P=async t=>{try{(await R(t.id,{status:t.status===1?2:1})).data.success&&(k.success(t.status===1?s("tokens.tokenDisabled"):s("tokens.tokenEnabled")),await x())}catch{}},B=async()=>{if(b)try{(await $(b.id)).data.success&&(k.success(s("tokens.tokenDeleted")),f(null),await x())}catch{}},G=async t=>{try{await navigator.clipboard.writeText(t)}catch{const a=document.createElement("textarea");a.value=t,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a)}h(t),k.success(s("tokens.copiedToClipboard")),setTimeout(()=>h(null),2e3)},I=t=>{try{return JSON.parse(t||"[]")}catch{return[]}};if(c)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 m=g.length>0;return e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-10",children:[e.jsxs("div",{className:"mb-10",children:[e.jsx("h1",{className:"text-2xl font-heading font-bold text-page",children:s(m?"tokens.selectGroup":"tokens.title")}),m&&e.jsx("p",{className:"text-sm text-page-secondary mt-1",children:s("tokens.selectGroupSubtitle")}),e.jsx("div",{className:"mt-6",children:e.jsxs("button",{onClick:E,className:"w-full glass rounded-xl p-4 flex items-center gap-4 hover:border-brand-500/50 border border-page-divider transition-all group text-left",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-brand-500/10 flex items-center justify-center flex-shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-brand-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 4v16m8-8H4"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-page",children:s(m?"tokens.defaultGroup":"tokens.newKey")}),m&&e.jsx("p",{className:"text-xs text-page-secondary mt-0.5",children:s("tokens.defaultGroupDesc")})]}),e.jsxs("span",{className:"text-xs font-medium text-brand-500 opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-1",children:[s("tokens.create")," →"]})]})}),m&&Object.entries(L).map(([t,n])=>e.jsxs("div",{className:"mt-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("h2",{className:"text-base font-semibold text-page",children:t}),e.jsxs("span",{className:"text-[11px] text-page-muted bg-page-surface px-2 py-0.5 rounded-full",children:[n.length," ",s("tokens.groupCount")]})]}),e.jsx("div",{className:"space-y-2",children:n.map(a=>e.jsx(O,{group:a,parseTags:I,onSelect:z,t:s},a.id))})]},t))]}),D&&e.jsx("div",{className:"modal-overlay fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>{o(!1),i(0)},children:e.jsxs("div",{className:"glass rounded-2xl p-6 w-full max-w-md",onClick:t=>t.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold text-page mb-4",children:s("tokens.createApiKey")}),y>0&&(()=>{const t=g.find(n=>n.id===y);return t?e.jsxs("div",{className:"mb-4 p-3 rounded-lg bg-page-surface border border-page-divider",children:[e.jsx("p",{className:"text-xs text-page-muted",children:s("tokens.selectedGroup")}),e.jsx("p",{className:"text-sm font-medium text-page",children:t.name})]}):null})(),e.jsxs("form",{onSubmit:H,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:v,onChange:t=>j(t.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:()=>{o(!1),i(0)},className:"btn-secondary",children:s("tokens.cancel")}),e.jsx("butLine truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{u as Te,a as Oe,d as Ee,r as l,g as $e,w as Le,j as e,Q as re,f as Ue,z as d,x as He,y as Re,A as De,B as Fe,C as Ve,D as ze,E as Be}from"./index-5ebNoZ4G.js";import{C as L}from"./CountUp-EtJN562p.js";import{u as Qe}from"./useTranslation-DtgXIWa1.js";function Xe(){var te;const{t:s}=Qe(),{user:i,refreshUser:U}=Te(),{site:o}=Oe(),{symbol:k,rate:m}=Ee(),[p,ne]=l.useState(null),[r,le]=l.useState(null),[oe,H]=l.useState(!0),[O,R]=l.useState(""),[D,F]=l.useState(!1),[b,V]=l.useState(""),[ce,z]=l.useState(null),[B,Q]=l.useState(null),[de,W]=l.useState(!1),[y,f]=l.useState(!1),[E,j]=l.useState(""),[_,P]=l.useState(null),[ie,N]=l.useState(!1),[u,J]=l.useState(""),[A,me]=l.useState("usdt"),[v,pe]=l.useState(null),[M,ue]=l.useState(!1),[G,xe]=l.useState([]),[ge,K]=l.useState(!1);o!=null&&o.enable_topup,o==null||o.topup_config;const q=l.useCallback(async()=>{var t;H(!0);try{const[a,n]=await Promise.all([$e(),o!=null&&o.enable_topup?Le().catch(()=>null):Promise.resolve(null)]);a.data.success&&ne(a.data.data),(t=n==null?void 0:n.data)!=null&&t.data&&le(n.data.data)}catch{}H(!1)},[o==null?void 0:o.enable_topup]);l.useEffect(()=>{q()},[q]);const X=(p==null?void 0:p.quota)??(i==null?void 0:i.quota)??0,he=(p==null?void 0:p.used_quota)??(i==null?void 0:i.used_quota)??0,be=(p==null?void 0:p.request_count)??(i==null?void 0:i.request_count)??0,ye=X/re*m,fe=async t=>{if(t.preventDefault(),!!O.trim()){F(!0);try{(await Ue(O.trim())).data.success&&(d.success(s("topup.redeemSuccess")),R(""),await Promise.all([q(),U()]))}catch{}F(!1)}},Y=async t=>{if(!t||t<=0){Q(null);return}W(!0);try{const a=await He({amount:parseInt(t)});a.data.message==="success"&&Q(a.data.data)}catch{}W(!1)},je=t=>{z(t),V(t),Y(t)},Ne=t=>["stripe","alipay","wxpay"].includes(t)&&!t.startsWith("epay_"),ve=async t=>{var n;const a=parseInt(b);if(!a||a<=0){d.error(s("topup.enterAmount"));return}f(!0),j(t);try{const x=window.location.origin+"/topup",S={amount:a,payment_method:t,return_url:x};if(Ne(t)){const c=await Re(S);if(c.data.message==="success"&&((n=c.data.data)!=null&&n.pay_link))window.open(c.data.data.pay_link,"_blank");else if(c.data.message!=="success"){const g=typeof c.data.data=="string"?c.data.data:c.data.message;d.error(g||s("common.requestFailed"))}}else{const c=await De(S);if(c.data.message==="success"){const g=c.data.data,se=c.data.url;if(se&&g){const h=document.createElement("form");h.action=se,h.method="POST",navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<1||(h.target="_blank");for(const ae in g){const T=document.createElement("input");T.type="hidden",T.name=ae,T.value=g[ae],h.appendChild(T)}document.body.appendChild(h),h.submit(),document.body.removeChild(h)}}else{const g=typeof c.data.data=="string"?c.data.data:c.data.message;d.error(g||s("common.requestFailed"))}}}catch{}f(!1),j("")},we=async t=>{var a;f(!0),j("creem");try{const n=await Fe({product_id:t.productId,payment_method:"creem"});if(n.data.message==="success"&&((a=n.data.data)!=null&&a.checkout_url))window.open(n.data.data.checkout_url,"_blank");else if(n.data.message!=="success"){const x=typeof n.data.data=="string"?n.data.data:n.data.message;d.error(x||s("common.requestFailed"))}}catch{}f(!1),j("")},Ce=async()=>{const t=parseInt(b);if(!t||t<=0){d.error(s("topup.enterAmount"));return}if(!u){d.error(s("topup.selectChain"));return}if(!A){d.error(s("topup.selectToken"));return}f(!0),j("crypto");try{const a=await Ve({amount:t,chain:u,token:A});if(a.data.message==="success"&&a.data.data)P(a.data.data),_e(a.data.data.trade_no);else if(a.data.message!=="success"){const n=typeof a.data.data=="string"?a.data.data:a.data.message;d.error(n||s("common.requestFailed"))}}catch{}f(!1),j("")},_e=t=>{N(!0);const a=setInterval(async()=>{var x,S;try{const c=await ze(t);((x=c.data.data)==null?void 0:x.status)==="success"?(clearInterval(a),N(!1),P(null),d.success(s("topup.paymentSuccess")),await Promise.all([q(),U()])):((S=c.data.data)==null?void 0:S.status)==="expired"&&(clearInterval(a),N(!1),d.error(s("topup.orderExpired")))}catch{clearInterval(a),N(!1)}},5e3),n=((r==null?void 0:r.crypto_expiry_minutes)||30)*60*1e3;setTimeout(()=>{clearInterval(a),N(!1)},n)},w=(r==null?void 0:r.crypto_wallets)||{},C=l.useMemo(()=>{const t=[];return w.tron&&t.push({key:"tron",label:"TRON (TRC20)"}),w.eth&&t.push({key:"eth",label:"Ethereum (ERC20)"}),w.bsc&&t.push({key:"bsc",label:"BSC (BEP20)"}),t},[w.tron,w.eth,w.bsc]);l.useEffect(()=>{C.length>0&&!u&&J(C[0].key)},[C,u]);const Z=l.useMemo(()=>{if(!(r!=null&&r.creem_products))return[];try{const t=typeof r.creem_products=="string"?JSON.parse(r.creem_products):r.creem_products;return Array.isArray(t)?t:[]}catch{return[]}},[r==null?void 0:r.creem_products]),Se=async()=>{var t;K(!0);try{const a=await Be({page:1,page_size:20});(t=a.data.data)!=null&&t.items&&xe(a.data.data.items)}catch{}K(!1)},ke=(r==null?void 0:r.amount_options)||[1,5,10,20,50,100],I=(r==null?void 0:r.min_topup)||1,Pe=(r==null?void 0:r.pay_methods)||[],Ae=r==null?void 0:rLine truncated
|
||||
Vendored
+249
@@ -0,0 +1,249 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Home-CrQmtAj-.js","assets/RotatingEquiv-DtY8eD1-.js","assets/CountUp-EtJN562p.js","assets/FadeContent-haPY8_9U.js","assets/useTranslation-DtgXIWa1.js","assets/Layout-DxUSmE9O.js","assets/LanguageSwitch-Cw_oTQ4Q.js","assets/Home-DbDsZAWc.js","assets/Layout-Dur8djbt.js","assets/Home-D7gAkKjK.js","assets/Layout-BrDw4pat.js","assets/Home-D76ZeREU.js","assets/Layout-C0E9QJP6.js","assets/Home-BB0hPlsI.js","assets/Layout-KY1VbTVw.js","assets/Home-BdYyppNq.js","assets/Layout-DQUzJGPy.js","assets/Home-B7p9zVhM.js","assets/Layout-BvCaeVY5.js","assets/Login-CHg4KyLI.js","assets/Register-BAdHnOci.js","assets/Dashboard-DxpuueVl.js","assets/Tokens-fxT6770k.js","assets/Packages-BWY2JY2J.js","assets/Pricing-52D2kO7r.js","assets/Topup-CH_TwBC2.js","assets/Logs-75jUv-ty.js","assets/SubDistributor-BC-0vxXM.js"])))=>i.map(i=>d[i]);
|
||||
function Vp(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Kp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dc={exports:{}},gi={},Ic={exports:{}},$={};/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Kr=Symbol.for("react.element"),Wp=Symbol.for("react.portal"),qp=Symbol.for("react.fragment"),Qp=Symbol.for("react.strict_mode"),Gp=Symbol.for("react.profiler"),Jp=Symbol.for("react.provider"),Yp=Symbol.for("react.context"),Xp=Symbol.for("react.forward_ref"),Zp=Symbol.for("react.suspense"),eh=Symbol.for("react.memo"),th=Symbol.for("react.lazy"),Aa=Symbol.iterator;function nh(e){return e===null||typeof e!="object"?null:(e=Aa&&e[Aa]||e["@@iterator"],typeof e=="function"?e:null)}var bc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Fc=Object.assign,jc={};function Wn(e,t,n){this.props=e,this.context=t,this.refs=jc,this.updater=n||bc}Wn.prototype.isReactComponent={};Wn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Wn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function $c(){}$c.prototype=Wn.prototype;function Ol(e,t,n){this.props=e,this.context=t,this.refs=jc,this.updater=n||bc}var _l=Ol.prototype=new $c;_l.constructor=Ol;Fc(_l,Wn.prototype);_l.isPureReactComponent=!0;var Da=Array.isArray,zc=Object.prototype.hasOwnProperty,Tl={current:null},Uc={key:!0,ref:!0,__self:!0,__source:!0};function Mc(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)zc.call(t,r)&&!Uc.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];o.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:Kr,type:e,key:i,ref:s,props:o,_owner:Tl.current}}function rh(e,t){return{$$typeof:Kr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ll(e){return typeof e=="object"&&e!==null&&e.$$typeof===Kr}function oh(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ia=/\/+/g;function Mi(e,t){return typeof e=="object"&&e!==null&&e.key!=null?oh(""+e.key):t.toString(36)}function Co(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Kr:case Wp:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Mi(s,0):r,Da(o)?(n="",e!=null&&(n=e.replace(Ia,"$&/")+"/"),Co(o,t,n,"",function(u){return u})):o!=null&&(Ll(o)&&(o=rh(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Ia,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Da(e))for(var l=0;l<e.length;l++){i=e[l];var a=r+Mi(i,l);s+=Co(i,t,n,a,o)}else if(a=nh(e),typeof a=="function")for(e=a.call(e),l=0;!(i=e.next()).done;)i=i.value,a=r+Mi(i,l++),s+=Co(i,t,n,a,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function ro(e,t,n){if(e==null)return e;var r=[],o=0;return Co(e,r,"","",function(i){return t.call(n,i,o++)}),r}function ih(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ce={current:null},Po={transition:null},sh={ReactCurrentDispatcher:Ce,ReactCurrentBatchConfig:Po,ReactCurrentOwner:Tl};function Bc(){throw Error("act(...) is not supported in production builds of React.")}$.Children={map:ro,forEach:function(e,t,n){ro(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ro(e,function(){t++}),t},toArray:function(e){return ro(e,function(t){return t})||[]},only:function(e){if(!Ll(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};$.Component=Wn;$.Fragment=qp;$.Profiler=Gp;$.PureComponent=Ol;$.StrictMode=Qp;$.Suspense=Zp;$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sh;$.act=Bc;$.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Fc({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Tl.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)zc.call(t,a)&&!Uc.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Kr,type:e.type,key:o,ref:i,props:r,_owner:s}};$.createContext=function(e){return e={$$typeof:Yp,_currentValue:e,_currentValue2:e,_threadCount:0,ProviderLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var ah=x,uh=Symbol.for("react.element"),ch=Symbol.for("react.fragment"),fh=Object.prototype.hasOwnProperty,dh=ah.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ph={key:!0,ref:!0,__self:!0,__source:!0};function Hc(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)fh.call(t,r)&&!ph.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:uh,type:e,key:i,ref:s,props:o,_owner:dh.current}}gi.Fragment=ch;gi.jsx=Hc;gi.jsxs=Hc;Dc.exports=gi;var N=Dc.exports,Es={},Vc={exports:{}},Ue={},Kc={exports:{}},Wc={};/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/(function(e){function t(R,A){var F=R.length;R.push(A);e:for(;0<F;){var b=F-1>>>1,z=R[b];if(0<o(z,A))R[b]=A,R[F]=z,F=b;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var A=R[0],F=R.pop();if(F!==A){R[0]=F;e:for(var b=0,z=R.length,Oe=z>>>1;b<Oe;){var ke=2*(b+1)-1,ft=R[ke],Yt=ke+1,no=R[Yt];if(0>o(ft,F))Yt<z&&0>o(no,ft)?(R[b]=no,R[Yt]=F,b=Yt):(R[b]=ft,R[ke]=F,b=ke);else if(Yt<z&&0>o(no,F))R[b]=no,R[Yt]=F,b=Yt;else break e}}return A}function o(R,A){var F=R.sortIndex-A.sortIndex;return F!==0?F:R.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,f=null,p=3,y=!1,d=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(R){for(var A=n(u);A!==null;){if(A.callback===null)r(u);else if(A.startTime<=R)r(u),A.sortIndex=A.expirationTime,t(a,A);else break;A=n(u)}}function k(R){if(v=!1,g(R),!d)if(n(a)!==null)d=!0,B(E);else{var A=n(u);A!==null&&he(k,A.startTime-R)}}function E(R,A){d=!1,v&&(v=!1,m(T),T=-1),y=!0;var F=p;try{for(g(A),f=n(a);f!==null&&(!(f.expirationTime>A)||R&&!pe());){var b=f.callback;if(typeof b=="function"){f.callback=null,p=f.priorityLevel;var z=b(f.expirationTime<=A);A=e.unstable_now(),typeof z=="function"?f.callback=z:f===n(a)&&r(a),g(A)}else r(a);f=n(a)}if(f!==null)var Oe=!0;else{var ke=n(u);ke!==null&&he(k,ke.startTime-A),Oe=!1}return Oe}finally{f=null,p=F,y=!1}}var O=!1,P=null,T=-1,j=5,L=-1;function pe(){return!(e.unstable_now()-L<j)}function Be(){if(P!==null){var R=e.unstable_now();L=R;var A=!0;try{A=P(!0,R)}finally{A?V():(O=!1,P=null)}}else O=!1}var V;if(typeof h=="function")V=function(){h(Be)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,Jt=Z.port2;Z.port1.onmessage=Be,V=function(){Jt.postMessage(null)}}else V=function(){w(Be,0)};function B(R){P=R,O||(O=!0,V())}function he(R,A){T=w(function(){R(e.unstable_now())},A)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){d||y||(d=!0,B(E))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(R){switch(p){case 1:case 2:case 3:var A=3;break;default:A=p}var F=p;p=A;try{return R()}finally{p=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,A){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var F=p;p=R;try{return A()}finally{p=F}},e.unstable_scheduleCallback=function(R,A,F){var b=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?b+F:b):F=b,R){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=F+z,R={id:c++,callback:A,priorityLevel:R,startTime:F,expirationTime:z,sortIndex:-1},F>b?(R.sortIndex=F,t(u,R),n(a)===null&&R===n(u)&&(v?(m(T),T=-1):v=!0,he(k,F-b))):(R.sortIndex=z,t(a,R),d||y||(d=!0,B(E))),R},e.unstable_shouldYield=pe,e.unstable_wrapCallback=function(R){var A=p;return function(){var F=p;p=A;try{return R.apply(this,arguments)}finally{p=F}}}})(Wc);Kc.exports=Wc;var hh=Kc.exports;/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var mh=x,ze=hh;function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var qc=new Set,Pr={};function mn(e,t){$n(e,t),$n(e+"Capture",t)}function $n(e,t){for(Pr[e]=t,e=0;e<t.length;e++)qc.add(t[e])}var vt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cs=Object.prototype.hasOwnProperty,gh=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ba={},Fa={};function yh(e){return Cs.call(Fa,e)?!0:Cs.call(ba,e)?!1:gh.test(e)?Fa[e]=!0:(ba[e]=!0,!1)}function vh(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function wh(e,t,n,r){if(t===null||typeof t>"u"||vh(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Pe(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var de={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){de[e]=new Pe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];de[t]=new Pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){de[e]=new Pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){de[e]=new Pe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){de[e]=new Pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){de[e]=new Pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){de[e]=new Pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){de[e]=new Pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){de[e]=new Pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nl=/[\-:]([a-z])/g;function Al(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Nl,Al);de[t]=new Pe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Nl,Al);de[t]=new Pe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Nl,Al);de[t]=new Pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){de[e]=new Pe(e,1,!1,e.toLowerCase(),null,!1,!1)});de.xlinkHref=new Pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){de[e]=new Pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Dl(e,t,n,r){var o=de.hasOwnProperty(t)?de[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="
Line truncated
|
||||
`+Bi+e}var Hi=!1;function Vi(e,t){if(!e||Hi)return"";Hi=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
||||
`),i=r.stack.split(`
|
||||
`),s=o.length-1,l=i.length-1;1<=s&&0<=l&&o[s]!==i[l];)l--;for(;1<=s&&0<=l;s--,l--)if(o[s]!==i[l]){if(s!==1||l!==1)do if(s--,l--,0>l||o[s]!==i[l]){var a=`
|
||||
`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{Hi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ur(e):""}function Sh(e){switch(e.tag){case 5:return ur(e.type);case 16:return ur("Lazy");case 13:return ur("Suspense");case 19:return ur("SuspenseList");case 0:case 2:case 15:return e=Vi(e.type,!1),e;case 11:return e=Vi(e.type.render,!1),e;case 1:return e=Vi(e.type,!0),e;default:return""}}function _s(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case kn:return"Fragment";case Sn:return"Portal";case Ps:return"Profiler";case Il:return"StrictMode";case Rs:return"Suspense";case Os:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Gc:return(e.displayName||"Context")+".Consumer";case Qc:return(e._context.displayName||"Context")+".Provider";case bl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fl:return t=e.displayName||null,t!==null?t:_s(e.type)||"Memo";case Rt:t=e._payload,e=e._init;try{return _s(e(t))}catch{}}return null}function kh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _s(t);case 8:return t===Il?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ht(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xh(e){var t=Yc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function io(e){e._valueTracker||(e._valueTracker=xh(e))}function Xc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Yc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Uo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ts(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $a(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ht(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Zc(e,t){t=t.checked,t!=null&&Dl(e,"checked",t,!1)}function Ls(e,t){Zc(e,t);var n=Ht(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ns(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ns(e,t.type,Ht(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function za(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ns(e,t,n){(t!=="number"||Uo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var cr=Array.isArray;function An(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ht(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function As(e,t){if(t.dang
Line truncated
|
||||
`).replace(Am,"")}function ho(e,t,n){if(t=au(t),au(e)!==t&&n)throw Error(C(425))}function Qo(){}var Ks=null,Ws=null;function qs(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Qs=typeof setTimeout=="function"?setTimeout:void 0,Dm=typeof clearTimeout=="function"?clearTimeout:void 0,uu=typeof Promise=="function"?Promise:void 0,Im=typeof queueMicrotask=="function"?queueMicrotask:typeof uu<"u"?function(e){return uu.resolve(null).then(e).catch(bm)}:Qs;function bm(e){setTimeout(function(){throw e})}function rs(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Lr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Lr(t)}function jt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function cu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Qn=Math.random().toString(36).slice(2),st="__reactFiber$"+Qn,br="__reactProps$"+Qn,wt="__reactContainer$"+Qn,Gs="__reactEvents$"+Qn,Fm="__reactListeners$"+Qn,jm="__reactHandles$"+Qn;function tn(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[wt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=cu(e);e!==null;){if(n=e[st])return n;e=cu(e)}return t}e=n,n=e.parentNode}return null}function Qr(e){return e=e[st]||e[wt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Pn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(C(33))}function ki(e){return e[br]||null}var Js=[],Rn=-1;function Wt(e){return{current:e}}function q(e){0>Rn||(e.current=Js[Rn],Js[Rn]=null,Rn--)}function K(e,t){Rn++,Js[Rn]=e.current,e.current=t}var Vt={},Se=Wt(Vt),Ne=Wt(!1),un=Vt;function zn(e,t){var n=e.type.contextTypes;if(!n)return Vt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ae(e){return e=e.childContextTypes,e!=null}function Go(){q(Ne),q(Se)}function fu(e,t,n){if(Se.current!==Vt)throw Error(C(168));K(Se,t),K(Ne,n)}function Bf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(C(108,kh(e)||"Unknown",o));return X({},n,r)}function Jo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vt,un=Se.current,K(Se,e),K(Ne,Ne.current),!0}function du(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=Bf(e,t,un),r.__reactInternalMemoizedMergedChildContext=e,q(Ne),q(Se),K(Se,e)):q(Ne),K(Ne,n)}var ht=null,xi=!1,os=!1;function Hf(e){ht===null?ht=[e]:ht.push(e)}function $m(e){xi=!0,Hf(e)}function qt(){if(!os&&ht!==null){os=!0;var e=0,t=H;try{var n=ht;for(H=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ht=null,xi=!1}catch(o){throw ht!==null&&(ht=ht.slice(e+1)),hf($l,qt),o}finally{H=t,os=!1}}return null}var On=[],_n=0,Yo=null,Xo=0,Ve=[],Ke=0,cn=null,mt=1,gt="";function Zt(e,t){On[_n++]=Xo,On[_n++]=Yo,Yo=e,Xo=t}function Vf(e,t,n){Ve[Ke++]=mt,Ve[Ke++]=gt,Ve[Ke++]=cn,cn=e;var r=mt;e=gt;var o=32-et(r)-1;r&=~(1<<o),n+=1;var i=32-et(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,mt=1<<32-et(t)+o|n<<o|r,gt=i+e}else mt=1<<i|n<<o|r,gt=e}function ql(e){e.return!==null&&(Zt(e,1),Vf(e,1,0))}function Ql(e){for(;e===Yo;)Yo=On[--_n],On[_n]=null,Xo=On[--_n],On[_n]=null;for(;e===cn;)cn=Ve[--Ke],Ve[Ke]=null,gt=Ve[--Ke],Ve[Ke]=null,mt=Ve[--Ke],Ve[Ke]=null}var $e=null,je=null,Q=!1,Ze=null;function Kf(e,t){var n=We(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function pu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,$e=e,je=jt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,$e=e,je=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=cn!==null?{id:mt,overflow:gt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=We(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,$e=e,je=null,!0):!1;default:return!1}}function Ys(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Xs(e){if(Q){var t=je;if(t){var n=t;if(!pu(e,t)){if(Ys(e))throw Error(C(418));t=jt(n.nextSibling);var r=$e;t&&pu(e,t)?Kf(r,n):(e.flags=e.flags&-4097|2,Q=!1,$e=e)}}else{if(Ys(e))throw Error(C(418));e.flags=e.flags&-4097|2,Q=!1,$e=e}}}function hu(e){for(e=e.return;e!==null&&e.t
Line truncated
|
||||
Error generating stack: `+i.message+`
|
||||
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function us(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function nl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var qm=typeof WeakMap=="function"?WeakMap:Map;function vd(e,t,n){n=yt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){si||(si=!0,dl=r),nl(e,t)},n}function wd(e,t,n){n=yt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){nl(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){nl(e,t),typeof r!="function"&&(zt===null?zt=new Set([this]):zt.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function xu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new qm;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=lg.bind(null,e,t,n),t.then(e,e))}function Eu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Cu(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yt(-1,1),t.tag=2,$t(n,t,1))),n.lanes|=1),e)}var Qm=Et.ReactCurrentOwner,Le=!1;function xe(e,t,n,r){t.child=e===null?Qf(t,null,n,r):Mn(t,e.child,n,r)}function Pu(e,t,n,r,o){n=n.render;var i=t.ref;return Fn(t,o),r=ia(e,t,n,r,i,o),n=sa(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,kt(e,t,o)):(Q&&n&&ql(t),t.flags|=1,xe(e,t,r,o),t.child)}function Ru(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!ga(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Sd(e,t,i,r,o)):(e=bo(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ar,n(s,r)&&e.ref===t.ref)return kt(e,t,o)}return t.flags|=1,e=Mt(i,r),e.ref=t.ref,e.return=t,t.child=e}function Sd(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Ar(i,r)&&e.ref===t.ref)if(Le=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Le=!0);else return t.lanes=e.lanes,kt(e,t,o)}return rl(e,t,n,r,o)}function kd(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},K(Nn,Fe),Fe|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,K(Nn,Fe),Fe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,K(Nn,Fe),Fe|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,K(Nn,Fe),Fe|=r;return xe(e,t,o,n),t.child}function xd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function rl(e,t,n,r,o){var i=Ae(n)?un:Se.current;return i=zn(t,i),Fn(t,o),n=ia(e,t,n,r,i,o),r=sa(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,kt(e,t,o)):(Q&&r&&ql(t),t.flags|=1,xe(e,t,n,o),t.child)}function Ou(e,t,n,r,o){if(Ae(n)){var i=!0;Jo(t)}else i=!1;if(Fn(t,o),t.stateNode===null)Ao(e,t),yd(t,n,r),tl(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Qe(u):(u=Ae(n)?un:Se.current,u=zn(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&ku(t,s,r,u),Ot=!1;var p=t.memoizedState;s.state=p,ti(t,r,s,o),a=t.memoizedState,l!==r||p!==a||Ne.current||Ot?(typeof c=="function"&&(el(t,n,c,r),a=t.memoizedState),(l=Ot||Su(t,n,l,r,p,a,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Jf(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Ye(t.type,l),s.props=u,f=t.pendingProps,p=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=Qe(a):(a=Ae(n)?un:Se.current,a=zn(t,a));var y=n.getDerivedStateFromProps;(c=typeof y=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==f||p!==a)&&ku(t,s,r,a),Ot=!1,p=t.memoizedState,s.state=p,ti(t,r,s,o);var d=t.memoizedState;l
Line truncated
|
||||
* @remix-run/router v1.23.2
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/function Br(){return Br=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Br.apply(this,arguments)}var Dt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Dt||(Dt={}));const Mu="popstate";function wg(e){e===void 0&&(e={});function t(r,o){let{pathname:i,search:s,hash:l}=r.location;return gl("",{pathname:i,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:ci(o)}return kg(t,n,null,e)}function ne(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ka(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Sg(){return Math.random().toString(36).substr(2,8)}function Bu(e,t){return{usr:e.state,key:e.key,idx:t}}function gl(e,t,n,r){return n===void 0&&(n=null),Br({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Gn(t):t,{state:n,key:t&&t.key||r||Sg()})}function ci(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Gn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function kg(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,l=Dt.Pop,a=null,u=c();u==null&&(u=0,s.replaceState(Br({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function f(){l=Dt.Pop;let w=c(),m=w==null?null:w-u;u=w,a&&a({action:l,location:v.location,delta:m})}function p(w,m){l=Dt.Push;let h=gl(v.location,w,m);u=c()+1;let g=Bu(h,u),k=v.createHref(h);try{s.pushState(g,"",k)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;o.location.assign(k)}i&&a&&a({action:l,location:v.location,delta:1})}function y(w,m){l=Dt.Replace;let h=gl(v.location,w,m);u=c();let g=Bu(h,u),k=v.createHref(h);s.replaceState(g,"",k),i&&a&&a({action:l,location:v.location,delta:0})}function d(w){let m=o.location.origin!=="null"?o.location.origin:o.location.href,h=typeof w=="string"?w:ci(w);return h=h.replace(/ $/,"%20"),ne(m,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,m)}let v={get action(){return l},get location(){return e(o,s)},listen(w){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(Mu,f),a=w,()=>{o.removeEventListener(Mu,f),a=null}},createHref(w){return t(o,w)},createURL:d,encodeLocation(w){let m=d(w);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:y,go(w){return s.go(w)}};return v}var Hu;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Hu||(Hu={}));function xg(e,t,n){return n===void 0&&(n="/"),Eg(e,t,n)}function Eg(e,t,n,r){let o=typeof t=="string"?Gn(t):t,i=xa(o.pathname||"/",n);if(i==null)return null;let s=Wd(e);Cg(s);let l=null;for(let a=0;l==null&&a<s.length;++a){let u=Fg(i);l=Dg(s[a],u)}return l}function Wd(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,s,l)=>{let a={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};a.relativePath.startsWith("/")&&(ne(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=Bt([r,a.relativePath]),c=n.concat(a);i.children&&i.children.length>0&&(ne(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Wd(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Ng(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,s);else for(let a of qd(i.path))o(i,s,a)}),t}function qd(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=qd(r.join("/")),l=[];return l.push(...s.map(a=>a===""?i:[i,a].join("/"))),o&&l.push(...s),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function Cg(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ag(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Pg=/^:[\w-]+$/,Rg=3,Og=2,_g=1,Tg=10,Lg=-2,Vu=e=>e==="*";function Ng(e,t){let n=e.split("/"),r=n.length;return n.some(Vu)&&(r+=Lg),t&&(r+=Og),n.filter(o=>!Vu(o)).reduce((o,i)=>o+(Pg.test(i)?Rg:i===""?_g:Tg),r)}function Ag(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Dg(e,t,n){let{routesMeta:r}=e,o={},i="/",s=[];for(let l=0;l<r.length;++l){let a=r[l],u=l===r.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=Ig({path:a.relativePath,caseSensitive:a.caseSeLine truncated
|
||||
* React Router v6.30.3
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hr.apply(this,arguments)}const Pa=x.createContext(null),Wg=x.createContext(null),Qt=x.createContext(null),Ai=x.createContext(null),Ct=x.createContext({outlet:null,matches:[],isDataRoute:!1}),Gd=x.createContext(null);function qg(e,t){let{relative:n}=t===void 0?{}:t;Jn()||ne(!1);let{basename:r,navigator:o}=x.useContext(Qt),{hash:i,pathname:s,search:l}=Xd(e,{relative:n}),a=s;return r!=="/"&&(a=s==="/"?r:Bt([r,s])),o.createHref({pathname:a,search:l,hash:i})}function Jn(){return x.useContext(Ai)!=null}function Yn(){return Jn()||ne(!1),x.useContext(Ai).location}function Jd(e){x.useContext(Qt).static||x.useLayoutEffect(e)}function Yd(){let{isDataRoute:e}=x.useContext(Ct);return e?ay():Qg()}function Qg(){Jn()||ne(!1);let e=x.useContext(Pa),{basename:t,future:n,navigator:r}=x.useContext(Qt),{matches:o}=x.useContext(Ct),{pathname:i}=Yn(),s=JSON.stringify(Ea(o,n.v7_relativeSplatPath)),l=x.useRef(!1);return Jd(()=>{l.current=!0}),x.useCallback(function(u,c){if(c===void 0&&(c={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=Ca(u,JSON.parse(s),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Bt([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,s,i,e])}const Gg=x.createContext(null);function Jg(e){let t=x.useContext(Ct).outlet;return t&&x.createElement(Gg.Provider,{value:e},t)}function Xd(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(Qt),{matches:o}=x.useContext(Ct),{pathname:i}=Yn(),s=JSON.stringify(Ea(o,r.v7_relativeSplatPath));return x.useMemo(()=>Ca(e,JSON.parse(s),i,n==="path"),[e,s,i,n])}function Yg(e,t){return Xg(e,t)}function Xg(e,t,n,r){Jn()||ne(!1);let{navigator:o}=x.useContext(Qt),{matches:i}=x.useContext(Ct),s=i[i.length-1],l=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let u=Yn(),c;if(t){var f;let w=typeof t=="string"?Gn(t):t;a==="/"||(f=w.pathname)!=null&&f.startsWith(a)||ne(!1),c=w}else c=u;let p=c.pathname||"/",y=p;if(a!=="/"){let w=a.replace(/^\//,"").split("/");y="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let d=xg(e,{pathname:y}),v=ry(d&&d.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:Bt([a,o.encodeLocation?o.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?a:Bt([a,o.encodeLocation?o.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return t&&v?x.createElement(Ai.Provider,{value:{location:Hr({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Dt.Pop}},v):v}function Zg(){let e=ly(),t=Vg(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:o},n):null,null)}const ey=x.createElement(Zg,null);class ty extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(Ct.Provider,{value:this.props.routeContext},x.createElement(Gd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ny(e){let{routeContext:t,match:n,children:r}=e,o=x.useContext(Pa);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Ct.Provider,{value:t},r)}function ry(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,l=(o=n)==null?void 0:o.errors;if(l!=null){let c=s.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);c>=0||ne(!1),s=s.slice(0,Math.min(s.length,c+1))}let a=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<s.length;c++){let f=s[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=c),f.route.id){let{loaderData:p,errors:y}=n,d=f.route.loader&&p[f.route.id]===void 0&&(!y||y[f.route.id]===void 0);if(f.route.lazy||d){a=!0,u>=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,f,p)=>{let y,d=!1,v=nuLine truncated
|
||||
* React Router DOM v6.30.3
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vl.apply(this,arguments)}function hy(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function my(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function gy(e,t){return e.button===0&&(!t||t==="_self")&&!my(e)}const yy=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],vy="6";try{window.__reactRouterVersion=vy}catch{}const wy="startTransition",qu=lh[wy];function Sy(e){let{basename:t,children:n,future:r,window:o}=e,i=x.useRef();i.current==null&&(i.current=wg({window:o,v5Compat:!0}));let s=i.current,[l,a]=x.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=x.useCallback(f=>{u&&qu?qu(()=>a(f)):a(f)},[a,u]);return x.useLayoutEffect(()=>s.listen(c),[s,c]),x.useEffect(()=>cy(r),[r]),x.createElement(dy,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}const ky=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,d1=x.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:l,target:a,to:u,preventScrollReset:c,viewTransition:f}=t,p=hy(t,yy),{basename:y}=x.useContext(Qt),d,v=!1;if(typeof u=="string"&&xy.test(u)&&(d=u,ky))try{let g=new URL(window.location.href),k=u.startsWith("//")?new URL(g.protocol+u):new URL(u),E=xa(k.pathname,y);k.origin===g.origin&&E!=null?u=E+k.search+k.hash:v=!0}catch{}let w=qg(u,{relative:o}),m=Ey(u,{replace:s,state:l,target:a,preventScrollReset:c,relative:o,viewTransition:f});function h(g){r&&r(g),g.defaultPrevented||m(g)}return x.createElement("a",vl({},p,{href:d||w,onClick:v||i?r:h,ref:n,target:a}))});var Qu;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Qu||(Qu={}));var Gu;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Gu||(Gu={}));function Ey(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s,viewTransition:l}=t===void 0?{}:t,a=Yd(),u=Yn(),c=Xd(e,{relative:s});return x.useCallback(f=>{if(gy(f,n)){f.preventDefault();let p=r!==void 0?r:ci(u)===ci(c);a(e,{replace:p,state:o,preventScrollReset:i,relative:s,viewTransition:l})}},[u,a,c,r,o,n,e,i,s,l])}let Cy={data:""},Py=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Cy},Ry=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Oy=/\/\*[^]*?\*\/| +/g,Ju=/\n+/g,Lt=(e,t)=>{let n="",r="",o="";for(let i in e){let s=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+s+";":r+=i[1]=="f"?Lt(s,i):i+"{"+Lt(s,i[1]=="k"?"":t)+"}":typeof s=="object"?r+=Lt(s,t?t.replace(/([^,])+/g,l=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,a=>/&/.test(a)?a.replace(/&/g,l):l?l+" "+a:a)):i):s!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Lt.p?Lt.p(i,s):i+":"+s+";")}return n+(t&&o?t+"{"+o+"}":o)+r},dt={},rp=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+rp(e[n]);return t}return e},_y=(e,t,n,r,o)=>{let i=rp(e),s=dt[i]||(dt[i]=(a=>{let u=0,c=11;for(;u<a.length;)c=101*c+a.charCodeAt(u++)>>>0;return"go"+c})(i));if(!dt[s]){let a=i!==e?e:(u=>{let c,f,p=[{}];for(;c=Ry.exec(u.replace(Oy,""));)c[4]?p.shift():c[3]?(f=c[3].replace(Ju," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][c[1]]=c[2].replace(Ju," ").trim();return p[0]})(e);dt[s]=Lt(o?{["@keyframes "+s]:a}:a,n?"":"."+s)}let l=n&&dt.g?dt.g:null;return n&&(dt.g=dt[s]),((a,u,c,f)=>{f?u.data=u.data.replace(f,a):u.data.indexOf(a)===-1&&(u.data=c?a+u.data:u.data+a)})(dt[s],t,r,l),s},Ty=(e,t,n)=>e.reduce((r,o,i)=>{let s=t[i];if(s&&s.call){let l=s(n),a=l&&l.props&&l.props.className||/^go/.test(l)&&l;s=a?"."+a:l&&typeof l=="object"?l.props?"":Lt(l,""):l===!1?"":l}return r+o+(s??"")},"");function Di(e){let t=this||{},n=e.call?e(t.p):e;return _y(n.unshift?n.raw?Ty(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,Py(t.target),t.g,t.o,t.k)}let op,wl,Sl;Di.bind({g:1});let xt=Di.bind({k:1});function Ly(e,t,n,r){Lt.p=t,op=e,wl=n,Sl=r}function Gt(e,t){let n=this||{};return function(){let r=arguments;function o(i,s){let l=Object.assign({},i),a=l.className||o.className;n.p=Object.assign({theme:wl&&wl()},l),n.o=/ *go\d+/.test(a),l.className=Di.apply(n,r)+(a?" "+a:"");let u=e;return e[0]&&(u=l.as||e,delete l.as),Sl&&u[0]&&Sl(l),op(u,l)}return o}}var Ny=e=>typeof e=="function",fi=(e,t)=>Ny(e)?e(t):e,Ay=(()=>{let e=0;return()=Line truncated
|
||||
from {
|
||||
transform: scale(0) rotate(45deg);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: scale(1) rotate(45deg);
|
||||
opacity: 1;
|
||||
}`,My=xt`
|
||||
from {
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}`,By=xt`
|
||||
from {
|
||||
transform: scale(0) rotate(90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: scale(1) rotate(90deg);
|
||||
opacity: 1;
|
||||
}`,Hy=Gt("div")`
|
||||
width: 20px;
|
||||
opacity: 0;
|
||||
height: 20px;
|
||||
border-radius: 10px;
|
||||
background: ${e=>e.primary||"#ff4b4b"};
|
||||
position: relative;
|
||||
transform: rotate(45deg);
|
||||
|
||||
animation: ${Uy} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
||||
forwards;
|
||||
animation-delay: 100ms;
|
||||
|
||||
&:after,
|
||||
&:before {
|
||||
content: '';
|
||||
animation: ${My} 0.15s ease-out forwards;
|
||||
animation-delay: 150ms;
|
||||
position: absolute;
|
||||
border-radius: 3px;
|
||||
opacity: 0;
|
||||
background: ${e=>e.secondary||"#fff"};
|
||||
bottom: 9px;
|
||||
left: 4px;
|
||||
height: 2px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
&:before {
|
||||
animation: ${By} 0.15s ease-out forwards;
|
||||
animation-delay: 180ms;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
`,Vy=xt`
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
`,Ky=Gt("div")`
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid;
|
||||
border-radius: 100%;
|
||||
border-color: ${e=>e.secondary||"#e0e0e0"};
|
||||
border-right-color: ${e=>e.primary||"#616161"};
|
||||
animation: ${Vy} 1s linear infinite;
|
||||
`,Wy=xt`
|
||||
from {
|
||||
transform: scale(0) rotate(45deg);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: scale(1) rotate(45deg);
|
||||
opacity: 1;
|
||||
}`,qy=xt`
|
||||
0% {
|
||||
height: 0;
|
||||
width: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
40% {
|
||||
height: 0;
|
||||
width: 6px;
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
height: 10px;
|
||||
}`,Qy=Gt("div")`
|
||||
width: 20px;
|
||||
opacity: 0;
|
||||
height: 20px;
|
||||
border-radius: 10px;
|
||||
background: ${e=>e.primary||"#61d345"};
|
||||
position: relative;
|
||||
transform: rotate(45deg);
|
||||
|
||||
animation: ${Wy} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
||||
forwards;
|
||||
animation-delay: 100ms;
|
||||
&:after {
|
||||
content: '';
|
||||
box-sizing: border-box;
|
||||
animation: ${qy} 0.2s ease-out forwards;
|
||||
opacity: 0;
|
||||
animation-delay: 200ms;
|
||||
position: absolute;
|
||||
border-right: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-color: ${e=>e.secondary||"#fff"};
|
||||
bottom: 6px;
|
||||
left: 6px;
|
||||
height: 10px;
|
||||
width: 6px;
|
||||
}
|
||||
`,Gy=Gt("div")`
|
||||
position: absolute;
|
||||
`,Jy=Gt("div")`
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-width: 20px;
|
||||
min-height: 20px;
|
||||
`,Yy=xt`
|
||||
from {
|
||||
transform: scale(0.6);
|
||||
opacity: 0.4;
|
||||
}
|
||||
to {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}`,Xy=Gt("div")`
|
||||
position: relative;
|
||||
transform: scale(0.6);
|
||||
opacity: 0.4;
|
||||
min-width: 20px;
|
||||
animation: ${Yy} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
||||
forwards;
|
||||
`,Zy=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?x.createElement(Xy,null,t):t:n==="blank"?null:x.createElement(Jy,null,x.createElement(Ky,{...r}),n!=="loading"&&x.createElement(Gy,null,n==="error"?x.createElement(Hy,{...r}):x.createElement(Qy,{...r})))},ev=e=>`
|
||||
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
||||
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
||||
`,tv=e=>`
|
||||
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
||||
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
||||
`,nv="0%{opacity:0;} 100%{opacity:1;}",rv="0%{opacity:1;} 100%{opacity:0;}",ov=Gt("div")`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
color: #363636;
|
||||
line-height: 1.3;
|
||||
will-change: transform;
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
||||
max-width: 350px;
|
||||
pointer-events: auto;
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
`,iv=Gt("div")`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 4px 10px;
|
||||
color: inherit;
|
||||
flex: 1 1 auto;
|
||||
white-space: pre-line;
|
||||
`,sv=(e,t)=>{let n=e.includes("top")?1:-1,[r,o]=ip()?[nv,rv]:[ev(n),tv(n)];return{animation:t?`${xt(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${xt(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},lv=x.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?sv(e.position||t||"top-center",e.visible):{opacity:0},i=x.createElement(Zy,{toast:e}),s=x.createElement(iv,{...e.ariaProps},fi(e.message,e));return x.createElement(ov,{className:e.className,style:{...o,...n,...e.style}},typeof r=="function"?r({icon:i,message:s}):x.createElement(x.Fragment,null,i,s))});Ly(x.createElement);var av=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let i=x.useCallback(s=>{if(s){let l=()=>{let a=s.getBoundingClientRect().height;r(e,a)};l(),new MutationObserver(l).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return x.createElement("div",{ref:i,className:t,style:n},o)},uv=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:ip()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}},cv=Di`
|
||||
z-index: 9999;
|
||||
> * {
|
||||
pointer-events: auto;
|
||||
}
|
||||
`,ko=16,fv=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,toasterId:i,containerStyle:s,containerClassName:l})=>{let{toasts:a,handlers:u}=zy(n,i);return x.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:ko,left:ko,right:ko,bottom:ko,pointerEvents:"none",...s},className:l,onMouseEnter:u.startPause,onMouseLeave:u.endPause},a.map(c=>{let f=c.position||t,p=u.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),y=uv(f,p);return x.createElement(av,{id:c.id,key:c.id,onHeightUpdate:u.updateHeight,className:c.visible?cv:"",style:y},c.type==="custom"?fi(c.message,c):o?o(c):x.createElement(lv,{toast:c,position:f}))}))},hs=se;const dv="modulepreload",pv=function(e){return"/"+e},Yu={},G=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(a=>{if(a=pv(a),a in Yu)return;Yu[a]=!0;const u=a.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":dv,u||(f.as="script"),f.crossOrigin="",f.href=a,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((p,y)=>{f.addEventListener("load",p),f.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${a}`)))})}))}function i(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return o.then(s=>{for(const l of s||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};function cp(e,t){return function(){return e.apply(t,arguments)}}const{toString:hv}=Object.prototype,{getPrototypeOf:Oa}=Object,{iterator:bi,toStringTag:fp}=Symbol,Fi=(e=>t=>{const n=hv.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),rt=e=>(e=e.toLowerCase(),t=>Fi(t)===e),ji=e=>t=>typeof t===e,{isArray:Xn}=Array,Kn=ji("undefined");function Yr(e){return e!==null&&!Kn(e)&&e.constructor!==null&&!Kn(e.constructor)&&Ie(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const dp=rt("ArrayBuffer");function mv(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&dp(e.buffer),t}const gv=ji("string"),Ie=ji("function"),pp=ji("number"),Xr=e=>e!==null&&typeof e=="object",yv=e=>e===!0||e===!1,jo=e=>{if(Fi(e)!=="object")return!1;const t=Oa(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(fp in e)&&!(bi in e)},vv=e=>{if(!Xr(e)||Yr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},wv=rt("Date"),Sv=rt("File"),kv=e=>!!(e&&typeof e.uri<"u"),xv=e=>e&&typeof e.getParts<"u",Ev=rt("Blob"),Cv=rt("FileList"),Pv=e=>Xr(e)&&Ie(e.pipe);function Rv(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Xu=Rv(),Zu=typeof Xu.FormData<"u"?Xu.FormData:void 0,Ov=e=>{let t;return e&&(Zu&&e instanceof Zu||Ie(e.append)&&((t=Fi(e))==="formdata"||t==="object"&&Ie(e.toString)&&e.toString()==="[object FormData]"))},_v=rt("URLSearchParams"),[Tv,Lv,Nv,Av]=["ReadableStream","Request","Response","Headers"].map(rt),Dv=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Xn(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Yr(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let l;for(r=0;r<s;r++)l=i[r],t.call(null,e[l],l,e)}}function hp(e,t){if(Yr(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const on=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mp=e=>!Kn(e)&&e!==on;function kl(){const{caseless:e,skipUndefined:t}=mp(this)&&this||{},n={},r=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const s=e&&hp(n,i)||i;jo(n[s])&&jo(o)?n[s]=kl(n[s],o):jo(o)?n[s]=kl({},o):Xn(o)?n[s]=o.slice():(!t||!Kn(o))&&(n[s]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&Zr(arguments[o],r);return n}const Iv=(e,t,n,{allOwnKeys:r}={})=>(Zr(t,(o,i)=>{n&&Ie(o)?Object.defineProperty(e,i,{value:cp(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),bv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Fv=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},jv=(e,t,n,r)=>{let o,i,s;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s
Line truncated
|
||||
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&v0[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},rc=Symbol("internals");function lr(e){return e&&String(e).trim().toLowerCase()}function $o(e){return e===!1||e==null?e:S.isArray(e)?e.map($o):String(e)}function S0(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const k0=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function gs(e,t,n,r,o){if(S.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!S.isString(t)){if(S.isString(r))return t.indexOf(r)!==-1;if(S.isRegExp(r))return r.test(t)}}function x0(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function E0(e,t){const n=S.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,s){return this[r].call(this,t,o,i,s)},configurable:!0})})}let be=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(l,a,u){const c=lr(a);if(!c)throw new Error("header name must be a non-empty string");const f=S.findKey(o,c);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||a]=$o(l))}const s=(l,a)=>S.forEach(l,(u,c)=>i(u,c,a));if(S.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(S.isString(t)&&(t=t.trim())&&!k0(t))s(w0(t),n);else if(S.isObject(t)&&S.isIterable(t)){let l={},a,u;for(const c of t){if(!S.isArray(c))throw TypeError("Object iterator must return a key-value pair");l[u=c[0]]=(a=l[u])?S.isArray(a)?[...a,c[1]]:[a,c[1]]:c[1]}s(l,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=lr(t),t){const r=S.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return S0(o);if(S.isFunction(n))return n.call(this,o,r);if(S.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=lr(t),t){const r=S.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||gs(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=lr(s),s){const l=S.findKey(r,s);l&&(!n||gs(r,r[l],l,n))&&(delete r[l],o=!0)}}return S.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||gs(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return S.forEach(this,(o,i)=>{const s=S.findKey(r,i);if(s){n[s]=$o(o),delete n[i];return}const l=t?x0(i):String(i).trim();l!==i&&delete n[i],n[l]=$o(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return S.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&S.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
||||
`)}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(o=>r.set(o)),r}static accessor(t){const r=(this[rc]=this[rc]={accessors:{}}).accessors,o=this.prototype;function i(s){const l=lr(s);r[l]||(E0(o,s),r[l]=!0)}return S.isArray(t)?t.forEach(i):i(t),this}};be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);S.reduceDescriptors(be.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});S.freezeMethods(be);function ys(e,t){const n=this||eo,r=t||n,o=be.from(r.headers);let i=r.data;return S.forEach(e,function(l){i=l.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Ep(e){return!!(e&&e.__CANCEL__)}let to=class extends D{constructor(t,n,r){super(t??"canceled",D.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 D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function C0(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function P0(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(a){const u=Date.now(),c=r[i];s||(s=u),n[o]=a,r[o]=u;let f=i,p=0;for(;f!==o;)p+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const y=c&&u-c;return y?Math.round(p*1e3/y):void 0}}function R0(e,t){let n=0,r=1e3/t,o,i;const s=(u,c=Date.now())=>{n=c,o=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-n;f>=r?s(u,c):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},r-f)))},()=>o&&s(o)]}const di=(e,t,n=3)=>{let r=0;const o=P0(50,250);return R0(i=>{const s=i.loaded,l=i.lengthComputable?i.total:void 0,a=s-r,u=o(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:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},oc=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ic=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,_0=we.hasStandardBrowserEnv?{write(e,t,n,r,o,i,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(o)&&l.push(`domain=${o}`),i===!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 T0(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=!T0(t);return e&&(r||n==!1)?L0(e,t):t}const sc=e=>e instanceof be?{...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 o(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 i(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:i,method:i,data:i,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)=>o(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]:o,p=f(e[c],t[c],c);S.isUndefined(p)&&f!==l||(n[c]=p)}),n}const Rp=e=>{const t=hn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:l}=t;if(t.headers=s=be.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)){c
Line truncated
|
||||
`+s.map(dc).join(`
|
||||
`):" "+dc(s[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o}const _p={getAdapter:M0,adapters:Na};function vs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new to(null,e)}function pc(e){return vs(e),e.headers=be.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||eo.adapter,e)(e).then(function(r){return vs(e),r.data=ys.call(e,e.transformResponse,r),r.headers=be.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=be.from(r.response.headers))),Promise.reject(r)})}const Tp="1.13.6",zi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const hc={};zi.transitional=function(t,n,r){function o(i,s){return"[Axios v"+Tp+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,l)=>{if(t===!1)throw new D(o(s," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!hc[s]&&(hc[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,l):!0}};zi.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 D("options must be an object",D.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const l=e[i],a=l===void 0||s(l,i,e);if(a!==!0)throw new D("option "+i+" must be "+a,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+i,D.ERR_BAD_OPTION)}}const zo={assertOptions:B0,validators:zi},He=zo.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 o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
||||
`+i):r.stack=i}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:o,headers:i}=n;r!==void 0&&zo.assertOptions(r,{silentJSONParsing:He.transitional(He.boolean),forcedJSONParsing:He.transitional(He.boolean),clarifyTimeoutError:He.transitional(He.boolean),legacyInterceptorReqResOrdering:He.transitional(He.boolean)},!1),o!=null&&(S.isFunction(o)?n.paramsSerializer={serialize:o}:zo.assertOptions(o,{encode:He.function,serialize:He.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zo.assertOptions(n,{baseUrl:He.spelling("baseURL"),withXsrfToken:He.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&S.merge(i.common,i[n.method]);i&&S.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),n.headers=be.concat(s,i);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||Ta;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<p;)c=c.then(d[f++],d[f++]);return c}p=l.length;let y=n;for(;f<p;){const d=l[f++],v=l[f++];try{y=d(y)}catch(w){v.call(this,w);break}}try{c=pc.call(this,y)}catch(d){return Promise.reject(d)}for(f=0,p=u.length;f<p;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=hn(this.defaults,t);const n=Pp(t.baseURL,t.url,t.allowAbsoluteUrls);return kp(n,t.params,t.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(t){an.prototype[t]=function(n,r){return this.request(hn(r||{},{method:t,url:n,data:(r||{}).data}))}});S.forEach(["post","put","patch"],function(t){function n(r){return function(i,s,l){return this.request(hn(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}an.prototype[t]=n(),an.prototype[t+"Form"]=n(!0)});let H0=class Lp{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(l=>{r.subscribe(l),i=l}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,l){r.reason||(r.reason=new to(i,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 Lp(function(o){t=o}),cancel:t}}};function V0(e){return function(n){return e.apply(null,n)}}function K0(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(o){return Np(hn(e,o))},n}const re=Np(eo);re.Axios=an;re.CanceledError=to;re.CancelToken=H0;re.isCancel=Ep;re.VERSION=Tp;
Line truncated
|
||||
Vendored
+1
@@ -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-bg: #000000;--page-spinner: rgba(255,255,255,.7);--page-spinner-track: rgba(255,255,255,.2);--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,25Line truncated
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import{r as l,I as Y,J as q}from"./index-5ebNoZ4G.js";const B=(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),B(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))},H=(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
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var h=l;function Z(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ee=typeof Object.is=="function"?Object.is:Z,te=h.useState,ne=h.useEffect,re=h.useLayoutEffect,ae=h.useDebugValue;function se(e,t){var r=t(),i=te({inst:{value:r,getSnapshot:t}}),s=i[0].inst,n=i[1];return re(function(){s.value=r,s.getSnapshot=t,C(s)&&n({inst:s})},[e,r,t]),ne(function(){return C(s)&&n({inst:s}),e(function(){C(s)&&n({inst:s})})},[e]),ae(r),r}function C(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ee(e,r)}catch{return!0}}function oe(e,t){return t()}var ce=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oe:se;$.useSyncExternalStore=h.useSyncExternalStore!==void 0?h.useSyncExternalStore:ce;M.exports=$;var ue=M.exports;const ie=(e,t)=>{if(p(t))return t;if(K(t)&&p(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const r=e[e.length-1];return typeof r=="function"?"":r}return e},le={t:ie,ready:!1},fe=()=>()=>{},ge=(e,t={})=>{var j,b,P;const{i18n:r}=t,{i18n:i,defaultNS:s}=l.useContext(Q)||{},n=r||i||q();n&&!n.reportNamespaces&&(n.reportNamespaces=new V),n||U(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const d=l.useMemo(()=>{var a;return{...Y(),...(a=n==null?void 0:n.options)==null?void 0:a.react,...t}},[n,t]),{useSuspense:y,keyPrefix:g}=d,x=s||((j=n==null?void 0:n.options)==null?void 0:j.defaultNS),_=p(x)?[x]:x||["translation"],f=l.useMemo(()=>_,_);(P=(b=n==null?void 0:n.reportNamespaces)==null?void 0:b.addUsedNamespaces)==null||P.call(b,f);const L=l.useRef(0),G=l.useCallback(a=>{if(!n)return fe;const{bindI18n:o,bindI18nStore:c}=d,u=()=>{L.current+=1,a()};return o&&n.on(o,u),c&&n.store.on(c,u),()=>{o&&o.split(" ").forEach(v=>n.off(v,u)),c&&c.split(" ").forEach(v=>n.store.off(v,u))}},[n,d]),R=l.useRef(),I=l.useCallback(()=>{if(!n)return le;const a=!!(n.isInitialized||n.initializedStoreOnce)&&f.every(X=>H(X,n,d)),o=t.lng||n.language,c=L.current,u=R.current;if(u&&u.ready===a&&u.lng===o&&u.keyPrefix===g&&u.revision===c)return u;const k={t:n.getFixedT(o,d.nsMode==="fallback"?f:f[0],g),ready:a,lng:o,keyPrefix:g,revision:c};return R.current=k,k},[n,f,g,d,t.lng]),[W,D]=l.useState(0),{t:N,ready:S}=ue.useSyncExternalStore(G,I,I);l.useEffect(()=>{if(n&&!S&&!y){const a=()=>D(o=>o+1);t.lng?A(n,t.lng,f,a):O(n,f,a)}},[n,t.lng,f,S,y,W]);const m=n||{},w=l.useRef(null),E=l.useRef(),T=a=>{const o=Object.getOwnPropertyDescriptors(a);o.__original&&delete o.__original;const c=Object.create(Object.getPrototypeOf(a),o);if(!Object.prototype.hasOwnProperty.call(c,"__original"))try{Object.defineProperty(c,"__original",{value:a,writable:!1,enumerable:!1,configurable:!1})}catch{}return c},J=l.useMemo(()=>{const a=m,o=a==null?void 0:a.language;let c=a;a&&(w.current&&w.current.__original===a?E.current!==o?(c=T(a),w.current=c,E.current=o):c=w.current:(c=T(a),w.current=c,E.current=o));const u=[N,c,S];return u.t=N,u.i18n=c,u.ready=S,u},[N,m,S,m.resolvedLanguage,m.language,m.languages]);if(n&&y&&!S)throw new Promise(a=>{const o=()=>a();t.lng?A(n,t.lng,f,o):O(n,f,o)});return J};export{ge as u};
|
||||
Vendored
+2
-2
@@ -7,8 +7,8 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
||||
<title>AI Platform</title>
|
||||
<script type="module" crossorigin src="/assets/index-CpYyIBrK.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-1hnkxZ6J.css">
|
||||
<script type="module" crossorigin src="/assets/index-5ebNoZ4G.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-urd_Rdeu.css">
|
||||
</head>
|
||||
<body class="antialiased">
|
||||
<script>
|
||||
|
||||
Reference in new issue
Block a user