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

@neuronet.io/vido

Package Overview
Dependencies
Maintainers
1
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neuronet.io/vido - npm Package Compare versions

Comparing version 1.0.22 to 1.0.23

2

package.json
{
"name": "@neuronet.io/vido",
"version": "1.0.22",
"version": "1.0.23",
"description": "Compilation-less and eval free frontend framework for fast scalable apps.",

@@ -5,0 +5,0 @@ "main": "vido.js",

@@ -41,3 +41,3 @@ /**

* http://polymer.github.io/PATENTS.txt
*/const _=` ${l} `;class y{constructor(e,t,n,o){this.strings=e,this.values=t,this.type=n,this.processor=o}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let o=0;o<e;o++){const e=this.strings[o],s=e.lastIndexOf("\x3c!--");n=(s>-1||n)&&-1===e.indexOf("--\x3e",s+1);const i=g.exec(e);t+=null===i?e+(n?_:c):e.substr(0,i.index)+i[1]+i[2]+u+i[3]+l}return t+=this.strings[e]}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}class x extends y{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,n=t.firstChild;return t.removeChild(n),s(t,n.firstChild),e}}
*/const y=` ${l} `;class _{constructor(e,t,n,o){this.strings=e,this.values=t,this.type=n,this.processor=o}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let o=0;o<e;o++){const e=this.strings[o],s=e.lastIndexOf("\x3c!--");n=(s>-1||n)&&-1===e.indexOf("--\x3e",s+1);const i=g.exec(e);t+=null===i?e+(n?y:c):e.substr(0,i.index)+i[1]+i[2]+u+i[3]+l}return t+=this.strings[e]}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}class N extends _{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,n=t.firstChild;return t.removeChild(n),s(t,n.firstChild),e}}
/**

@@ -55,3 +55,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/const b=e=>null===e||!("object"==typeof e||"function"==typeof e),w=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class N{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new A(this)}_getValue(){const e=this.strings,t=e.length-1;let n="";for(let o=0;o<t;o++){n+=e[o];const t=this.parts[o];if(void 0!==t){const e=t.value;if(b(e)||!w(e))n+="string"==typeof e?e:String(e);else for(const t of e)n+="string"==typeof t?t:String(t)}}return n+=e[t]}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class A{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===r||b(e)&&e===this.value||(this.value=e,n(e)||(this.committer.dirty=!0))}commit(){for(;n(this.value);){const e=this.value;this.value=r,e(this)}this.value!==r&&this.committer.commit()}}class V{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(f()),this.endNode=e.appendChild(f())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=f()),e.__insert(this.endNode=f())}insertAfterPart(e){e.__insert(this.startNode=f()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}const e=this.__pendingValue;e!==r&&(b(e)?e!==this.value&&this.__commitText(e):e instanceof y?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):w(e)?this.__commitIterable(e):e===a?(this.value=a,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof v&&this.value.template===t)this.value.update(e.values);else{const n=new v(t,e.processor,this.options),o=n._clone();n.update(e.values),this.__commitNode(o),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,o=0;for(const s of e)void 0===(n=t[o])&&(n=new V(this.options),t.push(n),0===o?n.appendIntoPart(this):n.insertAfterPart(t[o-1])),n.setValue(s),n.commit(),o++;o<t.length&&(t.length=o,this.clear(n&&n.endNode))}clear(e=this.startNode){i(this.startNode.parentNode,e.nextSibling,this.endNode)}}class E{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}if(this.__pendingValue===r)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=r}}class T extends N{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new M(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class M extends A{}let S=!1;try{const e={get capture(){return S=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}class C{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}if(this.__pendingValue===r)return;const e=this.__pendingValue,t=this.value,o=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),s=null!=e&&(null==t||o);o&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=I(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=r}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const I=e=>e&&(S?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);
*/const x=e=>null===e||!("object"==typeof e||"function"==typeof e),b=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class w{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new S(this)}_getValue(){const e=this.strings,t=e.length-1;let n="";for(let o=0;o<t;o++){n+=e[o];const t=this.parts[o];if(void 0!==t){const e=t.value;if(x(e)||!b(e))n+="string"==typeof e?e:String(e);else for(const t of e)n+="string"==typeof t?t:String(t)}}return n+=e[t]}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class S{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===r||x(e)&&e===this.value||(this.value=e,n(e)||(this.committer.dirty=!0))}commit(){for(;n(this.value);){const e=this.value;this.value=r,e(this)}this.value!==r&&this.committer.commit()}}class E{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(f()),this.endNode=e.appendChild(f())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=f()),e.__insert(this.endNode=f())}insertAfterPart(e){e.__insert(this.startNode=f()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}const e=this.__pendingValue;e!==r&&(x(e)?e!==this.value&&this.__commitText(e):e instanceof _?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):b(e)?this.__commitIterable(e):e===a?(this.value=a,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof v&&this.value.template===t)this.value.update(e.values);else{const n=new v(t,e.processor,this.options),o=n._clone();n.update(e.values),this.__commitNode(o),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,o=0;for(const s of e)void 0===(n=t[o])&&(n=new E(this.options),t.push(n),0===o?n.appendIntoPart(this):n.insertAfterPart(t[o-1])),n.setValue(s),n.commit(),o++;o<t.length&&(t.length=o,this.clear(n&&n.endNode))}clear(e=this.startNode){i(this.startNode.parentNode,e.nextSibling,this.endNode)}}class A{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}if(this.__pendingValue===r)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=r}}class V extends w{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new T(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class T extends S{}let C=!1;try{const e={get capture(){return C=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}class O{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}if(this.__pendingValue===r)return;const e=this.__pendingValue,t=this.value,o=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),s=null!=e&&(null==t||o);o&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=M(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=r}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const M=e=>e&&(C?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);
/**

@@ -69,3 +69,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/const P=new class{handleAttributeExpressions(e,t,n,o){const s=t[0];if("."===s){return new T(e,t.slice(1),n).parts}return"@"===s?[new C(e,t.slice(1),o.eventContext)]:"?"===s?[new E(e,t.slice(1),n)]:new N(e,t,n).parts}handleTextExpression(e){return new V(e)}};
*/const I=new class{handleAttributeExpressions(e,t,n,o){const s=t[0];if("."===s){return new V(e,t.slice(1),n).parts}return"@"===s?[new O(e,t.slice(1),o.eventContext)]:"?"===s?[new A(e,t.slice(1),n)]:new w(e,t,n).parts}handleTextExpression(e){return new E(e)}};
/**

@@ -83,3 +83,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/function k(e){let t=L.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},L.set(e.type,t));let n=t.stringsArray.get(e.strings);if(void 0!==n)return n;const o=e.strings.join(l);return void 0===(n=t.keyString.get(o))&&(n=new p(e,e.getTemplateElement()),t.keyString.set(o,n)),t.stringsArray.set(e.strings,n),n}const L=new Map,$=new WeakMap,W=(e,t,n)=>{let o=$.get(t);void 0===o&&(i(t,t.firstChild),$.set(t,o=new V(Object.assign({templateFactory:k},n))),o.appendInto(t)),o.setValue(e),o.commit()};
*/function J(e){let t=P.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},P.set(e.type,t));let n=t.stringsArray.get(e.strings);if(void 0!==n)return n;const o=e.strings.join(l);return void 0===(n=t.keyString.get(o))&&(n=new p(e,e.getTemplateElement()),t.keyString.set(o,n)),t.stringsArray.set(e.strings,n),n}const P=new Map,k=new WeakMap,$=(e,t,n)=>{let o=k.get(t);void 0===o&&(i(t,t.firstChild),k.set(t,o=new E(Object.assign({templateFactory:J},n))),o.appendInto(t)),o.setValue(e),o.commit()};
/**

@@ -111,3 +111,3 @@ * @license

*/
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const H=(e,...t)=>new y(e,t,"html",P),R=(e,...t)=>new x(e,t,"svg",P);
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const L=(e,...t)=>new _(e,t,"html",I),W=(e,...t)=>new N(e,t,"svg",I);
/**

@@ -126,3 +126,3 @@ * @license

*/
var F=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,s){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,s,(t=e[n](t)).done,t.value)}))}}};const O=t((e,t)=>async n=>{var o,s;if(!(n instanceof V))throw new Error("asyncAppend can only be used in text bindings");if(e===n.value)return;let i;n.value=e;let r=0;try{for(var a,l=F(e);!(a=await l.next()).done;){let o=a.value;if(n.value!==e)break;0===r&&n.clear(),void 0!==t&&(o=t(o,r));let s=n.startNode;void 0!==i&&(s=f(),i.endNode=s,n.endNode.parentNode.insertBefore(s,n.endNode)),(i=new V(n.options)).insertAfterNode(s),i.setValue(o),i.commit(),r++}}catch(e){o={error:e}}finally{try{a&&!a.done&&(s=l.return)&&await s.call(l)}finally{if(o)throw o.error}}});
var H=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,s){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,s,(t=e[n](t)).done,t.value)}))}}};const F=t((e,t)=>async n=>{var o,s;if(!(n instanceof E))throw new Error("asyncAppend can only be used in text bindings");if(e===n.value)return;let i;n.value=e;let r=0;try{for(var a,l=H(e);!(a=await l.next()).done;){let o=a.value;if(n.value!==e)break;0===r&&n.clear(),void 0!==t&&(o=t(o,r));let s=n.startNode;void 0!==i&&(s=f(),i.endNode=s,n.endNode.parentNode.insertBefore(s,n.endNode)),(i=new E(n.options)).insertAfterNode(s),i.setValue(o),i.commit(),r++}}catch(e){o={error:e}}finally{try{a&&!a.done&&(s=l.return)&&await s.call(l)}finally{if(o)throw o.error}}});
/**

@@ -140,3 +140,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/var B=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,s){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,s,(t=e[n](t)).done,t.value)}))}}};const j=t((e,t)=>async n=>{var o,s;if(!(n instanceof V))throw new Error("asyncReplace can only be used in text bindings");if(e===n.value)return;const i=new V(n.options);n.value=e;let r=0;try{for(var a,l=B(e);!(a=await l.next()).done;){let o=a.value;if(n.value!==e)break;0===r&&(n.clear(),i.appendIntoPart(n)),void 0!==t&&(o=t(o,r)),i.setValue(o),i.commit(),r++}}catch(e){o={error:e}}finally{try{a&&!a.done&&(s=l.return)&&await s.call(l)}finally{if(o)throw o.error}}}),D=new WeakMap,q=t(e=>t=>{if(!(t instanceof V))throw new Error("cache can only be used in text bindings");let n=D.get(t);void 0===n&&(n=new WeakMap,D.set(t,n));const o=t.value;if(o instanceof v){if(e instanceof y&&o.template===t.options.templateFactory(e))return void t.setValue(e);{let e=n.get(o.template);void 0===e&&(e={instance:o,nodes:document.createDocumentFragment()},n.set(o.template,e)),s(e.nodes,t.startNode.nextSibling,t.endNode)}}if(e instanceof y){const o=t.options.templateFactory(e),s=n.get(o);void 0!==s&&(t.setValue(s.nodes),t.commit(),t.value=s.instance)}t.setValue(e)}),z=new WeakMap,G=t(e=>t=>{if(!(t instanceof A)||t instanceof M||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:n}=t,{element:o}=n;z.has(t)||(o.className=n.strings.join(" "));const{classList:s}=o,i=z.get(t);for(const t in i)t in e||s.remove(t);for(const t in e){const n=e[t];if(!i||n!==i[t]){s[n?"add":"remove"](t)}}z.set(t,e)}),J=new WeakMap,K=t((e,t)=>n=>{const o=J.get(n);if(Array.isArray(e)){if(Array.isArray(o)&&o.length===e.length&&e.every((e,t)=>e===o[t]))return}else if(o===e&&(void 0!==e||J.has(n)))return;n.setValue(t()),J.set(n,Array.isArray(e)?Array.from(e):e)}),Q=t(e=>t=>{if(void 0===e&&t instanceof A){if(e!==t.value){const e=t.committer.name;t.committer.element.removeAttribute(e)}}else t.setValue(e)}),U=(e,t)=>{const n=e.startNode.parentNode,o=void 0===t?e.endNode:t.startNode,s=n.insertBefore(f(),o);n.insertBefore(f(),o);const i=new V(e.options);return i.insertAfterNode(s),i},X=(e,t)=>(e.setValue(t),e.commit(),e),Y=(e,t,n)=>{const o=e.startNode.parentNode,i=n?n.startNode:e.endNode,r=t.endNode.nextSibling;r!==i&&s(o,t.startNode,r,i)},Z=e=>{i(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},ee=(e,t,n)=>{const o=new Map;for(let s=t;s<=n;s++)o.set(e[s],s);return o},te=new WeakMap,ne=new WeakMap,oe=t((e,t,n)=>{let o;return void 0===n?n=t:void 0!==t&&(o=t),t=>{if(!(t instanceof V))throw new Error("repeat can only be used in text bindings");const s=te.get(t)||[],i=ne.get(t)||[],r=[],a=[],l=[];let c,d,u=0;for(const t of e)l[u]=o?o(t,u):u,a[u]=n(t,u),u++;let p=0,h=s.length-1,m=0,f=a.length-1;for(;p<=h&&m<=f;)if(null===s[p])p++;else if(null===s[h])h--;else if(i[p]===l[m])r[m]=X(s[p],a[m]),p++,m++;else if(i[h]===l[f])r[f]=X(s[h],a[f]),h--,f--;else if(i[p]===l[f])r[f]=X(s[p],a[f]),Y(t,s[p],r[f+1]),p++,f--;else if(i[h]===l[m])r[m]=X(s[h],a[m]),Y(t,s[h],s[p]),h--,m++;else if(void 0===c&&(c=ee(l,m,f),d=ee(i,p,h)),c.has(i[p]))if(c.has(i[h])){const e=d.get(l[m]),n=void 0!==e?s[e]:null;if(null===n){const e=U(t,s[p]);X(e,a[m]),r[m]=e}else r[m]=X(n,a[m]),Y(t,n,s[p]),s[e]=null;m++}else Z(s[h]),h--;else Z(s[p]),p++;for(;m<=f;){const e=U(t,r[f+1]);X(e,a[m]),r[m++]=e}for(;p<=h;){const e=s[p++];null!==e&&Z(e)}te.set(t,r),ne.set(t,l)}}),se=new WeakMap,ie=t(e=>t=>{if(!(t instanceof A)||t instanceof M||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");const{committer:n}=t,{style:o}=n.element;se.has(t)||(o.cssText=n.strings.join(" "));const s=se.get(t);for(const t in s)t in e||(-1===t.indexOf("-")?o[t]=null:o.removeProperty(t));for(const t in e)-1===t.indexOf("-")?o[t]=e[t]:o.setProperty(t,e[t]);se.set(t,e)}),re=new WeakMap,ae=t(e=>t=>{if(!(t instanceof V))throw new Error("unsafeHTML can only be used in text bindings");const n=re.get(t);if(void 0!==n&&b(e)&&e===n.value&&t.value===n.fragment)return;const o=document.createElement("template");o.innerHTML=e;const s=document.importNode(o.content,!0);t.setValue(s),re.set(t,{value:e,fragment:s})}),le=new WeakMap,ce=t((...e)=>t=>{let n=le.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},le.set(t,n));const o=n.values;let s=o.length;n.values=e;for(let i=0;i<e.length&&!(i>n.lastRenderedIndex);i++){const r=e[i];if(b(r)||"function"!=typeof r.then){t.setValue(r),n.lastRenderedIndex=i;break}i<s&&r===o[i]||(n.lastRenderedIndex=2147483647,s=0,Promise.resolve(r).then(e=>{const o=n.values.indexOf(r);o>-1&&o<n.lastRenderedIndex&&(n.lastRenderedIndex=o,t.setValue(e),t.commit())}))}});
*/var R=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,s){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,s,(t=e[n](t)).done,t.value)}))}}};const B=t((e,t)=>async n=>{var o,s;if(!(n instanceof E))throw new Error("asyncReplace can only be used in text bindings");if(e===n.value)return;const i=new E(n.options);n.value=e;let r=0;try{for(var a,l=R(e);!(a=await l.next()).done;){let o=a.value;if(n.value!==e)break;0===r&&(n.clear(),i.appendIntoPart(n)),void 0!==t&&(o=t(o,r)),i.setValue(o),i.commit(),r++}}catch(e){o={error:e}}finally{try{a&&!a.done&&(s=l.return)&&await s.call(l)}finally{if(o)throw o.error}}}),j=new WeakMap,D=t(e=>t=>{if(!(t instanceof E))throw new Error("cache can only be used in text bindings");let n=j.get(t);void 0===n&&(n=new WeakMap,j.set(t,n));const o=t.value;if(o instanceof v){if(e instanceof _&&o.template===t.options.templateFactory(e))return void t.setValue(e);{let e=n.get(o.template);void 0===e&&(e={instance:o,nodes:document.createDocumentFragment()},n.set(o.template,e)),s(e.nodes,t.startNode.nextSibling,t.endNode)}}if(e instanceof _){const o=t.options.templateFactory(e),s=n.get(o);void 0!==s&&(t.setValue(s.nodes),t.commit(),t.value=s.instance)}t.setValue(e)}),q=new WeakMap,z=t(e=>t=>{if(!(t instanceof S)||t instanceof T||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:n}=t,{element:o}=n;q.has(t)||(o.className=n.strings.join(" "));const{classList:s}=o,i=q.get(t);for(const t in i)t in e||s.remove(t);for(const t in e){const n=e[t];if(!i||n!==i[t]){s[n?"add":"remove"](t)}}q.set(t,e)}),G=new WeakMap,K=t((e,t)=>n=>{const o=G.get(n);if(Array.isArray(e)){if(Array.isArray(o)&&o.length===e.length&&e.every((e,t)=>e===o[t]))return}else if(o===e&&(void 0!==e||G.has(n)))return;n.setValue(t()),G.set(n,Array.isArray(e)?Array.from(e):e)}),Q=t(e=>t=>{if(void 0===e&&t instanceof S){if(e!==t.value){const e=t.committer.name;t.committer.element.removeAttribute(e)}}else t.setValue(e)}),U=(e,t)=>{const n=e.startNode.parentNode,o=void 0===t?e.endNode:t.startNode,s=n.insertBefore(f(),o);n.insertBefore(f(),o);const i=new E(e.options);return i.insertAfterNode(s),i},X=(e,t)=>(e.setValue(t),e.commit(),e),Y=(e,t,n)=>{const o=e.startNode.parentNode,i=n?n.startNode:e.endNode,r=t.endNode.nextSibling;r!==i&&s(o,t.startNode,r,i)},Z=e=>{i(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},ee=(e,t,n)=>{const o=new Map;for(let s=t;s<=n;s++)o.set(e[s],s);return o},te=new WeakMap,ne=new WeakMap,oe=t((e,t,n)=>{let o;return void 0===n?n=t:void 0!==t&&(o=t),t=>{if(!(t instanceof E))throw new Error("repeat can only be used in text bindings");const s=te.get(t)||[],i=ne.get(t)||[],r=[],a=[],l=[];let c,d,u=0;for(const t of e)l[u]=o?o(t,u):u,a[u]=n(t,u),u++;let p=0,h=s.length-1,m=0,f=a.length-1;for(;p<=h&&m<=f;)if(null===s[p])p++;else if(null===s[h])h--;else if(i[p]===l[m])r[m]=X(s[p],a[m]),p++,m++;else if(i[h]===l[f])r[f]=X(s[h],a[f]),h--,f--;else if(i[p]===l[f])r[f]=X(s[p],a[f]),Y(t,s[p],r[f+1]),p++,f--;else if(i[h]===l[m])r[m]=X(s[h],a[m]),Y(t,s[h],s[p]),h--,m++;else if(void 0===c&&(c=ee(l,m,f),d=ee(i,p,h)),c.has(i[p]))if(c.has(i[h])){const e=d.get(l[m]),n=void 0!==e?s[e]:null;if(null===n){const e=U(t,s[p]);X(e,a[m]),r[m]=e}else r[m]=X(n,a[m]),Y(t,n,s[p]),s[e]=null;m++}else Z(s[h]),h--;else Z(s[p]),p++;for(;m<=f;){const e=U(t,r[f+1]);X(e,a[m]),r[m++]=e}for(;p<=h;){const e=s[p++];null!==e&&Z(e)}te.set(t,r),ne.set(t,l)}}),se=new WeakMap,ie=t(e=>t=>{if(!(t instanceof S)||t instanceof T||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");const{committer:n}=t,{style:o}=n.element;se.has(t)||(o.cssText=n.strings.join(" "));const s=se.get(t);for(const t in s)t in e||(-1===t.indexOf("-")?o[t]=null:o.removeProperty(t));for(const t in e)-1===t.indexOf("-")?o[t]=e[t]:o.setProperty(t,e[t]);se.set(t,e)}),re=new WeakMap,ae=t(e=>t=>{if(!(t instanceof E))throw new Error("unsafeHTML can only be used in text bindings");const n=re.get(t);if(void 0!==n&&x(e)&&e===n.value&&t.value===n.fragment)return;const o=document.createElement("template");o.innerHTML=e;const s=document.importNode(o.content,!0);t.setValue(s),re.set(t,{value:e,fragment:s})}),le=new WeakMap,ce=t((...e)=>t=>{let n=le.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},le.set(t,n));const o=n.values;let s=o.length;n.values=e;for(let i=0;i<e.length&&!(i>n.lastRenderedIndex);i++){const r=e[i];if(x(r)||"function"!=typeof r.then){t.setValue(r),n.lastRenderedIndex=i;break}i<s&&r===o[i]||(n.lastRenderedIndex=2147483647,s=0,Promise.resolve(r).then(e=>{const o=n.values.indexOf(r);o>-1&&o<n.lastRenderedIndex&&(n.lastRenderedIndex=o,t.setValue(e),t.commit())}))}});
/**

@@ -154,3 +154,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/export default function(e,n){let o=0;const s={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(o){const s=o.committer.element;for(const o of t)if("function"==typeof o){const t=a.find(t=>t.instance===e&&t.componentAction.create===o&&t.element===s);if(t)t.props=n;else{void 0!==s.__vido__&&delete s.__vido__;const t={create:o,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:s,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:H,svg:R,directive:t,asyncAppend:O,asyncReplace:j,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:oe,styleMap:ie,unsafeHTML:ae,until:ce,lastProps:{},actions(e,t){},onDestroy(){},onChange(e){},componentsFromDataArray(e,t,n,o){if(e.length<t.length){let s=t.length-e.length;for(;s;){const i=t[t.length-s];e.push(u.createComponent(o,n(i))),s--}}else if(e.length>t.length){let n=e.length-t.length;for(;n;){e[e.length-n].destroy(),n--}e.length=t.length}let s=0;for(const o of t)e[s].change(n(o)),s++;return e},createComponent(e,t){const n=e.name+":"+o++;let i;const r=[];let a=[];const l=function(e,t){return{instance:e,vidoInstance:t,destroy:()=>(t.debug&&(console.groupCollapsed(`destroying component ${e}`),console.log(e,s[e],s),console.trace(),console.groupEnd()),u.destroyComponent(e,t)),update:()=>(t.debug&&(console.groupCollapsed(`updating component ${e}`),console.log(e,s[e],s),console.trace(),console.groupEnd()),u.updateTemplate(t)),change(n){t.debug&&(console.groupCollapsed(`changing component ${e}`),console.log(n,e,s[e],s),console.trace(),console.groupEnd()),void 0!==s[e]&&s[e].change(n,t)},html(n={}){if(void 0!==s[e])return s[e].update(n,t)}}}(n,i=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate(i)},onDestroy:function(e){r.push(e)},onChange:function(e){a.push(e)},instance:n,actions:d(n),lastProps:t})),c={instance:n,vidoInstance:i,lastProps:t,destroy(){for(const e of r)e();a=[]},update:e(i,t),change(e){for(const t of a)t(e);i.lastProps=e}};return s[n]=c,s[n].change(t),i.debug&&(console.groupCollapsed(`component created ${n}`),console.log(n,e,t,s),console.trace(),console.groupEnd()),l},destroyComponent(e,t){a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),void 0!==s[e]&&"function"==typeof s[e].destroy&&s[e].destroy(),delete s[e],t.debug&&(console.groupCollapsed(`component destroyed ${e}`),console.trace(),console.groupEnd())},updateTemplate(e){const t=++l,n=this;c.then((function(){t===l&&(n.render(),l=0,e.debug&&(console.groupCollapsed("templates updated"),console.trace(),console.groupEnd()))}))},createApp(e,t){r=t;const n=this.createComponent(e);return i=n.instance,this.render(),n},executeActions(){for(const e of a)if(void 0===e.element.__vido__){if("function"==typeof e.componentAction.create){const t=e.componentAction.create(e.element,e.props);u.debug&&(console.groupCollapsed(`create action executed ${e.instance}`),console.log(e),console.trace(),console.groupEnd()),void 0!==t&&("function"==typeof t.update&&(e.componentAction.update=t.update),"function"==typeof t.destroy&&(e.componentAction.destroy=t.destroy))}}else"function"==typeof e.componentAction.update&&(e.componentAction.update(e.element,e.props),u.debug&&(console.groupCollapsed(`update action executed ${e.instance}`),console.log(e),console.trace(),console.groupEnd()));for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){W(s[i].update(),r),u.executeActions()}};return u}
*/export default function(e,n){let o=0;const s={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(o){const s=o.committer.element;for(const o of t)if("function"==typeof o){const t=a.find(t=>t.instance===e&&t.componentAction.create===o&&t.element===s);if(t)t.props=n;else{void 0!==s.__vido__&&delete s.__vido__;const t={create:o,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:s,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:L,svg:W,directive:t,asyncAppend:F,asyncReplace:B,cache:D,classMap:z,guard:K,ifDefined:Q,repeat:oe,styleMap:ie,unsafeHTML:ae,until:ce,lastProps:{},actions(e,t){},onDestroy(){},onChange(e){},componentsFromDataArray(e,t,n,o){if(e.length<t.length){let s=t.length-e.length;for(;s;){const i=t[t.length-s];e.push(u.createComponent(o,n(i))),s--}}else if(e.length>t.length){let n=e.length-t.length;for(;n;){e[e.length-n].destroy(),n--}e.length=t.length}let s=0;for(const o of t)e[s].change(n(o)),s++;return e},createComponent(e,t){const n=e.name+":"+o++;let i;const r=[];let l=[];i=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate(i)},onDestroy:function(e){r.push(e)},onChange:function(e){l.push(e)},instance:n,actions:d(n),lastProps:t});const c=function(e,t){return{instance:e,vidoInstance:t,destroy:()=>(t.debug&&(console.groupCollapsed(`destroying component ${e}`),console.log(JSON.parse(JSON.stringify({instance:e,component:s[e],components:s,actions:a}))),console.trace(),console.groupEnd()),u.destroyComponent(e,t)),update:()=>(t.debug&&(console.groupCollapsed(`updating component ${e}`),console.log(JSON.parse(JSON.stringify({instance:e,component:s[e],components:s,actions:a}))),console.trace(),console.groupEnd()),u.updateTemplate(t)),change(n){t.debug&&(console.groupCollapsed(`changing component ${e}`),console.log(JSON.parse(JSON.stringify({props:n,instance:e,component:s[e],components:s,actions:a}))),console.trace(),console.groupEnd()),void 0!==s[e]&&s[e].change(n,t)},html(n={}){if(void 0!==s[e])return t.debug&&(console.groupCollapsed(`html component ${e}`),console.log(JSON.parse(JSON.stringify({props:n,instance:e,component:s[e],components:s,actions:a}))),console.trace(),console.groupEnd()),s[e].update(n,t)}}}(n,i),p={instance:n,vidoInstance:i,lastProps:t,destroy(){i.debug&&(console.groupCollapsed(`component destroy method fired ${n}`),console.log(JSON.parse(JSON.stringify({instance:n,component:e,props:t,components:s,destroyable:r}))),console.trace(),console.groupEnd());for(const e of r)e();l.length=0,r.length=0},update:()=>(i.debug&&(console.groupCollapsed(`component update method fired ${n}`),console.log(JSON.parse(JSON.stringify({instance:n,component:e,props:t,components:s,onChangeFunctions:l}))),console.trace(),console.groupEnd()),e(i,t)),change(o){i.debug&&(console.groupCollapsed(`component change method fired ${n}`),console.log(JSON.parse(JSON.stringify({instance:n,component:e,props:t,components:s,onChangeFunctions:l,changedProps:o}))),console.trace(),console.groupEnd());for(const e of l)e(o);i.lastProps=o}};return s[n]=p,s[n].change(t),i.debug&&(console.groupCollapsed(`component created ${n}`),console.log(JSON.parse(JSON.stringify({instance:n,component:e,props:t,components:s}))),console.trace(),console.groupEnd()),c},destroyComponent(e,t){t.debug&&(console.groupCollapsed(`destroying component ${e}...`),console.log(JSON.parse(JSON.stringify({instance:e,component:s[e],components:s,actions:a}))),console.trace(),console.groupEnd()),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),void 0!==s[e]&&"function"==typeof s[e].destroy&&s[e].destroy(),delete s[e],t.debug&&(console.groupCollapsed(`component destroyed ${e}`),console.log(JSON.parse(JSON.stringify({components:s,actions:a}))),console.trace(),console.groupEnd())},updateTemplate(e){const t=++l,n=this;c.then((function(){t===l&&(n.render(),l=0,e.debug&&(console.groupCollapsed("templates updated"),console.trace(),console.groupEnd()))}))},createApp(e,t){r=t;const n=this.createComponent(e);return i=n.instance,this.render(),n},executeActions(){for(const e of a)if(void 0===e.element.__vido__){if("function"==typeof e.componentAction.create){const t=e.componentAction.create(e.element,e.props);u.debug&&(console.groupCollapsed(`create action executed ${e.instance}`),console.log(JSON.parse(JSON.stringify({action:e,actions:a}))),console.trace(),console.groupEnd()),void 0!==t&&("function"==typeof t.update&&(e.componentAction.update=t.update),"function"==typeof t.destroy&&(e.componentAction.destroy=t.destroy))}}else"function"==typeof e.componentAction.update&&(e.componentAction.update(e.element,e.props),u.debug&&(console.groupCollapsed(`update action executed ${e.instance}`),console.log(JSON.parse(JSON.stringify({action:e,actions:a}))),console.trace(),console.groupEnd()));for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){$(s[i].update(),r),u.executeActions()}};return u}
//# sourceMappingURL=vido.esm.min.js.map

@@ -41,3 +41,3 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vido=t()}(this,(function(){"use strict";

* http://polymer.github.io/PATENTS.txt
*/const _=` ${l} `;class y{constructor(e,t,n,o){this.strings=e,this.values=t,this.type=n,this.processor=o}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let o=0;o<e;o++){const e=this.strings[o],s=e.lastIndexOf("\x3c!--");n=(s>-1||n)&&-1===e.indexOf("--\x3e",s+1);const i=g.exec(e);t+=null===i?e+(n?_:c):e.substr(0,i.index)+i[1]+i[2]+u+i[3]+l}return t+=this.strings[e]}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}class x extends y{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,n=t.firstChild;return t.removeChild(n),s(t,n.firstChild),e}}
*/const y=` ${l} `;class _{constructor(e,t,n,o){this.strings=e,this.values=t,this.type=n,this.processor=o}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let o=0;o<e;o++){const e=this.strings[o],s=e.lastIndexOf("\x3c!--");n=(s>-1||n)&&-1===e.indexOf("--\x3e",s+1);const i=g.exec(e);t+=null===i?e+(n?y:c):e.substr(0,i.index)+i[1]+i[2]+u+i[3]+l}return t+=this.strings[e]}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}class N extends _{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,n=t.firstChild;return t.removeChild(n),s(t,n.firstChild),e}}
/**

@@ -55,3 +55,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/const b=e=>null===e||!("object"==typeof e||"function"==typeof e),w=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class N{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new V(this)}_getValue(){const e=this.strings,t=e.length-1;let n="";for(let o=0;o<t;o++){n+=e[o];const t=this.parts[o];if(void 0!==t){const e=t.value;if(b(e)||!w(e))n+="string"==typeof e?e:String(e);else for(const t of e)n+="string"==typeof t?t:String(t)}}return n+=e[t]}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class V{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===r||b(e)&&e===this.value||(this.value=e,n(e)||(this.committer.dirty=!0))}commit(){for(;n(this.value);){const e=this.value;this.value=r,e(this)}this.value!==r&&this.committer.commit()}}class A{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(f()),this.endNode=e.appendChild(f())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=f()),e.__insert(this.endNode=f())}insertAfterPart(e){e.__insert(this.startNode=f()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}const e=this.__pendingValue;e!==r&&(b(e)?e!==this.value&&this.__commitText(e):e instanceof y?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):w(e)?this.__commitIterable(e):e===a?(this.value=a,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof v&&this.value.template===t)this.value.update(e.values);else{const n=new v(t,e.processor,this.options),o=n._clone();n.update(e.values),this.__commitNode(o),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,o=0;for(const s of e)void 0===(n=t[o])&&(n=new A(this.options),t.push(n),0===o?n.appendIntoPart(this):n.insertAfterPart(t[o-1])),n.setValue(s),n.commit(),o++;o<t.length&&(t.length=o,this.clear(n&&n.endNode))}clear(e=this.startNode){i(this.startNode.parentNode,e.nextSibling,this.endNode)}}class E{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}if(this.__pendingValue===r)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=r}}class T extends N{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new M(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class M extends V{}let S=!1;try{const e={get capture(){return S=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}class C{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}if(this.__pendingValue===r)return;const e=this.__pendingValue,t=this.value,o=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),s=null!=e&&(null==t||o);o&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=I(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=r}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const I=e=>e&&(S?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);
*/const x=e=>null===e||!("object"==typeof e||"function"==typeof e),b=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class w{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new S(this)}_getValue(){const e=this.strings,t=e.length-1;let n="";for(let o=0;o<t;o++){n+=e[o];const t=this.parts[o];if(void 0!==t){const e=t.value;if(x(e)||!b(e))n+="string"==typeof e?e:String(e);else for(const t of e)n+="string"==typeof t?t:String(t)}}return n+=e[t]}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class S{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===r||x(e)&&e===this.value||(this.value=e,n(e)||(this.committer.dirty=!0))}commit(){for(;n(this.value);){const e=this.value;this.value=r,e(this)}this.value!==r&&this.committer.commit()}}class E{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(f()),this.endNode=e.appendChild(f())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=f()),e.__insert(this.endNode=f())}insertAfterPart(e){e.__insert(this.startNode=f()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}const e=this.__pendingValue;e!==r&&(x(e)?e!==this.value&&this.__commitText(e):e instanceof _?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):b(e)?this.__commitIterable(e):e===a?(this.value=a,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof v&&this.value.template===t)this.value.update(e.values);else{const n=new v(t,e.processor,this.options),o=n._clone();n.update(e.values),this.__commitNode(o),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,o=0;for(const s of e)void 0===(n=t[o])&&(n=new E(this.options),t.push(n),0===o?n.appendIntoPart(this):n.insertAfterPart(t[o-1])),n.setValue(s),n.commit(),o++;o<t.length&&(t.length=o,this.clear(n&&n.endNode))}clear(e=this.startNode){i(this.startNode.parentNode,e.nextSibling,this.endNode)}}class V{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}if(this.__pendingValue===r)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=r}}class A extends w{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new T(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class T extends S{}let C=!1;try{const e={get capture(){return C=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}class O{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}if(this.__pendingValue===r)return;const e=this.__pendingValue,t=this.value,o=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),s=null!=e&&(null==t||o);o&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=M(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=r}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const M=e=>e&&(C?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);
/**

@@ -69,3 +69,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/const P=new class{handleAttributeExpressions(e,t,n,o){const s=t[0];if("."===s){return new T(e,t.slice(1),n).parts}return"@"===s?[new C(e,t.slice(1),o.eventContext)]:"?"===s?[new E(e,t.slice(1),n)]:new N(e,t,n).parts}handleTextExpression(e){return new A(e)}};
*/const I=new class{handleAttributeExpressions(e,t,n,o){const s=t[0];if("."===s){return new A(e,t.slice(1),n).parts}return"@"===s?[new O(e,t.slice(1),o.eventContext)]:"?"===s?[new V(e,t.slice(1),n)]:new w(e,t,n).parts}handleTextExpression(e){return new E(e)}};
/**

@@ -83,3 +83,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/function k(e){let t=L.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},L.set(e.type,t));let n=t.stringsArray.get(e.strings);if(void 0!==n)return n;const o=e.strings.join(l);return void 0===(n=t.keyString.get(o))&&(n=new p(e,e.getTemplateElement()),t.keyString.set(o,n)),t.stringsArray.set(e.strings,n),n}const L=new Map,$=new WeakMap,W=(e,t,n)=>{let o=$.get(t);void 0===o&&(i(t,t.firstChild),$.set(t,o=new A(Object.assign({templateFactory:k},n))),o.appendInto(t)),o.setValue(e),o.commit()};
*/function J(e){let t=P.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},P.set(e.type,t));let n=t.stringsArray.get(e.strings);if(void 0!==n)return n;const o=e.strings.join(l);return void 0===(n=t.keyString.get(o))&&(n=new p(e,e.getTemplateElement()),t.keyString.set(o,n)),t.stringsArray.set(e.strings,n),n}const P=new Map,k=new WeakMap,$=(e,t,n)=>{let o=k.get(t);void 0===o&&(i(t,t.firstChild),k.set(t,o=new E(Object.assign({templateFactory:J},n))),o.appendInto(t)),o.setValue(e),o.commit()};
/**

@@ -111,3 +111,3 @@ * @license

*/
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const H=(e,...t)=>new y(e,t,"html",P),R=(e,...t)=>new x(e,t,"svg",P);
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const L=(e,...t)=>new _(e,t,"html",I),W=(e,...t)=>new N(e,t,"svg",I);
/**

@@ -126,3 +126,3 @@ * @license

*/
var F=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,s){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,s,(t=e[n](t)).done,t.value)}))}}};const O=t((e,t)=>async n=>{var o,s;if(!(n instanceof A))throw new Error("asyncAppend can only be used in text bindings");if(e===n.value)return;let i;n.value=e;let r=0;try{for(var a,l=F(e);!(a=await l.next()).done;){let o=a.value;if(n.value!==e)break;0===r&&n.clear(),void 0!==t&&(o=t(o,r));let s=n.startNode;void 0!==i&&(s=f(),i.endNode=s,n.endNode.parentNode.insertBefore(s,n.endNode)),(i=new A(n.options)).insertAfterNode(s),i.setValue(o),i.commit(),r++}}catch(e){o={error:e}}finally{try{a&&!a.done&&(s=l.return)&&await s.call(l)}finally{if(o)throw o.error}}});
var H=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,s){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,s,(t=e[n](t)).done,t.value)}))}}};const F=t((e,t)=>async n=>{var o,s;if(!(n instanceof E))throw new Error("asyncAppend can only be used in text bindings");if(e===n.value)return;let i;n.value=e;let r=0;try{for(var a,l=H(e);!(a=await l.next()).done;){let o=a.value;if(n.value!==e)break;0===r&&n.clear(),void 0!==t&&(o=t(o,r));let s=n.startNode;void 0!==i&&(s=f(),i.endNode=s,n.endNode.parentNode.insertBefore(s,n.endNode)),(i=new E(n.options)).insertAfterNode(s),i.setValue(o),i.commit(),r++}}catch(e){o={error:e}}finally{try{a&&!a.done&&(s=l.return)&&await s.call(l)}finally{if(o)throw o.error}}});
/**

@@ -140,3 +140,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/var B=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,s){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,s,(t=e[n](t)).done,t.value)}))}}};const j=t((e,t)=>async n=>{var o,s;if(!(n instanceof A))throw new Error("asyncReplace can only be used in text bindings");if(e===n.value)return;const i=new A(n.options);n.value=e;let r=0;try{for(var a,l=B(e);!(a=await l.next()).done;){let o=a.value;if(n.value!==e)break;0===r&&(n.clear(),i.appendIntoPart(n)),void 0!==t&&(o=t(o,r)),i.setValue(o),i.commit(),r++}}catch(e){o={error:e}}finally{try{a&&!a.done&&(s=l.return)&&await s.call(l)}finally{if(o)throw o.error}}}),D=new WeakMap,q=t(e=>t=>{if(!(t instanceof A))throw new Error("cache can only be used in text bindings");let n=D.get(t);void 0===n&&(n=new WeakMap,D.set(t,n));const o=t.value;if(o instanceof v){if(e instanceof y&&o.template===t.options.templateFactory(e))return void t.setValue(e);{let e=n.get(o.template);void 0===e&&(e={instance:o,nodes:document.createDocumentFragment()},n.set(o.template,e)),s(e.nodes,t.startNode.nextSibling,t.endNode)}}if(e instanceof y){const o=t.options.templateFactory(e),s=n.get(o);void 0!==s&&(t.setValue(s.nodes),t.commit(),t.value=s.instance)}t.setValue(e)}),z=new WeakMap,G=t(e=>t=>{if(!(t instanceof V)||t instanceof M||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:n}=t,{element:o}=n;z.has(t)||(o.className=n.strings.join(" "));const{classList:s}=o,i=z.get(t);for(const t in i)t in e||s.remove(t);for(const t in e){const n=e[t];if(!i||n!==i[t]){s[n?"add":"remove"](t)}}z.set(t,e)}),J=new WeakMap,K=t((e,t)=>n=>{const o=J.get(n);if(Array.isArray(e)){if(Array.isArray(o)&&o.length===e.length&&e.every((e,t)=>e===o[t]))return}else if(o===e&&(void 0!==e||J.has(n)))return;n.setValue(t()),J.set(n,Array.isArray(e)?Array.from(e):e)}),Q=t(e=>t=>{if(void 0===e&&t instanceof V){if(e!==t.value){const e=t.committer.name;t.committer.element.removeAttribute(e)}}else t.setValue(e)}),U=(e,t)=>{const n=e.startNode.parentNode,o=void 0===t?e.endNode:t.startNode,s=n.insertBefore(f(),o);n.insertBefore(f(),o);const i=new A(e.options);return i.insertAfterNode(s),i},X=(e,t)=>(e.setValue(t),e.commit(),e),Y=(e,t,n)=>{const o=e.startNode.parentNode,i=n?n.startNode:e.endNode,r=t.endNode.nextSibling;r!==i&&s(o,t.startNode,r,i)},Z=e=>{i(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},ee=(e,t,n)=>{const o=new Map;for(let s=t;s<=n;s++)o.set(e[s],s);return o},te=new WeakMap,ne=new WeakMap,oe=t((e,t,n)=>{let o;return void 0===n?n=t:void 0!==t&&(o=t),t=>{if(!(t instanceof A))throw new Error("repeat can only be used in text bindings");const s=te.get(t)||[],i=ne.get(t)||[],r=[],a=[],l=[];let c,d,u=0;for(const t of e)l[u]=o?o(t,u):u,a[u]=n(t,u),u++;let p=0,h=s.length-1,m=0,f=a.length-1;for(;p<=h&&m<=f;)if(null===s[p])p++;else if(null===s[h])h--;else if(i[p]===l[m])r[m]=X(s[p],a[m]),p++,m++;else if(i[h]===l[f])r[f]=X(s[h],a[f]),h--,f--;else if(i[p]===l[f])r[f]=X(s[p],a[f]),Y(t,s[p],r[f+1]),p++,f--;else if(i[h]===l[m])r[m]=X(s[h],a[m]),Y(t,s[h],s[p]),h--,m++;else if(void 0===c&&(c=ee(l,m,f),d=ee(i,p,h)),c.has(i[p]))if(c.has(i[h])){const e=d.get(l[m]),n=void 0!==e?s[e]:null;if(null===n){const e=U(t,s[p]);X(e,a[m]),r[m]=e}else r[m]=X(n,a[m]),Y(t,n,s[p]),s[e]=null;m++}else Z(s[h]),h--;else Z(s[p]),p++;for(;m<=f;){const e=U(t,r[f+1]);X(e,a[m]),r[m++]=e}for(;p<=h;){const e=s[p++];null!==e&&Z(e)}te.set(t,r),ne.set(t,l)}}),se=new WeakMap,ie=t(e=>t=>{if(!(t instanceof V)||t instanceof M||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");const{committer:n}=t,{style:o}=n.element;se.has(t)||(o.cssText=n.strings.join(" "));const s=se.get(t);for(const t in s)t in e||(-1===t.indexOf("-")?o[t]=null:o.removeProperty(t));for(const t in e)-1===t.indexOf("-")?o[t]=e[t]:o.setProperty(t,e[t]);se.set(t,e)}),re=new WeakMap,ae=t(e=>t=>{if(!(t instanceof A))throw new Error("unsafeHTML can only be used in text bindings");const n=re.get(t);if(void 0!==n&&b(e)&&e===n.value&&t.value===n.fragment)return;const o=document.createElement("template");o.innerHTML=e;const s=document.importNode(o.content,!0);t.setValue(s),re.set(t,{value:e,fragment:s})}),le=new WeakMap,ce=t((...e)=>t=>{let n=le.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},le.set(t,n));const o=n.values;let s=o.length;n.values=e;for(let i=0;i<e.length&&!(i>n.lastRenderedIndex);i++){const r=e[i];if(b(r)||"function"!=typeof r.then){t.setValue(r),n.lastRenderedIndex=i;break}i<s&&r===o[i]||(n.lastRenderedIndex=2147483647,s=0,Promise.resolve(r).then(e=>{const o=n.values.indexOf(r);o>-1&&o<n.lastRenderedIndex&&(n.lastRenderedIndex=o,t.setValue(e),t.commit())}))}});
*/var R=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,s){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,s,(t=e[n](t)).done,t.value)}))}}};const B=t((e,t)=>async n=>{var o,s;if(!(n instanceof E))throw new Error("asyncReplace can only be used in text bindings");if(e===n.value)return;const i=new E(n.options);n.value=e;let r=0;try{for(var a,l=R(e);!(a=await l.next()).done;){let o=a.value;if(n.value!==e)break;0===r&&(n.clear(),i.appendIntoPart(n)),void 0!==t&&(o=t(o,r)),i.setValue(o),i.commit(),r++}}catch(e){o={error:e}}finally{try{a&&!a.done&&(s=l.return)&&await s.call(l)}finally{if(o)throw o.error}}}),j=new WeakMap,D=t(e=>t=>{if(!(t instanceof E))throw new Error("cache can only be used in text bindings");let n=j.get(t);void 0===n&&(n=new WeakMap,j.set(t,n));const o=t.value;if(o instanceof v){if(e instanceof _&&o.template===t.options.templateFactory(e))return void t.setValue(e);{let e=n.get(o.template);void 0===e&&(e={instance:o,nodes:document.createDocumentFragment()},n.set(o.template,e)),s(e.nodes,t.startNode.nextSibling,t.endNode)}}if(e instanceof _){const o=t.options.templateFactory(e),s=n.get(o);void 0!==s&&(t.setValue(s.nodes),t.commit(),t.value=s.instance)}t.setValue(e)}),q=new WeakMap,z=t(e=>t=>{if(!(t instanceof S)||t instanceof T||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:n}=t,{element:o}=n;q.has(t)||(o.className=n.strings.join(" "));const{classList:s}=o,i=q.get(t);for(const t in i)t in e||s.remove(t);for(const t in e){const n=e[t];if(!i||n!==i[t]){s[n?"add":"remove"](t)}}q.set(t,e)}),G=new WeakMap,K=t((e,t)=>n=>{const o=G.get(n);if(Array.isArray(e)){if(Array.isArray(o)&&o.length===e.length&&e.every((e,t)=>e===o[t]))return}else if(o===e&&(void 0!==e||G.has(n)))return;n.setValue(t()),G.set(n,Array.isArray(e)?Array.from(e):e)}),Q=t(e=>t=>{if(void 0===e&&t instanceof S){if(e!==t.value){const e=t.committer.name;t.committer.element.removeAttribute(e)}}else t.setValue(e)}),U=(e,t)=>{const n=e.startNode.parentNode,o=void 0===t?e.endNode:t.startNode,s=n.insertBefore(f(),o);n.insertBefore(f(),o);const i=new E(e.options);return i.insertAfterNode(s),i},X=(e,t)=>(e.setValue(t),e.commit(),e),Y=(e,t,n)=>{const o=e.startNode.parentNode,i=n?n.startNode:e.endNode,r=t.endNode.nextSibling;r!==i&&s(o,t.startNode,r,i)},Z=e=>{i(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},ee=(e,t,n)=>{const o=new Map;for(let s=t;s<=n;s++)o.set(e[s],s);return o},te=new WeakMap,ne=new WeakMap,oe=t((e,t,n)=>{let o;return void 0===n?n=t:void 0!==t&&(o=t),t=>{if(!(t instanceof E))throw new Error("repeat can only be used in text bindings");const s=te.get(t)||[],i=ne.get(t)||[],r=[],a=[],l=[];let c,d,u=0;for(const t of e)l[u]=o?o(t,u):u,a[u]=n(t,u),u++;let p=0,h=s.length-1,m=0,f=a.length-1;for(;p<=h&&m<=f;)if(null===s[p])p++;else if(null===s[h])h--;else if(i[p]===l[m])r[m]=X(s[p],a[m]),p++,m++;else if(i[h]===l[f])r[f]=X(s[h],a[f]),h--,f--;else if(i[p]===l[f])r[f]=X(s[p],a[f]),Y(t,s[p],r[f+1]),p++,f--;else if(i[h]===l[m])r[m]=X(s[h],a[m]),Y(t,s[h],s[p]),h--,m++;else if(void 0===c&&(c=ee(l,m,f),d=ee(i,p,h)),c.has(i[p]))if(c.has(i[h])){const e=d.get(l[m]),n=void 0!==e?s[e]:null;if(null===n){const e=U(t,s[p]);X(e,a[m]),r[m]=e}else r[m]=X(n,a[m]),Y(t,n,s[p]),s[e]=null;m++}else Z(s[h]),h--;else Z(s[p]),p++;for(;m<=f;){const e=U(t,r[f+1]);X(e,a[m]),r[m++]=e}for(;p<=h;){const e=s[p++];null!==e&&Z(e)}te.set(t,r),ne.set(t,l)}}),se=new WeakMap,ie=t(e=>t=>{if(!(t instanceof S)||t instanceof T||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");const{committer:n}=t,{style:o}=n.element;se.has(t)||(o.cssText=n.strings.join(" "));const s=se.get(t);for(const t in s)t in e||(-1===t.indexOf("-")?o[t]=null:o.removeProperty(t));for(const t in e)-1===t.indexOf("-")?o[t]=e[t]:o.setProperty(t,e[t]);se.set(t,e)}),re=new WeakMap,ae=t(e=>t=>{if(!(t instanceof E))throw new Error("unsafeHTML can only be used in text bindings");const n=re.get(t);if(void 0!==n&&x(e)&&e===n.value&&t.value===n.fragment)return;const o=document.createElement("template");o.innerHTML=e;const s=document.importNode(o.content,!0);t.setValue(s),re.set(t,{value:e,fragment:s})}),le=new WeakMap,ce=t((...e)=>t=>{let n=le.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},le.set(t,n));const o=n.values;let s=o.length;n.values=e;for(let i=0;i<e.length&&!(i>n.lastRenderedIndex);i++){const r=e[i];if(x(r)||"function"!=typeof r.then){t.setValue(r),n.lastRenderedIndex=i;break}i<s&&r===o[i]||(n.lastRenderedIndex=2147483647,s=0,Promise.resolve(r).then(e=>{const o=n.values.indexOf(r);o>-1&&o<n.lastRenderedIndex&&(n.lastRenderedIndex=o,t.setValue(e),t.commit())}))}});
/**

@@ -154,3 +154,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/return function(e,n){let o=0;const s={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(o){const s=o.committer.element;for(const o of t)if("function"==typeof o){const t=a.find(t=>t.instance===e&&t.componentAction.create===o&&t.element===s);if(t)t.props=n;else{void 0!==s.__vido__&&delete s.__vido__;const t={create:o,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:s,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:H,svg:R,directive:t,asyncAppend:O,asyncReplace:j,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:oe,styleMap:ie,unsafeHTML:ae,until:ce,lastProps:{},actions(e,t){},onDestroy(){},onChange(e){},componentsFromDataArray(e,t,n,o){if(e.length<t.length){let s=t.length-e.length;for(;s;){const i=t[t.length-s];e.push(u.createComponent(o,n(i))),s--}}else if(e.length>t.length){let n=e.length-t.length;for(;n;){e[e.length-n].destroy(),n--}e.length=t.length}let s=0;for(const o of t)e[s].change(n(o)),s++;return e},createComponent(e,t){const n=e.name+":"+o++;let i;const r=[];let a=[];const l=function(e,t){return{instance:e,vidoInstance:t,destroy:()=>(t.debug&&(console.groupCollapsed(`destroying component ${e}`),console.log(e,s[e],s),console.trace(),console.groupEnd()),u.destroyComponent(e,t)),update:()=>(t.debug&&(console.groupCollapsed(`updating component ${e}`),console.log(e,s[e],s),console.trace(),console.groupEnd()),u.updateTemplate(t)),change(n){t.debug&&(console.groupCollapsed(`changing component ${e}`),console.log(n,e,s[e],s),console.trace(),console.groupEnd()),void 0!==s[e]&&s[e].change(n,t)},html(n={}){if(void 0!==s[e])return s[e].update(n,t)}}}(n,i=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate(i)},onDestroy:function(e){r.push(e)},onChange:function(e){a.push(e)},instance:n,actions:d(n),lastProps:t})),c={instance:n,vidoInstance:i,lastProps:t,destroy(){for(const e of r)e();a=[]},update:e(i,t),change(e){for(const t of a)t(e);i.lastProps=e}};return s[n]=c,s[n].change(t),i.debug&&(console.groupCollapsed(`component created ${n}`),console.log(n,e,t,s),console.trace(),console.groupEnd()),l},destroyComponent(e,t){a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),void 0!==s[e]&&"function"==typeof s[e].destroy&&s[e].destroy(),delete s[e],t.debug&&(console.groupCollapsed(`component destroyed ${e}`),console.trace(),console.groupEnd())},updateTemplate(e){const t=++l,n=this;c.then((function(){t===l&&(n.render(),l=0,e.debug&&(console.groupCollapsed("templates updated"),console.trace(),console.groupEnd()))}))},createApp(e,t){r=t;const n=this.createComponent(e);return i=n.instance,this.render(),n},executeActions(){for(const e of a)if(void 0===e.element.__vido__){if("function"==typeof e.componentAction.create){const t=e.componentAction.create(e.element,e.props);u.debug&&(console.groupCollapsed(`create action executed ${e.instance}`),console.log(e),console.trace(),console.groupEnd()),void 0!==t&&("function"==typeof t.update&&(e.componentAction.update=t.update),"function"==typeof t.destroy&&(e.componentAction.destroy=t.destroy))}}else"function"==typeof e.componentAction.update&&(e.componentAction.update(e.element,e.props),u.debug&&(console.groupCollapsed(`update action executed ${e.instance}`),console.log(e),console.trace(),console.groupEnd()));for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){W(s[i].update(),r),u.executeActions()}};return u}}));
*/return function(e,n){let o=0;const s={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(o){const s=o.committer.element;for(const o of t)if("function"==typeof o){const t=a.find(t=>t.instance===e&&t.componentAction.create===o&&t.element===s);if(t)t.props=n;else{void 0!==s.__vido__&&delete s.__vido__;const t={create:o,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:s,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:L,svg:W,directive:t,asyncAppend:F,asyncReplace:B,cache:D,classMap:z,guard:K,ifDefined:Q,repeat:oe,styleMap:ie,unsafeHTML:ae,until:ce,lastProps:{},actions(e,t){},onDestroy(){},onChange(e){},componentsFromDataArray(e,t,n,o){if(e.length<t.length){let s=t.length-e.length;for(;s;){const i=t[t.length-s];e.push(u.createComponent(o,n(i))),s--}}else if(e.length>t.length){let n=e.length-t.length;for(;n;){e[e.length-n].destroy(),n--}e.length=t.length}let s=0;for(const o of t)e[s].change(n(o)),s++;return e},createComponent(e,t){const n=e.name+":"+o++;let i;const r=[];let l=[];i=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate(i)},onDestroy:function(e){r.push(e)},onChange:function(e){l.push(e)},instance:n,actions:d(n),lastProps:t});const c=function(e,t){return{instance:e,vidoInstance:t,destroy:()=>(t.debug&&(console.groupCollapsed(`destroying component ${e}`),console.log(JSON.parse(JSON.stringify({instance:e,component:s[e],components:s,actions:a}))),console.trace(),console.groupEnd()),u.destroyComponent(e,t)),update:()=>(t.debug&&(console.groupCollapsed(`updating component ${e}`),console.log(JSON.parse(JSON.stringify({instance:e,component:s[e],components:s,actions:a}))),console.trace(),console.groupEnd()),u.updateTemplate(t)),change(n){t.debug&&(console.groupCollapsed(`changing component ${e}`),console.log(JSON.parse(JSON.stringify({props:n,instance:e,component:s[e],components:s,actions:a}))),console.trace(),console.groupEnd()),void 0!==s[e]&&s[e].change(n,t)},html(n={}){if(void 0!==s[e])return t.debug&&(console.groupCollapsed(`html component ${e}`),console.log(JSON.parse(JSON.stringify({props:n,instance:e,component:s[e],components:s,actions:a}))),console.trace(),console.groupEnd()),s[e].update(n,t)}}}(n,i),p={instance:n,vidoInstance:i,lastProps:t,destroy(){i.debug&&(console.groupCollapsed(`component destroy method fired ${n}`),console.log(JSON.parse(JSON.stringify({instance:n,component:e,props:t,components:s,destroyable:r}))),console.trace(),console.groupEnd());for(const e of r)e();l.length=0,r.length=0},update:()=>(i.debug&&(console.groupCollapsed(`component update method fired ${n}`),console.log(JSON.parse(JSON.stringify({instance:n,component:e,props:t,components:s,onChangeFunctions:l}))),console.trace(),console.groupEnd()),e(i,t)),change(o){i.debug&&(console.groupCollapsed(`component change method fired ${n}`),console.log(JSON.parse(JSON.stringify({instance:n,component:e,props:t,components:s,onChangeFunctions:l,changedProps:o}))),console.trace(),console.groupEnd());for(const e of l)e(o);i.lastProps=o}};return s[n]=p,s[n].change(t),i.debug&&(console.groupCollapsed(`component created ${n}`),console.log(JSON.parse(JSON.stringify({instance:n,component:e,props:t,components:s}))),console.trace(),console.groupEnd()),c},destroyComponent(e,t){t.debug&&(console.groupCollapsed(`destroying component ${e}...`),console.log(JSON.parse(JSON.stringify({instance:e,component:s[e],components:s,actions:a}))),console.trace(),console.groupEnd()),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),void 0!==s[e]&&"function"==typeof s[e].destroy&&s[e].destroy(),delete s[e],t.debug&&(console.groupCollapsed(`component destroyed ${e}`),console.log(JSON.parse(JSON.stringify({components:s,actions:a}))),console.trace(),console.groupEnd())},updateTemplate(e){const t=++l,n=this;c.then((function(){t===l&&(n.render(),l=0,e.debug&&(console.groupCollapsed("templates updated"),console.trace(),console.groupEnd()))}))},createApp(e,t){r=t;const n=this.createComponent(e);return i=n.instance,this.render(),n},executeActions(){for(const e of a)if(void 0===e.element.__vido__){if("function"==typeof e.componentAction.create){const t=e.componentAction.create(e.element,e.props);u.debug&&(console.groupCollapsed(`create action executed ${e.instance}`),console.log(JSON.parse(JSON.stringify({action:e,actions:a}))),console.trace(),console.groupEnd()),void 0!==t&&("function"==typeof t.update&&(e.componentAction.update=t.update),"function"==typeof t.destroy&&(e.componentAction.destroy=t.destroy))}}else"function"==typeof e.componentAction.update&&(e.componentAction.update(e.element,e.props),u.debug&&(console.groupCollapsed(`update action executed ${e.instance}`),console.log(JSON.parse(JSON.stringify({action:e,actions:a}))),console.trace(),console.groupEnd()));for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){$(s[i].update(),r),u.executeActions()}};return u}}));
//# sourceMappingURL=vido.min.js.map

@@ -131,9 +131,32 @@ import { render, html, directive, svg } from 'lit-html';

destroy() {
if (vidoInstance.debug) {
console.groupCollapsed(`component destroy method fired ${instance}`);
console.log(JSON.parse(JSON.stringify({ instance, component, props, components, destroyable })));
console.trace();
console.groupEnd();
}
for (const d of destroyable) {
d();
}
onChangeFunctions = [];
onChangeFunctions.length = 0;
destroyable.length = 0;
},
update: component(vidoInstance, props),
update() {
if (vidoInstance.debug) {
console.groupCollapsed(`component update method fired ${instance}`);
console.log(JSON.parse(JSON.stringify({ instance, component, props, components, onChangeFunctions })));
console.trace();
console.groupEnd();
}
return component(vidoInstance, props);
},
change(changedProps) {
if (vidoInstance.debug) {
console.groupCollapsed(`component change method fired ${instance}`);
console.log(
JSON.parse(JSON.stringify({ instance, component, props, components, onChangeFunctions, changedProps }))
);
console.trace();
console.groupEnd();
}
for (const fn of onChangeFunctions) {

@@ -149,3 +172,3 @@ fn(changedProps);

console.groupCollapsed(`component created ${instance}`);
console.log(instance, component, props, components);
console.log(JSON.parse(JSON.stringify({ instance, component, props, components })));
console.trace();

@@ -158,2 +181,8 @@ console.groupEnd();

destroyComponent(instance, vidoInstance) {
if (vidoInstance.debug) {
console.groupCollapsed(`destroying component ${instance}...`);
console.log(JSON.parse(JSON.stringify({ instance, component: components[instance], components, actions })));
console.trace();
console.groupEnd();
}
actions = actions.filter(action => {

@@ -171,2 +200,3 @@ if (action.instance === instance && typeof action.componentAction.destroy === 'function') {

console.groupCollapsed(`component destroyed ${instance}`);
console.log(JSON.parse(JSON.stringify({ components, actions })));
console.trace();

@@ -209,3 +239,3 @@ console.groupEnd();

console.groupCollapsed(`create action executed ${action.instance}`);
console.log(action);
console.log(JSON.parse(JSON.stringify({ action, actions })));
console.trace();

@@ -228,3 +258,3 @@ console.groupEnd();

console.groupCollapsed(`update action executed ${action.instance}`);
console.log(action);
console.log(JSON.parse(JSON.stringify({ action, actions })));
console.trace();

@@ -254,3 +284,3 @@ console.groupEnd();

console.groupCollapsed(`destroying component ${instance}`);
console.log(instance, components[instance], components);
console.log(JSON.parse(JSON.stringify({ instance, component: components[instance], components, actions })));
console.trace();

@@ -264,3 +294,3 @@ console.groupEnd();

console.groupCollapsed(`updating component ${instance}`);
console.log(instance, components[instance], components);
console.log(JSON.parse(JSON.stringify({ instance, component: components[instance], components, actions })));
console.trace();

@@ -275,3 +305,5 @@ console.groupEnd();

console.groupCollapsed(`changing component ${instance}`);
console.log(props, instance, components[instance], components);
console.log(
JSON.parse(JSON.stringify({ props, instance, component: components[instance], components, actions }))
);
console.trace();

@@ -287,2 +319,10 @@ console.groupEnd();

if (typeof components[instance] !== 'undefined') {
if (vidoInstance.debug) {
console.groupCollapsed(`html component ${instance}`);
console.log(
JSON.parse(JSON.stringify({ props, instance, component: components[instance], components, actions }))
);
console.trace();
console.groupEnd();
}
return components[instance].update(props, vidoInstance);

@@ -289,0 +329,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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