text: /*!
   * MotaJS v0.9.0
   * http://motapc.js.org/motajs
   *
   * Released under the MIT license
   * https://github.com/motapc97/MotaJS/blob/master/LICENSE.md
   *
   * Project
   * https://github.com/motapc97/MotaJS
   *
   * Date: 2015-07-28T17:43Z
   */
  !function(t){if("function"==typeof define&&define.amd)define(function(){return t()});else if("undefined"!=typeof exports){var e=t();"undefined"!=typeof module&&module.exports&&(exports=module.exports=e),exports.mota=e}else window.mota=t()}(function(){function t(){}function e(t){return t>>>1&1073741824|3221225471&t}function n(t){var n,r=t.length,i=r>Z,o=i&&nt[t];if(!o&&0!==o){for(o=0,n=0;r>n;n++)o=31*o+t.charCodeAt(n)|0;o=e(o),i&&(et===tt&&(et=0,nt={}),et++,nt[t]=o)}return o}function r(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}function i(t){var n=!1,i=!0,o=n?1:0,u=t.forEach(i?n?function(t,e){o=31*o+r(a(t),a(e))|0}:function(t,e){o=o+r(a(t),a(e))|0}:n?function(t){o=31*o+a(t)|0}:function(t){o=o+a(t)|0});return o=rt(o,3432918353),o=rt(o<<15|o>>>-15,461845907),o=rt(o<<13|o>>>-13,5),o=(o+3864292196|0)^u,o=rt(o^o>>>16,2246822507),o=rt(o^o>>>13,3266489909),o=e(o^o>>>16)}function o(e){return t.get(e,"hash")}function a(r){var a,u;if(!r)return 0;if("function"==typeof r.valueOf&&(r=r.valueOf(),!r))return 0;if(r===!0)return 1;if(a=typeof r,"number"===a){for(u=0|r,u!==r&&(u^=4294967295*r);r>4294967295;)r/=4294967295,u^=r;return e(u)}return"string"===a?n(r):(u=o(r),void 0!==u?u:("function"==typeof r.isImmutable&&r.isImmutable()?u=i(r):(u=J++,1073741824&J&&(J=1)),t.setup(r,"hash",u),u))}function u(t,e){return function(){for(var n=0;n<t.length;n++)V(t[n],this,arguments);return V(e,this,arguments)}}function s(t,e){for(var n=e,r=n+1,i=t.length;i>r;n+=1,r+=1)t[n]=t[r];t.pop()}function c(t,e,n){this.owner=t,this.hash=e,this.children=n}function h(t,e,n){this.owner=t,this.count=e,this.children=n}function l(t,e,n){this.owner=t,this.bitmap=e,this.children=n}function f(t,e,n,r){this.owner=t,this.hash=e,this.key=n,this.value=r}function p(t,e){return{node:t,index:0,prev:e}}function d(){return{value:void 0,done:!0}}function g(t,e,n){return{value:n===Ne?[t,e]:n===Pe?t:e,done:!1}}function v(t){return Fe(t)?t:He(!0).merge(t,De)}function m(t){this.mutable=!!t,this.type="map"}function y(t,e){this.changeSize=!1,this.changeValue=!1,this.notSetValue=e,this.func=t}function _(t,e){return t.charAt(0)===e?t:e+t}function b(t,e){return t.charAt(t.length-1)===e?t:t+e}function w(t){if("string"==typeof t)return t;var e,n,r,i="";for(e in t)n=encodeURIComponent(e),r=encodeURIComponent(t[e]),i+="&"+n+("true"!==r?"="+r:"");return i.substring(1)}function x(t){}function E(t){t.componentWillUnmount&&t.componentWillUnmount();var e=0,n=t.__internal__.children;for(yn.remove(t.el),t.el=t.props=t.__internal__=void 0;e<n.length;e++)E(n[e])}function S(){this.__internal__=new Yn}function j(t){this.data=t}function k(t,e,n,r){xt(e)&&(n=e,e=t,t=void 0),e||Q("mota.Router.route","Provide a non-empty path"),this.name=t,this.parent=r,this.path=(r.path||"")+"/"+e.replace(dr,""),this.params=mr(this.path),this.routes=[],n.call(this)}function C(){this.routes=[],this.location=Rt.location,this.history=Rt.history,this.window=fr.select(Rt),this._hasPushState=!(!this.history||!this.history.pushState),this.initialize&&V(this.initialize,this,arguments)}function M(){}function z(t,e,n,r){Object.defineProperty(t,e,{configurable:!1,enumerable:r,value:n,writable:!1})}var V=function(t,e,n){var r=n&&n.length;if(t){if(!r)return t.call(e);switch(r){case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2]);case 4:return t.call(e,n[0],n[1],n[2],n[3]);case 5:return t.call(e,n[0],n[1],n[2],n[3],n[4]);default:return t.apply(e,n)}}},A=Object.create,T=Array.isArray,U={}.toString,P={"[object Array]":"array","[object Boolean]":"boolean","[object Date]":"date","[object Error]":"error","[object Function]":"function","[object Number]":"number","[object Object]":"object","[object RegExp]":"regexp","[object String]":"string"},R=function(t){var e=typeof t;return"object"===e||"function"===e?null===t?"null":P[U.call(t)]||"object":e},N=function(t){return"object"===R(t)},I=function(t){var e;return!!t&&("function"==(e=typeof t)||"object"===e)},L=function(t){var e,n,r,i,o,a,u=1,s=arguments.length,c=!1;if(t===!0&&(c=t,t=arguments[u],u++),!I(t))return t;for(;s>u;u++)if(null!=(e=arguments[u]))for(n in e)r=t[n],i=e[n],t!==i&&(c&&i&&("object"===(o=R(i))||"array"===o)?(a="array"===o?r&&T(r)?r:[]:r&&N(r)?r:{},t[n]=L(c,a,i)):void 0!==i&&(t[n]=i));return t},O={}.hasOwnProperty,q=function(t,e){return null!=t&&O.call(t,e)},D=function(t,e,n){var r,i,o=this;return i=t&&q(t,"constructor")?t.constructor:o,r=n?function(){var t=A(r.prototype),e=V(i,t,arguments);return I(e)?e:t}:function(){return V(i,this,arguments)},r.prototype=A(o.prototype),r.prototype.constructor=r,t&&L(r.prototype,t),L(r,o,e),r.__super__=o.prototype,r},F=[],H=F.slice,W=function(t){var e,n,r;if(t===!0&&q(arguments,1)&&(e=t,t=arguments[1]),!I(t))return t;switch(R(t)){case"array":return e?L(e,[],t):H.call(t);case"number":case"string":case"date":case"boolean":return new(n=t.constructor)(t);case"regexp":return n=t.constructor,r=new n(t),r.lastIndex=t.lastIndex,r;default:return e?L(e,{},t):L({},t)}},$=Object.keys,Y=function(t,e){if(!I(t))return[];if(e){var n,r=[];for(n in t)r.push(n);return r}return $(t)},B=function(t,e){return function(n){var r,i,o,a,u,s,c=arguments.length;if(2>c||null==n)return n;for(r=1;c>r;r++)for(i=arguments[r],o=Y(i,t),a=o.length,u=0;a>u;u++)s=o[u],e&&void 0!==n[s]||(n[s]=i[s]);return n}},X=B(!0,!0),Q=function(t,e){throw t+" ERROR: "+e},G="__mota__"+(""+Math.random()).replace(/\D/g,""),K=Object.defineProperty;t.setup=function(e,n,r,i){var o=e[G];return o||(o=new t,i?e[G]=o:K(e,G,{writable:!0,value:o})),n?o[n]?o[n]:o[n]=r:o},t.get=function(t,e){var n=t[G];return e?n&&n[e]:n},t.set=function(t,e,n){var r=t[G];return r?r[e]=n:void 0},t.del=function(e,n){var r=e[G];if(r){if(!n)return!!(e[G]=new t);if(null!=r[n])return!(r[n]=void 0)}return!1};var J=1,Z=16,tt=255,et=0,nt={},rt=Math.imul;("function"!=typeof rt||-2!==rt(4294967295,2))&&(rt=function(t,e){var n=t>>>16&65535,r=65535&t,i=e>>>16&65535,o=65535&e;return r*o+(n*o+r*i<<16>>>0)|0});var it=function(t,e,n){if(t===e)return n?0!==t||1/t==1/e:!0;if(t!==t)return e!==e;if(null==t||null==e)return t===e;var r=typeof t;if("function"!==r&&"object"!==r&&"object"!=typeof e)return!1;var i=U.call(t);if(i!=U.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return t=+t,e=+e,t!==t?e!==e:t===e?n?0!==t||1/t==1/e:!0:!1;case"[object Date]":case"[object Boolean]":return+t===+e}return i},ot=function(t,e){var n=it(t,e);if(n===!0||n===!1)return n;if(t.size!==e.size)return!1;if(t.isMutable&&e.isMutable&&!t.isMutable()&&!e.isMutable()){var r=o(t),i=o(e);if(null!=r&&null!=i&&r!==i)return!1;var a=!0,u={};return t.forEach(function(t,n){var r=e.get(n,u);return r!==u&&ot(t,r)?void 0:a=!1}),a}return!1},at=function(t){return"[object Arguments]"===U.call(t)},ut="[object process]"===("undefined"!=typeof global&&global&&U.call(global.process)),st="[object Window]",ct="[object global]",ht=function(t){if(!t||"object"!=typeof t)return!1;if(!ut&&t.window!==t)return!1;var e=U.call(t);return e===st||e===ct},lt=Math.pow(2,53)-1,ft=function(t){var e,n=R(t);return"array"===n?!0:"object"!==n||ht(t)?!1:(e="length"in t&&t.length,0===e?!0:"number"==typeof e&&e>0&&lt>=e&&e-1 in t)},pt=function(t){return t===!0||t===!1||"boolean"===R(t)},dt=function(t){return"date"===R(t)},gt="[object HTMLDocument]",vt="[object Document]",mt=function(t){var e;if(!t||null!==t.parentNode||!(e=t.defaultView))return!1;if(ut)return ht(e);var n=U.call(t);return n===gt||n===vt},yt=function(t){return t&&1===t.nodeType?ut?!0:U.call(t).indexOf("Element")>-1:!1},_t=function(t){return"string"===R(t)},bt=function(t){if(null==t)return!0;if(T(t)||_t(t)||at(t))return 0===t.length;for(var e in t)if(q(t,e))return!1;return!0},wt=function(t){return"function"===R(t)};"function"!=typeof/./&&"object"!=typeof Int8Array&&(wt=function(t){return"function"==typeof t||!1});var xt=wt,Et=function(t){var e;return!t||"object"!=typeof t||"[object Object]"!==U.call(t)||q(t,"constructor")?!1:(e=t.constructor)?xt(e)&&e instanceof e:!0},St=function(t,e,n,r){var i=it(t,e,!0);if(i===!0||i===!1)return i;var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,u=e.constructor;if(!(a===u||Et(t)&&Et(e)))return!1}n=n||[],r=r||[];for(var s=n.length;s--;)if(n[s]===t)return r[s]===e;if(n.push(t),r.push(e),o){if(s=t.length,s!==e.length)return!1;for(;s--;)if(!St(t[s],e[s],n,r))return!1}else{var c,h=Y(t);if(s=h.length,Y(e).length!==s)return!1;for(;s--;)if(c=h[s],!q(e,c)||!St(t[c],e[c],n,r))return!1}return n.pop(),r.pop(),!0},jt=function(t,e){return St(t,e)},kt=function(t){return"error"===R(t)},Ct=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},Mt=function(t){return"number"===R(t)},zt=function(t){return t!==+t&&Mt(t)},Vt=function(t){return null===t},At=function(t){return"regexp"===R(t)},Tt=function(t){return void 0===t},Ut=function(t,e){console.log(t+" LOG: "+e)},Pt=function(t,e){var n,r,i,o=t&&t.prototype,a={};if(!o)return t;for(var s=0;s<e.length;s++){n=e[s];for(r in n)a[r]||(a[r]=[]),a[r].push(n[r])}for(r in a)i=o[r],o[r]=u(a[r],xt(i)&&i);return t},Rt="object"==typeof self&&self.self==self&&self||"object"==typeof global&&global.global==global&&global,Nt=Rt&&Rt.document,It=function(t){Rt=t,Nt=t&&t.document},Lt=Rt.mota,Ot=function(){return Lt&&(Rt.mota=Lt),this},qt=function(t,e){return function(){return V(t,e,H.call(arguments))}},Dt=function(t){for(var e=Y(t),n=e.length,r=Array(n),i=0;n>i;i++)r[i]=[e[i],t[e[i]]];return r},Ft={},Ht=function(t){return t=t?t+"":"",Ft[t]||(Ft[t]=0),t+ ++Ft[t]},Wt=function(t,e){var n,r;for(n in e)if(r=e[n],r&&!r(t[n],n,t))return!1;return!0},$t=function(t,e){console.warn?console.warn(t+" WARNS: "+e):console.log(t+" WARNS: "+e)},Yt={apply:V,classExtend:D,clone:W,extend:L,defaults:X,err:Q,has:q,is:ot,isArguments:at,isArray:T,isArrayLike:ft,isBoolean:pt,isDate:dt,isDocument:mt,isElement:yt,isEmpty:bt,isEqual:jt,isError:kt,isFinite:Ct,isFunction:xt,isNaN:zt,isNull:Vt,isNumber:Mt,isObject:N,isObjectLike:I,isPlainObject:Et,isRegExp:At,isString:_t,isUndefined:Tt,isWindow:ht,keys:Y,log:Ut,mixin:Pt,noConflict:Ot,noPartial:qt,pairs:Dt,type:R,uniqueId:Ht,validate:Wt,warn:$t},Bt=F.indexOf,Xt=function(t,e){var n,r,i;for(t.length>e.length?(n=e,r=t):(n=t,r=e),i=n.length;i--;)if(-1!==Bt.call(r,n[i]))return!0;return!1},Qt=function(t,e,n,r){var i,o,a,u=[],s="getFirst"===r,c="trigger"===r,h=e?e.length:0,l=n.type,f=n.namespaces,p=n.handler,d=n.context;for(o=0;h>o&&(i=e[o],i!==n&&(n._listener===!0||!(!l||ot(i.type,l)||c&&i.isRegExp&&(a=l.match(i.type)))||p&&i.handler!==p||!(!f||0===f.length||i.namespaces&&Xt(i.namespaces,f))||d&&i.context!==d)||(u.push([i,{index:o,match:{string:l,match:a}}]),!s));o++);return u},Gt=/\S+/g,Kt=/\.[^.]+/g,Jt=/^[^.]+/g,Zt=function(t){this.type=t.type,this.namespaces=t.namespaces,this.handler=t.handler,this.context=t.context,this.isRegExp=t.isRegExp,this.once=!1,this._listener=!0},te=function(t,e){var n,r,i,o,a,u,s,c=t.eventType,h=t.handler,l=t.context;if(t._listener)e.push(t);else if(s=R(c),a="regexp"===s)e.push({type:c,handler:h,context:l,isRegExp:a});else if("object"===s){u=c,h&&(l=h);for(c in u)te({eventType:c,handler:u[c],context:l},e)}else for(c=(c||"").match(Gt)||[""],r=c.length,n=0;r>n;n++)i=(c[n].match(Jt)||[])[0],o=c[n].match(Kt),e.push({type:i,namespaces:o,handler:h,context:l,isRegExp:a});return e},ee=function(e,n,r,i,o){var a,u,s,c,h,l;if(e){for(s="on"===n?t.setup(e,"events",[]):t.get(e,"events"),c=te(i,[]),a=0;a<c.length;a++)if("on"===n){if(!c[a].type||!c[a].handler)continue;r.call(e,s,new Zt(c[a]),void 0,o)}else for(h=Qt(e,s,c[a],n),u=0;u<h.length&&(l=h[u],r.call(e,s,l[0],l[1],o)!==!1);u++);return e}},ne=function(t,e,n,r){r.push(e)},re=function(t,e,n){var r=[];return ee(this,"get",ne,{eventType:t,handler:e,context:n},r),r},ie=function(t,e,n,r){r.value=!0},oe=function(t,e,n){var r={value:!1};return ee(this,"getFirst",ie,{eventType:t,handler:e,context:n},r),r.value},ae=function(t,e,n,r){e.handler=void 0,s(t,n.index-r.value),r.value++},ue=function(t,e,n){return ee(this,"off",ae,{eventType:t,handler:e,context:n},{value:0})},se=function(t,e,n,r){r&&(e.once=!0),t.push(e)},ce=function(t,e,n,r){return ee(this,"on",se,{eventType:t,handler:e,context:n},r)},he=function(t,e,n){return ce.call(this,t,e,n,!0)},le=function(t,e,n){e.once&&(e.handler=void 0,ee(this,"off",ae,e,{value:0}))},fe=function(t,e,n,r){var i=e.handler;le.call(this,t,e,n),V(i,void 0!==e.context?e.context:this,r)},pe=function(t){return ee(this,"trigger",fe,{eventType:t},H.call(arguments,1))},de=function(t,e,n,r){fe(t,e,n,[n.match].concat(r))},ge=function(t){return ee(this,"trigger",de,{eventType:t},H.call(arguments,1))},ve={getListeners:re,hasListeners:oe,off:ue,on:ce,once:he,trigger:pe,triggerMatch:ge},me=5,ye=32,_e=ye-1,be=ye/2,we=ye/4,xe={},Ee=function(){return xe},Se=function(t,e,n){var r,i,o,a=t.length-1;if(n&&e===a)return t.pop(),t;for(r=new Array(a),i=o=0;a>i;i++)i===e&&(o=1),r[i]=t[i+o];return r},je=function(t,e,n,r){var i,o,a;if(r)a=t;else for(i=0,o=t.length,a=new Array(o);o>i;i++)a[i]=t[i];return void 0!==e&&(a[e]=n),a},ke=function(t,e){for(var n,r=this.children,i=0,o=r.length;o>i;i++)if(n=r[i],n&&n.forEach(t,e)===!1)return!1},Ce=function(t){return this.owner===t&&t.mutable};L(c.prototype,{isLeaf:!0,isEditable:Ce,forEach:ke,lookup:function(t,e,n){for(var r,i=0,o=this.children.length;o>i;i++)if(r=this.children[i],ot(r.key,n))return r.value;return xe},modify:function(t,e,n,r,i){var o,a,u,s,h,l,p,d,g;if(n!==this.hash)return o=i.get(i.notSetValue),(a=o===i.notSetValue)?this:(i.changeValue=!0,i.newValue=o,i.changeSize=!0,Te(this,t,e,new f(t,n,r,o)));for(l=this.children,u=0,s=l.length;s>u;u++)if(g=l[u],ot(g.key,r)){i.oldValue=g.value;break}return h=s>u,o=i.get(h?i.oldValue:i.notSetValue),a=o===i.notSetValue,(h?g.value===o:a)?this:(i.changeValue=!0,i.newValue=o,(a||!h)&&(i.changeSize=!0),a&&2===s?(g=l[1^u],new f(t,this.hash,g.key,g.value)):(p=this.isEditable(t),d=p?l:je(l),h?a?u===s-1?d.pop():d[u]=d.pop():d[u]=new f(t,n,r,o):d.push(new f(t,n,r,o)),p?(this.children=d,this):new c(t,this.hash,d)))}});var Me=function(t,e,n,r){var i,o,a,u=t.length+1;if(r&&e+1===u)return t[e]=n,t;for(i=new Array(u),o=a=0;u>o;o++)o===e?(i[o]=n,a=-1):i[o]=t[o+a];return i},ze=function(t,e,n,r){for(var i,o=new Array(n),a=0,u=0,s=0,c=1,h=e.length;h>s;s++)i=e[s],i&&s!==r&&(u|=c,o[a++]=i),c<<=1;return new l(t,u,o)};L(h.prototype,{isEditable:Ce,forEach:ke,lookup:function(t,e,n){var r=this.children[e>>>t&_e];return r?r.lookup(t+me,e,n):xe},modify:function(t,e,n,r,i){var o,a,u,s,c=n>>>e&_e,l=this.children,f=l[c];if(!f&&i.get(i.notSetValue)===i.notSetValue)return this;if(o=Ue(f,t,e+me,n,r,i),o===f)return this;if(a=this.count,f){if(!o&&(a--,we>a))return ze(t,l,a,c)}else a++;return u=this.isEditable(t),s=je(l,c,o,u),u?(this.count=a,this.children=s,this):new h(t,a,s)}});var Ve=function(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t},Ae=function(t,e,n,r,i){for(var o=new Array(ye),a=0,u=0;n;a++)1&n&&(o[a]=e[u],u++),n>>>=1;return o[r]=i,new h(t,u+1,o)};L(l.prototype,{isEditable:Ce,forEach:ke,lookup:function(t,e,n){var r=1<<(e>>>t&_e),i=this.bitmap;return i&r?this.children[Ve(i&r-1)].lookup(t+me,e,n):xe},modify:function(t,e,n,r,i){var o,a,u,s,c,h,f,p,d=n>>>e&_e,g=1<<d,v=this.bitmap,m=0!==(v&g);return m||i.get(i.notSetValue)!==i.notSetValue?(o=Ve(v&g-1),u=this.children,s=m?u[o]:void 0,c=Ue(s,t,e+me,n,r,i,i),c===s?this:(a=u.length,!m&&c&&a>=be?Ae(t,u,v,d,c):m&&!c&&2===a&&u[1^o].isLeaf?u[1^o]:m&&c&&1===a&&c.isLeaf?c:(h=this.isEditable(t),f=m?c?v:v^g:v|g,p=m?c?je(u,o,c,h):Se(u,o,h):Me(u,o,c,h),h?(this.bitmap=f,this.children=p,this):new l(t,f,p)))):this}});var Te=function(t,e,n,r){var i,o,a=t.hash,u=r.hash;return a===u?new c(e,a,[r,t]):(i=a>>>n&_e,o=u>>>n&_e,new l(e,1<<i|1<<o,i===o?[Te(t,e,n+me,r)]:o>i?[t,r]:[r,t]))};L(f.prototype,{isLeaf:!0,isEditable:Ce,lookup:function(t,e,n){return ot(this.key,n)?this.value:xe},modify:function(t,e,n,r,i){var o=ot(this.key,r),a=i.get(o?this.value:i.notSetValue),u=a===i.notSetValue;return(o?this.value===a:u)?this:(i.changeValue=!0,i.newValue=a,i.oldValue=this.value,u?void(i.changeSize=!0):o?this.isEditable(t)?(this.value=a,this):new f(t,this.hash,r,a):(i.changeSize=!0,Te(this,t,e,new f(t,n,r,a))))},forEach:function(t,e){return t(e,this)}});var Ue=function(t,e,n,r,i,o){var a;if(!t){if(a=o.get(o.notSetValue),a===o.notSetValue)return;return o.changeValue=!0,o.changeSize=!0,o.newValue=a,new f(e,r,i,a)}return t.modify(e,n,r,i,o)},Pe=0,Re=1,Ne=2,Ie="function"==typeof Symbol&&Symbol.iterator,Le="@@iterator",Oe=Ie||Le,qe=function(t,e,n){this.__type=void 0===e?Ne:e,this.__reverse=n,this.__stack=t.__root&&p(t.__root)};qe.prototype={constructor:qe,next:function(){for(var t,e,n,r,i,o=this.__type,a=this.__reverse,u=this.__stack;u;){if(t=u.node,e=t.children,n=u.index++,e){if(r=e.length-1,r>=n){if(i=e[a?r-n:n]){if(!i.children)return g(i.key,i.value,o);u=this.__stack=p(i,u)}continue}}else if(0===n)return g(t.key,t.value,o);u=this.__stack=this.__stack.prev}return d()},toString:function(){return"[object MotaMap Iterator]"}},qe.prototype[Oe]=function(){return this},y.prototype.get=function(t){return this.resolved?this.value:(this.resolved=!0,this.value=this.func(t))};var De={},Fe=v.isMap=function(t){return!(!t||!t.__owner||"map"!==t.__owner.type)},He=function(t,e,n){var r=A($e);return r.size=e||0,r.__root=n,r.__owner=new m(t),r},We=function(t,e){var n,r,i,o=t&&R(t);if("object"===o){if("function"==typeof t.forEach)return t.forEach(e);for(n in t)e.call(null,t[n],n)}else if("array"===o)for(r=0,i=t.length;i>r;r++)e.call(null,t[r][1],t[r][0])},$e=L(v.prototype,ve,{get:function(t,e){var n=this.__root,r=n?n.lookup(0,a(t),t):xe;return r===xe?e:r},has:function(t){return xe!==this.get(t,xe)},set:function(t,e){return this.update(t,function(){return e},xe)},remove:function(t){return this.update(t,Ee,xe)},update:function(t,e,n,r){var i,o,u,s,c,h=new y(e,n),l=this.isMutable();return u=l?this:He(),u.__root=Ue(this.__root,u.__owner,0,a(t),t,h),h.changeValue?(i=h.newValue,o=i===h.notSetValue,u.size=this.size+(h.changeSize?o?-1:1:0),r===De?h:u.size||l?(l&&(s={type:o?"delete":h.changeSize?"add":"update"},s.key=s.name=t,o?s.oldValue=h.oldValue:(s.value=s.newValue=i,h.changeSize||(s.oldValue=h.oldValue)),c=this.__changes,c||(c=this.__changes=[]),c.push(s),r||this.__triggerChangeEvent()),u):Ye):r===De?h:this},__triggerChangeEvent:function(){if(this.isMutable()){var t=this.__changes;if(this.__changes=[],t&&t.length)return this.trigger("change",t),!0}return!1},clear:function(){if(this.isImmutable())return Ye;if(this.hasListeners()){var t=this.__changes;t||(t=this.__changes=[]),this.forEach(function(e,n){t.push({type:"delete",key:n,name:n,oldValue:e})})}return this.size=0,this.__root=void 0,this.__triggerChangeEvent(),this},count:function(){return this.size},keys:function(){return new qe(this,Pe,!1)},values:function(){return new qe(this,Re,!1)},entries:function(){return new qe(this,Ne,!1)},forEach:function(t,e){var n=this,r=0;return this.size&&this.__root.forEach(function(i,o){return r++,t.call(e,o.value,o.key,n)}),r},isMutable:function(){return this.__owner.mutable},isImmutable:function(){return!this.isMutable()},asMutable:function(){return this.isMutable()?this:He(!0,this.size,this.__root)},asImmutable:function(){return this.isMutable()?this.size?He(!1,this.size,this.__root):Ye:this},clone:function(){return this.isImmutable()?this:He(!0,this.size,this.__root)},merge:function(t,e){if(!t)return this;var n=this.asMutable(),r=!1;return We(t,function(t,i){var o,a=function(){return t};e===De?(o=n.update(i,a,xe,e),o.changeValue&&(r=!0)):n.update(i,a,xe,!0)}),r||n.__triggerChangeEvent()?n===this?n:n.asImmutable():this}}),Ye=He(!1);$e[Oe]=$e.pairs=$e.entries,$e.unset=$e["delete"]=$e.remove;var Be=/[\-{}\[\]+?.,\\\^$|#\s]/g,Xe=/\((.*?)\)/g,Qe=/(\(\?)?:\w+/g,Ge=/\*\w+/g,Ke=/(?:(\(\?)?:\w+)|(?:\*\w+)/g,Je=/^\/+/,Ze=/\/+$/,tn=/#.*/,en=/\?.*/,nn=new RegExp("^(?:(?:((?:https?|ftp):)//)(?:(\\S+(?::\\S*)?)@)?((?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*)?(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))?)(?::(\\d{2,5}))?)?(/?\\S*)?$","i"),rn=function(t,e){var n,r,i,o,a,u,s,c;if(n=(t||"").match(nn)||[],r={auth:n[2]||"",hash:"",hostname:n[3]||"",port:n[4]||"",protocol:n[1]||"",search:""},r.pathname=(n[5]||"").replace(tn,function(t){return r.hash=t||"",""}).replace(en,function(t){return r.search=t||"",""}).replace(Je,"/"),"/"!==r.pathname&&(r.pathname=r.pathname.replace(Ze,"")),r.path=r.pathname+r.search,r.host=r.hostname+(r.port?":"+r.port:""),r.href="",r.host&&(r.href+=r.protocol+"//",r.auth&&(r.href+=r.auth+"@"),r.href+=r.host),r.fragment=r.path+r.hash,r.href+=r.fragment,i=r.query=r.search.substring(1),e)for(o=i.split("&"),a=0,i=r.query={};a<o.length;a++)c=o[a].split("="),u=decodeURIComponent(c[0]),s=c[1]?decodeURIComponent(c[1]):!0,i[u]=s;return r},on=function(t){var e,n,r="";return t.protocol&&(r+=b(t.protocol,":")+"//"),t.auth&&(r+=t.auth+"@"),t.host?r+=t.host:(t.hostname&&(r+=t.hostname),t.port&&(r+=":"+t.port)),t.pathname&&(e=t.pathname.replace(Je,"/"),e=r?_(e,"/"):e,r+="/"!==e?e.replace(Ze,""):e),t.search?r+=_(t.search,"?"):t.query&&(n=w(t.query),n&&(r+="?"+t.query)),t.hash&&(r+=_(t.hash,"#")),r},an=function(t,e,n){var r,i;for(r=0;r<e.length;r++)i=e[r],i&&"."!==i&&(".."===i?t.length&&".."!==t[t.length-1]?t.pop():n&&t.push(".."):t.push(i))},un=function(t){var e,n,r=[];return t=rn(t),e=t.pathname.split("/"),n="/"===t.pathname.charAt(0)?"/":"",an(r,e,!n),t.pathname=n+r.join("/"),on(t)},sn=function(t,e){var n,r,i,o;return t=rn(t),e=rn(e),r=e.pathname.split("/"),i="/"===t.pathname.charAt(0)?"/":"",o="/"===e.pathname.charAt(0)?"/":"",n=o?["",""]:t.pathname.split("/"),an(n,r),t.pathname=i+o+n.join("/"),t.search=e.search,t.hash=e.hash,on(t)},cn=function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],e&&_t(e)&&n.push(e);return un(n.join("/"))};x.parse=rn,x.resolve=sn,x.format=on,x.normalize=un,x.join=cn;var hn=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ln=function(){return null==this?"":(this+"").replace(hn,"")},fn=function(t){var e,n,r,i,o="",a=0;if(!t)return"";if(e=R(t),"array"===e)for(n=t.length;n>a;a++)t[a]&&(o+=" "+t[a]);else if("object"===e)for(r=Y(t),n=r.length;n>a;a++)i=r[a],t[i]&&(o+=" "+i);else o=t+"";return ln.call(o)},pn=function(t,e,n){var r,i,o,a,u,s={},c=t&&t.validateProps;if(null!=e)for(r in e)q(e,r)&&(s[r]=e[r]);if(i=arguments.length-2,1===i)s.children=T(n)?n:[n];else if(i>1){for(o=Array(i),a=0;i>a;a++)o[a]=arguments[a+2];s.children=o}return c&&(s=c(s)||{}),u={type:t,props:s}},dn={},gn=1,vn="vComp",mn=function(t){return t.nodeType&&3!==t.nodeType?1:t===t.window?2:0},yn={add:function(e){var n,r=e.el,i=mn(r);return i?(n=t.get(r,vn),n||(n=gn++,t.setup(r,vn,n,1===i)),dn[n]=e):void 0},remove:function(e){var n=mn(e)&&t.get(e,vn);n&&(dn[n]=null)},get:function(e){return dn[mn(e)&&t.get(e,vn)]}},_n=function(t,e,n,r,i,o,a,u,s){var c,h,l;if(this.dontQueue=!0,"remove"===e)return l=t.el,E(t),i.removeChild(l),void(this.queued=!1);if(c=t.props,"add"===e)t.props=n,t.initialize&&t.initialize(),t.componentWillMount&&t.componentWillMount();else if("update"===e||"forceUpdate"===e){if(n?t.componentWillReceiveProps&&t.componentWillReceiveProps(n):n=t.props,"update"===e&&t.shouldComponentUpdate&&(h=t.shouldComponentUpdate(n),h===!1))return t.props=n,this.queued=!1,void(this.dontQueue=!1);t.componentWillUpdate&&t.componentWillUpdate(n),t.props=n}this.queued=!1,this.dontQueue=!1,this.updateComponent(t,e,r,o,a,u,s),"add"===e?(yn.add(t),o!==t.el&&i.insertBefore(t.el,o)):"update"===e&&i&&o!==t.el&&i.insertBefore(t.el,o),"add"===e?this.updater.queueCallback(t,"componentDidMount"):("update"===e||"forceUpdate"===e)&&this.updater.queueCallback(t,"componentDidUpdate",c)},bn=function(t){return t.getAttribute("data-mota")},wn=function(t,e){return t.setAttribute&&t.setAttribute("data-mota",e),t},xn=function(t){for(var e,n=t.childNodes.length;n--;)e=t.childNodes.item(n),e.getAttribute&&"server"!==bn(e)&&t.removeChild(e)},En=function(t,e,n){return!t||t.getAttribute&&"server"!==bn(t)?wn(e,n):t.nodeType===e.nodeType&&t.nodeName===e.nodeName&&t.nodeValue===e.nodeValue?(("HEAD"===t.nodeName||"BODY"===t.nodeName)&&xn(t),wn(t,n)):wn(e,n)},Sn=function(t,e,n,r,i){var o,a,u=e.children;return"string"==typeof t?("#text"===t?o=Nt.createTextNode(e.text):"#comment"===t?o=Nt.createComment(u.join("\n")):(e.xmlns?a=e.xmlns:"svg"===t?a="http://www.w3.org/2000/svg":"math"===t&&(a="http://www.w3.org/1998/Math/MathML"),o=a?Nt.createElementNS(a,t):Nt.createElement(t)),o=En(n,o,r?"server":"client"),r||n===o||"script"!==t&&"style"!==t||Q("mota.view.Component.update","For security reasons, <script> and <style> elements are not allowed to be created. "+i)):Q("mota.view.Component.update","`render` must return an object containing a `type` property with a primitive string. "+i),o},jn=/^on/,kn=function(t){if(T(t)){var e=V(L,null,[{}].concat(t));return e}return t},Cn=["Webkit","Moz","ms"],Mn=Nt?Nt.createElement("div").style:{},zn={animationIterationCount:1,boxFlex:1,boxFlexGroup:1,columnCount:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,fontWeight:1,lineClamp:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,fillOpacity:1,strokeDashoffset:1,strokeOpacity:1,strokeWidth:1},Vn=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},An={},Tn=function(t){var e,n,r=t;if(void 0!==An[t])return An[t];if(t in Mn)return An[t]=t,t;for(e=Vn(t),n=Cn.length;n--;)if(t=Cn[n]+e,t in Mn)return An[r]=t,t;An[r]=!1},Un=function(t,e,n){var r,i,o;i=Tn(e),i&&(r=null==n||"boolean"==typeof n?"":n,o=1!==zn[i]&&Mt(r),r=o?r+"px":ln.call(r+""),t[i]!==r&&(t[i]=r))};Y(zn).forEach(function(t){for(var e=Cn.length;e--;)zn[Cn[e]+Vn(t)]=1});var Pn,Rn=function(t,e,n,r){var i,o,a,u,s,c,h=t.el;if(n!==r)switch(e){case"key":case"data-mota":case"children":case"childNodes":case"innerHTML":case"outerHTML":return;case"daugerousInnerHTML":case"dangerouslySetInnerHTML":if(n&&r&&n.__html===r.__html)return;return void(r&&h.innerHTML!==r.__html&&(h.innerHTML=r.__html));case"style":for(u=h.style,n=kn(n)||{},r=kn(r)||{},c=Y(r),i=c.length;i--;)s=c[i],n[s]!==r[s]&&Un(u,s,r[s]);for(c=Y(n),i=c.length;i--;)s=c[i],void 0===r[s]&&Un(u,s,null);return;case"class":case"className":return o=fn(r),void("svg"===h.nodeName?h.getAttribute("class")!==o&&h.setAttribute("class",o):h.className!==o&&(h.className=o));default:return a=e.replace(jn,""),void(e!==a?(a=a.toLowerCase(),n&&ve.off.call(t,a,n),r&&ve.on.call(t,a,r)):e in h&&"list"!==e&&"form"!==e&&"type"!==e&&"width"!==e&&"height"!==e?h[e]!==r&&(h[e]=r):r?h.setAttribute(e,r+""):h.removeAttribute(e))}},Nn=function(t,e,n){var r,i,o;for(o=Y(n),r=o.length;r--;)i=o[r],Rn(t,i,e[i],n[i]);for(o=Y(e),r=o.length;r--;)i=o[r],void 0===n[i]&&Rn(t,i,e[i])},In=0,Ln=function(t){function e(){S.call(this)}var n,r=[];t&&xt(t.render)||Q("mota.view.createClass","Provide an object with a `render` property containing a function"),e.displayName=t.displayName,e.validateProps=t.validateProps;for(n in t.statics)e[n]=t.statics[n];e.prototype=new S,t=L(e.prototype,t);for(n in t)xt(t[n])&&r.push(n);return t.constructor=e,t.__methods=r,e.__type=In++,e},On=function(t,e){var n=t.props,r=t.type,i=void 0===r.__type?r:r.__type;return void 0===e[i]&&(e[i]=0),i+(null==n.key?":noKey:"+e[i]++:":key:"+n.key)},qn=function(t,e,n,r,i,o,a){var u,s,c,h,l,f,p=t.childNodes;for(c=e.length;c--;)s=e[c],s&&s.__internal__.update(s,"remove",null,null,t);for(c=0,h=n.length;h>c;c++)ut&&(p=t.childNodes),l=n[c],u=l.component,f=p.item(l.index),u.__internal__.update(u,"add",l.props,l.owner,t,f||null,i,o,a);for(c=0,h=r.length;h>c;c++)ut&&(p=t.childNodes),l=r[c],u=l.component,f=p.item(l.index),u.__internal__.update(u,"update",l.props,l.owner,t,f||null)},Dn=function(t,e,n,r,i,o,a,u,s,c){for(var h,l,f,p,d,g,v=0,m=e.length;m>v;v++)if(p=e[v],null!=p&&p!==!1&&""!==p){if("object"==typeof p){if(T(p)){c=Dn(t,p,n,r,i,o,a,u,s,c);continue}}else p={type:"#text",props:{text:p+""}};p.type||Q("mota.view.Component.update","Please provide a valid placeholder."),h=On(p,a),g=r[h],d=xt(p.type),void 0!==g?(f=n[g],n[g]=void 0,l=f,u.push({component:l,index:c,props:d?p.props:p})):(l=d?new p.type:new Pn,s.push({component:l,index:c,props:d?p.props:p,owner:d?l:t.__internal__.owner})),i[c]=l,o[h]=c,c++}return c},Fn=function(t,e,n,r,i,o){Pn||(Pn=Ln({render:function(){return this.props}}));var a=[],u={},s={},c=[],h=[],l=e.depth+1;Dn(t,n,r,i,a,u,s,c,h,0),qn(t.el,r,h,c,o,l,e.updater),e.children=a,e.childrenMap=u},Hn=function(t,e){t.nodeValue!=e&&(t.nodeValue=e)},Wn={area:1,base:1,br:1,col:1,command:1,embed:1,hr:1,img:1,input:1,keygen:1,link:1,menuitem:1,meta:1,param:1,source:1,track:1,wbr:1},$n=function(t,e,n,r,i,o,a){var u,s,c,h,l,f,p,d;if(u=t.render(pn)||{},s=this.cache,s!==u){if(this.cache=u,h=u.type,l=u.props||{},f=l.children||[],"add"===e?(this.owner=n,this.depth=o,this.updater=a):n=this.owner,p=n?"Please check the code for the "+n.constructor.displayName+" component.":"","add"===e){if(s.type=h,"#ignore"===h)return void(t.el=r);t.el=Sn(h,l,r,i,p)}if(c=t.el,c||Q("mota.view.Component.update","The `el` property is missing. "+p),s.type&&h!==s.type&&Q("mota.view.Component.update","You must not change the type of an component between updates. You have changed '"+s.type+"' to '"+h+"'. "+p),"#text"===h)return Hn(c,l.text);if("#comment"===h)return Hn(c,f.join("\n"));Wn[h]&&(null!=l.daugerousInnerHTML||null!=f&&f.length>0)&&Q("mota.view.Component.update",h+" is a void element tag and must not have `children` or use `daugerousInnerHTML`. "+p),d=s.props,Nn(t,d,l),Wn[h]||null!=l.daugerousInnerHTML||(Fn(t,this,f,this.children,this.childrenMap,i),"select"===h&&Rn(t,"value",d.value,l.value))}},Yn=function(){this.queued=!1,this.force=!1,this.renderToString=!1,this.children=[],this.childrenMap={},this.depth=0};Yn.prototype={constructor:Yn,cache:pn(),queueUpdate:function(t,e,n){this.dontQueue||(this.queued?e&&(this.force=!0):(this.queued=!0,this.force=!!e,this.renderToString=!!n,this.updater.queueUpdate(t)))},update:_n,updateComponent:$n},L(S.prototype,ve,{update:function(){this.__internal__.queueUpdate(this)},forceUpdate:function(){this.__internal__.queueUpdate(this,!0)},bindMethodsToThis:function(){for(var t,e,n=this.__methods.length;n--;)t=this.__methods[n],e=this[t],this[t]=qt(e,this),this[t].original=e}});var Bn=function(t,e){if(t){var n=yn.get(t);if(n)return n;if(!e)return n=new S,n.el=t,yn.add(n)?n:void 0}};j.prototype={add:function(t,e){var n=e(this.data,t);n>0?this.left?this.left.add(t,e):this.left=new j(t):this.right?this.right.add(t,e):this.right=new j(t)},traverse:function(t){var e=this.left,n=this.right;e&&e.traverse(t),t.call(this,this.data),n&&n.traverse(t)}};var Xn=function(t){this.comparator=t};Xn.prototype={isEmpty:function(){return!this.root},add:function(t){this.root?this.root.add(t,this.comparator):this.root=new j(t)},traverse:function(t){this.root&&this.root.traverse(t)},cloneAndReset:function(){var t=new Xn(this.comparator);return t.root=this.root,this.root=void 0,t}};var Qn=function(t){var e=t.__internal__;e&&e.queued&&e.update(t,e.force?"forceUpdate":"update",null,null,null,null,e.renderToString)},Gn=function(t,e){return t.__internal__.depth-e.__internal__.depth},Kn=function(){this.ignore=0,this.flushingUpdates=!1,this.dirtyComponents=new Xn(Gn)};Kn.prototype={constructor:Kn,startIgnore:function(){this.ignore++},endIgnore:function(){this.ignore--,this.flushUpdates()},flushUpdates:function(){var t,e,n;if(!this.flushingUpdates&&!this.ignore&&!this.dirtyComponents.isEmpty()){for(this.flushingUpdates=!0,t=this.pendingCallbacks=[],this.dirtyComponents.cloneAndReset().traverse(Qn),this.pendingCallbacks=void 0,e=0;e<t.length;e++)n=t[e],n.component[n.methodName](n.arg);this.flushingUpdates=!1,this.flushUpdates()}},queueUpdate:function(t){
  this.dirtyComponents.add(t),this.flushUpdates()},queueCallback:function(t,e,n){this.flushingUpdates!==!0&&Q("mota.view Internal","Only queue callbacks during update process."),t[e]&&this.pendingCallbacks.push({component:t,methodName:e,arg:n})}};var Jn=function(t,e,n){var r=Bn(e);return r||Q("mota.view.render","`parent` should be an DOM element"),r.__updater__||(r.__updater__=new Kn,r.__internal__.updater=r.__updater__),r.render=function(e){return e(null,null,t)},xt(n)&&(r.componentDidUpdate=function(){this.componentDidUpdate=void 0,n.call(this)}),r.update(),r.__internal__.children[0]},Zn=function(t){var e=Bn(Nt.createElement("div"));return e.__updater__||(e.__updater__=new Kn,e.__internal__.updater=e.__updater__),e.render=function(e){return e(null,null,t)},e.__internal__.queueUpdate(e,!0,!0),e.el.innerHTML},tr=Date.now,er={},nr=function(t){er[t]=!0,Object.defineProperty(rr.prototype,t,{enumerable:!0,configurable:!0,get:function(){var e,n;return this.originalEvent&&(n=ur[t],e=n?n(this.originalEvent,this.target):this.originalEvent[t]),this[t]=e},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},rr=function(t){var e,n;t&&t.type?(this.originalEvent=t,this.type=t.type):this.type=t;for(e in this.originalEvent)er[e]||null!=this[e]||nr(e);this.type in ar&&(this.type=ar[this.type]),this.timeStamp||(this.timeStamp=tr()),n=this.target,n&&3===n.nodeType&&(this.target=n.parentNode)};rr.prototype={constructor:rr,isDefaultPrevented:!1,isPropagationStopped:!1,isImmediatePropagationStopped:!1,stopPropagation:function(){this.isPropagationStopped=!0},stopImmediatePropagation:function(){this.isPropagationStopped=!0,this.isImmediatePropagationStopped=!0},preventDefault:function(){this.isDefaultPrevented=!0,this.originalEvent.preventDefault()}};var ir=/^key/,or=/^(?:mouse|touch|pointer|contextmenu|drag|drop)|click/,ar={mousewheel:"wheel",DOMMouseScroll:"whell"},ur={which:function(t){if(or.test(t.type)){var e=t.button;return t.which||void 0===e?t.which:1&e?1:2&e?3:4&e?2:0}return ir.test(t.type)?null==t.which?null!=t.charCode?t.charCode:t.keyCode:t.which:void 0},pageX:function(t,e){var n,r,i;return null==t.pageX&&null!=t.clientX?(n=e.ownerDocument||Nt,r=n.documentElement,i=n.body,t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0)):t.pageX},pageY:function(t,e){var n,r,i;return null==t.pageY&&null!=t.clientY?(n=e.ownerDocument||Nt,r=n.documentElement,i=n.body,t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)):t.pageY},path:function(t,e){for(var n=e,r=[n];n=n.parentNode||n.defaultView;)r.push(n);return r}};Y(ur).forEach(nr);var sr=function(t,e,n,r){var i=e.handler;return le.call(this,t,e,n),r.isImmediatePropagationStopped?!1:(r.currentTarget=this.el,void(i&&(r.result=i.call(void 0!==e.context?e.context:this,r))))},cr=function(t){t=new rr(t);var e,n,r=t.target,i=t.type,o=t.path,a=0,u=yn.get(r);for(u&&(n=u.__internal__.updater),n&&n.startIgnore();a<o.length&&!t.isPropagationStopped&&(e=o[a],u=yn.get(e),ee(u,"trigger",sr,{eventType:i,handler:void 0,context:void 0},t),t.bubbles);a++);n&&n.endIgnore()},hr={pointermove:1,pointerdown:1,pointerup:1,pointerover:1,pointerout:1,pointerenter:1,pointerleave:1,pointercancel:1},lr=function(){if(Rt.addEventListener){var t,e;for(t in Rt)e=t.replace(jn,""),t!==e&&(e in hr||Rt.addEventListener(e,cr,!0));Y(hr).forEach(function(t){Rt.addEventListener(t,cr,!0)})}};lr();var fr={classSet:fn,Component:S,create:pn,createClass:Ln,render:Jn,renderToString:Zn,select:Bn,styleSet:kn},pr=function(t){return sn("/",t)},dr=/^\/+|\/+$/g,gr={},vr=function(t){return t.replace(Be,"\\$&").replace(Xe,"(?:$1)?").replace(Qe,function(t,e){return e?t:"([^/?]+)"}).replace(Ge,"([^?]*)")},mr=function(t){var e,n,r=gr[t];return r?r:(e=new RegExp("^"+vr(t)),n=(t.match(Ke)||[]).map(function(t){return t.slice(1)}),r={regexp:e,names:n},gr[t]=r)};k.prototype={constructor:k,normalize:pr,route:function(t,e,n){var r=new k(t,e,n,this);return this.routes.push(r),this},setCallback:function(t){return this.callback=t,this},setDefaultCallback:function(t){return this.defaultCallback=t,this},triggerRoutes:function(t,e){var n,r,i=0,o=this.routes.length,a=function(t,r){var i=n.params.names[r];e[i]=t?decodeURIComponent(t):null};for(t=this.normalize(t),this.callback&&this.callback(e,t);o>i;i++)if(n=this.routes[i],r=t.match(n.params.regexp))return e={},r.slice(1).forEach(a),void n.triggerRoutes(t,e);this.defaultCallback&&this.defaultCallback(t)}};var yr=/#(.*)$/;C.extend=D,L(C.prototype,k.prototype,{constructor:C,_join:function(t){return"/"!==this.root?this.root+t:t},atRoot:function(){return this.location.search?!1:this.root===this.normalize(this.location.pathname)},checkUrl:function(t){return t&&"hashchange"===t.type?this.triggerRoutes(this.fragment=this.getHash(t.newURL)):this.triggerRoutes(this.fragment=this.getFragment())},getHash:function(t){var e=(t||this.location.href).match(yr);return this.normalize(e?e[1]:"")},getPath:function(){var t=this.root,e=this.location.pathname+this.location.search;return 0===e.indexOf(t)&&(e=e.slice(t.length)),this.normalize(e)},getFragment:function(){return this.normalize(this._hasPushState?this.getPath():this.getHash())},start:function(t){if(!this._started){this._started=!0,this.root=this.normalize(t&&t.root);var e=this.getFragment();if(!this._hasPushState&&!this.atRoot())return void this.location.replace(this._join("/#"+this.getPath()));this._hasPushState&&this.atRoot()?this.navigate(this.getHash(),{replace:!0}):(this.triggerRoutes(e),this.fragment=e),this.window.on(this._hasPushState?"popstate":"hashchange",this.checkUrl,this)}},stop:function(){this._started&&(this._started=!1,this.window.off(this._hasPushState?"popstate":"hashchange",this.checkUrl,this))},navigate:function(t,e){var n;return this._started?(e&&e!==!0||(e={replace:!!e}),t=this.normalize(t),void(this.fragment!==t&&(this.fragment=t,this._hasPushState?(this.history[e.replace?"replaceState":"pushState"]({},Nt.title,this._join(t)),this.triggerRoutes(t)):e.replace?(n=location.href.replace(/(javascript:|#).*$/,""),this.location.replace(n+"#"+t)):this.location.hash="#"+t))):!1},redirect:function(t,e){var n=this.navigate.bind(this,e);this.route(t,function(){this.setCallback(n)})}}),z(M,"VERSION","0.9.0",!0),Yt.hashCode=a,Yt.extend(M,Yt,{events:ve,Map:v,path:x,Router:C,util:Yt,view:fr,setWindow:It});var _r=!1;return z(M,"developmentMode",_r,!1),M});
  //# sourceMappingURL=mota.min.js.map