text: !function(a){"use strict";var b,c,d,e,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb=a.document||null,fb={},gb={},hb={},ib={},jb={}.hasOwnProperty,kb=function(){},lb={},mb="Missing Ractive.parse - cannot parse template. Either preparse or use the version that includes the parser",nb=1,ob=2,pb=3,qb=4,rb=7,sb=8,tb=30,ub={unset:!0},vb=eb?eb.createElement("div"):null,wb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},xb="0.3.3";try{Object.defineProperty({},"test",{value:0}),Object.defineProperties({},{test:{value:0}}),eb&&(Object.defineProperty(vb,"test",{value:0}),Object.defineProperties(vb,{test:{value:0}})),E=Object.defineProperty,F=Object.defineProperties}catch(yb){E=function(a,b,c){a[b]=c.value},F=function(a,b){var c;for(c in b)b.hasOwnProperty(c)&&E(a,c,b[c])}}try{Object.create(null),G=Object.create,H=function(){return Object.create(null)}}catch(yb){G=function(){var a=function(){};return function(b,c){var d;return a.prototype=b,d=new a,c&&Object.defineProperties(d,c),d}}(),H=function(){return{}}}var zb,Ab,Bb,Cb=function(a){return a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})};!function(){eb&&(void 0!==vb.style.transition?(Ab="transition",Bb="transitionend",zb=!0):void 0!==vb.style.webkitTransition?(Ab="webkitTransition",Bb="webkitTransitionEnd",zb=!0):zb=!1)}(),function(a){var b=a.document;b&&(Date.now||(Date.now=function(){return+new Date}),b&&!b.createElementNS&&(b.createElementNS=function(a,c){if(a&&"http://www.w3.org/1999/xhtml"!==a)throw"This browser does not support namespaces other than http://www.w3.org/1999/xhtml";return b.createElement(c)}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;for(void 0===b&&(b=0),0>b&&(b+=this.length),0>b&&(b=0),c=this.length;c>b;b++)if(jb.call(this,b)&&this[b]===a)return b;return-1}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;for(c=0,d=this.length;d>c;c+=1)jb.call(this,c)&&a.call(b,this[c],c,this)}),Array.prototype.map||(Array.prototype.map=function(a,b){var c,d,e=[];for(c=0,d=this.length;d>c;c+=1)jb.call(this,c)&&(e[c]=a.call(b,this[c],c,this));return e}),Array.prototype.filter||(Array.prototype.filter=function(a,b){var c,d,e=[];for(c=0,d=this.length;d>c;c+=1)jb.call(this,c)&&a.call(b,this[c],c,this)&&(e[e.length]=this[c]);return e}),a.addEventListener||function(a,b){var c,d,e,f,g;c=function(a,b){var c,d=this;for(c in a)d[c]=a[c];d.currentTarget=b,d.target=a.srcElement||b,d.timeStamp=+new Date,d.preventDefault=function(){a.returnValue=!1},d.stopPropagation=function(){a.cancelBubble=!0}},d=function(a,b){var d,e,f=this;d=f.listeners||(f.listeners=[]),e=d.length,d[e]=[b,function(a){b.call(f,new c(a,f))}],f.attachEvent("on"+a,d[e][1])},e=function(a,b){var c,d=this;if(d.listeners)for(c=d.listeners,i=c.length;i--;)c[i][0]===b&&d.detachEvent("on"+a,c[i][1])},a.addEventListener=b.addEventListener=d,a.removeEventListener=b.removeEventListener=e,"Element"in a?(Element.prototype.addEventListener=d,Element.prototype.removeEventListener=e):(f=b.getElementsByTagName("head")[0],g=b.createElement("style"),f.insertBefore(g,f.firstChild),g.styleSheet.cssText="*{-ms-event-prototype:expression(!this.addEventListener&&(this.addEventListener=addEventListener)&&(this.removeEventListener=removeEventListener))}")}(a,b))}(a),A=function(a,c,d,e,f){var g,h,i,j,k;c.transitionsEnabled&&("string"==typeof a?g=a:(g=a.n,a.a?h=a.a:a.d&&(i=new TextFragment({descriptor:a.d,root:c,owner:d,contextStack:parentFragment.contextStack}),h=i.toJson(),i.teardown())),k=c.transitions[g]||b.transitions[g],k&&(j=c._transitionManager,j.push(d.node),k.call(c,d.node,function(){j.pop(d.node)},h,j.info,f)))},y=function(a,b){var c,d=[];for(c=eb.createElement("div"),c.innerHTML=a;c.firstChild;)d[d.length]=c.firstChild,b.appendChild(c.firstChild);return d},function(){var a,b,c;z=function(b,c,d,e,f){var g,h,i,j,k,l,m;for(i=c.descriptor.i,g=d;e>g;g+=1)h=c.fragments[g],j=g-f,k=g,l=c.keypath+"."+(g-f),m=c.keypath+"."+g,h.index+=f,a(h,i,j,k,f,l,m);q(b)},a=function(d,e,f,g,h,i,j){var k,l,m;for(d.indexRefs&&void 0!==d.indexRefs[e]&&(d.indexRefs[e]=g),k=d.contextStack.length;k--;)m=d.contextStack[k],m.substr(0,i.length)===i&&(d.contextStack[k]=m.replace(i,j));for(k=d.items.length;k--;)switch(l=d.items[k],l.type){case rb:b(l,e,f,g,h,i,j);break;case sb:a(l.fragment,e,f,g,h,i,j);break;case qb:case ob:case pb:c(l,e,f,g,h,i,j)}},b=function(b,c,d,e,f,g,h){var i,j;for(i=b.attributes.length;i--;)j=b.attributes[i],j.fragment&&(a(j.fragment,c,d,e,f,g,h),j.twoway&&j.updateBindings());if(b.proxyFrags)for(i=b.proxyFrags.length;i--;)a(b.proxyFrags[i],c,d,e,f,g,h);b.node._ractive&&(b.node._ractive.keypath.substr(0,g.length)===g&&(b.node._ractive.keypath=b.node._ractive.keypath.replace(g,h)),b.node._ractive.index[c]=e),b.fragment&&a(b.fragment,c,d,e,f,g,h)},c=function(b,c,d,e,f,g,h){var i;if(b.descriptor.x&&(b.keypath&&l(b),b.expressionResolver&&b.expressionResolver.teardown(),b.expressionResolver=new U(b)),b.keypath?b.keypath.substr(0,g.length)===g&&(l(b),b.keypath=b.keypath.replace(g,h),k(b)):b.indexRef===c&&(b.value=e,b.render(e)),b.fragments)for(i=b.fragments.length;i--;)a(b.fragments[i],c,d,e,f,g,h)}}(),function(a){var b,c;V=function(a,d,e,f,g){var h,i;for(this.root=a,this.keypath=d,this.fn=c(e,f.length),this.values=[],this.refs=[],h=f.length;h--;)i=f[h],i[0]?this.values[h]=i[1]:this.refs[this.refs.length]=new b(a,i[1],this,h,g);this.selfUpdating=this.refs.length<=1,this.update()},V.prototype={bubble:function(){this.selfUpdating?this.update():this.deferred||(this.root._defEvals[this.root._defEvals.length]=this,this.deferred=!0)},update:function(){var a;try{a=this.fn.apply(null,this.values)}catch(b){if(this.root.debug)throw b;a=void 0}return w(a,this.value)||(j(this.root,this.keypath),this.root._cache[this.keypath]=a,m(this.root,this.keypath),this.value=a),this},teardown:function(){for(;this.refs.length;)this.refs.pop().teardown();j(this.root,this.keypath),this.root._evaluators[this.keypath]=null},refresh:function(){this.selfUpdating||(this.deferred=!0);for(var a=this.refs.length;a--;)this.refs[a].update();this.deferred&&(this.update(),this.deferred=!1)}},b=function(a,b,c,d,e){this.evaluator=c,this.keypath=b,this.root=a,this.argNum=d,this.type=tb,this.priority=e,this.value=c.values[d]=a.get(b),k(this)},b.prototype={update:function(){var a=this.root.get(this.keypath);w(a,this.value)||(this.evaluator.values[this.argNum]=a,this.evaluator.bubble(),this.value=a)},teardown:function(){l(this)}},c=function(b,c){var d,e;if(b=b.replace(/❖/g,"_"),a[b])return a[b];for(e=[];c--;)e[c]="_"+c;return d=new Function(e.join(","),"return("+b+")"),a[b]=d,d}}({}),function(){var a,b;U=function(b){var c,d,e,f,g;for(this.root=b.root,this.mustache=b,this.args=[],this.scouts=[],c=b.descriptor.x,g=b.parentFragment.indexRefs,this.str=c.s,e=this.unresolved=c.r?c.r.length:0,e||this.init(),d=0;e>d;d+=1)f=c.r[d],g&&void 0!==g[f]?this.resolveRef(d,!0,g[f]):this.scouts[this.scouts.length]=new a(this,f,b.contextStack,d)},U.prototype={init:function(){this.keypath=b(this.str,this.args),this.createEvaluator(),this.mustache.resolve(this.keypath)},teardown:function(){for(;this.scouts.length;)this.scouts.pop().teardown()},resolveRef:function(a,b,c){this.args[a]=[b,c],--this.unresolved||this.init()},createEvaluator:function(){this.root._evaluators[this.keypath]?this.root._evaluators[this.keypath].refresh():this.root._evaluators[this.keypath]=new V(this.root,this.keypath,this.str,this.args,this.mustache.priority)}},a=function(a,b,c,d){var e,f;f=this.root=a.root,e=p(f,b,c),e?a.resolveRef(d,!1,e):(this.ref=b,this.argNum=d,this.resolver=a,this.contextStack=c,f._pendingResolution[f._pendingResolution.length]=this)},a.prototype={resolve:function(a){this.keypath=a,this.resolver.resolveRef(this.argNum,!1,a)},teardown:function(){this.keypath||h(this)}},b=function(a,b){var c;return c=a.replace(/❖([0-9]+)/g,function(a,c){return b[c][1]}),"("+c.replace(/[\.\[\]]/g,"-")+")"}}(),function(){var a,c;B=function(d,e){var f,g;if(g=a(d,e))return g;if(g=a(b,e))return g;if(eb&&(f=eb.getElementById(e),f&&"SCRIPT"===f.tagName)){if(!b.parse)throw new Error(mb);b.partials[e]=b.parse(f.innerHTML)}return g=b.partials[e],g?c(g):(d.debug&&console&&console.warn&&console.warn('Could not find descriptor for partial "'+e+'"'),[])},a=function(a,d){if(a.partials[d]){if("string"==typeof a.partials[d]){if(!b.parse)throw new Error(mb);a.partials[d]=b.parse(a.partials[d])}return c(a.partials[d])}},c=function(a){return 1===a.length&&"string"==typeof a[0]?a[0]:a}}(),_=function(a,b){var c,d,e,f,g,h;if(a.owner=b.owner,f=a.owner.parentFragment,a.root=b.root,a.parentNode=b.parentNode,a.contextStack=b.contextStack||[],a.owner.type===qb&&(a.index=b.index),f&&(g=f.indexRefs)){a.indexRefs=H();for(h in g)a.indexRefs[h]=g[h]}for(a.priority=f?f.priority+1:0,b.indexRef&&(a.indexRefs||(a.indexRefs={}),a.indexRefs[b.indexRef]=b.index),a.items=[],e={parentFragment:a},c=b.descriptor?b.descriptor.length:0,d=0;c>d;d+=1)e.descriptor=b.descriptor[d],e.index=d,a.items[a.items.length]=a.createItem(e)},Y=function(a,b){var c,d,e;e=a.parentFragment=b.parentFragment,a.root=e.root,a.contextStack=e.contextStack,a.descriptor=b.descriptor,a.index=b.index||0,a.priority=e.priority,e.parentNode&&(a.parentNode=e.parentNode),a.type=b.descriptor.t,b.descriptor.r&&(e.indexRefs&&void 0!==e.indexRefs[b.descriptor.r]?(d=e.indexRefs[b.descriptor.r],a.indexRef=b.descriptor.r,a.value=d,a.render(a.value)):(c=p(a.root,b.descriptor.r,a.contextStack),c?a.resolve(c):(a.ref=b.descriptor.r,a.root._pendingResolution[a.root._pendingResolution.length]=a,a.descriptor.n&&a.render(!1)))),b.descriptor.x&&(a.expressionResolver=new U(a))},Z=function(){var a;a=this.root.get(this.keypath,!0),w(a,this.value)||(this.render(a),this.value=a)},$=function(a){this.keypath=a,k(this),this.update(),this.expressionResolver&&(this.expressionResolver=null)},function(){var a,b,c;ab=function(d,e){var f;return f={descriptor:d.descriptor.f,root:d.root,parentNode:d.parentNode,owner:d},d.descriptor.n?(c(d,e,!0,f),void 0):(t(e)?a(d,e,f):u(e)?b(d,f):c(d,e,!1,f),void 0)},a=function(a,b,c){var d,e;if(b.length<a.length)for(e=a.fragments.splice(b.length,a.length-b.length);e.length;)e.pop().teardown(!0);else if(b.length>a.length)for(d=a.length;d<b.length;d+=1)c.contextStack=a.contextStack.concat(a.keypath+"."+d),c.index=d,a.descriptor.i&&(c.indexRef=a.descriptor.i),a.fragments[d]=a.createFragment(c);a.length=b.length},b=function(a,b){a.length||(b.contextStack=a.contextStack.concat(a.keypath),b.index=0,a.fragments[0]=a.createFragment(b),a.length=1)},c=function(a,b,c,d){var e,f,g;if(f=t(b)&&0===b.length,e=c?f||!b:b&&!f){if(a.length||(d.contextStack=a.contextStack,d.index=0,a.fragments[0]=a.createFragment(d),a.length=1),a.length>1)for(g=a.fragments.splice(1);g.length;)g.pop().teardown(!0)}else a.length&&(a.teardownFragments(!0),a.length=0)}}(),function(a){var b=function(a,b,c){var d;if("string"==typeof b&&v(c)){if(d=a.get(b),void 0===d&&(d=0),v(d))a.set(b,d+c);else if(a.debug)throw new Error("Cannot add to a non-numeric value")}else if(a.debug)throw new Error("Bad arguments")};a.add=function(a,c){b(this,a,void 0===c?1:c)},a.subtract=function(a,c){b(this,a,void 0===c?-1:-c)},a.toggle=function(a){var b;if("string"==typeof a)b=this.get(a),this.set(a,!b);else if(this.debug)throw new Error("Bad arguments")}}(fb),function(a){var c,d;a.animate=function(a,b,d){var e,f,g;if("object"==typeof a){d=b||{},g=[];for(e in a)jb.call(a,e)&&(g[g.length]=c(this,e,a[e],d));return{stop:function(){for(;g.length;)g.pop().stop()}}}return d=d||{},f=c(this,a,b,d),{stop:function(){f.stop()}}},d={stop:kb},c=function(a,c,e,f){var g,h,i,j,k;for(k=a.get(c),j=bb.animations.length;j--;)bb.animations[j].keypath===c&&bb.animations[j].stop();return w(k,e)?(f.complete&&f.complete(1,f.to),d):(f.easing&&(g="function"==typeof f.easing?f.easing:a.easing&&a.easing[f.easing]?a.easing[f.easing]:b.easing[f.easing],"function"!=typeof g&&(g=null)),h=void 0===f.duration?400:f.duration,i=new W({keypath:c,from:k,to:e,root:a,duration:h,easing:g,step:f.step,complete:f.complete}),bb.push(i),a._animations[a._animations.length]=i,i)}}(fb),fb.bind=function(a){var b=this._bound;-1===b.indexOf(a)&&(b[b.length]=a,a.init(this))},fb.cancelFullscreen=function(){b.cancelFullscreen(this.el)},fb.fire=function(a){var b,c,d,e=this._subs[a];if(e)for(b=Array.prototype.slice.call(arguments,1),c=0,d=e.length;d>c;c+=1)e[c].apply(this,b)},fb.get=function(a){var b,c,d,e,f,g,h,i,j;if(!a)return this.data;if(b=this._cache,t(a)){if(!a.length)return this.data;d=a.slice(),e=d.join("."),j=!0}else{if(jb.call(b,a)&&b[a]!==ub)return b[a];d=r(a),e=d.join(".")}return!jb.call(b,e)||b[e]===ub||void 0===b[e]&&j?this._evaluators[e]?(i=this._evaluators[e].value,b[e]=i,i):(f=d.pop(),g=d.join("."),h=d.length?this.get(d):this.data,null!==h&&"object"==typeof h&&h!==ub?((c=this._cacheMap[g])?-1===c.indexOf(e)&&(c[c.length]=e):this._cacheMap[g]=[e],i=h[f],this.modifyArrays&&("("===e.charAt(0)||!t(i)||i._ractive&&i._ractive.setting||cb(i,e,this)),b[e]=i,i):void 0):b[e]},j=function(a,b){var c,d;if(a.modifyArrays&&"("!==b.charAt(0)&&(c=a._cache[b],t(c)&&!c._ractive.setting&&db(c,b,a)),a._cache[b]=ub,d=a._cacheMap[b])for(;d.length;)j(a,d.pop())},m=function(a,b,c){var d;for(d=0;d<a._deps.length;d+=1)o(a,b,d,c)},o=function(a,b,c,d){var e,f,g,h;if(e=a._deps[c]){if(f=e[b])for(g=f.length;g--;)f[g].update();if(!d&&(h=a._depsMap[b]))for(g=h.length;g--;)o(a,h[g],c)}},n=function(a,b,c){var d,e,f;for(f=b.length,d=0;d<a._deps.length;d+=1)if(a._deps[d])for(e=f;e--;)o(a,b[e],d,c)},q=function(a){for(var b,c;a._defEvals.length;)b=a._defEvals.pop(),b.update().deferred=!1;for(;a._defAttrs.length;)c=a._defAttrs.pop(),c.update().deferred=!1;for(;a._defSelectValues.length;)c=a._defSelectValues.pop(),c.parentNode.value=c.value,c.value=c.parentNode.value},k=function(a){var b,c,d,e,f,g,h,i;for(g=a.root,h=a.keypath,i=a.priority,b=g._deps[i]||(g._deps[i]={}),c=b[h]||(b[h]=[]),c[c.length]=a,d=r(h);d.length;)d.pop(),e=d.join("."),f=g._depsMap[e]||(g._depsMap[e]=[]),void 0===f[h]&&(f[h]=0,f[f.length]=h),f[h]+=1,h=e},X=function(a,b){var c,d;c=b.el?x(b.el):a.el,c&&!b.append&&(c.innerHTML=""),a._transitionManager=d=C(a,b.complete),a.fragment=new I({descriptor:a.template,root:a,owner:a,parentNode:c}),c&&c.appendChild(a.fragment.docFrag),a._transitionManager=null,d.ready()},p=function(a,b,c){var d,e,f,g,h,i;if("."===b)return c[c.length-1];if("."===b.charAt(0))return c[c.length-1]+b;for(d=r(b),e=d.pop(),c=c.concat();c.length;)if(f=c.pop(),g=r(f),h=a.get(g.concat(d)),"object"==typeof h&&null!==h&&jb.call(h,e)){i=f+"."+b;break}return i||void 0===a.get(b)||(i=b),i},h=function(a){if(a.keypath)l(a);else{var b=a.root._pendingResolution.indexOf(a);-1!==b&&a.root._pendingResolution.splice(b,1)}},l=function(a){var b,c,d,e,f,g,h;for(f=a.root,g=a.keypath,h=a.priority,b=f._deps[h][g],b.splice(b.indexOf(a),1),c=r(g);c.length;)c.pop(),d=c.join("."),e=f._depsMap[d],e[g]-=1,e[g]||(e.splice(e.indexOf(g),1),e[g]=void 0),g=d},fb.link=function(a){var b=this;return function(c){b.set(a,c)}},function(a){var b,c;a.observe=function(a,c,d){var e,f=[];if("object"==typeof a){d=c;for(e in a)jb.call(a,e)&&(c=a[e],f[f.length]=b(this,e,c,d));return{cancel:function(){for(;f.length;)f.pop().cancel()}}}return b(this,a,c,d)},b=function(a,b,d,e){var f;return f=new c(a,b,d,e),e&&e.init===!1||f.update(!0),k(f),{cancel:function(){l(f)}}},c=function(a,b,c,d){this.root=a,this.keypath=b,this.callback=c,this.priority=0,this.context=d&&d.context?d.context:a},c.prototype={update:function(a){var b;if(b=this.root.get(this.keypath,!0),!w(b,this.value)||a){try{this.callback.call(this.context,b,this.value)}catch(c){if(this.root.debug)throw c}this.value=b}}}}(fb),fb.off=function(a,b){var c,d;b||(a?this._subs[a]=[]:this._subs={}),c=this._subs[a],c&&(d=c.indexOf(b),-1!==d&&c.splice(d,1))},fb.on=function(a,b){var c,d,e=this;if("object"==typeof a){c=[];for(d in a)jb.call(a,d)&&(c[c.length]=this.on(d,a[d]));return{cancel:function(){for(;c.length;)c.pop().cancel()}}}return this._subs[a]?this._subs[a].push(b):this._subs[a]=[b],{cancel:function(){e.off(a,b)}}},fb.renderHTML=function(){return this.fragment.toString()},fb.requestFullscreen=function(){b.requestFullscreen(this.el)},function(a){var b,c;a.set=function(a,d,e){var f,g,h,i,j,k,l;if(g=[""],f=[],u(a)&&(e=d),k=this._transitionManager,this._transitionManager=l=C(this,e),u(a))for(h in a)jb.call(a,h)&&(j=r(h),i=j.join("."),d=a[h],b(this,i,j,d,f,g));else j=r(a),i=j.join("."),b(this,i,j,d,f,g);return f.length&&this._pendingResolution.length&&c(this),g.length&&n(this,g,!0),f.length&&n(this,f),q(this),this._transitionManager=k,l.ready(),this.setting||(this.setting=!0,"object"==typeof a?this.fire("set",a):this.fire("set",a,d),this.setting=!1),this},b=function(a,b,c,d,e,f){var g,h,i,k,l,m;if(k=c.slice(),l=[],g=a.get(b),g!==d){for(i=a.data;c.length>1;)h=l[l.length]=c.shift(),i[h]||(m||(m=l.join(".")),i[h]=/^\s*[0-9]+\s*$/.test(c[0])?[]:{}),i=i[h];h=c[0],i[h]=d}else if("object"!=typeof d)return;for(j(a,m||b),e[e.length]=b;k.length>1;)k.pop(),b=k.join("."),-1===f.indexOf(b)&&(f[f.length]=b)},c=function(a){var b,c,d;for(b=a._pendingResolution.length;b--;)c=a._pendingResolution.splice(b,1)[0],(d=p(a,c.ref,c.contextStack))?c.resolve(d):a._pendingResolution[a._pendingResolution.length]=c}}(fb),fb.teardown=function(a){var b,c,d;for(this.fire("teardown"),d=this._transitionManager,this._transitionManager=c=C(this,a),this.fragment.teardown(!0);this._animations[0];)this._animations[0].stop();for(b in this._cache)j(this,b);for(;this._bound.length;)this.unbind(this._bound.pop());this._transitionManager=d,c.ready()},fb.toggleFullscreen=function(){b.isFullscreen(this.el)?this.cancelFullscreen():this.requestFullscreen()},fb.unbind=function(a){var b,c=this._bound;b=c.indexOf(a),-1!==b&&(c.splice(b,1),a.teardown(this))},fb.update=function(a,b){var c,d;return"function"==typeof a&&(b=a),d=this._transitionManager,this._transitionManager=c=C(this,b),j(this,a||""),m(this,a||""),q(this),this._transitionManager=d,c.ready(),"string"==typeof a?this.fire("update",a):this.fire("update"),this},gb.backbone=function(a,b){var c,d,e,f,g,h,i;return b&&(b+=".",g=new RegExp("^"+b.replace(/\./g,"\\.")),h=b.length),{init:function(j){b?(i=function(a){var c,d;d={};for(c in a)jb.call(a,c)&&(d[b+c]=a[c]);return d},f=function(a){c||(d=!0,j.set(i(a.changed)),d=!1)},e=function(b,e){d||g.test(b)&&(c=!0,a.set(b.substring(h),e),c=!1)}):(f=function(a){c||(d=!0,j.set(a.changed),d=!1)},e=function(b,e){d||(c=!0,a.set(b,e),c=!1)}),a.on("change",f),j.on("set",e),j.set(b?i(a.attributes):a.attributes)},teardown:function(b){a.off("change",f),b.off("set",e)}}},gb.statesman=function(a,b){var c,d,e,f,g,h,i;return b&&(b+=".",g=new RegExp("^"+b.replace(/\./g,"\\.")),h=b.length,i=function(a){var c,d;if(a){d={};for(c in a)jb.call(a,c)&&(d[b+c]=a[c]);return d}}),{init:function(j){var k;b?(f=function(a){c||(d=!0,a=i(a),j.set(a),d=!1)},j.twoway&&(e=function(b,e){d||g.test(b)&&(c=!0,a.set(b.substring(h),e),c=!1)})):(f=function(a){c||(d=!0,j.set(a),d=!1)},j.twoway&&(e=function(b,e){d||(c=!0,a.set(b,e),c=!1)})),a.on("change",f),j.twoway&&j.on("set",e),k=b?i(a.get()):a.get(),k&&j.set(b?i(a.get()):a.get())},teardown:function(b){a.off("change",f),b.off("set",e)}}},c={linear:function(a){return a},easeIn:function(a){return Math.pow(a,3)},easeOut:function(a){return Math.pow(a-1,3)+1},easeInOut:function(a){return(a/=.5)<1?.5*Math.pow(a,3):.5*(Math.pow(a-2,3)+2)}},hb.hover=function(a,b){var c,d;return c=function(c){b({node:a,original:c,hover:!0})},d=function(c){b({node:a,original:c,hover:!1})},a.addEventListener("mouseover",c),a.addEventListener("mouseout",d),{teardown:function(){a.removeEventListener("mouseover",c),a.removeEventListener("mouseout",d)}}},function(){var a=function(a){return function(b,c){var d;return b.addEventListener("keydown",d=function(d){var e=d.which||d.keyCode;e===a&&(d.preventDefault(),c({node:b,original:d}))}),{teardown:function(){b.removeEventListener(d)}}}};hb.enter=a(13),hb.tab=a(9),hb.escape=a(27),hb.space=a(32)}(),hb.tap=function(a,b){var c,d,e,f;return e=5,f=400,c=function(a){var c,d,g,h,i,j;d=a.clientX,g=a.clientY,c=this,h=function(a){b({node:c,original:a}),j()},i=function(a){(Math.abs(a.clientX-d)>=e||Math.abs(a.clientY-g)>=e)&&j()},j=function(){eb.removeEventListener("mousemove",i),eb.removeEventListener("mouseup",h)},eb.addEventListener("mousemove",i),eb.addEventListener("mouseup",h),setTimeout(j,f)},a.addEventListener("mousedown",c),d=function(a){var c,d,g,h,i,j,k,l;1===a.touches.length&&(h=a.touches[0],d=h.clientX,g=h.clientY,c=this,i=h.identifier,k=function(a){var d;d=a.changedTouches[0],d.identifier!==i&&l(),a.preventDefault(),b({node:c,original:a}),l()},j=function(a){var b;(1!==a.touches.length||a.touches[0].identifier!==i)&&l(),b=a.touches[0],(Math.abs(b.clientX-d)>=e||Math.abs(b.clientY-g)>=e)&&l()},l=function(){window.removeEventListener("touchmove",j),window.removeEventListener("touchend",k),window.removeEventListener("touchcancel",l)},window.addEventListener("touchmove",j),window.addEventListener("touchend",k),window.addEventListener("touchcancel",l),setTimeout(l,f))},a.addEventListener("touchstart",d),{teardown:function(){a.removeEventListener("mousedown",c),a.removeEventListener("touchstart",d)}}},function(){var a,c,e,f,g,h,i,j,k,l,m,n,o;d=function(a){var c,d;return c=this,d=function(a){l(this,d,a||{})},d.prototype=G(c.prototype),c!==b&&f(d,c),h(d,a),i(d),j(d,a),k(d),d.extend=c.extend,d},m=["data","partials","transitions","eventDefinitions"],n=["el","template","complete","modifyArrays","twoway","lazy","append","preserveWhitespace","sanitize","noIntro","transitionsEnabled"],o=m.concat(n),f=function(a,b){m.forEach(function(d){b[d]&&(a[d]=c(b[d]))}),n.forEach(function(c){void 0!==b[c]&&(a[c]=b[c])})},g=function(a,b){return/_super/.test(a)?function(){var c=this._super;this._super=b,a.apply(this,arguments),this._super=c}:a},h=function(a,b){var c,d;m.forEach(function(c){var d=b[c];d&&(a[c]?e(a[c],d):a[c]=d)}),n.forEach(function(c){void 0!==b[c]&&(a[c]=b[c])});for(c in b)jb.call(b,c)&&!jb.call(a.prototype,c)&&-1===o.indexOf(c)&&(d=b[c],a.prototype[c]="function"==typeof d&&"function"==typeof a.prototype[c]?g(d,a.prototype[c]):d)},i=function(a){var c;if("string"==typeof a.template){if(!b.parse)throw new Error(mb);if("#"===a.template.charAt(0)&&eb){if(c=eb.getElementById(a.template.substring(1)),!c||"SCRIPT"!==c.tagName)throw new Error("Could not find template element ("+a.template+")");a.template=b.parse(c.innerHTML,a)}else a.template=b.parse(a.template,a)}},j=function(a,b){u(a.template)&&(a.partials||(a.partials={}),e(a.partials,a.template.partials),b.partials&&e(a.partials,b.partials),a.template=a.template.template)},k=function(a){var c,d;if(a.partials)for(c in a.partials)if(jb.call(a.partials,c)){if("string"==typeof a.partials[c]){if(!b.parse)throw new Error(mb);d=b.parse(a.partials[c],a)}else d=a.partials[c];a.partials[c]=d}},l=function(d,e,f){!f.template&&e.template&&(f.template=e.template),m.forEach(function(b){f[b]?a(f[b],e[b]):e[b]&&(f[b]=c(e[b]))}),n.forEach(function(a){void 0===f[a]&&void 0!==e[a]&&(f[a]=e[a])}),b.call(d,f),d.init&&d.init.call(d,f)},a=function(a,b){var c;for(c in b)jb.call(b,c)&&!jb.call(a,c)&&(a[c]=b[c])},c=function(a){var b,c={};for(b in a)jb.call(a,b)&&(c[b]=a[b]);return c},e=function(a,b){var c;for(c in b)jb.call(b,c)&&(a[c]=b[c])}}(),f=function(a,c){return v(a)&&v(c)?b.interpolators.number(+a,+c):t(a)&&t(c)?b.interpolators.array(a,c):u(a)&&u(c)?b.interpolators.object(a,c):function(){return c}},g={number:function(a,b){var c=b-a;return c?function(b){return a+b*c}:function(){return a}},array:function(a,c){var d,e,f,g;for(d=[],e=[],g=f=Math.min(a.length,c.length);g--;)e[g]=b.interpolate(a[g],c[g]);for(g=f;g<a.length;g+=1)d[g]=a[g];for(g=f;g<c.length;g+=1)d[g]=c[g];return function(a){for(var b=f;b--;)d[b]=e[b](a);return d}},object:function(a,c){var d,e,f,g,h=[];f={},e={};for(g in a)jb.call(a,g)&&(jb.call(c,g)?(h[h.length]=g,e[g]=b.interpolate(a[g],c[g])):f[g]=a[g]);for(g in c)jb.call(c,g)&&!jb.call(a,g)&&(f[g]=c[g]);return d=h.length,function(a){for(var b,c=d;c--;)b=h[c],f[b]=e[b](a);return f}}};var Db=H();F(Db,{preserveWhitespace:{enumerable:!0,value:!1},append:{enumerable:!0,value:!1},twoway:{enumerable:!0,value:!0},modifyArrays:{enumerable:!0,value:!0},data:{enumerable:!0,value:{}},lazy:{enumerable:!0,value:!1},debug:{enumerable:!0,value:!1},transitions:{enumerable:!0,value:{}},eventDefinitions:{enumerable:!0,value:{}},noIntro:{enumerable:!0,value:!1},transitionsEnabled:{enumerable:!0,value:!0}}),b=function(a){var c,d,e,f,g,h;for(c in Db)jb.call(a,c)||(a[c]="object"==typeof Db[c]?{}:Db[c]);if(F(this,{_guid:{value:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b,c;return b=0|16*Math.random(),c="x"==a?b:8|3&b,c.toString(16)})},_subs:{value:H()},_cache:{value:{}},_cacheMap:{value:H()},_deps:{value:[]},_depsMap:{value:H()},_pendingResolution:{value:[]},_defAttrs:{value:[]},_defEvals:{value:[]},_defSelectValues:{value:[]},_proxies:{value:H()},_customProxies:{value:H()},_evaluators:{value:H()},_bound:{value:[]},_transitionManager:{value:null,writable:!0},_animations:{value:[]},nodes:{value:{}}}),this.modifyArrays=a.modifyArrays,this.twoway=a.twoway,this.lazy=a.lazy,this.debug=a.debug,a.el&&(this.el=x(a.el),!this.el&&this.debug))throw new Error("Could not find container element");if(this.data=a.data||{},this.partials={},this.transitions=a.transitions,this.eventDefinitions=a.eventDefinitions,a.bindings)if(t(a.bindings))for(e=0;e<a.bindings.length;e+=1)this.bind(a.bindings[e]);else this.bind(a.bindings);if(f=a.template,"string"==typeof f){if(!b.parse)throw new Error(mb);if("#"===f.charAt(0)&&eb){if(g=eb.getElementById(f.substring(1)),!g)throw new Error("Could not find template element ("+f+")");h=b.parse(g.innerHTML,a)}else h=b.parse(f,a)}else h=f;if(u(h)&&(this.partials=h.partials,h=h.template),h&&1===h.length&&"string"==typeof h[0]&&(h=h[0]),this.template=h,a.partials)for(c in a.partials)if(jb.call(a.partials,c)){if(d=a.partials[c],"string"==typeof d){if(!b.parse)throw new Error(mb);d=b.parse(d,a)}this.partials[c]=d}for(c in this.partials)jb.call(this.partials,c)&&1===this.partials[c].length&&"string"==typeof this.partials[c][0]&&(this.partials[c]=this.partials[c][0]);this.transitionsEnabled=a.noIntro?!1:a.transitionsEnabled,X(this,{el:this.el,append:a.append,complete:a.complete}),this.transitionsEnabled=a.transitionsEnabled},function(){var a,b,d,e;eb&&(a=function(a,b){var c,d={};for(c=b.length;c--;)d[b[c]]=a[b[c]];return d},b=function(a,b,c,d){for(var e,f=b.length;f--;)e=b[f],a.style[e]=c&&c[e]?"function"==typeof c[e]?c[e](d):c[e]:0},d=function(a,b){var c;if(!b)return a;for(c in b)jb.call(b,c)&&(a[c]=b[c]);return a},zb&&(e=function(e,f,g,h){return"string"==typeof e&&(e=[e]),function(i,j,k,l,m){var n,o,p,q,r,s,t,u,v,w,x;k=Eb(k),s=k.duration||f.duration,c=Cb(k.easing||f.easing),t=(k.delay||f.delay||0)+(k.stagger||f.stagger||0)*l.i,u=m?g:h,v=m?h:g,o=window.getComputedStyle(i),r=i.getAttribute("style"),m?(w=i.style.position,x=i.style.visibility,i.style.position="absolute",i.style.visibility="hidden",setTimeout(function(){p=a(o,e),u=g,v=d(p,h),i.style.position=w,i.style.visibility=x,b(i,e,u,k),setTimeout(q,0)},t)):setTimeout(function(){p=a(o,e),u=d(p,h),v=g,b(i,e,u,k),setTimeout(q,0)},t),q=function(){i.style[Ab+"Duration"]=s/1e3+"s",i.style[Ab+"Properties"]=e.map(Cb).join(","),i.style[Ab+"TimingFunction"]=c,n=function(){i.removeEventListener(Bb,n),m&&i.setAttribute("style",r||""),j()},i.addEventListener(Bb,n),b(i,e,v,k)}}},ib.slide=e(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom","overflowY"],{duration:400,easing:"easeInOut"},{overflowY:"hidden"},{overflowY:"hidden"}),ib.fade=e("opacity",{duration:300,easing:"linear"}),ib.fly=e(["opacity","left","position"],{duration:400,easing:"easeOut"},{position:"relative",left:"-500px"},{position:"relative",left:0})))}();var Eb=function(a){return"fast"===a?{duration:200}:"slow"===a?{duration:600}:v(a)?{duration:+a}:a||{}};!function(a){var b,c,d;eb&&(c=function(a,b,e){var f,g;return 3===a.nodeType?(d(a,b,e),void 0):(f=Array.prototype.slice.call(a.childNodes),g=function(){return f.length?(c(f.shift(),g,e),void 0):(b(),void 0)},g(),void 0)},d=function(a,b,c){var d,e,f,g;return d=a._hiddenData,(e=d.length)?(g=0,f=setInterval(function(){var c,h,i,j,k;c=d.substr(0,g),h=d.substring(g),i=/^\w+/.exec(h),j=i?i[0].length:0,k=new Array(j+1).join(" "),a.data=c+k,g===e&&(clearInterval(f),delete a._hiddenData,b()),g+=1},c),void 0):(b(),void 0)},b=function(a,b,d){var e,f,g,h;d=Eb(d),e=d.interval||(d.speed?1e3/d.speed:d.duration?a.textContent.length/d.duration:4),f=a.getAttribute("style"),g=window.getComputedStyle(a),a.style.visibility="hidden",setTimeout(function(){var i,j,k;j=g.width,i=g.height,k=g.visibility,h(a),setTimeout(function(){a.style.width=j,a.style.height=i,a.style.visibility="visible",c(a,function(){a.setAttribute("style",f||""),b()},e)},d.delay||0)}),h=function(a){var b,c;if(3===a.nodeType)return a._hiddenData=""+a.data,a.data="",void 0;for(b=Array.prototype.slice.call(a.childNodes),c=b.length;c--;)h(b[c])}},a.typewriter=b)}(ib),function(a){var b,c,d;if(eb){if(a.fullscreenEnabled=eb.fullscreenEnabled||eb.mozFullScreenEnabled||eb.webkitFullscreenEnabled,!a.fullscreenEnabled)return a.requestFullscreen=a.cancelFullscreen=kb,void 0;vb.requestFullscreen?b="requestFullscreen":vb.mozRequestFullScreen?b="mozRequestFullScreen":vb.webkitRequestFullscreen&&(b="webkitRequestFullscreen"),a.requestFullscreen=function(a){a[b]&&a[b]()},eb.cancelFullscreen?c="cancelFullscreen":eb.mozCancelFullScreen?c="mozCancelFullScreen":eb.webkitCancelFullScreen&&(c="webkitCancelFullScreen"),a.cancelFullscreen=function(){eb[c]()},void 0!==eb.fullscreenElement?d="fullscreenElement":void 0!==eb.mozFullScreenElement?d="mozFullScreenElement":void 0!==eb.webkitFullscreenElement&&(d="webkitFullscreenElement"),a.isFullscreen=function(a){return a===eb[d]}}}(b),W=function(a){var c;this.startTime=Date.now();for(c in a)jb.call(a,c)&&(this[c]=a[c]);this.interpolator=b.interpolate(this.from,this.to),this.running=!0},W.prototype={tick:function(){var a,b,c,d,e;return this.running?(d=Date.now(),a=d-this.startTime,a>=this.duration?(this.root.set(this.keypath,this.to),this.step&&this.step(1,this.to),this.complete&&this.complete(1,this.to),e=this.root._animations.indexOf(this),-1===e&&console&&console.warn&&console.warn("Animation was not found"),this.root._animations.splice(e,1),this.running=!1,!1):(b=this.easing?this.easing(a/this.duration):a/this.duration,c=this.interpolator(b),this.root.set(this.keypath,c),this.step&&this.step(b,c),!0)):!1},stop:function(){var a;this.running=!1,a=this.root._animations.indexOf(this),-1===a&&console&&console.warn&&console.warn("Animation was not found"),this.root._animations.splice(a,1)}},bb={animations:[],tick:function(){var a,b;for(a=0;a<this.animations.length;a+=1)b=this.animations[a],b.tick()||this.animations.splice(a--,1);this.animations.length?D(this.boundTick):this.running=!1},boundTick:function(){bb.tick()},push:function(a){this.animations[this.animations.length]=a,this.running||(this.running=!0,this.tick())}},function(a,b,c){var d,e;if(c.requestAnimationFrame)return D=c.requestAnimationFrame,void 0;for(d=0;d<a.length&&!D;++d)D=c[a[d]+"RequestAnimationFrame"];D||(e=c.setTimeout,D=function(a){var c,d,f;return c=Date.now(),d=Math.max(0,16-(c-b)),f=e(function(){a(c+d)},d),b=c+d,f})}(["ms","moz","webkit","o"],0,a),function(){var a,b,c,d,e,f;cb=function(a,c,d){var e,f,g;a._ractive?(e=a._ractive.roots,f=a._ractive.keypathsByGuid,f[d._guid]||(e[e.length]=d,f[d._guid]=[]),g=f[d._guid],-1===g.indexOf(c)&&(g[g.length]=c)):(E(a,"_ractive",{value:{roots:[d],keypathsByGuid:{}},configurable:!0}),a._ractive.keypathsByGuid[d._guid]=[c],b(a))
  },db=function(a,b,d){var e,f,g,h;if(!a._ractive)throw new Error("Attempted to remove keypath from non-wrapped array. This error is unexpected - please send a bug report to @rich_harris");if(e=a._ractive.roots,f=a._ractive.keypathsByGuid,!f[d._guid])throw new Error("Ractive instance was not listed as a dependent of this array. This error is unexpected - please send a bug report to @rich_harris");if(g=f[d._guid],h=g.indexOf(b),-1===h)throw new Error("Attempted to unlink non-linked keypath from array. This error is unexpected - please send a bug report to @rich_harris");g.splice(h,1),g.length||(e.splice(e.indexOf(d),1),f[d._guid]=null),e.length||c(a)},a=function(a,b,c){var d,e,f,g,h,i;i=a._ractive.keypathsByGuid,d=function(a){for(var b=a.length;b--;)e(a[b])},e=function(a){var b,c=a._transitionManager;a._transitionManager=b=C(a,kb),f(a,i[a._guid]),a._transitionManager=c,b.ready()},f=function(a,b){for(var c=b.length;c--;)g(a,b[c])},g=function(a,d){var e,f,g,i,k,l,o;for(j(a,d),k=[],l=[],o=0;o<a._deps.length;o+=1)if(e=a._deps[o],e&&(f=e[d])){for(h(a,d,f,k,l),q(a);k.length;)k.pop().smartUpdate(b,c);for(;l.length;)l.pop().update()}for(q(a),i=[],g=r(d);g.length;)g.pop(),i[i.length]=g.join(".");n(a,i,!0),m(a,d+".length",!0)},h=function(a,b,c,d,e){var f,g;for(f=c.length;f--;)g=c[f],g.type===tb?g.update():g.keypath===b&&g.type===qb?d[d.length]=g:e[e.length]=g},d(a._ractive.roots)},d=[],f=["pop","push","reverse","shift","sort","splice","unshift"],f.forEach(function(b){var c=function(){var c=Array.prototype[b].apply(this,arguments);return this._ractive.setting=!0,a(this,b,arguments),this._ractive.setting=!1,c};E(d,b,{value:c})}),e={},e.__proto__?(b=function(a){a.__proto__=d},c=function(a){delete a._ractive,a.__proto__=Array.prototype}):(b=function(a){var b,c;for(b=f.length;b--;)c=f[b],E(a,c,{value:d[c],configurable:!0})},c=function(a){var b;for(b=f.length;b--;)delete a[f[b]];delete a._ractive})}(),function(){var a,b,c,d,e,f;a={"accept-charset":"acceptCharset",accesskey:"accessKey",bgcolor:"bgColor","class":"className",codebase:"codeBase",colspan:"colSpan",contenteditable:"contentEditable",datetime:"dateTime",dirname:"dirName","for":"htmlFor","http-equiv":"httpEquiv",ismap:"isMap",maxlength:"maxLength",novalidate:"noValidate",pubdate:"pubDate",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",usemap:"useMap"},K=function(a){return b(this,a.name),null===a.value||"string"==typeof a.value?(c(this,a),void 0):(this.root=a.root,this.element=a.element,this.parentNode=a.parentNode,this.lcName=this.name.toLowerCase(),this.parentFragment=this.element.parentFragment,this.fragment=new Q({descriptor:a.value,root:this.root,owner:this,contextStack:a.contextStack}),this.parentNode&&(d(this,a),this.selfUpdating=e(this),this.isBindable=f(this),this.ready=!0),void 0)},K.prototype={bind:function(a){var b,c,d,e,f=this,g=this.parentNode;if(!this.fragment)return!1;if(1!==this.fragment.items.length||this.fragment.items[0].type!==ob||!this.fragment.items[0].keypath&&!this.fragment.items[0].ref)return this.root.debug&&console&&console.warn&&console.warn("Not a valid two-way data binding candidate - must be a single interpolator:",this.fragment.items),!1;if(this.interpolator=this.fragment.items[0],this.keypath=this.interpolator.keypath||this.interpolator.descriptor.r,"SELECT"===g.tagName&&"value"===this.propertyName)for(b=g.getElementsByTagName("option"),e=b.length,d=0;e>d;d+=1)if(c=b[d],c.hasAttribute("selected")){this.root.set(this.keypath,c.value);break}if("checkbox"===g.type||"radio"===g.type?"name"===this.propertyName?(g.name="{{"+this.keypath+"}}",this.updateViewModel=function(){g.checked&&f.root.set(f.keypath,g.value)}):"checked"===this.propertyName&&(this.updateViewModel=function(){f.root.set(f.keypath,g.checked)}):this.updateViewModel=function(){var a;a=g.value,"0"===a?a=0:""!==a&&(a=+a||a),f.root.set(f.keypath,a)},this.updateViewModel)for(this.twoway=!0,this.boundEvents=["change","click","blur"],a||(this.boundEvents[3]="input",g.attachEvent&&(this.boundEvents[4]="keyup")),d=this.boundEvents.length;d--;)g.addEventListener(this.boundEvents[d],this.updateViewModel)},updateBindings:function(){this.keypath=this.interpolator.keypath||this.interpolator.r,"name"===this.propertyName&&(this.parentNode.name="{{"+this.keypath+"}}")},teardown:function(){var a;if(this.boundEvents)for(a=this.boundEvents.length;a--;)this.parentNode.removeEventListener(this.boundEvents[a],this.updateViewModel);this.fragment&&this.fragment.teardown()},bubble:function(){this.selfUpdating?this.update():!this.deferred&&this.ready&&(this.root._defAttrs[this.root._defAttrs.length]=this,this.deferred=!0)},update:function(){var a,b;if(!this.ready)return this;if(this.twoway){if(b=this.lcName,a=this.interpolator.value,"name"===b&&("checkbox"===this.parentNode.type||"radio"===this.parentNode.type))return this.parentNode.checked=a===this.parentNode.value?!0:!1,this;if(eb.activeElement===this.parentNode)return this}if(a=this.fragment.getValue(),void 0===a&&(a=""),a!==this.value){if(this.useProperty)return"select"===this.element.descriptor.e&&"value"===this.propertyName?(this.value=a,this.root._defSelectValues.push(this),this):(this.parentNode[this.propertyName]=a,this.value=a,this);if(this.namespace)return this.parentNode.setAttributeNS(this.namespace,this.name,a),this.value=a,this;"id"===this.lcName&&(void 0!==this.value&&(this.root.nodes[this.value]=void 0),this.root.nodes[a]=this.parentNode),this.parentNode.setAttribute(this.name,a),this.value=a}return this},toString:function(){var a;return null===this.value?this.name:this.fragment?(a=this.fragment.toString(),this.name+"="+JSON.stringify(a)):this.name+"="+JSON.stringify(this.value)}},b=function(a,b){var c,d;if(c=b.indexOf(":"),-1===c||(d=b.substr(0,c),"xmlns"===d))a.name=b;else if(b=b.substring(c+1),a.name=b,a.namespace=wb[d],!a.namespace)throw'Unknown namespace ("'+d+'")'},c=function(a,b){b.parentNode&&(a.namespace?b.parentNode.setAttributeNS(a.namespace,b.name,b.value):b.parentNode.setAttribute(b.name,b.value),"id"===b.name.toLowerCase()&&(b.root.nodes[b.value]=b.parentNode)),a.value=b.value},d=function(b,c){var d,e;!b.parentNode||b.namespace||c.parentNode.namespaceURI&&c.parentNode.namespaceURI!==wb.html||(d=b.lcName,e=a[d]||d,void 0!==c.parentNode[e]&&(b.propertyName=e),("boolean"==typeof c.parentNode[e]||"value"===e)&&(b.useProperty=!0))},e=function(a){var b,c,d;for(b=a.fragment.items.length;b--;)if(c=a.fragment.items[b],c.type!==nb){if(c.type!==ob)return!1;if(d)return!1;d=!0}return!0},f=function(a){var b,c;return a.root.twoway?(b=a.element.descriptor.e.toLowerCase(),c=a.propertyName,!("name"!==c&&"value"!==c&&"checked"!==c||"input"!==b&&"textarea"!==b&&"select"!==b)):!1}}(),J=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;if(this.type=rb,c=this.parentFragment=a.parentFragment,d=this.descriptor=a.descriptor,this.root=n=c.root,this.parentNode=c.parentNode,this.index=a.index,this.eventListeners=[],this.customEventListeners=[],this.parentNode){if(d.a&&d.a.xmlns){if(e=d.a.xmlns,"string"!=typeof e)throw new Error("Namespace attribute cannot contain mustaches")}else e="svg"===d.e.toLowerCase()?wb.svg:this.parentNode.namespaceURI;this.node=eb.createElementNS(e,d.e)}if(d.f&&("string"!=typeof d.f||this.node&&this.node.namespaceURI&&this.node.namespaceURI!==wb.html?"style"===d.e&&void 0!==this.node.styleSheet?(this.fragment=new Q({descriptor:d.f,root:n,contextStack:c.contextStack,owner:this}),b&&(this.bubble=function(){this.node.styleSheet.cssText=this.fragment.toString()})):(this.fragment=new I({descriptor:d.f,root:n,parentNode:this.node,contextStack:c.contextStack,owner:this}),b&&this.node.appendChild(this.fragment.docFrag)):(this.html=d.f,b&&(this.node.innerHTML=this.html))),b&&d.v)for(f in d.v)if(jb.call(d.v,f))for(g=f.split("-"),h=g.length;h--;)this.addEventProxy(g[h],d.v[f],c.contextStack);this.attributes=[],l=[];for(j in d.a)jb.call(d.a,j)&&(k=d.a[j],i=new K({element:this,name:j,value:void 0===k?null:k,root:n,parentNode:this.node,contextStack:c.contextStack}),this.attributes[this.attributes.length]=i,i.isBindable&&l.push(i),i.isBindable&&"name"===i.propertyName?m=i:i.update());if(b){for(;l.length;)l.pop().bind(this.root.lazy);m&&(m.updateViewModel&&m.updateViewModel(),m.update()),b.appendChild(this.node),d.t1&&A(d.t1,n,this,c.contextStack,!0)}},J.prototype={addEventProxy:function(a,c,d){var e,f,g,h,i,j,k,l=this.root;if(this.node._ractive||E(this.node,"_ractive",{value:{keypath:d.length?d[d.length-1]:"",index:this.parentFragment.indexRefs}}),e="string"==typeof c?c:c.n,k=a+"="+e,c.a?f=c.a:c.d&&(g=!0,f=new Q({descriptor:c.d,root:this.root,owner:this,contextStack:d}),this.proxyFrags||(this.proxyFrags=[]),this.proxyFrags[this.proxyFrags.length]=f),void 0!==f){if(this.node._ractive[k])throw new Error("You cannot have two proxy events with the same trigger event ("+k+")");this.node._ractive[k]={dynamic:g,payload:f}}return(h=l.eventDefinitions[a]||b.eventDefinitions[a])?(l._customProxies[k]||(l._customProxies[k]=function(a){var b,c;if(!a.node)throw new Error("Proxy event definitions must fire events with a `node` property");a.keypath=a.node._ractive.keypath,a.context=l.get(a.keypath),a.index=a.node._ractive.index,a.node._ractive[k]&&(b=a.node._ractive[k],c=b.dynamic?b.payload.toJson():b.payload),l.fire(e,a,c)}),j=l._customProxies[k],i=h(this.node,j),this.customEventListeners[this.customEventListeners.length]=i,void 0):(void 0!==this.node["on"+a]&&l.debug&&console&&console.warn&&console.warn("Invalid event handler ("+a+")"),l._proxies[k]||(l._proxies[k]=function(a){var b,c,d={node:this,original:a,keypath:this._ractive.keypath,context:l.get(this._ractive.keypath),index:this._ractive.index};this._ractive&&this._ractive[k]&&(b=this._ractive[k],c=b.dynamic?b.payload.toJson():b.payload),l.fire(e,d,c)}),j=l._proxies[k],this.eventListeners[this.eventListeners.length]={n:a,h:j},this.node.addEventListener(a,j),void 0)},teardown:function(a){var b,c=this;for(c.fragment&&c.fragment.teardown(!1);c.attributes.length;)c.attributes.pop().teardown();for(;c.eventListeners.length;)b=c.eventListeners.pop(),c.node.removeEventListener(b.n,b.h);for(;c.customEventListeners.length;)c.customEventListeners.pop().teardown();if(this.proxyFrags)for(;this.proxyFrags.length;)this.proxyFrags.pop().teardown();this.descriptor.t2&&A(this.descriptor.t2,this.root,this,this.parentFragment.contextStack,!1),a&&this.root._transitionManager.detachWhenReady(this.node)},firstNode:function(){return this.node},findNextNode:function(){return null},bubble:function(){},toString:function(){var a,b,c;for(a="<"+this.descriptor.e,c=this.attributes.length,b=0;c>b;b+=1)a+=" "+this.attributes[b].toString();return a+=">",this.html?a+=this.html:this.fragment&&(a+=this.fragment.toString()),a+="</"+this.descriptor.e+">"}},I=function(a){return a.parentNode&&(this.docFrag=eb.createDocumentFragment()),"string"==typeof a.descriptor?(this.html=a.descriptor,this.docFrag&&(this.nodes=y(a.descriptor,this.docFrag)),void 0):(_(this,a),void 0)},I.prototype={createItem:function(a){if("string"==typeof a.descriptor)return new P(a,this.docFrag);switch(a.descriptor.t){case ob:return new M(a,this.docFrag);case qb:return new O(a,this.docFrag);case pb:return new N(a,this.docFrag);case rb:return new J(a,this.docFrag);case sb:return new L(a,this.docFrag);default:throw new Error("WTF? not sure what happened here...")}},teardown:function(a){var b;if(a&&this.nodes)for(;this.nodes.length;)b=this.nodes.pop(),b.parentNode.removeChild(b);else if(this.items)for(;this.items.length;)this.items.pop().teardown(a)},firstNode:function(){return this.items&&this.items[0]?this.items[0].firstNode():this.nodes?this.nodes[0]||null:null},findNextNode:function(a){var b=a.index;return this.items[b+1]?this.items[b+1].firstNode():this.owner===this.root?null:this.owner.findNextNode(this)},toString:function(){var a,b,c,d;if(this.html)return this.html;if(a="",!this.items)return a;for(c=this.items.length,b=0;c>b;b+=1)d=this.items[b],a+=d.toString();return a}},M=function(a,b){this.type=ob,b&&(this.node=eb.createTextNode(""),b.appendChild(this.node)),Y(this,a)},M.prototype={update:Z,resolve:$,teardown:function(a){h(this),a&&this.parentNode.removeChild(this.node)},render:function(a){this.node&&(this.node.data=void 0===a?"":a)},firstNode:function(){return this.node},toString:function(){var a=void 0!==this.value?""+this.value:"";return a.replace("<","&lt;").replace(">","&gt;")}},L=function(a,b){var c,d=this.parentFragment=a.parentFragment;this.type=sb,this.name=a.descriptor.r,c=B(d.root,a.descriptor.r),this.fragment=new I({descriptor:c,root:d.root,parentNode:d.parentNode,contextStack:d.contextStack,owner:this}),b&&b.appendChild(this.fragment.docFrag)},L.prototype={findNextNode:function(){return this.parentFragment.findNextNode(this)},teardown:function(a){this.fragment.teardown(a)},toString:function(){return this.fragment.toString()}},O=function(a,b){this.type=qb,this.fragments=[],this.length=0,b&&(this.docFrag=eb.createDocumentFragment()),this.initialising=!0,Y(this,a),b&&b.appendChild(this.docFrag),this.initialising=!1},O.prototype={update:Z,resolve:$,smartUpdate:function(a,b){var c;("push"===a||"unshift"===a||"splice"===a)&&(c={descriptor:this.descriptor.f,root:this.root,parentNode:this.parentNode,owner:this},this.descriptor.i&&(c.indexRef=this.descriptor.i)),this[a]&&this[a](c,b)},pop:function(){this.length&&(this.fragments.pop().teardown(!0),this.length-=1)},push:function(a,b){var c,d,e;for(c=this.length,d=c+b.length,e=c;d>e;e+=1)a.contextStack=this.contextStack.concat(this.keypath+"."+e),a.index=e,this.fragments[e]=this.createFragment(a);this.length+=b.length,this.parentNode.insertBefore(this.docFrag,this.parentFragment.findNextNode(this))},shift:function(){this.splice(null,[0,1])},unshift:function(a,b){this.splice(a,[0,0].concat(new Array(b.length)))},splice:function(a,b){var c,d,e,f,g,h,i,j,k;if(b.length&&(h=+(b[0]<0?this.length+b[0]:b[0]),d=Math.max(0,b.length-2),e=void 0!==b[1]?b[1]:this.length-h,f=d-e)){if(0>f){for(i=h-f,g=h;i>g;g+=1)this.fragments[g].teardown(!0);this.fragments.splice(h,-f)}else{for(i=h+f,c=this.fragments[h]?this.fragments[h].firstNode():this.parentFragment.findNextNode(this),j=[h,0].concat(new Array(f)),this.fragments.splice.apply(this.fragments,j),g=h;i>g;g+=1)a.contextStack=this.contextStack.concat(this.keypath+"."+g),a.index=g,this.fragments[g]=this.createFragment(a);this.parentNode.insertBefore(this.docFrag,c)}this.length+=f,k=h+d,z(this.root,this,k,this.length,f)}},teardown:function(a){this.teardownFragments(a),h(this)},firstNode:function(){return this.fragments[0]?this.fragments[0].firstNode():this.parentFragment.findNextNode(this)},findNextNode:function(a){return this.fragments[a.index+1]?this.fragments[a.index+1].firstNode():this.parentFragment.findNextNode(this)},teardownFragments:function(a){for(;this.fragments.length;)this.fragments.shift().teardown(a)},render:function(a){ab(this,a),this.initialising||this.parentNode.insertBefore(this.docFrag,this.parentFragment.findNextNode(this))},createFragment:function(a){var b=new I(a);return this.docFrag&&this.docFrag.appendChild(b.docFrag),b},toString:function(){var a,b,c;for(a="",b=0,c=this.length,b=0;c>b;b+=1)a+=this.fragments[b].toString();return a}},P=function(a,b){this.type=nb,this.descriptor=a.descriptor,b&&(this.node=eb.createTextNode(a.descriptor),this.parentNode=a.parentFragment.parentNode,b.appendChild(this.node))},P.prototype={teardown:function(a){a&&this.parentNode.removeChild(this.node)},firstNode:function(){return this.node},toString:function(){return(""+this.descriptor).replace("<","&lt;").replace(">","&gt;")}},N=function(a,b){this.type=pb,b&&(this.nodes=[],this.docFrag=eb.createDocumentFragment()),this.initialising=!0,Y(this,a),b&&b.appendChild(this.docFrag),this.initialising=!1},N.prototype={update:Z,resolve:$,teardown:function(a){if(a)for(;this.nodes.length;)this.parentNode.removeChild(this.nodes.pop());h(this)},firstNode:function(){return this.nodes[0]?this.nodes[0]:this.parentFragment.findNextNode(this)},render:function(a){for(;this.nodes.length;)this.parentNode.removeChild(this.nodes.pop());return void 0===a?(this.nodes=[],void 0):(this.nodes=y(a,this.docFrag),this.initialising||this.parentNode.insertBefore(this.docFrag,this.parentFragment.findNextNode(this)),void 0)},toString:function(){return void 0!==this.value?this.value:""}},Q=function(a){_(this,a)},Q.prototype={createItem:function(a){if("string"==typeof a.descriptor)return new T(a.descriptor);switch(a.descriptor.t){case ob:return new R(a);case pb:return new R(a);case qb:return new S(a);default:throw"Something went wrong in a rather interesting way"}},bubble:function(){this.owner.bubble()},teardown:function(){var a,b;for(a=this.items.length,b=0;a>b;b+=1)this.items[b].teardown()},getValue:function(){var a;return 1===this.items.length&&this.items[0].type===ob&&(a=this.items[0].value,void 0!==a)?a:this.toString()},toString:function(){return this.items.join("")},toJson:function(){var a,b;a=this.toString();try{b=JSON.parse(a)}catch(c){b=a}return b}},R=function(a){this.type=ob,Y(this,a)},R.prototype={update:Z,resolve:$,render:function(a){this.value=a,this.parentFragment.bubble()},teardown:function(){h(this)},toString:function(){return void 0===this.value?"":this.value}},S=function(a){this.type=qb,this.fragments=[],this.length=0,Y(this,a)},S.prototype={update:Z,resolve:$,teardown:function(){this.teardownFragments(),h(this)},teardownFragments:function(){for(;this.fragments.length;)this.fragments.shift().teardown();this.length=0},bubble:function(){this.value=this.fragments.join(""),this.parentFragment.bubble()},render:function(a){ab(this,a),this.parentFragment.bubble()},createFragment:function(a){return new Q(a)},toString:function(){return this.fragments.join("")}},T=function(a){this.type=nb,this.text=a},T.prototype={toString:function(){return this.text},teardown:function(){}},x=function(a){var b;return"undefined"!=typeof window&&eb&&a?a.nodeType?a:"string"==typeof a&&(b=eb.getElementById(a),!b&&eb.querySelector&&(b=eb.querySelector(a)),b.nodeType)?b:a[0]&&a[0].nodeType?a[0]:null:null},s=Object.prototype.toString,t=function(a){return"[object Array]"===s.call(a)},w=function(a,b){return null===a&&null===b?!0:"object"==typeof a||"object"==typeof b?!1:a===b},v=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},u=function(a){return"object"==typeof a&&"[object Object]"===s.call(a)},C=function(a,b){var c,d,e,f;return d=[],e=function(){var a,b;for(a=d.length;a--;)b=d[a],f(b)&&(b.parentNode.removeChild(b),d.splice(a,1))},f=function(a){var b,d;for(b=c.active.length;b--;)if(d=c.active[b],a.contains(d))return!1;return!0},c={active:[],info:{i:0},push:function(a){c.active[c.active.length]=a,c.info.i+=1},pop:function(a){c.active.splice(c.active.indexOf(a),1),e(),!c.active.length&&c._ready&&c.complete()},complete:function(){b&&b.call(a)},ready:function(){e(),c._ready=!0,c.active.length||c.complete()},detachWhenReady:function(a){d[d.length]=a}}},r=function(a){var b,c,d,e,f;if(lb[a])return lb[a].concat();for(d=[],e=a,c=0;e.length;){if(b=e.indexOf(".",c),-1===b)f=e,e="";else{if("\\"===e.charAt(b-1)&&"\\"!==e.charAt(b-2)){c=b+1;continue}f=e.substr(0,b),c=0}/\[/.test(f)?d=d.concat(f.replace(/\[\s*([0-9]+)\s*\]/g,".$1").split(".")):d[d.length]=f,e=e.substring(b+1)}return lb[a]=d,d.concat()},b.prototype=fb,b.adaptors=gb,b.eventDefinitions=hb,b.partials={},b.easing=c,b.extend=d,b.interpolate=f,b.interpolators=g,b.parse=e,b.transitions=ib,b.VERSION=xb,"undefined"!=typeof module&&module.exports?module.exports=b:"function"==typeof define&&define.amd?define(function(){return b}):a.Ractive=b}(this);