text: window.requestIdleCallback=window.requestIdleCallback||((e,t,o=performance.now())=>setTimeout(e,0,{didTimeout:!1,timeRemaining:()=>Math.max(0,5-(performance.now()-o))}));var j=document.createRange();j.selectNodeContents(j.createContextualFragment("<template>").lastChild);var et=j.createContextualFragment.bind(j),k=new WeakMap,A=new WeakMap,g=new WeakMap,h=new WeakMap,K=new WeakMap,m=new WeakMap,b=new WeakMap,z=new WeakMap;var pe=Symbol("boundFunctions"),_=Symbol("reactive"),T=Symbol("keys"),te=!0,C=!0,ne=!1;var F=!1,We=/\{\{([^]*?)\}\}/;var ke=/\n/g,_e=/[\.\[\]]/,$=/^on/,Fe=["allowfullscreen","async","autofocus","autoplay","checked","controls","draggable","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","spellcheck"],ge=null,se=!1;function E(e){return e!=null&&typeof e=="object"}function y(e){return typeof e=="function"}function S(e){return e.splitText!==void 0}function J(e){return e instanceof Node}function N(e){return e.nodeType===11}function q(e){return E(e)&&"event"in e&&"options"in e}function O(e){return Reflect.get(e,"isProxy")}function he(e){return E(e)&&typeof e.then=="function"}function $e(){let e="abcdefghijklmnopqrstuvwxyz0123456789",t="";for(var o=0;o<6;o++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}function me(e){C=e}function I(e,t,o){return Fe.includes(t)&&!o?(e.removeAttribute(t),!1):(e.setAttribute(t,o),!0)}function B(e,t,o){e.addEventListener(t,y(o)?o:o.event,y(o)?{}:o.options)}function x(e,t,...o){if(y(e))return e({...t,children:o});let n=document.createElement(e);for(let i in t)i in n?n[i]=t[i]:I(n,i,t[i]);return n.append(...o),F||V(n),n}function V(e,t){if(S(e)){G(e);return}let o=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT),n;for(;n=o.nextNode();){for(let s of n.getAttributeNames()){let l=n.getAttribute(s);if(t&&s.startsWith("on")){let c=s.replace($,""),r=t[l];if(!r){G(n,s,l);return}n.removeAttribute(s),q(r)?(n.addEventListener(c,r.event,r.options),A.has(n)?A.get(n).push(r.event):A.set(n,[r.event])):(n.addEventListener(c,r),A.has(n)?A.get(n).push(r):A.set(n,[r]))}else G(n,s,l)}let i=n.firstChild;for(;i;)S(i)&&G(i),i=i.nextSibling}}function G(e,t,o){let n,i;for(S(e)?n=e.nodeValue:(n=o,n===""&&(n=t,n.startsWith("{{")&&e.removeAttribute(n)));i=n.match(We);){let[s,l]=i,c=l.trim().replace(ke,"").split(_e).filter(Boolean),[r,f]=v(c),a=c[c.length-1],d=i.index,u=d+String(r).length;if(J(r)){e.nodeValue=n.replace(s,""),e.after(r),ie(d,u,r,a,f,t);return}if(S(e)){let p=E(r)?JSON.stringify(r):r??"";n=n.replace(s,p),n!=null&&(e.nodeValue=n)}else if(t==="bind"){n=n.replace(s,""),e.removeAttribute(t);let p=E(r)&&O(r)?r:f;h.has(p)?h.get(p).push(e):h.set(p,[e]);continue}else if(t==="two-way")e instanceof HTMLSelectElement?(e.value=r,X("change",e,f,a)):e instanceof HTMLInputElement&&e.type==="radio"?(e.checked=e.value===r,X("change",e,f,a)):e instanceof HTMLInputElement&&e.type==="checkbox"?(e.checked=r,X("change",e,f,a,!0)):(e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement)&&(e.value=r,X("input",e,f,a)),n=n.replace(s,""),e.setAttribute("two-way","");else if(y(r)||q(r))n=n.replace(s,""),e.removeAttribute(t),B(e,t.replace($,""),r);else if(E(r)){for(let[p,L]of Object.entries(r))n=n.replace(s,""),y(L)||q(L)?B(e,p.replace($,""),L):(a=p,I(e,p,L)?u=d+String(L).length:u=d),ie(d,u,e,a,r,p);continue}else n=n.replace(s,r),I(e,t,n===String(r)?r:n)||(n=n.replace(r,""));ie(d,u,e,a,f,t)}}function X(e,t,o,n,i=!1){t.addEventListener(e,s),fe(()=>t.removeEventListener(e,s),t);function s({target:l}){Reflect.set(o,n,i?l.checked:l.value)}}function ie(e,t,o,n,i,s){let l=[e,t,s],c=[l];if(k.has(o)?k.get(o).push(l):k.set(o,c),g.has(i)){let r=g.get(i),f=r.get(n);f?f.has(o)?f.get(o).push(l):(f.set(c,o),f.set(o,c)):r.set(n,new Map([[c,o],[o,c]]))}else g.set(i,new Map([[n,new Map([[c,o],[o,c]])]]))}function v(e){let t,o;t=o=W;for(let n of e)o=t,t=Reflect.get(o,n);return[t,o]}function oe(e,t,o){let n=[],i=[];if(S(e))return m.has(e)&&n.push(m.get(e)),b.has(e)&&n.push(b.get(e)),m.has(t)&&i.push(m.get(t)),b.has(t)&&i.push(b.get(t)),!(n.length!==i.length||String(n)!==String(i));if(A.has(e)&&n.push(...A.get(e)),A.has(t)&&i.push(...A.get(t)),m.has(e)&&n.push(m.get(e)),b.has(e)&&n.push(b.get(e)),m.has(t)&&i.push(m.get(t)),b.has(t)&&i.push(b.get(t)),n.length!==i.length||String(n)!==String(i))return!1;for(let s=0;s<e.childNodes.length;s++)if(o){if(S(e.childNodes[s])&&!oe(e.childNodes[s],t.childNodes[s],o))return!1}else if(!oe(e.childNodes[s],t.childNodes[s]))return!1;return!0}function be(e,t,o){return N(e)||N(t)?!1:e.isEqualNode(t)&&oe(e,t,o)}function le(e,t="",o=te){if(o)return Y(le,e,t,!1),Ee(e);Reflect.has(e,_)&&(e=w(e));let n=[];if(N(e)&&(n=Array.from(e.childNodes),z.set(e,n)),!t)document.body.append(e);else{if(typeof t=="string"){let i=ee(t);if(i)t=i;else return qe}C?S(e)?Q(e,t):be(e,t)||ve(e,t):Q(e,t)}M(e,m);for(let i of n)M(i,m);return Ee(N(e)?n:e)}function qe(){}function ce(e,t){if(t.has(e)){let o=t.get(e);te?window.requestIdleCallback(o):o(),t.delete(e)}}function M(e,t){if(t===m&&!He||t===b&&!Me)return;ce(e,t);let o=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT),n;for(;n=o.nextNode();){ce(n,t);let i=n.firstChild;for(;i;)S(i)&&ce(i,t),i=i.nextSibling}}function Ve(e,t){for(let[o,n]of e.entries())for(let i=0;i<n.length;i++){let s=n[i];(t.contains(s)||t.isSameNode(s))&&(n.splice(i,1),i--),n.length===0&&e.delete(o)}}function ve(e,t){let o=[...e.querySelectorAll("*")];N(e)||o.unshift(e);let n=[];S(t)||(n=[...t.querySelectorAll("*")],N(t)||n.unshift(t));let i;ne&&(i=document.createElement("template"),t===document.documentElement?t.append(i):N(t)?z.get(t)[0].before(i):t.before(i),i.append(e));let s=new Map;for(let l of n){if(ne&&l===i)return;s.has(l.localName)?s.get(l.localName).push(l):s.set(l.localName,[l])}for(let l of o){let c=s.get(l.localName);if(c){for(let r of c)if(be(l,r,!0)){l.replaceWith(r),M(l,b),Ve(s,r);break}}}if(ne){let l=N(e)?Array.from(i.childNodes):[e];if(N(t)){let c=z.get(t);for(let r of l)c[0].before(r);for(let r of c)r.remove()}else t.replaceWith(...l);i.remove(),M(t,b)}else Q(e,t);s.clear()}function Q(e,t){if(N(t)){let o=z.get(t);if(N(e)){let n=Array.from(e.childNodes);for(let i=0;i<o.length;i++){let s=o[i];i<n.length?le(n[i],s):s.remove()}}else for(let n=0;n<o.length;n++){let i=o[n];n===0?le(e,i):i.remove()}}else t.replaceWith(e);M(t,b)}function Ee(e){return Array.isArray(e)?()=>e.forEach(H):()=>H(e)}function H(e){e.isConnected&&(e.remove(),M(e,b))}function Y(e,...t){navigator.scheduling?navigator.scheduling.isInputPending()?setTimeout(Y,0,e,...t):e(...t):window.requestIdleCallback(()=>e(...t))}function Z(e){let t;do t=$e();while(Reflect.has(W,t));Reflect.set(W,t,e),Reflect.set(n,_,!0);let o=ye(n,[t]);return o;function n(i){let s=(this&&Reflect.has(this,_)?this:o)[T.description],[l,c]=v(s),r=s[s.length-1];if(y(i)){let f=i(l);if(l===f)return;Reflect.set(c,r,f??l)}else Reflect.set(c,r,i)}}function ye(e,t){return new Proxy(e,{get(o,n,i){return n===_.description?!0:n===T.description?t:n===Symbol.toPrimitive?()=>`{{${t.join(".")}}}`:ye(o,[...t,n])}})}function Re(e){let t=e[T.description];return[t[t.length-1],t.length===1]}function re(e){let[t,o]=Re(e);if(o)Reflect.set(W,t,null);else{let[n,i]=v(e[T.description]);Reflect.set(i,t,null)}}function Ne(e,t){let[o,n]=Re(e);if(n)W.observe(o,t);else{let[i,s]=v(e[T.description]);s.observe(o,t)}}function Se(e,t,o,n=e){let i=l=>(!Reflect.has(e,_)&&y(e)?e(l):he(l)?!1:l)?y(t)?t():t:y(o)?o():o,s=Z(i(w(n)));return Ne(n,l=>{l===null?re(s):s(i(l))}),s}var Ae=!1,xe=new Set,P=new WeakMap;function w(e){let[t]=v(Reflect.get(e,T.description));return t}var He=!1;var Me=!1;function fe(e,t,...o){Me=!0,b.set(t,o.length?e.bind(e,...o):e)}function ae(e={}){let t=Symbol("handlers"),o=new WeakMap,n=new Proxy(e,{set(i,s,l,c){Ae&&(xe.add(c),P.has(c)?P.get(c).add(s):P.set(c,new Set([s])));let r=!0,f=Reflect.get(i,s,c);if(f===l)return r;if(l===null){if(g.has(c)){let u=g.get(c);u.delete(String(s)),u.size===0&&g.delete(c)}let d=Reflect.get(i,t,c);if(d.has(s)){let u=d.get(s);for(let p of u)p(null,f);u.clear(),c.unobserve(s)}return E(f)&&O(f)?(g.delete(f),h.has(f)&&(h.get(f).forEach(H),h.delete(f))):h.has(c)&&(h.get(c).forEach(H),h.delete(c)),!se&&Array.isArray(c)?(c.splice(Number(s),1),r):Reflect.deleteProperty(c,s)}else if(Array.isArray(f)&&Array.isArray(l)&&l.length===0){Reflect.get(i,t,c).get(s)?.forEach(u=>u(l,f)),se=!0;let d=f.length;for(let u=0;u<d;u++){let p=c[s][u];E(p)&&O(p)&&(c[s][u]=null)}se=!1}if(he(l))return l.then(u=>{c[s]=u}).catch(u=>{console.error(u),c[s]=null}),r=Reflect.set(i,s,l,c),r;if(J(l))r=Reflect.set(i,s,l,c);else if(E(l)&&!O(l)){r=Reflect.set(i,s,ae(l),c);for(let[d,u]of Object.entries(l))E(u)&&!O(u)&&Reflect.set(l,d,ae(u))}else if(!C&&Array.isArray(c)&&c.includes(f)&&c.includes(l)&&h.has(l)){let[d]=h.get(l);if(ge!==d){let[u]=h.get(f);ge=u;let p=d.previousSibling,L=u.previousSibling,Pe=c.findIndex(we=>we===l);c.splice(Number(s),1,l),c.splice(Pe,1,f),p.after(u),L.after(d)}return!0}else r=Reflect.set(i,s,l,c);let a=Reflect.get(i,s,c);return g.has(f)?Ce(f,s,a,f):g.has(c)&&Ce(c,s,a,f),E(l)&&O(l)&&g.has(f)&&(C&&K.set(f,g.get(f)),K.has(l)?(g.set(f,K.get(l)),K.delete(l)):g.set(f,g.get(l))),r&&Reflect.get(i,t,c).get(s)?.forEach(d=>d(a,f)),!C&&Ue(f),r},get(i,s,l){Ae&&(xe.add(l),P.has(l)?P.get(l).add(s):P.set(l,new Set([s])));let c=Reflect.get(i,s,l);return y(c)?(o.has(c)||o.set(c,c.bind(i)),o.get(c)):c}});return Reflect.defineProperty(n,"isProxy",{value:!0}),Reflect.defineProperty(n,"asyncUpdate",{value:te,writable:!0}),Reflect.defineProperty(n,t,{value:new Map}),Reflect.defineProperty(n,"observe",{value(i,s){let l=Reflect.get(n,t);l.has(i)?l.get(i).add(s):l.set(i,new Set([s]))},configurable:!0}),Reflect.defineProperty(n,"getObservers",{value(){return Reflect.get(n,t)},configurable:!0}),Reflect.defineProperty(n,"unobserve",{value(i,s){let l=Reflect.get(n,t);if(i){if(l.has(i))if(s==null)l.delete(i);else{let c=l.get(i);c?.has(s)&&c.delete(s)}}else l.clear()},configurable:!0}),Reflect.has(n,pe)||queueMicrotask(()=>{n===W&&Reflect.defineProperty(n,pe,{value:o})}),n}function Ue(e){E(e)&&O(e)&&(g.delete(e),h.has(e)&&(h.get(e).forEach(H),h.delete(e)))}function Ce(e,t,o,n){let i=g.get(e),s=i.get(String(t));if(s&&(Reflect.get(e,"asyncUpdate")?Y(D,s,o,n):D(s,o,n)),E(o))for(let[l,c]of Object.entries(o)){let r=E(n)&&Reflect.get(n,l)||n,f=i.get(l);f&&(Reflect.get(e,"asyncUpdate")?Y(D,f,c,r):D(f,c,r))}}function D(e,t,o){e.forEach(n=>{if(J(n)){if(!n.isConnected){let i=e.get(n);e.delete(n),e.delete(i)}return}for(let i of n){let s=e.get(n),[l,c,r]=i,f=!1;if(J(t))Q(t,s),t!==s&&(e.delete(s),N(t)||(e.set(t,n),e.set(n,t)));else if(S(s)){f=!0;let a=s.nodeValue;s.nodeValue=a.substring(0,l)+String(t)+a.substring(c)}else if(r==="two-way")s instanceof HTMLInputElement&&s.type==="radio"?s.checked=Array.isArray(t)?t.includes(s.name):String(t)===s.value:s instanceof HTMLInputElement&&s.type==="checkbox"?s.checked=t:(s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement||s instanceof HTMLInputElement)&&(s.value=String(t));else if(y(t)||q(t)){let a=r.replace($,"");s.removeEventListener(a,y(t)?t:t.event),B(s,a,t)}else if(E(t))for(let[a,d]of Object.entries(t))if(y(d)||q(d)){let u=a.replace($,"");s.removeEventListener(u,y(d)?d:d.event),B(s,u,d)}else I(s,a,d);else{f=!0;let a=s.getAttribute(r);a?(a=a.substring(0,l)+String(t)+a.substring(c),I(s,r,a===String(t)?t:a)):I(s,r,t)}if(f&&(i[1]=l+String(t).length,k.has(s))){let a=!1;for(let d of k.get(s)){if(d===i){a=!0;continue}if(a&&(S(s)||r===d[2])){let u=String(o).length-String(t).length;d[0]-=u,d[1]-=u}}}}})}function Le(e,t,o){F=!0;let n=ee(e),i=w(t).map(o);n.append(...i);for(let s of i)M(s,m);n.hasChildNodes()&&V(n),F=!1,Ne(t,(s,l)=>{if(F=!0,!s?.length||!C&&s?.length===l?.length)n.textContent="";else if(C)for(let c=0;c<l?.length&&s?.length;c++)l[c].id=s[c].id,l[c].label=s[c].label,s[c]=l[c];if(l?.length&&s?.length>l?.length){let c=l.length,f=s.slice(c).map((a,d)=>o(a,d+c));n.append(...f);for(let a of f)M(a,m)}else if(l?.length===0||!C&&s?.length){let c=s.map(o);n.append(...c);for(let r of c)M(r,m)}n.hasChildNodes()&&V(n),F=!1})}var W=ae(),ee=document.querySelector.bind(document),tt=document.querySelectorAll.bind(document);var Oe=["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"],Te=["red","yellow","blue","green","pink","brown","purple","brown","white","black","orange"],Ie=["table","chair","house","bbq","desk","car","pony","cookie","sandwich","burger","pizza","mouse","keyboard"],je=Oe.length,Ke=Te.length,ze=Ie.length,Je=1;function ue(e){let t=new Array(e);for(let o=0;o<e;o++)t[o]={id:Je++,label:Oe[de(je)]+" "+Te[de(Ke)]+" "+Ie[de(ze)]};return t}function de(e){return Math.random()*e|0}me(!1);V(ee("#main"),{run:Ge,runLots:Xe,add:Be,update:Ye,clear:Qe,swapRows:Ze});var R=Z([]),U=Z(-1);Le("tbody",R,(e,t)=>{let o=Se(i=>i===e.id,"danger","",U),n=x("tr",{class:o,bind:R[t]},x("td",{class:"col-md-1"},R[t].id),x("td",{class:"col-md-4"},x("a",{onclick:()=>U(e.id)},R[t].label)),x("td",{class:"col-md-1"},x("a",{onclick:()=>De(e.id)},x("span",{class:"glyphicon glyphicon-remove","aria-hidden":"true"}))),x("td",{class:"col-md-6"}));return fe(re,n,o),n});function Be(){R(e=>[...e,...ue(1e3)])}function Ge(){U(null),R(ue(1e3))}function Xe(){U(null),R(ue(1e4))}function Qe(){R([]),U(null)}function Ye(){let e=w(R),t=0;for(;t<e.length;)R[t].setter(o=>{o.label+=" !!!"}),t+=10}function Ze(){R(e=>{e.length>998&&([e[1],e[998]]=[e[998],e[1]])})}function De(e){let t=w(R).findIndex(o=>o?.id===e);R(o=>{o[t]=null})}
  