Socket
Socket
Sign inDemoInstall

@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.1 to 1.0.2

2

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

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

@@ -14,3 +14,3 @@ /**

*/
const e=new WeakMap,t=t=>(...n)=>{const s=t(...n);return e.set(s,!0),s},n=t=>"function"==typeof t&&e.has(t),s=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,i=(e,t,n=null,s=null)=>{for(;t!==n;){const n=t.nextSibling;e.insertBefore(t,s),t=n}},o=(e,t,n=null)=>{for(;t!==n;){const n=t.nextSibling;e.removeChild(t),t=n}},r={},a={},l=`{{lit-${String(Math.random()).slice(2)}}}`,c=`\x3c!--${l}--\x3e`,d=new RegExp(`${l}|${c}`),u="$lit$";class h{constructor(e,t){this.parts=[],this.element=t;const n=[],s=[],i=document.createTreeWalker(t.content,133,null,!1);let o=0,r=-1,a=0;const{strings:c,values:{length:h}}=e;for(;a<h;){const e=i.nextNode();if(null!==e){if(r++,1===e.nodeType){if(e.hasAttributes()){const t=e.attributes,{length:n}=t;let s=0;for(let e=0;e<n;e++)p(t[e].name,u)&&s++;for(;s-- >0;){const t=c[a],n=g.exec(t)[2],s=n.toLowerCase()+u,i=e.getAttribute(s);e.removeAttribute(s);const o=i.split(d);this.parts.push({type:"attribute",index:r,name:n,strings:o}),a+=o.length-1}}"TEMPLATE"===e.tagName&&(s.push(e),i.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(l)>=0){const s=e.parentNode,i=t.split(d),o=i.length-1;for(let t=0;t<o;t++){let n,o=i[t];if(""===o)n=f();else{const e=g.exec(o);null!==e&&p(e[2],u)&&(o=o.slice(0,e.index)+e[1]+e[2].slice(0,-u.length)+e[3]),n=document.createTextNode(o)}s.insertBefore(n,e),this.parts.push({type:"node",index:++r})}""===i[o]?(s.insertBefore(f(),e),n.push(e)):e.data=i[o],a+=o}}else if(8===e.nodeType)if(e.data===l){const t=e.parentNode;null!==e.previousSibling&&r!==o||(r++,t.insertBefore(f(),e)),o=r,this.parts.push({type:"node",index:r}),null===e.nextSibling?e.data="":(n.push(e),r--),a++}else{let t=-1;for(;-1!==(t=e.data.indexOf(l,t+1));)this.parts.push({type:"node",index:-1}),a++}}else i.currentNode=s.pop()}for(const e of n)e.parentNode.removeChild(e)}}const p=(e,t)=>{const n=e.length-t.length;return n>=0&&e.slice(n)===t},m=e=>-1!==e.index,f=()=>document.createComment(""),g=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;
const e=new WeakMap,t=t=>(...n)=>{const s=t(...n);return e.set(s,!0),s},n=t=>"function"==typeof t&&e.has(t),s=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,o=(e,t,n=null,s=null)=>{for(;t!==n;){const n=t.nextSibling;e.insertBefore(t,s),t=n}},i=(e,t,n=null)=>{for(;t!==n;){const n=t.nextSibling;e.removeChild(t),t=n}},r={},a={},l=`{{lit-${String(Math.random()).slice(2)}}}`,c=`\x3c!--${l}--\x3e`,d=new RegExp(`${l}|${c}`),u="$lit$";class h{constructor(e,t){this.parts=[],this.element=t;const n=[],s=[],o=document.createTreeWalker(t.content,133,null,!1);let i=0,r=-1,a=0;const{strings:c,values:{length:h}}=e;for(;a<h;){const e=o.nextNode();if(null!==e){if(r++,1===e.nodeType){if(e.hasAttributes()){const t=e.attributes,{length:n}=t;let s=0;for(let e=0;e<n;e++)p(t[e].name,u)&&s++;for(;s-- >0;){const t=c[a],n=v.exec(t)[2],s=n.toLowerCase()+u,o=e.getAttribute(s);e.removeAttribute(s);const i=o.split(d);this.parts.push({type:"attribute",index:r,name:n,strings:i}),a+=i.length-1}}"TEMPLATE"===e.tagName&&(s.push(e),o.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(l)>=0){const s=e.parentNode,o=t.split(d),i=o.length-1;for(let t=0;t<i;t++){let n,i=o[t];if(""===i)n=f();else{const e=v.exec(i);null!==e&&p(e[2],u)&&(i=i.slice(0,e.index)+e[1]+e[2].slice(0,-u.length)+e[3]),n=document.createTextNode(i)}s.insertBefore(n,e),this.parts.push({type:"node",index:++r})}""===o[i]?(s.insertBefore(f(),e),n.push(e)):e.data=o[i],a+=i}}else if(8===e.nodeType)if(e.data===l){const t=e.parentNode;null!==e.previousSibling&&r!==i||(r++,t.insertBefore(f(),e)),i=r,this.parts.push({type:"node",index:r}),null===e.nextSibling?e.data="":(n.push(e),r--),a++}else{let t=-1;for(;-1!==(t=e.data.indexOf(l,t+1));)this.parts.push({type:"node",index:-1}),a++}}else o.currentNode=s.pop()}for(const e of n)e.parentNode.removeChild(e)}}const p=(e,t)=>{const n=e.length-t.length;return n>=0&&e.slice(n)===t},m=e=>-1!==e.index,f=()=>document.createComment(""),v=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;
/**

@@ -29,3 +29,3 @@ * @license

*/
class v{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this.options=n}update(e){let t=0;for(const n of this.__parts)void 0!==n&&n.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=s?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],n=this.template.parts,i=document.createTreeWalker(e,133,null,!1);let o,r=0,a=0,l=i.nextNode();for(;r<n.length;)if(o=n[r],m(o)){for(;a<o.index;)a++,"TEMPLATE"===l.nodeName&&(t.push(l),i.currentNode=l.content),null===(l=i.nextNode())&&(i.currentNode=t.pop(),l=i.nextNode());if("node"===o.type){const e=this.processor.handleTextExpression(this.options);e.insertAfterNode(l.previousSibling),this.__parts.push(e)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,o.name,o.strings,this.options));r++}else this.__parts.push(void 0),r++;return s&&(document.adoptNode(e),customElements.upgrade(e)),e}}
class g{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this.options=n}update(e){let t=0;for(const n of this.__parts)void 0!==n&&n.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=s?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],n=this.template.parts,o=document.createTreeWalker(e,133,null,!1);let i,r=0,a=0,l=o.nextNode();for(;r<n.length;)if(i=n[r],m(i)){for(;a<i.index;)a++,"TEMPLATE"===l.nodeName&&(t.push(l),o.currentNode=l.content),null===(l=o.nextNode())&&(o.currentNode=t.pop(),l=o.nextNode());if("node"===i.type){const e=this.processor.handleTextExpression(this.options);e.insertAfterNode(l.previousSibling),this.__parts.push(e)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,i.name,i.strings,this.options));r++}else this.__parts.push(void 0),r++;return s&&(document.adoptNode(e),customElements.upgrade(e)),e}}
/**

@@ -43,3 +43,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/const _=` ${l} `;class y{constructor(e,t,n,s){this.strings=e,this.values=t,this.type=n,this.processor=s}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let s=0;s<e;s++){const e=this.strings[s],i=e.lastIndexOf("\x3c!--");n=(i>-1||n)&&-1===e.indexOf("--\x3e",i+1);const o=g.exec(e);t+=null===o?e+(n?_:c):e.substr(0,o.index)+o[1]+o[2]+u+o[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),i(t,n.firstChild),e}}
*/const _=` ${l} `;class y{constructor(e,t,n,s){this.strings=e,this.values=t,this.type=n,this.processor=s}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let s=0;s<e;s++){const e=this.strings[s],o=e.lastIndexOf("\x3c!--");n=(o>-1||n)&&-1===e.indexOf("--\x3e",o+1);const i=v.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),o(t,n.firstChild),e}}
/**

@@ -57,3 +57,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/const N=e=>null===e||!("object"==typeof e||"function"==typeof e),w=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class b{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 s=0;s<t;s++){n+=e[s];const t=this.parts[s];if(void 0!==t){const e=t.value;if(N(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||N(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&&(N(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),s=n._clone();n.update(e.values),this.__commitNode(s),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,s=0;for(const i of e)void 0===(n=t[s])&&(n=new A(this.options),t.push(n),0===s?n.appendIntoPart(this):n.insertAfterPart(t[s-1])),n.setValue(i),n.commit(),s++;s<t.length&&(t.length=s,this.clear(n&&n.endNode))}clear(e=this.startNode){o(this.startNode.parentNode,e.nextSibling,this.endNode)}}class T{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 E extends b{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 k{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,s=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=null!=e&&(null==t||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=C(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 C=e=>e&&(S?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);
*/const w=e=>null===e||!("object"==typeof e||"function"==typeof e),N=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class b{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 s=0;s<t;s++){n+=e[s];const t=this.parts[s];if(void 0!==t){const e=t.value;if(w(e)||!N(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||w(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&&(w(e)?e!==this.value&&this.__commitText(e):e instanceof y?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):N(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 g&&this.value.template===t)this.value.update(e.values);else{const n=new g(t,e.processor,this.options),s=n._clone();n.update(e.values),this.__commitNode(s),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,s=0;for(const o of e)void 0===(n=t[s])&&(n=new A(this.options),t.push(n),0===s?n.appendIntoPart(this):n.insertAfterPart(t[s-1])),n.setValue(o),n.commit(),s++;s<t.length&&(t.length=s,this.clear(n&&n.endNode))}clear(e=this.startNode){i(this.startNode.parentNode,e.nextSibling,this.endNode)}}class T{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 E extends b{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 I{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,s=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),o=null!=e&&(null==t||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),o&&(this.__options=k(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 k=e=>e&&(S?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);
/**

@@ -71,3 +71,3 @@ * @license

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

@@ -85,3 +85,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/function W(e){let t=H.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},H.set(e.type,t));let n=t.stringsArray.get(e.strings);if(void 0!==n)return n;const s=e.strings.join(l);return void 0===(n=t.keyString.get(s))&&(n=new h(e,e.getTemplateElement()),t.keyString.set(s,n)),t.stringsArray.set(e.strings,n),n}const H=new Map,I=new WeakMap,P=(e,t,n)=>{let s=I.get(t);void 0===s&&(o(t,t.firstChild),I.set(t,s=new A(Object.assign({templateFactory:W},n))),s.appendInto(t)),s.setValue(e),s.commit()};
*/function P(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 s=e.strings.join(l);return void 0===(n=t.keyString.get(s))&&(n=new h(e,e.getTemplateElement()),t.keyString.set(s,n)),t.stringsArray.set(e.strings,n),n}const L=new Map,W=new WeakMap,H=(e,t,n)=>{let s=W.get(t);void 0===s&&(i(t,t.firstChild),W.set(t,s=new A(Object.assign({templateFactory:P},n))),s.appendInto(t)),s.setValue(e),s.commit()};
/**

@@ -113,3 +113,43 @@ * @license

*/
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const O=(e,...t)=>new y(e,t,"html",L),j=(e,...t)=>new x(e,t,"svg",L),F=new WeakMap,R=t(e=>t=>{if(!(t instanceof A))throw new Error("cache can only be used in text bindings");let n=F.get(t);void 0===n&&(n=new WeakMap,F.set(t,n));const s=t.value;if(s instanceof v){if(e instanceof y&&s.template===t.options.templateFactory(e))return void t.setValue(e);{let e=n.get(s.template);void 0===e&&(e={instance:s,nodes:document.createDocumentFragment()},n.set(s.template,e)),i(e.nodes,t.startNode.nextSibling,t.endNode)}}if(e instanceof y){const s=t.options.templateFactory(e),i=n.get(s);void 0!==i&&(t.setValue(i.nodes),t.commit(),t.value=i.instance)}t.setValue(e)}),$=new WeakMap,B=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:s}=n;$.has(t)||(s.className=n.strings.join(" "));const{classList:i}=s,o=$.get(t);for(const t in o)t in e||i.remove(t);for(const t in e){const n=e[t];if(!o||n!==o[t]){i[n?"add":"remove"](t)}}$.set(t,e)}),D=new WeakMap,q=t((e,t)=>n=>{const s=D.get(n);if(Array.isArray(e)){if(Array.isArray(s)&&s.length===e.length&&e.every((e,t)=>e===s[t]))return}else if(s===e&&(void 0!==e||D.has(n)))return;n.setValue(t()),D.set(n,Array.isArray(e)?Array.from(e):e)}),z=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)}),G=(e,t)=>{const n=e.startNode.parentNode,s=void 0===t?e.endNode:t.startNode,i=n.insertBefore(f(),s);n.insertBefore(f(),s);const o=new A(e.options);return o.insertAfterNode(i),o},J=(e,t)=>(e.setValue(t),e.commit(),e),K=(e,t,n)=>{const s=e.startNode.parentNode,o=n?n.startNode:e.endNode,r=t.endNode.nextSibling;r!==o&&i(s,t.startNode,r,o)},Q=e=>{o(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},U=(e,t,n)=>{const s=new Map;for(let i=t;i<=n;i++)s.set(e[i],i);return s},X=new WeakMap,Y=new WeakMap,Z=t((e,t,n)=>{let s;return void 0===n?n=t:void 0!==t&&(s=t),t=>{if(!(t instanceof A))throw new Error("repeat can only be used in text bindings");const i=X.get(t)||[],o=Y.get(t)||[],r=[],a=[],l=[];let c,d,u=0;for(const t of e)l[u]=s?s(t,u):u,a[u]=n(t,u),u++;let h=0,p=i.length-1,m=0,f=a.length-1;for(;h<=p&&m<=f;)if(null===i[h])h++;else if(null===i[p])p--;else if(o[h]===l[m])r[m]=J(i[h],a[m]),h++,m++;else if(o[p]===l[f])r[f]=J(i[p],a[f]),p--,f--;else if(o[h]===l[f])r[f]=J(i[h],a[f]),K(t,i[h],r[f+1]),h++,f--;else if(o[p]===l[m])r[m]=J(i[p],a[m]),K(t,i[p],i[h]),p--,m++;else if(void 0===c&&(c=U(l,m,f),d=U(o,h,p)),c.has(o[h]))if(c.has(o[p])){const e=d.get(l[m]),n=void 0!==e?i[e]:null;if(null===n){const e=G(t,i[h]);J(e,a[m]),r[m]=e}else r[m]=J(n,a[m]),K(t,n,i[h]),i[e]=null;m++}else Q(i[p]),p--;else Q(i[h]),h++;for(;m<=f;){const e=G(t,r[f+1]);J(e,a[m]),r[m++]=e}for(;h<=p;){const e=i[h++];null!==e&&Q(e)}X.set(t,r),Y.set(t,l)}}),ee=new WeakMap,te=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:s}=n.element;ee.has(t)||(s.cssText=n.strings.join(" "));const i=ee.get(t);for(const t in i)t in e||(-1===t.indexOf("-")?s[t]=null:s.removeProperty(t));for(const t in e)-1===t.indexOf("-")?s[t]=e[t]:s.setProperty(t,e[t]);ee.set(t,e)}),ne=new WeakMap,se=t(e=>t=>{if(!(t instanceof A))throw new Error("unsafeHTML can only be used in text bindings");const n=ne.get(t);if(void 0!==n&&N(e)&&e===n.value&&t.value===n.fragment)return;const s=document.createElement("template");s.innerHTML=e;const i=document.importNode(s.content,!0);t.setValue(i),ne.set(t,{value:e,fragment:i})}),ie=new WeakMap,oe=t((...e)=>t=>{let n=ie.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},ie.set(t,n));const s=n.values;let i=s.length;n.values=e;for(let o=0;o<e.length&&!(o>n.lastRenderedIndex);o++){const r=e[o];if(N(r)||"function"!=typeof r.then){t.setValue(r),n.lastRenderedIndex=o;break}o<i&&r===s[o]||(n.lastRenderedIndex=2147483647,i=0,Promise.resolve(r).then(e=>{const s=n.values.indexOf(r);s>-1&&s<n.lastRenderedIndex&&(n.lastRenderedIndex=s,t.setValue(e),t.commit())}))}});export default function(e,n){let s=0;const i={};let o,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(s){const i=s.committer.element;for(const s of t)if("function"==typeof s){const t=a.find(t=>t.instance===e&&t.componentAction.create===s&&t.element===i);if(t)t.props=n;else{void 0!==i.__vido__&&delete i.__vido__;const t={create:s,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:i,props:n})}}}}))}const u={state:e,api:n,html:O,svg:j,directive:t,cache:R,classMap:B,guard:q,ifDefined:z,repeat:Z,styleMap:te,unsafeHTML:se,until:oe,actions(e,t){},createComponent(e,t){const n=e.name+":"+s++,o=function(e){return{instance:e,destroy:()=>u.destroyComponent(e),update:()=>u.updateTemplate(),html:(t={})=>i[e].update(t)}}(n);const r=[];const a=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate()},onDestroy:function(e){r.push(e)},instance:n,actions:d(n)});let l,c;if("function"==typeof(l=t?e(t,a):e(a))){c={update:l,destroy:()=>{r.forEach(e=>e())}}}else{const e=c.destroy,t=()=>{r.forEach(e=>e()),e()};c=Object.assign(Object.assign({},l),{destroy:t})}return i[n]=c,o},destroyComponent(e){"function"==typeof i[e].destroy&&i[e].destroy(),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),delete i[e]},updateTemplate(){const e=++l,t=this;c.then((function(){e===l&&(t.render(),l=0)}))},createApp(e,t){r=t;const n=this.createComponent(e);return o=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);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);for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){P(i[o].update(),r),u.executeActions()}};return u}
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const R=(e,...t)=>new y(e,t,"html",C),O=(e,...t)=>new x(e,t,"svg",C);
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* 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={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(n){t[n]=e[n]&&function(t){return new Promise((function(s,o){(function(e,t,n,s){Promise.resolve(s).then((function(t){e({value:t,done:n})}),t)})(s,o,(t=e[n](t)).done,t.value)}))}}};const F=t((e,t)=>async n=>{var s,o;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=B(e);!(a=await l.next()).done;){let s=a.value;if(n.value!==e)break;0===r&&n.clear(),void 0!==t&&(s=t(s,r));let o=n.startNode;void 0!==i&&(o=f(),i.endNode=o,n.endNode.parentNode.insertBefore(o,n.endNode)),(i=new A(n.options)).insertAfterNode(o),i.setValue(s),i.commit(),r++}}catch(e){s={error:e}}finally{try{a&&!a.done&&(o=l.return)&&await o.call(l)}finally{if(s)throw s.error}}});
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/var $=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={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(n){t[n]=e[n]&&function(t){return new Promise((function(s,o){(function(e,t,n,s){Promise.resolve(s).then((function(t){e({value:t,done:n})}),t)})(s,o,(t=e[n](t)).done,t.value)}))}}};const j=t((e,t)=>async n=>{var s,o;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=$(e);!(a=await l.next()).done;){let s=a.value;if(n.value!==e)break;0===r&&(n.clear(),i.appendIntoPart(n)),void 0!==t&&(s=t(s,r)),i.setValue(s),i.commit(),r++}}catch(e){s={error:e}}finally{try{a&&!a.done&&(o=l.return)&&await o.call(l)}finally{if(s)throw s.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 s=t.value;if(s instanceof g){if(e instanceof y&&s.template===t.options.templateFactory(e))return void t.setValue(e);{let e=n.get(s.template);void 0===e&&(e={instance:s,nodes:document.createDocumentFragment()},n.set(s.template,e)),o(e.nodes,t.startNode.nextSibling,t.endNode)}}if(e instanceof y){const s=t.options.templateFactory(e),o=n.get(s);void 0!==o&&(t.setValue(o.nodes),t.commit(),t.value=o.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:s}=n;z.has(t)||(s.className=n.strings.join(" "));const{classList:o}=s,i=z.get(t);for(const t in i)t in e||o.remove(t);for(const t in e){const n=e[t];if(!i||n!==i[t]){o[n?"add":"remove"](t)}}z.set(t,e)}),J=new WeakMap,K=t((e,t)=>n=>{const s=J.get(n);if(Array.isArray(e)){if(Array.isArray(s)&&s.length===e.length&&e.every((e,t)=>e===s[t]))return}else if(s===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,s=void 0===t?e.endNode:t.startNode,o=n.insertBefore(f(),s);n.insertBefore(f(),s);const i=new A(e.options);return i.insertAfterNode(o),i},X=(e,t)=>(e.setValue(t),e.commit(),e),Y=(e,t,n)=>{const s=e.startNode.parentNode,i=n?n.startNode:e.endNode,r=t.endNode.nextSibling;r!==i&&o(s,t.startNode,r,i)},Z=e=>{i(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},ee=(e,t,n)=>{const s=new Map;for(let o=t;o<=n;o++)s.set(e[o],o);return s},te=new WeakMap,ne=new WeakMap,se=t((e,t,n)=>{let s;return void 0===n?n=t:void 0!==t&&(s=t),t=>{if(!(t instanceof A))throw new Error("repeat can only be used in text bindings");const o=te.get(t)||[],i=ne.get(t)||[],r=[],a=[],l=[];let c,d,u=0;for(const t of e)l[u]=s?s(t,u):u,a[u]=n(t,u),u++;let h=0,p=o.length-1,m=0,f=a.length-1;for(;h<=p&&m<=f;)if(null===o[h])h++;else if(null===o[p])p--;else if(i[h]===l[m])r[m]=X(o[h],a[m]),h++,m++;else if(i[p]===l[f])r[f]=X(o[p],a[f]),p--,f--;else if(i[h]===l[f])r[f]=X(o[h],a[f]),Y(t,o[h],r[f+1]),h++,f--;else if(i[p]===l[m])r[m]=X(o[p],a[m]),Y(t,o[p],o[h]),p--,m++;else if(void 0===c&&(c=ee(l,m,f),d=ee(i,h,p)),c.has(i[h]))if(c.has(i[p])){const e=d.get(l[m]),n=void 0!==e?o[e]:null;if(null===n){const e=U(t,o[h]);X(e,a[m]),r[m]=e}else r[m]=X(n,a[m]),Y(t,n,o[h]),o[e]=null;m++}else Z(o[p]),p--;else Z(o[h]),h++;for(;m<=f;){const e=U(t,r[f+1]);X(e,a[m]),r[m++]=e}for(;h<=p;){const e=o[h++];null!==e&&Z(e)}te.set(t,r),ne.set(t,l)}}),oe=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:s}=n.element;oe.has(t)||(s.cssText=n.strings.join(" "));const o=oe.get(t);for(const t in o)t in e||(-1===t.indexOf("-")?s[t]=null:s.removeProperty(t));for(const t in e)-1===t.indexOf("-")?s[t]=e[t]:s.setProperty(t,e[t]);oe.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&&w(e)&&e===n.value&&t.value===n.fragment)return;const s=document.createElement("template");s.innerHTML=e;const o=document.importNode(s.content,!0);t.setValue(o),re.set(t,{value:e,fragment:o})}),le=new WeakMap,ce=t((...e)=>t=>{let n=le.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},le.set(t,n));const s=n.values;let o=s.length;n.values=e;for(let i=0;i<e.length&&!(i>n.lastRenderedIndex);i++){const r=e[i];if(w(r)||"function"!=typeof r.then){t.setValue(r),n.lastRenderedIndex=i;break}i<o&&r===s[i]||(n.lastRenderedIndex=2147483647,o=0,Promise.resolve(r).then(e=>{const s=n.values.indexOf(r);s>-1&&s<n.lastRenderedIndex&&(n.lastRenderedIndex=s,t.setValue(e),t.commit())}))}});
/**
* @license
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/export default function(e,n){let s=0;const o={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(s){const o=s.committer.element;for(const s of t)if("function"==typeof s){const t=a.find(t=>t.instance===e&&t.componentAction.create===s&&t.element===o);if(t)t.props=n;else{void 0!==o.__vido__&&delete o.__vido__;const t={create:s,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:o,props:n})}}}}))}const u={state:e,api:n,html:R,svg:O,directive:t,asyncAppend:F,asyncReplace:j,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:se,styleMap:ie,unsafeHTML:ae,until:ce,actions(e,t){},createComponent(e,t){const n=s++,i=function(e){return{instance:e,destroy:()=>u.destroyComponent(e),update:()=>u.updateTemplate(),html:(t={})=>o[e].update(t)}}(n);const r=[];const a={destroy(){for(const e of r)e()},update:e(Object.assign(Object.assign({},u),{update:function(){u.updateTemplate()},onDestroy:function(e){r.push(e)},instance:n,actions:d(n)}),t)};return o[n]=a,i},destroyComponent(e){"function"==typeof o[e].destroy&&o[e].destroy(),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),delete o[e]},updateTemplate(){const e=++l,t=this;c.then((function(){e===l&&(t.render(),l=0)}))},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);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);for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){H(o[i].update(),r),u.executeActions()}};return u}
//# sourceMappingURL=vido.esm.min.js.map

@@ -14,3 +14,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 e=new WeakMap,t=t=>(...n)=>{const s=t(...n);return e.set(s,!0),s},n=t=>"function"==typeof t&&e.has(t),s=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,i=(e,t,n=null,s=null)=>{for(;t!==n;){const n=t.nextSibling;e.insertBefore(t,s),t=n}},o=(e,t,n=null)=>{for(;t!==n;){const n=t.nextSibling;e.removeChild(t),t=n}},r={},a={},l=`{{lit-${String(Math.random()).slice(2)}}}`,c=`\x3c!--${l}--\x3e`,d=new RegExp(`${l}|${c}`),u="$lit$";class h{constructor(e,t){this.parts=[],this.element=t;const n=[],s=[],i=document.createTreeWalker(t.content,133,null,!1);let o=0,r=-1,a=0;const{strings:c,values:{length:h}}=e;for(;a<h;){const e=i.nextNode();if(null!==e){if(r++,1===e.nodeType){if(e.hasAttributes()){const t=e.attributes,{length:n}=t;let s=0;for(let e=0;e<n;e++)p(t[e].name,u)&&s++;for(;s-- >0;){const t=c[a],n=g.exec(t)[2],s=n.toLowerCase()+u,i=e.getAttribute(s);e.removeAttribute(s);const o=i.split(d);this.parts.push({type:"attribute",index:r,name:n,strings:o}),a+=o.length-1}}"TEMPLATE"===e.tagName&&(s.push(e),i.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(l)>=0){const s=e.parentNode,i=t.split(d),o=i.length-1;for(let t=0;t<o;t++){let n,o=i[t];if(""===o)n=f();else{const e=g.exec(o);null!==e&&p(e[2],u)&&(o=o.slice(0,e.index)+e[1]+e[2].slice(0,-u.length)+e[3]),n=document.createTextNode(o)}s.insertBefore(n,e),this.parts.push({type:"node",index:++r})}""===i[o]?(s.insertBefore(f(),e),n.push(e)):e.data=i[o],a+=o}}else if(8===e.nodeType)if(e.data===l){const t=e.parentNode;null!==e.previousSibling&&r!==o||(r++,t.insertBefore(f(),e)),o=r,this.parts.push({type:"node",index:r}),null===e.nextSibling?e.data="":(n.push(e),r--),a++}else{let t=-1;for(;-1!==(t=e.data.indexOf(l,t+1));)this.parts.push({type:"node",index:-1}),a++}}else i.currentNode=s.pop()}for(const e of n)e.parentNode.removeChild(e)}}const p=(e,t)=>{const n=e.length-t.length;return n>=0&&e.slice(n)===t},m=e=>-1!==e.index,f=()=>document.createComment(""),g=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;
*/const e=new WeakMap,t=t=>(...n)=>{const s=t(...n);return e.set(s,!0),s},n=t=>"function"==typeof t&&e.has(t),s=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,o=(e,t,n=null,s=null)=>{for(;t!==n;){const n=t.nextSibling;e.insertBefore(t,s),t=n}},i=(e,t,n=null)=>{for(;t!==n;){const n=t.nextSibling;e.removeChild(t),t=n}},r={},a={},l=`{{lit-${String(Math.random()).slice(2)}}}`,c=`\x3c!--${l}--\x3e`,d=new RegExp(`${l}|${c}`),u="$lit$";class p{constructor(e,t){this.parts=[],this.element=t;const n=[],s=[],o=document.createTreeWalker(t.content,133,null,!1);let i=0,r=-1,a=0;const{strings:c,values:{length:p}}=e;for(;a<p;){const e=o.nextNode();if(null!==e){if(r++,1===e.nodeType){if(e.hasAttributes()){const t=e.attributes,{length:n}=t;let s=0;for(let e=0;e<n;e++)h(t[e].name,u)&&s++;for(;s-- >0;){const t=c[a],n=v.exec(t)[2],s=n.toLowerCase()+u,o=e.getAttribute(s);e.removeAttribute(s);const i=o.split(d);this.parts.push({type:"attribute",index:r,name:n,strings:i}),a+=i.length-1}}"TEMPLATE"===e.tagName&&(s.push(e),o.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(l)>=0){const s=e.parentNode,o=t.split(d),i=o.length-1;for(let t=0;t<i;t++){let n,i=o[t];if(""===i)n=f();else{const e=v.exec(i);null!==e&&h(e[2],u)&&(i=i.slice(0,e.index)+e[1]+e[2].slice(0,-u.length)+e[3]),n=document.createTextNode(i)}s.insertBefore(n,e),this.parts.push({type:"node",index:++r})}""===o[i]?(s.insertBefore(f(),e),n.push(e)):e.data=o[i],a+=i}}else if(8===e.nodeType)if(e.data===l){const t=e.parentNode;null!==e.previousSibling&&r!==i||(r++,t.insertBefore(f(),e)),i=r,this.parts.push({type:"node",index:r}),null===e.nextSibling?e.data="":(n.push(e),r--),a++}else{let t=-1;for(;-1!==(t=e.data.indexOf(l,t+1));)this.parts.push({type:"node",index:-1}),a++}}else o.currentNode=s.pop()}for(const e of n)e.parentNode.removeChild(e)}}const h=(e,t)=>{const n=e.length-t.length;return n>=0&&e.slice(n)===t},m=e=>-1!==e.index,f=()=>document.createComment(""),v=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;
/**

@@ -29,3 +29,3 @@ * @license

*/
class v{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this.options=n}update(e){let t=0;for(const n of this.__parts)void 0!==n&&n.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=s?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],n=this.template.parts,i=document.createTreeWalker(e,133,null,!1);let o,r=0,a=0,l=i.nextNode();for(;r<n.length;)if(o=n[r],m(o)){for(;a<o.index;)a++,"TEMPLATE"===l.nodeName&&(t.push(l),i.currentNode=l.content),null===(l=i.nextNode())&&(i.currentNode=t.pop(),l=i.nextNode());if("node"===o.type){const e=this.processor.handleTextExpression(this.options);e.insertAfterNode(l.previousSibling),this.__parts.push(e)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,o.name,o.strings,this.options));r++}else this.__parts.push(void 0),r++;return s&&(document.adoptNode(e),customElements.upgrade(e)),e}}
class g{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this.options=n}update(e){let t=0;for(const n of this.__parts)void 0!==n&&n.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=s?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],n=this.template.parts,o=document.createTreeWalker(e,133,null,!1);let i,r=0,a=0,l=o.nextNode();for(;r<n.length;)if(i=n[r],m(i)){for(;a<i.index;)a++,"TEMPLATE"===l.nodeName&&(t.push(l),o.currentNode=l.content),null===(l=o.nextNode())&&(o.currentNode=t.pop(),l=o.nextNode());if("node"===i.type){const e=this.processor.handleTextExpression(this.options);e.insertAfterNode(l.previousSibling),this.__parts.push(e)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,i.name,i.strings,this.options));r++}else this.__parts.push(void 0),r++;return s&&(document.adoptNode(e),customElements.upgrade(e)),e}}
/**

@@ -43,3 +43,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/const _=` ${l} `;class y{constructor(e,t,n,s){this.strings=e,this.values=t,this.type=n,this.processor=s}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let s=0;s<e;s++){const e=this.strings[s],i=e.lastIndexOf("\x3c!--");n=(i>-1||n)&&-1===e.indexOf("--\x3e",i+1);const o=g.exec(e);t+=null===o?e+(n?_:c):e.substr(0,o.index)+o[1]+o[2]+u+o[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),i(t,n.firstChild),e}}
*/const _=` ${l} `;class y{constructor(e,t,n,s){this.strings=e,this.values=t,this.type=n,this.processor=s}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let s=0;s<e;s++){const e=this.strings[s],o=e.lastIndexOf("\x3c!--");n=(o>-1||n)&&-1===e.indexOf("--\x3e",o+1);const i=v.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),o(t,n.firstChild),e}}
/**

@@ -57,3 +57,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/const N=e=>null===e||!("object"==typeof e||"function"==typeof e),w=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class b{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 s=0;s<t;s++){n+=e[s];const t=this.parts[s];if(void 0!==t){const e=t.value;if(N(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||N(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&&(N(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),s=n._clone();n.update(e.values),this.__commitNode(s),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,s=0;for(const i of e)void 0===(n=t[s])&&(n=new A(this.options),t.push(n),0===s?n.appendIntoPart(this):n.insertAfterPart(t[s-1])),n.setValue(i),n.commit(),s++;s<t.length&&(t.length=s,this.clear(n&&n.endNode))}clear(e=this.startNode){o(this.startNode.parentNode,e.nextSibling,this.endNode)}}class T{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 E extends b{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 k{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,s=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=null!=e&&(null==t||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=C(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 C=e=>e&&(S?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);
*/const w=e=>null===e||!("object"==typeof e||"function"==typeof e),N=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class b{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 s=0;s<t;s++){n+=e[s];const t=this.parts[s];if(void 0!==t){const e=t.value;if(w(e)||!N(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||w(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&&(w(e)?e!==this.value&&this.__commitText(e):e instanceof y?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):N(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 g&&this.value.template===t)this.value.update(e.values);else{const n=new g(t,e.processor,this.options),s=n._clone();n.update(e.values),this.__commitNode(s),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,s=0;for(const o of e)void 0===(n=t[s])&&(n=new A(this.options),t.push(n),0===s?n.appendIntoPart(this):n.insertAfterPart(t[s-1])),n.setValue(o),n.commit(),s++;s<t.length&&(t.length=s,this.clear(n&&n.endNode))}clear(e=this.startNode){i(this.startNode.parentNode,e.nextSibling,this.endNode)}}class T{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 E extends b{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 I{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,s=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),o=null!=e&&(null==t||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),o&&(this.__options=k(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 k=e=>e&&(S?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);
/**

@@ -71,3 +71,3 @@ * @license

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

@@ -85,3 +85,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/function W(e){let t=H.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},H.set(e.type,t));let n=t.stringsArray.get(e.strings);if(void 0!==n)return n;const s=e.strings.join(l);return void 0===(n=t.keyString.get(s))&&(n=new h(e,e.getTemplateElement()),t.keyString.set(s,n)),t.stringsArray.set(e.strings,n),n}const H=new Map,I=new WeakMap,P=(e,t,n)=>{let s=I.get(t);void 0===s&&(o(t,t.firstChild),I.set(t,s=new A(Object.assign({templateFactory:W},n))),s.appendInto(t)),s.setValue(e),s.commit()};
*/function P(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 s=e.strings.join(l);return void 0===(n=t.keyString.get(s))&&(n=new p(e,e.getTemplateElement()),t.keyString.set(s,n)),t.stringsArray.set(e.strings,n),n}const L=new Map,W=new WeakMap,H=(e,t,n)=>{let s=W.get(t);void 0===s&&(i(t,t.firstChild),W.set(t,s=new A(Object.assign({templateFactory:P},n))),s.appendInto(t)),s.setValue(e),s.commit()};
/**

@@ -113,3 +113,43 @@ * @license

*/
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const O=(e,...t)=>new y(e,t,"html",L),j=(e,...t)=>new x(e,t,"svg",L),F=new WeakMap,R=t(e=>t=>{if(!(t instanceof A))throw new Error("cache can only be used in text bindings");let n=F.get(t);void 0===n&&(n=new WeakMap,F.set(t,n));const s=t.value;if(s instanceof v){if(e instanceof y&&s.template===t.options.templateFactory(e))return void t.setValue(e);{let e=n.get(s.template);void 0===e&&(e={instance:s,nodes:document.createDocumentFragment()},n.set(s.template,e)),i(e.nodes,t.startNode.nextSibling,t.endNode)}}if(e instanceof y){const s=t.options.templateFactory(e),i=n.get(s);void 0!==i&&(t.setValue(i.nodes),t.commit(),t.value=i.instance)}t.setValue(e)}),$=new WeakMap,B=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:s}=n;$.has(t)||(s.className=n.strings.join(" "));const{classList:i}=s,o=$.get(t);for(const t in o)t in e||i.remove(t);for(const t in e){const n=e[t];if(!o||n!==o[t]){i[n?"add":"remove"](t)}}$.set(t,e)}),D=new WeakMap,q=t((e,t)=>n=>{const s=D.get(n);if(Array.isArray(e)){if(Array.isArray(s)&&s.length===e.length&&e.every((e,t)=>e===s[t]))return}else if(s===e&&(void 0!==e||D.has(n)))return;n.setValue(t()),D.set(n,Array.isArray(e)?Array.from(e):e)}),z=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)}),G=(e,t)=>{const n=e.startNode.parentNode,s=void 0===t?e.endNode:t.startNode,i=n.insertBefore(f(),s);n.insertBefore(f(),s);const o=new A(e.options);return o.insertAfterNode(i),o},J=(e,t)=>(e.setValue(t),e.commit(),e),K=(e,t,n)=>{const s=e.startNode.parentNode,o=n?n.startNode:e.endNode,r=t.endNode.nextSibling;r!==o&&i(s,t.startNode,r,o)},Q=e=>{o(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},U=(e,t,n)=>{const s=new Map;for(let i=t;i<=n;i++)s.set(e[i],i);return s},X=new WeakMap,Y=new WeakMap,Z=t((e,t,n)=>{let s;return void 0===n?n=t:void 0!==t&&(s=t),t=>{if(!(t instanceof A))throw new Error("repeat can only be used in text bindings");const i=X.get(t)||[],o=Y.get(t)||[],r=[],a=[],l=[];let c,d,u=0;for(const t of e)l[u]=s?s(t,u):u,a[u]=n(t,u),u++;let h=0,p=i.length-1,m=0,f=a.length-1;for(;h<=p&&m<=f;)if(null===i[h])h++;else if(null===i[p])p--;else if(o[h]===l[m])r[m]=J(i[h],a[m]),h++,m++;else if(o[p]===l[f])r[f]=J(i[p],a[f]),p--,f--;else if(o[h]===l[f])r[f]=J(i[h],a[f]),K(t,i[h],r[f+1]),h++,f--;else if(o[p]===l[m])r[m]=J(i[p],a[m]),K(t,i[p],i[h]),p--,m++;else if(void 0===c&&(c=U(l,m,f),d=U(o,h,p)),c.has(o[h]))if(c.has(o[p])){const e=d.get(l[m]),n=void 0!==e?i[e]:null;if(null===n){const e=G(t,i[h]);J(e,a[m]),r[m]=e}else r[m]=J(n,a[m]),K(t,n,i[h]),i[e]=null;m++}else Q(i[p]),p--;else Q(i[h]),h++;for(;m<=f;){const e=G(t,r[f+1]);J(e,a[m]),r[m++]=e}for(;h<=p;){const e=i[h++];null!==e&&Q(e)}X.set(t,r),Y.set(t,l)}}),ee=new WeakMap,te=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:s}=n.element;ee.has(t)||(s.cssText=n.strings.join(" "));const i=ee.get(t);for(const t in i)t in e||(-1===t.indexOf("-")?s[t]=null:s.removeProperty(t));for(const t in e)-1===t.indexOf("-")?s[t]=e[t]:s.setProperty(t,e[t]);ee.set(t,e)}),ne=new WeakMap,se=t(e=>t=>{if(!(t instanceof A))throw new Error("unsafeHTML can only be used in text bindings");const n=ne.get(t);if(void 0!==n&&N(e)&&e===n.value&&t.value===n.fragment)return;const s=document.createElement("template");s.innerHTML=e;const i=document.importNode(s.content,!0);t.setValue(i),ne.set(t,{value:e,fragment:i})}),ie=new WeakMap,oe=t((...e)=>t=>{let n=ie.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},ie.set(t,n));const s=n.values;let i=s.length;n.values=e;for(let o=0;o<e.length&&!(o>n.lastRenderedIndex);o++){const r=e[o];if(N(r)||"function"!=typeof r.then){t.setValue(r),n.lastRenderedIndex=o;break}o<i&&r===s[o]||(n.lastRenderedIndex=2147483647,i=0,Promise.resolve(r).then(e=>{const s=n.values.indexOf(r);s>-1&&s<n.lastRenderedIndex&&(n.lastRenderedIndex=s,t.setValue(e),t.commit())}))}});return function(e,n){let s=0;const i={};let o,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(s){const i=s.committer.element;for(const s of t)if("function"==typeof s){const t=a.find(t=>t.instance===e&&t.componentAction.create===s&&t.element===i);if(t)t.props=n;else{void 0!==i.__vido__&&delete i.__vido__;const t={create:s,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:i,props:n})}}}}))}const u={state:e,api:n,html:O,svg:j,directive:t,cache:R,classMap:B,guard:q,ifDefined:z,repeat:Z,styleMap:te,unsafeHTML:se,until:oe,actions(e,t){},createComponent(e,t){const n=e.name+":"+s++,o=function(e){return{instance:e,destroy:()=>u.destroyComponent(e),update:()=>u.updateTemplate(),html:(t={})=>i[e].update(t)}}(n);const r=[];const a=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate()},onDestroy:function(e){r.push(e)},instance:n,actions:d(n)});let l,c;if("function"==typeof(l=t?e(t,a):e(a))){c={update:l,destroy:()=>{r.forEach(e=>e())}}}else{const e=c.destroy,t=()=>{r.forEach(e=>e()),e()};c=Object.assign(Object.assign({},l),{destroy:t})}return i[n]=c,o},destroyComponent(e){"function"==typeof i[e].destroy&&i[e].destroy(),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),delete i[e]},updateTemplate(){const e=++l,t=this;c.then((function(){e===l&&(t.render(),l=0)}))},createApp(e,t){r=t;const n=this.createComponent(e);return o=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);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);for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){P(i[o].update(),r),u.executeActions()}};return u}}));
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const R=(e,...t)=>new y(e,t,"html",C),O=(e,...t)=>new x(e,t,"svg",C);
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* 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={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(n){t[n]=e[n]&&function(t){return new Promise((function(s,o){(function(e,t,n,s){Promise.resolve(s).then((function(t){e({value:t,done:n})}),t)})(s,o,(t=e[n](t)).done,t.value)}))}}};const F=t((e,t)=>async n=>{var s,o;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=B(e);!(a=await l.next()).done;){let s=a.value;if(n.value!==e)break;0===r&&n.clear(),void 0!==t&&(s=t(s,r));let o=n.startNode;void 0!==i&&(o=f(),i.endNode=o,n.endNode.parentNode.insertBefore(o,n.endNode)),(i=new A(n.options)).insertAfterNode(o),i.setValue(s),i.commit(),r++}}catch(e){s={error:e}}finally{try{a&&!a.done&&(o=l.return)&&await o.call(l)}finally{if(s)throw s.error}}});
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/var $=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={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(n){t[n]=e[n]&&function(t){return new Promise((function(s,o){(function(e,t,n,s){Promise.resolve(s).then((function(t){e({value:t,done:n})}),t)})(s,o,(t=e[n](t)).done,t.value)}))}}};const j=t((e,t)=>async n=>{var s,o;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=$(e);!(a=await l.next()).done;){let s=a.value;if(n.value!==e)break;0===r&&(n.clear(),i.appendIntoPart(n)),void 0!==t&&(s=t(s,r)),i.setValue(s),i.commit(),r++}}catch(e){s={error:e}}finally{try{a&&!a.done&&(o=l.return)&&await o.call(l)}finally{if(s)throw s.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 s=t.value;if(s instanceof g){if(e instanceof y&&s.template===t.options.templateFactory(e))return void t.setValue(e);{let e=n.get(s.template);void 0===e&&(e={instance:s,nodes:document.createDocumentFragment()},n.set(s.template,e)),o(e.nodes,t.startNode.nextSibling,t.endNode)}}if(e instanceof y){const s=t.options.templateFactory(e),o=n.get(s);void 0!==o&&(t.setValue(o.nodes),t.commit(),t.value=o.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:s}=n;z.has(t)||(s.className=n.strings.join(" "));const{classList:o}=s,i=z.get(t);for(const t in i)t in e||o.remove(t);for(const t in e){const n=e[t];if(!i||n!==i[t]){o[n?"add":"remove"](t)}}z.set(t,e)}),J=new WeakMap,K=t((e,t)=>n=>{const s=J.get(n);if(Array.isArray(e)){if(Array.isArray(s)&&s.length===e.length&&e.every((e,t)=>e===s[t]))return}else if(s===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,s=void 0===t?e.endNode:t.startNode,o=n.insertBefore(f(),s);n.insertBefore(f(),s);const i=new A(e.options);return i.insertAfterNode(o),i},X=(e,t)=>(e.setValue(t),e.commit(),e),Y=(e,t,n)=>{const s=e.startNode.parentNode,i=n?n.startNode:e.endNode,r=t.endNode.nextSibling;r!==i&&o(s,t.startNode,r,i)},Z=e=>{i(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},ee=(e,t,n)=>{const s=new Map;for(let o=t;o<=n;o++)s.set(e[o],o);return s},te=new WeakMap,ne=new WeakMap,se=t((e,t,n)=>{let s;return void 0===n?n=t:void 0!==t&&(s=t),t=>{if(!(t instanceof A))throw new Error("repeat can only be used in text bindings");const o=te.get(t)||[],i=ne.get(t)||[],r=[],a=[],l=[];let c,d,u=0;for(const t of e)l[u]=s?s(t,u):u,a[u]=n(t,u),u++;let p=0,h=o.length-1,m=0,f=a.length-1;for(;p<=h&&m<=f;)if(null===o[p])p++;else if(null===o[h])h--;else if(i[p]===l[m])r[m]=X(o[p],a[m]),p++,m++;else if(i[h]===l[f])r[f]=X(o[h],a[f]),h--,f--;else if(i[p]===l[f])r[f]=X(o[p],a[f]),Y(t,o[p],r[f+1]),p++,f--;else if(i[h]===l[m])r[m]=X(o[h],a[m]),Y(t,o[h],o[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?o[e]:null;if(null===n){const e=U(t,o[p]);X(e,a[m]),r[m]=e}else r[m]=X(n,a[m]),Y(t,n,o[p]),o[e]=null;m++}else Z(o[h]),h--;else Z(o[p]),p++;for(;m<=f;){const e=U(t,r[f+1]);X(e,a[m]),r[m++]=e}for(;p<=h;){const e=o[p++];null!==e&&Z(e)}te.set(t,r),ne.set(t,l)}}),oe=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:s}=n.element;oe.has(t)||(s.cssText=n.strings.join(" "));const o=oe.get(t);for(const t in o)t in e||(-1===t.indexOf("-")?s[t]=null:s.removeProperty(t));for(const t in e)-1===t.indexOf("-")?s[t]=e[t]:s.setProperty(t,e[t]);oe.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&&w(e)&&e===n.value&&t.value===n.fragment)return;const s=document.createElement("template");s.innerHTML=e;const o=document.importNode(s.content,!0);t.setValue(o),re.set(t,{value:e,fragment:o})}),le=new WeakMap,ce=t((...e)=>t=>{let n=le.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},le.set(t,n));const s=n.values;let o=s.length;n.values=e;for(let i=0;i<e.length&&!(i>n.lastRenderedIndex);i++){const r=e[i];if(w(r)||"function"!=typeof r.then){t.setValue(r),n.lastRenderedIndex=i;break}i<o&&r===s[i]||(n.lastRenderedIndex=2147483647,o=0,Promise.resolve(r).then(e=>{const s=n.values.indexOf(r);s>-1&&s<n.lastRenderedIndex&&(n.lastRenderedIndex=s,t.setValue(e),t.commit())}))}});
/**
* @license
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/return function(e,n){let s=0;const o={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(s){const o=s.committer.element;for(const s of t)if("function"==typeof s){const t=a.find(t=>t.instance===e&&t.componentAction.create===s&&t.element===o);if(t)t.props=n;else{void 0!==o.__vido__&&delete o.__vido__;const t={create:s,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:o,props:n})}}}}))}const u={state:e,api:n,html:R,svg:O,directive:t,asyncAppend:F,asyncReplace:j,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:se,styleMap:ie,unsafeHTML:ae,until:ce,actions(e,t){},createComponent(e,t){const n=s++,i=function(e){return{instance:e,destroy:()=>u.destroyComponent(e),update:()=>u.updateTemplate(),html:(t={})=>o[e].update(t)}}(n);const r=[];const a={destroy(){for(const e of r)e()},update:e(Object.assign(Object.assign({},u),{update:function(){u.updateTemplate()},onDestroy:function(e){r.push(e)},instance:n,actions:d(n)}),t)};return o[n]=a,i},destroyComponent(e){"function"==typeof o[e].destroy&&o[e].destroy(),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),delete o[e]},updateTemplate(){const e=++l,t=this;c.then((function(){e===l&&(t.render(),l=0)}))},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);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);for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){H(o[i].update(),r),u.executeActions()}};return u}}));
//# sourceMappingURL=vido.min.js.map
import { render, html, directive, svg } from 'lit-html';
//import { asyncAppend } from 'lit-html/directives/async-append';
//import { asyncReplace } from 'lit-html/directives/async-replace';
import { asyncAppend } from 'lit-html/directives/async-append';
import { asyncReplace } from 'lit-html/directives/async-replace';
import { cache } from 'lit-html/directives/cache';

@@ -52,4 +52,4 @@ import { classMap } from 'lit-html/directives/class-map';

directive,
//asyncAppend,
//asyncReplace,
asyncAppend,
asyncReplace,
cache,

@@ -66,4 +66,4 @@ classMap,

createComponent(component, props) {
const instance = component.name + ':' + componentId++;
const componentInstance = getComponentInstance(instance);
const instance = componentId++;
const componentInstanceMethods = getComponentInstanceMethods(instance);
function update() {

@@ -77,23 +77,12 @@ vido.updateTemplate();

const vidoInstance = { ...vido, update, onDestroy, instance, actions: getActions(instance) };
let firstMethods, methods;
if (props) {
firstMethods = component(props, vidoInstance);
} else {
firstMethods = component(vidoInstance);
}
if (typeof firstMethods === 'function') {
const destroy = () => {
destroyable.forEach(d => d());
};
methods = { update: firstMethods, destroy };
} else {
const originalDestroy = methods.destroy;
const destroy = () => {
destroyable.forEach(d => d());
originalDestroy();
};
methods = { ...firstMethods, destroy };
}
const methods = {
destroy() {
for (const d of destroyable) {
d();
}
},
update: component(vidoInstance, props)
};
components[instance] = methods;
return componentInstance;
return componentInstanceMethods;
},

@@ -165,3 +154,3 @@

function getComponentInstance(instance) {
function getComponentInstanceMethods(instance) {
return {

@@ -168,0 +157,0 @@ instance,

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