ew Set(data.map(elem => elem.system))];

    function toggle(e, elem, selectors_map) {
        selectors_map[elem] = !selectors_map[elem];
        e.target.className = selectors_map[elem] ? 'selector selector-active' : 'selector';
        render();
        updateHistory();
    }

    function toggleAll(e, selectors_map) {
        const new_value = Object.keys(selectors_map).filter(k => selectors_map[k]).length * 2 < Object.keys(selectors_map).length;
        [...e.target.parentElement.querySelectorAll('a')]