{#if shownSets.length}
{m.role_fields_sets()}
{#each shownSets as s (s.key)} {@const by = within(s.key)} {#if by && sets.includes(s.key)}
{/if}
(sets = toggle(sets, s.key, e.currentTarget.checked))} />
{setNames[s.key]()}
{setLines[s.key]()}
{#if by}
{comesWith[by]()}
{/if}
{/each}
{/if} {#if shownActions.length}
{m.role_fields_may()}
{#each shownActions as a (a)} {@const by = from(a)} {#if by && picked.includes(a)}
{/if}
(picked = toggle(picked, a, e.currentTarget.checked))} /> {a} {#if by}
{comesWith[by]()}
{/if}
{/each}
{/if}
{m.role_fields_can_give()}
{#each roles.filter((r) => gives(r.key)) as r (r.key)}
{r.name ?? r.key}
{/each} {#if gives('*')}
{m.role_fields_any_role()}
{/if}
{m.role_fields_default()}