!function(){"use strict";let e=1;const t=e=>Math.round(1e3*Math.random())%e,n=n=>{const r=["pretty","large","big","small","tall","short","long","handsome","plain","quaint","clean","elegant","easy","angry","crazy","helpful","mushy","odd","unsightly","adorable","important","inexpensive","cheap","expensive","fancy"],a=["red","yellow","blue","green","pink","brown","purple","brown","white","black","orange"],o=["table","chair","house","bbq","desk","car","pony","cookie","sandwich","burger","pizza","mouse","keyboard"],s=new Array(n);for(let l=0;l<n;l++)s[l]={id:e++,label:r[t(r.length)]+" "+a[t(a.length)]+" "+o[t(o.length)]};return s},r=(e,t,n)=>{n[t]={...e,label:e.label+" !!!"}},a=e=>{e.label+=" !!!"};var o=WeakMap,s=(...e)=>e
/*! (c) Andrea Giammarchi - ISC */,l={};l.CustomEvent="function"==typeof CustomEvent?CustomEvent:function(e){return t.prototype=new t("").constructor.prototype,t;function t(e,t){t||(t={});var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!!t.bubbles,!!t.cancelable,t.detail),n}}();var c=l.CustomEvent,i=WeakSet;var u="function"==typeof cancelAnimationFrame,d=u?cancelAnimationFrame:clearTimeout,f=u?requestAnimationFrame:setTimeout;var p=e=>({get:t=>e.get(t),set:(t,n)=>(e.set(t,n),n)})
/*! (c) Andrea Giammarchi - ISC */;let h=null;const v=p(new WeakMap),m=(e,t,n)=>{e.apply(t,n)},y={async:!1,always:!1},g=(e,t,n,r)=>{const a=h.i++,{hook:o,args:s,stack:l,length:c}=h;a===c&&(h.length=l.push({}));const i=l[a];if(i.args=s,a===c){const a="function"==typeof n,{async:s,always:l}=(a?r:n)||r||y;i.$=a?n(t):((e,t)=>"function"==typeof t?t(e):t)(void 0,t),i._=s?v.get(o)||v.set(o,function(e){var t,n,r,a,o;return l(),function(e,l,i){return r=e,a=l,o=i,n||(n=f(s)),--t<0&&c(!0),c};function s(){l(),r.apply(a,o||[])}function l(){t=e||1/0,n=u?0:null}function c(e){var t=!!n;return t&&(d(n),e&&s()),t}}()):m,i.f=t=>{const n=e(i.$,t);(l||i.$!==n)&&(i.$=n,i._(o,null,i.args))}}return[i.$,i.f]},b=new WeakMap,w=e=>{(b.get(e)||[]).forEach(e=>{const{clean:t,stop:n}=e;n(),t&&(e.clean=null,t())})},x=b.has.bind(b),k=(e,t)=>{const n=h.i++,{stack:r,length:a}=h;return n===a?h.length=r.push({$:e(),_:t}):t&&!t.some(C,r[n]._)||(r[n]={$:e(),_:t}),r[n].$},N=(e,t)=>k(()=>e,t);function C(e,t){return e!==this[t]}
/*! (c) Andrea Giammarchi - ISC */const E=
/*! (c) Andrea Giammarchi */
function(e){var t=e.Event,n=e.WeakSet,r=!0,a=null;return function(e){return r&&(r=!r,a=new n,function(e){var r=new n,o=new n;try{new MutationObserver(i).observe(e,{subtree:!0,childList:!0})}catch(t){var s=0,l=[],c=function(e){l.push(e),clearTimeout(s),s=setTimeout((function(){i(l.splice(s=0,l.length))}),0)};e.addEventListener("DOMNodeRemoved",(function(e){c({addedNodes:[],removedNodes:[e.target]})}),!0),e.addEventListener("DOMNodeInserted",(function(e){c({addedNodes:[e.target],removedNodes:[]})}),!0)}function i(e){for(var t,n=e.length,a=0;a<n;a++)u((t=e[a]).removedNodes,"disconnected",o,r),u(t.addedNodes,"connected",r,o)}function u(e,n,r,a){for(var o,s=new t(n),l=e.length,c=0;c<l;1===(o=e[c++]).nodeType&&d(o,s,n,r,a));}function d(e,t,n,r,o){a.has(e)&&!r.has(e)&&(o.delete(e),r.add(e),e.dispatchEvent(t));for(var s=e.children||[],l=s.length,c=0;c<l;d(s[c++],t,n,r,o));}}(e.ownerDocument)),a.add(e),e}}({Event:c,WeakSet:i}),$=(e,t)=>{const{nodeType:n}=e;if(n){const r=1===n?e:(e=>{let{firstChild:t}=e;for(;t&&1!==t.nodeType;)t=t.nextSibling;if(t)return t;throw"unobservable"})(e);E(r),r.addEventListener("disconnected",t,!1)}else{const n=e.valueOf();n!==e&&$(n,t)}},A=e=>{let t=null;const n=(e=>{const t=[];return function n(){const r=h,a=[];h={hook:n,args:arguments,stack:t,i:0,length:t.length,after:a};try{return e.apply(null,arguments)}finally{h=r;for(let e=0,{length:t}=a;e<t;e++)a[e]()}}})(e);return function(){const e=n.apply(this,arguments);return x(n)&&$(e,t||(t=w.bind(null,n))),e}},{isArray:T}=Array,{indexOf:O,slice:S}=[];
/*! (c) Andrea Giammarchi - ISC */
var L,j="-"+Math.random().toFixed(6)+"%",M=!1;try{"content"in(L=document.createElement("template"))&&(L.innerHTML='<p tabindex="'+j+'"></p>',L.content.childNodes[0].getAttribute("tabindex")==j)||(j="_dt: "+j.slice(1,-1)+";",M=!0)}catch(e){}var R="\x3c!--"+j+"--\x3e",_=/^(?:plaintext|script|style|textarea|title|xmp)$/i,z=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;
/*! (c) Andrea Giammarchi - ISC */
function D(e){return e.join(R).replace(B,U).replace(H,V)}var I=" \\f\\n\\r\\t",W="[^"+I+"\\/>\"'=]+",q="["+I+"]+"+W,F="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",Z="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+W.replace("\\/","")+"))?)",H=new RegExp(F+q+Z+"+)(["+I+"]*/?>)","g"),B=new RegExp(F+q+Z+"*)(["+I+"]*/>)","g"),G=new RegExp("("+q+"\\s*=\\s*)(['\"]?)"+R+"\\2","gi");function V(e,t,n,r){return"<"+t+n.replace(G,P)+r}function P(e,t,n){return t+(n||'"')+j+(n||'"')}function U(e,t,n){return z.test(t)?e:"<"+t+n+"></"+t+">"}const J=(e,t)=>111===e.nodeType?1/t<0?t?(({firstChild:e,lastChild:t})=>{const n=document.createRange();return n.setStartAfter(e),n.setEndAfter(t),n.deleteContents(),e})(e):e.lastChild:t?e.valueOf():e.firstChild:e,K=e=>{const{childNodes:t}=e,{length:n}=t;if(n<2)return n?t[0]:e;const r=S.call(t,0);return{ELEMENT_NODE:1,nodeType:111,firstChild:r[0],lastChild:r[n-1],valueOf(){if(t.length!==n){let t=0;for(;t<n;)e.appendChild(r[t++])}return e}}},Q=e=>document.createElementNS("http://www.w3.org/1999/xhtml",e),X=(e,t)=>("svg"===t?ee:Y)(e),Y=e=>{const t=Q("template");return t.innerHTML=e,t.content},ee=e=>{const{content:t}=Q("template"),n=Q("div");n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e+"</svg>";const{childNodes:r}=n.firstChild;let{length:a}=r;for(;a--;)t.appendChild(r[0]);return t},te=(e,t,n,r,a,o)=>{const s="selectedIndex"in t;let l=s;for(;r<a;){const a=e(n[r],1);if(t.insertBefore(a,o),s&&l&&a.selected){l=!l;let{selectedIndex:e}=t;t.selectedIndex=e<0?r:O.call(t.querySelectorAll("option"),a)}r++}},ne=(e,t)=>e==t,re=e=>e,ae=(e,t,n,r,a,o,s)=>{const l=o-a;if(l<1)return-1;for(;n-t>=l;){let l=t,c=a;for(;l<n&&c<o&&s(e[l],r[c]);)l++,c++;if(c===o)return t;t=l+1}return-1},oe=(e,t,n,r,a)=>n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:a,se=(e,t,n,r)=>{for(;n<r;)ie(e(t[n++],-1))},le=(e,t,n)=>{let r=1,a=t;for(;r<a;){const t=(r+a)/2>>>0;n<e[t]?a=t:r=t+1}return r},ce=(e,t,n,r,a,o,s,l,c,i,u,d,f)=>{((e,t,n,r,a,o,s,l,c)=>{const i=[],u=e.length;let d=s,f=0;for(;f<u;)switch(e[f++]){case 0:a++,d++;break;case 1:i.push(r[a]),te(t,n,r,a++,a,d<l?t(o[d],0):c);break;case-1:d++}for(f=0;f<u;)switch(e[f++]){case 0:s++;break;case-1:-1<i.indexOf(o[s])?s++:se(t,o,s++,s)}})(((e,t,n,r,a,o,s)=>{const l=n+o,c=[];let i,u,d,f,p,h,v;e:for(i=0;i<=l;i++){if(i>50)return null;for(v=i-1,p=i?c[i-1]:[0,0],h=c[i]=[],u=-i;u<=i;u+=2){for(f=u===-i||u!==i&&p[v+u-1]<p[v+u+1]?p[v+u+1]:p[v+u-1]+1,d=f-u;f<o&&d<n&&s(r[a+f],e[t+d]);)f++,d++;if(f===o&&d===n)break e;h[i+u]=f}}const m=Array(i/2+l/2);let y=m.length-1;for(i=c.length-1;i>=0;i--){for(;f>0&&d>0&&s(r[a+f-1],e[t+d-1]);)m[y--]=0,f--,d--;if(!i)break;v=i-1,p=i?c[i-1]:[0,0],u=f-d,u===-i||u!==i&&p[v+u-1]<p[v+u+1]?(d--,m[y--]=1):(f--,m[y--]=-1)}return m})(n,r,o,s,l,i,d)||((e,t,n,r,a,o,s,l)=>{let c=0,i=r<l?r:l;const u=Array(i++),d=Array(i);d[0]=-1;for(let e=1;e<i;e++)d[e]=s;const f=a.slice(o,s);for(let r=t;r<n;r++){const t=f.indexOf(e[r]);if(-1<t){const e=t+o;c=le(d,i,e),-1<c&&(d[c]=e,u[c]={newi:r,oldi:e,prev:u[c-1]})}}for(c=--i,--s;d[c]>s;)--c;i=l+r-c;const p=Array(i);let h=u[c];for(--n;h;){const{newi:e,oldi:t}=h;for(;n>e;)p[--i]=1,--n;for(;s>t;)p[--i]=-1,--s;p[--i]=0,--n,--s,h=h.prev}for(;n>=t;)p[--i]=1,--n;for(;s>=o;)p[--i]=-1,--s;return p})(n,r,a,o,s,l,c,i),e,t,n,r,s,l,u,f)},ie=e=>(e.remove||ue).call(e);function ue(){const{parentNode:e}=this;e&&e.removeChild(this)}
/*! (c) 2018 Andrea Giammarchi (ISC) */const de=(e,t,n,r)=>{r||(r={});const a=r.compare||ne,o=r.node||re,s=null==r.before?null:o(r.before,0),l=t.length;let c=l,i=0,u=n.length,d=0;for(;i<c&&d<u&&a(t[i],n[d]);)i++,d++;for(;i<c&&d<u&&a(t[c-1],n[u-1]);)c--,u--;const f=i===c,p=d===u;if(f&&p)return n;if(f&&d<u)return te(o,e,n,d,u,oe(o,t,i,l,s)),n;if(p&&i<c)return se(o,t,i,c),n;const h=c-i,v=u-d;let m=-1;if(h<v){if(m=ae(n,d,u,t,i,c,a),-1<m)return te(o,e,n,d,m,o(t[i],0)),te(o,e,n,m+h,u,oe(o,t,c,l,s)),n}else if(v<h&&(m=ae(t,i,c,n,d,u,a),-1<m))return se(o,t,i,m),se(o,t,m+v,c),n;return h<2||v<2?(te(o,e,n,d,u,o(t[i],0)),se(o,t,i,c),n):h===v&&((e,t,n,r,a,o)=>{for(;r<a&&o(n[r],e[t-1]);)r++,t--;return 0===t})(n,u,t,i,c,a)?(te(o,e,n,d,u,oe(o,t,c,l,s)),n):(ce(o,e,n,d,u,v,t,i,c,h,l,a,s),n)};var fe=document.importNode,pe="".trim,he=M?function(e,t){var n=t.join(" ");return t.slice.call(e,0).sort((function(e,t){return n.indexOf(e.name)<=n.indexOf(t.name)?-1:1}))}:function(e,t){return t.slice.call(e,0)};function ve(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}function me(e,t,n,r){for(var a=e.attributes,o=[],s=[],l=he(a,n),c=l.length,i=0;i<c;){var u,d=l[i++],f=d.value===j;if(f||1<(u=d.value.split(R)).length){var p=d.name;if(o.indexOf(p)<0){o.push(p);var h=n.shift().replace(f?/^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/:new RegExp("^(?:|[\\S\\s]*?\\s)("+p+")\\s*=\\s*('|\")[\\S\\s]*","i"),"$1"),v=a[h]||a[h.toLowerCase()];if(f)t.push(ge(v,r,h,null));else{for(var m=u.length-2;m--;)n.shift();t.push(ge(v,r,h,u))}}s.push(d)}}i=0;for(var y=(0<(c=s.length)&&M&&!("ownerSVGElement"in e));i<c;){var g=s[i++];y&&(g.value=""),e.removeAttribute(g.name)}var b=e.nodeName;if(/^script$/i.test(b)){var w=document.createElement(b);for(c=a.length,i=0;i<c;)w.setAttributeNode(a[i++].cloneNode(!0));w.textContent=e.textContent,e.parentNode.replaceChild(w,e)}}function ye(e,t){return{type:"any",node:e,path:t}}function ge(e,t,n,r){return{type:"attr",node:e,path:t,name:n,sparse:r}}function be(e,t){return{type:"text",node:e,path:t}}var we=p(new o);function xe(e,t){var n=(e.convert||D)(t),r=e.transform;r&&(n=r(n));var a=X(n,e.type);Ce(a);var o=[];return function e(t,n,r,a){for(var o=t.childNodes,s=o.length,l=0;l<s;){var c=o[l];switch(c.nodeType){case 1:var i=a.concat(l);me(c,n,r,i),e(c,n,r,i);break;case 8:var u=c.textContent;if(u===j)r.shift(),n.push(_.test(t.nodeName)?be(t,a):ye(c,a.concat(l)));else switch(u.slice(0,2)){case"/*":if("*/"!==u.slice(-2))break;case"👻":t.removeChild(c),l--,s--}break;case 3:_.test(t.nodeName)&&pe.call(c.textContent)===R&&(r.shift(),n.push(be(t,a)))}l++}}(a,o,t.slice(0),[]),{content:a,updates:function(n){for(var r=[],a=o.length,s=0,l=0;s<a;){var c=o[s++],i=ve(n,c.path);switch(c.type){case"any":r.push({fn:e.any(i,[]),sparse:!1});break;case"attr":var u=c.sparse,d=e.attribute(i,c.name,c.node);null===u?r.push({fn:d,sparse:!1}):(l+=u.length-2,r.push({fn:d,sparse:!0,values:u}));break;case"text":r.push({fn:e.text(i),sparse:!1}),i.textContent=""}}return a+=l,function(){var e=arguments.length;if(a!==e-1)throw new Error(e-1+" values instead of "+a+"\n"+t.join("${value}"));for(var o=1,s=1;o<e;){var l=r[o-s];if(l.sparse){var c=l.values,i=c[0],u=1,d=c.length;for(s+=d-2;u<d;)i+=arguments[o++]+c[u++];l.fn(i)}else l.fn(arguments[o++])}return n}}}}function ke(e,t){var n=we.get(t)||we.set(t,xe(e,t));return n.updates(fe.call(document,n.content,!0))}var Ne=[];function Ce(e){for(var t=e.childNodes,n=t.length;n--;){var r=t[n];1!==r.nodeType&&0===pe.call(r.textContent).length&&e.removeChild(r)}}
/*! (c) Andrea Giammarchi - ISC */var Ee=function(){var e=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,t=/([^A-Z])([A-Z]+)/g;return function(e,t){return"ownerSVGElement"in e?function(e,t){var n;t?n=t.cloneNode(!0):(e.setAttribute("style","--hyper:style;"),n=e.getAttributeNode("style"));return n.value="",e.setAttributeNode(n),r(n,!0)}(e,t):r(e.style,!1)};function n(e,t,n){return t+"-"+n.toLowerCase()}function r(r,a){var o,s;return function(l){var c,i,u,d;switch(typeof l){case"object":if(l){if("object"===o){if(!a&&s!==l)for(i in s)i in l||(r[i]="")}else a?r.value="":r.cssText="";for(i in c=a?{}:r,l)u="number"!=typeof(d=l[i])||e.test(i)?d:d+"px",!a&&/^--/.test(i)?c.setProperty(i,u):c[i]=u;o="object",a?r.value=function(e){var r,a=[];for(r in e)a.push(r.replace(t,n),":",e[r],";");return a.join("")}(s=c):s=l;break}default:s!=l&&(o="string",s=l,a?r.value=l||"":r.cssText=l||"")}}}}();const $e=(e,t)=>{let n,r=!1;const a=t.cloneNode(!0);return t=>{n!==t&&(n=t,a.value!==t&&(null==t?(r&&(r=!1,e.removeAttributeNode(a)),a.value=t):(a.value=t,r||(r=!0,e.setAttributeNode(a)))))}},Ae=(e,t)=>{let n;return r=>{n!==r&&(n=r,e[t]!==r&&(null==r?(e[t]="",e.removeAttribute(t)):e[t]=r))}},Te=/^(?:form|list)$/i,Oe=(e,t)=>e.ownerDocument.createTextNode(t);function Se(e){return this.type=e,function(e){var t=Ne,n=Ce;return function(r){return t!==r&&(n=ke(e,t=r)),n.apply(null,arguments)}}(this)}function Le(e){return e(this)}Se.prototype={attribute(e,t,n){const r="svg"===this.type;switch(t){case"class":if(r)return $e(e,n);t="className";case"data":case"props":return Ae(e,t);case"style":return Ee(e,n,r);case"ref":return(e=>t=>{"function"==typeof t?t(e):t.current=e})(e);default:return"."===t.slice(0,1)?((e,t,n)=>n?n=>{try{e[t]=n}catch(r){e.setAttribute(t,n)}}:n=>{e[t]=n})(e,t.slice(1),r):"on"===t.slice(0,2)?((e,t)=>{let n,r=t.slice(2);return t.toLowerCase()in e&&(r=r.toLowerCase()),t=>{const a=T(t)?t:[t,!1];n!==a[0]&&(n&&e.removeEventListener(r,n,a[1]),(n=a[0])&&e.addEventListener(r,n,a[1]))}})(e,t):!(t in e)||r||Te.test(t)?$e(e,n):Ae(e,t)}},any(e,t){const n={node:J,before:e},{type:r}=this;let a,o=!1;const s=l=>{switch(typeof l){case"string":case"number":case"boolean":o?a!==l&&(a=l,t[0].textContent=l):(o=!0,a=l,t=de(e.parentNode,t,[Oe(e,l)],n));break;case"function":s(l(e));break;case"object":case"undefined":if(null==l){o=!1,t=de(e.parentNode,t,[],n);break}default:if(o=!1,a=l,T(l))if(0===l.length)t.length&&(t=de(e.parentNode,t,[],n));else switch(typeof l[0]){case"string":case"number":case"boolean":s(String(l));break;case"function":s(l.map(Le,e));break;case"object":T(l[0])&&(l=l.concat.apply([],l));default:t=de(e.parentNode,t,l,n)}else"ELEMENT_NODE"in l?t=de(e.parentNode,t,11===l.nodeType?S.call(l.childNodes):[l],n):"text"in l?s(String(l.text)):"any"in l?s(l.any):"html"in l?t=de(e.parentNode,t,S.call(X([].concat(l.html).join(""),r).childNodes),n):"length"in l&&s(S.call(l))}};return s},text(e){let t;const n=r=>{if(t!==r){t=r;const a=typeof r;"object"===a&&r?"text"in r?n(String(r.text)):"any"in r?n(r.any):"html"in r?n([].concat(r.html).join("")):"length"in r&&n(S.call(r).join("")):"function"===a?n(r(e)):e.textContent=null==r?"":r}};return n}};const{create:je,freeze:Me,keys:Re}=Object,_e=p(new o),ze=()=>({stack:[],entry:null,wire:null}),De=(e,t)=>{const n=p(new o);return r.for=(e,a)=>{const o=n.get(e)||n.set(e,je(null));return o[a]||(o[a]=(s=ze(),function(){return Ie(t,s,r.apply(null,arguments))}));var s},r.node=function(){return Ie(t,ze(),r.apply(null,arguments)).valueOf()},r;function r(){return new qe(e,s.apply(null,arguments))}},Ie=(e,t,{type:n,template:r,values:a})=>{const{length:o}=a;We(e,t,a,o);let{entry:s}=t;if(s&&s.template===r&&s.type===n)s.tag(r,...a);else{const o=new e(n);t.entry=s={type:n,template:r,tag:o,wire:K(o(r,...a))}}return s.wire},We=(e,{stack:t},n,r)=>{for(let a=0;a<r;a++){const r=n[a];r instanceof Fe?n[a]=Ie(e,t[a]||(t[a]=ze()),r):T(r)?We(e,t[a]||(t[a]=ze()),r,r.length):t[a]=null}r<t.length&&t.splice(r)};function qe(e,t){this.type=e,this.template=t.shift(),this.values=t}Me(qe);const Fe=qe,{render:Ze,html:He,svg:Be}=(e=>({html:De("html",e),svg:De("svg",e),render(t,n){const r="function"==typeof n?n():n,a=_e.get(t)||_e.set(t,ze()),o=r instanceof qe?Ie(e,a,r):r;return o!==a.wire&&(a.wire=o,t.textContent="",t.appendChild(o.valueOf())),t}}))(Se),{create:Ge}=Object,Ve=e=>(...t)=>new et(e,t);function Pe(){return new Fe("html",s.apply(null,arguments))}Pe.for=function(e){const t=p(new o);return(n,r)=>{const a=t.get(n)||t.set(n,Ge(null)),o=a[r]||(a[r]=Je());return(t,...a)=>(Xe(o,a),e.for(n,r)(t,...a))}}(He);const Ue=p(new o),Je=()=>({stack:[],entry:null}),Ke=(e,{fn:t,template:n,values:r})=>{let{entry:a}=e;return a&&a.fn===t||(e.entry=a={fn:t,hook:null},a.hook=((e,t)=>A((function(){const n=t.fn.apply(null,arguments);return n instanceof Fe?(Qe(e,n),Ye(t,n)):n})))(Je(),a)),a.hook(n,...r)},Qe=(e,{values:t})=>{Xe(e,t,t.length)},Xe=({stack:e},t,n)=>{for(let r=0;r<n;r++){const n=t[r];n instanceof et?t[r]=Ke(e[r]||(e[r]=Je()),n):n instanceof Fe?Qe(e[r]||(e[r]=Je()),n):T(n)?Xe(e[r]||(e[r]=Je()),n,n.length):e[r]=null}n<e.length&&e.splice(n)},Ye=(e,{type:t,template:n,values:r})=>("svg"===t?Be:He).for(e,t)(n,...r);function et(e,t){this.fn=e,this.template=t.shift(),this.values=t}const tt=Ve(({data:e,item:t,dispatch:n,selected:r})=>{const{id:a,label:o}=t,s=N(()=>n({type:"select",id:a}),[a]),l=N(()=>n({type:"remove",id:a}),[a]);return Pe.for(e,a)`
    <tr class=${r?"danger":""}>
      <td class="col-md-1">${a}</td>
      <td class="col-md-4"><a onclick=${s}>${o}</a></td>
      <td class="col-md-1"><a onclick=${l}>${Pe`<span class="glyphicon glyphicon-remove" aria-hidden="true" />`}</a></td>
      <td class="col-md-6" />
    </tr>
  `}),nt=({id:e,title:t,cb:n})=>Pe`
  <div class="col-sm-6 smallpad">
    <button type="button" class="btn btn-primary btn-block" id=${e} onclick=${n}>${t}</button>
  </div>
`;let rt=((e,t=!1)=>{const o=e||(()=>{}),s=t?r:a,l={data:[],selected:-1,add(){t&&(l.data=l.data.slice(0)),l.data.push(...n(1e3)),o(l)},clear(){l.data=[],o(l)},run(){l.data=n(1e3),o(l)},runLots(){l.data=n(1e4),o(l)},swapRows(){t&&(l.data=l.data.slice(0));const{data:e}=l;if(e.length>998){const t=e[1];e[1]=e[998],e[998]=t}o(l)},update(){t&&(l.data=l.data.slice(0));const{data:e}=l;for(let t=0,{length:n}=e;t<n;t+=10)s(e[t],t,e);o(l)},remove(e){t&&(l.data=l.data.slice(0));const{data:n}=l;n.splice(n.findIndex(t=>t.id===e),1),o(l)},select(e){l.selected=e,o(l)}};return l})(e=>{rt=e});const at=(e,t)=>{const{type:n}=t;switch(n){case"remove":case"select":rt[n](t.id);break;default:rt[n]()}return{...rt}},ot=Ve(()=>{const[{data:e,selected:t},n]=g(at,rt);return Pe`
    <div class="container">
      ${k(()=>(({dispatch:e})=>Pe`
  <div class="jumbotron">
    <div class="row">
      <div class="col-md-6">
        <h1>neverland keyed</h1>
      </div>
      <div class="col-md-6">
        <div class="row">
          ${nt({id:"run",title:"Create 1,000 rows",cb:()=>e({type:"run"})})}
          ${nt({id:"runlots",title:"Create 10,000 rows",cb:()=>e({type:"runLots"})})}
          ${nt({id:"add",title:"Append 1,000 rows",cb:()=>e({type:"add"})})}
          ${nt({id:"update",title:"Update every 10th row",cb:()=>e({type:"update"})})}
          ${nt({id:"clear",title:"Clear",cb:()=>e({type:"clear"})})}
          ${nt({id:"swaprows",title:"Swap Rows",cb:()=>e({type:"swapRows"})})}
        </div>
      </div>
    </div>
  </div>
`)({dispatch:n}),[])}
      <table class="table table-hover table-striped test-data">
        <tbody>
        ${e.map(r=>tt({data:e,item:r,dispatch:n,selected:r.id===t}))}
        </tbody>
      </table>
      <span class="preloadicon glyphicon glyphicon-remove" aria-hidden="true" />
    </div>
  `});((e,t)=>{const n="function"==typeof t?t():t,r=Ue.get(e)||Ue.set(e,Je());Ze(e,n instanceof et?Ke(r,n):(Qe(r,n),n))})(document.getElementById("main"),ot)}();
