makearmy-app/.next/server/app/fiber-settings/page.js
2025-09-22 10:37:53 -04:00

1 line
No EOL
10 KiB
JavaScript

(()=>{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 p-4",children:[(0,t.jsx)("h2",{className:"jsx-12522c6baa7fb659 text-lg font-semibold mb-2",children:"Recently Added"}),(0,t.jsx)("ul",{className:"jsx-12522c6baa7fb659 text-sm space-y-1",children:v.map(e=>(0,t.jsxs)("li",{className:"jsx-12522c6baa7fb659",children:[(0,t.jsx)(d(),{href:`/fiber-settings/${e.submission_id}`,className:"underline text-accent",children:e.setting_title||"Untitled"})," by ",e.uploader||"—"]},e.submission_id))})]}),(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:"Resources"}),(0,t.jsxs)("ul",{className:"jsx-12522c6baa7fb659 text-sm space-y-1",children:[(0,t.jsx)("li",{className:"jsx-12522c6baa7fb659",children:(0,t.jsx)("a",{href:"/materials",target:"_blank",rel:"noopener noreferrer",className:"jsx-12522c6baa7fb659 underline text-accent",children:"Material Safety Guide"})}),(0,t.jsx)("li",{className:"jsx-12522c6baa7fb659",children:(0,t.jsx)("a",{href:"https://lasereverything.net/scripts/laspwrconvert.php",target:"_blank",rel:"noopener noreferrer",className:"jsx-12522c6baa7fb659 underline text-accent",children:"Laser Parameter Calculator"})}),(0,t.jsx)("li",{className:"jsx-12522c6baa7fb659",children:(0,t.jsx)("a",{href:"https://jptoe.com/downloads",target:"_blank",rel:"noopener noreferrer",className:"jsx-12522c6baa7fb659 underline text-accent",children:"JPT Datasheets"})})]})]}),(0,t.jsxs)("div",{className:"jsx-12522c6baa7fb659 card bg-card text-card-foreground p-4 flex flex-col justify-between",children:[(0,t.jsxs)("div",{className:"jsx-12522c6baa7fb659",children:[(0,t.jsx)("h2",{className:"jsx-12522c6baa7fb659 text-md font-semibold mb-2",children:"Submit a Setting"}),(0,t.jsx)("p",{className:"jsx-12522c6baa7fb659 text-sm text-muted-foreground mb-2",children:"Have a reliable fiber setting to share? Contribute to the community database."})]}),(0,t.jsx)(d(),{href:"/submit/settings?target=settings_fiber",className:"bg-accent text-background text-sm px-4 py-2 rounded hover:opacity-90 transition",children:"Submit a Setting"})]})]}),m?(0,t.jsx)("p",{className:"jsx-12522c6baa7fb659 text-muted",children:"Loading settings..."}):0===f.length?(0,t.jsx)("p",{className:"jsx-12522c6baa7fb659 text-muted",children:"No fiber settings found."}):(0,t.jsx)("div",{className:"jsx-12522c6baa7fb659 overflow-x-auto",children:(0,t.jsxs)("table",{className:"jsx-12522c6baa7fb659 w-full text-sm",children:[(0,t.jsx)("thead",{className:"jsx-12522c6baa7fb659",children:(0,t.jsxs)("tr",{className:"jsx-12522c6baa7fb659",children:[(0,t.jsx)("th",{className:"jsx-12522c6baa7fb659 px-2 py-2 text-left",children:"Photo"}),(0,t.jsx)("th",{className:"jsx-12522c6baa7fb659 px-2 py-2 text-left",children:"Title"}),(0,t.jsx)("th",{className:"jsx-12522c6baa7fb659 px-2 py-2 text-left",children:"Uploader"}),(0,t.jsx)("th",{className:"jsx-12522c6baa7fb659 px-2 py-2 text-left",children:"Material"}),(0,t.jsx)("th",{className:"jsx-12522c6baa7fb659 px-2 py-2 text-left",children:"Coating"}),(0,t.jsx)("th",{className:"jsx-12522c6baa7fb659 px-2 py-2 text-left",children:"Source"}),(0,t.jsx)("th",{className:"jsx-12522c6baa7fb659 px-2 py-2 text-left",children:"Lens"})]})}),(0,t.jsx)("tbody",{className:"jsx-12522c6baa7fb659",children:f.map(e=>(0,t.jsxs)("tr",{className:"jsx-12522c6baa7fb659 border-t border-border",children:[(0,t.jsx)("td",{className:"jsx-12522c6baa7fb659 px-2 py-2",children:e.photo?.id?(0,t.jsx)(o.default,{src:`https://forms.lasereverything.net/assets/${e.photo.id}`,alt:e.photo.title||"laser preview",width:64,height:64,className:"rounded-md"}):"—"}),(0,t.jsx)("td",{className:"jsx-12522c6baa7fb659 px-2 py-2 whitespace-nowrap",children:(0,t.jsx)(d(),{href:`/fiber-settings/${e.submission_id}`,className:"text-accent underline",dangerouslySetInnerHTML:{__html:u(e.setting_title||"—")}})}),(0,t.jsx)("td",{dangerouslySetInnerHTML:{__html:u(e.uploader||"—")},className:"jsx-12522c6baa7fb659 px-2 py-2 whitespace-nowrap"}),(0,t.jsx)("td",{dangerouslySetInnerHTML:{__html:u(e.mat?.name||"—")},className:"jsx-12522c6baa7fb659 px-2 py-2 whitespace-nowrap"}),(0,t.jsx)("td",{dangerouslySetInnerHTML:{__html:u(e.mat_coat?.name||"—")},className:"jsx-12522c6baa7fb659 px-2 py-2 whitespace-nowrap"}),(0,t.jsx)("td",{dangerouslySetInnerHTML:{__html:u(e.source?.model||"—")},className:"jsx-12522c6baa7fb659 px-2 py-2 whitespace-nowrap"}),(0,t.jsx)("td",{dangerouslySetInnerHTML:{__html:u(e.lens?.field_size||"—")},className:"jsx-12522c6baa7fb659 px-2 py-2 whitespace-nowrap"})]},e.submission_id))})]})})]})}},19121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},28990:(e,s,a)=>{Promise.resolve().then(a.bind(a,6184))},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:e=>{"use strict";e.exports=require("path")},49738:(e,s,a)=>{"use strict";a.r(s),a.d(s,{GlobalError:()=>l.a,__next_app__:()=>x,pages:()=>o,routeModule:()=>b,tree:()=>d});var t=a(65239),r=a(48088),n=a(88170),l=a.n(n),i=a(30893),c={};for(let e in i)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(c[e]=()=>i[e]);a.d(s,c);let d={children:["",{children:["fiber-settings",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(a.bind(a,6184)),"/app/app/fiber-settings/page.tsx"]}]},{layout:[()=>Promise.resolve().then(a.bind(a,98483)),"/app/app/fiber-settings/layout.tsx"]}]},{layout:[()=>Promise.resolve().then(a.bind(a,58014)),"/app/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(a.t.bind(a,57398,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(a.t.bind(a,89999,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(a.t.bind(a,65284,23)),"next/dist/client/components/unauthorized-error"]}]}.children,o=["/app/app/fiber-settings/page.tsx"],x={require:a,loadChunk:()=>Promise.resolve()},b=new t.AppPageRouteModule({definition:{kind:r.RouteKind.APP_PAGE,page:"/fiber-settings/page",pathname:"/fiber-settings",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69158:(e,s,a)=>{Promise.resolve().then(a.bind(a,17734))},98483:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>n});var t=a(37413),r=a(61120);function n({children:e}){return(0,t.jsx)(r.Suspense,{fallback:null,children:e})}}};var s=require("../../webpack-runtime.js");s.C(e);var a=e=>s(s.s=e),t=s.X(0,[7719,4825,5814,598,1661],()=>a(49738));module.exports=t})();