enterprise-saa-s-dashboard-.../.next/static/chunks/34034584d29d618e.js

1 line
17 KiB
JavaScript

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},75254,e=>{"use strict";var t=e.i(71645);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var a={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"};let o=(0,t.createContext)({}),l=(0,t.forwardRef)(({color:e,size:n,strokeWidth:l,absoluteStrokeWidth:i,className:s="",children:u,iconNode:c,...f},d)=>{let{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:y=!1,color:m="currentColor",className:g=""}=(0,t.useContext)(o)??{},x=i??y?24*Number(l??h)/Number(n??p):l??h;return(0,t.createElement)("svg",{ref:d,...a,width:n??p??a.width,height:n??p??a.height,stroke:e??m,strokeWidth:x,className:r("lucide",g,s),...!u&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(f)&&{"aria-hidden":"true"},...f},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(u)?u:[u]])}),i=(e,a)=>{let o=(0,t.forwardRef)(({className:o,...i},s)=>(0,t.createElement)(l,{ref:s,iconNode:a,className:r(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,o),...i}));return o.displayName=n(e),o};e.s(["default",()=>i],75254)},18566,(e,t,r)=>{t.exports=e.r(76562)},95116,e=>{"use strict";let t=(0,e.i(75254).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);e.s(["Wrench",()=>t],95116)},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return s},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return i}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function l(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,l(e));else t.set(r,l(n));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return u},urlObjectKeys:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809)._(e.r(98183)),l=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",i=e.hash||"",s=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),s&&"object"==typeof s&&(s=String(o.urlQueryToSearchParams(s)));let c=e.search||s&&`?${s}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${i}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(71645);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return v},MissingStaticPage:function(){return k},NormalizeError:function(){return x},PageNotFoundError:function(){return b},SP:function(){return y},ST:function(){return m},WEB_VITALS:function(){return o},execOnce:function(){return l},getDisplayName:function(){return f},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return s},isResSent:function(){return d},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return j}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function l(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>i.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&d(r))return n;if(!n)throw Object.defineProperty(Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let y="u">typeof performance,m=y&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class x extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class k extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class v extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(18967),a=e.r(52817);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return b}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809),l=e.r(43476),i=o._(e.r(71645)),s=e.r(95057),u=e.r(8372),c=e.r(18581),f=e.r(18967),d=e.r(5550);e.r(33525);let p=e.r(91949),h=e.r(73668),y=e.r(9396);function m(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}function g(t){var r;let n,a,o,[s,g]=(0,i.useOptimistic)(p.IDLE_LINK_STATUS),b=(0,i.useRef)(null),{href:k,as:v,children:j,prefetch:w=null,passHref:M,replace:N,shallow:P,scroll:C,onClick:E,onMouseEnter:_,onTouchStart:O,legacyBehavior:S=!1,onNavigate:L,ref:T,unstable_dynamicOnHover:R,...A}=t;n=j,S&&("string"==typeof n||"number"==typeof n)&&(n=(0,l.jsx)("a",{children:n}));let z=i.default.useContext(u.AppRouterContext),$=!1!==w,U=!1!==w?null===(r=w)||"auto"===r?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,{href:F,as:I}=i.default.useMemo(()=>{let e=m(k);return{href:e,as:v?m(v):e}},[k,v]);if(S){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=i.default.Children.only(n)}let B=S?a&&"object"==typeof a&&a.ref:T,W=i.default.useCallback(e=>(null!==z&&(b.current=(0,p.mountLinkInstance)(e,F,z,U,$,g)),()=>{b.current&&((0,p.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,p.unmountPrefetchableInstance)(e)}),[$,F,z,U,g]),D={ref:(0,c.useMergedRef)(W,B),onClick(t){S||"function"!=typeof E||E(t),S&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!z||t.defaultPrevented||function(t,r,n,a,o,l,s){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);i.default.startTransition(()=>{f(n||r,o?"replace":"push",l??!0,a.current)})}}(t,F,I,b,N,C,L)},onMouseEnter(e){S||"function"!=typeof _||_(e),S&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),z&&$&&(0,p.onNavigationIntent)(e.currentTarget,!0===R)},onTouchStart:function(e){S||"function"!=typeof O||O(e),S&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),z&&$&&(0,p.onNavigationIntent)(e.currentTarget,!0===R)}};return(0,f.isAbsoluteUrl)(I)?D.href=I:S&&!M&&("a"!==a.type||"href"in a.props)||(D.href=(0,d.addBasePath)(I)),o=S?i.default.cloneElement(a,D):(0,l.jsx)("a",{...A,...D,children:n}),(0,l.jsx)(x.Provider,{value:s,children:o})}e.r(84508);let x=(0,i.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,i.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},17923,e=>{"use strict";let t=(0,e.i(75254).default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);e.s(["BarChart3",()=>t],17923)},40367,e=>{"use strict";var t=e.i(43476),r=e.i(22016),n=e.i(18566),a=e.i(75254);let o=(0,a.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),l=(0,a.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]),i=(0,a.default)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]),s=(0,a.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]),u=(0,a.default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]),c=(0,a.default)("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);var f=e.i(95116);let d=(0,a.default)("recycle",[["path",{d:"M7 19H4.815a1.83 1.83 0 0 1-1.57-.881 1.785 1.785 0 0 1-.004-1.784L7.196 9.5",key:"x6z5xu"}],["path",{d:"M11 19h8.203a1.83 1.83 0 0 0 1.556-.89 1.784 1.784 0 0 0 0-1.775l-1.226-2.12",key:"1x4zh5"}],["path",{d:"m14 16-3 3 3 3",key:"f6jyew"}],["path",{d:"M8.293 13.596 7.196 9.5 3.1 10.598",key:"wf1obh"}],["path",{d:"m9.344 5.811 1.093-1.892A1.83 1.83 0 0 1 11.985 3a1.784 1.784 0 0 1 1.546.888l3.943 6.843",key:"9tzpgr"}],["path",{d:"m13.378 9.633 4.096 1.098 1.097-4.096",key:"1oe83g"}]]),p=[{title:"设备",items:[{path:"/devices",label:"设备列表",icon:o},{path:"/models",label:"设备型号管理",icon:l},{path:"/boards",label:"板卡型号管理",icon:s}]},{title:"授权",items:[{path:"/licenses",label:"授权管理",icon:i}]},{title:"配置",items:[{path:"/config-files",label:"配置管理",icon:u}]},{title:"校准",items:[{path:"/calibration",label:"校准记录",icon:c}]},{title:"维修",items:[{path:"/repair",label:"维修工单",icon:f.Wrench},{path:"/scrap",label:"报废回收",icon:d}]}];function h(){let e=(0,n.usePathname)(),a=t=>"/"===t?"/"===e:e===t||e.startsWith(t+"/");return(0,t.jsxs)("aside",{className:"w-[200px] h-screen flex-shrink-0 overflow-y-auto",style:{backgroundColor:"#fff",borderRight:"1px solid #e8e8e8"},children:[(0,t.jsx)("div",{className:"px-4 py-4",style:{borderBottom:"1px solid #f0f0f0"},children:(0,t.jsx)("div",{className:"text-lg font-semibold",style:{color:"#4a7c59"},children:"Geomative"})}),(0,t.jsx)(r.default,{href:"/",className:"flex items-center gap-2 px-4 py-3 text-sm transition-colors",style:{color:a("/")?"#4a7c59":"rgba(0,0,0,0.65)",backgroundColor:a("/")?"#eef5f0":"transparent",borderLeft:a("/")?"3px solid #4a7c59":"3px solid transparent",fontWeight:a("/")?600:400},children:"首页"}),p.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"px-4 py-2.5 text-xs font-semibold uppercase tracking-wider",style:{color:"rgba(0,0,0,0.35)"},children:e.title}),e.items.map(e=>{let n=e.icon;return(0,t.jsxs)(r.default,{href:e.path,className:"flex items-center gap-2 px-4 py-2 text-sm transition-colors",style:{color:a(e.path)?"#4a7c59":"rgba(0,0,0,0.65)",backgroundColor:a(e.path)?"#eef5f0":"transparent",borderLeft:a(e.path)?"3px solid #4a7c59":"3px solid transparent",fontWeight:a(e.path)?600:400},children:[(0,t.jsx)(n,{size:16,style:{color:a(e.path)?"#4a7c59":"rgba(0,0,0,0.35)"}}),e.label]},e.path)})]},e.title))]})}e.s(["Sidebar",()=>h],40367)},36676,e=>{"use strict";var t=e.i(43476),r=e.i(22016),n=e.i(71645),a=e.i(17923);let o=(0,e.i(75254).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),l=[{path:"/users",label:"用户管理"},{path:"/roles",label:"角色权限"},{path:"/logs",label:"操作日志"},{path:"/settings",label:"系统设置"}];function i(){let[e,i]=(0,n.useState)(!1),s=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let e=e=>{s.current&&!s.current.contains(e.target)&&i(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,t.jsxs)("header",{className:"h-14 flex items-center justify-between px-6 flex-shrink-0",style:{backgroundColor:"#fff",borderBottom:"1px solid #e8e8e8"},children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("h1",{className:"text-base font-semibold",style:{color:"#1a1a1a"},children:"地空业务支撑平台——生产管理子系统"})}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(r.default,{href:"/reports",className:"text-gray-500 hover:text-gray-900 transition-colors",title:"数据统计",children:(0,t.jsx)(a.BarChart3,{size:18})}),(0,t.jsx)(r.default,{href:"/cost-reports",className:"text-gray-500 hover:text-gray-900 transition-colors",title:"运营报告",children:(0,t.jsx)(o,{size:18})}),(0,t.jsx)("div",{className:"w-px h-5 bg-gray-200"}),(0,t.jsxs)("div",{ref:s,className:"relative",children:[(0,t.jsxs)("button",{onClick:()=>i(!e),className:"flex items-center gap-2 cursor-pointer",children:[(0,t.jsx)("span",{className:"text-sm",style:{color:"#1a1a1a"},children:"Super Admin"}),(0,t.jsx)("span",{className:"px-2 py-0.5 rounded text-xs text-white",style:{backgroundColor:"#4a7c59"},children:"管理员"})]}),e&&(0,t.jsxs)("div",{className:"absolute right-0 top-10 w-36 rounded shadow-lg py-1 z-50",style:{backgroundColor:"#fff",border:"1px solid #e8e8e8"},children:[l.map(e=>(0,t.jsx)(r.default,{href:e.path,onClick:()=>i(!1),className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",children:e.label},e.path)),(0,t.jsx)("div",{style:{borderTop:"1px solid #F0F0F0"}}),(0,t.jsx)("button",{className:"block w-full text-left px-4 py-2 text-sm",style:{color:"#FF4D4F"},children:"退出"})]})]})]})]})}e.s(["Header",()=>i],36676)}]);