PageSourceSearch

https://nickz.ai/assets/js/index-DlVX_dhD.js

js nickz.ai collected 2026-10-05 14:20:40 UTC 17,840 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/js/NoticeModal-BBiCs4r_.js","assets/js/vendor-react-DejgYtBM.js","assets/js/vendor-semi-D8d7bTtM.js","assets/js/index-BeIIFw6E.js","assets/js/vendor-icons-EJvJ5X-w.js","assets/js/vendor-motion-Chfy_MiU.js","assets/js/i18nField-BKdpiJH6.js","assets/js/i18nFieldCore-CS3IirKt.js","assets/js/noticeI18n-CXa-dBKj.js","assets/js/marked.esm-B28mcIGu.js","assets/css/vendor-semi-o4lF_xks.css","assets/css/index-D0vqlaxj.css"])))=>i.map(i=>d[i]);
2import{u as e,S as t,a as s,I as n,b as a,c as l,d as i,e as r,f as o,h as d,i as m,j as c,k as x,l as h,m as p,n as u,o as f,p as j,q as g,A as w,s as y,r as b,_ as v,t as N,v as k,w as C}from"./index-BeIIFw6E.js";import{r as z,j as S,L as _,R as E}from"./vendor-react-DejgYtBM.js";import{F as I,d as A,e as M,B as T,f as q}from"./vendor-semi-D8d7bTtM.js";import"./marked.esm-B28mcIGu.js";import{l as L}from"./index-3LiQSZK3.js";import{C as D,P as W,G as O,F}from"./vendor-icons-EJvJ5X-w.js";import{I as H}from"./index-DX7HKVjU.js";import{I as $,a as J}from"./index-BlXHwLAN.js";import{I as P}from"./index-BXaa1F4t.js";import{m as R}from"./vendor-motion-Chfy_MiU.js";const G=E.lazy(()=>v(()=>import("./NoticeModal-BBiCs4r_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),{Title:U,Text:Y}=q,B=({content:t})=>{const s=E.useRef(null),{i18n:n}=e(),[a,l]=z.useState(n.language);return E.useEffect(()=>{const e=e=>{l(e)};return n.on("languageChanged",e),()=>{n.off("languageChanged",e)}},[n]),E.useEffect(()=>{if(!s.current||!t)return;s.current.innerHTML="";const e=document.createElement("div");e.innerHTML=t;const n=e.querySelectorAll("style"),a=e.querySelectorAll('link[rel="stylesheet"]'),l=e.querySelectorAll("script"),i=Array.from(l).map(e=>({src:e.src||"",textContent:e.textContent,type:e.type||"",async:e.async,defer:e.defer}));return l.forEach(e=>e.remove()),n.forEach(e=>{const t=document.createElement("style");t.textContent=e.textContent,t.setAttribute("data-custom-content","true"),document.head.appendChild(t)}),a.forEach(e=>{if(e.href&&"stylesheet"===e.rel){const t=document.createElement("link");t.rel="stylesheet",t.href=e.href,t.setAttribute("data-custom-content","true"),document.head.appendChild(t)}}),s.current.appendChild(e),i.forEach(e=>{N(e,document.body)}),()=>{document.querySelectorAll('style[data-custom-content="true"]').forEach(e=>e.remove()),document.querySelectorAll('link[data-custom-content="true"]').forEach(e=>e.remove())}},[t]),S.jsx("div",{ref:s,className:"w-full overflow-x-hidden","data-lang":a,"data-lang-main":a.split("-")[0]})},Q=()=>{const{t}=e(),s={hidden:{opacity:0,y:16,filter:"blur(8px)"},visible:{opacity:1,y:0,filter:"blur(0px)",transition:{type:"spring",stiffness:220,damping:26,mass:.7}}};return S.jsxs(R.div,{className:"template-loading-root w-full relative overflow-hidden min-h-[500px] md:min-h-[600px] lg:min-h-[700px] flex items-center justify-center px-4 py-20 md:py-24 lg:py-32",initial:"hidden",animate:"visible",variants:{hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.08,delayChildren:.05}}},"aria-busy":"true","aria-live":"polite",children:[S.jsx("div",{className:"blur-ball blur-ball-indigo"}),S.jsx("div",{className:"blur-ball blur-ball-teal"}),S.jsxs("div",{className:"relative z-10 flex flex-col items-center justify-center text-center max-w-4xl mx-auto w-full",children:[S.jsx(R.div,{variants:s,className:"mb-8 relative",children:S.jsxs("div",{className:"template-loading-orb",children:[S.jsx("div",{className:"template-loading-orb-core"}),S.jsx("div",{className:"template-loading-orb-ring"}),S.jsx("div",{className:"template-loading-orb-ring template-loading-orb-ring-2"})]})}),S.jsxs(R.div,{variants:s,className:"w-full max-w-2xl mb-4",children:[S.jsx("div",{className:"tpl-skeleton tpl-skeleton-line mx-auto mb-3",style:{height:48,width:"60%"}}),S.jsx("div",{className:"tpl-skeleton tpl-skeleton-line mx-auto",style:{height:56,width:"85%"}})]}),S.jsx(R.div,{variants:s,className:"w-full max-w-xl mb-8",children:S.jsx("div",{className:"tpl-skeleton tpl-skeleton-line mx-auto",style:{height:18,width:"70%"}})}),S.jsx(R.div,{variants:s,className:"w-full max-w-md mb-8",children:S.jsx("div",{className:"tpl-skeleton tpl-skeleton-pill",style:{height:44}})}),S.jsxs(R.div,{variants:s,className:"flex flex-row gap-4 mb-12",children:[S.jsx("div",{className:"tpl-skeleton tpl-skeleton-pill",style:{height:40,width:140}}),S.jsx("div",{className:"tpl-skeleton tpl-skeleton-pill",style:{height:40,width:120}})]}),S.jsxs(R.div,{variants:s,className:"w-full max-w-3xl",children:[S.jsx("div",{className:"tpl-skeleton tpl-skeleton-line mx-auto mb-6",style:{height:16,width:"40%"}}),S.jsx("div",{className:"flex flex-wrap items-center justify-center gap-4 md:gap-6",children:Array.from({length:12}).map((e,t)=>S.jsx(R.div,{className:"tpl-skeleton tpl-skeleton-circle",style:{width:40,height:40}
2,animate:{opacity:[.4,1,.4],scale:[.95,1,.95]},transition:{duration:1.6,repeat:1/0,delay:.08*t,ease:"easeInOut"}},t))})]}),S.jsx(R.div,{variants:s,className:"mt-10",children:S.jsxs(Y,{type:"tertiary",className:"text-sm md:text-base tracking-wide",children:[S.jsx("span",{className:"shine-text font-medium",children:t("正在加载首页模板")}),S.jsxs("span",{className:"template-loading-dots ml-1",children:[S.jsx("span",{children:"."}),S.jsx("span",{children:"."}),S.jsx("span",{children:"."})]})]})})]}),S.jsx("style",{children:'\n        .template-loading-root {\n          background:\n            radial-gradient(1200px 600px at 20% 0%, rgba(99, 102, 241, 0.08), transparent 60%),\n            radial-gradient(900px 500px at 80% 100%, rgba(20, 184, 166, 0.06), transparent 60%);\n        }\n\n        .tpl-skeleton {\n          position: relative;\n          overflow: hidden;\n          background: linear-gradient(\n            90deg,\n            rgba(15, 23, 42, 0.06) 0%,\n            rgba(15, 23, 42, 0.10) 50%,\
2n            rgba(15, 23, 42, 0.06) 100%\n          );\n          background-size: 200% 100%;\n          animation: tpl-shimmer 1.6s ease-in-out infinite;\n        }\n        .tpl-skeleton-line { border-radius: 8px; }\n        .tpl-skeleton-pill { border-radius: 999px; width: 100%; }\n        .tpl-skeleton-circle { border-radius: 50%; }\n\n        body[theme-mode="dark"] .tpl-skeleton,\n        [theme-mode="dark"] .tpl-skeleton {\n          background: linear-gradient(\n            90deg,\n            rgba(255, 255, 255, 0.05) 0%,\n            rgba(255, 255, 255, 0.10) 50%,\n            rgba(255, 255, 255, 0.05) 100%\n          );\n          background-size: 200% 100%;\n        }\n\n        @keyframes tpl-shimmer {\n          0%   { background-position: 200% 0; }\n          100% { background-position: -200% 0; }\n        }\n\n        .template-loading-orb {\n          position: relative;\n          width: 72px;\n          height: 72px;\n        }\n        .template-loading-orb-core {\n          position: absolute;\n          inset: 18px;\n          border-radius: 50%;\n          background: radial-gradient(circle at 30% 30%, #818cf8 0%, #6366f1 50%, #4338ca 100%);\n          box-shadow:\n            0 0 24px rgba(99, 102, 241, 0.55),\n            inset 0 1px 4px rgba(255, 255, 255, 0.6);\n          animation: tpl-orb-pulse 2s ease-in-out infinite;\n        }\n        .template-loading-orb-ring {\n          position: absolute;\n          inset: 0;\n          border-radius: 50%;\n          border: 2px solid transparent;\n          border-top-color: #6366f1;\n          border-right-color: rgba(99, 102, 241, 0.4);\n          animation: tpl-orb-spin 1.4s linear infinite;\n        }\n        .template-loading-orb-ring-2 {\n          inset: 8px;\n          border-top-color: #14b8a6;\n          border-right-color: transparent;\n          border-bottom-color: rgba(20, 184, 166, 0.3);\n          animation-duration: 2.2s;\n          animation-direction: reverse;\n        }\n        @keyframes tpl-orb-spin {\n          to { transform: rotate(360deg); }\n        }\n        @keyframes tpl-orb-pulse {\n          0%, 100% { transform: scale(1); opacity: 0.95; }\n          50%      { transform: scale(1.08); opacity: 1; }\n        }\n\n        .template-loading-dots span {\n          display: inline-block;\n          animation: tpl-dot 1.2s ease-in-out infinite;\n        }\n        .template-loading-dots span:nth-child(2) { animation-delay: 0.15s; }\n        .template-loading-dots span:nth-child(3) { animation-delay: 0.3s; }\n        @keyframes tpl-dot {\n          0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }\n          30%           { opacity: 1;    transform: translateY(-3px); }\n        }\n\n        @media (prefers-reduced-motion: reduce) {\n          .tpl-skeleton,\n          .template-loading-orb-core,\n          .template-loading-orb-ring,\n          .template-loading-dots span {\n            animation: none !important;\n          }\n        }\n      '})]})},V=({templateNumber:e})=>{const[t,s]=z.useState(null),[n,a]=z.useState(!0);return z.useEffect(()=>{L(e).then(e=>{s(()=>e.default),a(!1)}).catch(e=>{console.error("加载模板失败:",e),L("1").then(e=>{s(()=>e.default),a(!1)})})},[e]),n?S.jsx(Q,{}):t?S.jsx(t,{}):null},K=()=>{const{t:v,i18n:N}=e(),[E]=z.useContext(t),[L,R]=z.useState(!1),[U,K]=z.useState(""),[X,Z]=z.useState(!1),ee=s(),te=E?.status?.demo_site_enabled||!1,se=e=>`${e?.publishDate||""}-${(e?.content||"").slice(0,30)}`,ne=E?.status?.docs_link||"",ae=E?.status?.server_address||window.location.origin,le=b.map(e=>({value:e})),[ie,re]=z.useState(0),oe=N.language.startsWith("zh");z.useEffect(()=>{if(!E?.status)return;let e=!1;window.dispatchEvent(new CustomEvent("systemNoticeChange",{detail:{visible:!0}}));const t=()=>{e||window.dispatchEvent(new CustomEvent("systemNoticeChange",{detail:{visible:!1}}))};return(async()=>{if(localStorage.getItem("notice_close_date")===(new Date).toDateString())return void t();const e=E?.status?.announcements||[];if(e.length>0){let n=[];try{n=JSON.parse(localStorage.getItem("notice_read_keys"))||[]}catch(s){n=[]}const a=new Set(n);if(!e.some(e=>!a.has(se(e))))return void t()}try{const e=await w.get("/api/notice"),{success:t,data:s}=e.data;if(t&&s&&""!==s.trim())return void Z(!0)}catch(n){console.error("获取公告失败:",n)}t()})(),()=>{e=!0}},[E]),z.useEffect(()=>{(async()=>{try{const e=await w.get("/api/home_page_content"),{success:t,message:s,data:n}=e.data;t?(K(n||""),"string"==typeof n&&n.startsWith("https://")&&setTimeout(()=>{const e=document.querySelector("iframe");
2if(e){const t=localStorage.getItem("theme-mode")||"light";e.onload=()=>{e.contentWindow.postMessage({themeMode:t},"*"),e.contentWindow.postMessage({lang:N.language},"*")}}},100)):(y(s),K(v("加载首页内容失败...")))}catch(e){console.error("获取首页内容失败:",e),K(v("加载首页内容失败..."))}R(!0)})().then()},[]),z.useEffect(()=>{const e=setInterval(()=>{re(e=>(e+1)%le.length)},3e3);return()=>clearInterval(e)},[le.length]);const de=!!L&&(""===U?"1":!!/^\d+$/.test(U)&&U);return S.jsxs("div",{className:"w-full overflow-x-hidden",children:[X&&S.jsx(z.Suspense,{fallback:null,children:S.jsx(G,{visible:X,onClose:()=>{Z(!1);const e=(new Date).toDateString();localStorage.setItem("notice_close_date",e);const t=E?.status?.announcements||[];if(t.length>0){let e=[];try{e=JSON.parse(localStorage.getItem("notice_read_keys"))||[]}catch(s){e=[]}const n=t.map(se),a=Array.from(new Set([...e,...n]));localStorage.setItem("notice_read_keys",JSON.stringify(a))}window.dispatchEvent(new Event("localStorageUpdated"))},isMobile:ee})}),de?S.jsx(z.Suspense,{fallback:S.jsx(Q,{}),children:S.jsx(V,{templateNumber:de})}):S.jsx("div",{className:"overflow-x-hidden w-full",children:U.startsWith("https://")?S.jsx("iframe",{src:U,className:"w-full h-screen border-none"}):!U||""===U||U.startsWith("https://")||/^\d+$/.test(U)||!/<[^>]+>/.test(U)?L&&""===U?S.jsx("div",{className:"w-full overflow-x-hidden",children:S.jsxs("div",{className:"w-full border-b border-border min-h-[500px] md:min-h-[600px] lg:min-h-[700px] relative overflow-x-hidden",children:[S.jsx("div",{className:"blur-ball blur-ball-indigo"}),S.jsx("div",{className:"blur-ball blur-ball-teal"}),S.jsx("div",{className:"flex items-center justify-center h-full px-4 py-20 md:py-24 lg:py-32 mt-10",children:S.jsxs("div",{className:"flex flex-col items-center justify-center text-center max-w-4xl mx-auto",children:[S.jsxs("div",{className:"flex flex-col items-center justify-center mb-6 md:mb-8",children:[S.jsx("h1",{className:"text-4xl md:text-5xl lg:text-6xl xl:text-7xl font-bold text-foreground leading-tight "+(oe?"tracking-wide md:tracking-wider":""),children:"en"===N.language?S.jsxs(S.Fragment,{children:["The Unified",S.jsx("br",{}),S.jsx("span",{className:"shine-text",children:"LLMs API Gateway"})]}):S.jsxs(S.Fragment,{children:["统一的",S.jsx("br",{}),S.jsx("span",{className:"shine-text",children:"大模型接口网关"})]})}),S.jsx("p",{className:"text-base md:text-lg lg:text-xl text-foreground/80 mt-4 md:mt-6 max-w-xl",children:v("更好的价格,更好的稳定性,只需要将模型基址替换为:")}),S.jsx("div",{className:"flex flex-col md:flex-row items-center justify-center gap-4 w-full mt-4 md:mt-6 max-w-md",children:S.jsx(I,{readonly:!0,value:ae,className:"flex-1 !rounded-full",size:ee?"default":"large",suffix:S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(A,{bodyHeight:32,style:{border:"unset",boxShadow:"unset"},children:S.jsx(M,{mode:"wheel",cycled:!0,list:le,selectedIndex:ie,onSelect:({index:e})=>re(e)})}),S.jsx(T,{type:"primary",onClick:async()=>{await k(ae)&&C(v("已复制到剪切板"))},icon:S.jsx(D,{size:16}),className:"!rounded-full"})]})})})]}),S.jsxs("div",{className:"flex flex-row gap-4 justify-center items-center",children:[S.jsx(_,{to:"/console",children:S.jsx(T,{theme:"solid",type:"primary",size:ee?"default":"large",className:"!rounded-3xl px-8 py-2",icon:S.jsx(W,{size:16}),children:v("获取密钥")})}),te&&E?.status?.version?S.jsx(T,{size:ee?"default":"large",className:"flex items-center !rounded-3xl px-6 py-2",icon:S.jsx(O,{size:16}),onClick:()=>window.open("https://github.com/QuantumNous/new-api","_blank"),children:E.status.version}):ne&&S.jsx(T,{size:ee?"default":"large",className:"flex items-center !rounded-3xl px-6 py-2",icon:S.jsx(F,{size:16}),onClick:()=>window.open(ne,"_blank"),children:v("文档")})]}),S.jsxs("div",{className:"mt-12 md:mt-16 lg:mt-20 w-full",children:[S.jsx("div",{className:"flex items-center mb-6 md:mb-8 justify-center",children:S.jsx(Y,{type:"tertiary",className:"text-lg md:text-xl lg:text-2xl font-light",children:v("支持众多的大模型供应商")}
2)}),S.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3 sm:gap-4 md:gap-6 lg:gap-8 max-w-5xl mx-auto px-4",children:[S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(n,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(a,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(l,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(i.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(H.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(r.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(o.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(d.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(m,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(c.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(x.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(h.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx($.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(p.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(u.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(f,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(P,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(J.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(j.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(g.Color,{size:40})}),S.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 flex items-center justify-center",children:S.jsx(q.Text,{className:"!text-lg sm:!text-xl md:!text-2xl lg:!text-3xl font-bold",children:"30+"})})]})]})]})})]})}):S.jsx("div",{className:"text-center md:text-lg py-6 md:py-8 lg:py-12 overflow-x-hidden w-full",dangerouslySetInnerHTML:{__html:U}}):S.jsx(B,{content:U})})]})};export{K as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.