makearmy-app/.next/server/app/fiber-settings/page.js

1 line
10 KiB
JavaScript
Raw Normal View History

2025-09-22 10:37:53 -04:00
(()=>{var e={};e.id=775,e.ids=[775],e.modules={3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},6184:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>t});let t=(0,a(12907).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/app/app/fiber-settings/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/app/app/fiber-settings/page.tsx","default")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17734:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>x});var t=a(60687),r=a(76180),n=a.n(r),l=a(43210),i=a(16189),c=a(85814),d=a.n(c),o=a(30474);function x(){let e=(0,i.useSearchParams)().get("query")||"",[s,a]=(0,l.useState)(e),[r,c]=(0,l.useState)(e),[x,b]=(0,l.useState)([]),[m,p]=(0,l.useState)(!0),u=e=>{if(!r)return e;let s=RegExp(`(${r})`,"gi");return e?.replace(s,"<mark>$1</mark>")},f=(0,l.useMemo)(()=>{let e=r.toLowerCase();return x.filter(s=>[s.setting_title,s.uploader,s.mat?.name,s.mat_coat?.name,s.source?.model,s.lens?.field_size].filter(Boolean).some(s=>s.toLowerCase().includes(e)))},[x,r]),h=x.length,j=new Set(x.map(e=>e.mat?.name).filter(Boolean)).size,g=x.reduce((e,s)=>{let a=s.lens?.field_size;return a&&(e[a]=(e[a]||0)+1),e},{}),N=Object.entries(g).sort((e,s)=>(Number(s[1])||0)-(Number(e[1])||0))[0]?.[0]||"—",y=x.reduce((e,s)=>{let a=s.source?.model;return a&&(e[a]=(e[a]||0)+1),e},{}),_=Object.entries(y).sort((e,s)=>(Number(s[1])||0)-(Number(e[1])||0))[0]?.[0]||"—",v=[...x].sort((e,s)=>s.submission_id-e.submission_id).slice(0,5);return(0,t.jsxs)("div",{className:"jsx-12522c6baa7fb659 p-6 max-w-7xl mx-auto",children:[(0,t.jsx)(n(),{id:"12522c6baa7fb659",children:"mark{background:#ffde59;color:#242424;padding:0 2px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}"}),(0,t.jsxs)("div",{className:"jsx-12522c6baa7fb659 grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4 mb-6",children:[(0,t.jsxs)("div",{className:"jsx-12522c6baa7fb659 card bg-card text-card-foreground p-4",children:[(0,t.jsx)("h1",{className:"jsx-12522c6baa7fb659 text-2xl font-bold mb-2",children:"Fiber Laser Settings"}),(0,t.jsx)("input",{type:"search",value:s,onChange:e=>a(e.target.value),placeholder:"Search settings by material, uploader, etc...",className:"jsx-12522c6baa7fb659 w-full mb-4 dark:bg-background border border-border rounded-md p-2"}),(0,t.jsx)("p",{className:"jsx-12522c6baa7fb659 text-sm text-muted-foreground mb-2",children:"View and explore detailed fiber laser settings with context."}),(0,t.jsx)("a",{href:"/",className:"jsx-12522c6baa7fb659 inline-block mt-2 px-4 py-2 bg-accent text-background rounded-md text-sm",children:"← Back to Main Menu"})]}),(0,t.jsxs)("div",{className:"jsx-12522c6baa7fb659 card bg-card text-card-foreground p-4",children:[(0,t.jsx)("h2",{className:"jsx-12522c6baa7fb659 text-lg font-semibold mb-2",children:"How to Use"}),(0,t.jsx)("p",{className:"jsx-12522c6baa7fb659 text-sm",children:"Browse real-world fiber laser settings from the community. Use the search to narrow results. Click any setting to view its full configuration, notes, and photos. Click any linked term to find related settings."})]}),(0,t.jsxs)("div",{className:"jsx-12522c6baa7fb659 card bg-card text-card-foreground p-4",children:[(0,t.jsx)("h2",{className:"jsx-12522c6baa7fb659 text-lg font-semibold mb-2",children:"Stats Summary"}),(0,t.jsxs)("ul",{className:"jsx-12522c6baa7fb659 text-sm space-y-1",children:[(0,t.jsxs)("li",{className:"jsx-12522c6baa7fb659",children:["Total Settings: ",h]}),(0,t.jsxs)("li",{className:"jsx-12522c6baa7fb659",children:["Unique Materials: ",j]}),(0,t.jsxs)("li",{className:"jsx-12522c6baa7fb659",children:["Most Common Lens: ",N]}),(0,t.jsxs)("li",{className:"jsx-12522c6baa7fb659",children:["Most Used Source: ",_]})]})]}),(0,t.jsxs)("div",{className:"jsx-12522c6baa7fb659 card bg-card text-card-foreground