const HTMLLinkElement=function(tag){const proxy={},link=document.querySelector("link#"+tag+"[rel\x3dimport], link[href*\x3d"+tag+"][rel\x3dimport]"),register=(event,handler)=>HTMLImports&&!!!HTMLImports.useNative?HTMLImports.whenReady((_)=>handler({target:link})):link.addEventListener(event,handler);Object.defineProperties(proxy,{"addEventListener":{writable:false,value:function(event,handler){!!!link?handler({target:proxy}):register(event,handler)}},"onerror":{set(handler){}}});return proxy};
class TokenList{constructor(node){const textify=(node)=>(node.text=node.textContent)&&node,tokenize=(token)=>token.textContent.match(/{(\w+|#)}/g).map(symbolize).map(insert(token)),symbolize=(symbol)=>symbol.match(/(\w+|#)/g)[0],insert=(token)=>(symbol)=>(this[symbol]=this[symbol]||[])&&this[symbol].push(token);this.sift(node).map(textify).map(tokenize)}sift(node){const nodes=[],visit=(node)=>node.nodeType===Node.TEXT_NODE?TEXT_NODE(node)&&NodeFilter.FILTER_ACCEPT:ELEMENT_NODE(node.attributes)&&NodeFilter.FILTER_REJECT,
TEXT_NODE=(node)=>node.nodeType===Node.TEXT_NODE&&/{(\w+|#)}/.test(node.textContent),ELEMENT_NODE=(attributes)=>Array.from(attributes||[]).filter((attr)=>/{(\w+|#)}/g.test(attr.value)).map((attribute)=>nodes.push(attribute)),walker=document.createNodeIterator(node,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,visit);while(node=walker.nextNode())nodes.push(node);return nodes}bind(context,node){const prepare=(symbol)=>this[symbol].map((token)=>token.textContent=token.text)&&symbol,replace=(symbol)=>
this[symbol].map(replacement(symbol)),replacement=(symbol)=>(item)=>item.textContent=item.textContent.replace("{"+symbol+"}",context[symbol]);Object.keys(this).filter((key)=>context[key]).map(prepare).map(replace);return this}}
const HTMLTemplateElement=Template=function(name){return Object.assign(document.querySelector("template[name\x3d"+name+"]"),{bind});function bind(context){contexts=[].concat(...[context]);let clone,template=document.createElement("template");void(this.dependents||[]).map((dependent)=>dependent.remove());this.dependents=[];template.innerHTML=contexts.map((context,index)=>{context=typeof context==="object"?context:{self:context};context["#"]=index;clone=this.cloneNode(true);void(new TokenList(clone.content)).bind(context);
return clone.innerHTML}).join("");this.dependents.push(...template.content.childNodes);this.after(template.content);return this}};const EventTarget=(Element)=>class extends Element{connectedCallback(){(new HTMLLinkElement(this.tagName.toLowerCase())).addEventListener("load",this.onimport.bind(this))}listen(event,listener=this[event]){this.addEventListener(event,listener)}};
const ParentNode=(Element)=>class extends Element{selectAll(selector){return this.querySelectorAll(selector)}select(selector){return this.selectAll(selector)[0]}get tokens(){return this._tokens=this._tokens||new TokenList(this)}};
const GlobalEventHandlers=(Element)=>class extends Element{onimport(event){const document=event.target.import,template=document&&document.querySelector("template");template&&this.clone(template);this.constructor.onconnect&&this.constructor.onconnect.call(this);this.render()}register(events=(event)=>/^on/.exec(event)){const mirror=(handler)=>this[handler]===null&&(this[handler]=Element[handler].bind(this));Object.getOwnPropertyNames(Element).filter(events).map(mirror);const nodes=":not(script):not(template):not(style):not(link)",
children=Array.from(this.querySelectorAll(nodes)),registered=(node)=>Array.from(node.attributes).map((attr)=>attr.name).filter(events).length>0,reflect=(node)=>Array.from(node.attributes).map((attr)=>attr.name).filter(events).map(reflection(node)),reflection=(node)=>(event)=>node[event]=handle(node[event]),handle=(handler,[_,event]=/{\s*(\w+)\s*}/.exec(handler)||[])=>event&&Element[event]&&Element[event].bind(this)||handler||null;void[this].concat(children).filter(registered).map(reflect)}};
const Component=(Element)=>class extends EventTarget(ParentNode(GlobalEventHandlers(Element))){constructor(){super();this.context={};this.initialize&&this.initialize()}render(){this.tokens.bind(this);Array.from(this.selectAll("template[name]")).map((template)=>template.getAttribute("name")).map((name)=>(new Template(name)).bind(this[name]));this.register();Element.onidle&&Element.onidle.call(this)}clone(template){const fragment=template.content.cloneNode(true),slots=Array.from(fragment.querySelectorAll("slot")),
replacements=Array.from(this.querySelectorAll("[slot]")),register=(attribute)=>this.setAttribute(attribute.name,attribute.value),replace=(replacement)=>slots.filter(match(replacement)).map(exchange(replacement)),match=(replacement)=>(slot)=>replacement.getAttribute("slot")===slot.getAttribute("name"),exchange=(replacement)=>(slot)=>slot.parentNode.replaceChild(replacement,slot);Array.from(template.attributes).map(register);replacements.map(replace);this.innerHTML="";this.append(fragment)}};
const ElementPrototype=window.Element.prototype;const Element=function(tag,CustomElementRegistry=window.customElements){return function(Element){CustomElementRegistry.define(...tag,Component(Element))}};Element.prototype=ElementPrototype;

@@ -3082,52 +3082,34 @@
 te);
-this.constructor.onconnect&&this.constructor
+Element.onconnect&&Element
 .onc

bump distribution for ./snuggsi.min.js