1 line
8.5 KiB
JavaScript
1 line
8.5 KiB
JavaScript
|
|
(()=>{var e={};e.id=2986,e.ids=[2986],e.modules={3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},23032:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(60687),a=s(85814),i=s.n(a);function n({title:e,subtitle:t,children:s}){return(0,r.jsxs)("div",{className:"mx-auto max-w-4xl px-4 py-8 space-y-6",children:[(0,r.jsxs)("header",{className:"flex items-start justify-between gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold",children:e}),t&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:t})]}),(0,r.jsx)(i(),{href:"https://makearmy.io",className:"rounded-lg px-3 py-2 border hover:bg-muted transition-colors text-sm",children:"Back to Main Menu"})]}),s]})}},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")},36319:()=>{},38313:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});let r=(0,s(12907).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/app/app/laser-toolkit/hatch-overlap/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/laser-toolkit/hatch-overlap/page.tsx","default")},45127:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s(60687),a=s(43210),i=s(23032),n=s(55192),o=s(68988);function d(e){let t=parseFloat(e);return Number.isFinite(t)?t:0}function l(){let[e,t]=(0,a.useState)("60"),[s,l]=(0,a.useState)("40"),[c,m]=(0,a.useState)("635"),x=(0,a.useMemo)(()=>{let t=d(e),r=d(s);return t<=0||r<=0?0:Math.max(0,Math.min(100,100*(1-r/t)))},[e,s]),p=d(s)/1e3||0,u=d(e)/1e3||0;return(0,r.jsxs)(i.A,{title:"Hatch Overlap",children:[(0,r.jsxs)(n.Zp,{children:[(0,r.jsx)(n.aR,{children:(0,r.jsx)(n.ZB,{className:"text-base",children:"Inputs"})}),(0,r.jsxs)(n.Wu,{className:"grid gap-3 sm:grid-cols-3",children:[(0,r.jsxs)("label",{className:"text-[11px] sm:text-xs",children:[(0,r.jsx)("div",{className:"mb-1 text-muted-foreground",children:"Spot size (\xb5m)"}),(0,r.jsx)(o.p,{inputMode:"decimal",value:e,onChange:e=>t(e.target.value)})]}),(0,r.jsxs)("label",{className:"text-[11px] sm:text-xs",children:[(0,r.jsx)("div",{className:"mb-1 text-muted-foreground",children:"Hatch gap (\xb5m)"}),(0,r.jsx)(o.p,{inputMode:"decimal",value:s,onChange:e=>(function(e){l(e);let t=d(e);m(t>0?(25400/t).toFixed(2):"")})(e.target.value)})]}),(0,r.jsxs)("label",{className:"text-[11px] sm:text-xs",children:[(0,r.jsx)("div",{className:"mb-1 text-muted-foreground",children:"Hatch LPI"}),(0,r.jsx)(o.p,{inputMode:"decimal",value:c,onChange:e=>(function(e){m(e);let t=d(e);l(t>0?(25400/t).toFixed(2):"")})(e.target.value)})]})]})]}),(0,r.jsxs)(n.Zp,{className:"mt-4",children:[(0,r.jsx)(n.aR,{children:(0,r.jsx)(n.ZB,{className:"text-base",children:"Result"})}),(0,r.jsxs)(n.Wu,{className:"grid gap-3 sm:grid-cols-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overlap"}),(0,r.jsxs)("div",{className:"text-lg",children:[x.toFixed(1),"%"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-muted-foreground",children:"Gap"}),(0,r.jsxs)("div",{className:"text-lg",children:[p.toFixed(4)," mm"]}),(0,r.jsxs)("div",{className:"text-xs text-muted-foreground",children:[d(s).toFixed(1)," \xb5m"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-muted-foreground",children:"Spot \xd8"}),(0,r.jsxs)("div",{className:"text-lg",children:[u.toFixed(4)," mm"]}),(0,r.jsxs)("div",{className:"text-xs text-muted-foreground",children:[d(e).toFixed(1)," \xb5m"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-muted-foreground",chi
|