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

ractive

Package Overview
Dependencies
Maintainers
1
Versions
643
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ractive - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

bower.json

4

build/Ractive-legacy.runtime.min.js

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

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

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

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

@@ -64,2 +64,5 @@ Changelog

* added ractive.renderHTML() method, for rendering template+data (in browser or server environment)
* 0.3.2
* IE8 support!
* 0.3.3
* Maintenance and bugfixes

@@ -34,2 +34,7 @@ /*global module:false*/

concat: {
options: {
process: {
data: { version: '<%= pkg.version %>' }
}
},
runtime: {

@@ -50,7 +55,7 @@ options: {

runtime_legacy: {
src: [ 'src/legacy.js', '<%= concat.runtime.dest %>' ],
src: [ 'wrapper/begin.js', 'src/legacy.js', 'src/**/utils/*.js', 'src/**/*.js', 'wrapper/end.js', '!src/parser/**/*.js' ],
dest: 'build/Ractive-legacy.runtime.js'
},
full_legacy: {
src: [ 'src/legacy.js', '<%= concat.full.dest %>' ],
src: [ 'wrapper/begin.js', 'src/legacy.js', 'src/**/utils/*.js', 'src/**/*.js', 'wrapper/end.js' ],
dest: 'build/Ractive-legacy.js'

@@ -57,0 +62,0 @@ }

{
"name": "ractive",
"description": "Next-generation DOM manipulation",
"version": "0.3.2",
"version": "0.3.3",
"homepage": "http://rich-harris.github.com/Ractive/",

@@ -72,3 +72,3 @@ "main": "build/Ractive.js",

"grunt-contrib-concat": "~0.1.3",
"grunt-contrib-uglify": "~0.1.2",
"grunt-contrib-uglify": "~0.2.2",
"grunt-contrib-copy": "~0.4.0",

@@ -75,0 +75,0 @@ "grunt-contrib-watch": "~0.4.3"

@@ -8,3 +8,3 @@ Animation = function ( options ) {

for ( key in options ) {
if ( options.hasOwnProperty( key ) ) {
if ( hasOwn.call( options, key ) ) {
this[ key ] = options[ key ];

@@ -11,0 +11,0 @@ }

@@ -130,3 +130,3 @@ (function () {

clearCache( root, keypath );
// find dependants. If any are DOM sections, we do a smart update

@@ -174,6 +174,10 @@ // rather than a ractive.set() blunderbuss

// ...and length property!
upstreamQueue[ upstreamQueue.length ] = keypath + '.length';
notifyMultipleDependants( root, upstreamQueue, true );
notifyMultipleDependants( root, upstreamQueue, true );
// length property has changed - notify dependants
// TODO in some cases (e.g. todo list example, when marking all as complete, then
// adding a new item (which should deactivate the 'all complete' checkbox
// but doesn't) this needs to happen before other updates. But doing so causes
// other mental problems. not sure what's going on...
notifyDependants( root, keypath + '.length', true );
};

@@ -180,0 +184,0 @@

(function () {
var propertyNames;
var propertyNames, determineNameAndNamespace, setStaticAttribute, determinePropertyName, isAttributeSelfUpdating, isAttributeBindable;

@@ -32,54 +32,8 @@ // the property name equivalents for element attributes, where they differ

var name,
value,
colonIndex,
namespacePrefix,
tagName,
bindingCandidate,
lowerCaseName,
propertyName,
i,
item,
containsInterpolator;
determineNameAndNamespace( this, options.name );
name = options.name;
value = options.value;
// are we dealing with a namespaced attribute, e.g. xlink:href?
colonIndex = name.indexOf( ':' );
if ( colonIndex !== -1 ) {
// looks like we are, yes...
namespacePrefix = name.substr( 0, colonIndex );
// ...unless it's a namespace *declaration*
if ( namespacePrefix !== 'xmlns' ) {
name = name.substring( colonIndex + 1 );
this.namespace = namespaces[ namespacePrefix ];
if ( !this.namespace ) {
throw 'Unknown namespace ("' + namespacePrefix + '")';
}
}
}
// if it's an empty attribute, or just a straight key-value pair, with no
// mustache shenanigans, set the attribute accordingly
if ( value === null || typeof value === 'string' ) {
if ( options.parentNode ) {
if ( this.namespace ) {
options.parentNode.setAttributeNS( this.namespace, name, value );
} else {
options.parentNode.setAttribute( name, value );
}
if ( name.toLowerCase() === 'id' ) {
options.root.nodes[ value ] = options.parentNode;
}
}
this.name = name;
this.value = value;
// mustache shenanigans, set the attribute accordingly and go home
if ( options.value === null || typeof options.value === 'string' ) {
setStaticAttribute( this, options );
return;

@@ -92,4 +46,3 @@ }

this.parentNode = options.parentNode;
this.name = name;
this.lcName = name.toLowerCase();
this.lcName = this.name.toLowerCase();

@@ -100,3 +53,3 @@ // share parentFragment with parent element

this.fragment = new StringFragment({
descriptor: value,
descriptor: options.value,
root: this.root,

@@ -115,56 +68,11 @@ owner: this,

// can we establish this attribute's property name equivalent?
if ( this.parentNode && !this.namespace && ( !options.parentNode.namespaceURI || options.parentNode.namespaceURI === namespaces.html ) ) {
lowerCaseName = this.lcName;
propertyName = propertyNames[ lowerCaseName ] || lowerCaseName;
if ( options.parentNode[ propertyName ] !== undefined ) {
this.propertyName = propertyName;
}
// is this a boolean attribute or 'value'? If so we're better off doing e.g.
// node.selected = true rather than node.setAttribute( 'selected', '' )
if ( typeof options.parentNode[ propertyName ] === 'boolean' || propertyName === 'value' ) {
this.useProperty = true;
}
}
determinePropertyName( this, options );
// determine whether this attribute can be marked as self-updating
this.selfUpdating = true;
this.selfUpdating = isAttributeSelfUpdating( this );
i = this.fragment.items.length;
while ( i-- ) {
item = this.fragment.items[i];
if ( item.type === TEXT ) {
continue;
}
// we can only have one interpolator and still be self-updating
if ( item.type === INTERPOLATOR ) {
if ( containsInterpolator ) {
this.selfUpdating = false;
break;
} else {
containsInterpolator = true;
continue;
}
}
// anything that isn't text or an interpolator (i.e. a section)
// and we can't self-update
this.selfUpdating = false;
break;
}
// if two-way binding is enabled, and we've got a dynamic `value` attribute, and this is an input or textarea, set up two-way binding
if ( this.root.twoway ) {
tagName = this.element.descriptor.e.toLowerCase();
bindingCandidate = ( ( propertyName === 'name' || propertyName === 'value' || propertyName === 'checked' ) && ( tagName === 'input' || tagName === 'textarea' || tagName === 'select' ) );
}
this.isBindable = isAttributeBindable( this );
if ( bindingCandidate ) {
this.isBindable = true;
if ( this.isBindable && this.propertyName === 'name' ) {
// name attribute is a special case - it is the only two-way attribute that updates

@@ -175,8 +83,5 @@ // the viewmodel based on the value of another attribute. For that reason it must wait

// was enabled in the template)
if ( propertyName === 'name' ) {
this.isTwowayNameAttr = true;
}
this.isTwowayNameAttr = true;
}
// mark as ready

@@ -318,8 +223,6 @@ this.ready = true;

node.addEventListener( 'change', this.updateViewModel );
node.addEventListener( 'click', this.updateViewModel ); // TODO only in IE?
node.addEventListener( 'blur', this.updateViewModel );
this.boundEvents = [ 'change', 'click', 'blur' ]; // TODO click only in IE?
if ( !lazy ) {
node.addEventListener( 'input', this.updateViewModel );
this.boundEvents[3] = 'input';

@@ -330,5 +233,10 @@ // this is a hack to see if we're in IE - if so, we probably need to add

if ( node.attachEvent ) {
node.addEventListener( 'keyup', this.updateViewModel );
this.boundEvents[4] = 'keyup';
}
}
i = this.boundEvents.length;
while ( i-- ) {
node.addEventListener( this.boundEvents[i], this.updateViewModel );
}
}

@@ -351,10 +259,10 @@ },

teardown: function () {
// remove the event listeners we added, if we added them (no need to check,
// it will fail silently if they weren't there in the first place)
if ( this.updateViewModel ) {
this.parentNode.removeEventListener( 'change', this.updateViewModel );
this.parentNode.removeEventListener( 'click', this.updateViewModel );
this.parentNode.removeEventListener( 'blur', this.updateViewModel );
this.parentNode.removeEventListener( 'keyup', this.updateViewModel );
this.parentNode.removeEventListener( 'input', this.updateViewModel );
var i;
if ( this.boundEvents ) {
i = this.boundEvents.length;
while ( i-- ) {
this.parentNode.removeEventListener( this.boundEvents[i], this.updateViewModel );
}
}

@@ -473,2 +381,112 @@

// Helper functions
determineNameAndNamespace = function ( attribute, name ) {
var colonIndex, namespacePrefix;
// are we dealing with a namespaced attribute, e.g. xlink:href?
colonIndex = name.indexOf( ':' );
if ( colonIndex !== -1 ) {
// looks like we are, yes...
namespacePrefix = name.substr( 0, colonIndex );
// ...unless it's a namespace *declaration*, which we ignore (on the assumption
// that only valid namespaces will be used)
if ( namespacePrefix !== 'xmlns' ) {
name = name.substring( colonIndex + 1 );
attribute.name = name;
attribute.namespace = namespaces[ namespacePrefix ];
if ( !attribute.namespace ) {
throw 'Unknown namespace ("' + namespacePrefix + '")';
}
return;
}
}
attribute.name = name;
};
setStaticAttribute = function ( attribute, options ) {
if ( options.parentNode ) {
if ( attribute.namespace ) {
options.parentNode.setAttributeNS( attribute.namespace, options.name, options.value );
} else {
options.parentNode.setAttribute( options.name, options.value );
}
if ( options.name.toLowerCase() === 'id' ) {
options.root.nodes[ options.value ] = options.parentNode;
}
}
attribute.value = options.value;
};
determinePropertyName = function ( attribute, options ) {
var lowerCaseName, propertyName;
if ( attribute.parentNode && !attribute.namespace && ( !options.parentNode.namespaceURI || options.parentNode.namespaceURI === namespaces.html ) ) {
lowerCaseName = attribute.lcName;
propertyName = propertyNames[ lowerCaseName ] || lowerCaseName;
if ( options.parentNode[ propertyName ] !== undefined ) {
attribute.propertyName = propertyName;
}
// is attribute a boolean attribute or 'value'? If so we're better off doing e.g.
// node.selected = true rather than node.setAttribute( 'selected', '' )
if ( typeof options.parentNode[ propertyName ] === 'boolean' || propertyName === 'value' ) {
attribute.useProperty = true;
}
}
};
isAttributeSelfUpdating = function ( attribute ) {
var i, item, containsInterpolator;
i = attribute.fragment.items.length;
while ( i-- ) {
item = attribute.fragment.items[i];
if ( item.type === TEXT ) {
continue;
}
// we can only have one interpolator and still be self-updating
if ( item.type === INTERPOLATOR ) {
if ( containsInterpolator ) {
return false;
} else {
containsInterpolator = true;
continue;
}
}
// anything that isn't text or an interpolator (i.e. a section)
// and we can't self-update
return false;
}
return true;
};
isAttributeBindable = function ( attribute ) {
var tagName, propertyName;
if ( !attribute.root.twoway ) {
return false;
}
tagName = attribute.element.descriptor.e.toLowerCase();
propertyName = attribute.propertyName;
return (
( propertyName === 'name' || propertyName === 'value' || propertyName === 'checked' ) &&
( tagName === 'input' || tagName === 'textarea' || tagName === 'select' )
);
};
}());

@@ -104,3 +104,3 @@ // Element

for ( eventName in descriptor.v ) {
if ( descriptor.v.hasOwnProperty( eventName ) ) {
if ( hasOwn.call( descriptor.v, eventName ) ) {
eventNames = eventName.split( '-' );

@@ -122,3 +122,3 @@ i = eventNames.length;

for ( attrName in descriptor.a ) {
if ( descriptor.a.hasOwnProperty( attrName ) ) {
if ( hasOwn.call( descriptor.a, attrName ) ) {
attrValue = descriptor.a[ attrName ];

@@ -125,0 +125,0 @@

executeTransition = function ( descriptor, root, owner, contextStack, isIntro ) {
var transitionName, transitionParams, fragment, transitionManager, transition;
if ( !root.transitionsEnabled ) {
return;
}
if ( typeof descriptor === 'string' ) {

@@ -5,0 +9,0 @@ transitionName = descriptor;

@@ -31,2 +31,7 @@ initFragment = function ( fragment, options ) {

}
// while we're in this branch, inherit priority
fragment.priority = fragment.owner.parentFragment.priority + 1;
} else {
fragment.priority = 0;
}

@@ -33,0 +38,0 @@

@@ -5,3 +5,3 @@ // We're not using a constructor here because it's convenient (and more

makeTransitionManager = function ( root, callback ) {
var transitionManager, nodesToDetach, detachNodes, detachNodeIfPossible;
var transitionManager, nodesToDetach, detachNodes, nodeHasNoTransitioningChildren;

@@ -14,12 +14,17 @@ nodesToDetach = [];

detachNodes = function () {
var i;
var i, node;
i = nodesToDetach.length;
while ( i-- ) {
node = nodesToDetach[i];
// see if this node can be detached yet
detachNodeIfPossible( nodesToDetach[i] );
if ( nodeHasNoTransitioningChildren( node ) ) {
node.parentNode.removeChild( node );
nodesToDetach.splice( i, 1 );
}
}
};
detachNodeIfPossible = function ( node ) {
nodeHasNoTransitioningChildren = function ( node ) {
var i, candidate;

@@ -33,9 +38,7 @@

// fail as soon as possible
return;
return false;
}
}
// if we've run the gauntlet, we can safely detach this node
node.parentNode.removeChild( node );
nodesToDetach.pop();
return true;
};

@@ -42,0 +45,0 @@

@@ -50,3 +50,3 @@ (function ( win ) {

for ( len = this.length; i<len; i++ ) {
if ( this.hasOwnProperty( i ) && this[i] === needle ) {
if ( hasOwn.call( this, i ) && this[i] === needle ) {
return i;

@@ -65,3 +65,3 @@ }

for ( i=0, len=this.length; i<len; i+=1 ) {
if ( this.hasOwnProperty( i ) ) {
if ( hasOwn.call( this, i ) ) {
callback.call( context, this[i], i, this );

@@ -78,3 +78,3 @@ }

for ( i=0, len=this.length; i<len; i+=1 ) {
if ( this.hasOwnProperty( i ) ) {
if ( hasOwn.call( this, i ) ) {
mapped[i] = mapper.call( context, this[i], i, this );

@@ -93,3 +93,3 @@ }

for ( i=0, len=this.length; i<len; i+=1 ) {
if ( this.hasOwnProperty( i ) && filter.call( context, this[i], i, this ) ) {
if ( hasOwn.call( this, i ) && filter.call( context, this[i], i, this ) ) {
filtered[ filtered.length ] = this[i];

@@ -176,2 +176,2 @@ }

}( this ));
}( global ));

@@ -19,3 +19,3 @@ (function () {

getFragmentStubFromTokens = function ( tokens, priority, options, preserveWhitespace ) {
getFragmentStubFromTokens = function ( tokens, options, preserveWhitespace ) {
var parser, stub;

@@ -32,3 +32,3 @@

stub = new Fragment( parser, priority, preserveWhitespace );
stub = new Fragment( parser, preserveWhitespace );

@@ -38,3 +38,3 @@ return stub;

getItem = function ( parser, priority, preserveWhitespace ) {
getItem = function ( parser, preserveWhitespace ) {
if ( !parser.next() ) {

@@ -45,4 +45,4 @@ return null;

return getText( parser, preserveWhitespace )
|| getMustache( parser, priority, preserveWhitespace )
|| getElement( parser, priority, preserveWhitespace );
|| getMustache( parser, preserveWhitespace )
|| getElement( parser, preserveWhitespace );
};

@@ -61,3 +61,3 @@

getMustache = function ( parser, priority, preserveWhitespace ) {
getMustache = function ( parser, preserveWhitespace ) {
var next = parser.next();

@@ -67,6 +67,6 @@

if ( next.mustacheType === SECTION || next.mustacheType === INVERTED ) {
return new Section( next, parser, priority, preserveWhitespace );
return new Section( next, parser, preserveWhitespace );
}
return new Mustache( next, parser, priority );
return new Mustache( next, parser );
}

@@ -77,7 +77,7 @@

getElement = function ( parser, priority, preserveWhitespace ) {
getElement = function ( parser, preserveWhitespace ) {
var next = parser.next(), stub;
if ( next.type === TAG ) {
stub = new Element( next, parser, priority, preserveWhitespace );
stub = new Element( next, parser, preserveWhitespace );

@@ -136,3 +136,3 @@ // sanitize

Fragment = function ( parser, priority, preserveWhitespace ) {
Fragment = function ( parser, preserveWhitespace ) {
var items, item;

@@ -142,6 +142,6 @@

item = getItem( parser, priority, preserveWhitespace );
item = getItem( parser, preserveWhitespace );
while ( item !== null ) {
items[ items.length ] = item;
item = getItem( parser, priority, preserveWhitespace );
item = getItem( parser, preserveWhitespace );
}

@@ -217,3 +217,3 @@ };

(function () {
Mustache = function ( token, parser, priority ) {
Mustache = function ( token, parser ) {
this.type = ( token.type === TRIPLE ? TRIPLE : token.mustacheType );

@@ -228,4 +228,2 @@

}
this.priority = priority;

@@ -255,6 +253,2 @@ parser.pos += 1;

if ( this.priority ) {
json.p = this.priority;
}
this.json = json;

@@ -271,3 +265,3 @@ return json;

Section = function ( firstToken, parser, priority, preserveWhitespace ) {
Section = function ( firstToken, parser, preserveWhitespace ) {
var next;

@@ -277,3 +271,2 @@

this.indexRef = firstToken.indexRef;
this.priority = priority || 0;

@@ -303,3 +296,3 @@ this.inverted = ( firstToken.mustacheType === INVERTED );

this.items[ this.items.length ] = getItem( parser, this.priority + 1, preserveWhitespace );
this.items[ this.items.length ] = getItem( parser, preserveWhitespace );
next = parser.next();

@@ -339,6 +332,2 @@ }

if ( this.priority ) {
json.p = this.priority;
}
this.json = json;

@@ -360,7 +349,6 @@ return json;

Element = function ( firstToken, parser, priority, preserveWhitespace ) {
Element = function ( firstToken, parser, preserveWhitespace ) {
var closed, next, i, len, attrs, filtered, proxies, attr, getFrag, processProxy, item;
this.lcTag = firstToken.name.toLowerCase();
this.priority = priority = priority || 0;

@@ -392,3 +380,3 @@ // enforce lower case tag names by default. HTML doesn't care. SVG does, so if we see an SVG tag

name: ( svgCamelCaseAttributesMap[ lcName ] ? svgCamelCaseAttributesMap[ lcName ] : lcName ),
value: getFragmentStubFromTokens( attr.value, priority + 1 )
value: getFragmentStubFromTokens( attr.value )
};

@@ -447,3 +435,3 @@ };

processed.dynamicArgs = getFragmentStubFromTokens( tokens, priority + 1 );
processed.dynamicArgs = getFragmentStubFromTokens( tokens );
}

@@ -517,3 +505,3 @@

this.items[ this.items.length ] = getItem( parser, this.priority + 1 );
this.items[ this.items.length ] = getItem( parser );

@@ -520,0 +508,0 @@ next = parser.next();

@@ -1118,4 +1118,6 @@ (function () {

getReference = function ( tokenizer ) {
var name, dot, combo, refinement;
var startPos, name, dot, combo, refinement, lastDotIndex;
startPos = tokenizer.pos;
// could be an implicit iterator ('.'), a prefixed reference ('.name') or a

@@ -1136,2 +1138,16 @@ // standard reference ('name')

if ( getStringMatch( tokenizer, '(' ) ) {
// if this is a method invocation (as opposed to a function) we need
// to strip the method name from the reference combo, else the context
// will be wrong
lastDotIndex = combo.lastIndexOf( '.' );
if ( lastDotIndex !== -1 ) {
combo = combo.substr( 0, lastDotIndex );
tokenizer.pos = startPos + combo.length;
} else {
tokenizer.pos -= 1;
}
}
return {

@@ -1161,3 +1177,3 @@ t: REFERENCE,

fail( 'a property name' );
fail( tokenizer, 'a property name' );
}

@@ -1171,3 +1187,3 @@

if ( !expr ) {
fail( 'an expression' );
fail( tokenizer, 'an expression' );
}

@@ -1178,3 +1194,3 @@

if ( !getStringMatch( tokenizer, ']' ) ) {
fail( '"]"' );
fail( tokenizer, '"]"' );
}

@@ -1204,3 +1220,3 @@

getArrayLiteral = function ( tokenizer ) {
var start, array, expressions;
var start, array, expressionList;

@@ -1217,3 +1233,3 @@ start = tokenizer.pos;

expressions = expressionList( tokenizer );
expressionList = getExpressionList( tokenizer );

@@ -1227,3 +1243,3 @@ if ( !getStringMatch( tokenizer, ']' ) ) {

t: ARRAY_LITERAL,
o: expressions
o: expressionList
};

@@ -1230,0 +1246,0 @@ };

@@ -18,3 +18,2 @@ // Ractive.parse

// * n - indicates an iNverted section
// * p - Priority. Higher priority items are updated before lower ones on model changes
// * i - Index reference, e.g. 'num' in {{#section:num}}content{{/section}}

@@ -71,3 +70,3 @@ // * v - eVent proxies (i.e. when user e.g. clicks on a node, fire proxy event)

fragmentStub = getFragmentStubFromTokens( tokens, 0, options, options.preserveWhitespace );
fragmentStub = getFragmentStubFromTokens( tokens, options, options.preserveWhitespace );

@@ -74,0 +73,0 @@ json = fragmentStub.toJson();

@@ -15,3 +15,3 @@ (function ( proto ) {

for ( k in keypath ) {
if ( keypath.hasOwnProperty( k ) ) {
if ( hasOwn.call( keypath, k ) ) {
animations[ animations.length ] = animate( this, k, keypath[k], options );

@@ -18,0 +18,0 @@ }

@@ -26,3 +26,3 @@ // TODO use dontNormalise

// cache hit? great
if ( cache.hasOwnProperty( keypath ) && cache[ keypath ] !== UNSET ) {
if ( hasOwn.call( cache, keypath ) && cache[ keypath ] !== UNSET ) {
return cache[ keypath ];

@@ -36,3 +36,3 @@ }

// we may have a cache hit now that it's been normalised
if ( cache.hasOwnProperty( normalised ) && cache[ normalised ] !== UNSET ) {
if ( hasOwn.call( cache, normalised ) && cache[ normalised ] !== UNSET ) {
if ( cache[ normalised ] === undefined && ignoreUndefined ) {

@@ -39,0 +39,0 @@ // continue

@@ -31,3 +31,3 @@ // Resolve a full keypath from `ref` within the given `contextStack` (e.g.

if ( typeof parentValue === 'object' && parentValue !== null && parentValue.hasOwnProperty( lastKey ) ) {
if ( typeof parentValue === 'object' && parentValue !== null && hasOwn.call( parentValue, lastKey ) ) {
keypath = innerMostContext + '.' + ref;

@@ -34,0 +34,0 @@ break;

@@ -13,3 +13,3 @@ (function ( proto ) {

for ( k in keypath ) {
if ( keypath.hasOwnProperty( k ) ) {
if ( hasOwn.call( keypath, k ) ) {
callback = keypath[k];

@@ -16,0 +16,0 @@ observers[ observers.length ] = observe( this, k, callback, options );

@@ -9,3 +9,3 @@ proto.on = function ( eventName, callback ) {

for ( n in eventName ) {
if ( eventName.hasOwnProperty( n ) ) {
if ( hasOwn.call( eventName, n ) ) {
listeners[ listeners.length ] = this.on( n, eventName[ n ] );

@@ -12,0 +12,0 @@ }

proto.renderHTML = function () {
console.log( this.fragment );
return this.fragment.toString();
};

@@ -22,3 +22,3 @@ (function ( proto ) {

for ( k in keypath ) {
if ( keypath.hasOwnProperty( k ) ) {
if ( hasOwn.call( keypath, k ) ) {
keys = splitKeypath( k );

@@ -25,0 +25,0 @@ normalised = keys.join( '.' );

@@ -40,3 +40,3 @@ adaptors.backbone = function ( model, path ) {

for ( attr in attrs ) {
if ( attrs.hasOwnProperty( attr ) ) {
if ( hasOwn.call( attrs, attr ) ) {
result[ path + attr ] = attrs[ attr ];

@@ -43,0 +43,0 @@ }

@@ -19,3 +19,3 @@ adaptors.statesman = function ( model, path ) {

for ( attr in attrs ) {
if ( attrs.hasOwnProperty( attr ) ) {
if ( hasOwn.call( attrs, attr ) ) {
result[ path + attr ] = attrs[ attr ];

@@ -22,0 +22,0 @@ }

@@ -51,3 +51,3 @@ (function () {

extendable = [ 'data', 'partials', 'transitions', 'eventDefinitions' ];
inheritable = [ 'el', 'template', 'complete', 'modifyArrays', 'twoway', 'lazy', 'append', 'preserveWhitespace', 'sanitize' ];
inheritable = [ 'el', 'template', 'complete', 'modifyArrays', 'twoway', 'lazy', 'append', 'preserveWhitespace', 'sanitize', 'noIntro', 'transitionsEnabled' ];
blacklist = extendable.concat( inheritable );

@@ -111,3 +111,3 @@

for ( key in childProps ) {
if ( childProps.hasOwnProperty( key ) && !Child.prototype.hasOwnProperty( key ) && blacklist.indexOf( key ) === -1 ) {
if ( hasOwn.call( childProps, key ) && !hasOwn.call( Child.prototype, key ) && blacklist.indexOf( key ) === -1 ) {
member = childProps[ key ];

@@ -173,3 +173,3 @@

for ( key in Child.partials ) {
if ( Child.partials.hasOwnProperty( key ) ) {
if ( hasOwn.call( Child.partials, key ) ) {
if ( typeof Child.partials[ key ] === 'string' ) {

@@ -226,3 +226,3 @@ if ( !Ractive.parse ) {

for ( key in source ) {
if ( source.hasOwnProperty( key ) && !target.hasOwnProperty( key ) ) {
if ( hasOwn.call( source, key ) && !hasOwn.call( target, key ) ) {
target[ key ] = source[ key ];

@@ -237,3 +237,3 @@ }

for ( key in source ) {
if ( source.hasOwnProperty( key ) ) {
if ( hasOwn.call( source, key ) ) {
target[ key ] = source[ key ];

@@ -250,3 +250,3 @@ }

for ( key in source ) {
if ( source.hasOwnProperty( key ) ) {
if ( hasOwn.call( source, key ) ) {
target[ key ] = source[ key ];

@@ -253,0 +253,0 @@ }

@@ -52,4 +52,4 @@ interpolators = {

for ( prop in from ) {
if ( from.hasOwnProperty( prop ) ) {
if ( to.hasOwnProperty( prop ) ) {
if ( hasOwn.call( from, prop ) ) {
if ( hasOwn.call( to, prop ) ) {
properties[ properties.length ] = prop;

@@ -66,3 +66,3 @@ interpolators[ prop ] = Ractive.interpolate( from[ prop ], to[ prop ] );

for ( prop in to ) {
if ( to.hasOwnProperty( prop ) && !from.hasOwnProperty( prop ) ) {
if ( hasOwn.call( to, prop ) && !hasOwn.call( from, prop ) ) {
intermediate[ prop ] = to[ prop ];

@@ -69,0 +69,0 @@ }

@@ -12,3 +12,5 @@ var defaultOptions = createFromNull();

transitions: { enumerable: true, value: {} },
eventDefinitions: { enumerable: true, value: {} }
eventDefinitions: { enumerable: true, value: {} },
noIntro: { enumerable: true, value: false },
transitionsEnabled: { enumerable: true, value: true }
});

@@ -23,3 +25,3 @@

for ( key in defaultOptions ) {
if ( !options.hasOwnProperty( key ) ) {
if ( !hasOwn.call( options, key ) ) {
options[ key ] = ( typeof defaultOptions[ key ] === 'object' ? {} : defaultOptions[ key ] );

@@ -167,3 +169,3 @@ }

for ( key in options.partials ) {
if ( options.partials.hasOwnProperty( key ) ) {
if ( hasOwn.call( options.partials, key ) ) {
partial = options.partials[ key ];

@@ -186,3 +188,3 @@

for ( key in this.partials ) {
if ( this.partials.hasOwnProperty( key ) && this.partials[ key ].length === 1 && typeof this.partials[ key ][0] === 'string' ) {
if ( hasOwn.call( this.partials, key ) && this.partials[ key ].length === 1 && typeof this.partials[ key ][0] === 'string' ) {
this.partials[ key ] = this.partials[ key ][0];

@@ -192,3 +194,9 @@ }

// temporarily disable transitions, if noIntro flag is set
this.transitionsEnabled = ( options.noIntro ? false : options.transitionsEnabled );
render( this, { el: this.el, append: options.append, complete: options.complete });
// reset transitionsEnabled
this.transitionsEnabled = options.transitionsEnabled;
};

@@ -48,3 +48,3 @@ (function () {

for ( key in source ) {
if ( source.hasOwnProperty( key ) ) {
if ( hasOwn.call( source, key ) ) {
target[ key ] = source[ key ];

@@ -51,0 +51,0 @@ }

@@ -50,3 +50,3 @@ [

"template": "{{#items:i}}{{i}}: {{name}}{{/items}}",
"parsed": [{"f":[{"p":1,"r":"i","t":2},": ",{"p":1,"r":"name","t":2}],"i":"i","r":"items","t":4}]
"parsed": [{"f":[{"r":"i","t":2},": ",{"r":"name","t":2}],"i":"i","r":"items","t":4}]
},

@@ -61,3 +61,3 @@ {

"template": "<div class=test>{{mustache}}</div>",
"parsed": [{"t":7,"e":"div","a":{"class":"test"},"f":[{"t":2,"r":"mustache","p":1}]}]
"parsed": [{"t":7,"e":"div","a":{"class":"test"},"f":[{"t":2,"r":"mustache"}]}]
},

@@ -67,3 +67,3 @@ {

"template": "<div class={{myClass}}>contents</div>",
"parsed": [{"a":{"class":[{"p":1,"r":"myClass","t":2}]},"f":"contents","e":"div","t":7}]
"parsed": [{"a":{"class":[{"r":"myClass","t":2}]},"f":"contents","e":"div","t":7}]
},

@@ -91,3 +91,3 @@ {

"template": "<link rel='{{rel}}'>",
"parsed": [{"a":{"rel":[{"p":1,"r":"rel","t":2}]},"e":"link","t":7}],
"parsed": [{"a":{"rel":[{"r":"rel","t":2}]},"e":"link","t":7}],
"sanitize": false

@@ -98,3 +98,3 @@ },

"template": "<p onclick='doSomething();'>{{text}}</p>",
"parsed": [{"f":[{"p":1,"r":"text","t":2}],"e":"p","t":7}],
"parsed": [{"f":[{"r":"text","t":2}],"e":"p","t":7}],
"sanitize": true

@@ -105,3 +105,3 @@ },

"template": "<p onclick='doSomething();'>{{text}}</p>",
"parsed": [{"a":{"onclick":"doSomething();"},"f":[{"p":1,"r":"text","t":2}],"e":"p","t":7}],
"parsed": [{"a":{"onclick":"doSomething();"},"f":[{"r":"text","t":2}],"e":"p","t":7}],
"sanitize": false

@@ -112,3 +112,3 @@ },

"template": "<svg xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"{{x}}\" cy=\"{{y}}\" r=\"{{r}}\"/></svg>",
"parsed": [{"a":{"xmlns":"http://www.w3.org/2000/svg"},"f":[{"a":{"cx":[{"p":2,"r":"x","t":2}],"cy":[{"p":2,"r":"y","t":2}],"r":[{"p":2,"r":"r","t":2}]},"e":"circle","t":7}],"e":"svg","t":7}]
"parsed": [{"a":{"xmlns":"http://www.w3.org/2000/svg"},"f":[{"a":{"cx":[{"r":"x","t":2}],"cy":[{"r":"y","t":2}],"r":[{"r":"r","t":2}]},"e":"circle","t":7}],"e":"svg","t":7}]
},

@@ -123,3 +123,3 @@ {

"template": "<svg xmlns=\"http://www.w3.org/2000/svg\"><text>{{hello}}</text></svg>",
"parsed": [{"a":{"xmlns":"http://www.w3.org/2000/svg"},"f":[{"f":[{"p":2,"r":"hello","t":2}],"e":"text","t":7}],"e":"svg","t":7}]
"parsed": [{"a":{"xmlns":"http://www.w3.org/2000/svg"},"f":[{"f":[{"r":"hello","t":2}],"e":"text","t":7}],"e":"svg","t":7}]
},

@@ -129,3 +129,3 @@ {

"template": "<svg xmlns=\"http://www.w3.org/2000/svg\"><text>Hello {{thing}}!</text></svg>",
"parsed": [{"a":{"xmlns":"http://www.w3.org/2000/svg"},"f":[{"f":["Hello ",{"p":2,"r":"thing","t":2},"!"],"e":"text","t":7}],"e":"svg","t":7}]
"parsed": [{"a":{"xmlns":"http://www.w3.org/2000/svg"},"f":[{"f":["Hello ",{"r":"thing","t":2},"!"],"e":"text","t":7}],"e":"svg","t":7}]
},

@@ -135,3 +135,3 @@ {

"template": "<div><p>HTML</p><p>{{mustache}}</p></div>",
"parsed": [{"t":7,"e":"div","f":[{"t":7,"e":"p","f":"HTML"},{"t":7,"e":"p","f":[{"p":2,"t":2,"r":"mustache"}]}]}]
"parsed": [{"t":7,"e":"div","f":[{"t":7,"e":"p","f":"HTML"},{"t":7,"e":"p","f":[{"t":2,"r":"mustache"}]}]}]
},

@@ -162,3 +162,13 @@ {

"parsed": [{"t":2,"x":{"r":["process","foo.0.bar"],"s":"❖0(❖1)"}}]
},
{
"name": "Expression with method",
"template": "{{( one.two.three() )}}",
"parsed": [{"t":2,"x":{"r":["one.two"],"s":"❖0.three()"}}]
},
{
"name": "Expression with indirectly-identified method",
"template": "{{( one.two[ three ]() )}}",
"parsed": [{"t":2,"x":{"r":["three","one.two"],"s":"❖1[❖0]()"}}]
}
]

@@ -55,2 +55,3 @@ (function ( global ) {

createFromNull,
hasOwn = {}.hasOwnProperty,
noop = function () {},

@@ -167,6 +168,10 @@

xmlns: 'http://www.w3.org/2000/xmlns/'
};
},
// current version
VERSION = '<%= version %>';
// we're creating a defineProperty function here - we don't want to add

@@ -173,0 +178,0 @@ // this to _legacy.js since it's not a polyfill. It won't allow us to set

@@ -16,3 +16,5 @@ Ractive.prototype = proto;

Ractive.VERSION = VERSION;
// export as Common JS module...

@@ -19,0 +21,0 @@ if ( typeof module !== "undefined" && module.exports ) {

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

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 not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc