let defs = null ; function getNode ( element ) { return document . createElementNS ( 'http://www.w3.org/2000/svg' , element ) ; } function createDefs ( ) { let svg = getNode ( 'svg' ) ; let style = getNode ( 'style' ) ; let defs = getNode ( 'defs' ) as SVGDefsElement ; svg . style . display = 'none' ; style . innerHTML = `path {
  opacity: var(--icon-primary-opacity, 1);
  fill: currentColor;
  fill: var(--icon-primary, currentColor);
}
path.s {
  opacity: 0.4;
  opacity: var(--icon-secondary-opacity, 0.4);
  fill: var(--icon-secondary, currentColor);
}` ; svg . appendChild ( style ) ; svg . appendChild ( defs ) ; document . body . appendChild ( svg ) ; return defs ; } export function register ( src ) { if ( defs === null ) { defs = createDefs ( ) ; } defs . insertAdjacentHTML ( 'beforeend' , src ) ; }