import{filter as e,find as t}from"./iterable.js";export function union(...e){return new Set(e.flatMap((e=>[...e])))}export function intersection(...e){return 0===e.length?new Set:1===e.length?new Set(e[0]):new Set(e.reduce(((e,t)=>filter(e,(e=>t.has(e))))))}export function difference(...e){return 0===e.length?new Set:1===e.length?new Set(e[0]):new Set(e.reduce(((e,t)=>filter(e,(e=>!t.has(e))))))}export function filter(t,n){return new Set(e(t,(e=>n(e,t))))}export function find(e,n){return t(e,(t=>n(t,e)))}