text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("preact")):"function"==typeof define&&define.amd?define(["preact"],e):(t=t||self).preactCustomElement=e(t.preact)}(this,function(t){function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function n(e){this.getChildContext=function(){return e.context};var n=e.children,o=function(t,e){if(null==t)return{};var n,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)e.indexOf(n=i[o])>=0||(r[n]=t[n]);return r}(e,["context","children"]);return t.cloneElement(n,o)}function o(){var o=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(o),this._vdom=t.h(n,e({},this._props,{context:o.detail.context}),function e(n,o){if(3===n.nodeType)return n.data;if(1!==n.nodeType)return null;var i=[],a={},c=0,l=n.attributes,u=n.childNodes;for(c=l.length;c--;)"slot"!==l[c].name&&(a[l[c].name]=l[c].value,a[r(l[c].name)]=l[c].value);for(c=u.length;c--;){var p=e(u[c],null),d=u[c].slot;d?a[d]=t.h(s,{name:d},p):i[c]=p}var h=o?t.h(s,null,i):i;return t.h(o||n.nodeName.toLowerCase(),a,h)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?t.hydrate:t.render)(this._vdom,this._root)}function r(t){return t.replace(/-(\w)/g,function(t,e){return e?e.toUpperCase():""})}function i(e,n,o){if(this._vdom){var i={};i[e]=o=null==o?void 0:o,i[r(e)]=o,this._vdom=t.cloneElement(this._vdom,i),t.render(this._vdom,this._root)}}function a(){t.render(this._vdom=null,this._root)}function s(n,o){var r=this;return t.h("slot",e({},n,{ref:function(t){t?(r.ref=t,r._listener||(r._listener=function(t){t.stopPropagation(),t.detail.context=o},t.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}return function(t,e,n,r){function s(){var e=Reflect.construct(HTMLElement,[],s);return e._vdomComponent=t,e._root=r&&r.shadow?e.attachShadow({mode:"open"}):e,e}return(s.prototype=Object.create(HTMLElement.prototype)).constructor=s,s.prototype.connectedCallback=o,s.prototype.attributeChangedCallback=i,s.prototype.disconnectedCallback=a,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),s.observedAttributes=n,n.forEach(function(t){Object.defineProperty(s.prototype,t,{get:function(){return this._vdom.props[t]},set:function(e){this._vdom?this.attributeChangedCallback(t,null,e):(this._props||(this._props={}),this._props[t]=e,this.connectedCallback());var n=typeof e;null!=e&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(t,e)}})}),customElements.define(e||t.tagName||t.displayName||t.name,s)}});
  //# sourceMappingURL=preact-custom-element.umd.js.map
  