const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./home-XpcZ3_mt.js",".pnpm-B9xUIfq9.js","../css/.pnpm-CqAJlDPB.css","../css/home-BRcER5YL.css","./404-QCdEG_vw.js","../css/404-BMM83Db9.css"])))=>i.map(i=>d[i]); import{j as c,L as v,O as j,r as h,N as x,u as L,a as w,b as R,c as O,H as P,R as N}from"./.pnpm-B9xUIfq9.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))u(e);new MutationObserver(e=>{for(const o of e)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&u(s)}).observe(document,{childList:!0,subtree:!0});function a(e){const o={};return e.integrity&&(o.integrity=e.integrity),e.referrerPolicy&&(o.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?o.credentials="include":e.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function u(e){if(e.ep)return;e.ep=!0;const o=a(e);fetch(e.href,o)}})();const _="modulepreload",I=function(i,n){return new URL(i,n).href},y={},E=function(n,a,u){let e=Promise.resolve();if(a&&a.length>0){const s=document.getElementsByTagName("link"),t=document.querySelector("meta[property=csp-nonce]"),l=(t==null?void 0:t.nonce)||(t==null?void 0:t.getAttribute("nonce"));e=Promise.allSettled(a.map(r=>{if(r=I(r,u),r in y)return;y[r]=!0;const f=r.endsWith(".css"),S=f?'[rel="stylesheet"]':"";if(!!u)for(let m=s.length-1;m>=0;m--){const g=s[m];if(g.href===r&&(!f||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${S}`))return;const d=document.createElement("link");if(d.rel=f?"stylesheet":_,f||(d.as="script"),d.crossOrigin="",d.href=r,l&&d.setAttribute("nonce",l),document.head.appendChild(d),f)return new Promise((m,g)=>{d.addEventListener("load",m),d.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${r}`)))})}))}function o(s){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=s,window.dispatchEvent(t),!t.defaultPrevented)throw s}return e.then(s=>{for(const t of s||[])t.status==="rejected"&&o(t.reason);return n().catch(o)})},{Content:b}=v,A=()=>c.jsx(v,{className:"ant-layout",children:c.jsx(b,{className:"layout-content",children:c.jsx(j,{})})}),B=()=>c.jsx("div",{className:"load-container",children:c.jsx("div",{className:"lodding"})}),k=h.lazy(()=>E(()=>import("./home-XpcZ3_mt.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)),C=h.lazy(()=>E(()=>import("./404-QCdEG_vw.js"),__vite__mapDeps([4,1,2,5]),import.meta.url)),q=i=>c.jsx(h.Suspense,{fallback:B(),children:i}),z=[{path:"/",element:c.jsx(A,{}),mete:{title:"首页"},children:[{index:!0,element:q(c.jsx(k,{}))}]},{path:"/404",element:c.jsx(C,{})},{path:"*",element:c.jsx(x,{to:"/"})}],p="BookMark",H={setItem(i,n){const a=this.getStroage();a[i]=n,window.localStorage.setItem(p,JSON.stringify(a))},getItem(i){return this.getStroage()[i]},getStroage(){return JSON.parse(window.localStorage.getItem(p)||"{}")},clearItem(i){const n=this.getStroage();delete n[i],window.localStorage.setItem(p,JSON.stringify(n))},clearAll(){window.localStorage.clear()}},J=({routers:i})=>{const n=(s,t)=>{for(const l of s){if(l.path===t)return l;if(l.children){const r=n(l.children,t);if(r)return r}}},a=(s,t)=>{const{pathname:l}=s,r=n(i,l);if(console.log(r),!r){t("/404");return}H.getItem("sky"),r.mete&&(document.title=r.mete.title)},u=L(),e=w(),o=R(i);return h.useEffect(()=>{a(e,u)},[u,e]),o};function T(){return c.jsx(J,{routers:z})}const $=document.getElementById("root"),D=O($);D.render(c.jsx(P,{children:c.jsx(N.StrictMode,{children:c.jsx(T,{})})}));