(a: number, b: number)
| 161 | }; |
| 162 | |
| 163 | const ratio = (a: number, b: number) => { |
| 164 | if (b === 0) return { ratio: 0, label: 'equal' as const }; |
| 165 | const r = a / b; |
| 166 | return { |
| 167 | ratio: Number(r.toFixed(2)), |
| 168 | label: r > 1.05 ? ('above' as const) : r < 0.95 ? ('below' as const) : ('equal' as const), |
| 169 | }; |
| 170 | }; |
| 171 | |
| 172 | return { |
| 173 | session: { |