// Generated, do not edit. sha256:ea89ed2f3c7667a985d117ad93531e86e7422f6ef0152c179e997cfe96d6abd0
import { t } from '../i18n/index.js';
import { esc } from './escape.js';
const TEXT = 'fill:var(--text-primary);font-size:13px';
const SOFT = 'fill:var(--text-sec);font-size:12px';
const label = (x, y, text, style = TEXT, anchor = 'start') =>
`${esc(text)}`;
const svg = (w, h, caption, body) =>
``;
function standPeriod(caption) {
return svg(640, 184, caption, [
``,
label(465, 38, t('guide.figures.period'), 'fill:var(--accent-text);font-size:12px', 'middle'),
``,
label(102, 71, t('guide.figures.sinceBuy')),
``,
label(342, 113, t('guide.figures.inPeriod')),
``,
...[90, 330, 600].map(x => ``),
label(90, 176, t('guide.figures.purchase'), SOFT, 'middle'),
label(330, 176, t('guide.figures.yearStart'), SOFT, 'middle'),
label(600, 176, t('guide.figures.now'), SOFT, 'end'),
].join(''));
}
function accountExample(caption) {
const y = v => (230 - ((v - 140) / 60) * 200).toFixed(1);
const cost = y(191.2), inn = y(154.92), now = y(186.43);
const waarde = [[260, inn], [300, 168], [340, 173], [380, 145], [420, 124], [460, 132], [495, 96], [520, now]];
const lijn = waarde.map(([x, v]) => `${x},${v}`).join(' ');
return svg(680, 290, caption, [
``,
``,
``,
label(94, Number(cost) - 8, t('guide.figures.cost'), SOFT),
``,
label(268, Number(inn) + 20, t('guide.figures.broughtIn'), 'fill:var(--accent-text);font-size:12px'),
``,
``,
``,
label(544, Number(now) - 3, t('guide.figures.unrealized'), 'fill:var(--neg);font-size:12px'),
``,
label(544, 128, t('guide.figures.result'), 'fill:var(--pos);font-size:12px'),
label(544, 144, t('guide.figures.resultAmount'), 'fill:var(--pos);font-size:12px'),
``,
...[80, 260, 520].map(x => ``),
label(80, 254, t('guide.figures.purchaseExchange'), SOFT, 'middle'),
label(260, 254, t('guide.figures.transfer'), SOFT, 'middle'),
label(520, 254, t('guide.figures.value'), SOFT, 'middle'),
``,
label(90, 282, t('guide.figures.legendValue'), SOFT),
``,
label(190, 282, t('guide.figures.legendBroughtIn'), SOFT),
``,
label(350, 282, t('guide.figures.legendCost'), SOFT),
].join(''));
}
function resultSum(caption) {
const deel = (x, w, opacity, text) =>
``
+ label(x + 10, 82, text);
return svg(640, 104, caption, [
label(180, 32, t('guide.figures.result'), TEXT, 'end'),
``,
label(180, 82, t('guide.figures.roughly'), SOFT, 'end'),
deel(196, 220, 0.25, t('guide.figures.unrealizedPart')),
deel(420, 120, 0.15, t('guide.figures.realized')),
deel(544, 56, 0.06, t('guide.figures.interest')),
].join(''));
}
export const GUIDE_FIGURE_DRAWINGS = Object.freeze({
'stand-period': standPeriod,
'account-example': accountExample,
'result-sum': resultSum,
});