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

riot

Package Overview
Dependencies
Maintainers
4
Versions
280
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

riot - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

README.md

2

lib/browser/compiler/compile.js

@@ -99,3 +99,3 @@

if (fn) fn(js, str, opts)
})
}, opts)

@@ -102,0 +102,0 @@ }

@@ -27,2 +27,4 @@ var riot = { version: 'WIP', settings: {} },

T_FUNCTION = 'function',
XLINK_NS = 'http://www.w3.org/1999/xlink',
XLINK_REGEX = /^xlink:(\w+)/,
// special native tags that cannot be treated like the others

@@ -29,0 +31,0 @@ SPECIAL_TAGS_REGEX = /^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,

@@ -206,3 +206,3 @@

moveVirtual(tag, root, tags[i], dom.childNodes.length)
else root.insertBefore(tag.root, tags[i].root)
else if (tags[i].root.parentNode) root.insertBefore(tag.root, tags[i].root)
// update the position attribute if it exists

@@ -209,0 +209,0 @@ if (expr.pos)

@@ -67,7 +67,7 @@ function Tag(impl, conf, innerHTML) {

function inheritFromParent () {
if (!self.parent || !isLoop) return
each(Object.keys(self.parent), function(k) {
function inheritFrom(target) {
each(Object.keys(target), function(k) {
// some properties must be always in sync with the parent tag
var mustSync = !RESERVED_WORDS_BLACKLIST.test(k) && contains(propsInSyncWithParent, k)
if (typeof self[k] === T_UNDEF || mustSync) {

@@ -77,3 +77,3 @@ // track the property to keep in sync

if (!mustSync) propsInSyncWithParent.push(k)
self[k] = self.parent[k]
self[k] = target[k]
}

@@ -94,4 +94,6 @@ })

data = cleanUpData(data)
// inherit properties from the parent
inheritFromParent()
// inherit properties from the parent in loop
if (isLoop) {
inheritFrom(self.parent)
}
// normalize the tag properties in case an item object was initially passed

@@ -140,7 +142,17 @@ if (data && isObject(item)) {

// bind methods to self
if (key != 'init' && !self[key])
// allow mixins to override other properties/parent mixins
if (key != 'init') {
// check for getters/setters
var descriptor = Object.getOwnPropertyDescriptor(instance, key)
var hasGetterSetter = descriptor && (descriptor.get || descriptor.set)
// apply method only if it does not already exist on the instance
self[key] = isFunction(instance[key]) ?
instance[key].bind(self) :
instance[key]
if (!self.hasOwnProperty(key) && hasGetterSetter) {
Object.defineProperty(self, key, descriptor)
} else {
self[key] = isFunction(instance[key]) ?
instance[key].bind(self) :
instance[key]
}
}
})

@@ -160,2 +172,3 @@

var globalMixin = riot.mixin(GLOBAL_MIXIN)
if (globalMixin)

@@ -166,2 +179,7 @@ for (var i in globalMixin)

// children in loop should inherit from true parent
if (self._parent) {
inheritFrom(self._parent)
}
// initialiation

@@ -168,0 +186,0 @@ if (impl.fn) impl.fn.call(self, opts)

@@ -105,3 +105,3 @@ /**

if (attrName === 'value') {
dom.value = value
if (dom.value != value) dom.value = value
return

@@ -108,0 +108,0 @@ }

@@ -108,3 +108,3 @@ /**

/**
* Set any DOM attribute
* Set any DOM/SVG attribute
* @param { Object } dom - DOM node we want to update

@@ -115,3 +115,7 @@ * @param { String } name - name of the property we want to set

function setAttr(dom, name, val) {
dom.setAttribute(name, val)
var xlink = XLINK_REGEX.exec(name)
if (xlink && xlink[1])
dom.setAttributeNS(XLINK_NS, xlink[1], val)
else
dom.setAttribute(name, val)
}

@@ -118,0 +122,0 @@

@@ -39,7 +39,6 @@ // simple-dom helper

set: function(val) {
// is an input tag
if (~['input', 'option', 'textarea'].indexOf(this.tagName.toLowerCase()))
if (this.getAttribute('value') != val) {
this.setAttribute('value', val)
else
this.value = val
}
}

@@ -46,0 +45,0 @@ })

{
"name": "riot",
"version": "2.5.0",
"version": "2.6.0",
"description": "A React-like user interface micro-library",

@@ -49,25 +49,25 @@ "homepage": "http://riotjs.com/",

"riot-cli": "^2.6.1",
"riot-compiler": "^2.5.2",
"riot-observable": "^2.4.2",
"riot-route": "^2.4.0",
"riot-tmpl": "^2.4.0",
"riot-compiler": "^2.5.3",
"riot-observable": "^2.5.0",
"riot-route": "^2.5.0",
"riot-tmpl": "^2.4.1",
"simple-dom": "0.3.0",
"simple-html-tokenizer": "^0.2.3"
"simple-html-tokenizer": "^0.2.5"
},
"devDependencies": {
"benchmark": "^2.1.0",
"benchmark": "^2.1.1",
"cheerio": "^0.20.0",
"coveralls": "^2.11.9",
"eslint": "^2.13.1",
"coveralls": "^2.11.12",
"eslint": "^3.3.1",
"expect.js": "^0.3.1",
"glob": "^7.0.3",
"istanbul": "^0.4.3",
"jsdom": "^9.0.0",
"karma": "^0.13.22",
"karma-coverage": "^1.0.0",
"karma-mocha": "^1.0.1",
"glob": "^7.0.5",
"istanbul": "^0.4.4",
"jsdom": "^9.4.2",
"karma": "^1.2.0",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.1.1",
"karma-phantomjs-launcher": "^1.0.1",
"karma-sauce-launcher": "^1.0.0",
"mocha": "^2.4.5",
"phantomjs-prebuilt": "^2.1.7",
"mocha": "^3.0.2",
"phantomjs-prebuilt": "^2.1.12",
"smash": "0.0.15",

@@ -74,0 +74,0 @@ "uglify-js": "latest"

@@ -1,2 +0,2 @@

/* Riot v2.5.0, @license MIT */
!function(e,t){"use strict";function n(e,t,n){var r={};return r[e.key]=t,e.pos&&(r[e.pos]=n),r}function r(e,t){for(var n,r=t.length,o=e.length;r>o;)n=t[--r],t.splice(r,1),n.unmount()}function o(e,t){Object.keys(e.tags).forEach(function(n){var r=e.tags[n];R(r)?g(r,function(e){T(e,n,t)}):T(r,n,t)})}function i(e,t,n){var r,o=e._root;for(e._virts=[];o;)r=o.nextSibling,n?t.insertBefore(o,n._root):t.appendChild(o),e._virts.push(o),o=r}function a(e,t,n,r){for(var o,i=e._root,a=0;a<r;a++)o=i.nextSibling,t.insertBefore(i,n._root),i=o}function u(e,t,u){x(e,"each");var f,s=typeof _(e,"no-reorder")!==te||x(e,"no-reorder"),l=S(e),p=W[l]||{tmpl:m(e)},d=ie.test(l),g=e.parentNode,h=document.createTextNode(""),v=C(e),y="option"===l.toLowerCase(),b=[],w=[],N="VIRTUAL"==e.tagName;u=le.loopKeys(u),g.insertBefore(h,e),t.one("before-mount",function(){e.parentNode.removeChild(e),g.stub&&(g=t.root)}).on("update",function(){var m=le(u.val,t),x=document.createDocumentFragment();R(m)||(f=m||!1,m=f?Object.keys(m).map(function(e){return n(u,e,m[e])}):[]);for(var _=0,C=m.length;_<C;_++){var L=m[_],T=s&&typeof L==ne&&!f,E=w.indexOf(L),M=~E&&T?E:_,S=b[M];L=!f&&u.key?n(u,L,_):L,!T&&!S||T&&!~E||!S?(S=new c(p,{parent:t,isLoop:!0,hasImpl:!!W[l],root:d?g:e.cloneNode(),item:L},e.innerHTML),S.mount(),N&&(S._root=S.root.firstChild),_!=b.length&&b[_]?(N?i(S,g,b[_]):g.insertBefore(S.root,b[_].root),w.splice(_,0,L)):N?i(S,x):x.appendChild(S.root),b.splice(_,0,S),M=_):S.update(L,!0),M!==_&&T&&b[_]&&(N?a(S,g,b[_],e.childNodes.length):g.insertBefore(S.root,b[_].root),u.pos&&(S[u.pos]=_),b.splice(_,0,b.splice(M,1)[0]),w.splice(_,0,w.splice(M,1)[0]),!v&&S.tags&&o(S,_)),S._item=L,O(S,"_parent",t)}if(r(m,b),g.insertBefore(x,h),y&&se&&!g.multiple)for(var A=0;A<g.length;A++)if(g[A].__riot1374){g.selectedIndex=A,delete g[A].__riot1374;break}v&&(t.tags[l]=b),w=m.slice()})}function f(e,t,n,r){k(e,function(e){if(1==e.nodeType){if(e.isLoop=e.isLoop||e.parentNode&&e.parentNode.isLoop||_(e,"each")?1:0,n){var o=C(e);o&&!e.isLoop&&n.push(E(o,{root:e,parent:t},e.innerHTML,t))}e.isLoop&&!r||G(e,t,[])}})}function s(e,t,n){function r(e,t,r){le.hasExpr(t)&&n.push(A({dom:e,expr:t},r))}k(e,function(e){var n,o=e.nodeType;if(3==o&&"STYLE"!=e.parentNode.tagName&&r(e,e.nodeValue),1==o)return(n=_(e,"each"))?(u(e,t,n),!1):(g(e.attributes,function(t){var n=t.name,o=n.split("__")[1];if(r(e,t.value,{attr:o||n,bool:o}),o)return x(e,n),!1}),!C(e)&&void 0)})}function c(e,n,r){function o(){var e=_&&y?p:v||p;g(E.attributes,function(t){var n=t.value;m[w(t.name)]=le.hasExpr(n)?le(n,e):n}),g(Object.keys(k),function(t){m[w(t)]=le(k[t],e)})}function i(e){for(var t in C)typeof p[t]!==re&&$(p,t)&&(p[t]=e[t])}function a(){p.parent&&y&&g(Object.keys(p.parent),function(e){var t=!ae.test(e)&&j(F,e);(typeof p[e]===re||t)&&(t||F.push(e),p[e]=p.parent[e])})}function u(e){p.update(e,!0)}function c(e){if(g(T,function(t){t[e?"mount":"unmount"]()}),v){var t=e?"on":"off";y?v[t]("unmount",p.unmount):v[t]("update",u)[t]("unmount",p.unmount)}}var l,p=z.observable(this),m=K(n.opts)||{},v=n.parent,y=n.isLoop,_=n.hasImpl,C=I(n.item),L=[],T=[],E=n.root,S=E.tagName.toLowerCase(),k={},F=[];e.name&&E._tag&&E._tag.unmount(!0),this.isMounted=!1,E.isLoop=y,E._tag=this,O(this,"_riot_id",++Z),A(this,{parent:v,root:E,opts:m},C),O(this,"tags",{}),g(E.attributes,function(e){var t=e.value;le.hasExpr(t)&&(k[e.name]=t)}),l=pe(e.tmpl,r),O(this,"update",function(e,t){return e=I(e),a(),e&&b(C)&&(i(e),C=e),A(p,e),o(),p.trigger("update",e),d(L,p),t&&p.parent?p.parent.one("updated",function(){p.trigger("updated")}):ge(function(){p.trigger("updated")}),this}),O(this,"mixin",function(){return g(arguments,function(e){var t,n,r=[];e=typeof e===te?z.mixin(e):e,t=h(e)?new e:e;do r=r.concat(Object.getOwnPropertyNames(n||t));while(n=Object.getPrototypeOf(n||t));g(r,function(e){"init"==e||p[e]||(p[e]=h(t[e])?t[e].bind(p):t[e])}),t.init&&t.init.bind(p)()}),this}),O(this,"mount",function(){o();var t=z.mixin(X);if(t)for(var n in t)t.hasOwnProperty(n)&&p.mixin(t[n]);if(e.fn&&e.fn.call(p,m),s(l,p,L),c(!0),e.attrs&&H(e.attrs,function(e,t){N(E,e,t)}),(e.attrs||_)&&s(p.root,p,L),p.parent&&!y||p.update(C),p.trigger("before-mount"),y&&!_)E=l.firstChild;else{for(;l.firstChild;)E.appendChild(l.firstChild);E.stub&&(E=v.root)}O(p,"root",E),y&&f(p.root,p.parent,null,!0),!p.parent||p.parent.isMounted?(p.isMounted=!0,p.trigger("mount")):p.parent.one("mount",function(){P(p.root)||(p.parent.isMounted=p.isMounted=!0,p.trigger("mount"))})}),O(this,"unmount",function(e){var n,r=E,o=r.parentNode,i=Q.indexOf(p);if(p.trigger("before-unmount"),~i&&Q.splice(i,1),o){if(v)n=M(v),R(n.tags[S])?g(n.tags[S],function(e,t){e._riot_id==p._riot_id&&n.tags[S].splice(t,1)}):n.tags[S]=t;else for(;r.firstChild;)r.removeChild(r.firstChild);e?(x(o,ee),x(o,J)):o.removeChild(r)}this._virts&&g(this._virts,function(e){e.parentNode&&e.parentNode.removeChild(e)}),p.trigger("unmount"),c(),p.off("*"),p.isMounted=!1,delete E._tag}),f(l,this,T)}function l(t,n,r,o){r[t]=function(t){var i,a=o._parent,u=o._item;if(!u)for(;a&&!u;)u=a._item,a=a._parent;t=t||e.event,$(t,"currentTarget")&&(t.currentTarget=r),$(t,"target")&&(t.target=t.srcElement),$(t,"which")&&(t.which=t.charCode||t.keyCode),t.item=u,n.call(o,t)===!0||/radio|check/.test(r.type)||(t.preventDefault&&t.preventDefault(),t.returnValue=!1),t.preventUpdate||(i=u?M(a):o,i.update())}}function p(e,t,n){e&&(e.insertBefore(n,t),e.removeChild(t))}function d(e,t){g(e,function(e,n){var r=e.dom,o=e.attr,i=le(e.expr,t),a=e.dom.parentNode;if(e.bool?i=!!i:null==i&&(i=""),e.value!==i){if(e.value=i,!o)return i+="",void(a&&("TEXTAREA"===a.tagName?(a.value=i,fe||(r.nodeValue=i)):r.nodeValue=i));if("value"===o)return void(r.value=i);if(x(r,o),h(i))l(o,i,r,t);else if("if"==o){var u=e.stub,f=function(){p(u.parentNode,u,r)},s=function(){p(r.parentNode,r,u)};i?u&&(f(),r.inStub=!1,P(r)||k(r,function(e){e._tag&&!e._tag.isMounted&&(e._tag.isMounted=!!e._tag.trigger("mount"))})):(u=e.stub=u||document.createTextNode(""),r.parentNode?s():(t.parent||t).one("updated",s),r.inStub=!0)}else"show"===o?r.style.display=i?"":"none":"hide"===o?r.style.display=i?"none":"":e.bool?(r[o]=i,i&&N(r,o,o),se&&"selected"===o&&"OPTION"===r.tagName&&(r.__riot1374=i)):(0===i||i&&typeof i!==ne)&&(U(o,Y)&&o!=J&&(o=o.slice(Y.length)),N(r,o,i))}})}function g(e,t){for(var n,r=e?e.length:0,o=0;o<r;o++)n=e[o],null!=n&&t(n,o)===!1&&o--;return e}function h(e){return typeof e===oe||!1}function m(e){if(e.outerHTML)return e.outerHTML;var t=F("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}function v(e,t){if(typeof e.innerHTML!=re)e.innerHTML=t;else{var n=(new DOMParser).parseFromString(t,"application/xml");e.appendChild(e.ownerDocument.importNode(n.documentElement,!0))}}function y(e){return~ue.indexOf(e)}function b(e){return e&&typeof e===ne}function x(e,t){e.removeAttribute(t)}function w(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function _(e,t){return e.getAttribute(t)}function N(e,t,n){e.setAttribute(t,n)}function C(e){return e.tagName&&W[_(e,ee)||_(e,J)||e.tagName.toLowerCase()]}function L(e,t,n){var r=n.tags[t];r?(R(r)||r!==e&&(n.tags[t]=[r]),j(n.tags[t],e)||n.tags[t].push(e)):n.tags[t]=e}function T(e,t,n){var r,o=e.parent;o&&(r=o.tags[t],R(r)?r.splice(n,0,r.splice(r.indexOf(e),1)[0]):L(e,t,o))}function E(e,t,n,r){var o=new c(e,t,n),i=S(t.root),a=M(r);return o.parent=a,o._parent=r,L(o,i,a),a!==r&&L(o,i,r),t.root.innerHTML="",o}function M(e){for(var t=e;!C(t.root)&&t.parent;)t=t.parent;return t}function O(e,t,n,r){return Object.defineProperty(e,t,A({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function S(e){var t=C(e),n=_(e,"name"),r=n&&!le.hasExpr(n)?n:t?t.name:e.tagName.toLowerCase();return r}function A(e){for(var t,n=arguments,r=1;r<n.length;++r)if(t=n[r])for(var o in t)$(e,o)&&(e[o]=t[o]);return e}function j(e,t){return~e.indexOf(t)}function R(e){return Array.isArray(e)||e instanceof Array}function $(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return typeof e[t]===re||n&&n.writable}function I(e){if(!(e instanceof c||e&&typeof e.trigger==oe))return e;var t={};for(var n in e)ae.test(n)||(t[n]=e[n]);return t}function k(e,t){if(e){if(t(e)===!1)return;for(e=e.firstChild;e;)k(e,t),e=e.nextSibling}}function H(e,t){for(var n,r=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g;n=r.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function P(e){for(;e;){if(e.inStub)return!0;e=e.parentNode}return!1}function F(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg","svg"):document.createElement(e)}function B(e,t){return(t||document).querySelectorAll(e)}function D(e,t){return(t||document).querySelector(e)}function K(e){function t(){}return t.prototype=e,new t}function q(e){return _(e,"id")||_(e,"name")}function G(e,t,n){var r,o=q(e),i=function(i){j(n,o)||(r=R(i),i?(!r||r&&!j(i,e))&&(r?i.push(e):t[o]=[i,e]):t[o]=e)};o&&(le.hasExpr(o)?t.one("mount",function(){o=q(e),i(t[o])}):i(t[o]))}function U(e,t){return e.slice(0,t.length)===t}function V(e,t,n){var r=W[t],o=e._innerHTML=e._innerHTML||e.innerHTML;return e.innerHTML="",r&&e&&(r=new c(r,{root:e,opts:n},o)),r&&r.mount&&(r.mount(),j(Q,r)||Q.push(r)),r}var z={version:"v2.5.0",settings:{}},Z=0,Q=[],W={},X="__global_mixin",Y="riot-",J=Y+"tag",ee="data-is",te="string",ne="object",re="undefined",oe="function",ie=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,ae=/^(?:_(?:item|id|parent)|update|root|(?:un)?mount|mixin|is(?:Mounted|Loop)|tags|parent|opts|trigger|o(?:n|ff|ne))$/,ue=["altGlyph","animate","animateColor","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","filter","font","foreignObject","g","glyph","glyphRef","image","line","linearGradient","marker","mask","missing-glyph","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tref","tspan","use"],fe=0|(e&&e.document||{}).documentMode,se=e&&!!e.InstallTrigger;z.observable=function(e){function t(e,t){for(var n,r,o=e.split(" "),i=o.length,a=0;a<i;a++)n=o[a],r=n.indexOf("."),n&&t(~r?n.substring(0,r):n,a,~r?n.slice(r+1):null)}e=e||{};var n={},r=Array.prototype.slice;return Object.defineProperties(e,{on:{value:function(r,o){return"function"!=typeof o?e:(t(r,function(e,t,r){(n[e]=n[e]||[]).push(o),o.typed=t>0,o.ns=r}),e)},enumerable:!1,writable:!1,configurable:!1},off:{value:function(r,o){return"*"!=r||o?t(r,function(e,t,r){if(o||r)for(var i,a=n[e],u=0;i=a&&a[u];++u)(i==o||r&&i.ns==r)&&a.splice(u--,1);else delete n[e]}):n={},e},enumerable:!1,writable:!1,configurable:!1},one:{value:function(t,n){function r(){e.off(t,r),n.apply(e,arguments)}return e.on(t,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(o){for(var i,a=arguments.length-1,u=new Array(a),f=0;f<a;f++)u[f]=arguments[f+1];return t(o,function(t,o,a){i=r.call(n[t]||[],0);for(var f,s=0;f=i[s];++s)f.busy||(f.busy=1,a&&f.ns!=a||f.apply(e,f.typed?[t].concat(u):u),i[s]!==f&&s--,f.busy=0);n["*"]&&"*"!=t&&e.trigger.apply(e,["*",t].concat(u))}),e},enumerable:!1,writable:!1,configurable:!1}}),e},function(t){function n(e){return e.split(/[\/?#]/)}function r(e,t){var n=new RegExp("^"+t[C](/\*/g,"([^/?#]+?)")[C](/\.\./,".*")+"$"),r=e.match(n);if(r)return r.slice(1)}function o(e,t){var n;return function(){clearTimeout(n),n=setTimeout(e,t)}}function i(e){g=o(l,1),O[_](L,g),O[_](T,g),S[_]($,p),e&&l(!0)}function a(){this.$=[],t.observable(this),k.on("stop",this.s.bind(this)),k.on("emit",this.e.bind(this))}function u(e){return e[C](/^\/|\/$/,"")}function f(e){return"string"==typeof e}function s(e){return(e||j.href)[C](b,"")}function c(e){return"#"==h[0]?(e||j.href||"").split(h)[1]||"":(j?s(e):e||"")[C](h,"")}function l(e){var t=0==F;if(!(M<=F)&&(F++,P.push(function(){var t=c();(e||t!=m)&&(k[E]("emit",t),m=t)}),t)){for(;P.length;)P[0](),P.shift();F=0}}function p(e){if(!(1!=e.which||e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented)){for(var t=e.target;t&&"A"!=t.nodeName;)t=t.parentNode;!t||"A"!=t.nodeName||t[N]("download")||!t[N]("href")||t.target&&"_self"!=t.target||t.href.indexOf(j.href.match(b)[0])==-1||(t.href==j.href||t.href.split("#")[0]!=j.href.split("#")[0]&&("#"==h||0===s(t.href).indexOf(h))&&d(c(t.href),t.title||S.title))&&e.preventDefault()}}function d(e,t,n){return A?(e=h+u(e),t=t||S.title,n?A.replaceState(null,t,e):A.pushState(null,t,e),S.title=t,H=!1,l(),H):k[E]("emit",c(e))}var g,h,m,v,y,b=/^.+?\/\/+[^\/]+/,x="EventListener",w="remove"+x,_="add"+x,N="hasAttribute",C="replace",L="popstate",T="hashchange",E="trigger",M=3,O="undefined"!=typeof e&&e,S="undefined"!=typeof document&&document,A=O&&history,j=O&&(A.location||O.location),R=a.prototype,$=S&&S.ontouchstart?"touchstart":"click",I=!1,k=t.observable(),H=!1,P=[],F=0;R.m=function(e,t,n){!f(e)||t&&!f(t)?t?this.r(e,t):this.r("@",e):d(e,t,n||!1)},R.s=function(){this.off("*"),this.$=[]},R.e=function(e){this.$.concat("@").some(function(t){var n=("@"==t?v:y)(u(e),u(t));if("undefined"!=typeof n)return this[E].apply(null,[t].concat(n)),H=!0},this)},R.r=function(e,t){"@"!=e&&(e="/"+u(e),this.$.push(e)),this.on(e,t)};var B=new a,D=B.m.bind(B);D.create=function(){var e=new a,t=e.m.bind(e);return t.stop=e.s.bind(e),t},D.base=function(e){h=e||"#",m=c()},D.exec=function(){l(!0)},D.parser=function(e,t){e||t||(v=n,y=r),e&&(v=e),t&&(y=t)},D.query=function(){var e={},t=j.href||m;return t[C](/[?&](.+?)=([^&]*)/g,function(t,n,r){e[n]=r}),e},D.stop=function(){I&&(O&&(O[w](L,g),O[w](T,g),S[w]($,p)),k[E]("stop"),I=!1)},D.start=function(e){I||(O&&("complete"==document.readyState?i(e):O[_]("load",function(){setTimeout(function(){i(e)},1)})),I=!0)},D.base(),D.parser(),t.route=D}(z);var ce=function(e){function t(e){return e}function n(e,t){return t||(t=v),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?s:"")}function r(e){if(e===g)return h;var t=e.split(" ");if(2!==t.length||/[\x00-\x1F<>a-zA-Z0-9'",;\\]/.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(/(?=[[\]()*+?.^$|])/g,"\\").split(" ")),t[4]=n(t[1].length>1?/{[\S\s]*?}/:h[4],t),t[5]=n(e.length>3?/\\({|})/g:h[5],t),t[6]=n(h[6],t),t[7]=RegExp("\\\\("+t[3]+")|([[({])|("+t[3]+")|"+p,s),t[8]=e,t}function o(e){return e instanceof RegExp?u(e):v[e]}function i(e){(e||(e=g))!==v[8]&&(v=r(e),u=e===g?t:n,v[9]=u(h[9])),m=e}function a(e){var t;e=e||{},t=e.brackets,Object.defineProperty(e,"brackets",{set:i,get:function(){return m},enumerable:!0}),f=e,i(t)}var u,f,s="g",c=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,l=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'/g,p=l.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?(\/)[gim]*/.source,d={"(":RegExp("([()])|"+p,s),"[":RegExp("([[\\]])|"+p,s),"{":RegExp("([{}])|"+p,s)},g="{ }",h=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+p,s),g,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],m=e,v=[];return o.split=function(e,t,n){function r(e){t||a?s.push(e&&e.replace(n[5],"$1")):s.push(e)}function o(e,t,n){var r,o=d[t];for(o.lastIndex=n,n=1;(r=o.exec(e))&&(!r[1]||(r[1]===t?++n:--n)););return n?e.length:o.lastIndex}n||(n=v);var i,a,u,f,s=[],c=n[6];for(a=u=c.lastIndex=0;i=c.exec(e);){if(f=i.index,a){if(i[2]){c.lastIndex=o(e,i[2],c.lastIndex);continue}if(!i[3])continue}i[1]||(r(e.slice(u,f)),u=c.lastIndex,c=n[6+(a^=1)],c.lastIndex=u)}return e&&u<e.length&&r(e.slice(u)),s},o.hasExpr=function(e){return v[4].test(e)},o.loopKeys=function(e){var t=e.match(v[9]);return t?{key:t[1],pos:t[2],val:v[0]+t[3].trim()+v[1]}:{val:e.trim()}},o.array=function(e){return e?r(e):v},Object.defineProperty(o,"settings",{set:a,get:function(){return f}}),o.settings="undefined"!=typeof z&&z.settings||{},o.set=i,o.R_STRINGS=l,o.R_MLCOMMS=c,o.S_QBLOCKS=p,o}(),le=function(){function t(e,t){return e?(u[e]||(u[e]=r(e))).call(t,n):e}function n(e,n){t.errorHandler&&(e.riotData={tagName:n&&n.root&&n.root.tagName,_riot_id:n&&n._riot_id},t.errorHandler(e))}function r(e){var t=o(e);return"try{return "!==t.slice(0,11)&&(t="return "+t),new Function("E",t+";")}function o(e){var t,n=[],r=ce.split(e.replace(l,'"'),1);if(r.length>2||r[0]){var o,a,u=[];for(o=a=0;o<r.length;++o)t=r[o],t&&(t=1&o?i(t,1,n):'"'+t.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(u[a++]=t);t=a<2?u[0]:"["+u.join(",")+'].join("")'}else t=i(r[1],0,n);return n[0]&&(t=t.replace(p,function(e,t){return n[t].replace(/\r/g,"\\r").replace(/\n/g,"\\n")})),t}function i(e,t,n){function r(t,n){var r,o=1,i=d[t];for(i.lastIndex=n.lastIndex;r=i.exec(e);)if(r[0]===t)++o;else if(!--o)break;n.lastIndex=o?e.length:i.lastIndex}if(e=e.replace(c,function(e,t){return e.length>2&&!t?f+(n.push(e)-1)+"~":e}).replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var o,i=[],u=0;e&&(o=e.match(s))&&!o.index;){var l,p,g=/,|([[{(])|$/g;for(e=RegExp.rightContext,l=o[2]?n[o[2]].slice(1,-1).trim().replace(/\s+/g," "):o[1];p=(o=g.exec(e))[1];)r(p,g);p=e.slice(0,o.index),e=RegExp.rightContext,i[u++]=a(p,1,l)}e=u?u>1?"["+i.join(",")+'].join(" ").trim()':i[0]:a(e,t)}return e}function a(e,t,n){var r;return e=e.replace(h,function(e,t,n,o,i){return n&&(o=r?0:o+e.length,"this"!==n&&"global"!==n&&"window"!==n?(e=t+'("'+n+g+n,o&&(r="."===(i=i[o])||"("===i||"["===i)):o&&(r=!m.test(i.slice(o)))),e}),r&&(e="try{return "+e+"}catch(e){E(e,this)}"),n?e=(r?"function(){"+e+"}.call(this)":"("+e+")")+'?"'+n+'":""':t&&(e="function(v){"+(r?e.replace("return ","v="):"v=("+e+")")+';return v||v===0?v:""}.call(this)'),e}var u={};t.haveRaw=ce.hasRaw,t.hasExpr=ce.hasExpr,t.loopKeys=ce.loopKeys,t.errorHandler=null;var f="⁗",s=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,c=RegExp(ce.S_QBLOCKS,"g"),l=/\u2057/g,p=/\u2057(\d+)~/g,d={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},g='"in this?this:'+("object"!=typeof e?"global":"window")+").",h=/[,{][$\w]+:|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,m=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return t.parse=function(e){return e},t.version=ce.version="v2.4.0",t}(),pe=function e(){function e(e,r){var o=e&&e.match(/^\s*<([-\w]+)/),i=o&&o[1].toLowerCase(),a=F("div",y(i));return e=n(e,r),f.test(i)?a=t(a,e,i):v(a,e),a.stub=!0,a}function t(e,t,n){var r="o"===n[0],o=r?"select>":"table>";if(e.innerHTML="<"+o+t.trim()+"</"+o,o=e.firstChild,r)o.selectedIndex=-1;else{var i=u[n];i&&1===o.childElementCount&&(o=D(i,o))}return o}function n(e,t){if(!r.test(e))return e;var n={};return t=t&&t.replace(i,function(e,t,r){return n[t]=n[t]||r,""}).trim(),e.replace(a,function(e,t,r){return n[t]||r||""}).replace(o,function(e,n){return t||n||""})}var r=/<yield\b/i,o=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>|>)/gi,i=/<yield\s+to=['"]([^'">]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,a=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,u={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},f=fe&&fe<10?ie:/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/;return e}(),de=function(t){if(!e)return{add:function(){},inject:function(){}};var n=function(){var e=F("style");N(e,"type","text/css");var t=D("style[type=riot]");return t?(t.id&&(e.id=t.id),t.parentNode.replaceChild(e,t)):document.getElementsByTagName("head")[0].appendChild(e),e}(),r=n.styleSheet,o="";return Object.defineProperty(t,"styleNode",{value:n,writable:!0}),{add:function(e){o+=e},inject:function(){o&&(r?r.cssText+=o:n.innerHTML+=o,o="")}}}(z),ge=function(e){var t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame;if(!t||/iP(ad|hone|od).*OS 6/.test(e.navigator.userAgent)){var n=0;t=function(e){var t=Date.now(),r=Math.max(16-(t-n),0);setTimeout(function(){e(n=t+r)},r)}}return t}(e||{});z.util={brackets:ce,tmpl:le},z.mixin=function(){var e={},t=e[X]={},n=0;return function(r,o,i){if(b(r))return void z.mixin("__unnamed_"+n++,r,!0);var a=i?t:e;if(!o){if(typeof a[r]===re)throw new Error("Unregistered mixin: "+r);return a[r]}h(o)?(A(o.prototype,a[r]||{}),a[r]=o):a[r]=A(a[r]||{},o)}}(),z.tag=function(e,t,n,r,o){return h(r)&&(o=r,/^[\w\-]+\s?=/.test(n)?(r=n,n=""):r=""),n&&(h(n)?o=n:de.add(n)),e=e.toLowerCase(),W[e]={name:e,tmpl:t,attrs:r,fn:o},e},z.tag2=function(e,t,n,r,o){return n&&de.add(n),W[e]={name:e,tmpl:t,attrs:r,fn:o},e},z.mount=function(e,t,n){function r(e){var t="";return g(e,function(e){/[^-\w]/.test(e)||(e=e.trim().toLowerCase(),t+=",["+ee+'="'+e+'"],['+J+'="'+e+'"]')}),t}function o(){var e=Object.keys(W);return e+r(e)}function i(e){if(e.tagName){var r=_(e,ee)||_(e,J);t&&r!==t&&(r=t,N(e,ee,t),N(e,J,t));var o=V(e,r||e.tagName.toLowerCase(),n);o&&f.push(o)}else e.length&&g(e,i)}var a,u,f=[];if(de.inject(),b(t)&&(n=t,t=0),typeof e===te?("*"===e?e=u=o():e+=r(e.split(/, */)),a=e?B(e):[]):a=e,"*"===t){if(t=u||o(),a.tagName)a=B(t,a);else{var s=[];g(a,function(e){s.push(B(t,e))}),a=s}t=0}return i(a),f},z.update=function(){return g(Q,function(e){e.update()})},z.vdom=Q,z.Tag=c,typeof exports===ne?module.exports=z:typeof define===oe&&typeof define.amd!==re?define(function(){return z}):e.riot=z}("undefined"!=typeof window?window:void 0);
/* Riot v2.6.0, @license MIT */
!function(e,t){"use strict";function n(e,t,n){var r={};return r[e.key]=t,e.pos&&(r[e.pos]=n),r}function r(e,t){for(var n,r=t.length,o=e.length;r>o;)n=t[--r],t.splice(r,1),n.unmount()}function o(e,t){Object.keys(e.tags).forEach(function(n){var r=e.tags[n];R(r)?g(r,function(e){O(e,n,t)}):O(r,n,t)})}function i(e,t,n){var r,o=e._root;for(e._virts=[];o;)r=o.nextSibling,n?t.insertBefore(o,n._root):t.appendChild(o),e._virts.push(o),o=r}function a(e,t,n,r){for(var o,i=e._root,a=0;a<r;a++)o=i.nextSibling,t.insertBefore(i,n._root),i=o}function u(e,t,u){x(e,"each");var f,c=typeof _(e,"no-reorder")!==te||x(e,"no-reorder"),l=S(e),p=W[l]||{tmpl:m(e)},d=ue.test(l),g=e.parentNode,h=document.createTextNode(""),v=C(e),y="option"===l.toLowerCase(),b=[],w=[],N="VIRTUAL"==e.tagName;u=de.loopKeys(u),g.insertBefore(h,e),t.one("before-mount",function(){e.parentNode.removeChild(e),g.stub&&(g=t.root)}).on("update",function(){var m=de(u.val,t),x=document.createDocumentFragment();R(m)||(f=m||!1,m=f?Object.keys(m).map(function(e){return n(u,e,m[e])}):[]);for(var _=0,C=m.length;_<C;_++){var L=m[_],O=c&&typeof L==ne&&!f,T=w.indexOf(L),E=~T&&O?T:_,S=b[E];L=!f&&u.key?n(u,L,_):L,!O&&!S||O&&!~T||!S?(S=new s(p,{parent:t,isLoop:!0,hasImpl:!!W[l],root:d?g:e.cloneNode(),item:L},e.innerHTML),S.mount(),N&&(S._root=S.root.firstChild),_!=b.length&&b[_]?(N?i(S,g,b[_]):g.insertBefore(S.root,b[_].root),w.splice(_,0,L)):N?i(S,x):x.appendChild(S.root),b.splice(_,0,S),E=_):S.update(L,!0),E!==_&&O&&b[_]&&(N?a(S,g,b[_],e.childNodes.length):b[_].root.parentNode&&g.insertBefore(S.root,b[_].root),u.pos&&(S[u.pos]=_),b.splice(_,0,b.splice(E,1)[0]),w.splice(_,0,w.splice(E,1)[0]),!v&&S.tags&&o(S,_)),S._item=L,M(S,"_parent",t)}if(r(m,b),g.insertBefore(x,h),y&&le&&!g.multiple)for(var j=0;j<g.length;j++)if(g[j].__riot1374){g.selectedIndex=j,delete g[j].__riot1374;break}v&&(t.tags[l]=b),w=m.slice()})}function f(e,t,n,r){I(e,function(e){if(1==e.nodeType){if(e.isLoop=e.isLoop||e.parentNode&&e.parentNode.isLoop||_(e,"each")?1:0,n){var o=C(e);o&&!e.isLoop&&n.push(T(o,{root:e,parent:t},e.innerHTML,t))}e.isLoop&&!r||G(e,t,[])}})}function c(e,t,n){function r(e,t,r){de.hasExpr(t)&&n.push(j({dom:e,expr:t},r))}I(e,function(e){var n,o=e.nodeType;if(3==o&&"STYLE"!=e.parentNode.tagName&&r(e,e.nodeValue),1==o)return(n=_(e,"each"))?(u(e,t,n),!1):(g(e.attributes,function(t){var n=t.name,o=n.split("__")[1];if(r(e,t.value,{attr:o||n,bool:o}),o)return x(e,n),!1}),!C(e)&&void 0)})}function s(e,n,r){function o(){var e=_&&y?p:v||p;g(T.attributes,function(t){var n=t.value;m[w(t.name)]=de.hasExpr(n)?de(n,e):n}),g(Object.keys(I),function(t){m[w(t)]=de(I[t],e)})}function i(e){for(var t in C)typeof p[t]!==re&&k(p,t)&&(p[t]=e[t])}function a(e){g(Object.keys(e),function(t){var n=!fe.test(t)&&A(D,t);(typeof p[t]===re||n)&&(n||D.push(t),p[t]=e[t])})}function u(e){p.update(e,!0)}function s(e){if(g(O,function(t){t[e?"mount":"unmount"]()}),v){var t=e?"on":"off";y?v[t]("unmount",p.unmount):v[t]("update",u)[t]("unmount",p.unmount)}}var l,p=z.observable(this),m=K(n.opts)||{},v=n.parent,y=n.isLoop,_=n.hasImpl,C=$(n.item),L=[],O=[],T=n.root,S=T.tagName.toLowerCase(),I={},D=[];e.name&&T._tag&&T._tag.unmount(!0),this.isMounted=!1,T.isLoop=y,T._tag=this,M(this,"_riot_id",++Z),j(this,{parent:v,root:T,opts:m},C),M(this,"tags",{}),g(T.attributes,function(e){var t=e.value;de.hasExpr(t)&&(I[e.name]=t)}),l=ge(e.tmpl,r),M(this,"update",function(e,t){return e=$(e),y&&a(p.parent),e&&b(C)&&(i(e),C=e),j(p,e),o(),p.trigger("update",e),d(L,p),t&&p.parent?p.parent.one("updated",function(){p.trigger("updated")}):me(function(){p.trigger("updated")}),this}),M(this,"mixin",function(){return g(arguments,function(e){var t,n,r=[];e=typeof e===te?z.mixin(e):e,t=h(e)?new e:e;do r=r.concat(Object.getOwnPropertyNames(n||t));while(n=Object.getPrototypeOf(n||t));g(r,function(e){if("init"!=e){var n=Object.getOwnPropertyDescriptor(t,e),r=n&&(n.get||n.set);!p.hasOwnProperty(e)&&r?Object.defineProperty(p,e,n):p[e]=h(t[e])?t[e].bind(p):t[e]}}),t.init&&t.init.bind(p)()}),this}),M(this,"mount",function(){o();var t=z.mixin(X);if(t)for(var n in t)t.hasOwnProperty(n)&&p.mixin(t[n]);if(p._parent&&a(p._parent),e.fn&&e.fn.call(p,m),c(l,p,L),s(!0),e.attrs&&P(e.attrs,function(e,t){N(T,e,t)}),(e.attrs||_)&&c(p.root,p,L),p.parent&&!y||p.update(C),p.trigger("before-mount"),y&&!_)T=l.firstChild;else{for(;l.firstChild;)T.appendChild(l.firstChild);T.stub&&(T=v.root)}M(p,"root",T),y&&f(p.root,p.parent,null,!0),!p.parent||p.parent.isMounted?(p.isMounted=!0,p.trigger("mount")):p.parent.one("mount",function(){H(p.root)||(p.parent.isMounted=p.isMounted=!0,p.trigger("mount"))})}),M(this,"unmount",function(e){var n,r=T,o=r.parentNode,i=Q.indexOf(p);if(p.trigger("before-unmount"),~i&&Q.splice(i,1),o){if(v)n=E(v),R(n.tags[S])?g(n.tags[S],function(e,t){e._riot_id==p._riot_id&&n.tags[S].splice(t,1)}):n.tags[S]=t;else for(;r.firstChild;)r.removeChild(r.firstChild);e?(x(o,ee),x(o,J)):o.removeChild(r)}this._virts&&g(this._virts,function(e){e.parentNode&&e.parentNode.removeChild(e)}),p.trigger("unmount"),s(),p.off("*"),p.isMounted=!1,delete T._tag}),f(l,this,O)}function l(t,n,r,o){r[t]=function(t){var i,a=o._parent,u=o._item;if(!u)for(;a&&!u;)u=a._item,a=a._parent;t=t||e.event,k(t,"currentTarget")&&(t.currentTarget=r),k(t,"target")&&(t.target=t.srcElement),k(t,"which")&&(t.which=t.charCode||t.keyCode),t.item=u,n.call(o,t)===!0||/radio|check/.test(r.type)||(t.preventDefault&&t.preventDefault(),t.returnValue=!1),t.preventUpdate||(i=u?E(a):o,i.update())}}function p(e,t,n){e&&(e.insertBefore(n,t),e.removeChild(t))}function d(e,t){g(e,function(e,n){var r=e.dom,o=e.attr,i=de(e.expr,t),a=e.dom.parentNode;if(e.bool?i=!!i:null==i&&(i=""),e.value!==i){if(e.value=i,!o)return i+="",void(a&&("TEXTAREA"===a.tagName?(a.value=i,se||(r.nodeValue=i)):r.nodeValue=i));if("value"===o)return void(r.value!=i&&(r.value=i));if(x(r,o),h(i))l(o,i,r,t);else if("if"==o){var u=e.stub,f=function(){p(u.parentNode,u,r)},c=function(){p(r.parentNode,r,u)};i?u&&(f(),r.inStub=!1,H(r)||I(r,function(e){e._tag&&!e._tag.isMounted&&(e._tag.isMounted=!!e._tag.trigger("mount"))})):(u=e.stub=u||document.createTextNode(""),r.parentNode?c():(t.parent||t).one("updated",c),r.inStub=!0)}else"show"===o?r.style.display=i?"":"none":"hide"===o?r.style.display=i?"none":"":e.bool?(r[o]=i,i&&N(r,o,o),le&&"selected"===o&&"OPTION"===r.tagName&&(r.__riot1374=i)):(0===i||i&&typeof i!==ne)&&(U(o,Y)&&o!=J&&(o=o.slice(Y.length)),N(r,o,i))}})}function g(e,t){for(var n,r=e?e.length:0,o=0;o<r;o++)n=e[o],null!=n&&t(n,o)===!1&&o--;return e}function h(e){return typeof e===oe||!1}function m(e){if(e.outerHTML)return e.outerHTML;var t=D("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}function v(e,t){if(typeof e.innerHTML!=re)e.innerHTML=t;else{var n=(new DOMParser).parseFromString(t,"application/xml");e.appendChild(e.ownerDocument.importNode(n.documentElement,!0))}}function y(e){return~ce.indexOf(e)}function b(e){return e&&typeof e===ne}function x(e,t){e.removeAttribute(t)}function w(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function _(e,t){return e.getAttribute(t)}function N(e,t,n){var r=ae.exec(t);r&&r[1]?e.setAttributeNS(ie,r[1],n):e.setAttribute(t,n)}function C(e){return e.tagName&&W[_(e,ee)||_(e,J)||e.tagName.toLowerCase()]}function L(e,t,n){var r=n.tags[t];r?(R(r)||r!==e&&(n.tags[t]=[r]),A(n.tags[t],e)||n.tags[t].push(e)):n.tags[t]=e}function O(e,t,n){var r,o=e.parent;o&&(r=o.tags[t],R(r)?r.splice(n,0,r.splice(r.indexOf(e),1)[0]):L(e,t,o))}function T(e,t,n,r){var o=new s(e,t,n),i=S(t.root),a=E(r);return o.parent=a,o._parent=r,L(o,i,a),a!==r&&L(o,i,r),t.root.innerHTML="",o}function E(e){for(var t=e;!C(t.root)&&t.parent;)t=t.parent;return t}function M(e,t,n,r){return Object.defineProperty(e,t,j({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function S(e){var t=C(e),n=_(e,"name"),r=n&&!de.hasExpr(n)?n:t?t.name:e.tagName.toLowerCase();return r}function j(e){for(var t,n=arguments,r=1;r<n.length;++r)if(t=n[r])for(var o in t)k(e,o)&&(e[o]=t[o]);return e}function A(e,t){return~e.indexOf(t)}function R(e){return Array.isArray(e)||e instanceof Array}function k(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return typeof e[t]===re||n&&n.writable}function $(e){if(!(e instanceof s||e&&typeof e.trigger==oe))return e;var t={};for(var n in e)fe.test(n)||(t[n]=e[n]);return t}function I(e,t){if(e){if(t(e)===!1)return;for(e=e.firstChild;e;)I(e,t),e=e.nextSibling}}function P(e,t){for(var n,r=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g;n=r.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function H(e){for(;e;){if(e.inStub)return!0;e=e.parentNode}return!1}function D(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg","svg"):document.createElement(e)}function F(e,t){return(t||document).querySelectorAll(e)}function B(e,t){return(t||document).querySelector(e)}function K(e){function t(){}return t.prototype=e,new t}function q(e){return _(e,"id")||_(e,"name")}function G(e,t,n){var r,o=q(e),i=function(i){A(n,o)||(r=R(i),i?(!r||r&&!A(i,e))&&(r?i.push(e):t[o]=[i,e]):t[o]=e)};o&&(de.hasExpr(o)?t.one("mount",function(){o=q(e),i(t[o])}):i(t[o]))}function U(e,t){return e.slice(0,t.length)===t}function V(e,t,n){var r=W[t],o=e._innerHTML=e._innerHTML||e.innerHTML;return e.innerHTML="",r&&e&&(r=new s(r,{root:e,opts:n},o)),r&&r.mount&&(r.mount(),A(Q,r)||Q.push(r)),r}var z={version:"v2.6.0",settings:{}},Z=0,Q=[],W={},X="__global_mixin",Y="riot-",J=Y+"tag",ee="data-is",te="string",ne="object",re="undefined",oe="function",ie="http://www.w3.org/1999/xlink",ae=/^xlink:(\w+)/,ue=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,fe=/^(?:_(?:item|id|parent)|update|root|(?:un)?mount|mixin|is(?:Mounted|Loop)|tags|parent|opts|trigger|o(?:n|ff|ne))$/,ce=["altGlyph","animate","animateColor","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","filter","font","foreignObject","g","glyph","glyphRef","image","line","linearGradient","marker","mask","missing-glyph","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tref","tspan","use"],se=0|(e&&e.document||{}).documentMode,le=e&&!!e.InstallTrigger;z.observable=function(e){function t(e,t){for(var n=e.split(" "),r=n.length,o=0;o<r;o++){var i=n[o];i&&t(i,o)}}e=e||{};var n={},r=Array.prototype.slice;return Object.defineProperties(e,{on:{value:function(r,o){return"function"!=typeof o?e:(t(r,function(e,t){(n[e]=n[e]||[]).push(o),o.typed=t>0}),e)},enumerable:!1,writable:!1,configurable:!1},off:{value:function(r,o){return"*"!=r||o?t(r,function(e,t){if(o)for(var r,i=n[e],a=0;r=i&&i[a];++a)r==o&&i.splice(a--,1);else delete n[e]}):n={},e},enumerable:!1,writable:!1,configurable:!1},one:{value:function(t,n){function r(){e.off(t,r),n.apply(e,arguments)}return e.on(t,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(o){for(var i,a=arguments.length-1,u=new Array(a),f=0;f<a;f++)u[f]=arguments[f+1];return t(o,function(t,o){i=r.call(n[t]||[],0);for(var a,f=0;a=i[f];++f)a.busy||(a.busy=1,a.apply(e,a.typed?[t].concat(u):u),i[f]!==a&&f--,a.busy=0);n["*"]&&"*"!=t&&e.trigger.apply(e,["*",t].concat(u))}),e},enumerable:!1,writable:!1,configurable:!1}}),e},function(t){function n(e){return e.split(/[\/?#]/)}function r(e,t){var n=new RegExp("^"+t[C](/\*/g,"([^/?#]+?)")[C](/\.\./,".*")+"$"),r=e.match(n);if(r)return r.slice(1)}function o(e,t){var n;return function(){clearTimeout(n),n=setTimeout(e,t)}}function i(e){g=o(l,1),M[_](L,g),M[_](O,g),S[_](k,p),e&&l(!0)}function a(){this.$=[],t.observable(this),I.on("stop",this.s.bind(this)),I.on("emit",this.e.bind(this))}function u(e){return e[C](/^\/|\/$/,"")}function f(e){return"string"==typeof e}function c(e){return(e||A.href)[C](b,"")}function s(e){return"#"==h[0]?(e||A.href||"").split(h)[1]||"":(A?c(e):e||"")[C](h,"")}function l(e){var t,n=0==D;if(!(E<=D)&&(D++,H.push(function(){var t=s();(e||t!=m)&&(I[T]("emit",t),m=t)}),n)){for(;t=H.shift();)t();D=0}}function p(e){if(!(1!=e.which||e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented)){for(var t=e.target;t&&"A"!=t.nodeName;)t=t.parentNode;!t||"A"!=t.nodeName||t[N]("download")||!t[N]("href")||t.target&&"_self"!=t.target||t.href.indexOf(A.href.match(b)[0])==-1||t.href!=A.href&&(t.href.split("#")[0]==A.href.split("#")[0]||"#"!=h[0]&&0!==c(t.href).indexOf(h)||"#"==h[0]&&t.href.split(h)[0]!=A.href.split(h)[0]||!d(s(t.href),t.title||S.title))||e.preventDefault()}}function d(e,t,n){return j?(e=h+u(e),t=t||S.title,n?j.replaceState(null,t,e):j.pushState(null,t,e),S.title=t,P=!1,l(),P):I[T]("emit",s(e))}var g,h,m,v,y,b=/^.+?\/\/+[^\/]+/,x="EventListener",w="remove"+x,_="add"+x,N="hasAttribute",C="replace",L="popstate",O="hashchange",T="trigger",E=3,M="undefined"!=typeof e&&e,S="undefined"!=typeof document&&document,j=M&&history,A=M&&(j.location||M.location),R=a.prototype,k=S&&S.ontouchstart?"touchstart":"click",$=!1,I=t.observable(),P=!1,H=[],D=0;R.m=function(e,t,n){!f(e)||t&&!f(t)?t?this.r(e,t):this.r("@",e):d(e,t,n||!1)},R.s=function(){this.off("*"),this.$=[]},R.e=function(e){this.$.concat("@").some(function(t){var n=("@"==t?v:y)(u(e),u(t));if("undefined"!=typeof n)return this[T].apply(null,[t].concat(n)),P=!0},this)},R.r=function(e,t){"@"!=e&&(e="/"+u(e),this.$.push(e)),this.on(e,t)};var F=new a,B=F.m.bind(F);B.create=function(){var e=new a,t=e.m.bind(e);return t.stop=e.s.bind(e),t},B.base=function(e){h=e||"#",m=s()},B.exec=function(){l(!0)},B.parser=function(e,t){e||t||(v=n,y=r),e&&(v=e),t&&(y=t)},B.query=function(){var e={},t=A.href||m;return t[C](/[?&](.+?)=([^&]*)/g,function(t,n,r){e[n]=r}),e},B.stop=function(){$&&(M&&(M[w](L,g),M[w](O,g),S[w](k,p)),I[T]("stop"),$=!1)},B.start=function(e){$||(M&&("complete"==document.readyState?i(e):M[_]("load",function(){setTimeout(function(){i(e)},1)})),$=!0)},B.base(),B.parser(),t.route=B}(z);var pe=function(e){function t(e){return e}function n(e,t){return t||(t=b),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?c:"")}function r(e){if(e===m)return v;var t=e.split(" ");if(2!==t.length||d.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(g,"\\").split(" ")),t[4]=n(t[1].length>1?/{[\S\s]*?}/:v[4],t),t[5]=n(e.length>3?/\\({|})/g:v[5],t),t[6]=n(v[6],t),t[7]=RegExp("\\\\("+t[3]+")|([[({])|("+t[3]+")|"+p,c),t[8]=e,t}function o(e){return e instanceof RegExp?u(e):b[e]}function i(e){(e||(e=m))!==b[8]&&(b=r(e),u=e===m?t:n,b[9]=u(v[9])),y=e}function a(e){var t;e=e||{},t=e.brackets,Object.defineProperty(e,"brackets",{set:i,get:function(){return y},enumerable:!0}),f=e,i(t)}var u,f,c="g",s=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,l=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'/g,p=l.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?(\/)[gim]*/.source,d=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),g=/(?=[[\]()*+?.^$|])/g,h={"(":RegExp("([()])|"+p,c),"[":RegExp("([[\\]])|"+p,c),"{":RegExp("([{}])|"+p,c)},m="{ }",v=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+p,c),m,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],y=e,b=[];return o.split=function(e,t,n){function r(e){t||a?c.push(e&&e.replace(n[5],"$1")):c.push(e)}function o(e,t,n){var r,o=h[t];for(o.lastIndex=n,n=1;(r=o.exec(e))&&(!r[1]||(r[1]===t?++n:--n)););return n?e.length:o.lastIndex}n||(n=b);var i,a,u,f,c=[],s=n[6];for(a=u=s.lastIndex=0;i=s.exec(e);){if(f=i.index,a){if(i[2]){s.lastIndex=o(e,i[2],s.lastIndex);continue}if(!i[3])continue}i[1]||(r(e.slice(u,f)),u=s.lastIndex,s=n[6+(a^=1)],s.lastIndex=u)}return e&&u<e.length&&r(e.slice(u)),c},o.hasExpr=function(e){return b[4].test(e)},o.loopKeys=function(e){var t=e.match(b[9]);return t?{key:t[1],pos:t[2],val:b[0]+t[3].trim()+b[1]}:{val:e.trim()}},o.array=function(e){return e?r(e):b},Object.defineProperty(o,"settings",{set:a,get:function(){return f}}),o.settings="undefined"!=typeof z&&z.settings||{},o.set=i,o.R_STRINGS=l,o.R_MLCOMMS=s,o.S_QBLOCKS=p,o}(),de=function(){function t(e,t){return e?(u[e]||(u[e]=r(e))).call(t,n):e}function n(e,n){t.errorHandler&&(e.riotData={tagName:n&&n.root&&n.root.tagName,_riot_id:n&&n._riot_id},t.errorHandler(e))}function r(e){var t=o(e);return"try{return "!==t.slice(0,11)&&(t="return "+t),new Function("E",t+";")}function o(e){var t,n=[],r=pe.split(e.replace(l,'"'),1);if(r.length>2||r[0]){var o,a,u=[];for(o=a=0;o<r.length;++o)t=r[o],t&&(t=1&o?i(t,1,n):'"'+t.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(u[a++]=t);t=a<2?u[0]:"["+u.join(",")+'].join("")'}else t=i(r[1],0,n);return n[0]&&(t=t.replace(p,function(e,t){return n[t].replace(/\r/g,"\\r").replace(/\n/g,"\\n")})),t}function i(e,t,n){function r(t,n){var r,o=1,i=d[t];for(i.lastIndex=n.lastIndex;r=i.exec(e);)if(r[0]===t)++o;else if(!--o)break;n.lastIndex=o?e.length:i.lastIndex}if(e=e.replace(s,function(e,t){return e.length>2&&!t?f+(n.push(e)-1)+"~":e}).replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var o,i=[],u=0;e&&(o=e.match(c))&&!o.index;){var l,p,g=/,|([[{(])|$/g;for(e=RegExp.rightContext,l=o[2]?n[o[2]].slice(1,-1).trim().replace(/\s+/g," "):o[1];p=(o=g.exec(e))[1];)r(p,g);p=e.slice(0,o.index),e=RegExp.rightContext,i[u++]=a(p,1,l)}e=u?u>1?"["+i.join(",")+'].join(" ").trim()':i[0]:a(e,t)}return e}function a(e,t,n){var r;return e=e.replace(h,function(e,t,n,o,i){return n&&(o=r?0:o+e.length,"this"!==n&&"global"!==n&&"window"!==n?(e=t+'("'+n+g+n,o&&(r="."===(i=i[o])||"("===i||"["===i)):o&&(r=!m.test(i.slice(o)))),e}),r&&(e="try{return "+e+"}catch(e){E(e,this)}"),n?e=(r?"function(){"+e+"}.call(this)":"("+e+")")+'?"'+n+'":""':t&&(e="function(v){"+(r?e.replace("return ","v="):"v=("+e+")")+';return v||v===0?v:""}.call(this)'),e}var u={};t.haveRaw=pe.hasRaw,t.hasExpr=pe.hasExpr,t.loopKeys=pe.loopKeys,t.clearCache=function(){u={}},t.errorHandler=null;var f="⁗",c=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,s=RegExp(pe.S_QBLOCKS,"g"),l=/\u2057/g,p=/\u2057(\d+)~/g,d={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},g='"in this?this:'+("object"!=typeof e?"global":"window")+").",h=/[,{][$\w]+(?=:)|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,m=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return t.version=pe.version="v2.4.1",t}(),ge=function e(){function e(e,r){var o=e&&e.match(/^\s*<([-\w]+)/),i=o&&o[1].toLowerCase(),a=D("div",y(i));return e=n(e,r),f.test(i)?a=t(a,e,i):v(a,e),a.stub=!0,a}function t(e,t,n){var r="o"===n[0],o=r?"select>":"table>";if(e.innerHTML="<"+o+t.trim()+"</"+o,o=e.firstChild,r)o.selectedIndex=-1;else{var i=u[n];i&&1===o.childElementCount&&(o=B(i,o))}return o}function n(e,t){if(!r.test(e))return e;var n={};return t=t&&t.replace(i,function(e,t,r){return n[t]=n[t]||r,""}).trim(),e.replace(a,function(e,t,r){return n[t]||r||""}).replace(o,function(e,n){return t||n||""})}var r=/<yield\b/i,o=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>|>)/gi,i=/<yield\s+to=['"]([^'">]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,a=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,u={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},f=se&&se<10?ue:/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/;return e}(),he=function(t){if(!e)return{add:function(){},inject:function(){}};var n=function(){var e=D("style");N(e,"type","text/css");var t=B("style[type=riot]");return t?(t.id&&(e.id=t.id),t.parentNode.replaceChild(e,t)):document.getElementsByTagName("head")[0].appendChild(e),e}(),r=n.styleSheet,o="";return Object.defineProperty(t,"styleNode",{value:n,writable:!0}),{add:function(e){o+=e},inject:function(){o&&(r?r.cssText+=o:n.innerHTML+=o,o="")}}}(z),me=function(e){var t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame;if(!t||/iP(ad|hone|od).*OS 6/.test(e.navigator.userAgent)){var n=0;t=function(e){var t=Date.now(),r=Math.max(16-(t-n),0);setTimeout(function(){e(n=t+r)},r)}}return t}(e||{});z.util={brackets:pe,tmpl:de},z.mixin=function(){var e={},t=e[X]={},n=0;return function(r,o,i){if(b(r))return void z.mixin("__unnamed_"+n++,r,!0);var a=i?t:e;if(!o){if(typeof a[r]===re)throw new Error("Unregistered mixin: "+r);return a[r]}h(o)?(j(o.prototype,a[r]||{}),a[r]=o):a[r]=j(a[r]||{},o)}}(),z.tag=function(e,t,n,r,o){return h(r)&&(o=r,/^[\w\-]+\s?=/.test(n)?(r=n,n=""):r=""),n&&(h(n)?o=n:he.add(n)),e=e.toLowerCase(),W[e]={name:e,tmpl:t,attrs:r,fn:o},e},z.tag2=function(e,t,n,r,o){return n&&he.add(n),W[e]={name:e,tmpl:t,attrs:r,fn:o},e},z.mount=function(e,t,n){function r(e){var t="";return g(e,function(e){/[^-\w]/.test(e)||(e=e.trim().toLowerCase(),t+=",["+ee+'="'+e+'"],['+J+'="'+e+'"]')}),t}function o(){var e=Object.keys(W);return e+r(e)}function i(e){if(e.tagName){var r=_(e,ee)||_(e,J);t&&r!==t&&(r=t,N(e,ee,t),N(e,J,t));var o=V(e,r||e.tagName.toLowerCase(),n);o&&f.push(o)}else e.length&&g(e,i)}var a,u,f=[];if(he.inject(),b(t)&&(n=t,t=0),typeof e===te?("*"===e?e=u=o():e+=r(e.split(/, */)),a=e?F(e):[]):a=e,"*"===t){if(t=u||o(),a.tagName)a=F(t,a);else{var c=[];g(a,function(e){c.push(F(t,e))}),a=c}t=0}return i(a),f},z.update=function(){return g(Q,function(e){e.update()})},z.vdom=Q,z.Tag=s,typeof exports===ne?module.exports=z:typeof define===oe&&typeof define.amd!==re?define(function(){return z}):e.riot=z}("undefined"!=typeof window?window:void 0);

@@ -1,2 +0,2 @@

/* Riot v2.5.0, @license MIT */
!function(e,t){"use strict";function n(e,t,n){var r={};return r[e.key]=t,e.pos&&(r[e.pos]=n),r}function r(e,t){for(var n,r=t.length,o=e.length;r>o;)n=t[--r],t.splice(r,1),n.unmount()}function o(e,t){Object.keys(e.tags).forEach(function(n){var r=e.tags[n];A(r)?g(r,function(e){E(e,n,t)}):E(r,n,t)})}function i(e,t,n){var r,o=e._root;for(e._virts=[];o;)r=o.nextSibling,n?t.insertBefore(o,n._root):t.appendChild(o),e._virts.push(o),o=r}function a(e,t,n,r){for(var o,i=e._root,a=0;a<r;a++)o=i.nextSibling,t.insertBefore(i,n._root),i=o}function u(e,t,u){b(e,"each");var s,c=typeof _(e,"no-reorder")!==ne||b(e,"no-reorder"),l=M(e),p=X[l]||{tmpl:h(e)},d=ae.test(l),g=e.parentNode,m=document.createTextNode(""),v=S(e),x="option"===l.toLowerCase(),y=[],w=[],C="VIRTUAL"==e.tagName;u=pe.loopKeys(u),g.insertBefore(m,e),t.one("before-mount",function(){e.parentNode.removeChild(e),g.stub&&(g=t.root)}).on("update",function(){var h=pe(u.val,t),b=document.createDocumentFragment();A(h)||(s=h||!1,h=s?Object.keys(h).map(function(e){return n(u,e,h[e])}):[]);for(var _=0,S=h.length;_<S;_++){var O=h[_],E=c&&typeof O==re&&!s,N=w.indexOf(O),L=~N&&E?N:_,M=y[L];O=!s&&u.key?n(u,O,_):O,!E&&!M||E&&!~N||!M?(M=new f(p,{parent:t,isLoop:!0,hasImpl:!!X[l],root:d?g:e.cloneNode(),item:O},e.innerHTML),M.mount(),C&&(M._root=M.root.firstChild),_!=y.length&&y[_]?(C?i(M,g,y[_]):g.insertBefore(M.root,y[_].root),w.splice(_,0,O)):C?i(M,b):b.appendChild(M.root),y.splice(_,0,M),L=_):M.update(O,!0),L!==_&&E&&y[_]&&(C?a(M,g,y[_],e.childNodes.length):g.insertBefore(M.root,y[_].root),u.pos&&(M[u.pos]=_),y.splice(_,0,y.splice(L,1)[0]),w.splice(_,0,w.splice(L,1)[0]),!v&&M.tags&&o(M,_)),M._item=O,j(M,"_parent",t)}if(r(h,y),g.insertBefore(b,m),x&&fe&&!g.multiple)for(var T=0;T<g.length;T++)if(g[T].__riot1374){g.selectedIndex=T,delete g[T].__riot1374;break}v&&(t.tags[l]=y),w=h.slice()})}function s(e,t,n,r){k(e,function(e){if(1==e.nodeType){if(e.isLoop=e.isLoop||e.parentNode&&e.parentNode.isLoop||_(e,"each")?1:0,n){var o=S(e);o&&!e.isLoop&&n.push(N(o,{root:e,parent:t},e.innerHTML,t))}e.isLoop&&!r||K(e,t,[])}})}function c(e,t,n){function r(e,t,r){pe.hasExpr(t)&&n.push(T({dom:e,expr:t},r))}k(e,function(e){var n,o=e.nodeType;if(3==o&&"STYLE"!=e.parentNode.tagName&&r(e,e.nodeValue),1==o)return(n=_(e,"each"))?(u(e,t,n),!1):(g(e.attributes,function(t){var n=t.name,o=n.split("__")[1];if(r(e,t.value,{attr:o||n,bool:o}),o)return b(e,n),!1}),!S(e)&&void 0)})}function f(e,n,r){function o(){var e=_&&x?p:v||p;g(N.attributes,function(t){var n=t.value;h[w(t.name)]=pe.hasExpr(n)?pe(n,e):n}),g(Object.keys(k),function(t){h[w(t)]=pe(k[t],e)})}function i(e){for(var t in S)typeof p[t]!==oe&&I(p,t)&&(p[t]=e[t])}function a(){p.parent&&x&&g(Object.keys(p.parent),function(e){var t=!ue.test(e)&&R(H,e);(typeof p[e]===oe||t)&&(t||H.push(e),p[e]=p.parent[e])})}function u(e){p.update(e,!0)}function f(e){if(g(E,function(t){t[e?"mount":"unmount"]()}),v){var t=e?"on":"off";x?v[t]("unmount",p.unmount):v[t]("update",u)[t]("unmount",p.unmount)}}var l,p=V.observable(this),h=D(n.opts)||{},v=n.parent,x=n.isLoop,_=n.hasImpl,S=$(n.item),O=[],E=[],N=n.root,M=N.tagName.toLowerCase(),k={},H=[];e.name&&N._tag&&N._tag.unmount(!0),this.isMounted=!1,N.isLoop=x,N._tag=this,j(this,"_riot_id",++Q),T(this,{parent:v,root:N,opts:h},S),j(this,"tags",{}),g(N.attributes,function(e){var t=e.value;pe.hasExpr(t)&&(k[e.name]=t)}),l=de(e.tmpl,r),j(this,"update",function(e,t){return e=$(e),a(),e&&y(S)&&(i(e),S=e),T(p,e),o(),p.trigger("update",e),d(O,p),t&&p.parent?p.parent.one("updated",function(){p.trigger("updated")}):me(function(){p.trigger("updated")}),this}),j(this,"mixin",function(){return g(arguments,function(e){var t,n,r=[];e=typeof e===ne?V.mixin(e):e,t=m(e)?new e:e;do r=r.concat(Object.getOwnPropertyNames(n||t));while(n=Object.getPrototypeOf(n||t));g(r,function(e){"init"==e||p[e]||(p[e]=m(t[e])?t[e].bind(p):t[e])}),t.init&&t.init.bind(p)()}),this}),j(this,"mount",function(){o();var t=V.mixin(J);if(t)for(var n in t)t.hasOwnProperty(n)&&p.mixin(t[n]);if(e.fn&&e.fn.call(p,h),c(l,p,O),f(!0),e.attrs&&F(e.attrs,function(e,t){C(N,e,t)}),(e.attrs||_)&&c(p.root,p,O),p.parent&&!x||p.update(S),p.trigger("before-mount"),x&&!_)N=l.firstChild;else{for(;l.firstChild;)N.appendChild(l.firstChild);N.stub&&(N=v.root)}j(p,"root",N),x&&s(p.root,p.parent,null,!0),!p.parent||p.parent.isMounted?(p.isMounted=!0,p.trigger("mount")):p.parent.one("mount",function(){P(p.root)||(p.parent.isMounted=p.isMounted=!0,p.trigger("mount"))})}),j(this,"unmount",function(e){var n,r=N,o=r.parentNode,i=W.indexOf(p);if(p.trigger("before-unmount"),~i&&W.splice(i,1),o){if(v)n=L(v),A(n.tags[M])?g(n.tags[M],function(e,t){e._riot_id==p._riot_id&&n.tags[M].splice(t,1)}):n.tags[M]=t;else for(;r.firstChild;)r.removeChild(r.firstChild);e?(b(o,te),b(o,ee)):o.removeChild(r)}this._virts&&g(this._virts,function(e){e.parentNode&&e.parentNode.removeChild(e)}),p.trigger("unmount"),f(),p.off("*"),p.isMounted=!1,delete N._tag}),s(l,this,E)}function l(t,n,r,o){r[t]=function(t){var i,a=o._parent,u=o._item;if(!u)for(;a&&!u;)u=a._item,a=a._parent;t=t||e.event,I(t,"currentTarget")&&(t.currentTarget=r),I(t,"target")&&(t.target=t.srcElement),I(t,"which")&&(t.which=t.charCode||t.keyCode),t.item=u,n.call(o,t)===!0||/radio|check/.test(r.type)||(t.preventDefault&&t.preventDefault(),t.returnValue=!1),t.preventUpdate||(i=u?L(a):o,i.update())}}function p(e,t,n){e&&(e.insertBefore(n,t),e.removeChild(t))}function d(e,t){g(e,function(e,n){var r=e.dom,o=e.attr,i=pe(e.expr,t),a=e.dom.parentNode;if(e.bool?i=!!i:null==i&&(i=""),e.value!==i){if(e.value=i,!o)return i+="",void(a&&("TEXTAREA"===a.tagName?(a.value=i,ce||(r.nodeValue=i)):r.nodeValue=i));if("value"===o)return void(r.value=i);if(b(r,o),m(i))l(o,i,r,t);else if("if"==o){var u=e.stub,s=function(){p(u.parentNode,u,r)},c=function(){p(r.parentNode,r,u)};i?u&&(s(),r.inStub=!1,P(r)||k(r,function(e){e._tag&&!e._tag.isMounted&&(e._tag.isMounted=!!e._tag.trigger("mount"))})):(u=e.stub=u||document.createTextNode(""),r.parentNode?c():(t.parent||t).one("updated",c),r.inStub=!0)}else"show"===o?r.style.display=i?"":"none":"hide"===o?r.style.display=i?"none":"":e.bool?(r[o]=i,i&&C(r,o,o),fe&&"selected"===o&&"OPTION"===r.tagName&&(r.__riot1374=i)):(0===i||i&&typeof i!==re)&&(Z(o,Y)&&o!=ee&&(o=o.slice(Y.length)),C(r,o,i))}})}function g(e,t){for(var n,r=e?e.length:0,o=0;o<r;o++)n=e[o],null!=n&&t(n,o)===!1&&o--;return e}function m(e){return typeof e===ie||!1}function h(e){if(e.outerHTML)return e.outerHTML;var t=H("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}function v(e,t){if(typeof e.innerHTML!=oe)e.innerHTML=t;else{var n=(new DOMParser).parseFromString(t,"application/xml");e.appendChild(e.ownerDocument.importNode(n.documentElement,!0))}}function x(e){return~se.indexOf(e)}function y(e){return e&&typeof e===re}function b(e,t){e.removeAttribute(t)}function w(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function _(e,t){return e.getAttribute(t)}function C(e,t,n){e.setAttribute(t,n)}function S(e){return e.tagName&&X[_(e,te)||_(e,ee)||e.tagName.toLowerCase()]}function O(e,t,n){var r=n.tags[t];r?(A(r)||r!==e&&(n.tags[t]=[r]),R(n.tags[t],e)||n.tags[t].push(e)):n.tags[t]=e}function E(e,t,n){var r,o=e.parent;o&&(r=o.tags[t],A(r)?r.splice(n,0,r.splice(r.indexOf(e),1)[0]):O(e,t,o))}function N(e,t,n,r){var o=new f(e,t,n),i=M(t.root),a=L(r);return o.parent=a,o._parent=r,O(o,i,a),a!==r&&O(o,i,r),t.root.innerHTML="",o}function L(e){for(var t=e;!S(t.root)&&t.parent;)t=t.parent;return t}function j(e,t,n,r){return Object.defineProperty(e,t,T({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function M(e){var t=S(e),n=_(e,"name"),r=n&&!pe.hasExpr(n)?n:t?t.name:e.tagName.toLowerCase();return r}function T(e){for(var t,n=arguments,r=1;r<n.length;++r)if(t=n[r])for(var o in t)I(e,o)&&(e[o]=t[o]);return e}function R(e,t){return~e.indexOf(t)}function A(e){return Array.isArray(e)||e instanceof Array}function I(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return typeof e[t]===oe||n&&n.writable}function $(e){if(!(e instanceof f||e&&typeof e.trigger==ie))return e;var t={};for(var n in e)ue.test(n)||(t[n]=e[n]);return t}function k(e,t){if(e){if(t(e)===!1)return;for(e=e.firstChild;e;)k(e,t),e=e.nextSibling}}function F(e,t){for(var n,r=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g;n=r.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function P(e){for(;e;){if(e.inStub)return!0;e=e.parentNode}return!1}function H(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg","svg"):document.createElement(e)}function B(e,t){return(t||document).querySelectorAll(e)}function q(e,t){return(t||document).querySelector(e)}function D(e){function t(){}return t.prototype=e,new t}function z(e){return _(e,"id")||_(e,"name")}function K(e,t,n){var r,o=z(e),i=function(i){R(n,o)||(r=A(i),i?(!r||r&&!R(i,e))&&(r?i.push(e):t[o]=[i,e]):t[o]=e)};o&&(pe.hasExpr(o)?t.one("mount",function(){o=z(e),i(t[o])}):i(t[o]))}function Z(e,t){return e.slice(0,t.length)===t}function G(e,t,n){var r=X[t],o=e._innerHTML=e._innerHTML||e.innerHTML;return e.innerHTML="",r&&e&&(r=new f(r,{root:e,opts:n},o)),r&&r.mount&&(r.mount(),R(W,r)||W.push(r)),r}function U(e){var t=e.source,n=e.global?"g":"";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m");for(var r=1;r<arguments.length;r++)t=t.replace("@","\\"+arguments[r]);return new RegExp(t,n)}var V={version:"v2.5.0",settings:{}},Q=0,W=[],X={},J="__global_mixin",Y="riot-",ee=Y+"tag",te="data-is",ne="string",re="object",oe="undefined",ie="function",ae=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,ue=/^(?:_(?:item|id|parent)|update|root|(?:un)?mount|mixin|is(?:Mounted|Loop)|tags|parent|opts|trigger|o(?:n|ff|ne))$/,se=["altGlyph","animate","animateColor","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","filter","font","foreignObject","g","glyph","glyphRef","image","line","linearGradient","marker","mask","missing-glyph","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tref","tspan","use"],ce=0|(e&&e.document||{}).documentMode,fe=e&&!!e.InstallTrigger;V.observable=function(e){function t(e,t){for(var n,r,o=e.split(" "),i=o.length,a=0;a<i;a++)n=o[a],r=n.indexOf("."),n&&t(~r?n.substring(0,r):n,a,~r?n.slice(r+1):null)}e=e||{};var n={},r=Array.prototype.slice;return Object.defineProperties(e,{on:{value:function(r,o){return"function"!=typeof o?e:(t(r,function(e,t,r){(n[e]=n[e]||[]).push(o),o.typed=t>0,o.ns=r}),e)},enumerable:!1,writable:!1,configurable:!1},off:{value:function(r,o){return"*"!=r||o?t(r,function(e,t,r){if(o||r)for(var i,a=n[e],u=0;i=a&&a[u];++u)(i==o||r&&i.ns==r)&&a.splice(u--,1);else delete n[e]}):n={},e},enumerable:!1,writable:!1,configurable:!1},one:{value:function(t,n){function r(){e.off(t,r),n.apply(e,arguments)}return e.on(t,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(o){for(var i,a=arguments.length-1,u=new Array(a),s=0;s<a;s++)u[s]=arguments[s+1];return t(o,function(t,o,a){i=r.call(n[t]||[],0);for(var s,c=0;s=i[c];++c)s.busy||(s.busy=1,a&&s.ns!=a||s.apply(e,s.typed?[t].concat(u):u),i[c]!==s&&c--,s.busy=0);n["*"]&&"*"!=t&&e.trigger.apply(e,["*",t].concat(u))}),e},enumerable:!1,writable:!1,configurable:!1}}),e},function(t){function n(e){return e.split(/[\/?#]/)}function r(e,t){var n=new RegExp("^"+t[S](/\*/g,"([^/?#]+?)")[S](/\.\./,".*")+"$"),r=e.match(n);if(r)return r.slice(1)}function o(e,t){var n;return function(){clearTimeout(n),n=setTimeout(e,t)}}function i(e){g=o(l,1),j[_](O,g),j[_](E,g),M[_](I,p),e&&l(!0)}function a(){this.$=[],t.observable(this),k.on("stop",this.s.bind(this)),k.on("emit",this.e.bind(this))}function u(e){return e[S](/^\/|\/$/,"")}function s(e){return"string"==typeof e}function c(e){return(e||R.href)[S](y,"")}function f(e){return"#"==m[0]?(e||R.href||"").split(m)[1]||"":(R?c(e):e||"")[S](m,"")}function l(e){var t=0==H;if(!(L<=H)&&(H++,P.push(function(){var t=f();(e||t!=h)&&(k[N]("emit",t),h=t)}),t)){for(;P.length;)P[0](),P.shift();H=0}}function p(e){if(!(1!=e.which||e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented)){for(var t=e.target;t&&"A"!=t.nodeName;)t=t.parentNode;!t||"A"!=t.nodeName||t[C]("download")||!t[C]("href")||t.target&&"_self"!=t.target||t.href.indexOf(R.href.match(y)[0])==-1||(t.href==R.href||t.href.split("#")[0]!=R.href.split("#")[0]&&("#"==m||0===c(t.href).indexOf(m))&&d(f(t.href),t.title||M.title))&&e.preventDefault()}}function d(e,t,n){return T?(e=m+u(e),t=t||M.title,n?T.replaceState(null,t,e):T.pushState(null,t,e),M.title=t,F=!1,l(),F):k[N]("emit",f(e))}var g,m,h,v,x,y=/^.+?\/\/+[^\/]+/,b="EventListener",w="remove"+b,_="add"+b,C="hasAttribute",S="replace",O="popstate",E="hashchange",N="trigger",L=3,j="undefined"!=typeof e&&e,M="undefined"!=typeof document&&document,T=j&&history,R=j&&(T.location||j.location),A=a.prototype,I=M&&M.ontouchstart?"touchstart":"click",$=!1,k=t.observable(),F=!1,P=[],H=0;A.m=function(e,t,n){!s(e)||t&&!s(t)?t?this.r(e,t):this.r("@",e):d(e,t,n||!1)},A.s=function(){this.off("*"),this.$=[]},A.e=function(e){this.$.concat("@").some(function(t){var n=("@"==t?v:x)(u(e),u(t));if("undefined"!=typeof n)return this[N].apply(null,[t].concat(n)),F=!0},this)},A.r=function(e,t){"@"!=e&&(e="/"+u(e),this.$.push(e)),this.on(e,t)};var B=new a,q=B.m.bind(B);q.create=function(){var e=new a,t=e.m.bind(e);return t.stop=e.s.bind(e),t},q.base=function(e){m=e||"#",h=f()},q.exec=function(){l(!0)},q.parser=function(e,t){e||t||(v=n,x=r),e&&(v=e),t&&(x=t)},q.query=function(){var e={},t=R.href||h;return t[S](/[?&](.+?)=([^&]*)/g,function(t,n,r){e[n]=r}),e},q.stop=function(){$&&(j&&(j[w](O,g),j[w](E,g),M[w](I,p)),k[N]("stop"),$=!1)},q.start=function(e){$||(j&&("complete"==document.readyState?i(e):j[_]("load",function(){setTimeout(function(){i(e)},1)})),$=!0)},q.base(),q.parser(),t.route=q}(V);var le=function(e){function t(e){return e}function n(e,t){return t||(t=v),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?c:"")}function r(e){if(e===g)return m;var t=e.split(" ");if(2!==t.length||/[\x00-\x1F<>a-zA-Z0-9'",;\\]/.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(/(?=[[\]()*+?.^$|])/g,"\\").split(" ")),t[4]=n(t[1].length>1?/{[\S\s]*?}/:m[4],t),t[5]=n(e.length>3?/\\({|})/g:m[5],t),t[6]=n(m[6],t),t[7]=RegExp("\\\\("+t[3]+")|([[({])|("+t[3]+")|"+p,c),t[8]=e,t}function o(e){return e instanceof RegExp?u(e):v[e]}function i(e){(e||(e=g))!==v[8]&&(v=r(e),u=e===g?t:n,v[9]=u(m[9])),h=e}function a(e){var t;e=e||{},t=e.brackets,Object.defineProperty(e,"brackets",{set:i,get:function(){return h},enumerable:!0}),s=e,i(t)}var u,s,c="g",f=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,l=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'/g,p=l.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?(\/)[gim]*/.source,d={"(":RegExp("([()])|"+p,c),"[":RegExp("([[\\]])|"+p,c),"{":RegExp("([{}])|"+p,c)},g="{ }",m=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+p,c),g,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],h=e,v=[];return o.split=function(e,t,n){function r(e){t||a?c.push(e&&e.replace(n[5],"$1")):c.push(e)}function o(e,t,n){var r,o=d[t];for(o.lastIndex=n,n=1;(r=o.exec(e))&&(!r[1]||(r[1]===t?++n:--n)););return n?e.length:o.lastIndex}n||(n=v);var i,a,u,s,c=[],f=n[6];for(a=u=f.lastIndex=0;i=f.exec(e);){if(s=i.index,a){if(i[2]){f.lastIndex=o(e,i[2],f.lastIndex);continue}if(!i[3])continue}i[1]||(r(e.slice(u,s)),u=f.lastIndex,f=n[6+(a^=1)],f.lastIndex=u)}return e&&u<e.length&&r(e.slice(u)),c},o.hasExpr=function(e){return v[4].test(e)},o.loopKeys=function(e){var t=e.match(v[9]);return t?{key:t[1],pos:t[2],val:v[0]+t[3].trim()+v[1]}:{val:e.trim()}},o.array=function(e){return e?r(e):v},Object.defineProperty(o,"settings",{set:a,get:function(){return s}}),o.settings="undefined"!=typeof V&&V.settings||{},o.set=i,o.R_STRINGS=l,o.R_MLCOMMS=f,o.S_QBLOCKS=p,o}(),pe=function(){function t(e,t){return e?(u[e]||(u[e]=r(e))).call(t,n):e}function n(e,n){t.errorHandler&&(e.riotData={tagName:n&&n.root&&n.root.tagName,_riot_id:n&&n._riot_id},t.errorHandler(e))}function r(e){var t=o(e);return"try{return "!==t.slice(0,11)&&(t="return "+t),new Function("E",t+";")}function o(e){var t,n=[],r=le.split(e.replace(l,'"'),1);if(r.length>2||r[0]){var o,a,u=[];for(o=a=0;o<r.length;++o)t=r[o],t&&(t=1&o?i(t,1,n):'"'+t.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(u[a++]=t);t=a<2?u[0]:"["+u.join(",")+'].join("")'}else t=i(r[1],0,n);return n[0]&&(t=t.replace(p,function(e,t){return n[t].replace(/\r/g,"\\r").replace(/\n/g,"\\n")})),t}function i(e,t,n){function r(t,n){var r,o=1,i=d[t];for(i.lastIndex=n.lastIndex;r=i.exec(e);)if(r[0]===t)++o;else if(!--o)break;n.lastIndex=o?e.length:i.lastIndex}if(e=e.replace(f,function(e,t){return e.length>2&&!t?s+(n.push(e)-1)+"~":e}).replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var o,i=[],u=0;e&&(o=e.match(c))&&!o.index;){var l,p,g=/,|([[{(])|$/g;for(e=RegExp.rightContext,l=o[2]?n[o[2]].slice(1,-1).trim().replace(/\s+/g," "):o[1];p=(o=g.exec(e))[1];)r(p,g);p=e.slice(0,o.index),e=RegExp.rightContext,i[u++]=a(p,1,l)}e=u?u>1?"["+i.join(",")+'].join(" ").trim()':i[0]:a(e,t)}return e}function a(e,t,n){var r;return e=e.replace(m,function(e,t,n,o,i){return n&&(o=r?0:o+e.length,"this"!==n&&"global"!==n&&"window"!==n?(e=t+'("'+n+g+n,o&&(r="."===(i=i[o])||"("===i||"["===i)):o&&(r=!h.test(i.slice(o)))),e}),r&&(e="try{return "+e+"}catch(e){E(e,this)}"),n?e=(r?"function(){"+e+"}.call(this)":"("+e+")")+'?"'+n+'":""':t&&(e="function(v){"+(r?e.replace("return ","v="):"v=("+e+")")+';return v||v===0?v:""}.call(this)'),e}var u={};t.haveRaw=le.hasRaw,t.hasExpr=le.hasExpr,t.loopKeys=le.loopKeys,t.errorHandler=null;var s="⁗",c=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,f=RegExp(le.S_QBLOCKS,"g"),l=/\u2057/g,p=/\u2057(\d+)~/g,d={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},g='"in this?this:'+("object"!=typeof e?"global":"window")+").",m=/[,{][$\w]+:|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,h=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return t.parse=function(e){return e},t.version=le.version="v2.4.0",t}(),de=function e(){function e(e,r){var o=e&&e.match(/^\s*<([-\w]+)/),i=o&&o[1].toLowerCase(),a=H("div",x(i));return e=n(e,r),s.test(i)?a=t(a,e,i):v(a,e),a.stub=!0,a}function t(e,t,n){var r="o"===n[0],o=r?"select>":"table>";if(e.innerHTML="<"+o+t.trim()+"</"+o,o=e.firstChild,r)o.selectedIndex=-1;else{var i=u[n];i&&1===o.childElementCount&&(o=q(i,o))}return o}function n(e,t){if(!r.test(e))return e;var n={};return t=t&&t.replace(i,function(e,t,r){return n[t]=n[t]||r,""}).trim(),e.replace(a,function(e,t,r){return n[t]||r||""}).replace(o,function(e,n){return t||n||""})}var r=/<yield\b/i,o=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>|>)/gi,i=/<yield\s+to=['"]([^'">]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,a=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,u={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},s=ce&&ce<10?ae:/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/;return e}(),ge=function(t){if(!e)return{add:function(){},inject:function(){}};var n=function(){var e=H("style");C(e,"type","text/css");var t=q("style[type=riot]");return t?(t.id&&(e.id=t.id),t.parentNode.replaceChild(e,t)):document.getElementsByTagName("head")[0].appendChild(e),e}(),r=n.styleSheet,o="";return Object.defineProperty(t,"styleNode",{value:n,writable:!0}),{add:function(e){o+=e},inject:function(){o&&(r?r.cssText+=o:n.innerHTML+=o,o="")}}}(V),me=function(e){var t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame;if(!t||/iP(ad|hone|od).*OS 6/.test(e.navigator.userAgent)){var n=0;t=function(e){var t=Date.now(),r=Math.max(16-(t-n),0);setTimeout(function(){e(n=t+r)},r)}}return t}(e||{});V.util={brackets:le,tmpl:pe},V.mixin=function(){var e={},t=e[J]={},n=0;return function(r,o,i){if(y(r))return void V.mixin("__unnamed_"+n++,r,!0);var a=i?t:e;if(!o){if(typeof a[r]===oe)throw new Error("Unregistered mixin: "+r);return a[r]}m(o)?(T(o.prototype,a[r]||{}),a[r]=o):a[r]=T(a[r]||{},o)}}(),V.tag=function(e,t,n,r,o){return m(r)&&(o=r,/^[\w\-]+\s?=/.test(n)?(r=n,n=""):r=""),n&&(m(n)?o=n:ge.add(n)),e=e.toLowerCase(),X[e]={name:e,tmpl:t,attrs:r,fn:o},e},V.tag2=function(e,t,n,r,o){return n&&ge.add(n),X[e]={name:e,tmpl:t,attrs:r,fn:o},e},V.mount=function(e,t,n){function r(e){var t="";return g(e,function(e){/[^-\w]/.test(e)||(e=e.trim().toLowerCase(),t+=",["+te+'="'+e+'"],['+ee+'="'+e+'"]')}),t}function o(){var e=Object.keys(X);return e+r(e)}function i(e){if(e.tagName){var r=_(e,te)||_(e,ee);t&&r!==t&&(r=t,C(e,te,t),C(e,ee,t));var o=G(e,r||e.tagName.toLowerCase(),n);o&&s.push(o)}else e.length&&g(e,i)}var a,u,s=[];if(ge.inject(),y(t)&&(n=t,t=0),typeof e===ne?("*"===e?e=u=o():e+=r(e.split(/, */)),a=e?B(e):[]):a=e,"*"===t){if(t=u||o(),a.tagName)a=B(t,a);else{var c=[];g(a,function(e){c.push(B(t,e))}),a=c}t=0}return i(a),s},V.update=function(){return g(W,function(e){e.update()})},V.vdom=W,V.Tag=f;var he=function(e){function t(t){var n=e[t];if(n)return n;throw new Error('Parser "'+t+'" not loaded.')}function n(e){var t=e.split(".");if(2!==t.length)throw new Error("Bad format for parsers._req");var n=i[t[0]][t[1]];if(n)return n;throw new Error('Parser "'+e+'" not found.')}function r(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function o(e,n,o,i){return o=r({pretty:!0,filename:i,doctype:"html"},o),t(e).render(n,o)}var i={};return i.html={jade:function(e,t,n){return console.log('DEPRECATION WARNING: jade was renamed "pug" - The jade parser will be removed in riot@3.0.0!'),o("jade",e,t,n)},pug:function(e,t,n){return o("pug",e,t,n)}},i.css={less:function(e,n,o,i){var a;return o=r({sync:!0,syncImport:!0,filename:i},o),t("less").render(n,o,function(e,t){if(e)throw e;a=t.css}),a}},i.js={es6:function(e,n){return n=r({blacklist:["useStrict","strict","react"],sourceMaps:!1,comments:!1},n),t("babel").transform(e,n).code},babel:function(e,n,o){return t("babel").transform(e,r({filename:o},n)).code},coffee:function(e,n){return t("CoffeeScript").compile(e,r({bare:!0},n))},livescript:function(e,n){return t("livescript").compile(e,r({bare:!0,header:!1},n))},typescript:function(e,n){return t("typescript")(e,n)},none:function(e){return e}},i.js.javascript=i.js.none,i.js.coffeescript=i.js.coffee,i._req=n,i.utils={extend:r},i}(e||global);V.parsers=he;var ve=function(){function e(e){var t,n=j;for(~e.indexOf("\r")&&(e=e.replace(/\r\n?/g,"\n")),n.lastIndex=0;t=n.exec(e);)"<"===t[0][0]&&(e=RegExp.leftContext+RegExp.rightContext,n.lastIndex=t[3]+1);return e}function t(e,t){var n,r,o,i=[];for(L.lastIndex=0,e=e.replace(/\s+/g," ");n=L.exec(e);){var a=n[1].toLowerCase(),u=n[2];u?(u[0]!==z&&(u=z+(u[0]===K?u.slice(1,-1):u)+z),"type"===a&&k.test(u)?r=u:(H.test(u)&&("value"===a?o=1:R.test(a)?a="__"+a:~A.indexOf(a)&&(a="riot-"+a)),i.push(a+"="+u))):i.push(a)}return r&&(o&&(r=z+t._bp[0]+K+r.slice(1,-1)+K+t._bp[1]+z),i.push("type="+r)),i.join(" ")}function n(e,t,n){var r=n._bp;if(e&&r[4].test(e)){for(var o,i=t.expr&&(t.parser||t.type)?c:0,a=le.split(e,0,r),u=1;u<a.length;u+=2)o=a[u],"^"===o[0]?o=o.slice(1):i&&(o=i(o,t).trim(),";"===o.slice(-1)&&(o=o.slice(0,-1))),a[u]=q+(n.push(o)-1)+r[1];e=a.join("")}return e}function r(e,t){return t.length&&(e=e.replace(B,function(e,n){return t._bp[0]+t[n].trim().replace(/[\r\n]+/g," ").replace(/"/g,D)})),e}function o(e){for(var t=[],n="";t=F.exec(e);)n+=t[0].trim()+"\n";return n}function i(e){var t=e.replace(F,"");return t}function a(e,o,i){if(e=n(e,o,i).replace(M,function(e,n,r,o){return n=n.toLowerCase(),o=o&&!I.test(n)?"></"+n:"",r&&(n+=" "+t(r,i)),"<"+n+o+">"}),!o.whitespace){var a=[];/<pre[\s>]/.test(e)&&(e=e.replace($,function(e){return a.push(e),""})),e=e.trim().replace(/\s+/g," "),a.length&&(e=e.replace(/\u0002/g,function(){return a.shift()}))}return o.compact&&(e=e.replace(T,"><$1")),r(e,i).replace(P,"")}function u(t,n,r){return Array.isArray(n)?(r=n,n={}):(r||(r=[]),n||(n={})),r._bp=le.array(n.brackets),a(e(t),n,r)}function s(e){function t(e,t,n){for(t.lastIndex=0;n=t.exec(e);)"/"!==n[0][0]||n[1]||n[2]||(e=s.leftContext+" "+s.rightContext,t.lastIndex=n[3]+1);return e}function n(e,t){var n,r=1;for(t.lastIndex=0;r&&(n=t.exec(e));)"{"===n[0]?++r:"}"===n[0]&&--r;return r?e.length:t.lastIndex}var r,o,i,a,u=[],s=RegExp;for(~e.indexOf("/")&&(e=t(e,Q));r=e.match(Z);)u.push(s.leftContext),e=s.rightContext,i=n(e,G),a=r[1],o=!/^(?:if|while|for|switch|catch|function)$/.test(a),a=o?r[0].replace(a,"this."+a+" = function"):r[0],u.push(a,e.slice(0,i)),e=e.slice(i),o&&!/^\s*.\s*bind\b/.test(e)&&u.push(".bind(this)");return u.length?u.join("")+e:e}function c(e,t,n,r,o){if(!/\S/.test(e))return"";n||(n=t.type);var i=t.parser||n&&he._req("js."+n,!0)||s;return i(e,r,o).replace(/\r\n?/g,"\n").replace(P,"")}function f(e,t,n,r){return"string"==typeof t&&(r=n,n=t,t={}),n&&"object"==typeof n&&(r=n,n=""),r||(r={}),c(e,t||{},n,r.parserOptions,r.url)}function l(e,t){var n=":scope";return t.replace(W,function(t,r,o){return o?(o=o.replace(/[^,]+/g,function(t){var r=t.trim();return r&&"from"!==r&&"to"!==r&&"%"!==r.slice(-1)?r=r.indexOf(n)<0?e+" "+r+',[riot-tag="'+e+'"] '+r+',[data-is="'+e+'"] '+r:r.replace(n,e)+","+r.replace(n,'[riot-tag="'+e+'"]')+","+r.replace(n,'[data-is="'+e+'"]'):t}),r?r+" "+o:o):t})}function p(e,t,n,r){var o=(r||(r={})).scoped;if(n)if("scoped-css"===n)o=!0;else if("css"!==n){var i=he._req("css."+n,!0);e=i(t,e,r.parserOpts||{},r.url)}if(e=e.replace(le.R_MLCOMMS,"").replace(/\s+/g," ").trim(),o){if(!t)throw new Error("Can not parse scoped CSS without a tagName");e=l(t,e)}return e}function d(e,t,n){return t&&"object"==typeof t?(n=t,t=""):n||(n={}),p(e,n.tagName,t,n)}function g(e,t){return e?(e=K+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+K,t&&~e.indexOf("\n")?e.replace(/\n/g,"\\n"):e):"''"}function m(e,t,n,r,o,i,a){var u=a.debug?",\n ":", ",s="});";return o&&"\n"!==o.slice(-1)&&(s="\n"+s),i+"riot.tag2('"+e+K+u+g(t,1)+u+g(n)+u+g(r)+", function(opts) {\n"+o+s}function h(e){if(/<[-\w]/.test(e))for(var t,n=e.lastIndexOf("<"),r=e.length;~n;){if(t=e.slice(n,r).match(Y))return n+=t.index+t[0].length,[e.slice(0,n),e.slice(n)];r=n,n=e.lastIndexOf("<",n-1)}return["",e]}function v(e){if(e){var t=e.match(X);if(t=t&&(t[2]||t[3]))return t.replace("text/","")}return""}function x(e,t){if(e){var n=e.match(RegExp("\\s"+t+J,"i"));if(n=n&&n[1])return/^['"]/.test(n)?n.slice(1,-1):n}return""}function y(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'")}function b(e){var t=y(x(e,"options"));return t?JSON.parse(t):null}function w(e,t,n,r){var o=v(n),i=x(n,"src"),a=O({},t.parserOptions.js);return!i&&c(e,t,o,O(a,b(n)),r)}function _(e,t,n,r,o){var i=O({},t.parserOptions.style),a={parserOpts:O(i,b(n)),scoped:n&&/\sscoped(\s|=|$)/i.test(n),url:r};return p(e,o,v(n)||t.style,a)}function C(e,t,n,r){var o=he._req("html."+n,!0);return o(e,r,t)}function S(u,s,f){var l,p=[],d={template:{},js:{},style:{}};s||(s={}),s.parserOptions=O(d,s.parserOptions||{}),l=s.exclude?function(e){return s.exclude.indexOf(e)<0}:function(){return 1},f||(f="");var g=le.array(s.brackets);return s.template&&(u=C(u,f,s.template,s.parserOptions.template)),u=e(u).replace(ee,function(e,u,d,v,x,y){var b="",C="",S="",O="",E=[];if(E._bp=g,d=d.toLowerCase(),v=v&&l("attribs")?r(t(n(v,s,E),E),E):"",(x||(x=y))&&/\S/.test(x))if(y)l("html")&&(S=a(y,s,E));else{x=x.replace(RegExp("^"+u,"gm"),""),x=x.replace(ne,function(e,t,n){return l("css")&&(C+=(C?" ":"")+_(n,s,t,f,d)),""}),x=x.replace(te,function(e,t,n){if(l("js")){var r=w(n,s,t,f);r&&(b+=(b?"\n":"")+r)}return""});var N=h(x.replace(P,""));l("html")&&(S=a(N[0],s,E)),l("js")&&(x=c(N[1],s,null,null,f),O=o(b),b=i(b),x&&(b+=(b?"\n":"")+x))}return b=/\S/.test(b)?b.replace(/\n{3,}/g,"\n\n"):"",s.entities?(p.push({tagName:d,html:S,css:C,attribs:v,js:b}),""):m(d,S,C,v,b,O,s)}),s.entities?p:u}var O=he.utils.extend,E=/"[^"\n\\]*(?:\\[\S\s][^"\n\\]*)*"|'[^'\n\\]*(?:\\[\S\s][^'\n\\]*)*'/.source,N=le.R_STRINGS.source,L=/ *([-\w:\xA0-\xFF]+) ?(?:= ?('[^']*'|"[^"]*"|\S+))?/g,j=RegExp(/<!--(?!>)[\S\s]*?-->/.source+"|"+E,"g"),M=/<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^"'\/>]*(?:(?:"[^"]*"|'[^']*'|\/[^>])[^'"\/>]*)*)|\s*)(\/?)>/g,T=/>[ \t]+<(-?[A-Za-z]|\/[-A-Za-z])/g,R=RegExp("^(?:disabled|checked|readonly|required|allowfullscreen|auto(?:focus|play)|compact|controls|default|formnovalidate|hidden|ismap|itemscope|loop|multiple|muted|no(?:resize|shade|validate|wrap)?|open|reversed|seamless|selected|sortable|truespeed|typemustmatch)$"),A=["style","src","d"],I=/^(?:input|img|br|wbr|hr|area|base|col|embed|keygen|link|meta|param|source|track)$/,$=/<pre(?:\s+(?:[^">]*|"[^"]*")*)?>([\S\s]+?)<\/pre\s*>/gi,k=/^"(?:number|date(?:time)?|time|month|email|color)\b/i,F=/^(?: )*(?:import)(?:(?:.*))*$/gm,P=/[ \t]+$/gm,H=U(/@#\d/,"x01"),B=U(/@#(\d+)/g,"x01"),q="#",D="⁗",z='"',K="'",Z=/^[ \t]*([$_A-Za-z][$\w]*)\s*\([^()]*\)\s*{/m,G=RegExp("[{}]|"+le.S_QBLOCKS,"g"),Q=RegExp(le.R_MLCOMMS.source+"|//[^\r\n]*|"+le.S_QBLOCKS,"g"),W=RegExp("([{}]|^)[ ;]*([^@ ;{}][^{}]*)(?={)|"+E,"g"),X=/\stype\s*=\s*(?:(['"])(.+?)\1|(\S+))/i,J="\\s*=\\s*("+N+"|{[^}]+}|\\S+)",Y=/\/>\n|^<(?:\/?-?[A-Za-z][-\w\xA0-\xFF]*\s*|-?[A-Za-z][-\w\xA0-\xFF]*\s+[-\w:\xA0-\xFF][\S\s]*?)>\n/,ee=RegExp(/^([ \t]*)<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^'"\/>]+(?:(?:@|\/[^>])[^'"\/>]*)*)|\s*)?(?:\/>|>[ \t]*\n?([\S\s]*)^\1<\/\2\s*>|>(.*)<\/\2\s*>)/.source.replace("@",N),"gim"),te=/<script(\s+[^>]*)?>\n?([\S\s]*?)<\/script\s*>/gi,ne=/<style(\s+[^>]*)?>\n?([\S\s]*?)<\/style\s*>/gi;return V.util.compiler={compile:S,html:u,css:d,js:f,version:"v2.5.2"},S}();V.compile=function(){function e(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){4===r.readyState&&(200===r.status||!r.status&&r.responseText.length)&&t(r.responseText,n,e)},r.open("GET",e,!0),r.send("")}function n(e,t){if(typeof e===ne){var n=H("script"),r=document.documentElement;t&&(e+="\n//# sourceURL="+t+".js"),n.text=e,r.appendChild(n),r.removeChild(n)}}function r(t,r){function a(){o.trigger("ready"),i=!0,t&&t()}function u(e,t,r){var o=ve(e,t,r);n(o,r),--c||a()}var s=B('script[type="riot/tag"]'),c=s.length;if(c)for(var f=0;f<s.length;++f){var l=s[f],p=T({template:_(l,"template")},r),d=_(l,"src");d?e(d,u,p):u(l.innerHTML,p)}else a()}var o,i;return function(a,u,s){if(typeof a===ne){if(y(u)&&(s=u,u=!1),/^\s*</m.test(a)){var c=ve(a,s);return u!==!0&&n(c),m(u)&&u(c,a,s),c}e(a,function(e,t,r){var o=ve(e,t,r);n(o,r),u&&u(o,e,t)})}else{if(m(a)?(s=u,u=a):(s=a,u=t),i)return u&&u();o?u&&o.on("ready",u):(o=V.observable(),r(u,s))}}}();var xe=V.mount;V.mount=function(e,t,n){var r;return V.compile(function(){r=xe(e,t,n)}),r},typeof exports===re?module.exports=V:typeof define===ie&&typeof define.amd!==oe?define(function(){return V}):e.riot=V}("undefined"!=typeof window?window:void 0);
/* Riot v2.6.0, @license MIT */
!function(e,t){"use strict";function n(e,t,n){var r={};return r[e.key]=t,e.pos&&(r[e.pos]=n),r}function r(e,t){for(var n,r=t.length,o=e.length;r>o;)n=t[--r],t.splice(r,1),n.unmount()}function o(e,t){Object.keys(e.tags).forEach(function(n){var r=e.tags[n];A(r)?g(r,function(e){E(e,n,t)}):E(r,n,t)})}function i(e,t,n){var r,o=e._root;for(e._virts=[];o;)r=o.nextSibling,n?t.insertBefore(o,n._root):t.appendChild(o),e._virts.push(o),o=r}function a(e,t,n,r){for(var o,i=e._root,a=0;a<r;a++)o=i.nextSibling,t.insertBefore(i,n._root),i=o}function u(e,t,u){b(e,"each");var s,c=typeof _(e,"no-reorder")!==ne||b(e,"no-reorder"),l=M(e),p=X[l]||{tmpl:h(e)},d=se.test(l),g=e.parentNode,m=document.createTextNode(""),v=S(e),x="option"===l.toLowerCase(),y=[],w=[],C="VIRTUAL"==e.tagName;u=ge.loopKeys(u),g.insertBefore(m,e),t.one("before-mount",function(){e.parentNode.removeChild(e),g.stub&&(g=t.root)}).on("update",function(){var h=ge(u.val,t),b=document.createDocumentFragment();A(h)||(s=h||!1,h=s?Object.keys(h).map(function(e){return n(u,e,h[e])}):[]);for(var _=0,S=h.length;_<S;_++){var O=h[_],E=c&&typeof O==re&&!s,N=w.indexOf(O),L=~N&&E?N:_,M=y[L];O=!s&&u.key?n(u,O,_):O,!E&&!M||E&&!~N||!M?(M=new f(p,{parent:t,isLoop:!0,hasImpl:!!X[l],root:d?g:e.cloneNode(),item:O},e.innerHTML),M.mount(),C&&(M._root=M.root.firstChild),_!=y.length&&y[_]?(C?i(M,g,y[_]):g.insertBefore(M.root,y[_].root),w.splice(_,0,O)):C?i(M,b):b.appendChild(M.root),y.splice(_,0,M),L=_):M.update(O,!0),L!==_&&E&&y[_]&&(C?a(M,g,y[_],e.childNodes.length):y[_].root.parentNode&&g.insertBefore(M.root,y[_].root),u.pos&&(M[u.pos]=_),y.splice(_,0,y.splice(L,1)[0]),w.splice(_,0,w.splice(L,1)[0]),!v&&M.tags&&o(M,_)),M._item=O,j(M,"_parent",t)}if(r(h,y),g.insertBefore(b,m),x&&pe&&!g.multiple)for(var T=0;T<g.length;T++)if(g[T].__riot1374){g.selectedIndex=T,delete g[T].__riot1374;break}v&&(t.tags[l]=y),w=h.slice()})}function s(e,t,n,r){k(e,function(e){if(1==e.nodeType){if(e.isLoop=e.isLoop||e.parentNode&&e.parentNode.isLoop||_(e,"each")?1:0,n){var o=S(e);o&&!e.isLoop&&n.push(N(o,{root:e,parent:t},e.innerHTML,t))}e.isLoop&&!r||K(e,t,[])}})}function c(e,t,n){function r(e,t,r){ge.hasExpr(t)&&n.push(T({dom:e,expr:t},r))}k(e,function(e){var n,o=e.nodeType;if(3==o&&"STYLE"!=e.parentNode.tagName&&r(e,e.nodeValue),1==o)return(n=_(e,"each"))?(u(e,t,n),!1):(g(e.attributes,function(t){var n=t.name,o=n.split("__")[1];if(r(e,t.value,{attr:o||n,bool:o}),o)return b(e,n),!1}),!S(e)&&void 0)})}function f(e,n,r){function o(){var e=_&&x?p:v||p;g(N.attributes,function(t){var n=t.value;h[w(t.name)]=ge.hasExpr(n)?ge(n,e):n}),g(Object.keys(k),function(t){h[w(t)]=ge(k[t],e)})}function i(e){for(var t in S)typeof p[t]!==oe&&I(p,t)&&(p[t]=e[t])}function a(e){g(Object.keys(e),function(t){var n=!ce.test(t)&&R(H,t);(typeof p[t]===oe||n)&&(n||H.push(t),p[t]=e[t])})}function u(e){p.update(e,!0)}function f(e){if(g(E,function(t){t[e?"mount":"unmount"]()}),v){var t=e?"on":"off";x?v[t]("unmount",p.unmount):v[t]("update",u)[t]("unmount",p.unmount)}}var l,p=V.observable(this),h=D(n.opts)||{},v=n.parent,x=n.isLoop,_=n.hasImpl,S=$(n.item),O=[],E=[],N=n.root,M=N.tagName.toLowerCase(),k={},H=[];e.name&&N._tag&&N._tag.unmount(!0),this.isMounted=!1,N.isLoop=x,N._tag=this,j(this,"_riot_id",++Q),T(this,{parent:v,root:N,opts:h},S),j(this,"tags",{}),g(N.attributes,function(e){var t=e.value;ge.hasExpr(t)&&(k[e.name]=t)}),l=me(e.tmpl,r),j(this,"update",function(e,t){return e=$(e),x&&a(p.parent),e&&y(S)&&(i(e),S=e),T(p,e),o(),p.trigger("update",e),d(O,p),t&&p.parent?p.parent.one("updated",function(){p.trigger("updated")}):ve(function(){p.trigger("updated")}),this}),j(this,"mixin",function(){return g(arguments,function(e){var t,n,r=[];e=typeof e===ne?V.mixin(e):e,t=m(e)?new e:e;do r=r.concat(Object.getOwnPropertyNames(n||t));while(n=Object.getPrototypeOf(n||t));g(r,function(e){if("init"!=e){var n=Object.getOwnPropertyDescriptor(t,e),r=n&&(n.get||n.set);!p.hasOwnProperty(e)&&r?Object.defineProperty(p,e,n):p[e]=m(t[e])?t[e].bind(p):t[e]}}),t.init&&t.init.bind(p)()}),this}),j(this,"mount",function(){o();var t=V.mixin(J);if(t)for(var n in t)t.hasOwnProperty(n)&&p.mixin(t[n]);if(p._parent&&a(p._parent),e.fn&&e.fn.call(p,h),c(l,p,O),f(!0),e.attrs&&F(e.attrs,function(e,t){C(N,e,t)}),(e.attrs||_)&&c(p.root,p,O),p.parent&&!x||p.update(S),p.trigger("before-mount"),x&&!_)N=l.firstChild;else{for(;l.firstChild;)N.appendChild(l.firstChild);N.stub&&(N=v.root)}j(p,"root",N),x&&s(p.root,p.parent,null,!0),!p.parent||p.parent.isMounted?(p.isMounted=!0,p.trigger("mount")):p.parent.one("mount",function(){P(p.root)||(p.parent.isMounted=p.isMounted=!0,p.trigger("mount"))})}),j(this,"unmount",function(e){var n,r=N,o=r.parentNode,i=W.indexOf(p);if(p.trigger("before-unmount"),~i&&W.splice(i,1),o){if(v)n=L(v),A(n.tags[M])?g(n.tags[M],function(e,t){e._riot_id==p._riot_id&&n.tags[M].splice(t,1)}):n.tags[M]=t;else for(;r.firstChild;)r.removeChild(r.firstChild);e?(b(o,te),b(o,ee)):o.removeChild(r)}this._virts&&g(this._virts,function(e){e.parentNode&&e.parentNode.removeChild(e)}),p.trigger("unmount"),f(),p.off("*"),p.isMounted=!1,delete N._tag}),s(l,this,E)}function l(t,n,r,o){r[t]=function(t){var i,a=o._parent,u=o._item;if(!u)for(;a&&!u;)u=a._item,a=a._parent;t=t||e.event,I(t,"currentTarget")&&(t.currentTarget=r),I(t,"target")&&(t.target=t.srcElement),I(t,"which")&&(t.which=t.charCode||t.keyCode),t.item=u,n.call(o,t)===!0||/radio|check/.test(r.type)||(t.preventDefault&&t.preventDefault(),t.returnValue=!1),t.preventUpdate||(i=u?L(a):o,i.update())}}function p(e,t,n){e&&(e.insertBefore(n,t),e.removeChild(t))}function d(e,t){g(e,function(e,n){var r=e.dom,o=e.attr,i=ge(e.expr,t),a=e.dom.parentNode;if(e.bool?i=!!i:null==i&&(i=""),e.value!==i){if(e.value=i,!o)return i+="",void(a&&("TEXTAREA"===a.tagName?(a.value=i,le||(r.nodeValue=i)):r.nodeValue=i));if("value"===o)return void(r.value!=i&&(r.value=i));if(b(r,o),m(i))l(o,i,r,t);else if("if"==o){var u=e.stub,s=function(){p(u.parentNode,u,r)},c=function(){p(r.parentNode,r,u)};i?u&&(s(),r.inStub=!1,P(r)||k(r,function(e){e._tag&&!e._tag.isMounted&&(e._tag.isMounted=!!e._tag.trigger("mount"))})):(u=e.stub=u||document.createTextNode(""),r.parentNode?c():(t.parent||t).one("updated",c),r.inStub=!0)}else"show"===o?r.style.display=i?"":"none":"hide"===o?r.style.display=i?"none":"":e.bool?(r[o]=i,i&&C(r,o,o),pe&&"selected"===o&&"OPTION"===r.tagName&&(r.__riot1374=i)):(0===i||i&&typeof i!==re)&&(Z(o,Y)&&o!=ee&&(o=o.slice(Y.length)),C(r,o,i))}})}function g(e,t){for(var n,r=e?e.length:0,o=0;o<r;o++)n=e[o],null!=n&&t(n,o)===!1&&o--;return e}function m(e){return typeof e===ie||!1}function h(e){if(e.outerHTML)return e.outerHTML;var t=H("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}function v(e,t){if(typeof e.innerHTML!=oe)e.innerHTML=t;else{var n=(new DOMParser).parseFromString(t,"application/xml");e.appendChild(e.ownerDocument.importNode(n.documentElement,!0))}}function x(e){return~fe.indexOf(e)}function y(e){return e&&typeof e===re}function b(e,t){e.removeAttribute(t)}function w(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function _(e,t){return e.getAttribute(t)}function C(e,t,n){var r=ue.exec(t);r&&r[1]?e.setAttributeNS(ae,r[1],n):e.setAttribute(t,n)}function S(e){return e.tagName&&X[_(e,te)||_(e,ee)||e.tagName.toLowerCase()]}function O(e,t,n){var r=n.tags[t];r?(A(r)||r!==e&&(n.tags[t]=[r]),R(n.tags[t],e)||n.tags[t].push(e)):n.tags[t]=e}function E(e,t,n){var r,o=e.parent;o&&(r=o.tags[t],A(r)?r.splice(n,0,r.splice(r.indexOf(e),1)[0]):O(e,t,o))}function N(e,t,n,r){var o=new f(e,t,n),i=M(t.root),a=L(r);return o.parent=a,o._parent=r,O(o,i,a),a!==r&&O(o,i,r),t.root.innerHTML="",o}function L(e){for(var t=e;!S(t.root)&&t.parent;)t=t.parent;return t}function j(e,t,n,r){return Object.defineProperty(e,t,T({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function M(e){var t=S(e),n=_(e,"name"),r=n&&!ge.hasExpr(n)?n:t?t.name:e.tagName.toLowerCase();return r}function T(e){for(var t,n=arguments,r=1;r<n.length;++r)if(t=n[r])for(var o in t)I(e,o)&&(e[o]=t[o]);return e}function R(e,t){return~e.indexOf(t)}function A(e){return Array.isArray(e)||e instanceof Array}function I(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return typeof e[t]===oe||n&&n.writable}function $(e){if(!(e instanceof f||e&&typeof e.trigger==ie))return e;var t={};for(var n in e)ce.test(n)||(t[n]=e[n]);return t}function k(e,t){if(e){if(t(e)===!1)return;for(e=e.firstChild;e;)k(e,t),e=e.nextSibling}}function F(e,t){for(var n,r=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g;n=r.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function P(e){for(;e;){if(e.inStub)return!0;e=e.parentNode}return!1}function H(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg","svg"):document.createElement(e)}function B(e,t){return(t||document).querySelectorAll(e)}function q(e,t){return(t||document).querySelector(e)}function D(e){function t(){}return t.prototype=e,new t}function z(e){return _(e,"id")||_(e,"name")}function K(e,t,n){var r,o=z(e),i=function(i){R(n,o)||(r=A(i),i?(!r||r&&!R(i,e))&&(r?i.push(e):t[o]=[i,e]):t[o]=e)};o&&(ge.hasExpr(o)?t.one("mount",function(){o=z(e),i(t[o])}):i(t[o]))}function Z(e,t){return e.slice(0,t.length)===t}function G(e,t,n){var r=X[t],o=e._innerHTML=e._innerHTML||e.innerHTML;return e.innerHTML="",r&&e&&(r=new f(r,{root:e,opts:n},o)),r&&r.mount&&(r.mount(),R(W,r)||W.push(r)),r}function U(e){var t=e.source,n=e.global?"g":"";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m");for(var r=1;r<arguments.length;r++)t=t.replace("@","\\"+arguments[r]);return new RegExp(t,n)}var V={version:"v2.6.0",settings:{}},Q=0,W=[],X={},J="__global_mixin",Y="riot-",ee=Y+"tag",te="data-is",ne="string",re="object",oe="undefined",ie="function",ae="http://www.w3.org/1999/xlink",ue=/^xlink:(\w+)/,se=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,ce=/^(?:_(?:item|id|parent)|update|root|(?:un)?mount|mixin|is(?:Mounted|Loop)|tags|parent|opts|trigger|o(?:n|ff|ne))$/,fe=["altGlyph","animate","animateColor","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","filter","font","foreignObject","g","glyph","glyphRef","image","line","linearGradient","marker","mask","missing-glyph","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tref","tspan","use"],le=0|(e&&e.document||{}).documentMode,pe=e&&!!e.InstallTrigger;V.observable=function(e){function t(e,t){for(var n=e.split(" "),r=n.length,o=0;o<r;o++){var i=n[o];i&&t(i,o)}}e=e||{};var n={},r=Array.prototype.slice;return Object.defineProperties(e,{on:{value:function(r,o){return"function"!=typeof o?e:(t(r,function(e,t){(n[e]=n[e]||[]).push(o),o.typed=t>0}),e)},enumerable:!1,writable:!1,configurable:!1},off:{value:function(r,o){return"*"!=r||o?t(r,function(e,t){if(o)for(var r,i=n[e],a=0;r=i&&i[a];++a)r==o&&i.splice(a--,1);else delete n[e]}):n={},e},enumerable:!1,writable:!1,configurable:!1},one:{value:function(t,n){function r(){e.off(t,r),n.apply(e,arguments)}return e.on(t,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(o){for(var i,a=arguments.length-1,u=new Array(a),s=0;s<a;s++)u[s]=arguments[s+1];return t(o,function(t,o){i=r.call(n[t]||[],0);for(var a,s=0;a=i[s];++s)a.busy||(a.busy=1,a.apply(e,a.typed?[t].concat(u):u),i[s]!==a&&s--,a.busy=0);n["*"]&&"*"!=t&&e.trigger.apply(e,["*",t].concat(u))}),e},enumerable:!1,writable:!1,configurable:!1}}),e},function(t){function n(e){return e.split(/[\/?#]/)}function r(e,t){var n=new RegExp("^"+t[S](/\*/g,"([^/?#]+?)")[S](/\.\./,".*")+"$"),r=e.match(n);if(r)return r.slice(1)}function o(e,t){var n;return function(){clearTimeout(n),n=setTimeout(e,t)}}function i(e){g=o(l,1),j[_](O,g),j[_](E,g),M[_](I,p),e&&l(!0)}function a(){this.$=[],t.observable(this),k.on("stop",this.s.bind(this)),k.on("emit",this.e.bind(this))}function u(e){return e[S](/^\/|\/$/,"")}function s(e){return"string"==typeof e}function c(e){return(e||R.href)[S](y,"")}function f(e){return"#"==m[0]?(e||R.href||"").split(m)[1]||"":(R?c(e):e||"")[S](m,"")}function l(e){var t,n=0==H;if(!(L<=H)&&(H++,P.push(function(){var t=f();(e||t!=h)&&(k[N]("emit",t),h=t)}),n)){for(;t=P.shift();)t();H=0}}function p(e){if(!(1!=e.which||e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented)){for(var t=e.target;t&&"A"!=t.nodeName;)t=t.parentNode;!t||"A"!=t.nodeName||t[C]("download")||!t[C]("href")||t.target&&"_self"!=t.target||t.href.indexOf(R.href.match(y)[0])==-1||t.href!=R.href&&(t.href.split("#")[0]==R.href.split("#")[0]||"#"!=m[0]&&0!==c(t.href).indexOf(m)||"#"==m[0]&&t.href.split(m)[0]!=R.href.split(m)[0]||!d(f(t.href),t.title||M.title))||e.preventDefault()}}function d(e,t,n){return T?(e=m+u(e),t=t||M.title,n?T.replaceState(null,t,e):T.pushState(null,t,e),M.title=t,F=!1,l(),F):k[N]("emit",f(e))}var g,m,h,v,x,y=/^.+?\/\/+[^\/]+/,b="EventListener",w="remove"+b,_="add"+b,C="hasAttribute",S="replace",O="popstate",E="hashchange",N="trigger",L=3,j="undefined"!=typeof e&&e,M="undefined"!=typeof document&&document,T=j&&history,R=j&&(T.location||j.location),A=a.prototype,I=M&&M.ontouchstart?"touchstart":"click",$=!1,k=t.observable(),F=!1,P=[],H=0;A.m=function(e,t,n){!s(e)||t&&!s(t)?t?this.r(e,t):this.r("@",e):d(e,t,n||!1)},A.s=function(){this.off("*"),this.$=[]},A.e=function(e){this.$.concat("@").some(function(t){var n=("@"==t?v:x)(u(e),u(t));if("undefined"!=typeof n)return this[N].apply(null,[t].concat(n)),F=!0},this)},A.r=function(e,t){"@"!=e&&(e="/"+u(e),this.$.push(e)),this.on(e,t)};var B=new a,q=B.m.bind(B);q.create=function(){var e=new a,t=e.m.bind(e);return t.stop=e.s.bind(e),t},q.base=function(e){m=e||"#",h=f()},q.exec=function(){l(!0)},q.parser=function(e,t){e||t||(v=n,x=r),e&&(v=e),t&&(x=t)},q.query=function(){var e={},t=R.href||h;return t[S](/[?&](.+?)=([^&]*)/g,function(t,n,r){e[n]=r}),e},q.stop=function(){$&&(j&&(j[w](O,g),j[w](E,g),M[w](I,p)),k[N]("stop"),$=!1)},q.start=function(e){$||(j&&("complete"==document.readyState?i(e):j[_]("load",function(){setTimeout(function(){i(e)},1)})),$=!0)},q.base(),q.parser(),t.route=q}(V);var de=function(e){function t(e){return e}function n(e,t){return t||(t=y),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?c:"")}function r(e){if(e===h)return v;var t=e.split(" ");if(2!==t.length||d.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(g,"\\").split(" ")),t[4]=n(t[1].length>1?/{[\S\s]*?}/:v[4],t),t[5]=n(e.length>3?/\\({|})/g:v[5],t),t[6]=n(v[6],t),t[7]=RegExp("\\\\("+t[3]+")|([[({])|("+t[3]+")|"+p,c),t[8]=e,t}function o(e){return e instanceof RegExp?u(e):y[e]}function i(e){(e||(e=h))!==y[8]&&(y=r(e),u=e===h?t:n,y[9]=u(v[9])),x=e}function a(e){var t;e=e||{},t=e.brackets,Object.defineProperty(e,"brackets",{set:i,get:function(){return x},enumerable:!0}),s=e,i(t)}var u,s,c="g",f=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,l=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'/g,p=l.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?(\/)[gim]*/.source,d=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),g=/(?=[[\]()*+?.^$|])/g,m={"(":RegExp("([()])|"+p,c),"[":RegExp("([[\\]])|"+p,c),"{":RegExp("([{}])|"+p,c)},h="{ }",v=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+p,c),h,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],x=e,y=[];return o.split=function(e,t,n){function r(e){t||a?c.push(e&&e.replace(n[5],"$1")):c.push(e)}function o(e,t,n){var r,o=m[t];for(o.lastIndex=n,n=1;(r=o.exec(e))&&(!r[1]||(r[1]===t?++n:--n)););return n?e.length:o.lastIndex}n||(n=y);var i,a,u,s,c=[],f=n[6];for(a=u=f.lastIndex=0;i=f.exec(e);){if(s=i.index,a){if(i[2]){f.lastIndex=o(e,i[2],f.lastIndex);continue}if(!i[3])continue}i[1]||(r(e.slice(u,s)),u=f.lastIndex,f=n[6+(a^=1)],f.lastIndex=u)}return e&&u<e.length&&r(e.slice(u)),c},o.hasExpr=function(e){return y[4].test(e)},o.loopKeys=function(e){var t=e.match(y[9]);return t?{key:t[1],pos:t[2],val:y[0]+t[3].trim()+y[1]}:{val:e.trim()}},o.array=function(e){return e?r(e):y},Object.defineProperty(o,"settings",{set:a,get:function(){return s}}),o.settings="undefined"!=typeof V&&V.settings||{},o.set=i,o.R_STRINGS=l,o.R_MLCOMMS=f,o.S_QBLOCKS=p,o}(),ge=function(){function t(e,t){return e?(u[e]||(u[e]=r(e))).call(t,n):e}function n(e,n){t.errorHandler&&(e.riotData={tagName:n&&n.root&&n.root.tagName,_riot_id:n&&n._riot_id},t.errorHandler(e))}function r(e){var t=o(e);return"try{return "!==t.slice(0,11)&&(t="return "+t),new Function("E",t+";")}function o(e){var t,n=[],r=de.split(e.replace(l,'"'),1);if(r.length>2||r[0]){var o,a,u=[];for(o=a=0;o<r.length;++o)t=r[o],t&&(t=1&o?i(t,1,n):'"'+t.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(u[a++]=t);t=a<2?u[0]:"["+u.join(",")+'].join("")'}else t=i(r[1],0,n);return n[0]&&(t=t.replace(p,function(e,t){return n[t].replace(/\r/g,"\\r").replace(/\n/g,"\\n")})),t}function i(e,t,n){function r(t,n){var r,o=1,i=d[t];for(i.lastIndex=n.lastIndex;r=i.exec(e);)if(r[0]===t)++o;else if(!--o)break;n.lastIndex=o?e.length:i.lastIndex}if(e=e.replace(f,function(e,t){return e.length>2&&!t?s+(n.push(e)-1)+"~":e}).replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var o,i=[],u=0;e&&(o=e.match(c))&&!o.index;){var l,p,g=/,|([[{(])|$/g;for(e=RegExp.rightContext,l=o[2]?n[o[2]].slice(1,-1).trim().replace(/\s+/g," "):o[1];p=(o=g.exec(e))[1];)r(p,g);p=e.slice(0,o.index),e=RegExp.rightContext,i[u++]=a(p,1,l)}e=u?u>1?"["+i.join(",")+'].join(" ").trim()':i[0]:a(e,t)}return e}function a(e,t,n){var r;return e=e.replace(m,function(e,t,n,o,i){return n&&(o=r?0:o+e.length,"this"!==n&&"global"!==n&&"window"!==n?(e=t+'("'+n+g+n,o&&(r="."===(i=i[o])||"("===i||"["===i)):o&&(r=!h.test(i.slice(o)))),e}),r&&(e="try{return "+e+"}catch(e){E(e,this)}"),n?e=(r?"function(){"+e+"}.call(this)":"("+e+")")+'?"'+n+'":""':t&&(e="function(v){"+(r?e.replace("return ","v="):"v=("+e+")")+';return v||v===0?v:""}.call(this)'),e}var u={};t.haveRaw=de.hasRaw,t.hasExpr=de.hasExpr,t.loopKeys=de.loopKeys,t.clearCache=function(){u={}},t.errorHandler=null;var s="⁗",c=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,f=RegExp(de.S_QBLOCKS,"g"),l=/\u2057/g,p=/\u2057(\d+)~/g,d={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},g='"in this?this:'+("object"!=typeof e?"global":"window")+").",m=/[,{][$\w]+(?=:)|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,h=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return t.version=de.version="v2.4.1",t}(),me=function e(){function e(e,r){var o=e&&e.match(/^\s*<([-\w]+)/),i=o&&o[1].toLowerCase(),a=H("div",x(i));return e=n(e,r),s.test(i)?a=t(a,e,i):v(a,e),a.stub=!0,a}function t(e,t,n){var r="o"===n[0],o=r?"select>":"table>";if(e.innerHTML="<"+o+t.trim()+"</"+o,o=e.firstChild,r)o.selectedIndex=-1;else{var i=u[n];i&&1===o.childElementCount&&(o=q(i,o))}return o}function n(e,t){if(!r.test(e))return e;var n={};return t=t&&t.replace(i,function(e,t,r){return n[t]=n[t]||r,""}).trim(),e.replace(a,function(e,t,r){return n[t]||r||""}).replace(o,function(e,n){return t||n||""})}var r=/<yield\b/i,o=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>|>)/gi,i=/<yield\s+to=['"]([^'">]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,a=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,u={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},s=le&&le<10?se:/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/;return e}(),he=function(t){if(!e)return{add:function(){},inject:function(){}};var n=function(){var e=H("style");C(e,"type","text/css");var t=q("style[type=riot]");return t?(t.id&&(e.id=t.id),t.parentNode.replaceChild(e,t)):document.getElementsByTagName("head")[0].appendChild(e),e}(),r=n.styleSheet,o="";return Object.defineProperty(t,"styleNode",{value:n,writable:!0}),{add:function(e){o+=e},inject:function(){o&&(r?r.cssText+=o:n.innerHTML+=o,o="")}}}(V),ve=function(e){var t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame;if(!t||/iP(ad|hone|od).*OS 6/.test(e.navigator.userAgent)){var n=0;t=function(e){var t=Date.now(),r=Math.max(16-(t-n),0);setTimeout(function(){e(n=t+r)},r)}}return t}(e||{});V.util={brackets:de,tmpl:ge},V.mixin=function(){var e={},t=e[J]={},n=0;return function(r,o,i){if(y(r))return void V.mixin("__unnamed_"+n++,r,!0);var a=i?t:e;if(!o){if(typeof a[r]===oe)throw new Error("Unregistered mixin: "+r);return a[r]}m(o)?(T(o.prototype,a[r]||{}),a[r]=o):a[r]=T(a[r]||{},o)}}(),V.tag=function(e,t,n,r,o){return m(r)&&(o=r,/^[\w\-]+\s?=/.test(n)?(r=n,n=""):r=""),n&&(m(n)?o=n:he.add(n)),e=e.toLowerCase(),X[e]={name:e,tmpl:t,attrs:r,fn:o},e},V.tag2=function(e,t,n,r,o){return n&&he.add(n),X[e]={name:e,tmpl:t,attrs:r,fn:o},e},V.mount=function(e,t,n){function r(e){var t="";return g(e,function(e){/[^-\w]/.test(e)||(e=e.trim().toLowerCase(),t+=",["+te+'="'+e+'"],['+ee+'="'+e+'"]')}),t}function o(){var e=Object.keys(X);return e+r(e)}function i(e){if(e.tagName){var r=_(e,te)||_(e,ee);t&&r!==t&&(r=t,C(e,te,t),C(e,ee,t));var o=G(e,r||e.tagName.toLowerCase(),n);o&&s.push(o)}else e.length&&g(e,i)}var a,u,s=[];if(he.inject(),y(t)&&(n=t,t=0),typeof e===ne?("*"===e?e=u=o():e+=r(e.split(/, */)),a=e?B(e):[]):a=e,"*"===t){if(t=u||o(),a.tagName)a=B(t,a);else{var c=[];g(a,function(e){c.push(B(t,e))}),a=c}t=0}return i(a),s},V.update=function(){return g(W,function(e){e.update()})},V.vdom=W,V.Tag=f;var xe=function(e){function t(t){var n=e[t];if(n)return n;throw new Error('Parser "'+t+'" not loaded.')}function n(e){var t=e.split(".");if(2!==t.length)throw new Error("Bad format for parsers._req");var n=i[t[0]][t[1]];if(n)return n;throw new Error('Parser "'+e+'" not found.')}function r(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function o(e,n,o,i){return o=r({pretty:!0,filename:i,doctype:"html"},o),t(e).render(n,o)}var i={};return i.html={jade:function(e,t,n){return console.log('DEPRECATION WARNING: jade was renamed "pug" - The jade parser will be removed in riot@3.0.0!'),o("jade",e,t,n)},pug:function(e,t,n){return o("pug",e,t,n)}},i.css={less:function(e,n,o,i){var a;return o=r({sync:!0,syncImport:!0,filename:i},o),t("less").render(n,o,function(e,t){if(e)throw e;a=t.css}),a}},i.js={es6:function(e,n){return n=r({blacklist:["useStrict","strict","react"],sourceMaps:!1,comments:!1},n),t("babel").transform(e,n).code},babel:function(e,n,o){return t("babel").transform(e,r({filename:o},n)).code},coffee:function(e,n){return t("CoffeeScript").compile(e,r({bare:!0},n))},livescript:function(e,n){return t("livescript").compile(e,r({bare:!0,header:!1},n))},typescript:function(e,n){return t("typescript")(e,n)},none:function(e){return e}},i.js.javascript=i.js.none,i.js.coffeescript=i.js.coffee,i._req=n,i.utils={extend:r},i}(e||global);V.parsers=xe;var ye=function(){function e(e){var t,n=j;for(~e.indexOf("\r")&&(e=e.replace(/\r\n?/g,"\n")),n.lastIndex=0;t=n.exec(e);)"<"===t[0][0]&&(e=RegExp.leftContext+RegExp.rightContext,n.lastIndex=t[3]+1);return e}function t(e,t){var n,r,o,i=[];for(L.lastIndex=0,e=e.replace(/\s+/g," ");n=L.exec(e);){var a=n[1].toLowerCase(),u=n[2];u?(u[0]!==z&&(u=z+(u[0]===K?u.slice(1,-1):u)+z),"type"===a&&k.test(u)?r=u:(H.test(u)&&("value"===a?o=1:R.test(a)?a="__"+a:~A.indexOf(a)&&(a="riot-"+a)),i.push(a+"="+u))):i.push(a)}return r&&(o&&(r=z+t._bp[0]+K+r.slice(1,-1)+K+t._bp[1]+z),i.push("type="+r)),i.join(" ")}function n(e,t,n){var r=n._bp;if(e&&r[4].test(e)){for(var o,i=t.expr&&(t.parser||t.type)?c:0,a=de.split(e,0,r),u=1;u<a.length;u+=2)o=a[u],"^"===o[0]?o=o.slice(1):i&&(o=i(o,t).trim(),";"===o.slice(-1)&&(o=o.slice(0,-1))),a[u]=q+(n.push(o)-1)+r[1];e=a.join("")}return e}function r(e,t){return t.length&&(e=e.replace(B,function(e,n){return t._bp[0]+t[n].trim().replace(/[\r\n]+/g," ").replace(/"/g,D)})),e}function o(e){for(var t=[],n="";t=F.exec(e);)n+=t[0].trim()+"\n";return n}function i(e){var t=e.replace(F,"");return t}function a(e,o,i){if(e=n(e,o,i).replace(M,function(e,n,r,o){return n=n.toLowerCase(),o=o&&!I.test(n)?"></"+n:"",r&&(n+=" "+t(r,i)),"<"+n+o+">"}),!o.whitespace){var a=[];/<pre[\s>]/.test(e)&&(e=e.replace($,function(e){return a.push(e),""})),e=e.trim().replace(/\s+/g," "),a.length&&(e=e.replace(/\u0002/g,function(){return a.shift()}))}return o.compact&&(e=e.replace(T,"><$1")),r(e,i).replace(P,"")}function u(t,n,r){return Array.isArray(n)?(r=n,n={}):(r||(r=[]),n||(n={})),r._bp=de.array(n.brackets),a(e(t),n,r)}function s(e){function t(e,t,n){for(t.lastIndex=0;n=t.exec(e);)"/"!==n[0][0]||n[1]||n[2]||(e=s.leftContext+" "+s.rightContext,t.lastIndex=n[3]+1);return e}function n(e,t){var n,r=1;for(t.lastIndex=0;r&&(n=t.exec(e));)"{"===n[0]?++r:"}"===n[0]&&--r;return r?e.length:t.lastIndex}var r,o,i,a,u=[],s=RegExp;for(~e.indexOf("/")&&(e=t(e,Q));r=e.match(Z);)u.push(s.leftContext),e=s.rightContext,i=n(e,G),a=r[1],o=!/^(?:if|while|for|switch|catch|function)$/.test(a),a=o?r[0].replace(a,"this."+a+" = function"):r[0],u.push(a,e.slice(0,i)),e=e.slice(i),o&&!/^\s*.\s*bind\b/.test(e)&&u.push(".bind(this)");return u.length?u.join("")+e:e}function c(e,t,n,r,o){if(!/\S/.test(e))return"";n||(n=t.type);var i=t.parser||n&&xe._req("js."+n,!0)||s;return i(e,r,o).replace(/\r\n?/g,"\n").replace(P,"")}function f(e,t,n,r){return"string"==typeof t&&(r=n,n=t,t={}),n&&"object"==typeof n&&(r=n,n=""),r||(r={}),c(e,t||{},n,r.parserOptions,r.url)}function l(e,t){var n=":scope";return t.replace(W,function(t,r,o){return o?(o=o.replace(/[^,]+/g,function(t){var r=t.trim();return r&&"from"!==r&&"to"!==r&&"%"!==r.slice(-1)?r=r.indexOf(n)<0?e+" "+r+',[riot-tag="'+e+'"] '+r+',[data-is="'+e+'"] '+r:r.replace(n,e)+","+r.replace(n,'[riot-tag="'+e+'"]')+","+r.replace(n,'[data-is="'+e+'"]'):t}),r?r+" "+o:o):t})}function p(e,t,n,r){var o=(r||(r={})).scoped;if(n)if("scoped-css"===n)o=!0;else if("css"!==n){var i=xe._req("css."+n,!0);e=i(t,e,r.parserOpts||{},r.url)}if(e=e.replace(de.R_MLCOMMS,"").replace(/\s+/g," ").trim(),o){if(!t)throw new Error("Can not parse scoped CSS without a tagName");e=l(t,e)}return e}function d(e,t,n){return t&&"object"==typeof t?(n=t,t=""):n||(n={}),p(e,n.tagName,t,n)}function g(e,t){return e?(e=K+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+K,t&&~e.indexOf("\n")?e.replace(/\n/g,"\\n"):e):"''"}function m(e,t,n,r,o,i,a){var u=a.debug?",\n ":", ",s="});";return o&&"\n"!==o.slice(-1)&&(s="\n"+s),i+"riot.tag2('"+e+K+u+g(t,1)+u+g(n)+u+g(r)+", function(opts) {\n"+o+s}function h(e){if(/<[-\w]/.test(e))for(var t,n=e.lastIndexOf("<"),r=e.length;~n;){if(t=e.slice(n,r).match(Y))return n+=t.index+t[0].length,[e.slice(0,n),e.slice(n)];r=n,n=e.lastIndexOf("<",n-1)}return["",e]}function v(e){if(e){var t=e.match(X);if(t=t&&(t[2]||t[3]))return t.replace("text/","")}return""}function x(e,t){if(e){var n=e.match(RegExp("\\s"+t+J,"i"));if(n=n&&n[1])return/^['"]/.test(n)?n.slice(1,-1):n}return""}function y(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'")}function b(e){var t=y(x(e,"options"));return t?JSON.parse(t):null}function w(e,t,n,r){var o=v(n),i=x(n,"src"),a=O({},t.parserOptions.js);return!i&&c(e,t,o,O(a,b(n)),r)}function _(e,t,n,r,o){var i=O({},t.parserOptions.style),a={parserOpts:O(i,b(n)),scoped:n&&/\sscoped(\s|=|$)/i.test(n),url:r};return p(e,o,v(n)||t.style,a)}function C(e,t,n,r){var o=xe._req("html."+n,!0);return o(e,r,t)}function S(u,s,f){var l,p=[],d={template:{},js:{},style:{}};s||(s={}),s.parserOptions=O(d,s.parserOptions||{}),l=s.exclude?function(e){return s.exclude.indexOf(e)<0}:function(){return 1},f||(f="");var g=de.array(s.brackets);return s.template&&(u=C(u,f,s.template,s.parserOptions.template)),u=e(u).replace(ee,function(e,u,d,v,x,y){var b="",C="",S="",O="",E=[];if(E._bp=g,d=d.toLowerCase(),v=v&&l("attribs")?r(t(n(v,s,E),E),E):"",(x||(x=y))&&/\S/.test(x))if(y)l("html")&&(S=a(y,s,E));else{x=x.replace(RegExp("^"+u,"gm"),""),x=x.replace(ne,function(e,t,n){return l("css")&&(C+=(C?" ":"")+_(n,s,t,f,d)),""}),x=x.replace(te,function(e,t,n){if(l("js")){var r=w(n,s,t,f);r&&(b+=(b?"\n":"")+r)}return""});var N=h(x.replace(P,""));l("html")&&(S=a(N[0],s,E)),l("js")&&(x=c(N[1],s,null,null,f),O=o(b),b=i(b),x&&(b+=(b?"\n":"")+x))}return b=/\S/.test(b)?b.replace(/\n{3,}/g,"\n\n"):"",s.entities?(p.push({tagName:d,html:S,css:C,attribs:v,js:b}),""):m(d,S,C,v,b,O,s)}),s.entities?p:u}var O=xe.utils.extend,E=/"[^"\n\\]*(?:\\[\S\s][^"\n\\]*)*"|'[^'\n\\]*(?:\\[\S\s][^'\n\\]*)*'/.source,N=de.R_STRINGS.source,L=/ *([-\w:\xA0-\xFF]+) ?(?:= ?('[^']*'|"[^"]*"|\S+))?/g,j=RegExp(/<!--(?!>)[\S\s]*?-->/.source+"|"+E,"g"),M=/<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^"'\/>]*(?:(?:"[^"]*"|'[^']*'|\/[^>])[^'"\/>]*)*)|\s*)(\/?)>/g,T=/>[ \t]+<(-?[A-Za-z]|\/[-A-Za-z])/g,R=RegExp("^(?:disabled|checked|readonly|required|allowfullscreen|auto(?:focus|play)|compact|controls|default|formnovalidate|hidden|ismap|itemscope|loop|multiple|muted|no(?:resize|shade|validate|wrap)?|open|reversed|seamless|selected|sortable|truespeed|typemustmatch)$"),A=["style","src","d"],I=/^(?:input|img|br|wbr|hr|area|base|col|embed|keygen|link|meta|param|source|track)$/,$=/<pre(?:\s+(?:[^">]*|"[^"]*")*)?>([\S\s]+?)<\/pre\s*>/gi,k=/^"(?:number|date(?:time)?|time|month|email|color)\b/i,F=/^(?: )*(?:import)(?:(?:.*))*$/gm,P=/[ \t]+$/gm,H=U(/@#\d/,"x01"),B=U(/@#(\d+)/g,"x01"),q="#",D="⁗",z='"',K="'",Z=/^[ \t]*([$_A-Za-z][$\w]*)\s*\([^()]*\)\s*{/m,G=RegExp("[{}]|"+de.S_QBLOCKS,"g"),Q=RegExp(de.R_MLCOMMS.source+"|//[^\r\n]*|"+de.S_QBLOCKS,"g"),W=RegExp("([{}]|^)[ ;]*([^@ ;{}][^{}]*)(?={)|"+E,"g"),X=/\stype\s*=\s*(?:(['"])(.+?)\1|(\S+))/i,J="\\s*=\\s*("+N+"|{[^}]+}|\\S+)",Y=/\/>\n|^<(?:\/?-?[A-Za-z][-\w\xA0-\xFF]*\s*|-?[A-Za-z][-\w\xA0-\xFF]*\s+[-\w:\xA0-\xFF][\S\s]*?)>\n/,ee=RegExp(/^([ \t]*)<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^'"\/>]+(?:(?:@|\/[^>])[^'"\/>]*)*)|\s*)?(?:\/>|>[ \t]*\n?([\S\s]*)^\1<\/\2\s*>|>(.*)<\/\2\s*>)/.source.replace("@",N),"gim"),te=/<script(\s+[^>]*)?>\n?([\S\s]*?)<\/script\s*>/gi,ne=/<style(\s+[^>]*)?>\n?([\S\s]*?)<\/style\s*>/gi;return V.util.compiler={compile:S,html:u,css:d,js:f,version:"v2.5.3"},S}();V.compile=function(){function e(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){4===r.readyState&&(200===r.status||!r.status&&r.responseText.length)&&t(r.responseText,n,e)},r.open("GET",e,!0),r.send("")}function n(e,t){if(typeof e===ne){var n=H("script"),r=document.documentElement;t&&(e+="\n//# sourceURL="+t+".js"),n.text=e,r.appendChild(n),r.removeChild(n)}}function r(t,r){function a(){o.trigger("ready"),i=!0,t&&t()}function u(e,t,r){var o=ye(e,t,r);n(o,r),--c||a()}var s=B('script[type="riot/tag"]'),c=s.length;if(c)for(var f=0;f<s.length;++f){var l=s[f],p=T({template:_(l,"template")},r),d=_(l,"src");d?e(d,u,p):u(l.innerHTML,p)}else a()}var o,i;return function(a,u,s){if(typeof a===ne){if(y(u)&&(s=u,u=!1),/^\s*</m.test(a)){var c=ye(a,s);return u!==!0&&n(c),m(u)&&u(c,a,s),c}e(a,function(e,t,r){var o=ye(e,t,r);n(o,r),u&&u(o,e,t)},s)}else{if(m(a)?(s=u,u=a):(s=a,u=t),i)return u&&u();o?u&&o.on("ready",u):(o=V.observable(),r(u,s))}}}();var be=V.mount;V.mount=function(e,t,n){var r;return V.compile(function(){r=be(e,t,n)}),r},typeof exports===re?module.exports=V:typeof define===ie&&typeof define.amd!==oe?define(function(){return V}):e.riot=V}("undefined"!=typeof window?window:void 0);

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

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

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

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

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