Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uhtml

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uhtml - npm Package Compare versions

Comparing version 4.1.19 to 4.1.20

166

cjs/handler.js

@@ -5,4 +5,14 @@ 'use strict';

const { diffFragment } = require('./persistent-fragment.js');
const { comment } = require('./literals.js');
const drop = (require('./range.js'));
const setAttribute = (element, name, value) => {
element.setAttribute(name, value);
}
const removeAttribute = (element, name) => {
element.removeAttribute(name);
}
exports.removeAttribute = removeAttribute
/**

@@ -18,8 +28,12 @@ * @template T

const name = key === 'role' ? key : `aria-${key}`;
if ($ == null) element.removeAttribute(name);
else element.setAttribute(name, $);
if ($ == null) removeAttribute(element, name);
else setAttribute(element, name, $);
}
return value;
};
exports.aria = aria;
const arrayComment = () => array;
exports.arrayComment = arrayComment;
let listeners;

@@ -45,5 +59,37 @@

};
exports.at = at;
/**
* @template T
* @this {import("./literals.js").HoleDetails}
* @param {Node} node
* @param {T} value
* @returns {T}
*/
function hole(node, value) {
const n = this.n || (this.n = node);
switch (typeof value) {
case 'string':
case 'number':
case 'boolean': {
if (n !== node) n.replaceWith((this.n = node));
this.n.data = value;
break;
}
case 'object':
case 'undefined': {
if (value == null) (this.n = node).data = '';
else this.n = value.valueOf();
n.replaceWith(this.n);
break;
}
}
return value;
};
const boundComment = () => hole.bind(comment());
exports.boundComment = boundComment;
/**
* @template T
* @param {Element} element

@@ -53,3 +99,6 @@ * @param {T} value

*/
const className = (element, value) => direct(element, value, 'className');
const className = (element, value) => maybeDirect(
element, value, value == null ? 'class' : 'className'
);
exports.className = className;

@@ -70,2 +119,3 @@ /**

};
exports.data = data;

@@ -80,2 +130,3 @@ /**

const direct = (ref, value, name) => (ref[name] = value);
exports.direct = direct;

@@ -90,2 +141,3 @@ /**

const dot = (element, value, name) => direct(element, value, name.slice(1));
exports.dot = dot;

@@ -96,9 +148,11 @@ /**

* @param {T} value
* @param {string} name
* @returns {T}
*/
const ref = (element, value) => {
if (typeof value === 'function') value(element);
else value.current = element;
return value;
};
const maybeDirect = (element, value, name) => (
value == null ?
(removeAttribute(element, name), value) :
direct(element, value, name)
);
exports.maybeDirect = maybeDirect;

@@ -109,10 +163,24 @@ /**

* @param {T} value
* @returns {T}
*/
const ref = (element, value) => (
(typeof value === 'function' ?
value(element) : (value.current = element)),
value
);
exports.ref = ref;
/**
* @template T
* @param {Element} element
* @param {T} value
* @param {string} name
* @returns {T}
*/
const regular = (element, value, name) => {
if (value == null) element.removeAttribute(name);
else element.setAttribute(name, value);
return value;
};
const regular = (element, value, name) => (
(value == null ?
removeAttribute(element, name) :
setAttribute(element, name, value)),
value
);

@@ -125,3 +193,8 @@ /**

*/
const style = (element, value) => direct(element.style, value, 'cssText');
const style = (element, value) => (
value == null ?
maybeDirect(element, value, 'style') :
direct(element.style, value, 'cssText')
);
exports.style = style;

@@ -135,6 +208,7 @@ /**

*/
const toggle = (element, value, name) => {
element.toggleAttribute(name.slice(1), value);
return value;
};
const toggle = (element, value, name) => (
element.toggleAttribute(name.slice(1), value),
value
);
exports.toggle = toggle;

@@ -148,9 +222,7 @@ /**

*/
const array = (node, value, _, prev) => {
if (value.length)
return udomdiff(node.parentNode, prev, value, diffFragment, node);
if (prev.length)
drop(prev[0], prev.at(-1), false);
return empty;
};
const array = (node, value, _, prev) => (
value.length ?
udomdiff(node.parentNode, prev, value, diffFragment, node) :
(drop(prev[0], prev.at(-1), false), empty)
);
exports.array = array;

@@ -181,3 +253,8 @@

(name === 'ref' ? ref : regular) :
(attr.get(name) || (name in element ? direct : regular))
(attr.get(name) || (
name in element ?
(name.startsWith('on') ? direct : maybeDirect) :
regular
)
)
);

@@ -194,35 +271,6 @@ }

*/
const text = (element, value) => {
element.textContent = value == null ? '' : value;
return value;
};
const text = (element, value) => (
(element.textContent = value == null ? '' : value),
value
);
exports.text = text;
/**
* @template T
* @this {import("./literals.js").HoleDetails}
* @param {Node} node
* @param {T} value
* @returns {T}
*/
function hole(node, value) {
const n = this.n || (this.n = node);
switch (typeof value) {
case 'string':
case 'number':
case 'boolean': {
if (n !== node) n.replaceWith((this.n = node));
this.n.data = value;
break;
}
case 'object':
case 'undefined': {
if (value == null) (this.n = node).data = '';
else this.n = value.valueOf();
n.replaceWith(this.n);
break;
}
}
return value;
}
exports.hole = hole;
'use strict';
// ⚠️ WARNING - THIS FILE IS AN ARTIFACT - DO NOT EDIT
/**

@@ -447,2 +448,10 @@ * @param {Document} document

const setAttribute = (element, name, value) => {
element.setAttribute(name, value);
};
const removeAttribute = (element, name) => {
element.removeAttribute(name);
};
/**

@@ -458,4 +467,4 @@ * @template T

const name = key === 'role' ? key : `aria-${key}`;
if ($ == null) element.removeAttribute(name);
else element.setAttribute(name, $);
if ($ == null) removeAttribute(element, name);
else setAttribute(element, name, $);
}

@@ -465,2 +474,4 @@ return value;

const arrayComment = () => array;
let listeners;

@@ -489,2 +500,31 @@

* @template T
* @this {import("./literals.js").HoleDetails}
* @param {Node} node
* @param {T} value
* @returns {T}
*/
function hole(node, value) {
const n = this.n || (this.n = node);
switch (typeof value) {
case 'string':
case 'number':
case 'boolean': {
if (n !== node) n.replaceWith((this.n = node));
this.n.data = value;
break;
}
case 'object':
case 'undefined': {
if (value == null) (this.n = node).data = '';
else this.n = value.valueOf();
n.replaceWith(this.n);
break;
}
}
return value;
}
const boundComment = () => hole.bind(comment());
/**
* @template T
* @param {Element} element

@@ -494,3 +534,5 @@ * @param {T} value

*/
const className = (element, value) => direct(element, value, 'className');
const className = (element, value) => maybeDirect(
element, value, value == null ? 'class' : 'className'
);

@@ -534,9 +576,10 @@ /**

* @param {T} value
* @param {string} name
* @returns {T}
*/
const ref = (element, value) => {
if (typeof value === 'function') value(element);
else value.current = element;
return value;
};
const maybeDirect = (element, value, name) => (
value == null ?
(removeAttribute(element, name), value) :
direct(element, value, name)
);

@@ -547,10 +590,23 @@ /**

* @param {T} value
* @returns {T}
*/
const ref = (element, value) => (
(typeof value === 'function' ?
value(element) : (value.current = element)),
value
);
/**
* @template T
* @param {Element} element
* @param {T} value
* @param {string} name
* @returns {T}
*/
const regular = (element, value, name) => {
if (value == null) element.removeAttribute(name);
else element.setAttribute(name, value);
return value;
};
const regular = (element, value, name) => (
(value == null ?
removeAttribute(element, name) :
setAttribute(element, name, value)),
value
);

@@ -563,3 +619,7 @@ /**

*/
const style = (element, value) => direct(element.style, value, 'cssText');
const style = (element, value) => (
value == null ?
maybeDirect(element, value, 'style') :
direct(element.style, value, 'cssText')
);

@@ -573,6 +633,6 @@ /**

*/
const toggle = (element, value, name) => {
element.toggleAttribute(name.slice(1), value);
return value;
};
const toggle = (element, value, name) => (
element.toggleAttribute(name.slice(1), value),
value
);

@@ -586,9 +646,7 @@ /**

*/
const array = (node, value, _, prev) => {
if (value.length)
return udomdiff(node.parentNode, prev, value, diffFragment, node);
if (prev.length)
drop(prev[0], prev.at(-1), false);
return empty;
};
const array = (node, value, _, prev) => (
value.length ?
udomdiff(node.parentNode, prev, value, diffFragment, node) :
(drop(prev[0], prev.at(-1), false), empty)
);

@@ -617,3 +675,8 @@ const attr = new Map([

(name === 'ref' ? ref : regular) :
(attr.get(name) || (name in element ? direct : regular))
(attr.get(name) || (
name in element ?
(name.startsWith('on') ? direct : maybeDirect) :
regular
)
)
);

@@ -629,35 +692,7 @@ }

*/
const text = (element, value) => {
element.textContent = value == null ? '' : value;
return value;
};
const text = (element, value) => (
(element.textContent = value == null ? '' : value),
value
);
/**
* @template T
* @this {import("./literals.js").HoleDetails}
* @param {Node} node
* @param {T} value
* @returns {T}
*/
function hole(node, value) {
const n = this.n || (this.n = node);
switch (typeof value) {
case 'string':
case 'number':
case 'boolean': {
if (n !== node) n.replaceWith((this.n = node));
this.n.data = value;
break;
}
case 'object':
case 'undefined': {
if (value == null) (this.n = node).data = '';
else this.n = value.valueOf();
n.replaceWith(this.n);
break;
}
}
return value;
}
let template = document.createElement('template'), svg$1, range;

@@ -709,5 +744,2 @@

const boundComment = () => hole.bind(comment());
const arrayComment = () => array;
/**

@@ -744,3 +776,3 @@ * @param {TemplateStringsArray} template

entries.push(entry(ATTRIBUTE_NODE, path, attribute(node, name, xml), name));
node.removeAttribute(search);
removeAttribute(node, search);
search = `${prefix}${i++}`;

@@ -747,0 +779,0 @@ }

@@ -7,5 +7,5 @@ 'use strict';

const { empty, isArray, set } = require('./utils.js');
const { cel, comment, entry } = require('./literals.js');
const { cel, entry } = require('./literals.js');
const { array, attribute, text, hole } = require('./handler.js');
const { attribute, text, arrayComment, boundComment, removeAttribute } = require('./handler.js');
const createContent = (require('./create-content.js'));

@@ -37,5 +37,2 @@

const boundComment = () => hole.bind(comment());
const arrayComment = () => array;
/**

@@ -72,3 +69,3 @@ * @param {TemplateStringsArray} template

entries.push(entry(ATTRIBUTE_NODE, path, attribute(node, name, xml), name));
node.removeAttribute(search);
removeAttribute(node, search);
search = `${prefix}${i++}`;

@@ -75,0 +72,0 @@ }

import udomdiff from 'udomdiff';
import { empty, isArray, set } from './utils.js';
import { diffFragment } from './persistent-fragment.js';
import { comment } from './literals.js';
import drop from './range.js';
const setAttribute = (element, name, value) => {
element.setAttribute(name, value);
}
export const removeAttribute = (element, name) => {
element.removeAttribute(name);
}
/**

@@ -12,8 +21,8 @@ * @template T

*/
const aria = (element, value) => {
export const aria = (element, value) => {
for (const key in value) {
const $ = value[key];
const name = key === 'role' ? key : `aria-${key}`;
if ($ == null) element.removeAttribute(name);
else element.setAttribute(name, $);
if ($ == null) removeAttribute(element, name);
else setAttribute(element, name, $);
}

@@ -23,2 +32,4 @@ return value;

export const arrayComment = () => array;
let listeners;

@@ -33,3 +44,3 @@

*/
const at = (element, value, name) => {
export const at = (element, value, name) => {
name = name.slice(1);

@@ -48,2 +59,32 @@ if (!listeners) listeners = new WeakMap;

* @template T
* @this {import("./literals.js").HoleDetails}
* @param {Node} node
* @param {T} value
* @returns {T}
*/
function hole(node, value) {
const n = this.n || (this.n = node);
switch (typeof value) {
case 'string':
case 'number':
case 'boolean': {
if (n !== node) n.replaceWith((this.n = node));
this.n.data = value;
break;
}
case 'object':
case 'undefined': {
if (value == null) (this.n = node).data = '';
else this.n = value.valueOf();
n.replaceWith(this.n);
break;
}
}
return value;
};
export const boundComment = () => hole.bind(comment());
/**
* @template T
* @param {Element} element

@@ -53,3 +94,5 @@ * @param {T} value

*/
const className = (element, value) => direct(element, value, 'className');
export const className = (element, value) => maybeDirect(
element, value, value == null ? 'class' : 'className'
);

@@ -62,3 +105,3 @@ /**

*/
const data = (element, value) => {
export const data = (element, value) => {
const { dataset } = element;

@@ -79,3 +122,3 @@ for (const key in value) {

*/
const direct = (ref, value, name) => (ref[name] = value);
export const direct = (ref, value, name) => (ref[name] = value);

@@ -89,3 +132,3 @@ /**

*/
const dot = (element, value, name) => direct(element, value, name.slice(1));
export const dot = (element, value, name) => direct(element, value, name.slice(1));

@@ -96,9 +139,10 @@ /**

* @param {T} value
* @param {string} name
* @returns {T}
*/
const ref = (element, value) => {
if (typeof value === 'function') value(element);
else value.current = element;
return value;
};
export const maybeDirect = (element, value, name) => (
value == null ?
(removeAttribute(element, name), value) :
direct(element, value, name)
);

@@ -109,10 +153,23 @@ /**

* @param {T} value
* @returns {T}
*/
export const ref = (element, value) => (
(typeof value === 'function' ?
value(element) : (value.current = element)),
value
);
/**
* @template T
* @param {Element} element
* @param {T} value
* @param {string} name
* @returns {T}
*/
const regular = (element, value, name) => {
if (value == null) element.removeAttribute(name);
else element.setAttribute(name, value);
return value;
};
const regular = (element, value, name) => (
(value == null ?
removeAttribute(element, name) :
setAttribute(element, name, value)),
value
);

@@ -125,3 +182,7 @@ /**

*/
const style = (element, value) => direct(element.style, value, 'cssText');
export const style = (element, value) => (
value == null ?
maybeDirect(element, value, 'style') :
direct(element.style, value, 'cssText')
);

@@ -135,6 +196,6 @@ /**

*/
const toggle = (element, value, name) => {
element.toggleAttribute(name.slice(1), value);
return value;
};
export const toggle = (element, value, name) => (
element.toggleAttribute(name.slice(1), value),
value
);

@@ -148,9 +209,7 @@ /**

*/
export const array = (node, value, _, prev) => {
if (value.length)
return udomdiff(node.parentNode, prev, value, diffFragment, node);
if (prev.length)
drop(prev[0], prev.at(-1), false);
return empty;
};
export const array = (node, value, _, prev) => (
value.length ?
udomdiff(node.parentNode, prev, value, diffFragment, node) :
(drop(prev[0], prev.at(-1), false), empty)
);

@@ -179,3 +238,8 @@ export const attr = new Map([

(name === 'ref' ? ref : regular) :
(attr.get(name) || (name in element ? direct : regular))
(attr.get(name) || (
name in element ?
(name.startsWith('on') ? direct : maybeDirect) :
regular
)
)
);

@@ -191,33 +255,5 @@ }

*/
export const text = (element, value) => {
element.textContent = value == null ? '' : value;
return value;
};
/**
* @template T
* @this {import("./literals.js").HoleDetails}
* @param {Node} node
* @param {T} value
* @returns {T}
*/
export function hole(node, value) {
const n = this.n || (this.n = node);
switch (typeof value) {
case 'string':
case 'number':
case 'boolean': {
if (n !== node) n.replaceWith((this.n = node));
this.n.data = value;
break;
}
case 'object':
case 'undefined': {
if (value == null) (this.n = node).data = '';
else this.n = value.valueOf();
n.replaceWith(this.n);
break;
}
}
return value;
};
export const text = (element, value) => (
(element.textContent = value == null ? '' : value),
value
);
// ⚠️ WARNING - THIS FILE IS AN ARTIFACT - DO NOT EDIT
/**

@@ -446,2 +447,10 @@ * @param {Document} document

const setAttribute = (element, name, value) => {
element.setAttribute(name, value);
};
const removeAttribute = (element, name) => {
element.removeAttribute(name);
};
/**

@@ -457,4 +466,4 @@ * @template T

const name = key === 'role' ? key : `aria-${key}`;
if ($ == null) element.removeAttribute(name);
else element.setAttribute(name, $);
if ($ == null) removeAttribute(element, name);
else setAttribute(element, name, $);
}

@@ -464,2 +473,4 @@ return value;

const arrayComment = () => array;
let listeners;

@@ -488,2 +499,31 @@

* @template T
* @this {import("./literals.js").HoleDetails}
* @param {Node} node
* @param {T} value
* @returns {T}
*/
function hole(node, value) {
const n = this.n || (this.n = node);
switch (typeof value) {
case 'string':
case 'number':
case 'boolean': {
if (n !== node) n.replaceWith((this.n = node));
this.n.data = value;
break;
}
case 'object':
case 'undefined': {
if (value == null) (this.n = node).data = '';
else this.n = value.valueOf();
n.replaceWith(this.n);
break;
}
}
return value;
}
const boundComment = () => hole.bind(comment());
/**
* @template T
* @param {Element} element

@@ -493,3 +533,5 @@ * @param {T} value

*/
const className = (element, value) => direct(element, value, 'className');
const className = (element, value) => maybeDirect(
element, value, value == null ? 'class' : 'className'
);

@@ -533,9 +575,10 @@ /**

* @param {T} value
* @param {string} name
* @returns {T}
*/
const ref = (element, value) => {
if (typeof value === 'function') value(element);
else value.current = element;
return value;
};
const maybeDirect = (element, value, name) => (
value == null ?
(removeAttribute(element, name), value) :
direct(element, value, name)
);

@@ -546,10 +589,23 @@ /**

* @param {T} value
* @returns {T}
*/
const ref = (element, value) => (
(typeof value === 'function' ?
value(element) : (value.current = element)),
value
);
/**
* @template T
* @param {Element} element
* @param {T} value
* @param {string} name
* @returns {T}
*/
const regular = (element, value, name) => {
if (value == null) element.removeAttribute(name);
else element.setAttribute(name, value);
return value;
};
const regular = (element, value, name) => (
(value == null ?
removeAttribute(element, name) :
setAttribute(element, name, value)),
value
);

@@ -562,3 +618,7 @@ /**

*/
const style = (element, value) => direct(element.style, value, 'cssText');
const style = (element, value) => (
value == null ?
maybeDirect(element, value, 'style') :
direct(element.style, value, 'cssText')
);

@@ -572,6 +632,6 @@ /**

*/
const toggle = (element, value, name) => {
element.toggleAttribute(name.slice(1), value);
return value;
};
const toggle = (element, value, name) => (
element.toggleAttribute(name.slice(1), value),
value
);

@@ -585,9 +645,7 @@ /**

*/
const array = (node, value, _, prev) => {
if (value.length)
return udomdiff(node.parentNode, prev, value, diffFragment, node);
if (prev.length)
drop(prev[0], prev.at(-1), false);
return empty;
};
const array = (node, value, _, prev) => (
value.length ?
udomdiff(node.parentNode, prev, value, diffFragment, node) :
(drop(prev[0], prev.at(-1), false), empty)
);

@@ -616,3 +674,8 @@ const attr = new Map([

(name === 'ref' ? ref : regular) :
(attr.get(name) || (name in element ? direct : regular))
(attr.get(name) || (
name in element ?
(name.startsWith('on') ? direct : maybeDirect) :
regular
)
)
);

@@ -628,35 +691,7 @@ }

*/
const text = (element, value) => {
element.textContent = value == null ? '' : value;
return value;
};
const text = (element, value) => (
(element.textContent = value == null ? '' : value),
value
);
/**
* @template T
* @this {import("./literals.js").HoleDetails}
* @param {Node} node
* @param {T} value
* @returns {T}
*/
function hole(node, value) {
const n = this.n || (this.n = node);
switch (typeof value) {
case 'string':
case 'number':
case 'boolean': {
if (n !== node) n.replaceWith((this.n = node));
this.n.data = value;
break;
}
case 'object':
case 'undefined': {
if (value == null) (this.n = node).data = '';
else this.n = value.valueOf();
n.replaceWith(this.n);
break;
}
}
return value;
}
let template = document.createElement('template'), svg$1, range;

@@ -708,5 +743,2 @@

const boundComment = () => hole.bind(comment());
const arrayComment = () => array;
/**

@@ -743,3 +775,3 @@ * @param {TemplateStringsArray} template

entries.push(entry(ATTRIBUTE_NODE, path, attribute(node, name, xml), name));
node.removeAttribute(search);
removeAttribute(node, search);
search = `${prefix}${i++}`;

@@ -746,0 +778,0 @@ }

@@ -6,5 +6,5 @@ import { ATTRIBUTE_NODE, TEXT_NODE, COMMENT_NODE } from 'domconstants/constants';

import { empty, isArray, set } from './utils.js';
import { cel, comment, entry } from './literals.js';
import { cel, entry } from './literals.js';
import { array, attribute, text, hole } from './handler.js';
import { attribute, text, arrayComment, boundComment, removeAttribute } from './handler.js';
import createContent from './create-content.js';

@@ -36,5 +36,2 @@

const boundComment = () => hole.bind(comment());
const arrayComment = () => array;
/**

@@ -71,3 +68,3 @@ * @param {TemplateStringsArray} template

entries.push(entry(ATTRIBUTE_NODE, path, attribute(node, name, xml), name));
node.removeAttribute(search);
removeAttribute(node, search);
search = `${prefix}${i++}`;

@@ -74,0 +71,0 @@ }

@@ -1,2 +0,2 @@

const{isArray:e}=Array,t=[],n=()=>document.createRange(),r=(e,t,n)=>(e.set(t,n),n),s=(e,t,n,r="")=>({t:e,p:t,u:n,n:r}),l=e=>({s:e,t:null,n:null,d:t}),{setPrototypeOf:o}=Object;let i;var c=(e,t,r)=>(i||(i=n()),r?i.setStartAfter(e):i.setStartBefore(e),i.setEndAfter(t),i.deleteContents(),e);const a=({firstChild:e,lastChild:t},n)=>c(e,t,n);let u=!1;const h=(e,t)=>u&&11===e.nodeType?1/t<0?t?a(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e;class d extends((e=>{function t(e){return o(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e;#t;constructor(e){const t=[...e.childNodes];super(e),this.#e=t,this.#t=t.length,u=!0}get firstChild(){return this.#e[0]}get lastChild(){return this.#e.at(-1)}get parentNode(){return this.#e[0].parentNode}remove(){a(this,!1)}replaceWith(e){a(this,!0).replaceWith(e)}valueOf(){return this.childNodes.length!==this.#t&&this.append(...this.#e),this}}const f=(e,t)=>t.reduceRight(p,e),p=(e,t)=>e.childNodes[t];var g=e=>(n,r)=>{const{c:s,e:l,l:o}=e(n,r),i=s.cloneNode(!0);let c,a,u=l.length,h=u?l.slice(0):t;for(;u--;){const{t:e,p:n,u:s,n:o}=l[u],d=n===a?c:c=f(i,a=n),p=8===e?s():s;h[u]={v:p(d,r[u],o,t),u:p,t:d,n:o}}return((e,t)=>({n:e,d:t}))(1===o?i.firstChild:new d(i),h)};const m=/^(?:plaintext|script|style|textarea|title|xmp)$/i,v=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,x=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,b=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,$=/[\x01\x02]/g;let N;const w=(t,n,s)=>{s=s.slice(1),N||(N=new WeakMap);const l=N.get(t)||r(N,t,{});let o=l[s];return o&&o[0]&&t.removeEventListener(s,...o),o=e(n)?n:[n,!1],l[s]=o,o[0]&&t.addEventListener(s,...o),n},C=(e,t,n)=>e[n]=t,y=(e,t,n)=>C(e,t,n.slice(1)),A=(e,t)=>("function"==typeof t?t(e):t.current=e,t),W=(e,t,n)=>(null==t?e.removeAttribute(n):e.setAttribute(n,t),t),k=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),E=(e,n,r,s)=>n.length?((e,t,n,r,s)=>{const l=n.length;let o=t.length,i=l,c=0,a=0,u=null;for(;c<o||a<i;)if(o===c){const t=i<l?a?r(n[a-1],-0).nextSibling:r(n[i-a],0):s;for(;a<i;)e.insertBefore(r(n[a++],1),t)}else if(i===a)for(;c<o;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[o-1]===n[i-1])o--,i--;else if(t[c]===n[i-1]&&n[a]===t[o-1]){const s=r(t[--o],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--i],1),s),t[o]=n[i]}else{if(!u){u=new Map;let e=a;for(;e<i;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<i){let l=c,h=1;for(;++l<o&&l<i&&u.get(t[l])===s+h;)h++;if(h>s-a){const l=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),l)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,s,n,h,e):(s.length&&c(s[0],s.at(-1),!1),t),S=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?e.removeAttribute(s):e.setAttribute(s,r)}return t}],["class",(e,t)=>C(e,t,"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",A],["style",(e,t)=>C(e.style,t,"cssText")]]),M=(e,t,n)=>{switch(t[0]){case".":return y;case"?":return k;case"@":return w;default:return n||"ownerSVGElement"in e?"ref"===t?A:W:S.get(t)||(t in e?C:W)}},O=(e,t)=>(e.textContent=null==t?"":t,t);function T(e,t){const n=this.n||(this.n=e);switch(typeof t){case"string":case"number":case"boolean":n!==e&&n.replaceWith(this.n=e),this.n.data=t;break;case"object":case"undefined":null==t?(this.n=e).data="":this.n=t.valueOf(),n.replaceWith(this.n)}return t}let B,j,L=document.createElement("template");var z=(e,t)=>{if(t)return B||(B=document.createElementNS("http://www.w3.org/2000/svg","svg"),j=n(),j.selectNodeContents(B)),j.createContextualFragment(e);L.innerHTML=e;const{content:r}=L;return L=L.cloneNode(!1),r};const F=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},R=()=>T.bind({n:null}),Z=()=>E,D=(n,l,o)=>{const i=z(((e,t,n)=>{let r=0;return e.join("").trim().replace(x,((e,t,r,s)=>`<${t}${r.replace(b,"=$2$1").trimEnd()}${s?n||v.test(t)?" /":`></${t}`:""}>`)).replace($,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(n,H,o),o),{length:c}=n;let a=!1,u=t;if(c>1){const t=document.createTreeWalker(i,129),n=[];let r=0,h=`${H}${r++}`;for(u=[];r<c;){const i=t.nextNode();if(8===i.nodeType){if(i.data===h){let t=e(l[r-1])?Z:R;t===R?n.push(i):a=!0,u.push(s(8,F(i),t)),h=`${H}${r++}`}}else{let e;for(;i.hasAttribute(h);){e||(e=F(i));const t=i.getAttribute(h);u.push(s(2,e,M(i,t,o),t)),i.removeAttribute(h),h=`${H}${r++}`}m.test(i.localName)&&i.textContent.trim()===`\x3c!--${h}--\x3e`&&(u.push(s(3,e||F(i),O)),h=`${H}${r++}`)}}for(r=0;r<n.length;r++)n[r].replaceWith(document.createTextNode(""))}const h=i.childNodes.length;return r(G,n,((e,t,n)=>({c:e,e:t,l:n}))(i,u,1===h&&a?0:h))},G=new WeakMap,H="isµ";var P=e=>(t,n)=>G.get(t)||D(t,n,e);const V=g(P(!1)),_=g(P(!0)),q=(e,{s:n,t:r,v:s})=>{s.length&&e.s===t&&(e.s=[]);const l=I(e,s);if(e.t!==r){const{n:t,d:l}=(n?_:V)(r,s);e.t=r,e.n=t,e.d=l}else{const{d:t}=e;for(let e=0;e<l;e++){const n=s[e],r=t[e],{v:l}=r;if(n!==l){const{u:e,t:t,n:s}=r;r.v=e(t,n,s,l)}}}return e.n},I=({s:n},r)=>{const{length:s}=r;for(let o=0;o<s;o++){const s=r[o];s instanceof J?r[o]=q(n[o]||(n[o]=l(t)),s):e(s)?I(n[o]||(n[o]=l([])),s):n[o]=null}return s<n.length&&n.splice(s),s};class J{constructor(e,t,n){this.s=e,this.t=t,this.v=n}}const K=new WeakMap;var Q=(e,n)=>{const s=K.get(e)||r(K,e,l(t));return s.n!==q(s,"function"==typeof n?n():n)&&e.replaceChildren(s.n),e};
/*! (c) Andrea Giammarchi - MIT */const U=e=>(t,...n)=>new J(e,t,n),X=U(!1),Y=U(!0);export{J as Hole,S as attr,X as html,Q as render,Y as svg};
const{isArray:e}=Array,t=[],n=()=>document.createRange(),s=(e,t,n)=>(e.set(t,n),n),r=(e,t,n,s="")=>({t:e,p:t,u:n,n:s}),l=e=>({s:e,t:null,n:null,d:t}),{setPrototypeOf:o}=Object;let i;var c=(e,t,s)=>(i||(i=n()),s?i.setStartAfter(e):i.setStartBefore(e),i.setEndAfter(t),i.deleteContents(),e);const a=({firstChild:e,lastChild:t},n)=>c(e,t,n);let u=!1;const h=(e,t)=>u&&11===e.nodeType?1/t<0?t?a(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e;class d extends((e=>{function t(e){return o(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e;#t;constructor(e){const t=[...e.childNodes];super(e),this.#e=t,this.#t=t.length,u=!0}get firstChild(){return this.#e[0]}get lastChild(){return this.#e.at(-1)}get parentNode(){return this.#e[0].parentNode}remove(){a(this,!1)}replaceWith(e){a(this,!0).replaceWith(e)}valueOf(){return this.childNodes.length!==this.#t&&this.append(...this.#e),this}}const f=(e,t)=>t.reduceRight(p,e),p=(e,t)=>e.childNodes[t];var g=e=>(n,s)=>{const{c:r,e:l,l:o}=e(n,s),i=r.cloneNode(!0);let c,a,u=l.length,h=u?l.slice(0):t;for(;u--;){const{t:e,p:n,u:r,n:o}=l[u],d=n===a?c:c=f(i,a=n),p=8===e?r():r;h[u]={v:p(d,s[u],o,t),u:p,t:d,n:o}}return((e,t)=>({n:e,d:t}))(1===o?i.firstChild:new d(i),h)};const m=/^(?:plaintext|script|style|textarea|title|xmp)$/i,v=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,x=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,$=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,b=/[\x01\x02]/g;const N=(e,t,n)=>{e.setAttribute(t,n)},w=(e,t)=>{e.removeAttribute(t)},y=()=>j;let C;const A=(t,n,r)=>{r=r.slice(1),C||(C=new WeakMap);const l=C.get(t)||s(C,t,{});let o=l[r];return o&&o[0]&&t.removeEventListener(r,...o),o=e(n)?n:[n,!1],l[r]=o,o[0]&&t.addEventListener(r,...o),n};function W(e,t){const n=this.n||(this.n=e);switch(typeof t){case"string":case"number":case"boolean":n!==e&&n.replaceWith(this.n=e),this.n.data=t;break;case"object":case"undefined":null==t?(this.n=e).data="":this.n=t.valueOf(),n.replaceWith(this.n)}return t}const k=()=>W.bind({n:null}),E=(e,t,n)=>e[n]=t,S=(e,t,n)=>E(e,t,n.slice(1)),M=(e,t,n)=>null==t?(w(e,n),t):E(e,t,n),O=(e,t)=>("function"==typeof t?t(e):t.current=e,t),T=(e,t,n)=>(null==t?w(e,n):N(e,n,t),t),B=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),j=(e,n,s,r)=>n.length?((e,t,n,s,r)=>{const l=n.length;let o=t.length,i=l,c=0,a=0,u=null;for(;c<o||a<i;)if(o===c){const t=i<l?a?s(n[a-1],-0).nextSibling:s(n[i-a],0):r;for(;a<i;)e.insertBefore(s(n[a++],1),t)}else if(i===a)for(;c<o;)u&&u.has(t[c])||e.removeChild(s(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[o-1]===n[i-1])o--,i--;else if(t[c]===n[i-1]&&n[a]===t[o-1]){const r=s(t[--o],-1).nextSibling;e.insertBefore(s(n[a++],1),s(t[c++],-1).nextSibling),e.insertBefore(s(n[--i],1),r),t[o]=n[i]}else{if(!u){u=new Map;let e=a;for(;e<i;)u.set(n[e],e++)}if(u.has(t[c])){const r=u.get(t[c]);if(a<r&&r<i){let l=c,h=1;for(;++l<o&&l<i&&u.get(t[l])===r+h;)h++;if(h>r-a){const l=s(t[c],0);for(;a<r;)e.insertBefore(s(n[a++],1),l)}else e.replaceChild(s(n[a++],1),s(t[c++],-1))}else c++}else e.removeChild(s(t[c++],-1))}return n})(e.parentNode,r,n,h,e):(c(r[0],r.at(-1),!1),t),L=new Map([["aria",(e,t)=>{for(const n in t){const s=t[n],r="role"===n?n:`aria-${n}`;null==s?w(e,r):N(e,r,s)}return t}],["class",(e,t)=>M(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",O],["style",(e,t)=>null==t?M(e,t,"style"):E(e.style,t,"cssText")]]),z=(e,t,n)=>{switch(t[0]){case".":return S;case"?":return B;case"@":return A;default:return n||"ownerSVGElement"in e?"ref"===t?O:T:L.get(t)||(t in e?t.startsWith("on")?E:M:T)}},F=(e,t)=>(e.textContent=null==t?"":t,t);let R,Z,D=document.createElement("template");var G=(e,t)=>{if(t)return R||(R=document.createElementNS("http://www.w3.org/2000/svg","svg"),Z=n(),Z.selectNodeContents(R)),Z.createContextualFragment(e);D.innerHTML=e;const{content:s}=D;return D=D.cloneNode(!1),s};const H=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},P=(n,l,o)=>{const i=G(((e,t,n)=>{let s=0;return e.join("").trim().replace(x,((e,t,s,r)=>`<${t}${s.replace($,"=$2$1").trimEnd()}${r?n||v.test(t)?" /":`></${t}`:""}>`)).replace(b,(e=>""===e?`\x3c!--${t+s++}--\x3e`:t+s++))})(n,_,o),o),{length:c}=n;let a=!1,u=t;if(c>1){const t=document.createTreeWalker(i,129),n=[];let s=0,h=`${_}${s++}`;for(u=[];s<c;){const i=t.nextNode();if(8===i.nodeType){if(i.data===h){let t=e(l[s-1])?y:k;t===k?n.push(i):a=!0,u.push(r(8,H(i),t)),h=`${_}${s++}`}}else{let e;for(;i.hasAttribute(h);){e||(e=H(i));const t=i.getAttribute(h);u.push(r(2,e,z(i,t,o),t)),w(i,h),h=`${_}${s++}`}m.test(i.localName)&&i.textContent.trim()===`\x3c!--${h}--\x3e`&&(u.push(r(3,e||H(i),F)),h=`${_}${s++}`)}}for(s=0;s<n.length;s++)n[s].replaceWith(document.createTextNode(""))}const h=i.childNodes.length;return s(V,n,((e,t,n)=>({c:e,e:t,l:n}))(i,u,1===h&&a?0:h))},V=new WeakMap,_="isµ";var q=e=>(t,n)=>V.get(t)||P(t,n,e);const I=g(q(!1)),J=g(q(!0)),K=(e,{s:n,t:s,v:r})=>{r.length&&e.s===t&&(e.s=[]);const l=Q(e,r);if(e.t!==s){const{n:t,d:l}=(n?J:I)(s,r);e.t=s,e.n=t,e.d=l}else{const{d:t}=e;for(let e=0;e<l;e++){const n=r[e],s=t[e],{v:l}=s;if(n!==l){const{u:e,t:t,n:r}=s;s.v=e(t,n,r,l)}}}return e.n},Q=({s:n},s)=>{const{length:r}=s;for(let o=0;o<r;o++){const r=s[o];r instanceof U?s[o]=K(n[o]||(n[o]=l(t)),r):e(r)?Q(n[o]||(n[o]=l([])),r):n[o]=null}return r<n.length&&n.splice(r),r};class U{constructor(e,t,n){this.s=e,this.t=t,this.v=n}}const X=new WeakMap;var Y=(e,n)=>{const r=X.get(e)||s(X,e,l(t));return r.n!==K(r,"function"==typeof n?n():n)&&e.replaceChildren(r.n),e};
/*! (c) Andrea Giammarchi - MIT */const ee=e=>(t,...n)=>new U(e,t,n),te=ee(!1),ne=ee(!0);export{U as Hole,L as attr,te as html,Y as render,ne as svg};

@@ -1,2 +0,2 @@

var e=e=>function(t){const{constructor:n}=e.createDocumentFragment(),{isArray:r}=Array,s=[],l=()=>e.createRange(),o=(e,t,n)=>(e.set(t,n),n),i=(e,t,n,r="")=>({t:e,p:t,u:n,n:r}),c=e=>({s:e,t:null,n:null,d:s}),{setPrototypeOf:a}=Object;let u;var h=(e,t,n)=>(u||(u=l()),n?u.setStartAfter(e):u.setStartBefore(e),u.setEndAfter(t),u.deleteContents(),e);const d=({firstChild:e,lastChild:t},n)=>h(e,t,n);let f=!1;const p=(e,t)=>f&&11===e.nodeType?1/t<0?t?d(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e;class g extends((e=>{function t(e){return a(e,new.target.prototype)}return t.prototype=e.prototype,t})(n)){#e;#t;constructor(e){const t=[...e.childNodes];super(e),this.#e=t,this.#t=t.length,f=!0}get firstChild(){return this.#e[0]}get lastChild(){return this.#e.at(-1)}get parentNode(){return this.#e[0].parentNode}remove(){d(this,!1)}replaceWith(e){d(this,!0).replaceWith(e)}valueOf(){return this.childNodes.length!==this.#t&&this.append(...this.#e),this}}const m=(e,t)=>t.reduceRight(v,e),v=(e,t)=>e.childNodes[t];var b=e=>(t,n)=>{const{c:r,e:l,l:o}=e(t,n),i=r.cloneNode(!0);let c,a,u=l.length,h=u?l.slice(0):s;for(;u--;){const{t:e,p:t,u:r,n:o}=l[u],d=t===a?c:c=m(i,a=t),f=8===e?r():r;h[u]={v:f(d,n[u],o,s),u:f,t:d,n:o}}return((e,t)=>({n:e,d:t}))(1===o?i.firstChild:new g(i),h)};const x=/^(?:plaintext|script|style|textarea|title|xmp)$/i,w=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,$=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,N=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,C=/[\x01\x02]/g;let y;const A=(e,t,n)=>{n=n.slice(1),y||(y=new WeakMap);const s=y.get(e)||o(y,e,{});let l=s[n];return l&&l[0]&&e.removeEventListener(n,...l),l=r(t)?t:[t,!1],s[n]=l,l[0]&&e.addEventListener(n,...l),t},W=(e,t,n)=>e[n]=t,k=(e,t,n)=>W(e,t,n.slice(1)),M=(e,t)=>("function"==typeof t?t(e):t.current=e,t),E=(e,t,n)=>(null==t?e.removeAttribute(n):e.setAttribute(n,t),t),S=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),O=(e,t,n,r)=>t.length?((e,t,n,r,s)=>{const l=n.length;let o=t.length,i=l,c=0,a=0,u=null;for(;c<o||a<i;)if(o===c){const t=i<l?a?r(n[a-1],-0).nextSibling:r(n[i-a],0):s;for(;a<i;)e.insertBefore(r(n[a++],1),t)}else if(i===a)for(;c<o;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[o-1]===n[i-1])o--,i--;else if(t[c]===n[i-1]&&n[a]===t[o-1]){const s=r(t[--o],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--i],1),s),t[o]=n[i]}else{if(!u){u=new Map;let e=a;for(;e<i;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<i){let l=c,h=1;for(;++l<o&&l<i&&u.get(t[l])===s+h;)h++;if(h>s-a){const l=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),l)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,r,t,p,e):(r.length&&h(r[0],r.at(-1),!1),s),T=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?e.removeAttribute(s):e.setAttribute(s,r)}return t}],["class",(e,t)=>W(e,t,"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",M],["style",(e,t)=>W(e.style,t,"cssText")]]),B=(e,t,n)=>{switch(t[0]){case".":return k;case"?":return S;case"@":return A;default:return n||"ownerSVGElement"in e?"ref"===t?M:E:T.get(t)||(t in e?W:E)}},F=(e,t)=>(e.textContent=null==t?"":t,t);function j(e,t){const n=this.n||(this.n=e);switch(typeof t){case"string":case"number":case"boolean":n!==e&&n.replaceWith(this.n=e),this.n.data=t;break;case"object":case"undefined":null==t?(this.n=e).data="":this.n=t.valueOf(),n.replaceWith(this.n)}return t}let L,z,H=e.createElement("template");var R=(t,n)=>{if(n)return L||(L=e.createElementNS("http://www.w3.org/2000/svg","svg"),z=l(),z.selectNodeContents(L)),z.createContextualFragment(t);H.innerHTML=t;const{content:r}=H;return H=H.cloneNode(!1),r};const Z=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},D=()=>j.bind({n:null}),G=()=>O,P=(t,n,l)=>{const c=R(((e,t,n)=>{let r=0;return e.join("").trim().replace($,((e,t,r,s)=>`<${t}${r.replace(N,"=$2$1").trimEnd()}${s?n||w.test(t)?" /":`></${t}`:""}>`)).replace(C,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(t,_,l),l),{length:a}=t;let u=!1,h=s;if(a>1){const t=e.createTreeWalker(c,129),s=[];let o=0,d=`${_}${o++}`;for(h=[];o<a;){const e=t.nextNode();if(8===e.nodeType){if(e.data===d){let t=r(n[o-1])?G:D;t===D?s.push(e):u=!0,h.push(i(8,Z(e),t)),d=`${_}${o++}`}}else{let t;for(;e.hasAttribute(d);){t||(t=Z(e));const n=e.getAttribute(d);h.push(i(2,t,B(e,n,l),n)),e.removeAttribute(d),d=`${_}${o++}`}x.test(e.localName)&&e.textContent.trim()===`\x3c!--${d}--\x3e`&&(h.push(i(3,t||Z(e),F)),d=`${_}${o++}`)}}for(o=0;o<s.length;o++)s[o].replaceWith(e.createTextNode(""))}const d=c.childNodes.length;return o(V,t,((e,t,n)=>({c:e,e:t,l:n}))(c,h,1===d&&u?0:d))},V=new WeakMap,_="isµ";var q=e=>(t,n)=>V.get(t)||P(t,n,e);const I=b(q(!1)),J=b(q(!0)),K=(e,{s:t,t:n,v:r})=>{r.length&&e.s===s&&(e.s=[]);const l=Q(e,r);if(e.t!==n){const{n:s,d:l}=(t?J:I)(n,r);e.t=n,e.n=s,e.d=l}else{const{d:t}=e;for(let e=0;e<l;e++){const n=r[e],s=t[e],{v:l}=s;if(n!==l){const{u:e,t:t,n:r}=s;s.v=e(t,n,r,l)}}}return e.n},Q=({s:e},t)=>{const{length:n}=t;for(let l=0;l<n;l++){const n=t[l];n instanceof U?t[l]=K(e[l]||(e[l]=c(s)),n):r(n)?Q(e[l]||(e[l]=c([])),n):e[l]=null}return n<e.length&&e.splice(n),n};class U{constructor(e,t,n){this.s=e,this.t=t,this.v=n}}
/*! (c) Andrea Giammarchi - MIT */const X=e=>(t,...n)=>new U(e,t,n),Y=X(!1),ee=X(!0),te=new WeakMap;const ne=new WeakMap,re=e=>(t,n)=>{const r=ne.get(t)||o(ne,t,new Map);return r.get(n)||o(r,n,function(t,...n){return K(this,new U(e,t,n))}.bind(c(s)))},se=re(!1),le=re(!0);return t.Hole=U,t.attr=T,t.html=Y,t.htmlFor=se,t.render=(e,t)=>{const n=te.get(e)||o(te,e,c(s)),r="function"==typeof t?t():t,{n:l}=n,i=r instanceof U?K(n,r):r;return l!==i&&e.replaceChildren(n.n=i),e},t.svg=ee,t.svgFor=le,t}({});export{e as default};
var e=e=>function(t){const{constructor:n}=e.createDocumentFragment(),{isArray:s}=Array,r=[],l=()=>e.createRange(),o=(e,t,n)=>(e.set(t,n),n),i=(e,t,n,s="")=>({t:e,p:t,u:n,n:s}),c=e=>({s:e,t:null,n:null,d:r}),{setPrototypeOf:a}=Object;let u;var h=(e,t,n)=>(u||(u=l()),n?u.setStartAfter(e):u.setStartBefore(e),u.setEndAfter(t),u.deleteContents(),e);const d=({firstChild:e,lastChild:t},n)=>h(e,t,n);let f=!1;const p=(e,t)=>f&&11===e.nodeType?1/t<0?t?d(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e;class g extends((e=>{function t(e){return a(e,new.target.prototype)}return t.prototype=e.prototype,t})(n)){#e;#t;constructor(e){const t=[...e.childNodes];super(e),this.#e=t,this.#t=t.length,f=!0}get firstChild(){return this.#e[0]}get lastChild(){return this.#e.at(-1)}get parentNode(){return this.#e[0].parentNode}remove(){d(this,!1)}replaceWith(e){d(this,!0).replaceWith(e)}valueOf(){return this.childNodes.length!==this.#t&&this.append(...this.#e),this}}const m=(e,t)=>t.reduceRight(v,e),v=(e,t)=>e.childNodes[t];var x=e=>(t,n)=>{const{c:s,e:l,l:o}=e(t,n),i=s.cloneNode(!0);let c,a,u=l.length,h=u?l.slice(0):r;for(;u--;){const{t:e,p:t,u:s,n:o}=l[u],d=t===a?c:c=m(i,a=t),f=8===e?s():s;h[u]={v:f(d,n[u],o,r),u:f,t:d,n:o}}return((e,t)=>({n:e,d:t}))(1===o?i.firstChild:new g(i),h)};const b=/^(?:plaintext|script|style|textarea|title|xmp)$/i,w=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,$=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,N=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,y=/[\x01\x02]/g;const C=(e,t,n)=>{e.setAttribute(t,n)},A=(e,t)=>{e.removeAttribute(t)},W=()=>z;let k;const M=(e,t,n)=>{n=n.slice(1),k||(k=new WeakMap);const r=k.get(e)||o(k,e,{});let l=r[n];return l&&l[0]&&e.removeEventListener(n,...l),l=s(t)?t:[t,!1],r[n]=l,l[0]&&e.addEventListener(n,...l),t};function E(e,t){const n=this.n||(this.n=e);switch(typeof t){case"string":case"number":case"boolean":n!==e&&n.replaceWith(this.n=e),this.n.data=t;break;case"object":case"undefined":null==t?(this.n=e).data="":this.n=t.valueOf(),n.replaceWith(this.n)}return t}const S=()=>E.bind({n:null}),O=(e,t,n)=>e[n]=t,T=(e,t,n)=>O(e,t,n.slice(1)),B=(e,t,n)=>null==t?(A(e,n),t):O(e,t,n),F=(e,t)=>("function"==typeof t?t(e):t.current=e,t),j=(e,t,n)=>(null==t?A(e,n):C(e,n,t),t),L=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),z=(e,t,n,s)=>t.length?((e,t,n,s,r)=>{const l=n.length;let o=t.length,i=l,c=0,a=0,u=null;for(;c<o||a<i;)if(o===c){const t=i<l?a?s(n[a-1],-0).nextSibling:s(n[i-a],0):r;for(;a<i;)e.insertBefore(s(n[a++],1),t)}else if(i===a)for(;c<o;)u&&u.has(t[c])||e.removeChild(s(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[o-1]===n[i-1])o--,i--;else if(t[c]===n[i-1]&&n[a]===t[o-1]){const r=s(t[--o],-1).nextSibling;e.insertBefore(s(n[a++],1),s(t[c++],-1).nextSibling),e.insertBefore(s(n[--i],1),r),t[o]=n[i]}else{if(!u){u=new Map;let e=a;for(;e<i;)u.set(n[e],e++)}if(u.has(t[c])){const r=u.get(t[c]);if(a<r&&r<i){let l=c,h=1;for(;++l<o&&l<i&&u.get(t[l])===r+h;)h++;if(h>r-a){const l=s(t[c],0);for(;a<r;)e.insertBefore(s(n[a++],1),l)}else e.replaceChild(s(n[a++],1),s(t[c++],-1))}else c++}else e.removeChild(s(t[c++],-1))}return n})(e.parentNode,s,t,p,e):(h(s[0],s.at(-1),!1),r),H=new Map([["aria",(e,t)=>{for(const n in t){const s=t[n],r="role"===n?n:`aria-${n}`;null==s?A(e,r):C(e,r,s)}return t}],["class",(e,t)=>B(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",F],["style",(e,t)=>null==t?B(e,t,"style"):O(e.style,t,"cssText")]]),R=(e,t,n)=>{switch(t[0]){case".":return T;case"?":return L;case"@":return M;default:return n||"ownerSVGElement"in e?"ref"===t?F:j:H.get(t)||(t in e?t.startsWith("on")?O:B:j)}},Z=(e,t)=>(e.textContent=null==t?"":t,t);let D,G,P=e.createElement("template");var V=(t,n)=>{if(n)return D||(D=e.createElementNS("http://www.w3.org/2000/svg","svg"),G=l(),G.selectNodeContents(D)),G.createContextualFragment(t);P.innerHTML=t;const{content:s}=P;return P=P.cloneNode(!1),s};const _=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},q=(t,n,l)=>{const c=V(((e,t,n)=>{let s=0;return e.join("").trim().replace($,((e,t,s,r)=>`<${t}${s.replace(N,"=$2$1").trimEnd()}${r?n||w.test(t)?" /":`></${t}`:""}>`)).replace(y,(e=>""===e?`\x3c!--${t+s++}--\x3e`:t+s++))})(t,J,l),l),{length:a}=t;let u=!1,h=r;if(a>1){const t=e.createTreeWalker(c,129),r=[];let o=0,d=`${J}${o++}`;for(h=[];o<a;){const e=t.nextNode();if(8===e.nodeType){if(e.data===d){let t=s(n[o-1])?W:S;t===S?r.push(e):u=!0,h.push(i(8,_(e),t)),d=`${J}${o++}`}}else{let t;for(;e.hasAttribute(d);){t||(t=_(e));const n=e.getAttribute(d);h.push(i(2,t,R(e,n,l),n)),A(e,d),d=`${J}${o++}`}b.test(e.localName)&&e.textContent.trim()===`\x3c!--${d}--\x3e`&&(h.push(i(3,t||_(e),Z)),d=`${J}${o++}`)}}for(o=0;o<r.length;o++)r[o].replaceWith(e.createTextNode(""))}const d=c.childNodes.length;return o(I,t,((e,t,n)=>({c:e,e:t,l:n}))(c,h,1===d&&u?0:d))},I=new WeakMap,J="isµ";var K=e=>(t,n)=>I.get(t)||q(t,n,e);const Q=x(K(!1)),U=x(K(!0)),X=(e,{s:t,t:n,v:s})=>{s.length&&e.s===r&&(e.s=[]);const l=Y(e,s);if(e.t!==n){const{n:r,d:l}=(t?U:Q)(n,s);e.t=n,e.n=r,e.d=l}else{const{d:t}=e;for(let e=0;e<l;e++){const n=s[e],r=t[e],{v:l}=r;if(n!==l){const{u:e,t:t,n:s}=r;r.v=e(t,n,s,l)}}}return e.n},Y=({s:e},t)=>{const{length:n}=t;for(let l=0;l<n;l++){const n=t[l];n instanceof ee?t[l]=X(e[l]||(e[l]=c(r)),n):s(n)?Y(e[l]||(e[l]=c([])),n):e[l]=null}return n<e.length&&e.splice(n),n};class ee{constructor(e,t,n){this.s=e,this.t=t,this.v=n}}
/*! (c) Andrea Giammarchi - MIT */const te=e=>(t,...n)=>new ee(e,t,n),ne=te(!1),se=te(!0),re=new WeakMap;const le=new WeakMap,oe=e=>(t,n)=>{const s=le.get(t)||o(le,t,new Map);return s.get(n)||o(s,n,function(t,...n){return X(this,new ee(e,t,n))}.bind(c(r)))},ie=oe(!1),ce=oe(!0);return t.Hole=ee,t.attr=H,t.html=ne,t.htmlFor=ie,t.render=(e,t)=>{const n=re.get(e)||o(re,e,c(r)),s="function"==typeof t?t():t,{n:l}=n,i=s instanceof ee?X(n,s):s;return l!==i&&e.replaceChildren(n.n=i),e},t.svg=se,t.svgFor=ce,t}({});export{e as default};

@@ -1,2 +0,2 @@

const{isArray:e}=Array,t=[],n=()=>document.createRange(),r=(e,t,n)=>(e.set(t,n),n),s=(e,t,n,r="")=>({t:e,p:t,u:n,n:r}),o=e=>({s:e,t:null,n:null,d:t}),{setPrototypeOf:l}=Object;let i;var c=(e,t,r)=>(i||(i=n()),r?i.setStartAfter(e):i.setStartBefore(e),i.setEndAfter(t),i.deleteContents(),e);const a=({firstChild:e,lastChild:t},n)=>c(e,t,n);let u=!1;const h=(e,t)=>u&&11===e.nodeType?1/t<0?t?a(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e;class d extends((e=>{function t(e){return l(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e;#t;constructor(e){const t=[...e.childNodes];super(e),this.#e=t,this.#t=t.length,u=!0}get firstChild(){return this.#e[0]}get lastChild(){return this.#e.at(-1)}get parentNode(){return this.#e[0].parentNode}remove(){a(this,!1)}replaceWith(e){a(this,!0).replaceWith(e)}valueOf(){return this.childNodes.length!==this.#t&&this.append(...this.#e),this}}const f=(e,t)=>t.reduceRight(p,e),p=(e,t)=>e.childNodes[t];var g=e=>(n,r)=>{const{c:s,e:o,l:l}=e(n,r),i=s.cloneNode(!0);let c,a,u=o.length,h=u?o.slice(0):t;for(;u--;){const{t:e,p:n,u:s,n:l}=o[u],d=n===a?c:c=f(i,a=n),p=8===e?s():s;h[u]={v:p(d,r[u],l,t),u:p,t:d,n:l}}return((e,t)=>({n:e,d:t}))(1===l?i.firstChild:new d(i),h)};const m=/^(?:plaintext|script|style|textarea|title|xmp)$/i,v=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,b=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,x=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,w=/[\x01\x02]/g;let $;const N=(t,n,s)=>{s=s.slice(1),$||($=new WeakMap);const o=$.get(t)||r($,t,{});let l=o[s];return l&&l[0]&&t.removeEventListener(s,...l),l=e(n)?n:[n,!1],o[s]=l,l[0]&&t.addEventListener(s,...l),n},C=(e,t,n)=>e[n]=t,y=(e,t,n)=>C(e,t,n.slice(1)),A=(e,t)=>("function"==typeof t?t(e):t.current=e,t),W=(e,t,n)=>(null==t?e.removeAttribute(n):e.setAttribute(n,t),t),k=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),M=(e,n,r,s)=>n.length?((e,t,n,r,s)=>{const o=n.length;let l=t.length,i=o,c=0,a=0,u=null;for(;c<l||a<i;)if(l===c){const t=i<o?a?r(n[a-1],-0).nextSibling:r(n[i-a],0):s;for(;a<i;)e.insertBefore(r(n[a++],1),t)}else if(i===a)for(;c<l;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[l-1]===n[i-1])l--,i--;else if(t[c]===n[i-1]&&n[a]===t[l-1]){const s=r(t[--l],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--i],1),s),t[l]=n[i]}else{if(!u){u=new Map;let e=a;for(;e<i;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<i){let o=c,h=1;for(;++o<l&&o<i&&u.get(t[o])===s+h;)h++;if(h>s-a){const o=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),o)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,s,n,h,e):(s.length&&c(s[0],s.at(-1),!1),t),E=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?e.removeAttribute(s):e.setAttribute(s,r)}return t}],["class",(e,t)=>C(e,t,"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",A],["style",(e,t)=>C(e.style,t,"cssText")]]),S=(e,t,n)=>{switch(t[0]){case".":return y;case"?":return k;case"@":return N;default:return n||"ownerSVGElement"in e?"ref"===t?A:W:E.get(t)||(t in e?C:W)}},O=(e,t)=>(e.textContent=null==t?"":t,t);function T(e,t){const n=this.n||(this.n=e);switch(typeof t){case"string":case"number":case"boolean":n!==e&&n.replaceWith(this.n=e),this.n.data=t;break;case"object":case"undefined":null==t?(this.n=e).data="":this.n=t.valueOf(),n.replaceWith(this.n)}return t}let B,j,L=document.createElement("template");var z=(e,t)=>{if(t)return B||(B=document.createElementNS("http://www.w3.org/2000/svg","svg"),j=n(),j.selectNodeContents(B)),j.createContextualFragment(e);L.innerHTML=e;const{content:r}=L;return L=L.cloneNode(!1),r};const F=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},R=()=>T.bind({n:null}),Z=()=>M,D=(n,o,l)=>{const i=z(((e,t,n)=>{let r=0;return e.join("").trim().replace(b,((e,t,r,s)=>`<${t}${r.replace(x,"=$2$1").trimEnd()}${s?n||v.test(t)?" /":`></${t}`:""}>`)).replace(w,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(n,H,l),l),{length:c}=n;let a=!1,u=t;if(c>1){const t=document.createTreeWalker(i,129),n=[];let r=0,h=`${H}${r++}`;for(u=[];r<c;){const i=t.nextNode();if(8===i.nodeType){if(i.data===h){let t=e(o[r-1])?Z:R;t===R?n.push(i):a=!0,u.push(s(8,F(i),t)),h=`${H}${r++}`}}else{let e;for(;i.hasAttribute(h);){e||(e=F(i));const t=i.getAttribute(h);u.push(s(2,e,S(i,t,l),t)),i.removeAttribute(h),h=`${H}${r++}`}m.test(i.localName)&&i.textContent.trim()===`\x3c!--${h}--\x3e`&&(u.push(s(3,e||F(i),O)),h=`${H}${r++}`)}}for(r=0;r<n.length;r++)n[r].replaceWith(document.createTextNode(""))}const h=i.childNodes.length;return r(G,n,((e,t,n)=>({c:e,e:t,l:n}))(i,u,1===h&&a?0:h))},G=new WeakMap,H="isµ";var P=e=>(t,n)=>G.get(t)||D(t,n,e);const V=g(P(!1)),_=g(P(!0)),q=(e,{s:n,t:r,v:s})=>{s.length&&e.s===t&&(e.s=[]);const o=I(e,s);if(e.t!==r){const{n:t,d:o}=(n?_:V)(r,s);e.t=r,e.n=t,e.d=o}else{const{d:t}=e;for(let e=0;e<o;e++){const n=s[e],r=t[e],{v:o}=r;if(n!==o){const{u:e,t:t,n:s}=r;r.v=e(t,n,s,o)}}}return e.n},I=({s:n},r)=>{const{length:s}=r;for(let l=0;l<s;l++){const s=r[l];s instanceof J?r[l]=q(n[l]||(n[l]=o(t)),s):e(s)?I(n[l]||(n[l]=o([])),s):n[l]=null}return s<n.length&&n.splice(s),s};class J{constructor(e,t,n){this.s=e,this.t=t,this.v=n}}
/*! (c) Andrea Giammarchi - MIT */const K=e=>(t,...n)=>new J(e,t,n),Q=K(!1),U=K(!0),X=new WeakMap;var Y=(e,n)=>{const s=X.get(e)||r(X,e,o(t)),l="function"==typeof n?n():n,{n:i}=s,c=l instanceof J?q(s,l):l;return i!==c&&e.replaceChildren(s.n=c),e};const ee=new WeakMap,te=e=>(n,s)=>{const l=ee.get(n)||r(ee,n,new Map);return l.get(s)||r(l,s,function(t,...n){return q(this,new J(e,t,n))}.bind(o(t)))},ne=te(!1),re=te(!0);export{J as Hole,E as attr,Q as html,ne as htmlFor,Y as render,U as svg,re as svgFor};
const{isArray:e}=Array,t=[],n=()=>document.createRange(),s=(e,t,n)=>(e.set(t,n),n),r=(e,t,n,s="")=>({t:e,p:t,u:n,n:s}),l=e=>({s:e,t:null,n:null,d:t}),{setPrototypeOf:o}=Object;let i;var c=(e,t,s)=>(i||(i=n()),s?i.setStartAfter(e):i.setStartBefore(e),i.setEndAfter(t),i.deleteContents(),e);const a=({firstChild:e,lastChild:t},n)=>c(e,t,n);let u=!1;const h=(e,t)=>u&&11===e.nodeType?1/t<0?t?a(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e;class d extends((e=>{function t(e){return o(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e;#t;constructor(e){const t=[...e.childNodes];super(e),this.#e=t,this.#t=t.length,u=!0}get firstChild(){return this.#e[0]}get lastChild(){return this.#e.at(-1)}get parentNode(){return this.#e[0].parentNode}remove(){a(this,!1)}replaceWith(e){a(this,!0).replaceWith(e)}valueOf(){return this.childNodes.length!==this.#t&&this.append(...this.#e),this}}const f=(e,t)=>t.reduceRight(p,e),p=(e,t)=>e.childNodes[t];var g=e=>(n,s)=>{const{c:r,e:l,l:o}=e(n,s),i=r.cloneNode(!0);let c,a,u=l.length,h=u?l.slice(0):t;for(;u--;){const{t:e,p:n,u:r,n:o}=l[u],d=n===a?c:c=f(i,a=n),p=8===e?r():r;h[u]={v:p(d,s[u],o,t),u:p,t:d,n:o}}return((e,t)=>({n:e,d:t}))(1===o?i.firstChild:new d(i),h)};const m=/^(?:plaintext|script|style|textarea|title|xmp)$/i,v=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,x=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,b=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,w=/[\x01\x02]/g;const $=(e,t,n)=>{e.setAttribute(t,n)},N=(e,t)=>{e.removeAttribute(t)},y=()=>j;let C;const A=(t,n,r)=>{r=r.slice(1),C||(C=new WeakMap);const l=C.get(t)||s(C,t,{});let o=l[r];return o&&o[0]&&t.removeEventListener(r,...o),o=e(n)?n:[n,!1],l[r]=o,o[0]&&t.addEventListener(r,...o),n};function W(e,t){const n=this.n||(this.n=e);switch(typeof t){case"string":case"number":case"boolean":n!==e&&n.replaceWith(this.n=e),this.n.data=t;break;case"object":case"undefined":null==t?(this.n=e).data="":this.n=t.valueOf(),n.replaceWith(this.n)}return t}const k=()=>W.bind({n:null}),M=(e,t,n)=>e[n]=t,E=(e,t,n)=>M(e,t,n.slice(1)),S=(e,t,n)=>null==t?(N(e,n),t):M(e,t,n),O=(e,t)=>("function"==typeof t?t(e):t.current=e,t),T=(e,t,n)=>(null==t?N(e,n):$(e,n,t),t),B=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),j=(e,n,s,r)=>n.length?((e,t,n,s,r)=>{const l=n.length;let o=t.length,i=l,c=0,a=0,u=null;for(;c<o||a<i;)if(o===c){const t=i<l?a?s(n[a-1],-0).nextSibling:s(n[i-a],0):r;for(;a<i;)e.insertBefore(s(n[a++],1),t)}else if(i===a)for(;c<o;)u&&u.has(t[c])||e.removeChild(s(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[o-1]===n[i-1])o--,i--;else if(t[c]===n[i-1]&&n[a]===t[o-1]){const r=s(t[--o],-1).nextSibling;e.insertBefore(s(n[a++],1),s(t[c++],-1).nextSibling),e.insertBefore(s(n[--i],1),r),t[o]=n[i]}else{if(!u){u=new Map;let e=a;for(;e<i;)u.set(n[e],e++)}if(u.has(t[c])){const r=u.get(t[c]);if(a<r&&r<i){let l=c,h=1;for(;++l<o&&l<i&&u.get(t[l])===r+h;)h++;if(h>r-a){const l=s(t[c],0);for(;a<r;)e.insertBefore(s(n[a++],1),l)}else e.replaceChild(s(n[a++],1),s(t[c++],-1))}else c++}else e.removeChild(s(t[c++],-1))}return n})(e.parentNode,r,n,h,e):(c(r[0],r.at(-1),!1),t),L=new Map([["aria",(e,t)=>{for(const n in t){const s=t[n],r="role"===n?n:`aria-${n}`;null==s?N(e,r):$(e,r,s)}return t}],["class",(e,t)=>S(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",O],["style",(e,t)=>null==t?S(e,t,"style"):M(e.style,t,"cssText")]]),z=(e,t,n)=>{switch(t[0]){case".":return E;case"?":return B;case"@":return A;default:return n||"ownerSVGElement"in e?"ref"===t?O:T:L.get(t)||(t in e?t.startsWith("on")?M:S:T)}},F=(e,t)=>(e.textContent=null==t?"":t,t);let R,Z,D=document.createElement("template");var G=(e,t)=>{if(t)return R||(R=document.createElementNS("http://www.w3.org/2000/svg","svg"),Z=n(),Z.selectNodeContents(R)),Z.createContextualFragment(e);D.innerHTML=e;const{content:s}=D;return D=D.cloneNode(!1),s};const H=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},P=(n,l,o)=>{const i=G(((e,t,n)=>{let s=0;return e.join("").trim().replace(x,((e,t,s,r)=>`<${t}${s.replace(b,"=$2$1").trimEnd()}${r?n||v.test(t)?" /":`></${t}`:""}>`)).replace(w,(e=>""===e?`\x3c!--${t+s++}--\x3e`:t+s++))})(n,_,o),o),{length:c}=n;let a=!1,u=t;if(c>1){const t=document.createTreeWalker(i,129),n=[];let s=0,h=`${_}${s++}`;for(u=[];s<c;){const i=t.nextNode();if(8===i.nodeType){if(i.data===h){let t=e(l[s-1])?y:k;t===k?n.push(i):a=!0,u.push(r(8,H(i),t)),h=`${_}${s++}`}}else{let e;for(;i.hasAttribute(h);){e||(e=H(i));const t=i.getAttribute(h);u.push(r(2,e,z(i,t,o),t)),N(i,h),h=`${_}${s++}`}m.test(i.localName)&&i.textContent.trim()===`\x3c!--${h}--\x3e`&&(u.push(r(3,e||H(i),F)),h=`${_}${s++}`)}}for(s=0;s<n.length;s++)n[s].replaceWith(document.createTextNode(""))}const h=i.childNodes.length;return s(V,n,((e,t,n)=>({c:e,e:t,l:n}))(i,u,1===h&&a?0:h))},V=new WeakMap,_="isµ";var q=e=>(t,n)=>V.get(t)||P(t,n,e);const I=g(q(!1)),J=g(q(!0)),K=(e,{s:n,t:s,v:r})=>{r.length&&e.s===t&&(e.s=[]);const l=Q(e,r);if(e.t!==s){const{n:t,d:l}=(n?J:I)(s,r);e.t=s,e.n=t,e.d=l}else{const{d:t}=e;for(let e=0;e<l;e++){const n=r[e],s=t[e],{v:l}=s;if(n!==l){const{u:e,t:t,n:r}=s;s.v=e(t,n,r,l)}}}return e.n},Q=({s:n},s)=>{const{length:r}=s;for(let o=0;o<r;o++){const r=s[o];r instanceof U?s[o]=K(n[o]||(n[o]=l(t)),r):e(r)?Q(n[o]||(n[o]=l([])),r):n[o]=null}return r<n.length&&n.splice(r),r};class U{constructor(e,t,n){this.s=e,this.t=t,this.v=n}}
/*! (c) Andrea Giammarchi - MIT */const X=e=>(t,...n)=>new U(e,t,n),Y=X(!1),ee=X(!0),te=new WeakMap;var ne=(e,n)=>{const r=te.get(e)||s(te,e,l(t)),o="function"==typeof n?n():n,{n:i}=r,c=o instanceof U?K(r,o):o;return i!==c&&e.replaceChildren(r.n=c),e};const se=new WeakMap,re=e=>(n,r)=>{const o=se.get(n)||s(se,n,new Map);return o.get(r)||s(o,r,function(t,...n){return K(this,new U(e,t,n))}.bind(l(t)))},le=re(!1),oe=re(!0);export{U as Hole,L as attr,Y as html,le as htmlFor,ne as render,ee as svg,oe as svgFor};

@@ -1,3 +0,3 @@

const{setPrototypeOf:e}=Object;const{isArray:t}=Array,n=[],r=()=>document.createRange(),s=(e,t,n)=>(e.set(t,n),n);let l;var o=(e,t,n)=>(l||(l=r()),n?l.setStartAfter(e):l.setStartBefore(e),l.setEndAfter(t),l.deleteContents(),e);const i=({firstChild:e,lastChild:t},n)=>o(e,t,n);let c=!1;const a=(e,t)=>c&&11===e.nodeType?1/t<0?t?i(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e;class u extends((t=>{function n(t){return e(t,new.target.prototype)}return n.prototype=t.prototype,n})(DocumentFragment)){#e;#t;constructor(e){const t=[...e.childNodes];super(e),this.#e=t,this.#t=t.length,c=!0}get firstChild(){return this.#e[0]}get lastChild(){return this.#e.at(-1)}get parentNode(){return this.#e[0].parentNode}remove(){i(this,!1)}replaceWith(e){i(this,!0).replaceWith(e)}valueOf(){return this.childNodes.length!==this.#t&&this.append(...this.#e),this}}const h=(e,t,n,r="")=>({t:e,p:t,u:n,n:r}),d=(e,t)=>t.reduceRight(f,e),f=(e,t)=>e.childNodes[t];const p=/^(?:plaintext|script|style|textarea|title|xmp)$/i,g=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,m=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,x=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,b=/[\x01\x02]/g;let v;const $=(e,n,r)=>{r=r.slice(1),v||(v=new WeakMap);const l=v.get(e)||s(v,e,{});let o=l[r];return o&&o[0]&&e.removeEventListener(r,...o),o=t(n)?n:[n,!1],l[r]=o,o[0]&&e.addEventListener(r,...o),n},N=(e,t,n)=>e[n]=t,C=(e,t,n)=>N(e,t,n.slice(1)),y=(e,t)=>("function"==typeof t?t(e):t.current=e,t),w=(e,t,n)=>(null==t?e.removeAttribute(n):e.setAttribute(n,t),t),A=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),W=(e,t,r,s)=>t.length?((e,t,n,r,s)=>{const l=n.length;let o=t.length,i=l,c=0,a=0,u=null;for(;c<o||a<i;)if(o===c){const t=i<l?a?r(n[a-1],-0).nextSibling:r(n[i-a],0):s;for(;a<i;)e.insertBefore(r(n[a++],1),t)}else if(i===a)for(;c<o;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[o-1]===n[i-1])o--,i--;else if(t[c]===n[i-1]&&n[a]===t[o-1]){const s=r(t[--o],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--i],1),s),t[o]=n[i]}else{if(!u){u=new Map;let e=a;for(;e<i;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<i){let l=c,h=1;for(;++l<o&&l<i&&u.get(t[l])===s+h;)h++;if(h>s-a){const l=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),l)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,s,t,a,e):(s.length&&o(s[0],s.at(-1),!1),n),k=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?e.removeAttribute(s):e.setAttribute(s,r)}return t}],["class",(e,t)=>N(e,t,"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",y],["style",(e,t)=>N(e.style,t,"cssText")]]),E=(e,t,n)=>{switch(t[0]){case".":return C;case"?":return A;case"@":return $;default:return n||"ownerSVGElement"in e?"ref"===t?y:w:k.get(t)||(t in e?N:w)}},S=(e,t)=>(e.textContent=null==t?"":t,t);function O(e,t){const n=this.n||(this.n=e);switch(typeof t){case"string":case"number":case"boolean":n!==e&&n.replaceWith(this.n=e),this.n.data=t;break;case"object":case"undefined":null==t?(this.n=e).data="":this.n=t.valueOf(),n.replaceWith(this.n)}return t}let T,B,M=document.createElement("template");var j=(e,t)=>{if(t)return T||(T=document.createElementNS("http://www.w3.org/2000/svg","svg"),B=r(),B.selectNodeContents(T)),B.createContextualFragment(e);M.innerHTML=e;const{content:n}=M;return M=M.cloneNode(!1),n};const L=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},z=()=>O.bind({n:null}),F=()=>W,R=(e,r,l)=>{const o=j(((e,t,n)=>{let r=0;return e.join("").trim().replace(m,((e,t,r,s)=>`<${t}${r.replace(x,"=$2$1").trimEnd()}${s?n||g.test(t)?" /":`></${t}`:""}>`)).replace(b,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(e,D,l),l),{length:i}=e;let c=!1,a=n;if(i>1){const e=document.createTreeWalker(o,129),n=[];let s=0,u=`${D}${s++}`;for(a=[];s<i;){const o=e.nextNode();if(8===o.nodeType){if(o.data===u){let e=t(r[s-1])?F:z;e===z?n.push(o):c=!0,a.push(h(8,L(o),e)),u=`${D}${s++}`}}else{let e;for(;o.hasAttribute(u);){e||(e=L(o));const t=o.getAttribute(u);a.push(h(2,e,E(o,t,l),t)),o.removeAttribute(u),u=`${D}${s++}`}p.test(o.localName)&&o.textContent.trim()===`\x3c!--${u}--\x3e`&&(a.push(h(3,e||L(o),S)),u=`${D}${s++}`)}}for(s=0;s<n.length;s++)n[s].replaceWith(document.createTextNode(""))}const u=o.childNodes.length;return s(Z,e,((e,t,n)=>({c:e,e:t,l:n}))(o,a,1===u&&c?0:u))},Z=new WeakMap,D="isµ";var G=(e,t)=>(e.replaceChildren("function"==typeof t?t():t),e);
const{setPrototypeOf:e}=Object;const{isArray:t}=Array,n=[],r=()=>document.createRange(),s=(e,t,n)=>(e.set(t,n),n);let l;var o=(e,t,n)=>(l||(l=r()),n?l.setStartAfter(e):l.setStartBefore(e),l.setEndAfter(t),l.deleteContents(),e);const i=({firstChild:e,lastChild:t},n)=>o(e,t,n);let c=!1;const a=(e,t)=>c&&11===e.nodeType?1/t<0?t?i(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e;class u extends((t=>{function n(t){return e(t,new.target.prototype)}return n.prototype=t.prototype,n})(DocumentFragment)){#e;#t;constructor(e){const t=[...e.childNodes];super(e),this.#e=t,this.#t=t.length,c=!0}get firstChild(){return this.#e[0]}get lastChild(){return this.#e.at(-1)}get parentNode(){return this.#e[0].parentNode}remove(){i(this,!1)}replaceWith(e){i(this,!0).replaceWith(e)}valueOf(){return this.childNodes.length!==this.#t&&this.append(...this.#e),this}}const h=(e,t,n,r="")=>({t:e,p:t,u:n,n:r}),d=(e,t)=>t.reduceRight(f,e),f=(e,t)=>e.childNodes[t];const p=/^(?:plaintext|script|style|textarea|title|xmp)$/i,g=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,m=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,x=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,$=/[\x01\x02]/g;const b=(e,t,n)=>{e.setAttribute(t,n)},v=(e,t)=>{e.removeAttribute(t)},N=()=>B;let y;const C=(e,n,r)=>{r=r.slice(1),y||(y=new WeakMap);const l=y.get(e)||s(y,e,{});let o=l[r];return o&&o[0]&&e.removeEventListener(r,...o),o=t(n)?n:[n,!1],l[r]=o,o[0]&&e.addEventListener(r,...o),n};function w(e,t){const n=this.n||(this.n=e);switch(typeof t){case"string":case"number":case"boolean":n!==e&&n.replaceWith(this.n=e),this.n.data=t;break;case"object":case"undefined":null==t?(this.n=e).data="":this.n=t.valueOf(),n.replaceWith(this.n)}return t}const A=()=>w.bind({n:null}),W=(e,t,n)=>e[n]=t,k=(e,t,n)=>W(e,t,n.slice(1)),E=(e,t,n)=>null==t?(v(e,n),t):W(e,t,n),S=(e,t)=>("function"==typeof t?t(e):t.current=e,t),O=(e,t,n)=>(null==t?v(e,n):b(e,n,t),t),T=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),B=(e,t,r,s)=>t.length?((e,t,n,r,s)=>{const l=n.length;let o=t.length,i=l,c=0,a=0,u=null;for(;c<o||a<i;)if(o===c){const t=i<l?a?r(n[a-1],-0).nextSibling:r(n[i-a],0):s;for(;a<i;)e.insertBefore(r(n[a++],1),t)}else if(i===a)for(;c<o;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[o-1]===n[i-1])o--,i--;else if(t[c]===n[i-1]&&n[a]===t[o-1]){const s=r(t[--o],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--i],1),s),t[o]=n[i]}else{if(!u){u=new Map;let e=a;for(;e<i;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<i){let l=c,h=1;for(;++l<o&&l<i&&u.get(t[l])===s+h;)h++;if(h>s-a){const l=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),l)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,s,t,a,e):(o(s[0],s.at(-1),!1),n),M=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?v(e,s):b(e,s,r)}return t}],["class",(e,t)=>E(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",S],["style",(e,t)=>null==t?E(e,t,"style"):W(e.style,t,"cssText")]]),j=(e,t,n)=>{switch(t[0]){case".":return k;case"?":return T;case"@":return C;default:return n||"ownerSVGElement"in e?"ref"===t?S:O:M.get(t)||(t in e?t.startsWith("on")?W:E:O)}},L=(e,t)=>(e.textContent=null==t?"":t,t);let z,F,R=document.createElement("template");var Z=(e,t)=>{if(t)return z||(z=document.createElementNS("http://www.w3.org/2000/svg","svg"),F=r(),F.selectNodeContents(z)),F.createContextualFragment(e);R.innerHTML=e;const{content:n}=R;return R=R.cloneNode(!1),n};const D=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},G=(e,r,l)=>{const o=Z(((e,t,n)=>{let r=0;return e.join("").trim().replace(m,((e,t,r,s)=>`<${t}${r.replace(x,"=$2$1").trimEnd()}${s?n||g.test(t)?" /":`></${t}`:""}>`)).replace($,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(e,P,l),l),{length:i}=e;let c=!1,a=n;if(i>1){const e=document.createTreeWalker(o,129),n=[];let s=0,u=`${P}${s++}`;for(a=[];s<i;){const o=e.nextNode();if(8===o.nodeType){if(o.data===u){let e=t(r[s-1])?N:A;e===A?n.push(o):c=!0,a.push(h(8,D(o),e)),u=`${P}${s++}`}}else{let e;for(;o.hasAttribute(u);){e||(e=D(o));const t=o.getAttribute(u);a.push(h(2,e,j(o,t,l),t)),v(o,u),u=`${P}${s++}`}p.test(o.localName)&&o.textContent.trim()===`\x3c!--${u}--\x3e`&&(a.push(h(3,e||D(o),L)),u=`${P}${s++}`)}}for(s=0;s<n.length;s++)n[s].replaceWith(document.createTextNode(""))}const u=o.childNodes.length;return s(H,e,((e,t,n)=>({c:e,e:t,l:n}))(o,a,1===u&&c?0:u))},H=new WeakMap,P="isµ";var V=(e,t)=>(e.replaceChildren("function"==typeof t?t():t),e);
/*! (c) Andrea Giammarchi - MIT */
const H=e=>{const t=(e=>(t,r)=>{const{c:s,e:l,l:o}=e(t,r),i=s.cloneNode(!0);let c,a,h=l.length,f=h?l.slice(0):n;for(;h--;){const{t:e,p:t,u:s,n:o}=l[h],u=t===a?c:c=d(i,a=t),p=8===e?s():s;f[h]={v:p(u,r[h],o,n),u:p,t:u,n:o}}return{n:1===o?i.firstChild:new u(i),d:f}})((r=e,(e,t)=>Z.get(e)||R(e,t,r)));var r;return(e,...n)=>t(e,n).n},P=H(!1),V=H(!0);export{k as attr,P as html,G as render,V as svg};
const _=e=>{const t=(e=>(t,r)=>{const{c:s,e:l,l:o}=e(t,r),i=s.cloneNode(!0);let c,a,h=l.length,f=h?l.slice(0):n;for(;h--;){const{t:e,p:t,u:s,n:o}=l[h],u=t===a?c:c=d(i,a=t),p=8===e?s():s;f[h]={v:p(u,r[h],o,n),u:p,t:u,n:o}}return{n:1===o?i.firstChild:new u(i),d:f}})((r=e,(e,t)=>H.get(e)||G(e,t,r)));var r;return(e,...n)=>t(e,n).n},q=_(!1),I=_(!0);export{M as attr,q as html,V as render,I as svg};
{
"name": "uhtml",
"version": "4.1.19",
"version": "4.1.20",
"description": "A micro HTML/SVG render",

@@ -29,4 +29,4 @@ "main": "./cjs/index.js",

"c8": "^8.0.1",
"linkedom": "^0.16.1",
"rollup": "^4.4.0",
"linkedom": "^0.16.4",
"rollup": "^4.4.1",
"typescript": "^5.2.2"

@@ -33,0 +33,0 @@ },

@@ -21,6 +21,6 @@ # <em>µ</em>html

* `uhtml` as default `{ Hole, render, html, svg, attr }` with smart auto-keyed nodes - read [keyed or not keyed](https://webreflection.github.io/uhtml/#tag) to know more
* `uhtml/keyed` with extras `{ Hole, render, html, svg, htmlFor, svgFor, attr }`, providing keyed utilities - read [keyed or not keyed](https://webreflection.github.io/uhtml/#tag) to know more
* `uhtml` as default `{ Hole, render, html, svg, attr }` with smart auto-keyed nodes - read [keyed or not ?](https://webreflection.github.io/uhtml/#keyed-or-not-) paragraph to know more
* `uhtml/keyed` with extras `{ Hole, render, html, svg, htmlFor, svgFor, attr }`, providing keyed utilities - read [keyed or not ?](https://webreflection.github.io/uhtml/#keyed-or-not-) paragraph to know more
* `uhtml/node` with *same default* exports but it's for *one-off* nodes creation only so that no cache or updates are available and it's just an easy way to hook *uhtml* into your existing project for DOM creation (not manipulation!)
* `uhtml/init` which returns a default `document => uhtml/keyed` utility that can be bootstrapped with [LinkeDOM](https://github.com/WebReflection/linkedom), [JSDOM](https://github.com/jsdom/jsdom), or *Workers* support
* `uhtml/init` which returns a `document => uhtml/keyed` utility that can be bootstrapped with [LinkeDOM](https://github.com/WebReflection/linkedom), [JSDOM](https://github.com/jsdom/jsdom), or *Workers* support

@@ -27,0 +27,0 @@ **uhtml/init example**

@@ -1,20 +0,14 @@

/**
* @template T
* @this {import("./literals.js").HoleDetails}
* @param {Node} node
* @param {T} value
* @returns {T}
*/
export function hole<T>(this: import("./literals.js").HoleDetails, node: Node, value: T): T;
export class hole<T> {
/**
* @template T
* @this {import("./literals.js").HoleDetails}
* @param {Node} node
* @param {T} value
* @returns {T}
*/
constructor(this: import("./literals.js").HoleDetails, node: Node, value: T);
n: Object;
}
export function removeAttribute(element: any, name: any): void;
export function aria<T>(element: Element, value: T): T;
export function arrayComment(): (node: Node, value: Node[], _: string, prev: Node[]) => Node[];
export function at<T>(element: Element, value: T, name: string): T;
export function boundComment(): any;
export function className<T>(element: Element, value: T): T;
export function data<T>(element: Element, value: T): T;
export function direct<T>(ref: Element | CSSStyleDeclaration, value: T, name: string): T;
export function dot<T>(element: Element, value: T, name: string): T;
export function maybeDirect<T>(element: Element, value: T, name: string): T;
export function ref<T>(element: Element, value: T): T;
export function style<T>(element: Element, value: T): T;
export function toggle<T>(element: Element, value: T, name: string): T;
export function array(node: Node, value: Node[], _: string, prev: Node[]): Node[];

@@ -21,0 +15,0 @@ export const attr: Map<string, <T>(element: Element, value: T) => T>;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc