forked from jancborchardt/litewrite
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathlitewrite.min.js
68 lines (68 loc) · 394 KB
/
litewrite.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(29)},function(e,t,n){var r,i;(function(o){!function(s){var a="object"==typeof self&&self.self===self&&self||"object"==typeof o&&o.global===o&&o;r=[n(2),n(5),t],i=function(e,t,n){a.Backbone=s(a,n,e,t)}.apply(t,r),!(void 0!==i&&(e.exports=i))}(function(e,t,n,r){var i=e.Backbone,o=Array.prototype.slice;t.VERSION="1.3.3",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var s=function(e,t,r){switch(e){case 1:return function(){return n[t](this[r])};case 2:return function(e){return n[t](this[r],e)};case 3:return function(e,i){return n[t](this[r],c(e,this),i)};case 4:return function(e,i,o){return n[t](this[r],c(e,this),i,o)};default:return function(){var e=o.call(arguments);return e.unshift(this[r]),n[t].apply(n,e)}}},a=function(e,t,r){n.each(t,function(t,i){n[i]&&(e.prototype[i]=s(t,i,r))})},c=function(e,t){return n.isFunction(e)?e:n.isObject(e)&&!t._isModel(e)?l(e):n.isString(e)?function(t){return t.get(e)}:e},l=function(e){var t=n.matches(e);return function(e){return t(e.attributes)}},u=t.Events={},h=/\s+/,d=function(e,t,r,i,o){var s,a=0;if(r&&"object"==typeof r){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(s=n.keys(r);a<s.length;a++)t=d(e,t,s[a],r[s[a]],o)}else if(r&&h.test(r))for(s=r.split(h);a<s.length;a++)t=e(t,s[a],i,o);else t=e(t,r,i,o);return t};u.on=function(e,t,n){return f(this,e,t,n)};var f=function(e,t,n,r,i){if(e._events=d(p,e._events||{},t,n,{context:r,ctx:e,listening:i}),i){var o=e._listeners||(e._listeners={});o[i.id]=i}return e};u.listenTo=function(e,t,r){if(!e)return this;var i=e._listenId||(e._listenId=n.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),s=o[i];if(!s){var a=this._listenId||(this._listenId=n.uniqueId("l"));s=o[i]={obj:e,objId:i,id:a,listeningTo:o,count:0}}return f(e,t,r,this,s),this};var p=function(e,t,n,r){if(n){var i=e[t]||(e[t]=[]),o=r.context,s=r.ctx,a=r.listening;a&&a.count++,i.push({callback:n,context:o,ctx:o||s,listening:a})}return e};u.off=function(e,t,n){return this._events?(this._events=d(m,this._events,e,t,{context:n,listeners:this._listeners}),this):this},u.stopListening=function(e,t,r){var i=this._listeningTo;if(!i)return this;for(var o=e?[e._listenId]:n.keys(i),s=0;s<o.length;s++){var a=i[o[s]];if(!a)break;a.obj.off(t,r,this)}return this};var m=function(e,t,r,i){if(e){var o,s=0,a=i.context,c=i.listeners;if(t||r||a){for(var l=t?[t]:n.keys(e);s<l.length;s++){t=l[s];var u=e[t];if(!u)break;for(var h=[],d=0;d<u.length;d++){var f=u[d];r&&r!==f.callback&&r!==f.callback._callback||a&&a!==f.context?h.push(f):(o=f.listening,o&&0===--o.count&&(delete c[o.id],delete o.listeningTo[o.objId]))}h.length?e[t]=h:delete e[t]}return e}for(var p=n.keys(c);s<p.length;s++)o=c[p[s]],delete c[o.id],delete o.listeningTo[o.objId]}};u.once=function(e,t,r){var i=d(g,{},e,t,n.bind(this.off,this));return"string"==typeof e&&null==r&&(t=void 0),this.on(i,t,r)},u.listenToOnce=function(e,t,r){var i=d(g,{},t,r,n.bind(this.stopListening,this,e));return this.listenTo(e,i)};var g=function(e,t,r,i){if(r){var o=e[t]=n.once(function(){i(t,o),r.apply(this,arguments)});o._callback=r}return e};u.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),n=Array(t),r=0;r<t;r++)n[r]=arguments[r+1];return d(v,this._events,e,void 0,n),this};var v=function(e,t,n,r){if(e){var i=e[t],o=e.all;i&&o&&(o=o.slice()),i&&y(i,r),o&&y(o,[t].concat(r))}return e},y=function(e,t){var n,r=-1,i=e.length,o=t[0],s=t[1],a=t[2];switch(t.length){case 0:for(;++r<i;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,s);return;case 3:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,s,a);return;default:for(;++r<i;)(n=e[r]).callback.apply(n.ctx,t);return}};u.bind=u.on,u.unbind=u.off,n.extend(t,u);var b=t.Model=function(e,t){var r=e||{};t||(t={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{});var i=n.result(this,"defaults");r=n.defaults(n.extend({},i,r),i),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(b.prototype,u,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!n.iteratee(e,this)(this.attributes)},set:function(e,t,r){if(null==e)return this;var i;if("object"==typeof e?(i=e,r=t):(i={})[e]=t,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,s=r.silent,a=[],c=this._changing;this._changing=!0,c||(this._previousAttributes=n.clone(this.attributes),this.changed={});var l=this.attributes,u=this.changed,h=this._previousAttributes;for(var d in i)t=i[d],n.isEqual(l[d],t)||a.push(d),n.isEqual(h[d],t)?delete u[d]:u[d]=t,o?delete l[d]:l[d]=t;if(this.idAttribute in i&&(this.id=this.get(this.idAttribute)),!s){a.length&&(this._pending=r);for(var f=0;f<a.length;f++)this.trigger("change:"+a[f],this,l[a[f]],r)}if(c)return this;if(!s)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&n.clone(this.changed);var t=this._changing?this._previousAttributes:this.attributes,r={};for(var i in e){var o=e[i];n.isEqual(t[i],o)||(r[i]=o)}return!!n.size(r)&&r},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=n.extend({parse:!0},e);var t=this,r=e.success;return e.success=function(n){var i=e.parse?t.parse(n,e):n;return!!t.set(i,e)&&(r&&r.call(e.context,t,n,e),void t.trigger("sync",t,n,e))},F(this,e),this.sync("read",this,e)},save:function(e,t,r){var i;null==e||"object"==typeof e?(i=e,r=t):(i={})[e]=t,r=n.extend({validate:!0,parse:!0},r);var o=r.wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var s=this,a=r.success,c=this.attributes;r.success=function(e){s.attributes=c;var t=r.parse?s.parse(e,r):e;return o&&(t=n.extend({},i,t)),!(t&&!s.set(t,r))&&(a&&a.call(r.context,s,e,r),void s.trigger("sync",s,e,r))},F(this,r),i&&o&&(this.attributes=n.extend({},c,i));var l=this.isNew()?"create":r.patch?"patch":"update";"patch"!==l||r.attrs||(r.attrs=i);var u=this.sync(l,this,r);return this.attributes=c,u},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=e.wait,o=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(n){i&&o(),r&&r.call(e.context,t,n,e),t.isNew()||t.trigger("sync",t,n,e)};var s=!1;return this.isNew()?n.defer(e.success):(F(this,e),s=this.sync("delete",this,e)),i||o(),s},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||U();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return!r||(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1)}});var w={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};a(b,w,"attributes");var x=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},_={add:!0,remove:!0,merge:!0},S={add:!0,remove:!1},E=function(e,t,n){n=Math.min(Math.max(n,0),e.length);var r,i=Array(e.length-n),o=t.length;for(r=0;r<i.length;r++)i[r]=e[r+n];for(r=0;r<o;r++)e[r+n]=t[r];for(r=0;r<i.length;r++)e[r+o+n]=i[r]};n.extend(x.prototype,u,{model:b,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,S))},remove:function(e,t){t=n.extend({},t);var r=!n.isArray(e);e=r?[e]:e.slice();var i=this._removeModels(e,t);return!t.silent&&i.length&&(t.changes={added:[],merged:[],removed:i},this.trigger("update",this,t)),r?i[0]:i},set:function(e,t){if(null!=e){t=n.extend({},_,t),t.parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var r=!n.isArray(e);e=r?[e]:e.slice();var i=t.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,s,a=[],c=[],l=[],u=[],h={},d=t.add,f=t.merge,p=t.remove,m=!1,g=this.comparator&&null==i&&t.sort!==!1,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s<e.length;s++){o=e[s];var y=this.get(o);if(y){if(f&&o!==y){var b=this._isModel(o)?o.attributes:o;t.parse&&(b=y.parse(b,t)),y.set(b,t),l.push(y),g&&!m&&(m=y.hasChanged(v))}h[y.cid]||(h[y.cid]=!0,a.push(y)),e[s]=y}else d&&(o=e[s]=this._prepareModel(o,t),o&&(c.push(o),this._addReference(o,t),h[o.cid]=!0,a.push(o)))}if(p){for(s=0;s<this.length;s++)o=this.models[s],h[o.cid]||u.push(o);u.length&&this._removeModels(u,t)}var w=!1,x=!g&&d&&p;if(a.length&&x?(w=this.length!==a.length||n.some(this.models,function(e,t){return e!==a[t]}),this.models.length=0,E(this.models,a,0),this.length=this.models.length):c.length&&(g&&(m=!0),E(this.models,c,null==i?this.length:i),this.length=this.models.length),m&&this.sort({silent:!0}),!t.silent){for(s=0;s<c.length;s++)null!=i&&(t.index=i+s),o=c[s],o.trigger("add",o,this,t);(m||w)&&this.trigger("sort",this,t),(c.length||u.length||l.length)&&(t.changes={added:c,removed:u,merged:l},this.trigger("update",this,t))}return r?e[0]:e}},reset:function(e,t){t=t?n.clone(t):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return o.apply(this.models,arguments)},get:function(e){if(null!=e)return this._byId[e]||this._byId[this.modelId(e.attributes||e)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return e<0&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var r=t.length;return n.isFunction(t)&&(t=n.bind(t,this)),1===r||n.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return this.map(e+"")},fetch:function(e){e=n.extend({parse:!0},e);var t=e.success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t.call(e.context,r,n,e),r.trigger("sync",r,n,e)},F(this,e),this.sync("read",this,e)},create:function(e,t){t=t?n.clone(t):{};var r=t.wait;if(e=this._prepareModel(e,t),!e)return!1;r||this.add(e,t);var i=this,o=t.success;return t.success=function(e,t,n){r&&i.add(e,n),o&&o.call(n.context,e,t,n)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(this._isModel(e))return e.collection||(e.collection=this),e;t=t?n.clone(t):{},t.collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_removeModels:function(e,t){for(var n=[],r=0;r<e.length;r++){var i=this.get(e[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];var s=this.modelId(i.attributes);null!=s&&delete this._byId[s],t.silent||(t.index=o,i.trigger("remove",i,this,t)),n.push(i),this._removeReference(i,t)}}return n},_isModel:function(e){return e instanceof b},_addReference:function(e,t){this._byId[e.cid]=e;var n=this.modelId(e.attributes);null!=n&&(this._byId[n]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var n=this.modelId(e.attributes);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if(t){if(("add"===e||"remove"===e)&&n!==this)return;if("destroy"===e&&this.remove(t,r),"change"===e){var i=this.modelId(t.previousAttributes()),o=this.modelId(t.attributes);i!==o&&(null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=t))}}this.trigger.apply(this,arguments)}});var T={forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3};a(x,T,"models");var k=t.View=function(e){this.cid=n.uniqueId("view"),n.extend(this,n.pick(e,C)),this._ensureElement(),this.initialize.apply(this,arguments)},A=/^(\S+)\s*(.*)$/,C=["model","collection","el","id","attributes","className","tagName","events"];n.extend(k.prototype,u,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=n.result(this,"events")),!e)return this;this.undelegateEvents();for(var t in e){var r=e[t];if(n.isFunction(r)||(r=this[r]),r){var i=t.match(A);this.delegate(i[1],i[2],n.bind(r,this))}}return this},delegate:function(e,t,n){return this.$el.on(e+".delegateEvents"+this.cid,t,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(e,t,n){return this.$el.off(e+".delegateEvents"+this.cid,t,n),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(e)}},_setAttributes:function(e){this.$el.attr(e)}}),t.sync=function(e,r,i){var o=P[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var s={type:o,dataType:"json"};if(i.url||(s.url=n.result(r,"url")||U()),null!=i.data||!r||"create"!==e&&"update"!==e&&"patch"!==e||(s.contentType="application/json",s.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(s.contentType="application/x-www-form-urlencoded",s.data=s.data?{model:s.data}:{}),i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){s.type="POST",i.emulateJSON&&(s.data._method=o);var a=i.beforeSend;i.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",o),a)return a.apply(this,arguments)}}"GET"===s.type||i.emulateJSON||(s.processData=!1);var c=i.error;i.error=function(e,t,n){i.textStatus=t,i.errorThrown=n,c&&c.call(i.context,e,t,n)};var l=i.xhr=t.ajax(n.extend(s,i));return r.trigger("request",r,l,i),l};var P={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var N=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},z=/\((.*?)\)/g,O=/(\(\?)?:\w+/g,R=/\*\w+/g,I=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(N.prototype,u,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return t.history.route(e,function(n){var s=o._extractParameters(e,n);o.execute(i,s,r)!==!1&&(o.trigger.apply(o,["route:"+r].concat(s)),o.trigger("route",r,s),t.history.trigger("route",o,r,s))}),this},execute:function(e,t,n){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(I,"\\$&").replace(z,"(?:$1)?").replace(O,function(e,t){return t?e:"([^/?]+)"}).replace(R,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null})}});var M=t.History=function(){this.handlers=[],this.checkUrl=n.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},j=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,L=/#.*$/;M.started=!1,n.extend(M.prototype,u,{interval:50,atRoot:function(){var e=this.location.pathname.replace(/[^\/]$/,"$&/");return e===this.root&&!this.getSearch()},matchRoot:function(){var e=this.decodeFragment(this.location.pathname),t=e.slice(0,this.root.length-1)+"/";return t===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(j,"")},start:function(e){if(M.started)throw new Error("Backbone.history has already been started");if(M.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(D,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),M.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();return t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t!==this.fragment&&(this.iframe&&this.navigate(t),void this.loadUrl())},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),n.some(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0}))},navigate:function(e,t){if(!M.started)return!1;t&&t!==!0||(t={trigger:!!t}),e=this.getFragment(e||"");var n=this.root;""!==e&&"?"!==e.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+e;if(e=this.decodeFragment(e.replace(L,"")),this.fragment!==e){if(this.fragment=e,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;t.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new M;var B=function(e,t){var r,i=this;return r=e&&n.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,t),r.prototype=n.create(i.prototype,e),r.prototype.constructor=r,r.__super__=i.prototype,r};b.extend=x.extend=N.extend=k.extend=M.extend=B;var U=function(){throw new Error('A "url" property or function must be specified')},F=function(e,t){var n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger("error",e,r,t)}};return t})}).call(t,function(){return this}())},function(e,t,n){var r,i;(function(){function n(e){function t(t,n,r,i,o,s){for(;o>=0&&o<s;o+=e){var a=i?i[o]:o;r=n(r,t[a],a,t)}return r}return function(n,r,i,o){r=S(r,o,4);var s=!N(n)&&_.keys(n),a=(s||n).length,c=e>0?0:a-1;return arguments.length<3&&(i=n[s?s[c]:c],c+=e),t(n,r,i,s,c,a)}}function o(e){return function(t,n,r){n=E(n,r);for(var i=P(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}}function s(e,t,n){return function(r,i,o){var s=0,a=P(r);if("number"==typeof o)e>0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=t(p.call(r,s,a),_.isNaN),o>=0?o+s:-1;for(o=e>0?s:a-1;o>=0&&o<a;o+=e)if(r[o]===i)return o;return-1}}function a(e,t){var n=M.length,r=e.constructor,i=_.isFunction(r)&&r.prototype||h,o="constructor";for(_.has(e,o)&&!_.contains(t,o)&&t.push(o);n--;)o=M[n],o in e&&e[o]!==i[o]&&!_.contains(t,o)&&t.push(o)}var c=this,l=c._,u=Array.prototype,h=Object.prototype,d=Function.prototype,f=u.push,p=u.slice,m=h.toString,g=h.hasOwnProperty,v=Array.isArray,y=Object.keys,b=d.bind,w=Object.create,x=function(){},_=function(e){return e instanceof _?e:this instanceof _?void(this._wrapped=e):new _(e)};"undefined"!=typeof e&&e.exports&&(t=e.exports=_),t._=_,_.VERSION="1.8.3";var S=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}},E=function(e,t,n){return null==e?_.identity:_.isFunction(e)?S(e,t,n):_.isObject(e)?_.matcher(e):_.property(e)};_.iteratee=function(e,t){return E(e,t,1/0)};var T=function(e,t){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=e(o),a=s.length,c=0;c<a;c++){var l=s[c];t&&void 0!==n[l]||(n[l]=o[l])}return n}},k=function(e){if(!_.isObject(e))return{};if(w)return w(e);x.prototype=e;var t=new x;return x.prototype=null,t},A=function(e){return function(t){return null==t?void 0:t[e]}},C=Math.pow(2,53)-1,P=A("length"),N=function(e){var t=P(e);return"number"==typeof t&&t>=0&&t<=C};_.each=_.forEach=function(e,t,n){t=S(t,n);var r,i;if(N(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=_.keys(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e},_.map=_.collect=function(e,t,n){t=E(t,n);for(var r=!N(e)&&_.keys(e),i=(r||e).length,o=Array(i),s=0;s<i;s++){var a=r?r[s]:s;o[s]=t(e[a],a,e)}return o},_.reduce=_.foldl=_.inject=n(1),_.reduceRight=_.foldr=n(-1),_.find=_.detect=function(e,t,n){var r;if(r=N(e)?_.findIndex(e,t,n):_.findKey(e,t,n),void 0!==r&&r!==-1)return e[r]},_.filter=_.select=function(e,t,n){var r=[];return t=E(t,n),_.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},_.reject=function(e,t,n){return _.filter(e,_.negate(E(t)),n)},_.every=_.all=function(e,t,n){t=E(t,n);for(var r=!N(e)&&_.keys(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(!t(e[s],s,e))return!1}return!0},_.some=_.any=function(e,t,n){t=E(t,n);for(var r=!N(e)&&_.keys(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(t(e[s],s,e))return!0}return!1},_.contains=_.includes=_.include=function(e,t,n,r){return N(e)||(e=_.values(e)),("number"!=typeof n||r)&&(n=0),_.indexOf(e,t,n)>=0},_.invoke=function(e,t){var n=p.call(arguments,2),r=_.isFunction(t);return _.map(e,function(e){var i=r?t:e[t];return null==i?i:i.apply(e,n)})},_.pluck=function(e,t){return _.map(e,_.property(t))},_.where=function(e,t){return _.filter(e,_.matcher(t))},_.findWhere=function(e,t){return _.find(e,_.matcher(t))},_.max=function(e,t,n){var r,i,o=-(1/0),s=-(1/0);if(null==t&&null!=e){e=N(e)?e:_.values(e);for(var a=0,c=e.length;a<c;a++)r=e[a],r>o&&(o=r)}else t=E(t,n),_.each(e,function(e,n,r){i=t(e,n,r),(i>s||i===-(1/0)&&o===-(1/0))&&(o=e,s=i)});return o},_.min=function(e,t,n){var r,i,o=1/0,s=1/0;if(null==t&&null!=e){e=N(e)?e:_.values(e);for(var a=0,c=e.length;a<c;a++)r=e[a],r<o&&(o=r)}else t=E(t,n),_.each(e,function(e,n,r){i=t(e,n,r),(i<s||i===1/0&&o===1/0)&&(o=e,s=i)});return o},_.shuffle=function(e){for(var t,n=N(e)?e:_.values(e),r=n.length,i=Array(r),o=0;o<r;o++)t=_.random(0,o),t!==o&&(i[o]=i[t]),i[t]=n[o];return i},_.sample=function(e,t,n){return null==t||n?(N(e)||(e=_.values(e)),e[_.random(e.length-1)]):_.shuffle(e).slice(0,Math.max(0,t))},_.sortBy=function(e,t,n){return t=E(t,n),_.pluck(_.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index}),"value")};var z=function(e){return function(t,n,r){var i={};return n=E(n,r),_.each(t,function(r,o){var s=n(r,o,t);e(i,r,s)}),i}};_.groupBy=z(function(e,t,n){_.has(e,n)?e[n].push(t):e[n]=[t]}),_.indexBy=z(function(e,t,n){e[n]=t}),_.countBy=z(function(e,t,n){_.has(e,n)?e[n]++:e[n]=1}),_.toArray=function(e){return e?_.isArray(e)?p.call(e):N(e)?_.map(e,_.identity):_.values(e):[]},_.size=function(e){return null==e?0:N(e)?e.length:_.keys(e).length},_.partition=function(e,t,n){t=E(t,n);var r=[],i=[];return _.each(e,function(e,n,o){(t(e,n,o)?r:i).push(e)}),[r,i]},_.first=_.head=_.take=function(e,t,n){if(null!=e)return null==t||n?e[0]:_.initial(e,e.length-t)},_.initial=function(e,t,n){return p.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},_.last=function(e,t,n){if(null!=e)return null==t||n?e[e.length-1]:_.rest(e,Math.max(0,e.length-t))},_.rest=_.tail=_.drop=function(e,t,n){return p.call(e,null==t||n?1:t)},_.compact=function(e){return _.filter(e,_.identity)};var O=function(e,t,n,r){for(var i=[],o=0,s=r||0,a=P(e);s<a;s++){var c=e[s];if(N(c)&&(_.isArray(c)||_.isArguments(c))){t||(c=O(c,t,n));var l=0,u=c.length;for(i.length+=u;l<u;)i[o++]=c[l++]}else n||(i[o++]=c)}return i};_.flatten=function(e,t){return O(e,t,!1)},_.without=function(e){return _.difference(e,p.call(arguments,1))},_.uniq=_.unique=function(e,t,n,r){_.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=E(n,r));for(var i=[],o=[],s=0,a=P(e);s<a;s++){var c=e[s],l=n?n(c,s,e):c;t?(s&&o===l||i.push(c),o=l):n?_.contains(o,l)||(o.push(l),i.push(c)):_.contains(i,c)||i.push(c)}return i},_.union=function(){return _.uniq(O(arguments,!0,!0))},_.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=P(e);r<i;r++){var o=e[r];if(!_.contains(t,o)){for(var s=1;s<n&&_.contains(arguments[s],o);s++);s===n&&t.push(o)}}return t},_.difference=function(e){var t=O(arguments,!0,!0,1);return _.filter(e,function(e){return!_.contains(t,e)})},_.zip=function(){return _.unzip(arguments)},_.unzip=function(e){for(var t=e&&_.max(e,P).length||0,n=Array(t),r=0;r<t;r++)n[r]=_.pluck(e,r);return n},_.object=function(e,t){for(var n={},r=0,i=P(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},_.findIndex=o(1),_.findLastIndex=o(-1),_.sortedIndex=function(e,t,n,r){n=E(n,r,1);for(var i=n(t),o=0,s=P(e);o<s;){var a=Math.floor((o+s)/2);n(e[a])<i?o=a+1:s=a}return o},_.indexOf=s(1,_.findIndex,_.sortedIndex),_.lastIndexOf=s(-1,_.findLastIndex),_.range=function(e,t,n){null==t&&(t=e||0,e=0),n=n||1;for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i};var R=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=k(e.prototype),s=e.apply(o,i);return _.isObject(s)?s:o};_.bind=function(e,t){if(b&&e.bind===b)return b.apply(e,p.call(arguments,1));if(!_.isFunction(e))throw new TypeError("Bind must be called on a function");var n=p.call(arguments,2),r=function(){return R(e,r,t,this,n.concat(p.call(arguments)))};return r},_.partial=function(e){var t=p.call(arguments,1),n=function(){for(var r=0,i=t.length,o=Array(i),s=0;s<i;s++)o[s]=t[s]===_?arguments[r++]:t[s];for(;r<arguments.length;)o.push(arguments[r++]);return R(e,n,this,this,o)};return n},_.bindAll=function(e){var t,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(t=1;t<r;t++)n=arguments[t],e[n]=_.bind(e[n],e);return e},_.memoize=function(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return _.has(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n},_.delay=function(e,t){var n=p.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},_.defer=_.partial(_.delay,_,1),_.throttle=function(e,t,n){var r,i,o,s=null,a=0;n||(n={});var c=function(){a=n.leading===!1?0:_.now(),s=null,o=e.apply(r,i),s||(r=i=null)};return function(){var l=_.now();a||n.leading!==!1||(a=l);var u=t-(l-a);return r=this,i=arguments,u<=0||u>t?(s&&(clearTimeout(s),s=null),a=l,o=e.apply(r,i),s||(r=i=null)):s||n.trailing===!1||(s=setTimeout(c,u)),o}},_.debounce=function(e,t,n){var r,i,o,s,a,c=function(){var l=_.now()-s;l<t&&l>=0?r=setTimeout(c,t-l):(r=null,n||(a=e.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=_.now();var l=n&&!r;return r||(r=setTimeout(c,t)),l&&(a=e.apply(o,i),o=i=null),a}},_.wrap=function(e,t){return _.partial(t,e)},_.negate=function(e){return function(){return!e.apply(this,arguments)}},_.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},_.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},_.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},_.once=_.partial(_.before,2);var I=!{toString:null}.propertyIsEnumerable("toString"),M=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];
_.keys=function(e){if(!_.isObject(e))return[];if(y)return y(e);var t=[];for(var n in e)_.has(e,n)&&t.push(n);return I&&a(e,t),t},_.allKeys=function(e){if(!_.isObject(e))return[];var t=[];for(var n in e)t.push(n);return I&&a(e,t),t},_.values=function(e){for(var t=_.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r},_.mapObject=function(e,t,n){t=E(t,n);for(var r,i=_.keys(e),o=i.length,s={},a=0;a<o;a++)r=i[a],s[r]=t(e[r],r,e);return s},_.pairs=function(e){for(var t=_.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r},_.invert=function(e){for(var t={},n=_.keys(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t},_.functions=_.methods=function(e){var t=[];for(var n in e)_.isFunction(e[n])&&t.push(n);return t.sort()},_.extend=T(_.allKeys),_.extendOwn=_.assign=T(_.keys),_.findKey=function(e,t,n){t=E(t,n);for(var r,i=_.keys(e),o=0,s=i.length;o<s;o++)if(r=i[o],t(e[r],r,e))return r},_.pick=function(e,t,n){var r,i,o={},s=e;if(null==s)return o;_.isFunction(t)?(i=_.allKeys(s),r=S(t,n)):(i=O(arguments,!1,!1,1),r=function(e,t,n){return t in n},s=Object(s));for(var a=0,c=i.length;a<c;a++){var l=i[a],u=s[l];r(u,l,s)&&(o[l]=u)}return o},_.omit=function(e,t,n){if(_.isFunction(t))t=_.negate(t);else{var r=_.map(O(arguments,!1,!1,1),String);t=function(e,t){return!_.contains(r,t)}}return _.pick(e,t,n)},_.defaults=T(_.allKeys,!0),_.create=function(e,t){var n=k(e);return t&&_.extendOwn(n,t),n},_.clone=function(e){return _.isObject(e)?_.isArray(e)?e.slice():_.extend({},e):e},_.tap=function(e,t){return t(e),e},_.isMatch=function(e,t){var n=_.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var s=n[o];if(t[s]!==i[s]||!(s in i))return!1}return!0};var j=function(e,t,n,r){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof _&&(e=e._wrapped),t instanceof _&&(t=t._wrapped);var i=m.call(e);if(i!==m.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var s=e.constructor,a=t.constructor;if(s!==a&&!(_.isFunction(s)&&s instanceof s&&_.isFunction(a)&&a instanceof a)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var c=n.length;c--;)if(n[c]===e)return r[c]===t;if(n.push(e),r.push(t),o){if(c=e.length,c!==t.length)return!1;for(;c--;)if(!j(e[c],t[c],n,r))return!1}else{var l,u=_.keys(e);if(c=u.length,_.keys(t).length!==c)return!1;for(;c--;)if(l=u[c],!_.has(t,l)||!j(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0};_.isEqual=function(e,t){return j(e,t)},_.isEmpty=function(e){return null==e||(N(e)&&(_.isArray(e)||_.isString(e)||_.isArguments(e))?0===e.length:0===_.keys(e).length)},_.isElement=function(e){return!(!e||1!==e.nodeType)},_.isArray=v||function(e){return"[object Array]"===m.call(e)},_.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},_.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){_["is"+e]=function(t){return m.call(t)==="[object "+e+"]"}}),_.isArguments(arguments)||(_.isArguments=function(e){return _.has(e,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(_.isFunction=function(e){return"function"==typeof e||!1}),_.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},_.isNaN=function(e){return _.isNumber(e)&&e!==+e},_.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===m.call(e)},_.isNull=function(e){return null===e},_.isUndefined=function(e){return void 0===e},_.has=function(e,t){return null!=e&&g.call(e,t)},_.noConflict=function(){return c._=l,this},_.identity=function(e){return e},_.constant=function(e){return function(){return e}},_.noop=function(){},_.property=A,_.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},_.matcher=_.matches=function(e){return e=_.extendOwn({},e),function(t){return _.isMatch(t,e)}},_.times=function(e,t,n){var r=Array(Math.max(0,e));t=S(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r},_.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},_.now=Date.now||function(){return(new Date).getTime()};var D={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},L=_.invert(D),B=function(e){var t=function(t){return e[t]},n="(?:"+_.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};_.escape=B(D),_.unescape=B(L),_.result=function(e,t,n){var r=null==e?void 0:e[t];return void 0===r&&(r=n),_.isFunction(r)?r.call(e):r};var U=0;_.uniqueId=function(e){var t=++U+"";return e?e+t:t},_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var F=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},H=/\\|'|\r|\n|\u2028|\u2029/g,$=function(e){return"\\"+q[e]};_.template=function(e,t,n){!t&&n&&(t=n),t=_.defaults({},t,_.templateSettings);var r=RegExp([(t.escape||F).source,(t.interpolate||F).source,(t.evaluate||F).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,function(t,n,r,s,a){return o+=e.slice(i,a).replace(H,$),i=a+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),t}),o+="';\n",t.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(t.variable||"obj","_",o)}catch(e){throw e.source=o,e}var a=function(e){return s.call(this,e,_)},c=t.variable||"obj";return a.source="function("+c+"){\n"+o+"}",a},_.chain=function(e){var t=_(e);return t._chain=!0,t};var W=function(e,t){return e._chain?_(t).chain():t};_.mixin=function(e){_.each(_.functions(e),function(t){var n=_[t]=e[t];_.prototype[t]=function(){var e=[this._wrapped];return f.apply(e,arguments),W(this,n.apply(_,e))}})},_.mixin(_),_.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=u[e];_.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],W(this,n)}}),_.each(["concat","join","slice"],function(e){var t=u[e];_.prototype[e]=function(){return W(this,t.apply(this._wrapped,arguments))}}),_.prototype.value=function(){return this._wrapped},_.prototype.valueOf=_.prototype.toJSON=_.prototype.value,_.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return _}.apply(t,r),!(void 0!==i&&(e.exports=i))}).call(this)},function(e,t,n){var r=(navigator.language||navigator.browserLanguage).slice(0,2),i={de:n(32),en:n(33),fr:n(34),ru:n(35)};e.exports=i[r]||i.en},function(e,t,n){function r(){a.isMobile=window.matchMedia("(max-width:1024px)").matches,a.isDesktop=!a.isMobile}var i=n(5),o=n(2),s=n(3),a={};a.isMac=/Mac/.test(navigator.platform),i(window).on("resize",r),r(),a.escapeRegExp=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};var c=3600,l=24*c,u=7*l,h=30.4*l,d=365*l,f=[{name:"yearsAgo",time:d},{name:"monthsAgo",time:h},{name:"weeksAgo",time:u},{name:"daysAgo",time:l},{name:"hoursAgo",time:c},{name:"minutesAgo",time:60},{name:"secondsAgo",time:1}];a.timeAgo=function(e){var t=(Date.now()-e)/1e3,n=o.find(f,function(e){return t>=e.time});if(n){var r=Math.round(t/n.time);return s[n.name](r)}},a.handleAppcacheUpdates=function(){var e=window.applicationCache;e&&e.addEventListener("updateready",function(t){e.status===e.UPDATEREADY&&window.confirm(s.updateCache)&&window.location.reload()},!1)},a.hotKey=a.isMac?"Alt":"Ctrl",e.exports=a},function(e,t,n){var r,i;/*!
* jQuery JavaScript Library v3.3.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2018-01-20T17:24Z
*/
!function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,o){"use strict";function s(e,t,n){t=t||ue;var r,i=t.createElement("script");if(i.text=e,n)for(r in Ee)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function a(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ge[ve.call(e)]||"object":typeof e}function c(e){var t=!!e&&"length"in e&&e.length,n=a(e);return!_e(e)&&!Se(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function l(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function u(e,t,n){return _e(t)?ke.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?ke.grep(e,function(e){return e===t!==n}):"string"!=typeof t?ke.grep(e,function(e){return me.call(t,e)>-1!==n}):ke.filter(t,e,n)}function h(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function d(e){var t={};return ke.each(e.match(Le)||[],function(e,n){t[n]=!0}),t}function f(e){return e}function p(e){throw e}function m(e,t,n,r){var i;try{e&&_e(i=e.promise)?i.call(e).done(t).fail(n):e&&_e(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function g(){ue.removeEventListener("DOMContentLoaded",g),n.removeEventListener("load",g),ke.ready()}function v(e,t){return t.toUpperCase()}function y(e){return e.replace(qe,"ms-").replace(He,v)}function b(){this.expando=ke.expando+b.uid++}function w(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Ve.test(e)?JSON.parse(e):e)}function x(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Ge,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n=w(n)}catch(e){}Je.set(e,t,n)}else n=void 0;return n}function _(e,t,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return ke.css(e,t,"")},c=a(),l=n&&n[3]||(ke.cssNumber[t]?"":"px"),u=(ke.cssNumber[t]||"px"!==l&&+c)&&Ke.exec(ke.css(e,t));if(u&&u[3]!==l){for(c/=2,l=l||u[3],u=+c||1;s--;)ke.style(e,t,u+l),(1-o)*(1-(o=a()/c||.5))<=0&&(s=0),u/=o;u*=2,ke.style(e,t,u+l),n=n||[]}return n&&(u=+u||+c||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=u,r.end=i)),i}function S(e){var t,n=e.ownerDocument,r=e.nodeName,i=et[r];return i?i:(t=n.body.appendChild(n.createElement(r)),i=ke.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),et[r]=i,i)}function E(e,t){for(var n,r,i=[],o=0,s=e.length;o<s;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=We.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Qe(r)&&(i[o]=S(r))):"none"!==n&&(i[o]="none",We.set(r,"display",n)));for(o=0;o<s;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function T(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&l(e,t)?ke.merge([e],n):n}function k(e,t){for(var n=0,r=e.length;n<r;n++)We.set(e[n],"globalEval",!t||We.get(t[n],"globalEval"))}function A(e,t,n,r,i){for(var o,s,c,l,u,h,d=t.createDocumentFragment(),f=[],p=0,m=e.length;p<m;p++)if(o=e[p],o||0===o)if("object"===a(o))ke.merge(f,o.nodeType?[o]:o);else if(ot.test(o)){for(s=s||d.appendChild(t.createElement("div")),c=(nt.exec(o)||["",""])[1].toLowerCase(),l=it[c]||it._default,s.innerHTML=l[1]+ke.htmlPrefilter(o)+l[2],h=l[0];h--;)s=s.lastChild;ke.merge(f,s.childNodes),s=d.firstChild,s.textContent=""}else f.push(t.createTextNode(o));for(d.textContent="",p=0;o=f[p++];)if(r&&ke.inArray(o,r)>-1)i&&i.push(o);else if(u=ke.contains(o.ownerDocument,o),s=T(d.appendChild(o),"script"),u&&k(s),n)for(h=0;o=s[h++];)rt.test(o.type||"")&&n.push(o);return d}function C(){return!0}function P(){return!1}function N(){try{return ue.activeElement}catch(e){}}function z(e,t,n,r,i,o){var s,a;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(a in t)z(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=P;else if(!i)return e;return 1===o&&(s=i,i=function(e){return ke().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=ke.guid++)),e.each(function(){ke.event.add(this,t,i,r,n)})}function O(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")?ke(e).children("tbody")[0]||e:e}function R(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function I(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function M(e,t){var n,r,i,o,s,a,c,l;if(1===t.nodeType){if(We.hasData(e)&&(o=We.access(e),s=We.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)ke.event.add(t,i,l[i][n])}Je.hasData(e)&&(a=Je.access(e),c=ke.extend({},a),Je.set(t,c))}}function j(e,t){var n=t.nodeName.toLowerCase();"input"===n&&tt.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function D(e,t,n,r){t=fe.apply([],t);var i,o,a,c,l,u,h=0,d=e.length,f=d-1,p=t[0],m=_e(p);if(m||d>1&&"string"==typeof p&&!xe.checkClone&&dt.test(p))return e.each(function(i){var o=e.eq(i);m&&(t[0]=p.call(this,i,o.html())),D(o,t,n,r)});if(d&&(i=A(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=ke.map(T(i,"script"),R),c=a.length;h<d;h++)l=i,h!==f&&(l=ke.clone(l,!0,!0),c&&ke.merge(a,T(l,"script"))),n.call(e[h],l,h);if(c)for(u=a[a.length-1].ownerDocument,ke.map(a,I),h=0;h<c;h++)l=a[h],rt.test(l.type||"")&&!We.access(l,"globalEval")&&ke.contains(u,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?ke._evalUrl&&ke._evalUrl(l.src):s(l.textContent.replace(ft,""),u,l))}return e}function L(e,t,n){for(var r,i=t?ke.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ke.cleanData(T(r)),r.parentNode&&(n&&ke.contains(r.ownerDocument,r)&&k(T(r,"script")),r.parentNode.removeChild(r));return e}function B(e,t,n){var r,i,o,s,a=e.style;return n=n||mt(e),n&&(s=n.getPropertyValue(t)||n[t],""!==s||ke.contains(e.ownerDocument,e)||(s=ke.style(e,t)),!xe.pixelBoxStyles()&&pt.test(s)&>.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function U(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function F(e){if(e in _t)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=xt.length;n--;)if(e=xt[n]+t,e in _t)return e}function q(e){var t=ke.cssProps[e];return t||(t=ke.cssProps[e]=F(e)||e),t}function H(e,t,n){var r=Ke.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function $(e,t,n,r,i,o){var s="width"===t?1:0,a=0,c=0;if(n===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(c+=ke.css(e,n+Xe[s],!0,i)),r?("content"===n&&(c-=ke.css(e,"padding"+Xe[s],!0,i)),"margin"!==n&&(c-=ke.css(e,"border"+Xe[s]+"Width",!0,i))):(c+=ke.css(e,"padding"+Xe[s],!0,i),"padding"!==n?c+=ke.css(e,"border"+Xe[s]+"Width",!0,i):a+=ke.css(e,"border"+Xe[s]+"Width",!0,i));return!r&&o>=0&&(c+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-c-a-.5))),c}function W(e,t,n){var r=mt(e),i=B(e,t,r),o="border-box"===ke.css(e,"boxSizing",!1,r),s=o;if(pt.test(i)){if(!n)return i;i="auto"}return s=s&&(xe.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===ke.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],s=!0),i=parseFloat(i)||0,i+$(e,t,n||(o?"border":"content"),s,r,i)+"px"}function J(e,t,n,r,i){return new J.prototype.init(e,t,n,r,i)}function V(){Et&&(ue.hidden===!1&&n.requestAnimationFrame?n.requestAnimationFrame(V):n.setTimeout(V,ke.fx.interval),ke.fx.tick())}function G(){return n.setTimeout(function(){St=void 0}),St=Date.now()}function Y(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=Xe[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function K(e,t,n){for(var r,i=(Z.tweeners[t]||[]).concat(Z.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,t,e))return r}function X(e,t,n){var r,i,o,s,a,c,l,u,h="width"in t||"height"in t,d=this,f={},p=e.style,m=e.nodeType&&Qe(e),g=We.get(e,"fxshow");n.queue||(s=ke._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,ke.queue(e,"fx").length||s.empty.fire()})}));for(r in t)if(i=t[r],Tt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;m=!0}f[r]=g&&g[r]||ke.style(e,r)}if(c=!ke.isEmptyObject(t),c||!ke.isEmptyObject(f)){h&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],l=g&&g.display,null==l&&(l=We.get(e,"display")),u=ke.css(e,"display"),"none"===u&&(l?u=l:(E([e],!0),l=e.style.display||l,u=ke.css(e,"display"),E([e]))),("inline"===u||"inline-block"===u&&null!=l)&&"none"===ke.css(e,"float")&&(c||(d.done(function(){p.display=l}),null==l&&(u=p.display,l="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),c=!1;for(r in f)c||(g?"hidden"in g&&(m=g.hidden):g=We.access(e,"fxshow",{display:l}),o&&(g.hidden=!m),m&&E([e],!0),d.done(function(){m||E([e]),We.remove(e,"fxshow");for(r in f)ke.style(e,r,f[r])})),c=K(m?g[r]:0,r,d),r in g||(g[r]=c.start,m&&(c.end=c.start,c.start=0))}}function Q(e,t){var n,r,i,o,s;for(n in e)if(r=y(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),s=ke.cssHooks[r],s&&"expand"in s){o=s.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function Z(e,t,n){var r,i,o=0,s=Z.prefilters.length,a=ke.Deferred().always(function(){delete c.elem}),c=function(){if(i)return!1;for(var t=St||G(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,s=0,c=l.tweens.length;s<c;s++)l.tweens[s].run(o);return a.notifyWith(e,[l,o,n]),o<1&&c?n:(c||a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:ke.extend({},t),opts:ke.extend(!0,{specialEasing:{},easing:ke.easing._default},n),originalProperties:t,originalOptions:n,startTime:St||G(),duration:n.duration,tweens:[],createTween:function(t,n){var r=ke.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l,t])):a.rejectWith(e,[l,t]),this}}),u=l.props;for(Q(u,l.opts.specialEasing);o<s;o++)if(r=Z.prefilters[o].call(l,e,u,l.opts))return _e(r.stop)&&(ke._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return ke.map(u,K,l),_e(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),ke.fx.timer(ke.extend(c,{elem:e,anim:l,queue:l.opts.queue})),l}function ee(e){var t=e.match(Le)||[];return t.join(" ")}function te(e){return e.getAttribute&&e.getAttribute("class")||""}function ne(e){return Array.isArray(e)?e:"string"==typeof e?e.match(Le)||[]:[]}function re(e,t,n,r){var i;if(Array.isArray(t))ke.each(t,function(t,i){n||Dt.test(e)?r(e,i):re(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==a(t))r(e,t);else for(i in t)re(e+"["+i+"]",t[i],n,r)}function ie(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(Le)||[];if(_e(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function oe(e,t,n,r){function i(a){var c;return o[a]=!0,ke.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||s||o[l]?s?!(c=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),c}var o={},s=e===Yt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function se(e,t){var n,r,i=ke.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ke.extend(!0,e,r),e}function ae(e,t,n){for(var r,i,o,s,a=e.contents,c=e.dataTypes;"*"===c[0];)c.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){c.unshift(i);break}if(c[0]in n)o=c[0];else{for(i in n){if(!c[0]||e.converters[i+" "+c[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==c[0]&&c.unshift(o),n[o]}function ce(e,t,n,r){var i,o,s,a,c,l={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!c&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=o,o=u.shift())if("*"===o)o=c;else if("*"!==c&&c!==o){if(s=l[c+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[c+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],u.unshift(a[1]));break}if(s!==!0)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+c+" to "+o}}}return{state:"success",data:t}}var le=[],ue=n.document,he=Object.getPrototypeOf,de=le.slice,fe=le.concat,pe=le.push,me=le.indexOf,ge={},ve=ge.toString,ye=ge.hasOwnProperty,be=ye.toString,we=be.call(Object),xe={},_e=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},Se=function(e){return null!=e&&e===e.window},Ee={type:!0,src:!0,noModule:!0},Te="3.3.1",ke=function(e,t){return new ke.fn.init(e,t)},Ae=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;ke.fn=ke.prototype={jquery:Te,constructor:ke,length:0,toArray:function(){return de.call(this)},get:function(e){return null==e?de.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ke.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ke.each(this,e)},map:function(e){return this.pushStack(ke.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(de.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:pe,sort:le.sort,splice:le.splice},ke.extend=ke.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,c=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||_e(s)||(s={}),a===c&&(s=this,a--);a<c;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(ke.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&ke.isPlainObject(n)?n:{},s[t]=ke.extend(l,o,r)):void 0!==r&&(s[t]=r));return s},ke.extend({expando:"jQuery"+(Te+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==ve.call(e))&&(!(t=he(e))||(n=ye.call(t,"constructor")&&t.constructor,"function"==typeof n&&be.call(n)===we))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){s(e)},each:function(e,t){var n,r=0;if(c(e))for(n=e.length;r<n&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(Ae,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ke.merge(n,"string"==typeof e?[e]:e):pe.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:me.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,s=e.length,a=!n;o<s;o++)r=!t(e[o],o),r!==a&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(c(e))for(r=e.length;o<r;o++)i=t(e[o],o,n),null!=i&&s.push(i);else for(o in e)i=t(e[o],o,n),null!=i&&s.push(i);return fe.apply([],s)},guid:1,support:xe}),"function"==typeof Symbol&&(ke.fn[Symbol.iterator]=le[Symbol.iterator]),ke.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ge["[object "+t+"]"]=t.toLowerCase()});var Ce=/*!
* Sizzle CSS Selector Engine v2.3.3
* https://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2016-08-08
*/
function(e){function t(e,t,n,r){var i,o,s,a,c,l,u,d=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!r&&((t?t.ownerDocument||t:F)!==R&&O(t),t=t||R,M)){if(11!==p&&(c=ve.exec(e)))if(i=c[1]){if(9===p){if(!(s=t.getElementById(i)))return n;if(s.id===i)return n.push(s),n}else if(d&&(s=d.getElementById(i))&&B(t,s)&&s.id===i)return n.push(s),n}else{if(c[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=c[3])&&_.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(_.qsa&&!J[e+" "]&&(!j||!j.test(e))){if(1!==p)d=t,u=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(xe,_e):t.setAttribute("id",a=U),l=k(e),o=l.length;o--;)l[o]="#"+a+" "+f(l[o]);u=l.join(","),d=ye.test(e)&&h(t.parentNode)||t}if(u)try{return Q.apply(n,d.querySelectorAll(u)),n}catch(e){}finally{a===U&&t.removeAttribute("id")}}}return C(e.replace(ae,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>S.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[U]=!0,e}function i(e){var t=R.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)S.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function c(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ee(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function h(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,i=t.next,o=i||r,s=n&&"parentNode"===o,a=H++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||s)return e(t,n,i);return!1}:function(t,n,c){var l,u,h,d=[q,a];if(c){for(;t=t[r];)if((1===t.nodeType||s)&&e(t,n,c))return!0}else for(;t=t[r];)if(1===t.nodeType||s)if(h=t[U]||(t[U]={}),u=h[t.uniqueID]||(h[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=u[o])&&l[0]===q&&l[1]===a)return d[2]=l[2];if(u[o]=d,d[2]=e(t,n,c))return!0}return!1}}function m(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function v(e,t,n,r,i){for(var o,s=[],a=0,c=e.length,l=null!=t;a<c;a++)(o=e[a])&&(n&&!n(o,r,i)||(s.push(o),l&&t.push(a)));return s}function y(e,t,n,i,o,s){return i&&!i[U]&&(i=y(i)),o&&!o[U]&&(o=y(o,s)),r(function(r,s,a,c){var l,u,h,d=[],f=[],p=s.length,m=r||g(t||"*",a.nodeType?[a]:a,[]),y=!e||!r&&t?m:v(m,d,e,a,c),b=n?o||(r?e:p||i)?[]:s:y;if(n&&n(y,b,a,c),i)for(l=v(b,f),i(l,[],a,c),u=l.length;u--;)(h=l[u])&&(b[f[u]]=!(y[f[u]]=h));if(r){if(o||e){if(o){for(l=[],u=b.length;u--;)(h=b[u])&&l.push(y[u]=h);o(null,b=[],l,c)}for(u=b.length;u--;)(h=b[u])&&(l=o?ee(r,h):d[u])>-1&&(r[l]=!(s[l]=h))}}else b=v(b===s?b.splice(p,b.length):b),o?o(null,s,b,c):Q.apply(s,b)})}function b(e){for(var t,n,r,i=e.length,o=S.relative[e[0].type],s=o||S.relative[" "],a=o?1:0,c=p(function(e){return e===t},s,!0),l=p(function(e){return ee(t,e)>-1},s,!0),u=[function(e,n,r){var i=!o&&(r||n!==P)||((t=n).nodeType?c(e,n,r):l(e,n,r));return t=null,i}];a<i;a++)if(n=S.relative[e[a].type])u=[p(m(u),n)];else{if(n=S.filter[e[a].type].apply(null,e[a].matches),n[U]){for(r=++a;r<i&&!S.relative[e[r].type];r++);return y(a>1&&m(u),a>1&&f(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a<r&&b(e.slice(a,r)),r<i&&b(e=e.slice(r)),r<i&&f(e))}u.push(n)}return m(u)}function w(e,n){var i=n.length>0,o=e.length>0,s=function(r,s,a,c,l){var u,h,d,f=0,p="0",m=r&&[],g=[],y=P,b=r||o&&S.find.TAG("*",l),w=q+=null==y?1:Math.random()||.1,x=b.length;for(l&&(P=s===R||s||l);p!==x&&null!=(u=b[p]);p++){if(o&&u){for(h=0,s||u.ownerDocument===R||(O(u),a=!M);d=e[h++];)if(d(u,s||R,a)){c.push(u);break}l&&(q=w)}i&&((u=!d&&u)&&f--,r&&m.push(u))}if(f+=p,i&&p!==f){for(h=0;d=n[h++];)d(m,g,s,a);if(r){if(f>0)for(;p--;)m[p]||g[p]||(g[p]=K.call(c));g=v(g)}Q.apply(c,g),l&&!r&&g.length>0&&f+n.length>1&&t.uniqueSort(c)}return l&&(q=w,P=y),m};return i?r(s):s}var x,_,S,E,T,k,A,C,P,N,z,O,R,I,M,j,D,L,B,U="sizzle"+1*new Date,F=e.document,q=0,H=0,$=n(),W=n(),J=n(),V=function(e,t){return e===t&&(z=!0),0},G={}.hasOwnProperty,Y=[],K=Y.pop,X=Y.push,Q=Y.push,Z=Y.slice,ee=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ie="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",oe=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",se=new RegExp(ne+"+","g"),ae=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ce=new RegExp("^"+ne+"*,"+ne+"*"),le=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ue=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),he=new RegExp(oe),de=new RegExp("^"+re+"$"),fe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,_e=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Se=function(){O()},Ee=p(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(Y=Z.call(F.childNodes),F.childNodes),Y[F.childNodes.length].nodeType}catch(e){Q={apply:Y.length?function(e,t){X.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}_=t.support={},T=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},O=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:F;return r!==R&&9===r.nodeType&&r.documentElement?(R=r,I=R.documentElement,M=!T(R),F!==R&&(n=R.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Se,!1):n.attachEvent&&n.attachEvent("onunload",Se)),_.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),_.getElementsByTagName=i(function(e){return e.appendChild(R.createComment("")),!e.getElementsByTagName("*").length}),_.getElementsByClassName=ge.test(R.getElementsByClassName),_.getById=i(function(e){return I.appendChild(e).id=U,!R.getElementsByName||!R.getElementsByName(U).length}),_.getById?(S.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}},S.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&M){var n=t.getElementById(e);return n?[n]:[]}}):(S.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},S.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&M){var n,r,i,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),S.find.TAG=_.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):_.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},S.find.CLASS=_.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&M)return t.getElementsByClassName(e)},D=[],j=[],(_.qsa=ge.test(R.querySelectorAll))&&(i(function(e){I.appendChild(e).innerHTML="<a id='"+U+"'></a><select id='"+U+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&j.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||j.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+U+"-]").length||j.push("~="),e.querySelectorAll(":checked").length||j.push(":checked"),e.querySelectorAll("a#"+U+"+*").length||j.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=R.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&j.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&j.push(":enabled",":disabled"),I.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&j.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),j.push(",.*:")})),(_.matchesSelector=ge.test(L=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&i(function(e){_.disconnectedMatch=L.call(e,"*"),L.call(e,"[s!='']:x"),D.push("!=",oe)}),j=j.length&&new RegExp(j.join("|")),D=D.length&&new RegExp(D.join("|")),t=ge.test(I.compareDocumentPosition),B=t||ge.test(I.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return z=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!_.sortDetached&&t.compareDocumentPosition(e)===n?e===R||e.ownerDocument===F&&B(F,e)?-1:t===R||t.ownerDocument===F&&B(F,t)?1:N?ee(N,e)-ee(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return z=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],c=[t];if(!i||!o)return e===R?-1:t===R?1:i?-1:o?1:N?ee(N,e)-ee(N,t):0;if(i===o)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;a[r]===c[r];)r++;return r?s(a[r],c[r]):a[r]===F?-1:c[r]===F?1:0},R):R},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==R&&O(e),n=n.replace(ue,"='$1']"),_.matchesSelector&&M&&!J[n+" "]&&(!D||!D.test(n))&&(!j||!j.test(n)))try{var r=L.call(e,n);if(r||_.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,R,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==R&&O(e),B(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==R&&O(e);var n=S.attrHandle[t.toLowerCase()],r=n&&G.call(S.attrHandle,t.toLowerCase())?n(e,t,!M):void 0;return void 0!==r?r:_.attributes||!M?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(xe,_e)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(z=!_.detectDuplicates,N=!_.sortStable&&e.slice(0),e.sort(V),z){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},E=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=E(t);return n},S=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&he.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(se," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,c){var l,u,h,d,f,p,m=o!==s?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!c&&!a,b=!1;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?g.firstChild:g.lastChild],s&&y){for(d=g,h=d[U]||(d[U]={}),u=h[d.uniqueID]||(h[d.uniqueID]={}),l=u[e]||[],f=l[0]===q&&l[1],b=f&&l[2],d=f&&g.childNodes[f];d=++f&&d&&d[m]||(b=f=0)||p.pop();)if(1===d.nodeType&&++b&&d===t){u[e]=[q,f,b];break}}else if(y&&(d=t,h=d[U]||(d[U]={}),u=h[d.uniqueID]||(h[d.uniqueID]={}),l=u[e]||[],f=l[0]===q&&l[1],b=f),b===!1)for(;(d=++f&&d&&d[m]||(b=f=0)||p.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&(h=d[U]||(d[U]={}),u=h[d.uniqueID]||(h[d.uniqueID]={}),u[e]=[q,b]),d!==t)););return b-=i,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,n){var i,o=S.pseudos[e]||S.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[U]?o(n):o.length>1?(i=[e,e,"",n],S.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),s=i.length;s--;)r=ee(e,i[s]),e[r]=!(t[r]=i[s])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=A(e.replace(ae,"$1"));return i[U]?r(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=M?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===I},focus:function(e){return e===R.activeElement&&(!R.hasFocus||R.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:l(!1),disabled:l(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!S.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},S.pseudos.nth=S.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})S.pseudos[x]=a(x);for(x in{submit:!0,reset:!0})S.pseudos[x]=c(x);return d.prototype=S.filters=S.pseudos,S.setFilters=new d,k=t.tokenize=function(e,n){var r,i,o,s,a,c,l,u=W[e+" "];if(u)return n?0:u.slice(0);for(a=e,c=[],l=S.preFilter;a;){r&&!(i=ce.exec(a))||(i&&(a=a.slice(i[0].length)||a),c.push(o=[])),r=!1,(i=le.exec(a))&&(r=i.shift(),o.push({value:r,type:i[0].replace(ae," ")}),a=a.slice(r.length));for(s in S.filter)!(i=fe[s].exec(a))||l[s]&&!(i=l[s](i))||(r=i.shift(),o.push({value:r,type:s,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?t.error(e):W(e,c).slice(0)},A=t.compile=function(e,t){var n,r=[],i=[],o=J[e+" "];if(!o){for(t||(t=k(e)),n=t.length;n--;)o=b(t[n]),o[U]?r.push(o):i.push(o);o=J(e,w(i,r)),o.selector=e}return o},C=t.select=function(e,t,n,r){var i,o,s,a,c,l="function"==typeof e&&e,u=!r&&k(e=l.selector||e);if(n=n||[],1===u.length){if(o=u[0]=u[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&9===t.nodeType&&M&&S.relative[o[1].type]){if(t=(S.find.ID(s.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(s=o[i],!S.relative[a=s.type]);)if((c=S.find[a])&&(r=c(s.matches[0].replace(be,we),ye.test(o[0].type)&&h(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return Q.apply(n,r),n;break}}return(l||A(e,u))(r,t,!M,n,!t||ye.test(e)&&h(t.parentNode)||t),n},_.sortStable=U.split("").sort(V).join("")===U,_.detectDuplicates=!!z,O(),_.sortDetached=i(function(e){return 1&e.compareDocumentPosition(R.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),_.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);ke.find=Ce,ke.expr=Ce.selectors,ke.expr[":"]=ke.expr.pseudos,ke.uniqueSort=ke.unique=Ce.uniqueSort,ke.text=Ce.getText,ke.isXMLDoc=Ce.isXML,ke.contains=Ce.contains,ke.escapeSelector=Ce.escape;var Pe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&ke(e).is(n))break;r.push(e)}return r},Ne=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},ze=ke.expr.match.needsContext,Oe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;ke.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ke.find.matchesSelector(r,e)?[r]:[]:ke.find.matches(e,ke.grep(t,function(e){return 1===e.nodeType}))},ke.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ke(e).filter(function(){for(t=0;t<r;t++)if(ke.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)ke.find(e,i[t],n);return r>1?ke.uniqueSort(n):n},filter:function(e){return this.pushStack(u(this,e||[],!1))},not:function(e){return this.pushStack(u(this,e||[],!0))},is:function(e){return!!u(this,"string"==typeof e&&ze.test(e)?ke(e):e||[],!1).length}});var Re,Ie=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Me=ke.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Re,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Ie.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ke?t[0]:t,ke.merge(this,ke.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:ue,!0)),Oe.test(r[1])&&ke.isPlainObject(t))for(r in t)_e(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=ue.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):_e(e)?void 0!==n.ready?n.ready(e):e(ke):ke.makeArray(e,this)};Me.prototype=ke.fn,Re=ke(ue);var je=/^(?:parents|prev(?:Until|All))/,De={children:!0,contents:!0,next:!0,prev:!0};ke.fn.extend({has:function(e){var t=ke(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ke.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],s="string"!=typeof e&&ke(e);if(!ze.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&ke.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?ke.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?me.call(ke(e),this[0]):me.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ke.uniqueSort(ke.merge(this.get(),ke(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ke.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Pe(e,"parentNode")},parentsUntil:function(e,t,n){return Pe(e,"parentNode",n)},next:function(e){return h(e,"nextSibling")},prev:function(e){return h(e,"previousSibling")},nextAll:function(e){return Pe(e,"nextSibling")},prevAll:function(e){return Pe(e,"previousSibling")},nextUntil:function(e,t,n){return Pe(e,"nextSibling",n)},prevUntil:function(e,t,n){return Pe(e,"previousSibling",n)},siblings:function(e){return Ne((e.parentNode||{}).firstChild,e)},children:function(e){return Ne(e.firstChild)},contents:function(e){return l(e,"iframe")?e.contentDocument:(l(e,"template")&&(e=e.content||e),ke.merge([],e.childNodes))}},function(e,t){ke.fn[e]=function(n,r){var i=ke.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ke.filter(r,i)),this.length>1&&(De[e]||ke.uniqueSort(i),je.test(e)&&i.reverse()),this.pushStack(i)}});var Le=/[^\x20\t\r\n\f]+/g;ke.Callbacks=function(e){e="string"==typeof e?d(e):ke.extend({},e);var t,n,r,i,o=[],s=[],c=-1,l=function(){for(i=i||e.once,r=t=!0;s.length;c=-1)for(n=s.shift();++c<o.length;)o[c].apply(n[0],n[1])===!1&&e.stopOnFalse&&(c=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},u={add:function(){return o&&(n&&!t&&(c=o.length-1,s.push(n)),function t(n){ke.each(n,function(n,r){_e(r)?e.unique&&u.has(r)||o.push(r):r&&r.length&&"string"!==a(r)&&t(r)})}(arguments),n&&!t&&l()),this},remove:function(){return ke.each(arguments,function(e,t){for(var n;(n=ke.inArray(t,o,n))>-1;)o.splice(n,1),n<=c&&c--}),this},has:function(e){return e?ke.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},ke.extend({Deferred:function(e){var t=[["notify","progress",ke.Callbacks("memory"),ke.Callbacks("memory"),2],["resolve","done",ke.Callbacks("once memory"),ke.Callbacks("once memory"),0,"resolved"],["reject","fail",ke.Callbacks("once memory"),ke.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return ke.Deferred(function(n){ke.each(t,function(t,r){var i=_e(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&_e(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){function o(e,t,r,i){return function(){var a=this,c=arguments,l=function(){var n,l;if(!(e<s)){if(n=r.apply(a,c),n===t.promise())throw new TypeError("Thenable self-resolution");l=n&&("object"==typeof n||"function"==typeof n)&&n.then,_e(l)?i?l.call(n,o(s,t,f,i),o(s,t,p,i)):(s++,l.call(n,o(s,t,f,i),o(s,t,p,i),o(s,t,f,t.notifyWith))):(r!==f&&(a=void 0,c=[n]),(i||t.resolveWith)(a,c))}},u=i?l:function(){try{l()}catch(n){ke.Deferred.exceptionHook&&ke.Deferred.exceptionHook(n,u.stackTrace),e+1>=s&&(r!==p&&(a=void 0,c=[n]),t.rejectWith(a,c))}};e?u():(ke.Deferred.getStackHook&&(u.stackTrace=ke.Deferred.getStackHook()),n.setTimeout(u))}}var s=0;return ke.Deferred(function(n){t[0][3].add(o(0,n,_e(i)?i:f,n.notifyWith)),t[1][3].add(o(0,n,_e(e)?e:f)),t[2][3].add(o(0,n,_e(r)?r:p))}).promise()},promise:function(e){return null!=e?ke.extend(e,i):i}},o={};return ke.each(t,function(e,n){var s=n[2],a=n[5];i[n[1]]=s.add,a&&s.add(function(){r=a},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=de.call(arguments),o=ke.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?de.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(m(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||_e(i[n]&&i[n].then)))return o.then();for(;n--;)m(i[n],s(n),o.reject);return o.promise()}});var Be=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ke.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Be.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},ke.readyException=function(e){n.setTimeout(function(){throw e})};var Ue=ke.Deferred();ke.fn.ready=function(e){return Ue.then(e).catch(function(e){ke.readyException(e)}),this},ke.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--ke.readyWait:ke.isReady)||(ke.isReady=!0,e!==!0&&--ke.readyWait>0||Ue.resolveWith(ue,[ke]))}}),ke.ready.then=Ue.then,"complete"===ue.readyState||"loading"!==ue.readyState&&!ue.documentElement.doScroll?n.setTimeout(ke.ready):(ue.addEventListener("DOMContentLoaded",g),n.addEventListener("load",g));var Fe=function(e,t,n,r,i,o,s){var c=0,l=e.length,u=null==n;if("object"===a(n)){i=!0;for(c in n)Fe(e,t,c,n[c],!0,o,s)}else if(void 0!==r&&(i=!0,_e(r)||(s=!0),u&&(s?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(ke(e),n)})),t))for(;c<l;c++)t(e[c],n,s?r:r.call(e[c],c,t(e[c],n)));return i?e:u?t.call(e):l?t(e[0],n):o},qe=/^-ms-/,He=/-([a-z])/g,$e=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};b.uid=1,b.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$e(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[y(t)]=n;else for(r in t)i[y(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][y(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(y):(t=y(t),t=t in r?[t]:t.match(Le)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||ke.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ke.isEmptyObject(t)}};var We=new b,Je=new b,Ve=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ge=/[A-Z]/g;ke.extend({hasData:function(e){return Je.hasData(e)||We.hasData(e)},data:function(e,t,n){return Je.access(e,t,n)},removeData:function(e,t){Je.remove(e,t)},_data:function(e,t,n){return We.access(e,t,n)},_removeData:function(e,t){We.remove(e,t)}}),ke.fn.extend({data:function(e,t){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(i=Je.get(o),1===o.nodeType&&!We.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=y(r.slice(5)),x(o,r,i[r])));We.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){Je.set(this,e)}):Fe(this,function(t){var n;if(o&&void 0===t){if(n=Je.get(o,e),void 0!==n)return n;if(n=x(o,e),void 0!==n)return n}else this.each(function(){Je.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Je.remove(this,e)})}}),ke.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=We.get(e,t),n&&(!r||Array.isArray(n)?r=We.access(e,t,ke.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ke.queue(e,t),r=n.length,i=n.shift(),o=ke._queueHooks(e,t),s=function(){ke.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return We.get(e,n)||We.access(e,n,{empty:ke.Callbacks("once memory").add(function(){We.remove(e,[t+"queue",n])})})}}),ke.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?ke.queue(this[0],e):void 0===t?this:this.each(function(){var n=ke.queue(this,e,t);ke._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&ke.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ke.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ke.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)n=We.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var Ye=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ke=new RegExp("^(?:([+-])=|)("+Ye+")([a-z%]*)$","i"),Xe=["Top","Right","Bottom","Left"],Qe=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&ke.contains(e.ownerDocument,e)&&"none"===ke.css(e,"display")},Ze=function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i},et={};ke.fn.extend({show:function(){return E(this,!0)},hide:function(){return E(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Qe(this)?ke(this).show():ke(this).hide()})}});var tt=/^(?:checkbox|radio)$/i,nt=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,rt=/^$|^module$|\/(?:java|ecma)script/i,it={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};it.optgroup=it.option,it.tbody=it.tfoot=it.colgroup=it.caption=it.thead,it.th=it.td;var ot=/<|&#?\w+;/;!function(){var e=ue.createDocumentFragment(),t=e.appendChild(ue.createElement("div")),n=ue.createElement("input");n.setAttribute("type","radio"),
n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),xe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",xe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var st=ue.documentElement,at=/^key/,ct=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,lt=/^([^.]*)(?:\.(.+)|)/;ke.event={global:{},add:function(e,t,n,r,i){var o,s,a,c,l,u,h,d,f,p,m,g=We.get(e);if(g)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&ke.find.matchesSelector(st,i),n.guid||(n.guid=ke.guid++),(c=g.events)||(c=g.events={}),(s=g.handle)||(s=g.handle=function(t){return"undefined"!=typeof ke&&ke.event.triggered!==t.type?ke.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Le)||[""],l=t.length;l--;)a=lt.exec(t[l])||[],f=m=a[1],p=(a[2]||"").split(".").sort(),f&&(h=ke.event.special[f]||{},f=(i?h.delegateType:h.bindType)||f,h=ke.event.special[f]||{},u=ke.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ke.expr.match.needsContext.test(i),namespace:p.join(".")},o),(d=c[f])||(d=c[f]=[],d.delegateCount=0,h.setup&&h.setup.call(e,r,p,s)!==!1||e.addEventListener&&e.addEventListener(f,s)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,u):d.push(u),ke.event.global[f]=!0)},remove:function(e,t,n,r,i){var o,s,a,c,l,u,h,d,f,p,m,g=We.hasData(e)&&We.get(e);if(g&&(c=g.events)){for(t=(t||"").match(Le)||[""],l=t.length;l--;)if(a=lt.exec(t[l])||[],f=m=a[1],p=(a[2]||"").split(".").sort(),f){for(h=ke.event.special[f]||{},f=(r?h.delegateType:h.bindType)||f,d=c[f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)u=d[o],!i&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(d.splice(o,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(e,u));s&&!d.length&&(h.teardown&&h.teardown.call(e,p,g.handle)!==!1||ke.removeEvent(e,f,g.handle),delete c[f])}else for(f in c)ke.event.remove(e,f+t[l],n,r,!0);ke.isEmptyObject(c)&&We.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=ke.event.fix(e),c=new Array(arguments.length),l=(We.get(this,"events")||{})[a.type]||[],u=ke.event.special[a.type]||{};for(c[0]=a,t=1;t<arguments.length;t++)c[t]=arguments[t];if(a.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,a)!==!1){for(s=ke.event.handlers.call(this,a,l),t=0;(i=s[t++])&&!a.isPropagationStopped();)for(a.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,r=((ke.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,c),void 0!==r&&(a.result=r)===!1&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,r,i,o,s,a=[],c=t.delegateCount,l=e.target;if(c&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||l.disabled!==!0)){for(o=[],s={},n=0;n<c;n++)r=t[n],i=r.selector+" ",void 0===s[i]&&(s[i]=r.needsContext?ke(i,this).index(l)>-1:ke.find(i,this,null,[l]).length),s[i]&&o.push(r);o.length&&a.push({elem:l,handlers:o})}return l=this,c<t.length&&a.push({elem:l,handlers:t.slice(c)}),a},addProp:function(e,t){Object.defineProperty(ke.Event.prototype,e,{enumerable:!0,configurable:!0,get:_e(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[ke.expando]?e:new ke.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==N()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===N()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&l(this,"input"))return this.click(),!1},_default:function(e){return l(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ke.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ke.Event=function(e,t){return this instanceof ke.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?C:P,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&ke.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),void(this[ke.expando]=!0)):new ke.Event(e,t)},ke.Event.prototype={constructor:ke.Event,isDefaultPrevented:P,isPropagationStopped:P,isImmediatePropagationStopped:P,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=C,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=C,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=C,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ke.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&at.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&ct.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},ke.event.addProp),ke.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){ke.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||ke.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),ke.fn.extend({on:function(e,t,n,r){return z(this,e,t,n,r)},one:function(e,t,n,r){return z(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ke(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=P),this.each(function(){ke.event.remove(this,e,n,t)})}});var ut=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ht=/<script|<style|<link/i,dt=/checked\s*(?:[^=]|=\s*.checked.)/i,ft=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;ke.extend({htmlPrefilter:function(e){return e.replace(ut,"<$1></$2>")},clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),c=ke.contains(e.ownerDocument,e);if(!(xe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ke.isXMLDoc(e)))for(s=T(a),o=T(e),r=0,i=o.length;r<i;r++)j(o[r],s[r]);if(t)if(n)for(o=o||T(e),s=s||T(a),r=0,i=o.length;r<i;r++)M(o[r],s[r]);else M(e,a);return s=T(a,"script"),s.length>0&&k(s,!c&&T(e,"script")),a},cleanData:function(e){for(var t,n,r,i=ke.event.special,o=0;void 0!==(n=e[o]);o++)if($e(n)){if(t=n[We.expando]){if(t.events)for(r in t.events)i[r]?ke.event.remove(n,r):ke.removeEvent(n,r,t.handle);n[We.expando]=void 0}n[Je.expando]&&(n[Je.expando]=void 0)}}}),ke.fn.extend({detach:function(e){return L(this,e,!0)},remove:function(e){return L(this,e)},text:function(e){return Fe(this,function(e){return void 0===e?ke.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return D(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=O(this,e);t.appendChild(e)}})},prepend:function(){return D(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=O(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return D(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return D(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ke.cleanData(T(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ke.clone(this,e,t)})},html:function(e){return Fe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ht.test(e)&&!it[(nt.exec(e)||["",""])[1].toLowerCase()]){e=ke.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(ke.cleanData(T(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return D(this,arguments,function(t){var n=this.parentNode;ke.inArray(this,e)<0&&(ke.cleanData(T(this)),n&&n.replaceChild(t,this))},e)}}),ke.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ke.fn[e]=function(e){for(var n,r=[],i=ke(e),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),ke(i[s])[t](n),pe.apply(r,n.get());return this.pushStack(r)}});var pt=new RegExp("^("+Ye+")(?!px)[a-z%]+$","i"),mt=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},gt=new RegExp(Xe.join("|"),"i");!function(){function e(){if(l){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",st.appendChild(c).appendChild(l);var e=n.getComputedStyle(l);r="1%"!==e.top,a=12===t(e.marginLeft),l.style.right="60%",s=36===t(e.right),i=36===t(e.width),l.style.position="absolute",o=36===l.offsetWidth||"absolute",st.removeChild(c),l=null}}function t(e){return Math.round(parseFloat(e))}var r,i,o,s,a,c=ue.createElement("div"),l=ue.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",xe.clearCloneStyle="content-box"===l.style.backgroundClip,ke.extend(xe,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),a},scrollboxSize:function(){return e(),o}}))}();var vt=/^(none|table(?!-c[ea]).+)/,yt=/^--/,bt={position:"absolute",visibility:"hidden",display:"block"},wt={letterSpacing:"0",fontWeight:"400"},xt=["Webkit","Moz","ms"],_t=ue.createElement("div").style;ke.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=B(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=y(t),c=yt.test(t),l=e.style;return c||(t=q(a)),s=ke.cssHooks[t]||ke.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:l[t]:(o=typeof n,"string"===o&&(i=Ke.exec(n))&&i[1]&&(n=_(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(ke.cssNumber[a]?"":"px")),xe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(c?l.setProperty(t,n):l[t]=n)),void 0)}},css:function(e,t,n,r){var i,o,s,a=y(t),c=yt.test(t);return c||(t=q(a)),s=ke.cssHooks[t]||ke.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=B(e,t,r)),"normal"===i&&t in wt&&(i=wt[t]),""===n||n?(o=parseFloat(i),n===!0||isFinite(o)?o||0:i):i}}),ke.each(["height","width"],function(e,t){ke.cssHooks[t]={get:function(e,n,r){if(n)return!vt.test(ke.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?W(e,t,r):Ze(e,bt,function(){return W(e,t,r)})},set:function(e,n,r){var i,o=mt(e),s="border-box"===ke.css(e,"boxSizing",!1,o),a=r&&$(e,t,r,s,o);return s&&xe.scrollboxSize()===o.position&&(a-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-$(e,t,"border",!1,o)-.5)),a&&(i=Ke.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=ke.css(e,t)),H(e,n,a)}}}),ke.cssHooks.marginLeft=U(xe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(B(e,"marginLeft"))||e.getBoundingClientRect().left-Ze(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ke.each({margin:"",padding:"",border:"Width"},function(e,t){ke.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Xe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(ke.cssHooks[e+t].set=H)}),ke.fn.extend({css:function(e,t){return Fe(this,function(e,t,n){var r,i,o={},s=0;if(Array.isArray(t)){for(r=mt(e),i=t.length;s<i;s++)o[t[s]]=ke.css(e,t[s],!1,r);return o}return void 0!==n?ke.style(e,t,n):ke.css(e,t)},e,t,arguments.length>1)}}),ke.Tween=J,J.prototype={constructor:J,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ke.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ke.cssNumber[n]?"":"px")},cur:function(){var e=J.propHooks[this.prop];return e&&e.get?e.get(this):J.propHooks._default.get(this)},run:function(e){var t,n=J.propHooks[this.prop];return this.options.duration?this.pos=t=ke.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):J.propHooks._default.set(this),this}},J.prototype.init.prototype=J.prototype,J.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ke.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){ke.fx.step[e.prop]?ke.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ke.cssProps[e.prop]]&&!ke.cssHooks[e.prop]?e.elem[e.prop]=e.now:ke.style(e.elem,e.prop,e.now+e.unit)}}},J.propHooks.scrollTop=J.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ke.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ke.fx=J.prototype.init,ke.fx.step={};var St,Et,Tt=/^(?:toggle|show|hide)$/,kt=/queueHooks$/;ke.Animation=ke.extend(Z,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return _(n.elem,e,Ke.exec(t),n),n}]},tweener:function(e,t){_e(e)?(t=e,e=["*"]):e=e.match(Le);for(var n,r=0,i=e.length;r<i;r++)n=e[r],Z.tweeners[n]=Z.tweeners[n]||[],Z.tweeners[n].unshift(t)},prefilters:[X],prefilter:function(e,t){t?Z.prefilters.unshift(e):Z.prefilters.push(e)}}),ke.speed=function(e,t,n){var r=e&&"object"==typeof e?ke.extend({},e):{complete:n||!n&&t||_e(e)&&e,duration:e,easing:n&&t||t&&!_e(t)&&t};return ke.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in ke.fx.speeds?r.duration=ke.fx.speeds[r.duration]:r.duration=ke.fx.speeds._default),null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(){_e(r.old)&&r.old.call(this),r.queue&&ke.dequeue(this,r.queue)},r},ke.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Qe).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=ke.isEmptyObject(e),o=ke.speed(t,n,r),s=function(){var t=Z(this,ke.extend({},e),o);(i||We.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=ke.timers,s=We.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&kt.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||ke.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=We.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=ke.timers,s=r?r.length:0;for(n.finish=!0,ke.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),ke.each(["toggle","show","hide"],function(e,t){var n=ke.fn[t];ke.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(Y(t,!0),e,r,i)}}),ke.each({slideDown:Y("show"),slideUp:Y("hide"),slideToggle:Y("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ke.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),ke.timers=[],ke.fx.tick=function(){var e,t=0,n=ke.timers;for(St=Date.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||ke.fx.stop(),St=void 0},ke.fx.timer=function(e){ke.timers.push(e),ke.fx.start()},ke.fx.interval=13,ke.fx.start=function(){Et||(Et=!0,V())},ke.fx.stop=function(){Et=null},ke.fx.speeds={slow:600,fast:200,_default:400},ke.fn.delay=function(e,t){return e=ke.fx?ke.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,r){var i=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(i)}})},function(){var e=ue.createElement("input"),t=ue.createElement("select"),n=t.appendChild(ue.createElement("option"));e.type="checkbox",xe.checkOn=""!==e.value,xe.optSelected=n.selected,e=ue.createElement("input"),e.value="t",e.type="radio",xe.radioValue="t"===e.value}();var At,Ct=ke.expr.attrHandle;ke.fn.extend({attr:function(e,t){return Fe(this,ke.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ke.removeAttr(this,e)})}}),ke.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ke.prop(e,t,n):(1===o&&ke.isXMLDoc(e)||(i=ke.attrHooks[t.toLowerCase()]||(ke.expr.match.bool.test(t)?At:void 0)),void 0!==n?null===n?void ke.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=ke.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!xe.radioValue&&"radio"===t&&l(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Le);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),At={set:function(e,t,n){return t===!1?ke.removeAttr(e,n):e.setAttribute(n,n),n}},ke.each(ke.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Ct[t]||ke.find.attr;Ct[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=Ct[s],Ct[s]=i,i=null!=n(e,t,r)?s:null,Ct[s]=o),i}});var Pt=/^(?:input|select|textarea|button)$/i,Nt=/^(?:a|area)$/i;ke.fn.extend({prop:function(e,t){return Fe(this,ke.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ke.propFix[e]||e]})}}),ke.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ke.isXMLDoc(e)||(t=ke.propFix[t]||t,i=ke.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ke.find.attr(e,"tabindex");return t?parseInt(t,10):Pt.test(e.nodeName)||Nt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),xe.optSelected||(ke.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ke.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ke.propFix[this.toLowerCase()]=this}),ke.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,c=0;if(_e(e))return this.each(function(t){ke(this).addClass(e.call(this,t,te(this)))});if(t=ne(e),t.length)for(;n=this[c++];)if(i=te(n),r=1===n.nodeType&&" "+ee(i)+" "){for(s=0;o=t[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");a=ee(r),i!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,c=0;if(_e(e))return this.each(function(t){ke(this).removeClass(e.call(this,t,te(this)))});if(!arguments.length)return this.attr("class","");if(t=ne(e),t.length)for(;n=this[c++];)if(i=te(n),r=1===n.nodeType&&" "+ee(i)+" "){for(s=0;o=t[s++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");a=ee(r),i!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):_e(e)?this.each(function(n){ke(this).toggleClass(e.call(this,n,te(this),t),t)}):this.each(function(){var t,i,o,s;if(r)for(i=0,o=ke(this),s=ne(e);t=s[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||(t=te(this),t&&We.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":We.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+ee(te(n))+" ").indexOf(t)>-1)return!0;return!1}});var zt=/\r/g;ke.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=_e(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,ke(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=ke.map(i,function(e){return null==e?"":e+""})),t=ke.valHooks[this.type]||ke.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=ke.valHooks[i.type]||ke.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(zt,""):null==n?"":n)}}}),ke.extend({valHooks:{option:{get:function(e){var t=ke.find.attr(e,"value");return null!=t?t:ee(ke.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],c=s?o+1:i.length;for(r=o<0?c:s?o:0;r<c;r++)if(n=i[r],(n.selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!l(n.parentNode,"optgroup"))){if(t=ke(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=ke.makeArray(t),s=i.length;s--;)r=i[s],(r.selected=ke.inArray(ke.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ke.each(["radio","checkbox"],function(){ke.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=ke.inArray(ke(e).val(),t)>-1}},xe.checkOn||(ke.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),xe.focusin="onfocusin"in n;var Ot=/^(?:focusinfocus|focusoutblur)$/,Rt=function(e){e.stopPropagation()};ke.extend(ke.event,{trigger:function(e,t,r,i){var o,s,a,c,l,u,h,d,f=[r||ue],p=ye.call(e,"type")?e.type:e,m=ye.call(e,"namespace")?e.namespace.split("."):[];if(s=d=a=r=r||ue,3!==r.nodeType&&8!==r.nodeType&&!Ot.test(p+ke.event.triggered)&&(p.indexOf(".")>-1&&(m=p.split("."),p=m.shift(),m.sort()),l=p.indexOf(":")<0&&"on"+p,e=e[ke.expando]?e:new ke.Event(p,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:ke.makeArray(t,[e]),h=ke.event.special[p]||{},i||!h.trigger||h.trigger.apply(r,t)!==!1)){if(!i&&!h.noBubble&&!Se(r)){for(c=h.delegateType||p,Ot.test(c+p)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(r.ownerDocument||ue)&&f.push(a.defaultView||a.parentWindow||n)}for(o=0;(s=f[o++])&&!e.isPropagationStopped();)d=s,e.type=o>1?c:h.bindType||p,u=(We.get(s,"events")||{})[e.type]&&We.get(s,"handle"),u&&u.apply(s,t),u=l&&s[l],u&&u.apply&&$e(s)&&(e.result=u.apply(s,t),e.result===!1&&e.preventDefault());return e.type=p,i||e.isDefaultPrevented()||h._default&&h._default.apply(f.pop(),t)!==!1||!$e(r)||l&&_e(r[p])&&!Se(r)&&(a=r[l],a&&(r[l]=null),ke.event.triggered=p,e.isPropagationStopped()&&d.addEventListener(p,Rt),r[p](),e.isPropagationStopped()&&d.removeEventListener(p,Rt),ke.event.triggered=void 0,a&&(r[l]=a)),e.result}},simulate:function(e,t,n){var r=ke.extend(new ke.Event,n,{type:e,isSimulated:!0});ke.event.trigger(r,null,t)}}),ke.fn.extend({trigger:function(e,t){return this.each(function(){ke.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ke.event.trigger(e,t,n,!0)}}),xe.focusin||ke.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ke.event.simulate(t,e.target,ke.event.fix(e))};ke.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=We.access(r,t);i||r.addEventListener(e,n,!0),We.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=We.access(r,t)-1;i?We.access(r,t,i):(r.removeEventListener(e,n,!0),We.remove(r,t))}}});var It=n.location,Mt=Date.now(),jt=/\?/;ke.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||ke.error("Invalid XML: "+e),t};var Dt=/\[\]$/,Lt=/\r?\n/g,Bt=/^(?:submit|button|image|reset|file)$/i,Ut=/^(?:input|select|textarea|keygen)/i;ke.param=function(e,t){var n,r=[],i=function(e,t){var n=_e(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!ke.isPlainObject(e))ke.each(e,function(){i(this.name,this.value)});else for(n in e)re(n,e[n],t,i);return r.join("&")},ke.fn.extend({serialize:function(){return ke.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ke.prop(this,"elements");return e?ke.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ke(this).is(":disabled")&&Ut.test(this.nodeName)&&!Bt.test(e)&&(this.checked||!tt.test(e))}).map(function(e,t){var n=ke(this).val();return null==n?null:Array.isArray(n)?ke.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Ft=/%20/g,qt=/#.*$/,Ht=/([?&])_=[^&]*/,$t=/^(.*?):[ \t]*([^\r\n]*)$/gm,Wt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Jt=/^(?:GET|HEAD)$/,Vt=/^\/\//,Gt={},Yt={},Kt="*/".concat("*"),Xt=ue.createElement("a");Xt.href=It.href,ke.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:It.href,type:"GET",isLocal:Wt.test(It.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ke.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?se(se(e,ke.ajaxSettings),t):se(ke.ajaxSettings,e)},ajaxPrefilter:ie(Gt),ajaxTransport:ie(Yt),ajax:function(e,t){function r(e,t,r,a){var l,d,f,w,x,_=t;u||(u=!0,c&&n.clearTimeout(c),i=void 0,s=a||"",S.readyState=e>0?4:0,l=e>=200&&e<300||304===e,r&&(w=ae(p,S,r)),w=ce(p,w,S,l),l?(p.ifModified&&(x=S.getResponseHeader("Last-Modified"),x&&(ke.lastModified[o]=x),x=S.getResponseHeader("etag"),x&&(ke.etag[o]=x)),204===e||"HEAD"===p.type?_="nocontent":304===e?_="notmodified":(_=w.state,d=w.data,f=w.error,l=!f)):(f=_,!e&&_||(_="error",e<0&&(e=0))),S.status=e,S.statusText=(t||_)+"",l?v.resolveWith(m,[d,_,S]):v.rejectWith(m,[S,_,f]),S.statusCode(b),b=void 0,h&&g.trigger(l?"ajaxSuccess":"ajaxError",[S,p,l?d:f]),y.fireWith(m,[S,_]),h&&(g.trigger("ajaxComplete",[S,p]),--ke.active||ke.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,o,s,a,c,l,u,h,d,f,p=ke.ajaxSetup({},t),m=p.context||p,g=p.context&&(m.nodeType||m.jquery)?ke(m):ke.event,v=ke.Deferred(),y=ke.Callbacks("once memory"),b=p.statusCode||{},w={},x={},_="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=$t.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(e,t){return null==u&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==u&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)S.always(e[S.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||_;return i&&i.abort(t),r(0,t),this}};if(v.promise(S),p.url=((e||p.url||It.href)+"").replace(Vt,It.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(Le)||[""],null==p.crossDomain){l=ue.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Xt.protocol+"//"+Xt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=ke.param(p.data,p.traditional)),oe(Gt,p,t,S),u)return S;h=ke.event&&p.global,h&&0===ke.active++&&ke.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Jt.test(p.type),o=p.url.replace(qt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ft,"+")):(f=p.url.slice(o.length),p.data&&(p.processData||"string"==typeof p.data)&&(o+=(jt.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(o=o.replace(Ht,"$1"),f=(jt.test(o)?"&":"?")+"_="+Mt++ +f),p.url=o+f),p.ifModified&&(ke.lastModified[o]&&S.setRequestHeader("If-Modified-Since",ke.lastModified[o]),ke.etag[o]&&S.setRequestHeader("If-None-Match",ke.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||t.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Kt+"; q=0.01":""):p.accepts["*"]);for(d in p.headers)S.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(p.beforeSend.call(m,S,p)===!1||u))return S.abort();if(_="abort",y.add(p.complete),S.done(p.success),S.fail(p.error),i=oe(Yt,p,t,S)){if(S.readyState=1,h&&g.trigger("ajaxSend",[S,p]),u)return S;p.async&&p.timeout>0&&(c=n.setTimeout(function(){S.abort("timeout")},p.timeout));try{u=!1,i.send(w,r)}catch(e){if(u)throw e;r(-1,e)}}else r(-1,"No Transport");return S},getJSON:function(e,t,n){return ke.get(e,t,n,"json")},getScript:function(e,t){return ke.get(e,void 0,t,"script")}}),ke.each(["get","post"],function(e,t){ke[t]=function(e,n,r,i){return _e(n)&&(i=i||r,r=n,n=void 0),ke.ajax(ke.extend({url:e,type:t,dataType:i,data:n,success:r},ke.isPlainObject(e)&&e))}}),ke._evalUrl=function(e){return ke.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},ke.fn.extend({wrapAll:function(e){var t;return this[0]&&(_e(e)&&(e=e.call(this[0])),t=ke(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return _e(e)?this.each(function(t){ke(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ke(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=_e(e);return this.each(function(n){ke(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ke(this).replaceWith(this.childNodes)}),this}}),ke.expr.pseudos.hidden=function(e){return!ke.expr.pseudos.visible(e)},ke.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ke.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Qt={0:200,1223:204},Zt=ke.ajaxSettings.xhr();xe.cors=!!Zt&&"withCredentials"in Zt,xe.ajax=Zt=!!Zt,ke.ajaxTransport(function(e){var t,r;if(xe.cors||Zt&&!e.crossDomain)return{send:function(i,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),
e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(s in i)a.setRequestHeader(s,i[s]);t=function(e){return function(){t&&(t=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Qt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),r=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),ke.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ke.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ke.globalEval(e),e}}}),ke.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ke.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=ke("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),ue.head.appendChild(t[0])},abort:function(){n&&n()}}}});var en=[],tn=/(=)\?(?=&|$)|\?\?/;ke.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=en.pop()||ke.expando+"_"+Mt++;return this[e]=!0,e}}),ke.ajaxPrefilter("json jsonp",function(e,t,r){var i,o,s,a=e.jsonp!==!1&&(tn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&tn.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=_e(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(tn,"$1"+i):e.jsonp!==!1&&(e.url+=(jt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return s||ke.error(i+" was not called"),s[0]},e.dataTypes[0]="json",o=n[i],n[i]=function(){s=arguments},r.always(function(){void 0===o?ke(n).removeProp(i):n[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,en.push(i)),s&&_e(o)&&o(s[0]),s=o=void 0}),"script"}),xe.createHTMLDocument=function(){var e=ue.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),ke.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(xe.createHTMLDocument?(t=ue.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=ue.location.href,t.head.appendChild(r)):t=ue),i=Oe.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=A([e],t,o),o&&o.length&&ke(o).remove(),ke.merge([],i.childNodes))},ke.fn.load=function(e,t,n){var r,i,o,s=this,a=e.indexOf(" ");return a>-1&&(r=ee(e.slice(a)),e=e.slice(0,a)),_e(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),s.length>0&&ke.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?ke("<div>").append(ke.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ke.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ke.fn[t]=function(e){return this.on(t,e)}}),ke.expr.pseudos.animated=function(e){return ke.grep(ke.timers,function(t){return e===t.elem}).length},ke.offset={setOffset:function(e,t,n){var r,i,o,s,a,c,l,u=ke.css(e,"position"),h=ke(e),d={};"static"===u&&(e.style.position="relative"),a=h.offset(),o=ke.css(e,"top"),c=ke.css(e,"left"),l=("absolute"===u||"fixed"===u)&&(o+c).indexOf("auto")>-1,l?(r=h.position(),s=r.top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(c)||0),_e(t)&&(t=t.call(e,n,ke.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+i),"using"in t?t.using.call(e,d):h.css(d)}},ke.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ke.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ke.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===ke.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&(i=ke(e).offset(),i.top+=ke.css(e,"borderTopWidth",!0),i.left+=ke.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ke.css(r,"marginTop",!0),left:t.left-i.left-ke.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===ke.css(e,"position");)e=e.offsetParent;return e||st})}}),ke.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;ke.fn[e]=function(r){return Fe(this,function(e,r,i){var o;return Se(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i?o?o[t]:e[r]:void(o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i)},e,r,arguments.length)}}),ke.each(["top","left"],function(e,t){ke.cssHooks[t]=U(xe.pixelPosition,function(e,n){if(n)return n=B(e,t),pt.test(n)?ke(e).position()[t]+"px":n})}),ke.each({Height:"height",Width:"width"},function(e,t){ke.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){ke.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(i===!0||o===!0?"margin":"border");return Fe(this,function(t,n,i){var o;return Se(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?ke.css(t,n,a):ke.style(t,n,i,a)},t,s?i:void 0,s)}})}),ke.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){ke.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ke.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ke.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),ke.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),_e(e))return r=de.call(arguments,2),i=function(){return e.apply(t||this,r.concat(de.call(arguments)))},i.guid=e.guid=e.guid||ke.guid++,i},ke.holdReady=function(e){e?ke.readyWait++:ke.ready(!0)},ke.isArray=Array.isArray,ke.parseJSON=JSON.parse,ke.nodeName=l,ke.isFunction=_e,ke.isWindow=Se,ke.camelCase=y,ke.type=a,ke.now=Date.now,ke.isNumeric=function(e){var t=ke.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},r=[],i=function(){return ke}.apply(t,r),!(void 0!==i&&(e.exports=i));var nn=n.jQuery,rn=n.$;return ke.noConflict=function(e){return n.$===ke&&(n.$=rn),e&&n.jQuery===ke&&(n.jQuery=nn),ke},o||(n.jQuery=n.$=ke),ke})},function(e,t,n){var r;r=function(e){function t(e,t,n){var c,l=a.Deferred();switch(e){case"read":c=void 0!==t.id?r(t):i(t);break;case"create":c=o(t);break;case"update":c=o(t);break;case"delete":c=s(t)}return c.then(function(e){n.success(e),n.complete&&n.complete(e),l.resolve(e)},function(e){n.error(e),n.complete&&n.complete(e),l.reject(e)}),l}function r(e){return e.collection.remote.get(e.id)}function i(e){return e.remote.getAll().then(function(e){return c.values(e)})}function o(e){return e.collection.remote.set(e.id,e.toJSON()).then(function(){return e.toJSON()})}function s(e){return e.collection.remote.remove(e.id.toString()).then(function(){return e.toJSON()})}var a=n(5),c=n(2);return t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){function r(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[r+a]=s[a];return t||o(s)}var i=n(25),o=n(24);e.exports=r},function(e,t,n){var r=n(2),i=n(1),o=n(6),s=n(4).timeAgo,a=i.Model.extend({defaults:{title:"",content:"",lastEdited:null,public:null,cursorPos:0},sync:o,isEmpty:function(){return""===this.get("content").trim()},updateLastEdited:function(e){e.changed.id||e.set("lastEdited",(new Date).getTime())},updateTitle:function(e){var t=e.get("content").match(/[^\s].{0,40}/);e.set("title",t?t[0]:"")},getUrl:function(){var e=this.get("title").toLowerCase().replace(/\s| /g,"-").replace(/"|’|'|,|\//g,"");return e?"!("+this.id+")-"+encodeURI(e):""},getOpacity:function(){var e=(new Date).getTime()-this.get("lastEdited"),t=7776e6,n=e>t?.4:Math.round(100*(.4+(t-e)/t*.6))/100;return n},throttledSave:r.throttle(function(){this.save()},1e3),formatDate:function(){return s(this.get("lastEdited"))}});e.exports=a},function(e,t,n){var r,i;(function(n,o){"use strict";var s=s||function(e){var t={element:null,dragger:null,disable:"none",addBodyClasses:!0,hyperextensible:!0,resistance:.5,flickThreshold:50,transitionSpeed:.3,easing:"ease",maxPosition:266,minPosition:-266,tapToClose:!0,touchToDrag:!0,slideIntent:40,minDragDistance:5},r={simpleStates:{opening:null,towards:null,hyperExtending:null,halfway:null,flick:null,translation:{absolute:0,relative:0,sinceDirectionChange:0,percentage:0}}},i={},s={hasTouch:"ontouchstart"in o.documentElement||n.navigator.msPointerEnabled,eventType:function(e){var t={down:s.hasTouch?"touchstart":"mousedown",move:s.hasTouch?"touchmove":"mousemove",up:s.hasTouch?"touchend":"mouseup",out:s.hasTouch?"touchcancel":"mouseout"};return t[e]},page:function(e,t){return s.hasTouch&&t.touches.length&&t.touches[0]?t.touches[0]["page"+e]:t["page"+e]},klass:{has:function(e,t){return e.className.indexOf(t)!==-1},add:function(e,n){!s.klass.has(e,n)&&t.addBodyClasses&&(e.className+=" "+n)},remove:function(e,n){t.addBodyClasses&&(e.className=e.className.replace(n,"").replace(/^\s+|\s+$/g,""))}},dispatchEvent:function(e){if("function"==typeof i[e])return i[e].call()},vendor:function(){var e,t=o.createElement("div"),n="webkit Moz O ms".split(" ");for(e in n)if("undefined"!=typeof t.style[n[e]+"Transition"])return n[e]},transitionCallback:function(){return"Moz"===r.vendor||"ms"===r.vendor?"transitionend":r.vendor+"TransitionEnd"},canTransform:function(){return"undefined"!=typeof t.element.style[r.vendor+"Transform"]},deepExtend:function(e,t){var n;for(n in t)t[n]&&t[n].constructor&&t[n].constructor===Object?(e[n]=e[n]||{},s.deepExtend(e[n],t[n])):e[n]=t[n];return e},angleOfDrag:function(e,t){var n,i;return i=Math.atan2(-(r.startDragY-t),r.startDragX-e),i<0&&(i+=2*Math.PI),n=Math.floor(i*(180/Math.PI)-180),n<0&&n>-180&&(n=360-Math.abs(n)),Math.abs(n)},events:{addEvent:function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):void 0},removeEvent:function(e,t,n){return e.addEventListener?e.removeEventListener(t,n,!1):e.attachEvent?e.detachEvent("on"+t,n):void 0},prevent:function(e){e.preventDefault?e.preventDefault():e.returnValue=!1}},parentUntil:function(e,t){for(var n="string"==typeof t;e.parentNode;){if(n&&e.getAttribute&&e.getAttribute(t))return e;if(!n&&e===t)return e;e=e.parentNode}return null}},a={translate:{get:{matrix:function(e){if(s.canTransform()){var i=n.getComputedStyle(t.element)[r.vendor+"Transform"].match(/\((.*)\)/),o=8;return i?(i=i[1].split(","),16===i.length&&(e+=o),parseInt(i[e],10)):0}return parseInt(t.element.style.left,10)}},easeCallback:function(){t.element.style[r.vendor+"Transition"]="",r.translation=a.translate.get.matrix(4),r.easing=!1,clearInterval(r.animatingInterval),0===r.easingTo&&(s.klass.remove(o.body,"snapjs-right"),s.klass.remove(o.body,"snapjs-left")),s.dispatchEvent("animated"),s.events.removeEvent(t.element,s.transitionCallback(),a.translate.easeCallback)},easeTo:function(e){s.canTransform()?(r.easing=!0,r.easingTo=e,t.element.style[r.vendor+"Transition"]="all "+t.transitionSpeed+"s "+t.easing,r.animatingInterval=setInterval(function(){s.dispatchEvent("animating")},1),s.events.addEvent(t.element,s.transitionCallback(),a.translate.easeCallback),a.translate.x(e)):(r.translation=e,a.translate.x(e)),0===e&&(t.element.style[r.vendor+"Transform"]="")},x:function(e){if(!("left"===t.disable&&e>0||"right"===t.disable&&e<0))if(t.hyperextensible||(e===t.maxPosition||e>t.maxPosition?e=t.maxPosition:(e===t.minPosition||e<t.minPosition)&&(e=t.minPosition)),e=parseInt(e,10),isNaN(e)&&(e=0),s.canTransform()){var i="translate3d("+e+"px, 0,0)";t.element.style[r.vendor+"Transform"]=i}else t.element.style.width=(n.innerWidth||o.documentElement.clientWidth)+"px",t.element.style.left=e+"px",t.element.style.right=""}},drag:{listen:function(){r.translation=0,r.easing=!1,s.events.addEvent(t.element,s.eventType("down"),a.drag.startDrag),s.events.addEvent(t.element,s.eventType("move"),a.drag.dragging),s.events.addEvent(t.element,s.eventType("up"),a.drag.endDrag)},stopListening:function(){s.events.removeEvent(t.element,s.eventType("down"),a.drag.startDrag),s.events.removeEvent(t.element,s.eventType("move"),a.drag.dragging),s.events.removeEvent(t.element,s.eventType("up"),a.drag.endDrag)},startDrag:function(e){var n=e.target?e.target:e.srcElement,i=s.parentUntil(n,"data-snap-ignore");if(i)return void s.dispatchEvent("ignore");if(t.dragger){var o=s.parentUntil(n,t.dragger);if(!o&&r.translation!==t.minPosition&&r.translation!==t.maxPosition)return}s.dispatchEvent("start"),t.element.style[r.vendor+"Transition"]="",r.isDragging=!0,r.hasIntent=null,r.intentChecked=!1,r.startDragX=s.page("X",e),r.startDragY=s.page("Y",e),r.dragWatchers={current:0,last:0,hold:0,state:""},r.simpleStates={opening:null,towards:null,hyperExtending:null,halfway:null,flick:null,translation:{absolute:0,relative:0,sinceDirectionChange:0,percentage:0}}},dragging:function(e){if(r.isDragging&&t.touchToDrag){var n,i=s.page("X",e),c=s.page("Y",e),l=r.translation,u=a.translate.get.matrix(4),h=i-r.startDragX,d=u>0,f=h;if(r.intentChecked&&!r.hasIntent)return;if(t.addBodyClasses&&(u>0?(s.klass.add(o.body,"snapjs-left"),s.klass.remove(o.body,"snapjs-right")):u<0&&(s.klass.add(o.body,"snapjs-right"),s.klass.remove(o.body,"snapjs-left"))),r.hasIntent===!1||null===r.hasIntent){var p=s.angleOfDrag(i,c),m=p>=0&&p<=t.slideIntent||p<=360&&p>360-t.slideIntent,g=p>=180&&p<=180+t.slideIntent||p<=180&&p>=180-t.slideIntent;g||m?r.hasIntent=!0:r.hasIntent=!1,r.intentChecked=!0}if(t.minDragDistance>=Math.abs(i-r.startDragX)||r.hasIntent===!1)return;s.events.prevent(e),s.dispatchEvent("drag"),r.dragWatchers.current=i,r.dragWatchers.last>i?("left"!==r.dragWatchers.state&&(r.dragWatchers.state="left",r.dragWatchers.hold=i),r.dragWatchers.last=i):r.dragWatchers.last<i&&("right"!==r.dragWatchers.state&&(r.dragWatchers.state="right",r.dragWatchers.hold=i),r.dragWatchers.last=i),d?(t.maxPosition<u&&(n=(u-t.maxPosition)*t.resistance,f=h-n),r.simpleStates={opening:"left",towards:r.dragWatchers.state,hyperExtending:t.maxPosition<u,halfway:u>t.maxPosition/2,flick:Math.abs(r.dragWatchers.current-r.dragWatchers.hold)>t.flickThreshold,translation:{absolute:u,relative:h,sinceDirectionChange:r.dragWatchers.current-r.dragWatchers.hold,percentage:u/t.maxPosition*100}}):(t.minPosition>u&&(n=(u-t.minPosition)*t.resistance,f=h-n),r.simpleStates={opening:"right",towards:r.dragWatchers.state,hyperExtending:t.minPosition>u,halfway:u<t.minPosition/2,flick:Math.abs(r.dragWatchers.current-r.dragWatchers.hold)>t.flickThreshold,translation:{absolute:u,relative:h,sinceDirectionChange:r.dragWatchers.current-r.dragWatchers.hold,percentage:u/t.minPosition*100}}),a.translate.x(f+l)}},endDrag:function(e){if(r.isDragging){s.dispatchEvent("end");var n=a.translate.get.matrix(4);if(0===r.dragWatchers.current&&0!==n&&t.tapToClose)return s.dispatchEvent("close"),s.events.prevent(e),a.translate.easeTo(0),r.isDragging=!1,void(r.startDragX=0);"left"===r.simpleStates.opening?r.simpleStates.halfway||r.simpleStates.hyperExtending||r.simpleStates.flick?r.simpleStates.flick&&"left"===r.simpleStates.towards?a.translate.easeTo(0):(r.simpleStates.flick&&"right"===r.simpleStates.towards||r.simpleStates.halfway||r.simpleStates.hyperExtending)&&a.translate.easeTo(t.maxPosition):a.translate.easeTo(0):"right"===r.simpleStates.opening&&(r.simpleStates.halfway||r.simpleStates.hyperExtending||r.simpleStates.flick?r.simpleStates.flick&&"right"===r.simpleStates.towards?a.translate.easeTo(0):(r.simpleStates.flick&&"left"===r.simpleStates.towards||r.simpleStates.halfway||r.simpleStates.hyperExtending)&&a.translate.easeTo(t.minPosition):a.translate.easeTo(0)),r.isDragging=!1,r.startDragX=s.page("X",e)}}}},c=function(e){e.element&&(s.deepExtend(t,e),r.vendor=s.vendor(),a.drag.listen())};this.open=function(e){s.dispatchEvent("open"),s.klass.remove(o.body,"snapjs-expand-left"),s.klass.remove(o.body,"snapjs-expand-right"),"left"===e?(r.simpleStates.opening="left",r.simpleStates.towards="right",s.klass.add(o.body,"snapjs-left"),s.klass.remove(o.body,"snapjs-right"),a.translate.easeTo(t.maxPosition)):"right"===e&&(r.simpleStates.opening="right",r.simpleStates.towards="left",s.klass.remove(o.body,"snapjs-left"),s.klass.add(o.body,"snapjs-right"),a.translate.easeTo(t.minPosition))},this.close=function(){s.dispatchEvent("close"),a.translate.easeTo(0)},this.expand=function(e){var t=n.innerWidth||o.documentElement.clientWidth;"left"===e?(s.dispatchEvent("expandLeft"),s.klass.add(o.body,"snapjs-expand-left"),s.klass.remove(o.body,"snapjs-expand-right")):(s.dispatchEvent("expandRight"),s.klass.add(o.body,"snapjs-expand-right"),s.klass.remove(o.body,"snapjs-expand-left"),t*=-1),a.translate.easeTo(t)},this.on=function(e,t){return i[e]=t,this},this.off=function(e){i[e]&&(i[e]=!1)},this.enable=function(){s.dispatchEvent("enable"),a.drag.listen()},this.disable=function(){s.dispatchEvent("disable"),a.drag.stopListening()},this.settings=function(e){s.deepExtend(t,e)},this.state=function(){var e,n=a.translate.get.matrix(4);return e=n===t.maxPosition?"left":n===t.minPosition?"right":"closed",{state:e,info:r.simpleStates}},c(e)};"undefined"!=typeof e&&e.exports&&(e.exports=s),"undefined"==typeof ender&&(this.Snap=s),r=[],i=function(){return s}.apply(t,r),!(void 0!==i&&(e.exports=i))}).call(this,window,document)},function(e,t,n){var r,i,o;/*!
Autosize 3.0.21
license: MIT
http://www.jacklmoore.com/autosize
*/
!function(n,s){i=[t,e],r=s,o="function"==typeof r?r.apply(t,i):r,!(void 0!==o&&(e.exports=o))}(this,function(e,t){"use strict";function n(e){function t(){var t=window.getComputedStyle(e,null);"vertical"===t.resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),c="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(c)&&(c=0),a()}function n(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function r(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function i(){var t=e.style.height,n=r(e),i=document.documentElement&&document.documentElement.scrollTop;e.style.height="auto";var o=e.scrollHeight+c;return 0===e.scrollHeight?void(e.style.height=t):(e.style.height=o+"px",l=e.clientWidth,n.forEach(function(e){e.node.scrollTop=e.scrollTop}),void(i&&(document.documentElement.scrollTop=i)))}function a(){i();var t=Math.round(parseFloat(e.style.height)),r=window.getComputedStyle(e,null),o="content-box"===r.boxSizing?Math.round(parseFloat(r.height)):e.offsetHeight;if(o!==t?"hidden"===r.overflowY&&(n("scroll"),i(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==r.overflowY&&(n("hidden"),i(),o="content-box"===r.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),u!==o){u=o;var a=s("autosize:resized");try{e.dispatchEvent(a)}catch(e){}}}if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var c=null,l=e.clientWidth,u=null,h=function(){e.clientWidth!==l&&a()},d=function(t){window.removeEventListener("resize",h,!1),e.removeEventListener("input",a,!1),e.removeEventListener("keyup",a,!1),e.removeEventListener("autosize:destroy",d,!1),e.removeEventListener("autosize:update",a,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",d,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",a,!1),window.addEventListener("resize",h,!1),e.addEventListener("input",a,!1),e.addEventListener("autosize:update",a,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:d,update:a}),t()}}function r(e){var t=o.get(e);t&&t.destroy()}function i(e){var t=o.get(e);t&&t.update()}var o="function"==typeof Map?new Map:function(){var e=[],t=[];return{has:function(t){return e.indexOf(t)>-1},get:function(n){return t[e.indexOf(n)]},set:function(n,r){e.indexOf(n)===-1&&(e.push(n),t.push(r))},delete:function(n){var r=e.indexOf(n);r>-1&&(e.splice(r,1),t.splice(r,1))}}}(),s=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){s=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(a=function(e){return e},a.destroy=function(e){return e},a.update=function(e){return e}):(a=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return n(e,t)}),e},a.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e},a.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e}),t.exports=a})},function(e,t,n){!function(t,r){e.exports=r(n(1))}(this,function(e){function t(){return(65536*(1+Math.random())|0).toString(16).substring(1)}function n(){return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}function r(e){return e===Object(e)}function i(e,t){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1}function o(e,t){for(var n in t)e[n]=t[n];return e}function s(e,t){if(null!=e){var n=e[t];return"function"==typeof n?e[t]():n}}return e.LocalStorage=window.Store=function(e,t){if(!this.localStorage)throw"Backbone.localStorage: Environment does not support localStorage.";this.name=e,this.serializer=t||{serialize:function(e){return r(e)?JSON.stringify(e):e},deserialize:function(e){return e&&JSON.parse(e)}};var n=this.localStorage().getItem(this.name);this.records=n&&n.split(",")||[]},o(e.LocalStorage.prototype,{save:function(){this.localStorage().setItem(this.name,this.records.join(","))},create:function(e){return e.id||0===e.id||(e.id=n(),e.set(e.idAttribute,e.id)),this.localStorage().setItem(this._itemName(e.id),this.serializer.serialize(e)),this.records.push(e.id.toString()),this.save(),this.find(e)},update:function(e){this.localStorage().setItem(this._itemName(e.id),this.serializer.serialize(e));var t=e.id.toString();return i(this.records,t)||(this.records.push(t),this.save()),this.find(e)},find:function(e){return this.serializer.deserialize(this.localStorage().getItem(this._itemName(e.id)))},findAll:function(){for(var e,t,n=[],r=0;r<this.records.length;r++)e=this.records[r],t=this.serializer.deserialize(this.localStorage().getItem(this._itemName(e))),null!=t&&n.push(t);return n},destroy:function(e){this.localStorage().removeItem(this._itemName(e.id));for(var t=e.id.toString(),n=0;n<this.records.length;n++)this.records[n]===t&&this.records.splice(n,1);return this.save(),e},localStorage:function(){return localStorage},_clear:function(){var e=this.localStorage(),t=new RegExp("^"+this.name+"-");e.removeItem(this.name);for(var n in e)t.test(n)&&e.removeItem(n);this.records.length=0},_storageSize:function(){return this.localStorage().length},_itemName:function(e){return this.name+"-"+e}}),e.LocalStorage.sync=window.Store.sync=e.localSync=function(t,n,r){var i,o,a=s(n,"localStorage")||s(n.collection,"localStorage"),c=e.$?e.$.Deferred&&e.$.Deferred():e.Deferred&&e.Deferred();try{switch(t){case"read":i=void 0!=n.id?a.find(n):a.findAll();break;case"create":i=a.create(n);break;case"update":i=a.update(n);break;case"delete":i=a.destroy(n)}}catch(e){o=22===e.code&&0===a._storageSize()?"Private browsing is unsupported":e.message}return i?(r&&r.success&&("0.9.10"===e.VERSION?r.success(n,i,r):r.success(i)),c&&c.resolve(i)):(o=o?o:"Record Not Found",r&&r.error&&("0.9.10"===e.VERSION?r.error(n,o,r):r.error(o)),c&&c.reject(o)),r&&r.complete&&r.complete(i),c&&c.promise()},e.ajaxSync=e.sync,e.getSyncMethod=function(t,n){var r=n&&n.ajaxSync;return r||!s(t,"localStorage")&&!s(t.collection,"localStorage")?e.ajaxSync:e.localSync},e.sync=function(t,n,r){return e.getSyncMethod(n,r).apply(this,[t,n,r])},e.LocalStorage})},function(e,t,n){(function(t,r){/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version 3.3.1
*/
!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function o(e){Y=e}function s(e){K=e}function a(){return function(){return t.nextTick(d)}}function c(){return function(){G(d)}}function l(){var e=0,t=new Z(d),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function u(){var e=new MessageChannel;return e.port1.onmessage=d,function(){return e.port2.postMessage(0)}}function h(){var e=setTimeout;return function(){return e(d,1)}}function d(){for(var e=0;e<V;e+=2){var t=ne[e],n=ne[e+1];t(n),ne[e]=void 0,ne[e+1]=void 0}V=0}function f(){try{var e=n(44);return G=e.runOnLoop||e.runOnContext,c()}catch(e){return h()}}function p(e,t){var n=arguments,r=this,i=new this.constructor(g);void 0===i[ie]&&M(i);var o=r._state;return o?!function(){var e=n[o-1];K(function(){return O(o,i,e,r._result)})}():C(r,i,e,t),i}function m(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(g);return E(n,e),n}function g(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function b(e){try{return e.then}catch(e){return ce.error=e,ce}}function w(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function x(e,t,n){K(function(e){var r=!1,i=w(n,t,function(n){r||(r=!0,t!==n?E(e,n):k(e,n))},function(t){r||(r=!0,A(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&i&&(r=!0,A(e,i))},e)}function _(e,t){t._state===se?k(e,t._result):t._state===ae?A(e,t._result):C(t,void 0,function(t){return E(e,t)},function(t){return A(e,t)})}function S(e,t,n){t.constructor===e.constructor&&n===p&&t.constructor.resolve===m?_(e,t):n===ce?A(e,ce.error):void 0===n?k(e,t):i(n)?x(e,t,n):k(e,t)}function E(t,n){t===n?A(t,v()):e(n)?S(t,n,b(n)):k(t,n)}function T(e){e._onerror&&e._onerror(e._result),P(e)}function k(e,t){e._state===oe&&(e._result=t,e._state=se,0!==e._subscribers.length&&K(P,e))}function A(e,t){e._state===oe&&(e._state=ae,e._result=t,K(T,e))}function C(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+se]=n,i[o+ae]=r,0===o&&e._state&&K(P,e)}function P(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,i=void 0,o=e._result,s=0;s<t.length;s+=3)r=t[s],i=t[s+n],r?O(n,r,i,o):i(o);e._subscribers.length=0}}function N(){this.error=null}function z(e,t){try{return e(t)}catch(e){return le.error=e,le}}function O(e,t,n,r){var o=i(n),s=void 0,a=void 0,c=void 0,l=void 0;if(o){if(s=z(n,r),s===le?(l=!0,a=s.error,s=null):c=!0,t===s)return void A(t,y())}else s=r,c=!0;t._state!==oe||(o&&c?E(t,s):l?A(t,a):e===se?k(t,s):e===ae&&A(t,s))}function R(e,t){try{t(function(t){E(e,t)},function(t){A(e,t)})}catch(t){A(e,t)}}function I(){return ue++}function M(e){e[ie]=ue++,e._state=void 0,e._result=void 0,e._subscribers=[]}function j(e,t){this._instanceConstructor=e,this.promise=new e(g),this.promise[ie]||M(this.promise),J(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?k(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&k(this.promise,this._result))):A(this.promise,D())}function D(){return new Error("Array Methods must be provided an Array")}function L(e){return new j(this,e).promise}function B(e){var t=this;return new t(J(e)?function(n,r){for(var i=e.length,o=0;o<i;o++)t.resolve(e[o]).then(n,r)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function U(e){var t=this,n=new t(g);return A(n,e),n}function F(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function q(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function H(e){this[ie]=I(),this._result=this._state=void 0,this._subscribers=[],g!==e&&("function"!=typeof e&&F(),this instanceof H?R(this,e):q())}function $(){var e=void 0;if("undefined"!=typeof r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=H}var W=void 0;W=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var J=W,V=0,G=void 0,Y=void 0,K=function(e,t){ne[V]=e,ne[V+1]=t,V+=2,2===V&&(Y?Y(d):re())},X="undefined"!=typeof window?window:void 0,Q=X||{},Z=Q.MutationObserver||Q.WebKitMutationObserver,ee="undefined"==typeof self&&"undefined"!=typeof t&&"[object process]"==={}.toString.call(t),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ne=new Array(1e3),re=void 0;re=ee?a():Z?l():te?u():void 0===X?f():h();var ie=Math.random().toString(36).substring(16),oe=void 0,se=1,ae=2,ce=new N,le=new N,ue=0;return j.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===oe&&n<e;n++)this._eachEntry(t[n],n)},j.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===m){var i=b(e);if(i===p&&e._state!==oe)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===H){var o=new n(g);S(o,e,i),this._willSettleAt(o,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},j.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===oe&&(this._remaining--,e===ae?A(r,n):this._result[t]=n),0===this._remaining&&k(r,this._result)},j.prototype._willSettleAt=function(e,t){var n=this;C(e,void 0,function(e){return n._settledAt(se,t,e)},function(e){return n._settledAt(ae,t,e)})},H.all=L,H.race=B,H.resolve=m,H.reject=U,H._setScheduler=o,H._setAsap=s,H._asap=K,H.prototype={constructor:H,then:p,catch:function(e){return this.then(null,e)}},$(),H.polyfill=$,H.Promise=H,H})}).call(t,n(14),function(){return this}())},function(e,t){/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
window.matchMedia||(window.matchMedia=function(){"use strict";var e=window.styleMedia||window.media;if(!e){var t=document.createElement("style"),n=document.getElementsByTagName("script")[0],r=null;t.type="text/css",t.id="matchmediajs-test",n.parentNode.insertBefore(t,n),r="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle,e={matchMedium:function(e){var n="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return t.styleSheet?t.styleSheet.cssText=n:t.textContent=n,"1px"===r.width}}}return function(t){return{matches:e.matchMedium(t||"all"),media:t||"all"}}}())},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(u===setTimeout)return setTimeout(e,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function o(e){if(h===clearTimeout)return clearTimeout(e);if((h===r||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function s(){m&&f&&(m=!1,f.length?p=f.concat(p):g=-1,p.length&&a())}function a(){if(!m){var e=i(s);m=!0;for(var t=p.length;t;){for(f=p,p=[];++g<t;)f&&f[g].run();g=-1,t=p.length}f=null,m=!1,o(e)}}function c(e,t){this.fun=e,this.array=t}function l(){}var u,h,d=e.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(e){u=n}try{h="function"==typeof clearTimeout?clearTimeout:r}catch(e){h=r}}();var f,p=[],m=!1,g=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new c(e,t)),1!==p.length||m||i(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=l,d.addListener=l,d.once=l,d.off=l,d.removeListener=l,d.removeAllListeners=l,d.emit=l,d.prependListener=l,d.prependOnceListener=l,d.listeners=function(e){return[]},d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(e,t){e.exports='<% _.each(docs, function(doc) { %>\n <li class="item" data-id="<%- doc.id %>">\n <a href="#!<%- doc.url %>" style="opacity: <%- doc.opacity %>">\n <%- doc.title || placeholder %>\n </a>\n </li>\n<% }); %>\n'},function(e,t){e.exports='<!DOCTYPE html>\n<html>\n\n<head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0">\n\n <title><%- title %></title>\n <meta name="description" content="Litewrite Document">\n\n <style>\n html {\n height: 100%;\n }\n\n body {\n font: normal 24px/150% \'Alegreya\', Georgia, serif;\n max-width: 800px;\n width: 92%;\n height: 100%;\n padding: 3.5% 4% 8% 4%;\n margin: 0 auto;\n box-sizing: border-box;\n }\n\n p {\n min-height: 92%;\n margin: 0;\n padding-bottom: 4%;\n white-space: pre-wrap;\n }\n\n .date {\n opacity: .5;\n font-size: 14px;\n }\n </style>\n</head>\n\n<body>\n\n <p><%- content %></p>\n\n <span class="date"><%- date %></span>\n\n</body>\n\n</html>\n'},function(e,t){e.exports="Litewrite\n\nHallo, schön dass du hier bist!\n\nLitewrite ist eine simple Anwendung für Notizen und Schreibarbeiten. Es funktioniert offline und dein Browser speichert deine Daten. Um deine Notizen langfristig zu speichern und auf verschiedenen Geräten zu benutzen, kannst du sie mit dem offenen remoteStorage-Standard, Dropbox oder Google Drive synchronisieren. Nutze dafür einfach das Widget oben rechts.\n\nDer komplette Code ist open-source, daher kannst du uns helfen, das App zu verbessern! Wenn du Probleme oder Vorschläge hast, melde das einfach auf http://github.com/litewrite/litewrite/issues\n\nWir hoffen, dass es dir hier gefällt!\n\nJorin & Jan-Christoph\n\n\nWenn du eine Tastatur benutzt, kannst du übrigens auch Tastenkürzel nutzen, um schneller zu arbeiten:\n- {Alt} + d: Neue Notiz\n- {Alt} + f: Suchfeld fokussieren\n- {Alt} + ↑: Zur Notiz darüber wechseln\n- {Alt} + ↓: Zur Notiz darunter wechseln\n"},function(e,t){e.exports="Litewrite\n\nSalut !\n\nLitewrite est une application minimaliste créé pour prendre des notes et écrire simplement. Elle fonctionne hors-ligne dans votre navigateur et fait des sauvegarde en permanence de vos données. Vous pouvez également synchroniser vos notes sur vos différents appareils en utilisant le protocole ouvert remoteStorage. Jetez un œil au widget en haut à droite pour paramétrer la synchronisation.\n\nLitewrite est libre, ce qui signifie que vous pouvez participer à son amélioration ! Si vous avez le moindre problème ou des suggestions, dites nous le ici http://github.com/litewrite/litewrite/issues\n\nRavi de vous avoir à bord !\n\nJorin & Jan-Christoph\n\n\n\nSi vous avez un clavier, vous avez la possibilité d'utiliser des raccourcis claviers pour aller plus vite:\n- {Alt} + d: nouvelle note\n- {Alt} + f: aller au champ de recherche\n- {Alt} + ↑: passer à la note du dessus\n- {Alt} + ↓: passer à la note du dessous\n"},function(e,t){e.exports="Litewrite\n\nЭта программа поможет вам сосредоточится на вашем тексте или заметке. Приложение работает даже без подключения к интернету. Браузер будет автоматически сохранять ваши данные. Вы также можете синхронизировать свои заметки на разных устройствах, используя открытый стандарт remoteStorage. Чтобы начать пользоваться синхронизацией, нажмите на виджет вверху справа.\n\nОбратите внимание, что Litewrite является программой с открытым исходным кодом. Это означает, что Вы можете помочь сделать её лучше! Если Вы нашли какие-нибудь ошибки, или у Вас есть предложения по улучшению - сообщите нам по адресу http://github.com/litewrite/litewrite/issues\n\nМы очень рады, что Вы здесь. Надеемся, что приложение Вам понравится!\n\nДжорин и Ян-Криштоф\n\n\n\nКстати, если Вы используете клавиатуру, попробуйте следующие сочетания клавиш:\n- {Alt} + d: новое примечание\n- {Alt} + f: поместить курсор в поле для поиска\n- {Alt} + ↑: переключится на одно примечание вверх\n- {Alt} + ↓: переключится на одно примечание вниз\n"},function(e,t){e.exports="Litewrite\n\nHey! Good to see you!\n\nLitewrite is a distraction-free app designed for simple note taking and writing. It works offline and your browser will keep your data saved. If you like your notes to be saved permanently and available on all your devices, you can use the open remoteStorage standard, Dropbox or Google Drive. Just check out the widget in the top right to get started.\n\nAnd it is all open source, meaning you can help make it better! If you have any problems or suggestions let us know at http://github.com/litewrite/litewrite/issues\n\nCool you’re here, hope you like it!\n\nJorin & Jan-Christoph\n\n\n\nBy the way, if you use a keyboard you can also use shortcuts to work more quickly:\n- {Alt} + d: new note\n- {Alt} + f: focus search field\n- {Alt} + ↑: switch to note above\n- {Alt} + ↓: switch to note below\n- {Alt} + Space: open sidebar when collapsed\n"},function(e,t,n){function r(e,t){e.declareType("text",{description:"A text document",type:"object",$schema:"http://json-schema.org/draft-03/schema#",additionalProperties:!0,properties:{title:{type:"string",required:!0},content:{type:"string",required:!0,default:""},lastEdited:{type:"integer",required:!0}}});var n={privateList:function(t){return Object.assign(e.scope(t+"/"),r)},publicList:function(e){return Object.assign(t.scope(e+"/"),r)}},r={add:function(e){var t=i();return this.set(t,e)},set:function(e,t){return this.storeObject("text",e.toString(),t).then(function(){return t.id=e,t})},get:function(e){return this.getObject(e.toString()).then(function(e){return e||{}})},addRaw:function(e,t){var n=i(),r="shared/"+n,o=this.getItemURL(r);return this.storeFile(e,r,t).then(function(){return o})},setRaw:function(e,t,n){var r="shared/"+e;return this.storeFile(t,r,n)}};return{exports:n}}var i=n(7);e.exports={name:"documents",builder:r}},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.rs=e,this.leaveOpen=!!t.leaveOpen&&t.leaveOpen,this.autoCloseAfter=t.autoCloseAfter?t.autoCloseAfter:1500,this.skipInitial=!!t.skipInitial&&t.skipInitial,this.logging=!!t.logging&&t.logging,this.active=!1,this.online=!1,this.closed=!1,this.lastSynced=null,this.lastSyncedUpdateLoop=null};r.prototype={log:function(){if(this.logging){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).debug.apply(e,["[RS-WIDGET] "].concat(n))}},eventHandler:function(e,t){var n=this;switch(this.log("EVENT: ",e),e){case"ready":this.setState(this.state);break;case"sync-req-done":this.rsSyncButton.classList.add("rs-rotate");break;case"sync-done":if(this.rsSyncButton.classList.remove("rs-rotate"),this.rsWidget.classList.contains("rs-state-unauthorized")||!this.rs.remote.online)this.updateLastSyncedOutput();else if(this.rs.remote.online){this.lastSynced=new Date;var r=document.querySelector(".rs-box-connected .rs-sub-headline");r.innerHTML="Synced just now"}!this.closed&&this.shouldCloseWhenSyncDone&&setTimeout(this.close.bind(this),this.autoCloseAfter);break;case"disconnected":this.active=!1,this.setOnline(),this.setBackendClass(),this.open(),this.setInitialState();break;case"connected":this.active=!0,this.online=!0,this.rs.hasFeature("Sync")?(this.shouldCloseWhenSyncDone=!0,this.rs.on("sync-req-done",function(){return n.eventHandler("sync-req-done")}),this.rs.on("sync-done",function(){return n.eventHandler("sync-done")})):(this.rsSyncButton.classList.add("rs-hidden"),setTimeout(this.close.bind(this),this.autoCloseAfter));var i=this.rs.remote.userAddress;this.rsConnectedUser.innerHTML=i,this.setBackendClass(this.rs.backend),this.rsConnectedLabel.textContent="Connected",this.setState("connected");break;case"network-offline":this.setOffline();break;case"network-online":this.setOnline();break;case"error":this.setBackendClass(this.rs.backend),"DiscoveryError"===t.name?this.handleDiscoveryError(t):"SyncError"===t.name?this.handleSyncError(t):"Unauthorized"===t.name?this.handleUnauthorized(t):console.debug("Encountered unhandled error",t)}},setState:function(e){if(e){this.log("Setting state ",e);var t=document.querySelector(".rs-box.rs-selected");t&&t.classList.remove("rs-selected");var n=document.querySelector(".rs-box.rs-box-"+e);n&&n.classList.add("rs-selected");var r=this.rsWidget.className.match(/rs-state-\S+/g)[0];this.rsWidget.classList.remove(r),this.rsWidget.classList.add("rs-state-"+(e||this.state)),this.state=e}},setInitialState:function(){this.skipInitial?this.showChooseOrSignIn():this.setState("initial")},createHtmlTemplate:function(){var e=document.createElement("div"),t=document.createElement("style");return t.innerHTML=n(3),e.id="remotestorage-widget",e.innerHTML=n(2),e.appendChild(t),e},setupElements:function(){this.rsWidget=document.querySelector(".rs-widget"),this.rsInitial=document.querySelector(".rs-box-initial"),this.rsChoose=document.querySelector(".rs-box-choose"),this.rsConnected=document.querySelector(".rs-box-connected"),this.rsSignIn=document.querySelector(".rs-box-sign-in"),this.rsConnectedLabel=document.querySelector(".rs-box-connected .rs-sub-headline"),this.rsChooseRemoteStorageButton=document.querySelector("button.rs-choose-rs"),this.rsChooseDropboxButton=document.querySelector("button.rs-choose-dropbox"),this.rsChooseGoogleDriveButton=document.querySelector("button.rs-choose-googledrive"),this.rsErrorBox=document.querySelector(".rs-box-error .rs-error-message"),this.rs.apiKeys.hasOwnProperty("googledrive")||this.rsChooseGoogleDriveButton.parentNode.removeChild(this.rsChooseGoogleDriveButton),this.rs.apiKeys.hasOwnProperty("dropbox")||this.rsChooseDropboxButton.parentNode.removeChild(this.rsChooseDropboxButton),this.rsSignInForm=document.querySelector(".rs-sign-in-form"),this.rsConnectButton=document.querySelector(".rs-connect"),this.rsDisconnectButton=document.querySelector(".rs-disconnect"),this.rsSyncButton=document.querySelector(".rs-sync"),this.rsLogo=document.querySelector(".rs-widget-icon"),this.rsErrorReconnectLink=document.querySelector(".rs-box-error a.rs-reconnect"),this.rsErrorDisconnectButton=document.querySelector(".rs-box-error button.rs-disconnect"),this.rsConnectedUser=document.querySelector(".rs-connected-text h1.rs-user")},setupHandlers:function(){var e=this;this.rs.on("connected",function(){return e.eventHandler("connected")}),this.rs.on("ready",function(){return e.eventHandler("ready")}),this.rs.on("disconnected",function(){return e.eventHandler("disconnected")}),this.rs.on("network-online",function(){return e.eventHandler("network-online")}),this.rs.on("network-offline",function(){return e.eventHandler("network-offline")}),this.rs.on("error",function(t){return e.eventHandler("error",t)}),this.setEventListeners(),this.setClickHandlers()},attach:function(e){var t=this.createHtmlTemplate();if(e){var n=document.getElementById(e);if(!n)throw'Failed to find target DOM element with id="'+e+'"';n.appendChild(t)}else document.body.appendChild(t);this.setupElements(),this.setupHandlers(),this.setInitialState()},setEventListeners:function(){var e=this;this.rsSignInForm.addEventListener("submit",function(t){t.preventDefault();var n=document.querySelector("input[name=rs-user-address]").value;e.rsConnectButton.disabled=!0,e.rs.connect(n)})},showChooseOrSignIn:function(){this.rs.apiKeys&&Object.keys(this.rs.apiKeys).length>0?this.setState("choose"):this.setState("sign-in")},setClickHandlers:function(){var e=this;this.rsInitial.addEventListener("click",function(){return e.showChooseOrSignIn()}),this.rsChooseRemoteStorageButton.addEventListener("click",function(){return e.setState("sign-in")}),this.rsChooseDropboxButton.addEventListener("click",function(){return e.rs.dropbox.connect()}),this.rsChooseGoogleDriveButton.addEventListener("click",function(){return e.rs.googledrive.connect()}),this.rsDisconnectButton.addEventListener("click",function(){return e.rs.disconnect()}),this.rsErrorReconnectLink.addEventListener("click",function(){return e.rs.reconnect()}),this.rsErrorDisconnectButton.addEventListener("click",function(){return e.rs.disconnect()}),this.rs.hasFeature("Sync")&&this.rsSyncButton.addEventListener("click",function(){e.rsSyncButton.classList.contains("rs-rotate")?(e.rs.stopSync(),e.rsSyncButton.classList.remove("rs-rotate")):(e.rs.startSync(),e.rsSyncButton.classList.add("rs-rotate"))}),document.addEventListener("click",function(){return e.close()}),this.rsWidget.addEventListener("click",function(e){return e.stopPropagation()}),this.rsLogo.addEventListener("click",function(){return e.toggle()})},toggle:function(){this.closed?this.open():"initial"===this.state?this.showChooseOrSignIn():this.close()},open:function(){this.closed=!1,this.rsWidget.classList.remove("rs-closed"),this.shouldCloseWhenSyncDone=!1},close:function(){"error"!==this.state&&(!this.leaveOpen&&this.active?(this.closed=!0,this.rsWidget.classList.add("rs-closed")):this.active?this.setState("connected"):this.setInitialState())},setOffline:function(){this.online&&(this.rsWidget.classList.add("rs-offline"),this.rsConnectedLabel.textContent="Offline",this.online=!1)},setOnline:function(){this.online||(this.rsWidget.classList.remove("rs-offline"),this.active&&(this.rsConnectedLabel.textContent="Connected")),this.online=!0},setBackendClass:function(e){this.rsWidget.classList.remove("rs-backend-remotestorage"),this.rsWidget.classList.remove("rs-backend-dropbox"),this.rsWidget.classList.remove("rs-backend-googledrive"),e&&this.rsWidget.classList.add("rs-backend-"+e)},showErrorBox:function(e){this.rsErrorBox.innerHTML=e,this.setState("error")},hideErrorBox:function(){this.rsErrorBox.innerHTML="",this.close()},handleDiscoveryError:function(e){var t=document.querySelector(".rs-sign-in-error");t.innerHTML=e.message,t.classList.remove("rs-hidden"),t.classList.add("rs-visible"),this.rsConnectButton.disabled=!1},handleSyncError:function(){this.open(),this.showErrorBox("App sync error")},handleUnauthorized:function(e){e.code&&"access_denied"===e.code?this.rs.disconnect():(this.open(),this.showErrorBox(e.message+" "),this.rsErrorBox.appendChild(this.rsErrorReconnectLink),this.rsErrorReconnectLink.classList.remove("rs-hidden"))},updateLastSyncedOutput:function(){if(this.lastSynced){var e=new Date,t=Math.round((e.getTime()-this.lastSynced.getTime())/1e3),n=document.querySelector(".rs-box-connected .rs-sub-headline");n.innerHTML="Synced "+t+" seconds ago"}}},e.exports=r},function(e,t){e.exports=' <div class="rs-widget rs-state-initial"> <div class=rs-widget-icon> <svg class=rs-main-logo id=rs-main-logo-remotestorage xmlns=http://www.w3.org/2000/svg version=1.1 xml:space=preserve width=0.739008in height=0.853339in style=shape-rendering:geometricPrecision;text-rendering:geometricPrecision;image-rendering:optimizeQuality;fill-rule:evenodd;clip-rule:evenodd viewBox="0 0 739 853" xmlns:xlink=http://www.w3.org/1999/xlink> <g> <polygon class=rs-logo-shape points="370,754 0,542 0,640 185,747 370,853 554,747 739,640 739,525 739,525 739,476 739,427 739,378 653,427 370,589 86,427 86,427 86,361 185,418 370,524 554,418 653,361 739,311 739,213 739,213 554,107 370,0 185,107 58,180 144,230 228,181 370,100 511,181 652,263 370,425 87,263 87,263 0,213 0,213 0,311 0,378 0,427 0,476 86,525 185,582 370,689 554,582 653,525 653,590 653,592 "/> </g> </svg> <svg class=rs-main-logo id=rs-main-logo-dropbox width=40 height=36 xml:space=preserve stroke-miterlimit=1.4142 xmlns=http://www.w3.org/2000/svg viewBox="0 0 104 97" stroke-linejoin=round version=1.1 clip-rule=evenodd> <path d="m30.691 0l-30.691 20.039 21.221 16.994 30.946-19.108-21.476-17.925z" fill=#007ee5 /> <path d="m0 54.028l30.691 20.039 21.476-17.926-30.945-19.108-21.222 16.995z" fill=#007ee5 /> <path d="m52.167 56.142l21.477 17.926 30.696-20.039-21.227-16.995-30.946 19.108z" fill=#007ee5 /> <path d="m104.34 20.039l-30.696-20.039-21.477 17.925 30.946 19.108 21.227-16.994z" fill=#007ee5 /> <path d="m52.23 59.998l-21.538 17.873-9.218-6.018v6.747l30.756 18.443 30.756-18.443v-6.747l-9.216 6.018-21.54-17.873z" fill=#007ee5 /> </svg> <svg class=rs-main-logo id=rs-main-logo-googledrive width=40 height=40 version=1.1 stroke-miterlimit=1.4142 xml:space=preserve xmlns=http://www.w3.org/2000/svg width=100% stroke-linejoin=round clip-rule=evenodd viewBox="0 0 511 442" height=100%> <path d="m166.23 0.10955l0.44-0.009998 0.04 0.49-0.56 0.02 0.08-0.5z" fill=#0ba25e /> <path d="m164.52 3.3896c0.39-0.56 1.15-1.68 1.54-2.24l0.7-0.11c0.52 6.34 2.38 12.45 3.78 18.62 6.02 26.81 12.1 53.6 18.43 80.33 4.15 18.33 8.78 36.57 12.58 54.97 3.3 11.39 5.07 23.14 8.26 34.55 2.06 10.64 5.29 21.02 7.02 31.72-0.7 1.17-1.4 2.35-2.11 3.52-0.17 0.27-0.53 0.83-0.7 1.11l-0.26 0.45c-0.04 0.08-0.13 0.25-0.18 0.33-0.39 0.72-1.17 2.15-1.56 2.86-0.07 0.13-0.22 0.39-0.3 0.52l-0.71 1.26c-0.09 0.15-0.26 0.44-0.34 0.59l-0.83 1.45c-0.04 0.08-0.13 0.24-0.18 0.32l-1.03 1.8c-0.09 0.15-0.27 0.47-0.36 0.63-0.1 0.17-0.3 0.5-0.4 0.67l-1.01 1.74c-0.08 0.13-0.24 0.41-0.32 0.54l-0.62 1.05c-0.1 0.18-0.32 0.55-0.42 0.73-0.4 0.69-1.19 2.07-1.59 2.77-0.07 0.12-0.22 0.37-0.29 0.5l-0.63 1.05c-0.1 0.19-0.32 0.55-0.43 0.74-0.37 0.65-1.13 1.94-1.5 2.59-0.09 0.15-0.26 0.46-0.35 0.61l-0.75 1.35c-0.07 0.12-0.21 0.37-0.28 0.49l-0.77 1.35-0.32 0.56c-0.4 0.66-1.18 1.99-1.57 2.66-0.09 0.15-0.27 0.46-0.36 0.62l-0.71 1.28c-0.07 0.12-0.2 0.35-0.26 0.47l-0.82 1.42c-0.07 0.13-0.22 0.38-0.29 0.5-0.42 0.72-1.25 2.15-1.67 2.87-0.07 0.13-0.23 0.39-0.31 0.52l-0.6 0.99c-0.1 0.18-0.31 0.53-0.41 0.71-0.38 0.66-1.13 1.97-1.51 2.63-0.06 0.11-0.2 0.35-0.26 0.46l-0.82 1.46c-0.06 0.11-0.18 0.32-0.24 0.43l-0.84 1.47c-0.07 0.11-0.21 0.35-0.28 0.46-0.39 0.66-1.18 1.96-1.57 2.62-0.11 0.17-0.31 0.53-0.42 0.71l-0.59 1.1c-0.08 0.14-0.23 0.42-0.3 0.55l-1.03 1.78c-0.08 0.15-0.26 0.45-0.34 0.6-0.09 0.14-0.25 0.43-0.33 0.57-1.69 2.85-3.22 5.79-5.09 8.53-10.65 17.37-20.45 35.28-30.76 52.86-16.74 28.97-33.46 57.94-50.2 86.91-2.51 4.51-5.37 8.83-7.53 13.54-0.11 0.16-0.33 0.48-0.44 0.64-4.01-5.78-7.11-12.16-10.78-18.16-16.74-28.99-33.49-57.97-50.22-86.97-9.3-16.31-18.99-32.42-28.04-48.88 35.84-61.85 71.52-123.81 107.29-185.7 0.03-0.06 0.1-0.17 0.13-0.23l0.98-1.68c0.04-0.07 0.12-0.21 0.17-0.28l0.99-1.69c0.09-0.15 0.27-0.47 0.37-0.62 0.1-0.18 0.3-0.53 0.4-0.71l0.99-1.76 0.28-0.48 0.74-1.18c0.13-0.19 0.39-0.58 0.52-0.78 0.36-0.54 1.09-1.63 1.46-2.17 0.04-0.18 0.11-0.53 0.15-0.7l0.87-1.67 0.16-0.28 1-1.68c0.1-0.16 0.3-0.5 0.4-0.67 0.11-0.19 0.33-0.58 0.45-0.78l0.84-1.47c0.09-0.16 0.27-0.47 0.36-0.62l0.7-1.23c0.08-0.13 0.24-0.41 0.32-0.55 0.39-0.67 1.17-2.01 1.57-2.68l0.32-0.56 0.73-1.33c0.06-0.1 0.18-0.32 0.24-0.42l0.96-1.68c0.12-0.2 0.37-0.61 0.5-0.81l0.65-0.98c0.14-0.2 0.41-0.59 0.55-0.78 0.12-0.2 0.37-0.6 0.5-0.8l0.54-1.04c0.18-0.39 0.55-1.17 0.73-1.56l0.55-0.77c0.1-0.14 0.29-0.41 0.39-0.55 0.37-0.31 1.12-0.95 1.49-1.27l-0.07-1.17c0.06-0.14 0.2-0.42 0.27-0.56l0.85-1.69c0.07-0.12 0.21-0.37 0.28-0.49l0.75-1.22c0.14-0.2 0.41-0.6 0.55-0.8 0.34-0.56 1.03-1.66 1.37-2.21 0.1-0.2 0.28-0.59 0.38-0.79l0.53-1.15c0.16-0.3 0.5-0.91 0.67-1.22l0.66-0.94c0.14-0.19 0.42-0.57 0.56-0.76 0.12-0.2 0.37-0.6 0.49-0.8l0.49-1.03c0.11-0.23 0.34-0.7 0.45-0.93l0.86-1.66c0.13-0.2 0.38-0.62 0.5-0.83l0.66-0.98c0.14-0.2 0.42-0.58 0.56-0.78 0.13-0.2 0.38-0.61 0.5-0.81l0.51-1.04c0.15-0.29 0.44-0.86 0.58-1.15l0.68-1.12c0.12-0.19 0.36-0.57 0.49-0.76 0.36-0.56 1.09-1.68 1.46-2.23 0.04-0.17 0.13-0.51 0.17-0.68l0.87-1.66c0.03-0.07 0.11-0.2 0.15-0.27l1-1.71c0.1-0.17 0.29-0.5 0.39-0.67 0.1-0.16 0.29-0.5 0.39-0.66l1-1.75c0.04-0.07 0.12-0.21 0.16-0.29l0.94-1.63c0.05-0.07 0.14-0.22 0.18-0.3l1.01-1.7c0.09-0.16 0.27-0.46 0.36-0.62 0.1-0.17 0.3-0.52 0.4-0.7l0.96-1.69c0.06-0.11 0.18-0.32 0.24-0.42l0.81-1.31c0.13-0.19 0.39-0.58 0.51-0.77 0.37-0.55 1.09-1.65 1.46-2.2 0.03-0.17 0.11-0.51 0.15-0.68l0.85-1.63c0.07-0.12 0.22-0.37 0.29-0.5l0.76-1.19c0.14-0.19 0.4-0.58 0.54-0.78 0.35-0.56 1.05-1.67 1.4-2.23 0.05-0.16 0.14-0.48 0.19-0.64l0.88-1.65c0.04-0.08 0.12-0.22 0.16-0.3l1.02-1.7204c0.08-0.15 0.26-0.45 0.35-0.6 0.09-0.17 0.27-0.49 0.36-0.65l1-1.78c0.05-0.07 0.13-0.22 0.17-0.29l0.95-1.61c0.03-0.05 0.1-0.16 0.13-0.21z" fill=#0ba25e /> <path id=#fccd48ff fill=#fccd48 d="m166.67 0.099552c32.48-0.15 64.97-0.02 97.46-0.07 26.88 0.099998 53.78-0.21 80.65 0.15 0.53 1.02 1.07 2.03 1.64 3.04 0.08 0.13 0.23 0.41 0.31 0.55 2.6 4.53 5.24 9.0404 7.81 13.58 0.05 0.08 0.13 0.23 0.18 0.3 4.98 8.55 9.94 17.11 14.83 25.71 0.04 0.07 0.13 0.21 0.17 0.29 0.89 1.53 1.81 3.06 2.72 4.6 0.08 0.13 0.23 0.4 0.31 0.54 1.25 2.2 2.51 4.39 3.78 6.58 0.05 0.07 0.13 0.21 0.17 0.29 1.27 2.18 2.52 4.38 3.78 6.58 0.08 0.13 0.23 0.39 0.31 0.52 1.27 2.14 2.5 4.3 3.72 6.46 0.08 0.13 0.23 0.4 0.31 0.53 11.94 20.62 23.85 41.25 35.75 61.9-1.36 5.99 1.93 11.95 0.1 17.97-1.11 16.45-7.32 32.46-17.56 45.38-3.33 3.61-0.1 8.62-0.46 12.9-3.59 4.35-8.21 7.6-12.57 11.11 0.01 3.28 0.02 6.56-0.13 9.85-3.89 2.57-8.35 4.06-12.3 6.54-0.42 1.33-0.85 2.67-1.26 4.02-3.17 1.5-6.56 2.47-9.73 3.99-12.55-3.6-24.97-7.61-37.49-11.32-11.65-3.85-23.58-6.87-35.11-11.11l-0.66-1.18c-0.06-0.09-0.16-0.27-0.21-0.36l-0.95-1.61-0.4-0.68c-0.09-0.15-0.25-0.44-0.34-0.59-0.71-1.26-1.36-2.55-1.94-3.87l-0.06-0.13-0.07-0.1c-0.44-0.7-1.33-2.11-1.78-2.81-0.05-0.08-0.15-0.24-0.2-0.33l-0.29-0.46c-0.17-0.29-0.52-0.86-0.69-1.15-0.43-0.73-1.3-2.19-1.73-2.92-0.11-0.18-0.32-0.55-0.43-0.73l-0.61-1.04c-0.08-0.14-0.24-0.41-0.32-0.55l-0.97-1.67c-0.04-0.07-0.13-0.21-0.17-0.29l-1.02-1.75c-0.09-0.16-0.27-0.48-0.36-0.63-0.1-0.18-0.31-0.55-0.41-0.73l-0.83-1.46c-0.1-0.17-0.3-0.53-0.4-0.7l-0.64-1.13c-0.09-0.15-0.26-0.45-0.35-0.6-0.39-0.72-1.18-2.15-1.58-2.87-0.04-0.08-0.14-0.25-0.18-0.33l-0.27-0.47c-0.19-0.28-0.56-0.84-0.75-1.12-0.99-1.66-1.92-3.36-2.81-5.07-0.05-0.08-0.14-0.25-0.18-0.33l-0.26-0.46c-0.19-0.27-0.57-0.81-0.76-1.07-0.44-0.79-1.32-2.37-1.76-3.16-0.05-0.08-0.15-0.25-0.19-0.34l-0.27-0.48c-0.2-0.33-0.59-0.98-0.79-1.31l-0.86-1.45c-0.08-0.14-0.25-0.42-0.34-0.57-0.38-0.66-1.15-1.99-1.54-2.65-0.09-0.15-0.26-0.46-0.35-0.62-0.68-1.13-1.33-2.27-1.97-3.41-0.05-0.09-0.16-0.27-0.21-0.36l-0.95-1.63c-0.1-0.16-0.29-0.48-0.38-0.65-0.09-0.15-0.26-0.45-0.35-0.6l-1.01-1.76c-0.05-0.08-0.14-0.25-0.19-0.33l-0.82-1.47c-0.07-0.12-0.2-0.35-0.27-0.47-0.38-0.67-1.15-2-1.53-2.67-0.08-0.14-0.24-0.41-0.32-0.54-0.62-1.03-1.24-2.07-1.84-3.1-27.73-48.12-55.5-96.21-83.29-144.3-1.74-3.0004-3.32-6.1204-5.45-8.8804l-0.05-0.45005-0.04-0.49z"/> <path d="m166.15 0.60955l0.56-0.02 0.05 0.45005-0.7 0.11 0.09-0.54005z" fill=#089156 /> <path d="m166.76 1.0396c2.13 2.76 3.71 5.88 5.45 8.88 27.79 48.09 55.56 96.18 83.29 144.3-12.84 22.36-25.78 44.67-38.67 67.01-1.73-10.7-4.96-21.08-7.02-31.72-3.19-11.41-4.96-23.16-8.26-34.55-3.8-18.4-8.43-36.64-12.58-54.97-6.33-26.73-12.41-53.52-18.43-80.33-1.4-6.17-3.26-12.28-3.78-18.62z" fill=#089156 /> <path d="m164.39 3.5996c0.03-0.05 0.1-0.16 0.13-0.21-0.03 0.05-0.1 0.16-0.13 0.21z" fill=#089156 /> <path d="m163.27 5.4996c0.05-0.07 0.13-0.22 0.17-0.29-0.04 0.07-0.12 0.22-0.17 0.29z" fill=#089156 /> <path d="m161.91 7.9296c0.09-0.17 0.27-0.49 0.36-0.65-0.09 0.16-0.27 0.48-0.36 0.65z" fill=#089156 /> <path d="m161.56 8.5296c0.08-0.15 0.26-0.45 0.35-0.6-0.09 0.15-0.27 0.45-0.35 0.6z" fill=#089156 /> <path d="m160.38 10.55c0.04-0.08 0.12-0.22 0.16-0.3-0.04 0.08-0.12 0.22-0.16 0.3z" fill=#089156 /> <path d="m159.31 12.84c0.05-0.16 0.14-0.48 0.19-0.64-0.05 0.16-0.14 0.48-0.19 0.64z" fill=#089156 /> <path d="m157.91 15.07c0.35-0.56 1.05-1.67 1.4-2.23-0.35 0.56-1.05 1.67-1.4 2.23z" fill=#089156 /> <path d="m157.37 15.85c0.14-0.19 0.4-0.58 0.54-0.78-0.14 0.2-0.4 0.59-0.54 0.78z" fill=#089156 /> <path d="m156.32 17.54c0.07-0.12 0.22-0.37 0.29-0.5-0.07 0.13-0.22 0.38-0.29 0.5z" fill=#089156 /> <path d="m155.32 19.85c0.03-0.17 0.11-0.51 0.15-0.68-0.04 0.17-0.12 0.51-0.15 0.68z" fill=#089156 /> <path d="m153.86 22.05c0.37-0.55 1.09-1.65 1.46-2.2-0.37 0.55-1.09 1.65-1.46 2.2z" fill=#089156 /> <path d="m153.35 22.82c0.13-0.19 0.39-0.58 0.51-0.77-0.12 0.19-0.38 0.58-0.51 0.77z" fill=#089156 /> <path d="m152.3 24.55c0.06-0.11 0.18-0.32 0.24-0.42-0.06 0.1-0.18 0.31-0.24 0.42z" fill=#089156 /> <path d="m150.94 26.94c0.1-0.17 0.3-0.52 0.4-0.7-0.1 0.18-0.3 0.53-0.4 0.7z" fill=#089156 /> <path d="m150.58 27.56c0.09-0.16 0.27-0.46 0.36-0.62-0.09 0.16-0.27 0.46-0.36 0.62z" fill=#089156 /> <path d="m149.39 29.56c0.05-0.07 0.14-0.22 0.18-0.3-0.04 0.08-0.13 0.23-0.18 0.3z" fill=#089156 /> <path d="m148.29 31.48c0.04-0.07 0.12-0.21 0.16-0.29-0.04 0.08-0.12 0.22-0.16 0.29z" fill=#089156 /> <path d="m146.9 33.89c0.1-0.16 0.29-0.5 0.39-0.66-0.1 0.16-0.29 0.5-0.39 0.66z" fill=#089156 /> <path d="m146.51 34.56c0.1-0.17 0.29-0.5 0.39-0.67-0.1 0.17-0.29 0.5-0.39 0.67z" fill=#089156 /> <path d="m145.36 36.54c0.03-0.07 0.11-0.2 0.15-0.27-0.04 0.07-0.12 0.2-0.15 0.27z" fill=#089156 /> <path d="m144.32 38.88c0.04-0.17 0.13-0.51 0.17-0.68-0.04 0.17-0.13 0.51-0.17 0.68z" fill=#089156 /> <path d="m142.86 41.11c0.36-0.56 1.09-1.68 1.46-2.23-0.37 0.55-1.1 1.67-1.46 2.23z" fill=#089156 /> <path d="m142.37 41.87c0.12-0.19 0.36-0.57 0.49-0.76-0.13 0.19-0.37 0.57-0.49 0.76z" fill=#089156 /> <path d="m141.11 44.14c0.15-0.29 0.44-0.86 0.58-1.15-0.14 0.29-0.43 0.86-0.58 1.15z" fill=#089156 /> <path d="m140.1 45.99c0.13-0.2 0.38-0.61 0.5-0.81-0.12 0.2-0.37 0.61-0.5 0.81z" fill=#089156 /> <path d="m139.54 46.77c0.14-0.2 0.42-0.58 0.56-0.78-0.14 0.2-0.42 0.58-0.56 0.78z" fill=#089156 /> <path d="m138.38 48.58c0.13-0.2 0.38-0.62 0.5-0.83-0.12 0.21-0.37 0.63-0.5 0.83z" fill=#089156 /> <path d="m137.07 51.17c0.11-0.23 0.34-0.7 0.45-0.93-0.11 0.23-0.34 0.7-0.45 0.93z" fill=#089156 /> <path d="m136.09 53c0.12-0.2 0.37-0.6 0.49-0.8-0.12 0.2-0.37 0.6-0.49 0.8z" fill=#089156 /> <path d="m135.53 53.76c0.14-0.19 0.42-0.57 0.56-0.76-0.14 0.19-0.42 0.57-0.56 0.76z" fill=#089156 /> <path d="m134.2 55.92c0.16-0.3 0.5-0.91 0.67-1.22-0.17 0.31-0.51 0.92-0.67 1.22z" fill=#089156 /> <path d="m133.29 57.86c0.1-0.2 0.28-0.59 0.38-0.79-0.1 0.2-0.28 0.59-0.38 0.79z" fill=#089156 /> <path d="m131.92 60.07c0.34-0.56 1.03-1.66 1.37-2.21-0.34 0.55-1.03 1.65-1.37 2.21z" fill=#089156 /> <path d="m131.37 60.87c0.14-0.2 0.41-0.6 0.55-0.8-0.14 0.2-0.41 0.6-0.55 0.8z" fill=#089156 /> <path d="m130.34 62.58c0.07-0.12 0.21-0.37 0.28-0.49-0.07 0.12-0.21 0.37-0.28 0.49z" fill=#089156 /> <path d="m129.22 64.83c0.06-0.14 0.2-0.42 0.27-0.56-0.07 0.14-0.21 0.42-0.27 0.56z" fill=#089156 /> <path d="m127.8 67.27c0.35-0.61 1.06-1.83 1.42-2.44l0.07 1.17c-0.37 0.32-1.12 0.96-1.49 1.27z" fill=#089156 /> <path d="m127.41 67.82c0.1-0.14 0.29-0.41 0.39-0.55-0.1 0.14-0.29 0.41-0.39 0.55z" fill=#089156 /> <path d="m126.13 70.15c0.18-0.39 0.55-1.17 0.73-1.56-0.18 0.39-0.55 1.17-0.73 1.56z" fill=#089156 /> <path d="m125.09 71.99c0.12-0.2 0.37-0.6 0.5-0.8-0.13 0.2-0.38 0.6-0.5 0.8z" fill=#089156 /> <path d="m124.54 72.77c0.14-0.2 0.41-0.59 0.55-0.78-0.14 0.19-0.41 0.58-0.55 0.78z" fill=#089156 /> <path d="m123.39 74.56c0.12-0.2 0.37-0.61 0.5-0.81-0.13 0.2-0.38 0.61-0.5 0.81z" fill=#089156 /> <path d="m122.19 76.66c0.06-0.1 0.18-0.32 0.24-0.42-0.06 0.1-0.18 0.32-0.24 0.42z" fill=#089156 /> <path d="m121.14 78.55l0.32-0.56-0.32 0.56z" fill=#089156 /> <path d="m119.25 81.78c0.08-0.13 0.24-0.41 0.32-0.55-0.08 0.14-0.24 0.42-0.32 0.55z" fill=#089156 /> <path d="m118.19 83.63c0.09-0.16 0.27-0.47 0.36-0.62-0.09 0.15-0.27 0.46-0.36 0.62z" fill=#089156 /> <path d="m116.9 85.88c0.11-0.19 0.33-0.58 0.45-0.78-0.12 0.2-0.34 0.59-0.45 0.78z" fill=#089156 /> <path d="m116.5 86.55c0.1-0.16 0.3-0.5 0.4-0.67-0.1 0.17-0.3 0.51-0.4 0.67z" fill=#089156 /> <path d="m115.34 88.51l0.16-0.28-0.16 0.28z" fill=#089156 /> <path d="m114.32 90.88c0.04-0.18 0.11-0.53 0.15-0.7-0.04 0.17-0.11 0.52-0.15 0.7z" fill=#089156 /> <path d="m112.86 93.05c0.36-0.54 1.09-1.63 1.46-2.17-0.37 0.54-1.1 1.63-1.46 2.17z" fill=#089156 /> <path d="m112.34 93.83c0.13-0.19 0.39-0.58 0.52-0.78-0.13 0.2-0.39 0.59-0.52 0.78z" fill=#089156 /> <path d="m111.32 95.49l0.28-0.48-0.28 0.48z" fill=#089156 /> <path d="m109.93 97.96c0.1-0.18 0.3-0.53 0.4-0.71-0.1 0.18-0.3 0.53-0.4 0.71z" fill=#089156 /> <path d="m109.56 98.58c0.09-0.15 0.27-0.47 0.37-0.62-0.1 0.15-0.28 0.47-0.37 0.62z" fill=#089156 /> <path d="m108.4 100.55c0.04-0.07 0.12-0.21 0.17-0.28-0.05 0.07-0.13 0.21-0.17 0.28z" fill=#089156 /> <path d="m107.29 102.46c0.03-0.06 0.1-0.17 0.13-0.23-0.03 0.06-0.1 0.17-0.13 0.23z" fill=#089156 /> <path d="m214.02 225.86c0.17-0.28 0.53-0.84 0.7-1.11-0.17 0.27-0.53 0.83-0.7 1.11z" fill=#089156 /> <path d="m213.58 226.64c0.05-0.08 0.14-0.25 0.18-0.33-0.04 0.08-0.13 0.25-0.18 0.33z" fill=#089156 /> <path d="m211.72 230.02c0.08-0.13 0.23-0.39 0.3-0.52-0.07 0.13-0.22 0.39-0.3 0.52z" fill=#089156 /> <path d="m210.67 231.87c0.08-0.15 0.25-0.44 0.34-0.59-0.09 0.15-0.26 0.44-0.34 0.59z" fill=#089156 /> <path d="m209.66 233.64c0.05-0.08 0.14-0.24 0.18-0.32-0.04 0.08-0.13 0.24-0.18 0.32z" fill=#089156 /> <path d="m208.27 236.07c0.09-0.16 0.27-0.48 0.36-0.63-0.09 0.15-0.27 0.47-0.36 0.63z" fill=#089156 /> <path d="m207.87 236.74c0.1-0.17 0.3-0.5 0.4-0.67-0.1 0.17-0.3 0.5-0.4 0.67z" fill=#089156 /> <path d="m206.54 239.02c0.08-0.13 0.24-0.41 0.32-0.54-0.08 0.13-0.24 0.41-0.32 0.54z" fill=#089156 /> <path d="m205.5 240.8c0.1-0.18 0.32-0.55 0.42-0.73-0.1 0.18-0.32 0.55-0.42 0.73z" fill=#089156 /> <path d="m203.62 244.07c0.07-0.13 0.22-0.38 0.29-0.5-0.07 0.12-0.22 0.37-0.29 0.5z" fill=#089156 /> <path d="m202.56 245.86c0.11-0.19 0.33-0.55 0.43-0.74-0.1 0.19-0.32 0.55-0.43 0.74z" fill=#089156 /> <path d="m200.71 249.06c0.09-0.15 0.26-0.46 0.35-0.61-0.09 0.15-0.26 0.46-0.35 0.61z" fill=#089156 /> <path d="m199.68 250.9c0.07-0.12 0.21-0.37 0.28-0.49-0.07 0.12-0.21 0.37-0.28 0.49z" fill=#089156 /> <path d="m198.59 252.81l0.32-0.56-0.32 0.56z" fill=#089156 /> <path d="m196.66 256.09c0.09-0.16 0.27-0.47 0.36-0.62-0.09 0.15-0.27 0.46-0.36 0.62z" fill=#089156 /> <path d="m195.69 257.84c0.06-0.12 0.19-0.35 0.26-0.47-0.07 0.12-0.2 0.35-0.26 0.47z" fill=#089156 /> <path d="m194.58 259.76c0.07-0.12 0.22-0.37 0.29-0.5-0.07 0.13-0.22 0.38-0.29 0.5z" fill=#089156 /> <path d="m192.6 263.15c0.08-0.13 0.24-0.39 0.31-0.52-0.07 0.13-0.23 0.39-0.31 0.52z" fill=#089156 /> <path d="m191.59 264.85c0.1-0.18 0.31-0.53 0.41-0.71-0.1 0.18-0.31 0.53-0.41 0.71z" fill=#089156 /> <path d="m189.82 267.94c0.06-0.11 0.2-0.35 0.26-0.46-0.06 0.11-0.2 0.35-0.26 0.46z" fill=#089156 /> <path d="m188.76 269.83c0.06-0.11 0.18-0.32 0.24-0.43-0.06 0.11-0.18 0.32-0.24 0.43z" fill=#089156 /> <path d="m187.64 271.76c0.07-0.11 0.21-0.35 0.28-0.46-0.07 0.11-0.21 0.35-0.28 0.46z" fill=#089156 /> <path d="m185.65 275.09c0.11-0.18 0.31-0.54 0.42-0.71-0.11 0.17-0.31 0.53-0.42 0.71z" fill=#089156 /> <path d="m184.76 276.74c0.07-0.13 0.22-0.41 0.3-0.55-0.08 0.14-0.23 0.42-0.3 0.55z" fill=#089156 /> <path d="m183.39 279.12c0.08-0.15 0.26-0.45 0.34-0.6-0.08 0.15-0.26 0.45-0.34 0.6z" fill=#089156 /> <path d="m183.06 279.69c0.08-0.14 0.24-0.43 0.33-0.57-0.09 0.14-0.25 0.43-0.33 0.57z" fill=#089156 /> <path d="m346.42 3.2196c0.08 0.13 0.23 0.41 0.31 0.55-0.08-0.14-0.23-0.42-0.31-0.55z" fill=#10985b /> <path d="m354.54 17.35c0.05 0.08 0.13 0.23 0.18 0.3-0.05-0.07-0.13-0.22-0.18-0.3z" fill=#10985b /> <path d="m369.55 43.36c0.04 0.07 0.13 0.21 0.17 0.29-0.04-0.08-0.13-0.22-0.17-0.29z" fill=#10985b /> <path d="m372.44 48.25c0.08 0.13 0.23 0.4 0.31 0.54-0.08-0.14-0.23-0.41-0.31-0.54z" fill=#10985b /> <path d="m376.53 55.37c0.05 0.07 0.13 0.21 0.17 0.29-0.04-0.08-0.12-0.22-0.17-0.29z" fill=#10985b /> <path d="m380.48 62.24c0.08 0.13 0.23 0.39 0.31 0.52-0.08-0.13-0.23-0.39-0.31-0.52z" fill=#10985b /> <path d="m384.51 69.22c0.08 0.13 0.23 0.4 0.31 0.53-0.08-0.13-0.23-0.4-0.31-0.53z" fill=#10985b /> <path d="m420.57 131.65c17.39 30.13 34.89 60.21 52.14 90.43 0.08 0.13 0.24 0.41 0.32 0.54 0.4 0.66 1.2 1.97 1.59 2.62 0.08 0.13 0.24 0.4 0.32 0.53l0.8 1.37c0.05 0.09 0.15 0.28 0.21 0.37l1 1.74c0.1 0.17 0.29 0.52 0.39 0.69 0.09 0.15 0.27 0.46 0.36 0.62l0.98 1.7 0.16 0.28 0.98 1.68c0.04 0.07 0.12 0.2 0.16 0.27l0.98 1.7c0.1 0.17 0.29 0.5 0.39 0.67 0.09 0.17 0.28 0.5 0.37 0.66l1.01 1.78c0.14 0.35 0.42 1.03 0.56 1.37l0.28 0.55 0.13 0.29 0.22 0.29 0.59 0.89c0.21 0.33 0.62 0.99 0.83 1.32 0.12 0.2 0.38 0.6 0.5 0.8l0.66 1.05c0.2 0.45 0.6 1.36 0.8 1.81l0.3 0.54 0.11 0.21 0.09 0.13c0.44 0.65 1.31 1.96 1.75 2.61 0.11 0.18 0.33 0.54 0.45 0.72l0.6 1c0.09 0.16 0.27 0.47 0.36 0.62l1.01 1.77c0.09 0.16 0.27 0.48 0.36 0.64s0.27 0.47 0.36 0.63l1 1.71c0.04 0.08 0.13 0.23 0.18 0.3l0.91 1.6c0.06 0.1 0.18 0.31 0.24 0.41l0.92 1.61c0.11 0.18 0.32 0.55 0.43 0.73 0.09 0.16 0.28 0.48 0.37 0.64 0.74 1.23 1.45 2.48 2.11 3.76 0.1 0.21 0.3 0.63 0.39 0.84l0.46 1.04c0.12 0.2 0.36 0.61 0.47 0.81 0.15 0.2 0.44 0.58 0.59 0.77l0.69 0.98c0.12 0.19 0.36 0.57 0.49 0.77l1.01 1.75c0.09 0.16 0.27 0.48 0.36 0.64s0.27 0.47 0.37 0.63l1 1.72c0.04 0.08 0.12 0.22 0.16 0.29l0.95 1.66c0.04 0.07 0.12 0.2 0.16 0.27l0.97 1.69c0.1 0.17 0.3 0.51 0.4 0.69 0.1 0.17 0.3 0.51 0.39 0.68l1 1.72c0.04 0.07 0.11 0.21 0.15 0.28l1.06 1.98-0.01 0.9c-25.02-7.19-49.64-15.72-74.73-22.65-22.77-7.35-45.75-14.04-68.52-21.35 3.17-1.52 6.56-2.49 9.73-3.99 0.41-1.35 0.84-2.69 1.26-4.02 3.95-2.48 8.41-3.97 12.3-6.54 0.15-3.29 0.14-6.57 0.13-9.85 4.36-3.51 8.98-6.76 12.57-11.11 0.36-4.28-2.87-9.29 0.46-12.9 10.24-12.92 16.45-28.93 17.56-45.38 1.83-6.02-1.46-11.98-0.1-17.97z" fill=#f9c941 /> <path d="m509.91 287.41l0.52 0.02 0.29 0.76-0.59 0.04-0.22-0.82z" fill=#f9c941 /> <path d="m257.34 157.32c0.08 0.13 0.24 0.4 0.32 0.54-0.08-0.14-0.24-0.41-0.32-0.54z" fill=#e3b73a /> <path d="m259.19 160.53c0.07 0.12 0.2 0.35 0.27 0.47-0.07-0.12-0.2-0.35-0.27-0.47z" fill=#e3b73a /> <path d="m260.28 162.47c0.05 0.08 0.14 0.25 0.19 0.33-0.05-0.08-0.14-0.25-0.19-0.33z" fill=#e3b73a /> <path d="m261.48 164.56c0.09 0.15 0.26 0.45 0.35 0.6-0.09-0.15-0.26-0.45-0.35-0.6z" fill=#e3b73a /> <path d="m261.83 165.16c0.09 0.17 0.28 0.49 0.38 0.65-0.1-0.16-0.29-0.48-0.38-0.65z" fill=#e3b73a /> <path d="m263.16 167.44c0.05 0.09 0.16 0.27 0.21 0.36-0.05-0.09-0.16-0.27-0.21-0.36z" fill=#e3b73a /> <path d="m265.34 171.21c0.09 0.16 0.26 0.47 0.35 0.62-0.09-0.15-0.26-0.46-0.35-0.62z" fill=#e3b73a /> <path d="m267.23 174.48c0.09 0.15 0.26 0.43 0.34 0.57-0.08-0.14-0.25-0.42-0.34-0.57z" fill=#e3b73a /> <path d="m268.43 176.5c0.2 0.33 0.59 0.98 0.79 1.31-0.2-0.33-0.59-0.98-0.79-1.31z" fill=#e3b73a /> <path d="m269.49 178.29c0.04 0.09 0.14 0.26 0.19 0.34-0.05-0.08-0.15-0.25-0.19-0.34z" fill=#e3b73a /> <path d="m271.44 181.79c0.19 0.26 0.57 0.8 0.76 1.07-0.19-0.27-0.57-0.81-0.76-1.07z" fill=#e3b73a /> <path d="m272.46 183.32c0.04 0.08 0.13 0.25 0.18 0.33-0.05-0.08-0.14-0.25-0.18-0.33z" fill=#e3b73a /> <path d="m275.45 188.72c0.19 0.28 0.56 0.84 0.75 1.12-0.19-0.28-0.56-0.84-0.75-1.12z" fill=#e3b73a /> <path d="m276.47 190.31c0.04 0.08 0.14 0.25 0.18 0.33-0.04-0.08-0.14-0.25-0.18-0.33z" fill=#e3b73a /> <path d="m278.23 193.51c0.09 0.15 0.26 0.45 0.35 0.6-0.09-0.15-0.26-0.45-0.35-0.6z" fill=#e3b73a /> <path d="m279.22 195.24c0.1 0.17 0.3 0.53 0.4 0.7-0.1-0.17-0.3-0.53-0.4-0.7z" fill=#e3b73a /> <path d="m280.45 197.4c0.1 0.18 0.31 0.55 0.41 0.73-0.1-0.18-0.31-0.55-0.41-0.73z" fill=#e3b73a /> <path d="m280.86 198.13c0.09 0.15 0.27 0.47 0.36 0.63-0.09-0.16-0.27-0.48-0.36-0.63z" fill=#e3b73a /> <path d="m282.24 200.51c0.04 0.08 0.13 0.22 0.17 0.29-0.04-0.07-0.13-0.21-0.17-0.29z" fill=#e3b73a /> <path d="m283.38 202.47c0.08 0.14 0.24 0.41 0.32 0.55-0.08-0.14-0.24-0.41-0.32-0.55z" fill=#e3b73a /> <path d="m284.31 204.06c0.11 0.18 0.32 0.55 0.43 0.73-0.11-0.18-0.32-0.55-0.43-0.73z" fill=#e3b73a /> <path d="m286.47 207.71c0.17 0.29 0.52 0.86 0.69 1.15-0.17-0.29-0.52-0.86-0.69-1.15z" fill=#e3b73a /> <path d="m287.45 209.32c0.05 0.09 0.15 0.25 0.2 0.33-0.05-0.08-0.15-0.24-0.2-0.33z" fill=#e3b73a /> <path d="m289.43 212.46l0.07 0.1 0.06 0.13c-0.03-0.06-0.1-0.17-0.13-0.23z" fill=#e3b73a /> <path d="m291.5 216.56c0.09 0.15 0.25 0.44 0.34 0.59-0.09-0.15-0.25-0.44-0.34-0.59z" fill=#e3b73a /> <path d="m291.84 217.15l0.4 0.68-0.4-0.68z" fill=#e3b73a /> <path d="m293.19 219.44c0.05 0.09 0.15 0.27 0.21 0.36-0.06-0.09-0.16-0.27-0.21-0.36z" fill=#e3b73a /> <path d="m294.06 220.98c11.53 4.24 23.46 7.26 35.11 11.11 12.52 3.71 24.94 7.72 37.49 11.32 22.77 7.31 45.75 14 68.52 21.35-0.34 4.87 0.62 9.86-0.59 14.64-0.93 4.65-6.49 5.38-8.78 9.09-30.77 0.01-61.53 0.1-92.29-0.03l-0.66-0.05c-12.71-22.6-25.93-44.92-38.8-67.43z" fill=#e3b73a /> <path d="m472.71 222.08c0.08 0.13 0.24 0.41 0.32 0.54-0.08-0.13-0.24-0.41-0.32-0.54z" fill=#e8b835 /> <path d="m474.62 225.24c0.08 0.13 0.24 0.4 0.32 0.53-0.08-0.13-0.24-0.4-0.32-0.53z" fill=#e8b835 /> <path d="m475.74 227.14c0.05 0.09 0.15 0.28 0.21 0.37-0.06-0.09-0.16-0.28-0.21-0.37z" fill=#e8b835 /> <path d="m476.95 229.25c0.1 0.17 0.29 0.52 0.39 0.69-0.1-0.17-0.29-0.52-0.39-0.69z" fill=#e8b835 /> <path d="m477.34 229.94c0.09 0.15 0.27 0.46 0.36 0.62-0.09-0.16-0.27-0.47-0.36-0.62z" fill=#e8b835 /> <path d="m478.68 232.26l0.16 0.28-0.16-0.28z" fill=#e8b835 /> <path d="m479.82 234.22c0.04 0.07 0.12 0.2 0.16 0.27-0.04-0.07-0.12-0.2-0.16-0.27z" fill=#e8b835 /> <path d="m480.96 236.19c0.1 0.17 0.29 0.5 0.39 0.67-0.1-0.17-0.29-0.5-0.39-0.67z" fill=#e8b835 /> <path d="m481.35 236.86c0.09 0.17 0.28 0.5 0.37 0.66-0.09-0.16-0.28-0.49-0.37-0.66z" fill=#e8b835 /> <path d="m482.73 239.3c0.14 0.35 0.42 1.03 0.56 1.37-0.14-0.34-0.42-1.02-0.56-1.37z" fill=#e8b835 /> <path d="m483.57 241.22c0.09 0.15 0.26 0.44 0.35 0.58l-0.22-0.29-0.13-0.29z" fill=#e8b835 /> <path d="m484.51 242.69c0.21 0.33 0.62 0.99 0.83 1.32-0.21-0.33-0.62-0.99-0.83-1.32z" fill=#e8b835 /> <path d="m485.34 244.01c0.12 0.2 0.38 0.6 0.5 0.8-0.12-0.2-0.38-0.6-0.5-0.8z" fill=#e8b835 /> <path d="m486.5 245.86c0.2 0.45 0.6 1.36 0.8 1.81-0.2-0.45-0.6-1.36-0.8-1.81z" fill=#e8b835 /> <path d="m487.6 248.21c0.05 0.09 0.15 0.26 0.2 0.34l-0.09-0.13-0.11-0.21z" fill=#e8b835 /> <path d="m489.55 251.16c0.11 0.18 0.33 0.54 0.45 0.72-0.12-0.18-0.34-0.54-0.45-0.72z" fill=#e8b835 /> <path d="m490.6 252.88c0.09 0.16 0.27 0.47 0.36 0.62-0.09-0.15-0.27-0.46-0.36-0.62z" fill=#e8b835 /> <path d="m491.97 255.27c0.09 0.16 0.27 0.48 0.36 0.64-0.09-0.16-0.27-0.48-0.36-0.64z" fill=#e8b835 /> <path d="m492.33 255.91c0.09 0.16 0.27 0.47 0.36 0.63-0.09-0.16-0.27-0.47-0.36-0.63z" fill=#e8b835 /> <path d="m493.69 258.25c0.04 0.08 0.13 0.23 0.18 0.3-0.05-0.07-0.14-0.22-0.18-0.3z" fill=#e8b835 /> <path d="m494.78 260.15c0.06 0.1 0.18 0.31 0.24 0.41-0.06-0.1-0.18-0.31-0.24-0.41z" fill=#e8b835 /> <path d="m495.94 262.17c0.11 0.18 0.32 0.55 0.43 0.73-0.11-0.18-0.32-0.55-0.43-0.73z" fill=#e8b835 /> <path d="m496.37 262.9c0.09 0.16 0.28 0.48 0.37 0.64-0.09-0.16-0.28-0.48-0.37-0.64z" fill=#e8b835 /> <path d="m435.18 264.76c25.09 6.93 49.71 15.46 74.73 22.65l0.22 0.82c-28.09 0.64-56.22 0.11-84.32 0.26 2.29-3.71 7.85-4.44 8.78-9.09 1.21-4.78 0.25-9.77 0.59-14.64z" fill=#e8b835 /> <path d="m498.85 267.3c0.1 0.21 0.3 0.63 0.39 0.84-0.09-0.21-0.29-0.63-0.39-0.84z" fill=#e8b835 /> <path d="m499.7 269.18c0.12 0.2 0.36 0.61 0.47 0.81-0.11-0.2-0.35-0.61-0.47-0.81z" fill=#e8b835 /> <path d="m500.17 269.99c0.15 0.2 0.44 0.58 0.59 0.77-0.15-0.19-0.44-0.57-0.59-0.77z" fill=#e8b835 /> <path d="m501.45 271.74c0.12 0.19 0.36 0.57 0.49 0.77-0.13-0.2-0.37-0.58-0.49-0.77z" fill=#e8b835 /> <path d="m502.95 274.26c0.09 0.16 0.27 0.48 0.36 0.64-0.09-0.16-0.27-0.48-0.36-0.64z" fill=#e8b835 /> <path d="m503.31 274.9c0.09 0.16 0.27 0.47 0.37 0.63-0.1-0.16-0.28-0.47-0.37-0.63z" fill=#e8b835 /> <path d="m504.68 277.25c0.04 0.08 0.12 0.22 0.16 0.29-0.04-0.07-0.12-0.21-0.16-0.29z" fill=#e8b835 /> <path d="m505.79 279.2c0.04 0.07 0.12 0.2 0.16 0.27-0.04-0.07-0.12-0.2-0.16-0.27z" fill=#e8b835 /> <path d="m506.92 281.16c0.1 0.17 0.3 0.51 0.4 0.69-0.1-0.18-0.3-0.52-0.4-0.69z" fill=#e8b835 /> <path d="m507.32 281.85c0.1 0.17 0.3 0.51 0.39 0.68-0.09-0.17-0.29-0.51-0.39-0.68z" fill=#e8b835 /> <path d="m508.71 284.25c0.04 0.07 0.11 0.21 0.15 0.28-0.04-0.07-0.11-0.21-0.15-0.28z" fill=#e8b835 /> <path d="m509.92 286.51c0.13 0.23 0.38 0.69 0.51 0.92l-0.52-0.02 0.01-0.9z" fill=#e8b835 /> <path d="m147.21 341.08c10.31-17.58 20.11-35.49 30.76-52.86 51.63 0.19 103.27-0.29 154.89 0.19l0.66 0.05c-26.11 0.84-52.29-0.22-78.4 0.44-4.98 3.21-8.3 8.41-13.07 11.91-4.43 3.23-7.69 7.73-11.92 11.18-5.93 4.37-10.34 10.43-16.36 14.71-6.96 7.37-14.99 13.58-22.01 20.91-5.26 4.04-9.66 9.03-14.56 13.48-5.39 3.91-9.52 9.21-14.56 13.53-0.13 0.11-0.38 0.33-0.51 0.45-0.27 0.21-0.8 0.65-1.07 0.86-0.13 0.11-0.37 0.31-0.5 0.42-3.97 3.07-7.01 7.12-10.91 10.27-0.13 0.11-0.38 0.32-0.5 0.42-0.13 0.11-0.38 0.32-0.51 0.42-5.69 4.67-10.25 10.58-16.22 14.93-6.01 5.96-12.79 11.08-18.5 17.36-8.44 6.94-15.74 15.13-24.44 21.78 2.16-4.71 5.02-9.03 7.53-13.54 16.74-28.97 33.46-57.94 50.2-86.91z" fill=#296ad9 /> <path d="m89.04 442.17c0.11-0.16 0.33-0.48 0.44-0.64l-0.03 0.65-0.41-0.01z" fill=#296ad9 /> <path id=#2a71e9ff fill=#2a71e9 d="m333.52 288.46c30.76 0.13 61.52 0.04 92.29 0.03 28.1-0.15 56.23 0.38 84.32-0.26l0.59-0.04 0.4 0.11v0.08c-29.66 51.27-59.23 102.6-88.89 153.88-110.93-0.03-221.86 0.1-332.78-0.08l0.03-0.65c8.7-6.65 16-14.84 24.44-21.78 5.71-6.28 12.49-11.4 18.5-17.36 5.97-4.35 10.53-10.26 16.22-14.93 0.13-0.1 0.38-0.31 0.51-0.42 0.12-0.1 0.37-0.31 0.5-0.42 3.9-3.15 6.94-7.2 10.91-10.27 0.13-0.11 0.37-0.31 0.5-0.42 0.27-0.21 0.8-0.65 1.07-0.86 0.13-0.12 0.38-0.34 0.51-0.45 5.04-4.32 9.17-9.62 14.56-13.53 4.9-4.45 9.3-9.44 14.56-13.48 7.02-7.33 15.05-13.54 22.01-20.91 6.02-4.28 10.43-10.34 16.36-14.71 4.23-3.45 7.49-7.95 11.92-11.18 4.77-3.5 8.09-8.7 13.07-11.91 26.11-0.66 52.29 0.4 78.4-0.44z"/> <path d="m162.13 375.07c0.13-0.12 0.38-0.34 0.51-0.45-0.13 0.11-0.38 0.33-0.51 0.45z" fill=#286ee6 /> <path d="m161.06 375.93c0.27-0.21 0.8-0.65 1.07-0.86-0.27 0.21-0.8 0.65-1.07 0.86z" fill=#286ee6 /> <path d="m160.56 376.35c0.13-0.11 0.37-0.31 0.5-0.42-0.13 0.11-0.37 0.31-0.5 0.42z" fill=#286ee6 /> <path d="m149.15 387.04c0.12-0.1 0.37-0.31 0.5-0.42-0.13 0.11-0.38 0.32-0.5 0.42z" fill=#286ee6 /> <path d="m148.64 387.46c0.13-0.1 0.38-0.31 0.51-0.42-0.13 0.11-0.38 0.32-0.51 0.42z" fill=#286ee6 /> </svg> </div> <div class="rs-box rs-box-initial"> <h3 class=rs-small-headline>Connect your storage</h3> <span class=rs-sub-headline>To sync data with your account</span> </div> <div class="rs-box rs-box-connected"> <div class=rs-connected-text> <h1 class="rs-user rs-small-headline">user@provider.com</h1> <span class=rs-sub-headline>Connected</span> </div> <div class=rs-connected-buttons> <button class="rs-button rs-button-small rs-sync" title="Sync now"> <svg class="rs-icon rs-loop-icon" xml:space=preserve version=1.1 x=0px y=0px height=16 width=16 viewBox="0 0 512 512" style="enable-background:new 0 0 512 512" xmlns=http://www.w3.org/2000/svg> <path d="m273.4 300.5l-0.3 58c48.9-8.2 86.3-51 86.3-102.5 0-15.9-3.6-31-10-44.5-2.8-5.8-6-11.3-9.8-16.5l47.1-43.5c1.1 1.3 2.1 2.7 3.1 4 20.9 28 33.2 62.8 33.2 100.5v3.7c-1.5 71.5-47.6 132-111.4 154.6-12.3 4.3-25.2 7.3-38.5 8.7l-0.1 57-76.2-67-26.2-23 44.4-38.7 58.4-50.8z"/> <path d="m89 252.3c1.6-72.1 48.3-133 112.9-155.2 11.7-4 24-6.8 36.8-8.1l0.1-57 76.1 66.9 26.2 23.1-44.3 38.6-58.4 50.9 0.2-57.9c-48.8 8.3-86 51.1-86 102.4 0 16 3.6 31.1 10.1 44.7 2.7 5.8 6 11.2 9.7 16.3l-47 43.6c-1.3-1.6-2.6-3.3-3.8-5-20.5-27.9-32.6-62.3-32.6-99.6v-3.7z"/> </svg> </button> <button class="rs-button rs-button-small rs-disconnect" title=Disconnect> <svg class="rs-icon rs-power-icon" xmlns=http://www.w3.org/2000/svg x=0px y=0px width=16 height=16 style="enable-background:new 0 0 512 512" xml:space=preserve viewBox="0 0 512 512" version=1.1> <path d="m256 256c-17.7 0-32-14.3-32-32v-160c0-17.7 14.3-32 32-32s32 14.3 32 32v160c0 17.7-14.3 32-32 32z"/> <path d="m379 68.8c-5-3-10.8-4.8-17-4.8-17.7 0-32 14.3-32 32 0 6.2 1.8 12 4.8 16.9 2 3.2 4.6 6.1 7.6 8.4 1.2 0.9 2.4 1.7 3.7 2.5 8.1 5.6 15.8 11.9 23 19.1 30.3 30.2 46.9 70.4 46.9 113.1s-16.6 82.9-46.9 113.1c-30.2 30.3-70.4 46.9-113.1 46.9s-82.9-16.6-113.1-46.9c-30.3-30.2-46.9-70.4-46.9-113.1s16.6-82.9 46.9-113.1c7.1-7.1 14.8-13.5 22.9-19 1.4-0.8 2.6-1.6 3.9-2.6 3-2.3 5.5-5.1 7.5-8.3 3.1-4.9 4.8-10.7 4.8-16.9 0-17.7-14.3-32-32-32-6.2 0-12 1.8-16.9 4.8l-0.1-0.1c-60.8 40-101 108.9-101 187.2 0 123.7 100.3 224 224 224s224-100.3 224-224c0-78.3-40.2-147.2-101-187.2z"/> </svg> </button> </div> </div> <div class="rs-box rs-box-error"> <div class=rs-error-message></div> <div class=rs-error-buttons> <a href=# class="rs-reconnect rs-hidden">Renew</a> <button class="rs-button rs-button-small rs-disconnect" title=Disconnect> <svg class="rs-icon rs-power-icon" xmlns=http://www.w3.org/2000/svg x=0px y=0px width=16 height=16 style="enable-background:new 0 0 512 512" xml:space=preserve viewBox="0 0 512 512" version=1.1> <path d="m256 256c-17.7 0-32-14.3-32-32v-160c0-17.7 14.3-32 32-32s32 14.3 32 32v160c0 17.7-14.3 32-32 32z"/> <path d="m379 68.8c-5-3-10.8-4.8-17-4.8-17.7 0-32 14.3-32 32 0 6.2 1.8 12 4.8 16.9 2 3.2 4.6 6.1 7.6 8.4 1.2 0.9 2.4 1.7 3.7 2.5 8.1 5.6 15.8 11.9 23 19.1 30.3 30.2 46.9 70.4 46.9 113.1s-16.6 82.9-46.9 113.1c-30.2 30.3-70.4 46.9-113.1 46.9s-82.9-16.6-113.1-46.9c-30.3-30.2-46.9-70.4-46.9-113.1s16.6-82.9 46.9-113.1c7.1-7.1 14.8-13.5 22.9-19 1.4-0.8 2.6-1.6 3.9-2.6 3-2.3 5.5-5.1 7.5-8.3 3.1-4.9 4.8-10.7 4.8-16.9 0-17.7-14.3-32-32-32-6.2 0-12 1.8-16.9 4.8l-0.1-0.1c-60.8 40-101 108.9-101 187.2 0 123.7 100.3 224 224 224s224-100.3 224-224c0-78.3-40.2-147.2-101-187.2z"/> </svg> </button> </div> </div> <div class="rs-box rs-box-choose"> <div class=rs-content> <h1 class=rs-big-headline>Connect your storage</h1> <p class=rs-short-desc> This app allows you to sync data with a storage of your choice. <a class=rs-help href=https://remotestorage.io/ target=_blank>Read more</a> </p> <div class=rs-button-wrap> <button class="rs-button rs-button-big rs-choose-rs"> <svg class=rs-logo fill-rule=evenodd height=40 width=40 xmlns=http://www.w3.org/2000/svg version=1.1 style=shape-rendering:geometricPrecision;image-rendering:optimizeQuality;text-rendering:geometricPrecision clip-rule=evenodd xml:space=preserve viewBox="0 0 739 853"> <g> <polygon class=rs-logo-shape points="370 754 0 542 0 640 185 747 370 853 554 747 739 640 739 525 739 525 739 476 739 427 739 378 653 427 370 589 86 427 86 427 86 361 185 418 370 524 554 418 653 361 739 311 739 213 739 213 554 107 370 0 185 107 58 180 144 230 228 181 370 100 511 181 652 263 370 425 87 263 87 263 0 213 0 213 0 311 0 378 0 427 0 476 86 525 185 582 370 689 554 582 653 525 653 590 653 592"/> </g> </svg> <div>RemoteStorage</div> </button> <button class="rs-button rs-button-big rs-choose-dropbox"> <svg class=dropbox-logo width=40 height=40 xml:space=preserve stroke-miterlimit=1.4142 xmlns=http://www.w3.org/2000/svg viewBox="0 0 104 97" stroke-linejoin=round version=1.1 clip-rule=evenodd> <path d="m30.691 0l-30.691 20.039 21.221 16.994 30.946-19.108-21.476-17.925z" fill=#007ee5 /> <path d="m0 54.028l30.691 20.039 21.476-17.926-30.945-19.108-21.222 16.995z" fill=#007ee5 /> <path d="m52.167 56.142l21.477 17.926 30.696-20.039-21.227-16.995-30.946 19.108z" fill=#007ee5 /> <path d="m104.34 20.039l-30.696-20.039-21.477 17.925 30.946 19.108 21.227-16.994z" fill=#007ee5 /> <path d="m52.23 59.998l-21.538 17.873-9.218-6.018v6.747l30.756 18.443 30.756-18.443v-6.747l-9.216 6.018-21.54-17.873z" fill=#007ee5 /> </svg> <div>Dropbox</div> </button> <button class="rs-button rs-button-big rs-choose-googledrive"> <svg class=googledrive-logo width=40 height=40 version=1.1 stroke-miterlimit=1.4142 xml:space=preserve xmlns=http://www.w3.org/2000/svg width=100% stroke-linejoin=round clip-rule=evenodd viewBox="0 0 511 442" height=100%> <path d="m166.23 0.10955l0.44-0.009998 0.04 0.49-0.56 0.02 0.08-0.5z" fill=#0ba25e /> <path d="m164.52 3.3896c0.39-0.56 1.15-1.68 1.54-2.24l0.7-0.11c0.52 6.34 2.38 12.45 3.78 18.62 6.02 26.81 12.1 53.6 18.43 80.33 4.15 18.33 8.78 36.57 12.58 54.97 3.3 11.39 5.07 23.14 8.26 34.55 2.06 10.64 5.29 21.02 7.02 31.72-0.7 1.17-1.4 2.35-2.11 3.52-0.17 0.27-0.53 0.83-0.7 1.11l-0.26 0.45c-0.04 0.08-0.13 0.25-0.18 0.33-0.39 0.72-1.17 2.15-1.56 2.86-0.07 0.13-0.22 0.39-0.3 0.52l-0.71 1.26c-0.09 0.15-0.26 0.44-0.34 0.59l-0.83 1.45c-0.04 0.08-0.13 0.24-0.18 0.32l-1.03 1.8c-0.09 0.15-0.27 0.47-0.36 0.63-0.1 0.17-0.3 0.5-0.4 0.67l-1.01 1.74c-0.08 0.13-0.24 0.41-0.32 0.54l-0.62 1.05c-0.1 0.18-0.32 0.55-0.42 0.73-0.4 0.69-1.19 2.07-1.59 2.77-0.07 0.12-0.22 0.37-0.29 0.5l-0.63 1.05c-0.1 0.19-0.32 0.55-0.43 0.74-0.37 0.65-1.13 1.94-1.5 2.59-0.09 0.15-0.26 0.46-0.35 0.61l-0.75 1.35c-0.07 0.12-0.21 0.37-0.28 0.49l-0.77 1.35-0.32 0.56c-0.4 0.66-1.18 1.99-1.57 2.66-0.09 0.15-0.27 0.46-0.36 0.62l-0.71 1.28c-0.07 0.12-0.2 0.35-0.26 0.47l-0.82 1.42c-0.07 0.13-0.22 0.38-0.29 0.5-0.42 0.72-1.25 2.15-1.67 2.87-0.07 0.13-0.23 0.39-0.31 0.52l-0.6 0.99c-0.1 0.18-0.31 0.53-0.41 0.71-0.38 0.66-1.13 1.97-1.51 2.63-0.06 0.11-0.2 0.35-0.26 0.46l-0.82 1.46c-0.06 0.11-0.18 0.32-0.24 0.43l-0.84 1.47c-0.07 0.11-0.21 0.35-0.28 0.46-0.39 0.66-1.18 1.96-1.57 2.62-0.11 0.17-0.31 0.53-0.42 0.71l-0.59 1.1c-0.08 0.14-0.23 0.42-0.3 0.55l-1.03 1.78c-0.08 0.15-0.26 0.45-0.34 0.6-0.09 0.14-0.25 0.43-0.33 0.57-1.69 2.85-3.22 5.79-5.09 8.53-10.65 17.37-20.45 35.28-30.76 52.86-16.74 28.97-33.46 57.94-50.2 86.91-2.51 4.51-5.37 8.83-7.53 13.54-0.11 0.16-0.33 0.48-0.44 0.64-4.01-5.78-7.11-12.16-10.78-18.16-16.74-28.99-33.49-57.97-50.22-86.97-9.3-16.31-18.99-32.42-28.04-48.88 35.84-61.85 71.52-123.81 107.29-185.7 0.03-0.06 0.1-0.17 0.13-0.23l0.98-1.68c0.04-0.07 0.12-0.21 0.17-0.28l0.99-1.69c0.09-0.15 0.27-0.47 0.37-0.62 0.1-0.18 0.3-0.53 0.4-0.71l0.99-1.76 0.28-0.48 0.74-1.18c0.13-0.19 0.39-0.58 0.52-0.78 0.36-0.54 1.09-1.63 1.46-2.17 0.04-0.18 0.11-0.53 0.15-0.7l0.87-1.67 0.16-0.28 1-1.68c0.1-0.16 0.3-0.5 0.4-0.67 0.11-0.19 0.33-0.58 0.45-0.78l0.84-1.47c0.09-0.16 0.27-0.47 0.36-0.62l0.7-1.23c0.08-0.13 0.24-0.41 0.32-0.55 0.39-0.67 1.17-2.01 1.57-2.68l0.32-0.56 0.73-1.33c0.06-0.1 0.18-0.32 0.24-0.42l0.96-1.68c0.12-0.2 0.37-0.61 0.5-0.81l0.65-0.98c0.14-0.2 0.41-0.59 0.55-0.78 0.12-0.2 0.37-0.6 0.5-0.8l0.54-1.04c0.18-0.39 0.55-1.17 0.73-1.56l0.55-0.77c0.1-0.14 0.29-0.41 0.39-0.55 0.37-0.31 1.12-0.95 1.49-1.27l-0.07-1.17c0.06-0.14 0.2-0.42 0.27-0.56l0.85-1.69c0.07-0.12 0.21-0.37 0.28-0.49l0.75-1.22c0.14-0.2 0.41-0.6 0.55-0.8 0.34-0.56 1.03-1.66 1.37-2.21 0.1-0.2 0.28-0.59 0.38-0.79l0.53-1.15c0.16-0.3 0.5-0.91 0.67-1.22l0.66-0.94c0.14-0.19 0.42-0.57 0.56-0.76 0.12-0.2 0.37-0.6 0.49-0.8l0.49-1.03c0.11-0.23 0.34-0.7 0.45-0.93l0.86-1.66c0.13-0.2 0.38-0.62 0.5-0.83l0.66-0.98c0.14-0.2 0.42-0.58 0.56-0.78 0.13-0.2 0.38-0.61 0.5-0.81l0.51-1.04c0.15-0.29 0.44-0.86 0.58-1.15l0.68-1.12c0.12-0.19 0.36-0.57 0.49-0.76 0.36-0.56 1.09-1.68 1.46-2.23 0.04-0.17 0.13-0.51 0.17-0.68l0.87-1.66c0.03-0.07 0.11-0.2 0.15-0.27l1-1.71c0.1-0.17 0.29-0.5 0.39-0.67 0.1-0.16 0.29-0.5 0.39-0.66l1-1.75c0.04-0.07 0.12-0.21 0.16-0.29l0.94-1.63c0.05-0.07 0.14-0.22 0.18-0.3l1.01-1.7c0.09-0.16 0.27-0.46 0.36-0.62 0.1-0.17 0.3-0.52 0.4-0.7l0.96-1.69c0.06-0.11 0.18-0.32 0.24-0.42l0.81-1.31c0.13-0.19 0.39-0.58 0.51-0.77 0.37-0.55 1.09-1.65 1.46-2.2 0.03-0.17 0.11-0.51 0.15-0.68l0.85-1.63c0.07-0.12 0.22-0.37 0.29-0.5l0.76-1.19c0.14-0.19 0.4-0.58 0.54-0.78 0.35-0.56 1.05-1.67 1.4-2.23 0.05-0.16 0.14-0.48 0.19-0.64l0.88-1.65c0.04-0.08 0.12-0.22 0.16-0.3l1.02-1.7204c0.08-0.15 0.26-0.45 0.35-0.6 0.09-0.17 0.27-0.49 0.36-0.65l1-1.78c0.05-0.07 0.13-0.22 0.17-0.29l0.95-1.61c0.03-0.05 0.1-0.16 0.13-0.21z" fill=#0ba25e /> <path id=#fccd48ff fill=#fccd48 d="m166.67 0.099552c32.48-0.15 64.97-0.02 97.46-0.07 26.88 0.099998 53.78-0.21 80.65 0.15 0.53 1.02 1.07 2.03 1.64 3.04 0.08 0.13 0.23 0.41 0.31 0.55 2.6 4.53 5.24 9.0404 7.81 13.58 0.05 0.08 0.13 0.23 0.18 0.3 4.98 8.55 9.94 17.11 14.83 25.71 0.04 0.07 0.13 0.21 0.17 0.29 0.89 1.53 1.81 3.06 2.72 4.6 0.08 0.13 0.23 0.4 0.31 0.54 1.25 2.2 2.51 4.39 3.78 6.58 0.05 0.07 0.13 0.21 0.17 0.29 1.27 2.18 2.52 4.38 3.78 6.58 0.08 0.13 0.23 0.39 0.31 0.52 1.27 2.14 2.5 4.3 3.72 6.46 0.08 0.13 0.23 0.4 0.31 0.53 11.94 20.62 23.85 41.25 35.75 61.9-1.36 5.99 1.93 11.95 0.1 17.97-1.11 16.45-7.32 32.46-17.56 45.38-3.33 3.61-0.1 8.62-0.46 12.9-3.59 4.35-8.21 7.6-12.57 11.11 0.01 3.28 0.02 6.56-0.13 9.85-3.89 2.57-8.35 4.06-12.3 6.54-0.42 1.33-0.85 2.67-1.26 4.02-3.17 1.5-6.56 2.47-9.73 3.99-12.55-3.6-24.97-7.61-37.49-11.32-11.65-3.85-23.58-6.87-35.11-11.11l-0.66-1.18c-0.06-0.09-0.16-0.27-0.21-0.36l-0.95-1.61-0.4-0.68c-0.09-0.15-0.25-0.44-0.34-0.59-0.71-1.26-1.36-2.55-1.94-3.87l-0.06-0.13-0.07-0.1c-0.44-0.7-1.33-2.11-1.78-2.81-0.05-0.08-0.15-0.24-0.2-0.33l-0.29-0.46c-0.17-0.29-0.52-0.86-0.69-1.15-0.43-0.73-1.3-2.19-1.73-2.92-0.11-0.18-0.32-0.55-0.43-0.73l-0.61-1.04c-0.08-0.14-0.24-0.41-0.32-0.55l-0.97-1.67c-0.04-0.07-0.13-0.21-0.17-0.29l-1.02-1.75c-0.09-0.16-0.27-0.48-0.36-0.63-0.1-0.18-0.31-0.55-0.41-0.73l-0.83-1.46c-0.1-0.17-0.3-0.53-0.4-0.7l-0.64-1.13c-0.09-0.15-0.26-0.45-0.35-0.6-0.39-0.72-1.18-2.15-1.58-2.87-0.04-0.08-0.14-0.25-0.18-0.33l-0.27-0.47c-0.19-0.28-0.56-0.84-0.75-1.12-0.99-1.66-1.92-3.36-2.81-5.07-0.05-0.08-0.14-0.25-0.18-0.33l-0.26-0.46c-0.19-0.27-0.57-0.81-0.76-1.07-0.44-0.79-1.32-2.37-1.76-3.16-0.05-0.08-0.15-0.25-0.19-0.34l-0.27-0.48c-0.2-0.33-0.59-0.98-0.79-1.31l-0.86-1.45c-0.08-0.14-0.25-0.42-0.34-0.57-0.38-0.66-1.15-1.99-1.54-2.65-0.09-0.15-0.26-0.46-0.35-0.62-0.68-1.13-1.33-2.27-1.97-3.41-0.05-0.09-0.16-0.27-0.21-0.36l-0.95-1.63c-0.1-0.16-0.29-0.48-0.38-0.65-0.09-0.15-0.26-0.45-0.35-0.6l-1.01-1.76c-0.05-0.08-0.14-0.25-0.19-0.33l-0.82-1.47c-0.07-0.12-0.2-0.35-0.27-0.47-0.38-0.67-1.15-2-1.53-2.67-0.08-0.14-0.24-0.41-0.32-0.54-0.62-1.03-1.24-2.07-1.84-3.1-27.73-48.12-55.5-96.21-83.29-144.3-1.74-3.0004-3.32-6.1204-5.45-8.8804l-0.05-0.45005-0.04-0.49z"/> <path d="m166.15 0.60955l0.56-0.02 0.05 0.45005-0.7 0.11 0.09-0.54005z" fill=#089156 /> <path d="m166.76 1.0396c2.13 2.76 3.71 5.88 5.45 8.88 27.79 48.09 55.56 96.18 83.29 144.3-12.84 22.36-25.78 44.67-38.67 67.01-1.73-10.7-4.96-21.08-7.02-31.72-3.19-11.41-4.96-23.16-8.26-34.55-3.8-18.4-8.43-36.64-12.58-54.97-6.33-26.73-12.41-53.52-18.43-80.33-1.4-6.17-3.26-12.28-3.78-18.62z" fill=#089156 /> <path d="m164.39 3.5996c0.03-0.05 0.1-0.16 0.13-0.21-0.03 0.05-0.1 0.16-0.13 0.21z" fill=#089156 /> <path d="m163.27 5.4996c0.05-0.07 0.13-0.22 0.17-0.29-0.04 0.07-0.12 0.22-0.17 0.29z" fill=#089156 /> <path d="m161.91 7.9296c0.09-0.17 0.27-0.49 0.36-0.65-0.09 0.16-0.27 0.48-0.36 0.65z" fill=#089156 /> <path d="m161.56 8.5296c0.08-0.15 0.26-0.45 0.35-0.6-0.09 0.15-0.27 0.45-0.35 0.6z" fill=#089156 /> <path d="m160.38 10.55c0.04-0.08 0.12-0.22 0.16-0.3-0.04 0.08-0.12 0.22-0.16 0.3z" fill=#089156 /> <path d="m159.31 12.84c0.05-0.16 0.14-0.48 0.19-0.64-0.05 0.16-0.14 0.48-0.19 0.64z" fill=#089156 /> <path d="m157.91 15.07c0.35-0.56 1.05-1.67 1.4-2.23-0.35 0.56-1.05 1.67-1.4 2.23z" fill=#089156 /> <path d="m157.37 15.85c0.14-0.19 0.4-0.58 0.54-0.78-0.14 0.2-0.4 0.59-0.54 0.78z" fill=#089156 /> <path d="m156.32 17.54c0.07-0.12 0.22-0.37 0.29-0.5-0.07 0.13-0.22 0.38-0.29 0.5z" fill=#089156 /> <path d="m155.32 19.85c0.03-0.17 0.11-0.51 0.15-0.68-0.04 0.17-0.12 0.51-0.15 0.68z" fill=#089156 /> <path d="m153.86 22.05c0.37-0.55 1.09-1.65 1.46-2.2-0.37 0.55-1.09 1.65-1.46 2.2z" fill=#089156 /> <path d="m153.35 22.82c0.13-0.19 0.39-0.58 0.51-0.77-0.12 0.19-0.38 0.58-0.51 0.77z" fill=#089156 /> <path d="m152.3 24.55c0.06-0.11 0.18-0.32 0.24-0.42-0.06 0.1-0.18 0.31-0.24 0.42z" fill=#089156 /> <path d="m150.94 26.94c0.1-0.17 0.3-0.52 0.4-0.7-0.1 0.18-0.3 0.53-0.4 0.7z" fill=#089156 /> <path d="m150.58 27.56c0.09-0.16 0.27-0.46 0.36-0.62-0.09 0.16-0.27 0.46-0.36 0.62z" fill=#089156 /> <path d="m149.39 29.56c0.05-0.07 0.14-0.22 0.18-0.3-0.04 0.08-0.13 0.23-0.18 0.3z" fill=#089156 /> <path d="m148.29 31.48c0.04-0.07 0.12-0.21 0.16-0.29-0.04 0.08-0.12 0.22-0.16 0.29z" fill=#089156 /> <path d="m146.9 33.89c0.1-0.16 0.29-0.5 0.39-0.66-0.1 0.16-0.29 0.5-0.39 0.66z" fill=#089156 /> <path d="m146.51 34.56c0.1-0.17 0.29-0.5 0.39-0.67-0.1 0.17-0.29 0.5-0.39 0.67z" fill=#089156 /> <path d="m145.36 36.54c0.03-0.07 0.11-0.2 0.15-0.27-0.04 0.07-0.12 0.2-0.15 0.27z" fill=#089156 /> <path d="m144.32 38.88c0.04-0.17 0.13-0.51 0.17-0.68-0.04 0.17-0.13 0.51-0.17 0.68z" fill=#089156 /> <path d="m142.86 41.11c0.36-0.56 1.09-1.68 1.46-2.23-0.37 0.55-1.1 1.67-1.46 2.23z" fill=#089156 /> <path d="m142.37 41.87c0.12-0.19 0.36-0.57 0.49-0.76-0.13 0.19-0.37 0.57-0.49 0.76z" fill=#089156 /> <path d="m141.11 44.14c0.15-0.29 0.44-0.86 0.58-1.15-0.14 0.29-0.43 0.86-0.58 1.15z" fill=#089156 /> <path d="m140.1 45.99c0.13-0.2 0.38-0.61 0.5-0.81-0.12 0.2-0.37 0.61-0.5 0.81z" fill=#089156 /> <path d="m139.54 46.77c0.14-0.2 0.42-0.58 0.56-0.78-0.14 0.2-0.42 0.58-0.56 0.78z" fill=#089156 /> <path d="m138.38 48.58c0.13-0.2 0.38-0.62 0.5-0.83-0.12 0.21-0.37 0.63-0.5 0.83z" fill=#089156 /> <path d="m137.07 51.17c0.11-0.23 0.34-0.7 0.45-0.93-0.11 0.23-0.34 0.7-0.45 0.93z" fill=#089156 /> <path d="m136.09 53c0.12-0.2 0.37-0.6 0.49-0.8-0.12 0.2-0.37 0.6-0.49 0.8z" fill=#089156 /> <path d="m135.53 53.76c0.14-0.19 0.42-0.57 0.56-0.76-0.14 0.19-0.42 0.57-0.56 0.76z" fill=#089156 /> <path d="m134.2 55.92c0.16-0.3 0.5-0.91 0.67-1.22-0.17 0.31-0.51 0.92-0.67 1.22z" fill=#089156 /> <path d="m133.29 57.86c0.1-0.2 0.28-0.59 0.38-0.79-0.1 0.2-0.28 0.59-0.38 0.79z" fill=#089156 /> <path d="m131.92 60.07c0.34-0.56 1.03-1.66 1.37-2.21-0.34 0.55-1.03 1.65-1.37 2.21z" fill=#089156 /> <path d="m131.37 60.87c0.14-0.2 0.41-0.6 0.55-0.8-0.14 0.2-0.41 0.6-0.55 0.8z" fill=#089156 /> <path d="m130.34 62.58c0.07-0.12 0.21-0.37 0.28-0.49-0.07 0.12-0.21 0.37-0.28 0.49z" fill=#089156 /> <path d="m129.22 64.83c0.06-0.14 0.2-0.42 0.27-0.56-0.07 0.14-0.21 0.42-0.27 0.56z" fill=#089156 /> <path d="m127.8 67.27c0.35-0.61 1.06-1.83 1.42-2.44l0.07 1.17c-0.37 0.32-1.12 0.96-1.49 1.27z" fill=#089156 /> <path d="m127.41 67.82c0.1-0.14 0.29-0.41 0.39-0.55-0.1 0.14-0.29 0.41-0.39 0.55z" fill=#089156 /> <path d="m126.13 70.15c0.18-0.39 0.55-1.17 0.73-1.56-0.18 0.39-0.55 1.17-0.73 1.56z" fill=#089156 /> <path d="m125.09 71.99c0.12-0.2 0.37-0.6 0.5-0.8-0.13 0.2-0.38 0.6-0.5 0.8z" fill=#089156 /> <path d="m124.54 72.77c0.14-0.2 0.41-0.59 0.55-0.78-0.14 0.19-0.41 0.58-0.55 0.78z" fill=#089156 /> <path d="m123.39 74.56c0.12-0.2 0.37-0.61 0.5-0.81-0.13 0.2-0.38 0.61-0.5 0.81z" fill=#089156 /> <path d="m122.19 76.66c0.06-0.1 0.18-0.32 0.24-0.42-0.06 0.1-0.18 0.32-0.24 0.42z" fill=#089156 /> <path d="m121.14 78.55l0.32-0.56-0.32 0.56z" fill=#089156 /> <path d="m119.25 81.78c0.08-0.13 0.24-0.41 0.32-0.55-0.08 0.14-0.24 0.42-0.32 0.55z" fill=#089156 /> <path d="m118.19 83.63c0.09-0.16 0.27-0.47 0.36-0.62-0.09 0.15-0.27 0.46-0.36 0.62z" fill=#089156 /> <path d="m116.9 85.88c0.11-0.19 0.33-0.58 0.45-0.78-0.12 0.2-0.34 0.59-0.45 0.78z" fill=#089156 /> <path d="m116.5 86.55c0.1-0.16 0.3-0.5 0.4-0.67-0.1 0.17-0.3 0.51-0.4 0.67z" fill=#089156 /> <path d="m115.34 88.51l0.16-0.28-0.16 0.28z" fill=#089156 /> <path d="m114.32 90.88c0.04-0.18 0.11-0.53 0.15-0.7-0.04 0.17-0.11 0.52-0.15 0.7z" fill=#089156 /> <path d="m112.86 93.05c0.36-0.54 1.09-1.63 1.46-2.17-0.37 0.54-1.1 1.63-1.46 2.17z" fill=#089156 /> <path d="m112.34 93.83c0.13-0.19 0.39-0.58 0.52-0.78-0.13 0.2-0.39 0.59-0.52 0.78z" fill=#089156 /> <path d="m111.32 95.49l0.28-0.48-0.28 0.48z" fill=#089156 /> <path d="m109.93 97.96c0.1-0.18 0.3-0.53 0.4-0.71-0.1 0.18-0.3 0.53-0.4 0.71z" fill=#089156 /> <path d="m109.56 98.58c0.09-0.15 0.27-0.47 0.37-0.62-0.1 0.15-0.28 0.47-0.37 0.62z" fill=#089156 /> <path d="m108.4 100.55c0.04-0.07 0.12-0.21 0.17-0.28-0.05 0.07-0.13 0.21-0.17 0.28z" fill=#089156 /> <path d="m107.29 102.46c0.03-0.06 0.1-0.17 0.13-0.23-0.03 0.06-0.1 0.17-0.13 0.23z" fill=#089156 /> <path d="m214.02 225.86c0.17-0.28 0.53-0.84 0.7-1.11-0.17 0.27-0.53 0.83-0.7 1.11z" fill=#089156 /> <path d="m213.58 226.64c0.05-0.08 0.14-0.25 0.18-0.33-0.04 0.08-0.13 0.25-0.18 0.33z" fill=#089156 /> <path d="m211.72 230.02c0.08-0.13 0.23-0.39 0.3-0.52-0.07 0.13-0.22 0.39-0.3 0.52z" fill=#089156 /> <path d="m210.67 231.87c0.08-0.15 0.25-0.44 0.34-0.59-0.09 0.15-0.26 0.44-0.34 0.59z" fill=#089156 /> <path d="m209.66 233.64c0.05-0.08 0.14-0.24 0.18-0.32-0.04 0.08-0.13 0.24-0.18 0.32z" fill=#089156 /> <path d="m208.27 236.07c0.09-0.16 0.27-0.48 0.36-0.63-0.09 0.15-0.27 0.47-0.36 0.63z" fill=#089156 /> <path d="m207.87 236.74c0.1-0.17 0.3-0.5 0.4-0.67-0.1 0.17-0.3 0.5-0.4 0.67z" fill=#089156 /> <path d="m206.54 239.02c0.08-0.13 0.24-0.41 0.32-0.54-0.08 0.13-0.24 0.41-0.32 0.54z" fill=#089156 /> <path d="m205.5 240.8c0.1-0.18 0.32-0.55 0.42-0.73-0.1 0.18-0.32 0.55-0.42 0.73z" fill=#089156 /> <path d="m203.62 244.07c0.07-0.13 0.22-0.38 0.29-0.5-0.07 0.12-0.22 0.37-0.29 0.5z" fill=#089156 /> <path d="m202.56 245.86c0.11-0.19 0.33-0.55 0.43-0.74-0.1 0.19-0.32 0.55-0.43 0.74z" fill=#089156 /> <path d="m200.71 249.06c0.09-0.15 0.26-0.46 0.35-0.61-0.09 0.15-0.26 0.46-0.35 0.61z" fill=#089156 /> <path d="m199.68 250.9c0.07-0.12 0.21-0.37 0.28-0.49-0.07 0.12-0.21 0.37-0.28 0.49z" fill=#089156 /> <path d="m198.59 252.81l0.32-0.56-0.32 0.56z" fill=#089156 /> <path d="m196.66 256.09c0.09-0.16 0.27-0.47 0.36-0.62-0.09 0.15-0.27 0.46-0.36 0.62z" fill=#089156 /> <path d="m195.69 257.84c0.06-0.12 0.19-0.35 0.26-0.47-0.07 0.12-0.2 0.35-0.26 0.47z" fill=#089156 /> <path d="m194.58 259.76c0.07-0.12 0.22-0.37 0.29-0.5-0.07 0.13-0.22 0.38-0.29 0.5z" fill=#089156 /> <path d="m192.6 263.15c0.08-0.13 0.24-0.39 0.31-0.52-0.07 0.13-0.23 0.39-0.31 0.52z" fill=#089156 /> <path d="m191.59 264.85c0.1-0.18 0.31-0.53 0.41-0.71-0.1 0.18-0.31 0.53-0.41 0.71z" fill=#089156 /> <path d="m189.82 267.94c0.06-0.11 0.2-0.35 0.26-0.46-0.06 0.11-0.2 0.35-0.26 0.46z" fill=#089156 /> <path d="m188.76 269.83c0.06-0.11 0.18-0.32 0.24-0.43-0.06 0.11-0.18 0.32-0.24 0.43z" fill=#089156 /> <path d="m187.64 271.76c0.07-0.11 0.21-0.35 0.28-0.46-0.07 0.11-0.21 0.35-0.28 0.46z" fill=#089156 /> <path d="m185.65 275.09c0.11-0.18 0.31-0.54 0.42-0.71-0.11 0.17-0.31 0.53-0.42 0.71z" fill=#089156 /> <path d="m184.76 276.74c0.07-0.13 0.22-0.41 0.3-0.55-0.08 0.14-0.23 0.42-0.3 0.55z" fill=#089156 /> <path d="m183.39 279.12c0.08-0.15 0.26-0.45 0.34-0.6-0.08 0.15-0.26 0.45-0.34 0.6z" fill=#089156 /> <path d="m183.06 279.69c0.08-0.14 0.24-0.43 0.33-0.57-0.09 0.14-0.25 0.43-0.33 0.57z" fill=#089156 /> <path d="m346.42 3.2196c0.08 0.13 0.23 0.41 0.31 0.55-0.08-0.14-0.23-0.42-0.31-0.55z" fill=#10985b /> <path d="m354.54 17.35c0.05 0.08 0.13 0.23 0.18 0.3-0.05-0.07-0.13-0.22-0.18-0.3z" fill=#10985b /> <path d="m369.55 43.36c0.04 0.07 0.13 0.21 0.17 0.29-0.04-0.08-0.13-0.22-0.17-0.29z" fill=#10985b /> <path d="m372.44 48.25c0.08 0.13 0.23 0.4 0.31 0.54-0.08-0.14-0.23-0.41-0.31-0.54z" fill=#10985b /> <path d="m376.53 55.37c0.05 0.07 0.13 0.21 0.17 0.29-0.04-0.08-0.12-0.22-0.17-0.29z" fill=#10985b /> <path d="m380.48 62.24c0.08 0.13 0.23 0.39 0.31 0.52-0.08-0.13-0.23-0.39-0.31-0.52z" fill=#10985b /> <path d="m384.51 69.22c0.08 0.13 0.23 0.4 0.31 0.53-0.08-0.13-0.23-0.4-0.31-0.53z" fill=#10985b /> <path d="m420.57 131.65c17.39 30.13 34.89 60.21 52.14 90.43 0.08 0.13 0.24 0.41 0.32 0.54 0.4 0.66 1.2 1.97 1.59 2.62 0.08 0.13 0.24 0.4 0.32 0.53l0.8 1.37c0.05 0.09 0.15 0.28 0.21 0.37l1 1.74c0.1 0.17 0.29 0.52 0.39 0.69 0.09 0.15 0.27 0.46 0.36 0.62l0.98 1.7 0.16 0.28 0.98 1.68c0.04 0.07 0.12 0.2 0.16 0.27l0.98 1.7c0.1 0.17 0.29 0.5 0.39 0.67 0.09 0.17 0.28 0.5 0.37 0.66l1.01 1.78c0.14 0.35 0.42 1.03 0.56 1.37l0.28 0.55 0.13 0.29 0.22 0.29 0.59 0.89c0.21 0.33 0.62 0.99 0.83 1.32 0.12 0.2 0.38 0.6 0.5 0.8l0.66 1.05c0.2 0.45 0.6 1.36 0.8 1.81l0.3 0.54 0.11 0.21 0.09 0.13c0.44 0.65 1.31 1.96 1.75 2.61 0.11 0.18 0.33 0.54 0.45 0.72l0.6 1c0.09 0.16 0.27 0.47 0.36 0.62l1.01 1.77c0.09 0.16 0.27 0.48 0.36 0.64s0.27 0.47 0.36 0.63l1 1.71c0.04 0.08 0.13 0.23 0.18 0.3l0.91 1.6c0.06 0.1 0.18 0.31 0.24 0.41l0.92 1.61c0.11 0.18 0.32 0.55 0.43 0.73 0.09 0.16 0.28 0.48 0.37 0.64 0.74 1.23 1.45 2.48 2.11 3.76 0.1 0.21 0.3 0.63 0.39 0.84l0.46 1.04c0.12 0.2 0.36 0.61 0.47 0.81 0.15 0.2 0.44 0.58 0.59 0.77l0.69 0.98c0.12 0.19 0.36 0.57 0.49 0.77l1.01 1.75c0.09 0.16 0.27 0.48 0.36 0.64s0.27 0.47 0.37 0.63l1 1.72c0.04 0.08 0.12 0.22 0.16 0.29l0.95 1.66c0.04 0.07 0.12 0.2 0.16 0.27l0.97 1.69c0.1 0.17 0.3 0.51 0.4 0.69 0.1 0.17 0.3 0.51 0.39 0.68l1 1.72c0.04 0.07 0.11 0.21 0.15 0.28l1.06 1.98-0.01 0.9c-25.02-7.19-49.64-15.72-74.73-22.65-22.77-7.35-45.75-14.04-68.52-21.35 3.17-1.52 6.56-2.49 9.73-3.99 0.41-1.35 0.84-2.69 1.26-4.02 3.95-2.48 8.41-3.97 12.3-6.54 0.15-3.29 0.14-6.57 0.13-9.85 4.36-3.51 8.98-6.76 12.57-11.11 0.36-4.28-2.87-9.29 0.46-12.9 10.24-12.92 16.45-28.93 17.56-45.38 1.83-6.02-1.46-11.98-0.1-17.97z" fill=#f9c941 /> <path d="m509.91 287.41l0.52 0.02 0.29 0.76-0.59 0.04-0.22-0.82z" fill=#f9c941 /> <path d="m257.34 157.32c0.08 0.13 0.24 0.4 0.32 0.54-0.08-0.14-0.24-0.41-0.32-0.54z" fill=#e3b73a /> <path d="m259.19 160.53c0.07 0.12 0.2 0.35 0.27 0.47-0.07-0.12-0.2-0.35-0.27-0.47z" fill=#e3b73a /> <path d="m260.28 162.47c0.05 0.08 0.14 0.25 0.19 0.33-0.05-0.08-0.14-0.25-0.19-0.33z" fill=#e3b73a /> <path d="m261.48 164.56c0.09 0.15 0.26 0.45 0.35 0.6-0.09-0.15-0.26-0.45-0.35-0.6z" fill=#e3b73a /> <path d="m261.83 165.16c0.09 0.17 0.28 0.49 0.38 0.65-0.1-0.16-0.29-0.48-0.38-0.65z" fill=#e3b73a /> <path d="m263.16 167.44c0.05 0.09 0.16 0.27 0.21 0.36-0.05-0.09-0.16-0.27-0.21-0.36z" fill=#e3b73a /> <path d="m265.34 171.21c0.09 0.16 0.26 0.47 0.35 0.62-0.09-0.15-0.26-0.46-0.35-0.62z" fill=#e3b73a /> <path d="m267.23 174.48c0.09 0.15 0.26 0.43 0.34 0.57-0.08-0.14-0.25-0.42-0.34-0.57z" fill=#e3b73a /> <path d="m268.43 176.5c0.2 0.33 0.59 0.98 0.79 1.31-0.2-0.33-0.59-0.98-0.79-1.31z" fill=#e3b73a /> <path d="m269.49 178.29c0.04 0.09 0.14 0.26 0.19 0.34-0.05-0.08-0.15-0.25-0.19-0.34z" fill=#e3b73a /> <path d="m271.44 181.79c0.19 0.26 0.57 0.8 0.76 1.07-0.19-0.27-0.57-0.81-0.76-1.07z" fill=#e3b73a /> <path d="m272.46 183.32c0.04 0.08 0.13 0.25 0.18 0.33-0.05-0.08-0.14-0.25-0.18-0.33z" fill=#e3b73a /> <path d="m275.45 188.72c0.19 0.28 0.56 0.84 0.75 1.12-0.19-0.28-0.56-0.84-0.75-1.12z" fill=#e3b73a /> <path d="m276.47 190.31c0.04 0.08 0.14 0.25 0.18 0.33-0.04-0.08-0.14-0.25-0.18-0.33z" fill=#e3b73a /> <path d="m278.23 193.51c0.09 0.15 0.26 0.45 0.35 0.6-0.09-0.15-0.26-0.45-0.35-0.6z" fill=#e3b73a /> <path d="m279.22 195.24c0.1 0.17 0.3 0.53 0.4 0.7-0.1-0.17-0.3-0.53-0.4-0.7z" fill=#e3b73a /> <path d="m280.45 197.4c0.1 0.18 0.31 0.55 0.41 0.73-0.1-0.18-0.31-0.55-0.41-0.73z" fill=#e3b73a /> <path d="m280.86 198.13c0.09 0.15 0.27 0.47 0.36 0.63-0.09-0.16-0.27-0.48-0.36-0.63z" fill=#e3b73a /> <path d="m282.24 200.51c0.04 0.08 0.13 0.22 0.17 0.29-0.04-0.07-0.13-0.21-0.17-0.29z" fill=#e3b73a /> <path d="m283.38 202.47c0.08 0.14 0.24 0.41 0.32 0.55-0.08-0.14-0.24-0.41-0.32-0.55z" fill=#e3b73a /> <path d="m284.31 204.06c0.11 0.18 0.32 0.55 0.43 0.73-0.11-0.18-0.32-0.55-0.43-0.73z" fill=#e3b73a /> <path d="m286.47 207.71c0.17 0.29 0.52 0.86 0.69 1.15-0.17-0.29-0.52-0.86-0.69-1.15z" fill=#e3b73a /> <path d="m287.45 209.32c0.05 0.09 0.15 0.25 0.2 0.33-0.05-0.08-0.15-0.24-0.2-0.33z" fill=#e3b73a /> <path d="m289.43 212.46l0.07 0.1 0.06 0.13c-0.03-0.06-0.1-0.17-0.13-0.23z" fill=#e3b73a /> <path d="m291.5 216.56c0.09 0.15 0.25 0.44 0.34 0.59-0.09-0.15-0.25-0.44-0.34-0.59z" fill=#e3b73a /> <path d="m291.84 217.15l0.4 0.68-0.4-0.68z" fill=#e3b73a /> <path d="m293.19 219.44c0.05 0.09 0.15 0.27 0.21 0.36-0.06-0.09-0.16-0.27-0.21-0.36z" fill=#e3b73a /> <path d="m294.06 220.98c11.53 4.24 23.46 7.26 35.11 11.11 12.52 3.71 24.94 7.72 37.49 11.32 22.77 7.31 45.75 14 68.52 21.35-0.34 4.87 0.62 9.86-0.59 14.64-0.93 4.65-6.49 5.38-8.78 9.09-30.77 0.01-61.53 0.1-92.29-0.03l-0.66-0.05c-12.71-22.6-25.93-44.92-38.8-67.43z" fill=#e3b73a /> <path d="m472.71 222.08c0.08 0.13 0.24 0.41 0.32 0.54-0.08-0.13-0.24-0.41-0.32-0.54z" fill=#e8b835 /> <path d="m474.62 225.24c0.08 0.13 0.24 0.4 0.32 0.53-0.08-0.13-0.24-0.4-0.32-0.53z" fill=#e8b835 /> <path d="m475.74 227.14c0.05 0.09 0.15 0.28 0.21 0.37-0.06-0.09-0.16-0.28-0.21-0.37z" fill=#e8b835 /> <path d="m476.95 229.25c0.1 0.17 0.29 0.52 0.39 0.69-0.1-0.17-0.29-0.52-0.39-0.69z" fill=#e8b835 /> <path d="m477.34 229.94c0.09 0.15 0.27 0.46 0.36 0.62-0.09-0.16-0.27-0.47-0.36-0.62z" fill=#e8b835 /> <path d="m478.68 232.26l0.16 0.28-0.16-0.28z" fill=#e8b835 /> <path d="m479.82 234.22c0.04 0.07 0.12 0.2 0.16 0.27-0.04-0.07-0.12-0.2-0.16-0.27z" fill=#e8b835 /> <path d="m480.96 236.19c0.1 0.17 0.29 0.5 0.39 0.67-0.1-0.17-0.29-0.5-0.39-0.67z" fill=#e8b835 /> <path d="m481.35 236.86c0.09 0.17 0.28 0.5 0.37 0.66-0.09-0.16-0.28-0.49-0.37-0.66z" fill=#e8b835 /> <path d="m482.73 239.3c0.14 0.35 0.42 1.03 0.56 1.37-0.14-0.34-0.42-1.02-0.56-1.37z" fill=#e8b835 /> <path d="m483.57 241.22c0.09 0.15 0.26 0.44 0.35 0.58l-0.22-0.29-0.13-0.29z" fill=#e8b835 /> <path d="m484.51 242.69c0.21 0.33 0.62 0.99 0.83 1.32-0.21-0.33-0.62-0.99-0.83-1.32z" fill=#e8b835 /> <path d="m485.34 244.01c0.12 0.2 0.38 0.6 0.5 0.8-0.12-0.2-0.38-0.6-0.5-0.8z" fill=#e8b835 /> <path d="m486.5 245.86c0.2 0.45 0.6 1.36 0.8 1.81-0.2-0.45-0.6-1.36-0.8-1.81z" fill=#e8b835 /> <path d="m487.6 248.21c0.05 0.09 0.15 0.26 0.2 0.34l-0.09-0.13-0.11-0.21z" fill=#e8b835 /> <path d="m489.55 251.16c0.11 0.18 0.33 0.54 0.45 0.72-0.12-0.18-0.34-0.54-0.45-0.72z" fill=#e8b835 /> <path d="m490.6 252.88c0.09 0.16 0.27 0.47 0.36 0.62-0.09-0.15-0.27-0.46-0.36-0.62z" fill=#e8b835 /> <path d="m491.97 255.27c0.09 0.16 0.27 0.48 0.36 0.64-0.09-0.16-0.27-0.48-0.36-0.64z" fill=#e8b835 /> <path d="m492.33 255.91c0.09 0.16 0.27 0.47 0.36 0.63-0.09-0.16-0.27-0.47-0.36-0.63z" fill=#e8b835 /> <path d="m493.69 258.25c0.04 0.08 0.13 0.23 0.18 0.3-0.05-0.07-0.14-0.22-0.18-0.3z" fill=#e8b835 /> <path d="m494.78 260.15c0.06 0.1 0.18 0.31 0.24 0.41-0.06-0.1-0.18-0.31-0.24-0.41z" fill=#e8b835 /> <path d="m495.94 262.17c0.11 0.18 0.32 0.55 0.43 0.73-0.11-0.18-0.32-0.55-0.43-0.73z" fill=#e8b835 /> <path d="m496.37 262.9c0.09 0.16 0.28 0.48 0.37 0.64-0.09-0.16-0.28-0.48-0.37-0.64z" fill=#e8b835 /> <path d="m435.18 264.76c25.09 6.93 49.71 15.46 74.73 22.65l0.22 0.82c-28.09 0.64-56.22 0.11-84.32 0.26 2.29-3.71 7.85-4.44 8.78-9.09 1.21-4.78 0.25-9.77 0.59-14.64z" fill=#e8b835 /> <path d="m498.85 267.3c0.1 0.21 0.3 0.63 0.39 0.84-0.09-0.21-0.29-0.63-0.39-0.84z" fill=#e8b835 /> <path d="m499.7 269.18c0.12 0.2 0.36 0.61 0.47 0.81-0.11-0.2-0.35-0.61-0.47-0.81z" fill=#e8b835 /> <path d="m500.17 269.99c0.15 0.2 0.44 0.58 0.59 0.77-0.15-0.19-0.44-0.57-0.59-0.77z" fill=#e8b835 /> <path d="m501.45 271.74c0.12 0.19 0.36 0.57 0.49 0.77-0.13-0.2-0.37-0.58-0.49-0.77z" fill=#e8b835 /> <path d="m502.95 274.26c0.09 0.16 0.27 0.48 0.36 0.64-0.09-0.16-0.27-0.48-0.36-0.64z" fill=#e8b835 /> <path d="m503.31 274.9c0.09 0.16 0.27 0.47 0.37 0.63-0.1-0.16-0.28-0.47-0.37-0.63z" fill=#e8b835 /> <path d="m504.68 277.25c0.04 0.08 0.12 0.22 0.16 0.29-0.04-0.07-0.12-0.21-0.16-0.29z" fill=#e8b835 /> <path d="m505.79 279.2c0.04 0.07 0.12 0.2 0.16 0.27-0.04-0.07-0.12-0.2-0.16-0.27z" fill=#e8b835 /> <path d="m506.92 281.16c0.1 0.17 0.3 0.51 0.4 0.69-0.1-0.18-0.3-0.52-0.4-0.69z" fill=#e8b835 /> <path d="m507.32 281.85c0.1 0.17 0.3 0.51 0.39 0.68-0.09-0.17-0.29-0.51-0.39-0.68z" fill=#e8b835 /> <path d="m508.71 284.25c0.04 0.07 0.11 0.21 0.15 0.28-0.04-0.07-0.11-0.21-0.15-0.28z" fill=#e8b835 /> <path d="m509.92 286.51c0.13 0.23 0.38 0.69 0.51 0.92l-0.52-0.02 0.01-0.9z" fill=#e8b835 /> <path d="m147.21 341.08c10.31-17.58 20.11-35.49 30.76-52.86 51.63 0.19 103.27-0.29 154.89 0.19l0.66 0.05c-26.11 0.84-52.29-0.22-78.4 0.44-4.98 3.21-8.3 8.41-13.07 11.91-4.43 3.23-7.69 7.73-11.92 11.18-5.93 4.37-10.34 10.43-16.36 14.71-6.96 7.37-14.99 13.58-22.01 20.91-5.26 4.04-9.66 9.03-14.56 13.48-5.39 3.91-9.52 9.21-14.56 13.53-0.13 0.11-0.38 0.33-0.51 0.45-0.27 0.21-0.8 0.65-1.07 0.86-0.13 0.11-0.37 0.31-0.5 0.42-3.97 3.07-7.01 7.12-10.91 10.27-0.13 0.11-0.38 0.32-0.5 0.42-0.13 0.11-0.38 0.32-0.51 0.42-5.69 4.67-10.25 10.58-16.22 14.93-6.01 5.96-12.79 11.08-18.5 17.36-8.44 6.94-15.74 15.13-24.44 21.78 2.16-4.71 5.02-9.03 7.53-13.54 16.74-28.97 33.46-57.94 50.2-86.91z" fill=#296ad9 /> <path d="m89.04 442.17c0.11-0.16 0.33-0.48 0.44-0.64l-0.03 0.65-0.41-0.01z" fill=#296ad9 /> <path id=#2a71e9ff fill=#2a71e9 d="m333.52 288.46c30.76 0.13 61.52 0.04 92.29 0.03 28.1-0.15 56.23 0.38 84.32-0.26l0.59-0.04 0.4 0.11v0.08c-29.66 51.27-59.23 102.6-88.89 153.88-110.93-0.03-221.86 0.1-332.78-0.08l0.03-0.65c8.7-6.65 16-14.84 24.44-21.78 5.71-6.28 12.49-11.4 18.5-17.36 5.97-4.35 10.53-10.26 16.22-14.93 0.13-0.1 0.38-0.31 0.51-0.42 0.12-0.1 0.37-0.31 0.5-0.42 3.9-3.15 6.94-7.2 10.91-10.27 0.13-0.11 0.37-0.31 0.5-0.42 0.27-0.21 0.8-0.65 1.07-0.86 0.13-0.12 0.38-0.34 0.51-0.45 5.04-4.32 9.17-9.62 14.56-13.53 4.9-4.45 9.3-9.44 14.56-13.48 7.02-7.33 15.05-13.54 22.01-20.91 6.02-4.28 10.43-10.34 16.36-14.71 4.23-3.45 7.49-7.95 11.92-11.18 4.77-3.5 8.09-8.7 13.07-11.91 26.11-0.66 52.29 0.4 78.4-0.44z"/> <path d="m162.13 375.07c0.13-0.12 0.38-0.34 0.51-0.45-0.13 0.11-0.38 0.33-0.51 0.45z" fill=#286ee6 /> <path d="m161.06 375.93c0.27-0.21 0.8-0.65 1.07-0.86-0.27 0.21-0.8 0.65-1.07 0.86z" fill=#286ee6 /> <path d="m160.56 376.35c0.13-0.11 0.37-0.31 0.5-0.42-0.13 0.11-0.37 0.31-0.5 0.42z" fill=#286ee6 /> <path d="m149.15 387.04c0.12-0.1 0.37-0.31 0.5-0.42-0.13 0.11-0.38 0.32-0.5 0.42z" fill=#286ee6 /> <path d="m148.64 387.46c0.13-0.1 0.38-0.31 0.51-0.42-0.13 0.11-0.38 0.32-0.51 0.42z" fill=#286ee6 /> </svg> <div>Google Drive</div> </button> </div> </div> </div> <div class="rs-box rs-box-sign-in"> <div class=rs-content> <form name=rs-sign-in-form class=rs-sign-in-form> <h1 class=rs-big-headline>Connect your storage</h1> <input type=text name=rs-user-address placeholder=user@provider.com autocapitalize=off> <div class="rs-sign-in-error rs-hidden"></div> <input type=submit class=rs-connect value=Connect> <a href=https://remotestorage.io/get/ class=rs-help target=_blank>Need help?</a> </form> </div> </div> </div> ';
},function(e,t){e.exports='/* RemoteStorage widget styles */\n\n.rs-widget {\n box-sizing: border-box;\n z-index: 21000000; /* Make sure we\'re on a reasonably high visibility layer */\n overflow: hidden;\n max-width: 350px;\n padding: 10px;\n margin: 10px;\n border-radius: 3px;\n background-color: #fff;\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\n font-family: arial, sans-serif;\n font-size: 16px;\n color: #333;\n will-change: max-height, height, width, opacity, max-width, background, box-shadow;\n transition-property: width, height, opacity, max-width, max-height, background, box-shadow;\n transition-duration: 300ms;\n}\n\n.rs-widget * {\n box-sizing: border-box;\n}\n\n.rs-widget .rs-hidden {\n display: none;\n}\n\n.rs-box {\n overflow: hidden;\n will-change: height;\n transition-property: height, width, max-height;\n transition-duration: 300ms;\n transition-timing-function: ease-in;\n opacity: 0;\n max-height: 0px;\n}\n\n.rs-box.rs-selected {\n opacity: 1;\n max-height: 420px;\n}\n\n/* Main logo */\n.rs-main-logo {\n float: left;\n height: 36px;\n width: 36px;\n margin-top: 1px;\n margin-right: 0.625em;\n transition: margin-left 300ms ease-out, transform 300ms ease-out;\n cursor: pointer;\n}\n.rs-widget .rs-backend-remotestorage svg#rs-main-logo-remotestorage,\n{\n display: normal;\n}\n.rs-widget[class*="rs-backend-"]:not(.rs-backend-remotestorage) svg#rs-main-logo-remotestorage {\n display: none;\n}\n.rs-widget.rs-backend-dropbox svg#rs-main-logo-dropbox {\n display: normal;\n}\n.rs-widget:not(.rs-backend-dropbox) svg#rs-main-logo-dropbox {\n display: none;\n}\n.rs-widget.rs-backend-googledrive svg#rs-main-logo-googledrive {\n display: normal;\n}\n.rs-widget:not(.rs-backend-googledrive) svg#rs-main-logo-googledrive {\n display: none;\n}\n\npolygon.rs-logo-shape {\n fill: #FF4B03;\n}\n\npolygon.rs-logo-shape,\n#rs-main-logo-dropbox path,\n#rs-main-logo-googledrive path {\n transition-property: fill;\n transition-duration: 0.5s;\n}\n\n.rs-offline polygon.rs-logo-shape,\n.rs-offline #rs-main-logo-dropbox path,\n.rs-offline #rs-main-logo-googledrive path {\n fill: #888;\n transition-property: fill;\n transition-duration: 0.5s;\n}\n\n/* Hide everything except logo when connected and clicked outside of box */\n.rs-closed {\n max-width: 56px;\n background-color: transparent;\n box-shadow: none;\n opacity: 0.5;\n\n transition: max-height 100ms ease-out 0ms, max-width 300ms ease-out 300ms, background 300ms ease-in 200ms, opacity 300ms ease 200ms; \n}\n\n.rs-closed:hover {\n cursor: pointer;\n opacity: 1;\n}\n\n.rs-box-initial {\n transition-duration: 0ms;\n}\n\n.rs-box-initial:hover {\n cursor: pointer;\n}\n\n.rs-widget a {\n color: #0093cc;\n}\n\n/* HEADLINE */\n.rs-small-headline {\n font-size: 1em;\n font-weight: bold;\n margin: 0;\n margin-bottom: 2px;\n height: 1.2em;\n word-break: break-all;\n overflow: hidden;\n line-height: 1em;\n}\n\n.rs-sub-headline {\n word-break: break-all;\n overflow: hidden;\n color: #666;\n font-size: 0.92em;\n height: 1.2em;\n}\n.rs-big-headline {\n font-size: 1.625em;\n font-weight: normal;\n text-align: center;\n margin-top: 20px;\n margin-bottom: 20px;\n}\n\n/* BUTTONS */\n.rs-button {\n font: inherit;\n color: inherit;\n background-color: transparent;\n border: 1px solid #dcdcdc;\n border-radius: 3px;\n cursor: pointer;\n}\n.rs-button-small {\n padding: 0.5em 0.6em;\n margin-left: 0.3em;\n transition: border-color 300ms ease-out;\n}\n.rs-button-wrap {\n margin-top: 10px;\n}\n\n.rs-button-wrap img,\n.rs-button-wrap svg {\n float: left;\n margin-right: 0.6em;\n width: 40px;\n height: 40px;\n}\n\n.rs-button-big {\n padding: 15px 10px;\n margin-bottom: 10px;\n display: block;\n width: 100%;\n text-align: left;\n transition: box-shadow 200ms;\n}\n.rs-button-big > div {\n font-size: 1.125em;\n padding: 10px 0;\n}\n.rs-button-big:hover {\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\n}\n.rs-button-big:active {\n background-color: #eee;\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\n}\n.rs-button-big:last-child {\n margin-bottom: 0;\n}\n\n.rs-content {\n padding: 0 10px 10px 10px;\n}\n\n\n.rs-state-choose .rs-main-logo,\n.rs-state-sign-in .rs-main-logo {\n margin-left: 45%;\n float: none;\n}\n\n.rs-sign-in-form input[type=text] {\n padding: 15px 10px;\n display: block;\n width: 100%;\n font: inherit;\n height: 52px;\n border: 1px solid #aaa;\n border-radius: 0;\n box-shadow: none;\n}\n.rs-sign-in-form input[type=submit] {\n padding: 15px 10px;\n margin-top: 20px;\n margin-bottom: 15px;\n display: block;\n width: 100%;\n border: none;\n border-radius: 3px;\n background-color: #3fb34f;\n font: inherit;\n color: #fff;\n transition: box-shadow 200ms, background-color 200ms;\n}\n.rs-sign-in-form input[type=submit]:hover {\n cursor: pointer;\n background-color: #4BCB5D;\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\n}\n.rs-sign-in-form input[type=submit]:active {\n background-color: #3fb34f;\n}\n.rs-sign-in-form input[type=submit]:disabled,\n.rs-sign-in-form input[type=submit]:disabled:hover {\n background-color: #aaa;\n}\n\n.rs-sign-in-error.rs-hidden,\n.rs-box-error.rs-hidden {\n height: 0;\n}\n\n.rs-sign-in-error.rs-visible,\n.rs-box-error.rs-visible {\n height: auto;\n border-radius: 3px;\n padding: 0.5em 0.5em;\n margin-top: 0.5em;\n text-align: center;\n background-color: rgba(255,0,0,0.1);\n color: darkred;\n}\n\n.rs-box-error {\n display: flex;\n flex-direction: row;\n}\n\n.rs-box-error .rs-error-message {\n flex: auto;\n}\n\n /*Choose provider box */\n.rs-box-choose {\n text-align: center;\n overflow: hidden;\n}\n\n.rs-box-choose p {\n margin-top: 0;\n margin-bottom: 20px;\n line-height: 1.4em;\n}\n\n/*Connected box */\n.rs-box-connected {\n display: flex;\n flex-direction: row;\n height: 40px;\n transition: height 0s;\n}\n.rs-connected-text {\n flex: auto;\n min-width: 0;\n}\n.rs-box-connected .rs-user {\n font-weight: bold;\n text-overflow: ellipsis;\n overflow: hidden;\n word-break: keep-all;\n}\n.rs-connected-buttons, .rs-error-buttons {\n flex: none;\n}\n.rs-disconnect:hover {\n border-color: #FF2D2D;\n}\n.rs-disconnect:hover .rs-icon{\n fill: #FF2D2D;\n}\n.rs-sync:hover {\n border-color: #FFBB0C;\n}\n.rs-sync:hover .rs-icon {\n fill: #FFBB0C;\n}\n.rs-sync.rs-rotate {\n border-color: #FFBB0C;\n}\n.rs-sync.rs-rotate .rs-icon {\n fill: #FFBB0C;\n animation: rs-spin 1s linear infinite;\n}\n@keyframes rs-spin { 100% { transform: rotate(360deg); transform:rotate(360deg); } }\n\n/* Floating widget styles (top right corner) */\n.rs-floating {\n position: fixed;\n top: 0;\n right: 0;\n}\n\n\n/* Small/mobile screens */\n@media screen and (max-width: 420px) {\n .rs-widget {\n font-size: 100%;\n transition: all 300ms ease-out;\n max-width: 400px;\n }\n .rs-floating {\n position: relative;\n top: auto;\n right: auto\n }\n .rs-closed {\n max-width: 56px;\n }\n .rs-state-choose,\n .rs-state-sign-in {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n max-width: 100%;\n }\n}\n\n/* remove dotted outline border on Firefox */\n.rs-widget a:focus,\n.rs-widget a:active,\n.rs-widget button:focus,\n.rs-widget input:focus {\n outline:none;\n}\n.rs-widget button::-moz-focus-inner, \n.rs-widget input[type="button"]::-moz-focus-inner,\n.rs-widget input[type="submit"]::-moz-focus-inner {\n border:0;\n}\n\n/* prevent rounded buttons on mobile Safari */\n.rs-widget input[type="button"],\n.rs-widget input[type="submit"] {\n -webkit-appearance: none;\n}\n'}])})},function(e,t,n){/*! remotestorage.js 1.0.3, https://remotestorage.io, MIT licensed */
!function(t,n){e.exports=n()}(window,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=31)}([function(e,t,n){"use strict";var r=n(3);e.exports=function(){r.logging&&console.log.apply(console,arguments)}},function(e,t,n){"use strict";(function(t){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r={logError:function(e){"string"==typeof e?console.error(e):console.error(e.message,e.stack)},globalContext:"undefined"!=typeof window?window:t,getGlobalContext:function(){return"undefined"!=typeof window?window:t},extend:function(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){for(var n in t)e[n]=t[n]}),e},containingFolder:function(e){if(""===e)return"/";if(!e)throw"Path not given!";return e.replace(/\/+/g,"/").replace(/[^\/]+\/?$/,"")},isFolder:function(e){return"/"===e.substr(-1)},isDocument:function(e){return!r.isFolder(e)},baseName:function(e){var t=e.split("/");return r.isFolder(e)?t[t.length-2]+"/":t[t.length-1]},cleanPath:function(e){return e.replace(/\/+/g,"/").split("/").map(encodeURIComponent).join("/").replace(/'/g,"%27")},bindAll:function(e){for(var t in this)"function"==typeof e[t]&&(e[t]=e[t].bind(e))},equal:function(e,t,i){var o;if(i=i||[],(void 0===e?"undefined":n(e))!==(void 0===t?"undefined":n(t)))return!1;if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return e===t;if("function"==typeof e)return e.toString()===t.toString();if(e instanceof ArrayBuffer&&t instanceof ArrayBuffer&&(e=new Uint8Array(e),t=new Uint8Array(t)),e instanceof Array){if(e.length!==t.length)return!1;for(var s=0,a=e.length;s<a;s++)if(!r.equal(e[s],t[s],i))return!1}else{for(o in e)if(e.hasOwnProperty(o)&&!(o in t))return!1;for(o in t)if(t.hasOwnProperty(o)){if(!(o in e))return!1;var c;if("object"===n(t[o])){if(i.indexOf(t[o])>=0)continue;(c=i.slice()).push(t[o])}if(!r.equal(e[o],t[o],c))return!1}}return!0},deepClone:function(e){var t;return void 0===e?void 0:(function e(t,r){var i,o;if("object"===(void 0===t?"undefined":n(t))&&!Array.isArray(t)&&null!==t)for(i in t)"object"===n(t[i])&&null!==t[i]&&("[object ArrayBuffer]"===t[i].toString()?(r[i]=new ArrayBuffer(t[i].byteLength),o=new Int8Array(t[i]),new Int8Array(r[i]).set(o)):e(t[i],r[i]))}(e,t=JSON.parse(JSON.stringify(e))),t)},pathsFromRoot:function(e){for(var t=[e],n=e.replace(/\/$/,"").split("/");n.length>1;)n.pop(),t.push(n.join("/")+"/");return t},localStorageAvailable:function(){var e=r.getGlobalContext();if(!("localStorage"in e))return!1;try{return e.localStorage.setItem("rs-check",1),e.localStorage.removeItem("rs-check"),!0}catch(e){return!1}},shouldBeTreatedAsBinary:function(e,t){return t&&t.match(/charset=binary/)||/[\x00-\x1F]/.test(e)},readBinaryData:function(e,n){return new Promise(function(i){var o=void 0;if(r.globalContext.BlobBuilder=r.globalContext.BlobBuilder||r.globalContext.WebKitBlobBuilder,void 0!==r.globalContext.BlobBuilder){var s=new t.BlobBuilder;s.append(e),o=s.getBlob(n)}else o=new Blob([e],{type:n});var a=new FileReader;"function"==typeof a.addEventListener?a.addEventListener("loadend",function(){i(a.result)}):a.onloadend=function(){i(a.result)},a.readAsArrayBuffer(o)})}};e.exports=r}).call(this,n(9))},function(e,t,n){"use strict";var r=n(0),i={addEventListener:function(e,t){if("string"!=typeof e)throw new Error("Argument eventName should be a string");if("function"!=typeof t)throw new Error("Argument handler should be a function");r("[Eventhandling] Adding event listener",e),this._validateEvent(e),this._handlers[e].push(t)},removeEventListener:function(e,t){this._validateEvent(e);for(var n=this._handlers[e].length,r=0;r<n;r++)if(this._handlers[e][r]===t)return void this._handlers[e].splice(r,1)},_emit:function(e){this._validateEvent(e);var t=Array.prototype.slice.call(arguments,1);this._handlers[e].slice().forEach(function(e){e.apply(this,t)})},_validateEvent:function(e){if(!(e in this._handlers))throw new Error("Unknown event: "+e)},_delegateEvent:function(e,t){t.on(e,function(t){this._emit(e,t)}.bind(this))},_addEvent:function(e){this._handlers[e]=[]}};i.on=i.addEventListener,i.off=i.removeEventListener,e.exports=function(e){var t=Array.prototype.slice.call(arguments,1);for(var n in i)e[n]=i[n];e._handlers={},t.forEach(function(t){e._addEvent(t)})}},function(e,t,n){"use strict";var r={cache:!0,changeEvents:{local:!0,window:!1,remote:!0,conflict:!0},cordovaRedirectUri:void 0,logging:!1,modules:[],backgroundSyncInterval:6e4,disableFeatures:[],discoveryTimeout:1e4,isBackground:!1,requestTimeout:3e4,syncInterval:1e4};e.exports=r},function(e,t,n){"use strict";function r(e){var t,n=e||c.getLocation().href,r=n.indexOf("#");if(-1!==r&&-1!==(t=n.substring(r+1)).indexOf("="))return t.split("&").reduce(function(e,t){var n=t.split("=");if("state"===n[0]&&n[1].match(/rsDiscovery/)){var r=decodeURIComponent(n[1]),i=r.substr(r.indexOf("rsDiscovery=")).split("&")[0].split("=")[1];e.rsDiscovery=JSON.parse(atob(i)),(r=r.replace(new RegExp("&?rsDiscovery="+i),"")).length>0&&(e.state=r)}else e[decodeURIComponent(n[0])]=decodeURIComponent(n[1]);return e},{})}var i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=n(0),a=n(1),c=function e(t,n,r,i,o){if(s("[Authorize] authURL = ",n,"scope = ",r,"redirectUri = ",i,"clientId = ",o),!a.localStorageAvailable()&&"remotestorage"===t.backend){i+=i.indexOf("#")>0?"&":"#";var c={userAddress:t.remote.userAddress,href:t.remote.href,storageApi:t.remote.storageApi,properties:t.remote.properties};i+="rsDiscovery="+btoa(JSON.stringify(c))}var l=n,u=i.indexOf("#");return l+=n.indexOf("?")>0?"&":"?",l+="redirect_uri="+encodeURIComponent(i.replace(/#.*$/,"")),l+="&scope="+encodeURIComponent(r),l+="&client_id="+encodeURIComponent(o),-1!==u&&u+1!==i.length&&(l+="&state="+encodeURIComponent(i.substring(u+1))),l+="&response_type=token",a.globalContext.cordova?e.openWindow(l,i,"location=yes,clearsessioncache=yes,clearcache=yes").then(function(e){t.remote.configure({token:e.access_token})}):void e.setLocation(l)};c.IMPLIED_FAKE_TOKEN=!1,c.Unauthorized=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.name="Unauthorized",this.message=void 0===e?"App authorization expired or revoked.":e,void 0!==t.code&&(this.code=t.code),this.stack=(new Error).stack},c.Unauthorized.prototype=Object.create(Error.prototype),c.Unauthorized.prototype.constructor=c.Unauthorized,c.getLocation=function(){return document.location},c.setLocation=function(e){if("string"==typeof e)document.location.href=e;else{if("object"!==(void 0===e?"undefined":o(e)))throw"Invalid location "+e;document.location=e}},c.openWindow=function(e,t,n){return new Promise(function(i,o){var s=open(e,"_blank",n);if(!s||s.closed)return o("Authorization popup was blocked");var a=function(){return o("Authorization was canceled")};s.addEventListener("loadstart",function(e){if(0===e.url.indexOf(t)){s.removeEventListener("exit",a),s.close();var n=r(e.url);return n?i(n):o("Authorization error")}}),s.addEventListener("exit",a)})},c._rs_supported=function(){return"undefined"!=typeof document},c._rs_init=function(e){i=function(){var r=!1;if(n){if(n.error)throw"access_denied"===n.error?new c.Unauthorized("Authorization failed: access denied",{code:"access_denied"}):new c.Unauthorized("Authorization failed: "+n.error);n.rsDiscovery&&e.remote.configure(n.rsDiscovery),n.access_token&&(e.remote.configure({token:n.access_token}),r=!0),n.remotestorage&&(e.connect(n.remotestorage),r=!0),n.state&&(t=c.getLocation(),c.setLocation(t.href.split("#")[0]+"#"+n.state))}r||e.remote.stopWaitingForToken()};var t,n=r();n&&((t=c.getLocation()).hash=""),e.on("features-loaded",i)},c._rs_cleanup=function(e){e.removeEventListener("features-loaded",i)},e.exports=c},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(2),o=n(1),s=n(3),a=n(30),c=n(29),l=c.SchemaNotFound,u=function(e,t){if("/"!==t[t.length-1])throw"Not a folder: "+t;"/"===t&&(this.makePath=function(e){return("/"===e[0]?"":"/")+e}),this.storage=e,this.base=t;var n=this.base.split("/");n.length>2?this.moduleName=n[1]:this.moduleName="root",i(this,"change"),this.on=this.on.bind(this),e.onChange(this.base,this._fireChange.bind(this))};u.Types=c,u.prototype={scope:function(e){return new u(this.storage,this.makePath(e))},getListing:function(e,t){if("string"!=typeof e)e="";else if(e.length>0&&"/"!==e[e.length-1])return Promise.reject("Not a folder: "+e);return this.storage.get(this.makePath(e),t).then(function(e){return 404===e.statusCode?{}:e.body})},getAll:function(e,t){if("string"!=typeof e)e="";else if(e.length>0&&"/"!==e[e.length-1])return Promise.reject("Not a folder: "+e);return this.storage.get(this.makePath(e),t).then(function(n){if(404===n.statusCode)return{};if("object"===r(n.body)){var i=Object.keys(n.body);if(0===i.length)return{};var o=i.map(function(i){return this.storage.get(this.makePath(e+i),t).then(function(e){if("string"==typeof e.body)try{e.body=JSON.parse(e.body)}catch(e){}"object"===r(e.body)&&(n.body[i]=e.body)})}.bind(this));return Promise.all(o).then(function(){return n.body})}}.bind(this))},getFile:function(e,t){return"string"!=typeof e?Promise.reject("Argument 'path' of baseClient.getFile must be a string"):this.storage.get(this.makePath(e),t).then(function(e){return{data:e.body,contentType:e.contentType,revision:e.revision}})},storeFile:function(e,t,n){return"string"!=typeof e?Promise.reject("Argument 'mimeType' of baseClient.storeFile must be a string"):"string"!=typeof t?Promise.reject("Argument 'path' of baseClient.storeFile must be a string"):"string"!=typeof n&&"object"!==(void 0===n?"undefined":r(n))?Promise.reject("Argument 'body' of baseClient.storeFile must be a string, ArrayBuffer, or ArrayBufferView"):(this.storage.access.checkPathPermission(this.makePath(t),"rw")||console.warn("WARNING: Editing a document to which only read access ('r') was claimed"),this.storage.put(this.makePath(t),n,e).then(function(e){return 200===e.statusCode||201===e.statusCode?e.revision:Promise.reject("Request (PUT "+this.makePath(t)+") failed with status: "+e.statusCode)}.bind(this)))},getObject:function(e,t){return"string"!=typeof e?Promise.reject("Argument 'path' of baseClient.getObject must be a string"):this.storage.get(this.makePath(e),t).then(function(t){if("object"===r(t.body))return t.body;if("string"==typeof t.body)try{return JSON.parse(t.body)}catch(t){throw"Not valid JSON: "+this.makePath(e)}else if(void 0!==t.body&&200===t.statusCode)return Promise.reject("Not an object: "+this.makePath(e))}.bind(this))},storeObject:function(e,t,n){if("string"!=typeof e)return Promise.reject("Argument 'typeAlias' of baseClient.storeObject must be a string");if("string"!=typeof t)return Promise.reject("Argument 'path' of baseClient.storeObject must be a string");if("object"!==(void 0===n?"undefined":r(n)))return Promise.reject("Argument 'object' of baseClient.storeObject must be an object");this._attachType(n,e);try{var i=this.validate(n);if(!i.valid)return Promise.reject(i)}catch(e){return Promise.reject(e)}return this.storage.put(this.makePath(t),JSON.stringify(n),"application/json; charset=UTF-8").then(function(e){return 200===e.statusCode||201===e.statusCode?e.revision:Promise.reject("Request (PUT "+this.makePath(t)+") failed with status: "+e.statusCode)}.bind(this))},remove:function(e){return"string"!=typeof e?Promise.reject("Argument 'path' of baseClient.remove must be a string"):(this.storage.access.checkPathPermission(this.makePath(e),"rw")||console.warn("WARNING: Removing a document to which only read access ('r') was claimed"),this.storage.delete(this.makePath(e)))},getItemURL:function(e){if("string"!=typeof e)throw"Argument 'path' of baseClient.getItemURL must be a string";return this.storage.connected?(e=this._cleanPath(this.makePath(e)),this.storage.remote.href+e):void 0},cache:function(e,t){if("string"!=typeof e)throw"Argument 'path' of baseClient.cache must be a string";if(void 0===t)t="ALL";else if("string"!=typeof t)throw"Argument 'strategy' of baseClient.cache must be a string or undefined";if("FLUSH"!==t&&"SEEN"!==t&&"ALL"!==t)throw'Argument \'strategy\' of baseclient.cache must be one of ["FLUSH", "SEEN", "ALL"]';return this.storage.caching.set(this.makePath(e),t),this},flush:function(e){return this.storage.local.flush(e)},declareType:function(e,t,n){n||(n=t,t=this._defaultTypeURI(e)),u.Types.declare(this.moduleName,e,t,n)},validate:function(e){var t=u.Types.getSchema(e["@context"]);if(t)return a.validateResult(e,t);throw new l(e["@context"])},schemas:{configurable:!0,get:function(){return u.Types.inScope(this.moduleName)}},_defaultTypeURI:function(e){return"http://remotestorage.io/spec/modules/"+encodeURIComponent(this.moduleName)+"/"+encodeURIComponent(e)},_attachType:function(e,t){e["@context"]=u.Types.resolveAlias(this.moduleName+"/"+t)||this._defaultTypeURI(t)},makePath:function(e){return this.base+(e||"")},_fireChange:function(e){s.changeEvents[e.origin]&&(["new","old","lastCommon"].forEach(function(t){if((!e[t+"ContentType"]||/^application\/(.*)json(.*)/.exec(e[t+"ContentType"]))&&"string"==typeof e[t+"Value"])try{e[t+"Value"]=JSON.parse(e[t+"Value"])}catch(e){}}),this._emit("change",e))},_cleanPath:o.cleanPath},u._rs_init=function(){},e.exports=u},function(e,t,n){"use strict";function r(e){if("object"===(void 0===e?"undefined":a(e))&&"string"==typeof e.path)if(h(e.path)){if(e.local&&e.local.itemsMap)return e.local;if(e.common&&e.common.itemsMap)return e.common}else{if(e.local&&e.local.body&&e.local.contentType)return e.local;if(e.common&&e.common.body&&e.common.contentType)return e.common;if(e.body&&e.contentType)return{body:e.body,contentType:e.contentType}}}function i(e,t){var n;for(n in e){if(e[n]&&e[n].remote)return!0;var i=r(e[n]);if(i&&i.timestamp&&(new Date).getTime()-i.timestamp<=t)return!1;if(!i)return!0}return!0}function o(e){var t={path:e,common:{}};return h(e)&&(t.common.itemsMap={}),t}function s(e,t){return e.common||(e.common={itemsMap:{}}),e.common.itemsMap||(e.common.itemsMap={}),e.local||(e.local=f(e.common)),e.local.itemsMap||(e.local.itemsMap=e.common.itemsMap),e.local.itemsMap[t]=!0,e}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=n(1),l=n(3),u=n(0),h=c.isFolder,d=c.isDocument,f=c.deepClone,p=c.pathsFromRoot,m={get:function(e,t,n){return"number"==typeof t?this.getNodes(p(e)).then(function(o){var s=r(o[e]);return i(o,t)?n(e):s?{statusCode:200,body:s.body||s.itemsMap,contentType:s.contentType}:{statusCode:404}}):this.getNodes([e]).then(function(t){var n=r(t[e]);if(n){if(h(e))for(var i in n.itemsMap)n.itemsMap.hasOwnProperty(i)&&!1===n.itemsMap[i]&&delete n.itemsMap[i];return{statusCode:200,body:n.body||n.itemsMap,contentType:n.contentType}}return{statusCode:404}})},put:function(e,t,n){var i=p(e);return this._updateNodes(i,function(e,i){try{for(var a=0,c=e.length;a<c;a++){var l=e[a],h=i[l],d=void 0;h||(i[l]=h=o(l)),0===a?(d=r(h),h.local={body:t,contentType:n,previousBody:d?d.body:void 0,previousContentType:d?d.contentType:void 0}):h=s(h,e[a-1].substring(l.length))}return i}catch(e){throw u("[Cachinglayer] Error during PUT",i,e),e}})},delete:function(e){var t=p(e);return this._updateNodes(t,function(e,t){for(var n=0,i=e.length;n<i;n++){var o=e[n],s=t[o],a=void 0;if(s)if(0===n)a=r(s),s.local={body:!1,previousBody:a?a.body:void 0,previousContentType:a?a.contentType:void 0};else{s.local||(s.local=f(s.common));var c=e[n-1].substring(o.length);if(delete s.local.itemsMap[c],Object.getOwnPropertyNames(s.local.itemsMap).length>0)break}else console.error("Cannot delete non-existing node "+o)}return t})},flush:function(e){var t=this;return t._getAllDescendentPaths(e).then(function(e){return t.getNodes(e)}).then(function(e){for(var n in e){var r=e[n];r&&r.common&&r.local&&t._emitChange({path:r.path,origin:"local",oldValue:!1===r.local.body?void 0:r.local.body,newValue:!1===r.common.body?void 0:r.common.body}),e[n]=void 0}return t.setNodes(e)})},_emitChange:function(e){l.changeEvents[e.origin]&&this._emit("change",e)},fireInitial:function(){if(l.changeEvents.local){var e=this;e.forAllNodes(function(t){var n;d(t.path)&&(n=r(t))&&e._emitChange({path:t.path,origin:"local",oldValue:void 0,oldContentType:void 0,newValue:n.body,newContentType:n.contentType})}).then(function(){e._emit("local-events-done")})}},onDiff:function(e){this.diffHandler=e},migrate:function(e){return"object"!==(void 0===e?"undefined":a(e))||e.common||(e.common={},"string"==typeof e.path?"/"===e.path.substr(-1)&&"object"===a(e.body)&&(e.common.itemsMap=e.body):(e.local||(e.local={}),e.local.body=e.body,e.local.contentType=e.contentType)),e},_updateNodesRunning:!1,_updateNodesQueued:[],_updateNodes:function(e,t){return new Promise(function(n,r){this._doUpdateNodes(e,t,{resolve:n,reject:r})}.bind(this))},_doUpdateNodes:function(e,t,n){var r=this;r._updateNodesRunning?r._updateNodesQueued.push({paths:e,cb:t,promise:n}):(r._updateNodesRunning=!0,r.getNodes(e).then(function(i){var o,s=f(i),a=[],l=c.equal;for(var u in i=t(e,i))l(o=i[u],s[u])?delete i[u]:d(u)&&(l(o.local.body,o.local.previousBody)&&o.local.contentType===o.local.previousContentType||a.push({path:u,origin:"window",oldValue:o.local.previousBody,newValue:!1===o.local.body?void 0:o.local.body,oldContentType:o.local.previousContentType,newContentType:o.local.contentType}),delete o.local.previousBody,delete o.local.previousContentType);r.setNodes(i).then(function(){r._emitChangeEvents(a),n.resolve({statusCode:200})})}).then(function(){return Promise.resolve()},function(e){n.reject(e)}).then(function(){r._updateNodesRunning=!1;var e=r._updateNodesQueued.shift();e&&r._doUpdateNodes(e.paths,e.cb,e.promise)}))},_emitChangeEvents:function(e){for(var t=0,n=e.length;t<n;t++)this._emitChange(e[t]),this.diffHandler&&this.diffHandler(e[t].path)},_getAllDescendentPaths:function(e){var t=this;return h(e)?t.getNodes([e]).then(function(n){var i=[e],o=r(n[e]),s=Object.keys(o.itemsMap).map(function(n){return t._getAllDescendentPaths(e+n).then(function(e){for(var t=0,n=e.length;t<n;t++)i.push(e[t])})});return Promise.all(s).then(function(){return i})}):Promise.resolve([e])},_getInternals:function(){return{getLatest:r,makeNode:o,isOutdated:i}}};e.exports=function(e){for(var t in m)e[t]=m[t]}},function(e,t,n){"use strict";function r(e,t,n){return{action:e,path:t,promise:n}}function i(e,t){return e.common.revision!==t&&(!e.remote||e.remote.revision!==t)}function o(e){return e.common&&e.common.revision}var s,a,c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=n(1),u=n(14),h=n(2),d=n(0),f=n(4),p=n(3),m=l.isFolder,g=l.isDocument,v=l.equal,y=l.deepClone,b=l.pathsFromRoot,w=function(e,t,n,r,i){this.remoteStorage=e,this.local=t,this.local.onDiff(function(e){this.addTask(e),this.doTasks()}.bind(this)),this.remote=n,this.access=r,this.caching=i,this._tasks={},this._running={},this._timeStarted={},h(this,"done","req-done"),this.caching.onActivate(function(e){this.addTask(e),this.doTasks()}.bind(this))};w.prototype={now:function(){return(new Date).getTime()},queueGetRequest:function(e){var t=this;return new Promise(function(n,r){t.remote.connected?t.remote.online?(t.addTask(e,function(){this.local.get(e).then(function(e){return n(e)})}.bind(t)),t.doTasks()):r("cannot fulfill maxAge requirement - remote is not online"):r("cannot fulfill maxAge requirement - remote is not connected")})},corruptServerItemsMap:function(e,t){if("object"!==(void 0===e?"undefined":c(e))||Array.isArray(e))return!0;for(var n in e){var r=e[n];if("object"!==(void 0===r?"undefined":c(r)))return!0;if("string"!=typeof r.ETag)return!0;if(m(n)){if(-1!==n.substring(0,n.length-1).indexOf("/"))return!0}else{if(-1!==n.indexOf("/"))return!0;if(t){if("string"!=typeof r["Content-Type"])return!0;if("number"!=typeof r["Content-Length"])return!0}}}return!1},corruptItemsMap:function(e){if("object"!==(void 0===e?"undefined":c(e))||Array.isArray(e))return!0;for(var t in e)if("boolean"!=typeof e[t])return!0;return!1},corruptRevision:function(e){return"object"!==(void 0===e?"undefined":c(e))||Array.isArray(e)||e.revision&&"string"!=typeof e.revision||e.body&&"string"!=typeof e.body&&"object"!==c(e.body)||e.contentType&&"string"!=typeof e.contentType||e.contentLength&&"number"!=typeof e.contentLength||e.timestamp&&"number"!=typeof e.timestamp||e.itemsMap&&this.corruptItemsMap(e.itemsMap)},isCorrupt:function(e){return"object"!==(void 0===e?"undefined":c(e))||Array.isArray(e)||"string"!=typeof e.path||this.corruptRevision(e.common)||e.local&&this.corruptRevision(e.local)||e.remote&&this.corruptRevision(e.remote)||e.push&&this.corruptRevision(e.push)},hasTasks:function(){return Object.getOwnPropertyNames(this._tasks).length>0},collectDiffTasks:function(){var e=0;return this.local.forAllNodes(function(t){e>100||(this.isCorrupt(t)?(d("[Sync] WARNING: corrupt node in local cache",t),"object"===(void 0===t?"undefined":c(t))&&t.path&&(this.addTask(t.path),e++)):this.needsFetch(t)&&this.access.checkPathPermission(t.path,"r")?(this.addTask(t.path),e++):g(t.path)&&this.needsPush(t)&&this.access.checkPathPermission(t.path,"rw")&&(this.addTask(t.path),e++))}.bind(this)).then(function(){return e},function(e){throw e})},inConflict:function(e){return e.local&&e.remote&&(void 0!==e.remote.body||e.remote.itemsMap)},needsRefresh:function(e){return!!e.common&&(!e.common.timestamp||this.now()-e.common.timestamp>p.syncInterval)},needsFetch:function(e){return!!this.inConflict(e)||!(!e.common||void 0!==e.common.itemsMap||void 0!==e.common.body)||!(!e.remote||void 0!==e.remote.itemsMap||void 0!==e.remote.body)},needsPush:function(e){return!this.inConflict(e)&&(!(!e.local||e.push)||void 0)},needsRemotePut:function(e){return e.local&&e.local.body},needsRemoteDelete:function(e){return e.local&&!1===e.local.body},getParentPath:function(e){var t=e.match(/^(.*\/)([^\/]+\/?)$/);if(t)return t[1];throw new Error('Not a valid path: "'+e+'"')},deleteChildPathsFromTasks:function(){for(var e in this._tasks)for(var t=b(e),n=1;n<t.length;n++)this._tasks[t[n]]&&(Array.isArray(this._tasks[e])&&this._tasks[e].length&&Array.prototype.push.apply(this._tasks[t[n]],this._tasks[e]),delete this._tasks[e])},collectRefreshTasks:function(){return this.local.forAllNodes(function(e){var t;if(this.needsRefresh(e)){try{t=this.getParentPath(e.path)}catch(e){}t&&this.access.checkPathPermission(t,"r")?this.addTask(t):this.access.checkPathPermission(e.path,"r")&&this.addTask(e.path)}}.bind(this)).then(function(){this.deleteChildPathsFromTasks()}.bind(this),function(e){throw e})},flush:function(e){for(var t in e)"FLUSH"===this.caching.checkPath(t)&&e[t]&&!e[t].local&&(d("[Sync] Flushing",t),e[t]=void 0);return e},doTask:function(e){return this.local.getNodes([e]).then(function(t){var n=t[e];return void 0===n?r("get",e,this.remote.get(e)):function(e){return e.remote&&e.remote.revision&&!e.remote.itemsMap&&!e.remote.body}(n)?r("get",e,this.remote.get(e)):this.needsRemotePut(n)?(n.push=y(n.local),n.push.timestamp=this.now(),this.local.setNodes(this.flush(t)).then(function(){var t;return t=o(n)?{ifMatch:n.common.revision}:{ifNoneMatch:"*"},r("put",e,this.remote.put(e,n.push.body,n.push.contentType,t))}.bind(this))):this.needsRemoteDelete(n)?(n.push={body:!1,timestamp:this.now()},this.local.setNodes(this.flush(t)).then(function(){return o(n)?r("delete",e,this.remote.delete(e,{ifMatch:n.common.revision})):r("get",e,this.remote.get(e))}.bind(this))):o(n)?r("get",e,this.remote.get(e,{ifNoneMatch:n.common.revision})):r("get",e,this.remote.get(e))}.bind(this))},autoMergeFolder:function(e){if(e.remote.itemsMap&&(e.common=e.remote,delete e.remote,e.common.itemsMap)){for(var t in e.common.itemsMap)e.local.itemsMap[t]||(e.local.itemsMap[t]=!1);v(e.local.itemsMap,e.common.itemsMap)&&delete e.local}return e},autoMergeDocument:function(e){return function(e){return(!e.remote||!e.remote.revision||e.remote.revision===e.common.revision)&&(void 0===e.common.body&&!1===e.remote.body||e.remote.body===e.common.body&&e.remote.contentType===e.common.contentType)}(e)?delete(e=function(e){return e.remote&&!1===e.remote.body&&e.local&&!1===e.local.body&&delete e.local,e}(e)).remote:void 0!==e.remote.body&&(d("[Sync] Emitting keep/revert"),this.local._emitChange({origin:"conflict",path:e.path,oldValue:e.local.body,newValue:e.remote.body,lastCommonValue:e.common.body,oldContentType:e.local.contentType,newContentType:e.remote.contentType,lastCommonContentType:e.common.contentType}),e.remote.body?e.common=e.remote:e.common={},delete e.remote,delete e.local),e},autoMerge:function(e){if(e.remote){if(e.local)return m(e.path)?this.autoMergeFolder(e):this.autoMergeDocument(e);if(m(e.path))void 0!==e.remote.itemsMap&&(e.common=e.remote,delete e.remote);else if(void 0!==e.remote.body){var t={origin:"remote",path:e.path,oldValue:!1===e.common.body?void 0:e.common.body,newValue:!1===e.remote.body?void 0:e.remote.body,oldContentType:e.common.contentType,newContentType:e.remote.contentType};if((t.oldValue||t.newValue)&&this.local._emitChange(t),!e.remote.body)return;e.common=e.remote,delete e.remote}return e}e.common.body&&this.local._emitChange({origin:"remote",path:e.path,oldValue:e.common.body,newValue:void 0,oldContentType:e.common.contentType,newContentType:void 0})},updateCommonTimestamp:function(e,t){return this.local.getNodes([e]).then(function(n){return n[e]&&n[e].common&&n[e].common.revision===t&&(n[e].common.timestamp=this.now()),this.local.setNodes(this.flush(n))}.bind(this))},markChildren:function(e,t,n,r){var o=[],s={},a={};for(var c in t)o.push(e+c),s[e+c]=t[c];for(var l in r)o.push(e+l);return this.local.getNodes(o).then(function(t){var o;for(var c in t)if(o=t[c],s[c])o&&o.common?i(o,s[c].ETag)&&(n[c]=y(o),n[c].remote={revision:s[c].ETag,timestamp:this.now()},n[c]=this.autoMerge(n[c])):"ALL"===this.caching.checkPath(c)&&(n[c]={path:c,common:{timestamp:this.now()},remote:{revision:s[c].ETag,timestamp:this.now()}}),n[c]&&s[c]["Content-Type"]&&(n[c].remote.contentType=s[c]["Content-Type"]),n[c]&&s[c]["Content-Length"]&&(n[c].remote.contentLength=s[c]["Content-Length"]);else if(r[c.substring(e.length)]&&o&&o.common){if(o.common.itemsMap)for(var l in o.common.itemsMap)a[c+l]=!0;if(o.local&&o.local.itemsMap)for(var u in o.local.itemsMap)a[c+u]=!0;if(o.remote||m(c))n[c]=void 0;else if(n[c]=this.autoMerge(o),void 0===n[c]){var h=this.getParentPath(c),d=n[h],f=c.substring(e.length);d&&d.local&&(delete d.local.itemsMap[f],v(d.local.itemsMap,d.common.itemsMap)&&delete d.local)}}return this.deleteRemoteTrees(Object.keys(a),n).then(function(e){return this.local.setNodes(this.flush(e))}.bind(this))}.bind(this))},deleteRemoteTrees:function(e,t){return 0===e.length?Promise.resolve(t):this.local.getNodes(e).then(function(e){var n={},r=function(e,t){if(e&&e.itemsMap)for(var r in e.itemsMap)n[t+r]=!0};for(var i in e){var o=e[i];o&&(m(i)?(r(o.common,i),r(o.local,i)):o.common&&void 0!==c(o.common.body)&&(t[i]=y(o),t[i].remote={body:!1,timestamp:this.now()},t[i]=this.autoMerge(t[i])))}return this.deleteRemoteTrees(Object.keys(n),t).then(function(e){return this.local.setNodes(this.flush(e))}.bind(this))}.bind(this))},completeFetch:function(e,t,n,r){var i,o,s=b(e);return m(e)?i=[e]:(o=s[1],i=[e,o]),this.local.getNodes(i).then(function(i){var s,a,l={},u=i[e],h=function(e){if(e&&e.itemsMap)for(s in e.itemsMap)t[s]||(l[s]=!0)};if("object"===(void 0===u?"undefined":c(u))&&u.path===e&&"object"===c(u.common)||(u={path:e,common:{}},i[e]=u),u.remote={revision:r,timestamp:this.now()},m(e))for(s in h(u.common),h(u.remote),u.remote.itemsMap={},t)u.remote.itemsMap[s]=!0;else u.remote.body=t,u.remote.contentType=n,(a=i[o])&&a.local&&a.local.itemsMap&&(s=e.substring(o.length),a.local.itemsMap[s]=!0,v(a.local.itemsMap,a.common.itemsMap)&&delete a.local);return i[e]=this.autoMerge(u),{toBeSaved:i,missingChildren:l}}.bind(this))},completePush:function(e,t,n,r){return this.local.getNodes([e]).then(function(i){var o=i[e];if(!o.push)throw this.stopped=!0,new Error("completePush called but no push version!");return n?(d("[Sync] We have a conflict"),o.remote&&o.remote.revision===r||(o.remote={revision:r||"conflict",timestamp:this.now()},delete o.push),i[e]=this.autoMerge(o)):(o.common={revision:r,timestamp:this.now()},"put"===t?(o.common.body=o.push.body,o.common.contentType=o.push.contentType,v(o.local.body,o.push.body)&&o.local.contentType===o.push.contentType&&delete o.local,delete o.push):"delete"===t&&(!1===o.local.body?i[e]=void 0:delete o.push)),this.local.setNodes(this.flush(i))}.bind(this))},dealWithFailure:function(e){return this.local.getNodes([e]).then(function(t){if(t[e])return delete t[e].push,this.local.setNodes(this.flush(t))}.bind(this))},interpretStatus:function(e){return"offline"===e||"timeout"===e?{successful:!1,networkProblems:!0,statusCode:e}:{successful:2===Math.floor(e/100)||304===e||412===e||404===e,conflict:412===e,unAuth:401===e&&this.remote.token!==f.IMPLIED_FAKE_TOKEN||402===e||403===e,notFound:404===e,changed:304!==e,statusCode:e}},handleGetResponse:function(e,t,n,r,i){return t.notFound&&(n=!!m(e)&&{}),t.changed?this.completeFetch(e,n,r,i).then(function(t){return m(e)?this.corruptServerItemsMap(n)?(d("[Sync] WARNING: Discarding corrupt folder description from server for "+e),!1):this.markChildren(e,n,t.toBeSaved,t.missingChildren).then(function(){return!0}):this.local.setNodes(this.flush(t.toBeSaved)).then(function(){return!0})}.bind(this)):this.updateCommonTimestamp(e,i).then(function(){return!0})},handleResponse:function(e,t,n){var r,i=this.interpretStatus(n.statusCode);if(i.successful){if("get"===t)return this.handleGetResponse(e,i,n.body,n.contentType,n.revision);if("put"===t||"delete"===t)return this.completePush(e,t,i.conflict,n.revision).then(function(){return!0});throw new Error("cannot handle response for unknown action",t)}return r=i.unAuth?new f.Unauthorized:i.networkProblems?new w.SyncError("Network request failed."):new Error("HTTP response code "+i.statusCode+" received."),this.dealWithFailure(e,t,i).then(function(){throw this.remoteStorage._emit("error",r),r})},numThreads:10,finishTask:function(e){var t=this;return void 0!==e.action?e.promise.then(function(n){return t.handleResponse(e.path,e.action,n)},function(n){return d("[Sync] wireclient rejects its promise!",e.path,e.action,n),t.handleResponse(e.path,e.action,{statusCode:"offline"})}).then(function(n){if(delete t._timeStarted[e.path],delete t._running[e.path],n&&t._tasks[e.path]){for(var r=0;r<t._tasks[e.path].length;r++)t._tasks[e.path][r]();delete t._tasks[e.path]}t.remoteStorage._emit("sync-req-done"),t.collectTasks(!1).then(function(){!t.hasTasks()||t.stopped?(d("[Sync] Sync is done! Reschedule?",Object.getOwnPropertyNames(t._tasks).length,t.stopped),t.done||(t.done=!0,t.remoteStorage._emit("sync-done"))):setTimeout(function(){t.doTasks()},10)})},function(n){d("[Sync] Error",n),delete t._timeStarted[e.path],delete t._running[e.path],t.remoteStorage._emit("sync-req-done"),
t.done||(t.done=!0,t.remoteStorage._emit("sync-done"))}):void delete this._running[e.path]},doTasks:function(){var e,t=0,n=void 0;if((e=(this.remote.connected?this.remote.online?this.numThreads:1:0)-Object.getOwnPropertyNames(this._running).length)<=0)return!0;for(n in this._tasks)if(!this._running[n]&&(this._timeStarted[n]=this.now(),this._running[n]=this.doTask(n),this._running[n].then(this.finishTask.bind(this)),++t>=e))return!0;return t>=e},collectTasks:function(e){return this.hasTasks()||this.stopped?Promise.resolve():this.collectDiffTasks().then(function(t){return t||!1===e?Promise.resolve():this.collectRefreshTasks()}.bind(this),function(e){throw e})},addTask:function(e,t){this._tasks[e]||(this._tasks[e]=[]),"function"==typeof t&&this._tasks[e].push(t)},sync:function(){return this.done=!1,this.doTasks()?Promise.resolve():this.collectTasks().then(function(){try{this.doTasks()}catch(e){d("[Sync] doTasks error",e)}}.bind(this),function(e){throw d("[Sync] Sync error",e),new Error("Local cache unavailable")})}},w._rs_init=function(e){s=function(){d("[Sync] syncCycleCb calling syncCycle"),u.isBrowser()&&function(){function e(e){var n,r;n=t.getCurrentSyncInterval(),p.isBackground=!e,r=t.getCurrentSyncInterval(),t._emit("sync-interval-change",{oldValue:n,newValue:r})}var t=this;u.on("background",function(){e(!1)}),u.on("foreground",function(){e(!0)})}.bind(e)(),e.sync||(e.sync=new w(e,e.local,e.remote,e.access,e.caching),e.syncStopped&&(d("[Sync] Instantiating sync stopped"),e.sync.stopped=!0,delete e.syncStopped)),d("[Sync] syncCycleCb calling syncCycle"),e.syncCycle()},a=function(){e.removeEventListener("connected",a),e.startSync()},e.on("ready",s),e.on("connected",a)},w._rs_cleanup=function(e){e.stopSync(),e.removeEventListener("ready",s),e.removeEventListener("connected",a),e.sync=void 0,delete e.sync},(w.SyncError=function(e){this.name="SyncError";var t="Sync failed: ";"object"===(void 0===e?"undefined":c(e))&&"message"in e?(t+=e.message,this.stack=e.stack,this.originalError=e):t+=e,this.message=t}).prototype=Object.create(Error.prototype),w.SyncError.prototype.constructor=w.SyncError,e.exports=w},function(e,t,n){"use strict";(function(t,r){function i(e){return"string"!=typeof e?e:"*"===e?"*":'"'+e+'"'}function o(e){return"string"!=typeof e?e:e.replace(/^["']|["']$/g,"")}var s,a,c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=n(0),u=n(1),h=n(2),d=n(4),f=n(3),p="remotestorage:wireclient",m={"draft-dejong-remotestorage-00":2,"draft-dejong-remotestorage-01":3,"draft-dejong-remotestorage-02":4,"https://www.w3.org/community/rww/wiki/read-write-web-00#simple":1};if("function"==typeof ArrayBufferView)a=function(e){return e&&e instanceof ArrayBufferView};else{var g=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];a=function(e){for(var t=0;t<8;t++)if(e instanceof g[t])return!0;return!1}}var v=u.isFolder,y=u.cleanPath,b=u.shouldBeTreatedAsBinary,w=function(e){if(this.rs=e,this.connected=!1,h(this,"connected","not-connected"),s){var t;try{t=JSON.parse(localStorage[p])}catch(e){}t&&setTimeout(function(){this.configure(t)}.bind(this),0)}this._revisionCache={},this.connected&&setTimeout(this._emit.bind(this),0,"connected")};w.prototype={_request:function(e,n,i,s,a,c,h){if(("PUT"===e||"DELETE"===e)&&"/"===n[n.length-1])return Promise.reject("Don't "+e+" on directories!");var f,p=this;return i!==d.IMPLIED_FAKE_TOKEN&&(s.Authorization="Bearer "+i),this.rs._emit("wire-busy",{method:e,isFolder:v(n)}),w.request(e,n,{body:a,headers:s,responseType:"arraybuffer"}).then(function(i){if(p.online||(p.online=!0,p.rs._emit("network-online")),p.rs._emit("wire-done",{method:e,isFolder:v(n),success:!0}),g=i.status,[401,403,404,412].indexOf(g)>=0)return l("[WireClient] Error response status",i.status),f=c?o(i.getResponseHeader("ETag")):void 0,401===i.status&&p.rs._emit("error",new d.Unauthorized),Promise.resolve({statusCode:i.status,revision:f});if(function(e){return[201,204,304].indexOf(e)>=0}(i.status)||200===i.status&&"GET"!==e)return f=o(i.getResponseHeader("ETag")),l("[WireClient] Successful request",f),Promise.resolve({statusCode:i.status,revision:f});var s=i.getResponseHeader("Content-Type");f=c?o(i.getResponseHeader("ETag")):200===i.status?h:void 0;var a,m,g,y=function(e){var t,n="UTF-8";return e&&(t=e.match(/charset=(.+)$/))&&(n=t[1]),n}(s);return b(i.response,s)?(l("[WireClient] Successful request with unknown or binary mime-type",f),Promise.resolve({statusCode:i.status,body:i.response,contentType:s,revision:f})):(a=i.response,m=y,new Promise(function(e){if("undefined"==typeof Blob){var n=new t(new Uint8Array(a));e(n.toString(m))}else{var i;if(u.globalContext.BlobBuilder=u.globalContext.BlobBuilder||u.globalContext.WebKitBlobBuilder,void 0!==u.globalContext.BlobBuilder){var o=new r.BlobBuilder;o.append(a),i=o.getBlob()}else i=new Blob([a]);var s=new FileReader;"function"==typeof s.addEventListener?s.addEventListener("loadend",function(t){e(t.target.result)}):s.onloadend=function(t){e(t.target.result)},s.readAsText(i,m)}})).then(function(e){return l("[WireClient] Successful request",f),Promise.resolve({statusCode:i.status,body:e,contentType:s,revision:f})})},function(t){return p.online&&(p.online=!1,p.rs._emit("network-offline")),p.rs._emit("wire-done",{method:e,isFolder:v(n),success:!1}),Promise.reject(t)})},configure:function(e){if("object"!==(void 0===e?"undefined":c(e)))throw new Error("WireClient configure settings parameter should be an object");void 0!==e.userAddress&&(this.userAddress=e.userAddress),void 0!==e.href&&(this.href=e.href),void 0!==e.storageApi&&(this.storageApi=e.storageApi),void 0!==e.token&&(this.token=e.token),void 0!==e.properties&&(this.properties=e.properties),void 0!==this.storageApi&&(this._storageApi=m[this.storageApi]||5,this.supportsRevs=this._storageApi>=2),this.href&&this.token?(this.connected=!0,this.online=!0,this._emit("connected")):this.connected=!1,s&&(localStorage[p]=JSON.stringify({userAddress:this.userAddress,href:this.href,storageApi:this.storageApi,token:this.token,properties:this.properties}))},stopWaitingForToken:function(){this.connected||this._emit("not-connected")},get:function(e,t){var n=this;if(!this.connected)return Promise.reject("not connected (path: "+e+")");t||(t={});var r={};return this.supportsRevs&&t.ifNoneMatch&&(r["If-None-Match"]=i(t.ifNoneMatch)),this._request("GET",this.href+y(e),this.token,r,void 0,this.supportsRevs,this._revisionCache[e]).then(function(t){if(!v(e))return Promise.resolve(t);var r,i={};if(void 0!==t.body)try{t.body=JSON.parse(t.body)}catch(t){return Promise.reject("Folder description at "+n.href+y(e)+" is not JSON")}if(200===t.statusCode&&"object"===c(t.body)){if(0===Object.keys(t.body).length)t.statusCode=404;else if("http://remotestorage.io/spec/folder-description"===(r=t.body)["@context"]&&"object"===c(r.items)){for(var o in t.body.items)n._revisionCache[e+o]=t.body.items[o].ETag;i=t.body.items}else Object.keys(t.body).forEach(function(r){n._revisionCache[e+r]=t.body[r],i[r]={ETag:t.body[r]}});return t.body=i,Promise.resolve(t)}return Promise.resolve(t)})},put:function(e,t,n,r){if(!this.connected)return Promise.reject("not connected (path: "+e+")");r||(r={}),!n.match(/charset=/)&&(t instanceof ArrayBuffer||a(t))&&(n+="; charset=binary");var o={"Content-Type":n};return this.supportsRevs&&(r.ifMatch&&(o["If-Match"]=i(r.ifMatch)),r.ifNoneMatch&&(o["If-None-Match"]=i(r.ifNoneMatch))),this._request("PUT",this.href+y(e),this.token,o,t,this.supportsRevs)},delete:function(e,t){if(!this.connected)throw new Error("not connected (path: "+e+")");t||(t={});var n={};return this.supportsRevs&&t.ifMatch&&(n["If-Match"]=i(t.ifMatch)),this._request("DELETE",this.href+y(e),this.token,n,void 0,this.supportsRevs)}},w.isArrayBufferView=a,w.request=function(e,t,n){return new Promise(function(r,i){l("[WireClient]",e,t);var o=!1,s=setTimeout(function(){o=!0,i("timeout")},f.requestTimeout),u=new XMLHttpRequest;if(u.open(e,t,!0),n.responseType&&(u.responseType=n.responseType),n.headers)for(var h in n.headers)u.setRequestHeader(h,n.headers[h]);u.onload=function(){o||(clearTimeout(s),r(u))},u.onerror=function(e){o||(clearTimeout(s),i(e))};var d=n.body;"object"===(void 0===d?"undefined":c(d))&&!a(d)&&d instanceof ArrayBuffer&&(d=new Uint8Array(d)),u.send(d)})},Object.defineProperty(w.prototype,"storageType",{get:function(){if(this.storageApi){var e=this.storageApi.match(/draft-dejong-(remotestorage-\d\d)/);return e?e[1]:"2012.04"}}}),w._rs_init=function(e){s=u.localStorageAvailable(),e.remote=new w(e),this.online=!0},w._rs_supported=function(){return!!XMLHttpRequest},w._rs_cleanup=function(){s&&delete localStorage[p]},e.exports=w}).call(this,n(28).Buffer,n(9))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(1),i=n(0),o=r.containingFolder,s=function(){this.reset()};s.prototype={pendingActivations:[],set:function(e,t){if("string"!=typeof e)throw new Error("path should be a string");if(!r.isFolder(e))throw new Error("path should be a folder");if(this._remoteStorage&&this._remoteStorage.access&&!this._remoteStorage.access.checkPathPermission(e,"r"))throw new Error('No access to path "'+e+'". You have to claim access to it first.');if(!t.match(/^(FLUSH|SEEN|ALL)$/))throw new Error("strategy should be 'FLUSH', 'SEEN', or 'ALL'");this._rootPaths[e]=t,"ALL"===t&&(this.activateHandler?this.activateHandler(e):this.pendingActivations.push(e))},enable:function(e){this.set(e,"ALL")},disable:function(e){this.set(e,"FLUSH")},onActivate:function(e){var t;for(i("[Caching] Setting activate handler",e,this.pendingActivations),this.activateHandler=e,t=0;t<this.pendingActivations.length;t++)e(this.pendingActivations[t]);delete this.pendingActivations},checkPath:function(e){return void 0!==this._rootPaths[e]?this._rootPaths[e]:"/"===e?"SEEN":this.checkPath(o(e))},reset:function(){this._rootPaths={},this._remoteStorage=null}},s._rs_init=function(e){this._remoteStorage=e},e.exports=s},function(e,t,n){"use strict";var r=function(){this.reset()};r.prototype={claim:function(e,t){if("string"!=typeof e||-1!==e.indexOf("/")||0===e.length)throw new Error("Scope should be a non-empty string without forward slashes");if(!t.match(/^rw?$/))throw new Error("Mode should be either 'r' or 'rw'");this._adjustRootPaths(e),this.scopeModeMap[e]=t},get:function(e){return this.scopeModeMap[e]},remove:function(e){var t,n={};for(t in this.scopeModeMap)n[t]=this.scopeModeMap[t];for(t in this.reset(),delete n[e],n)this.set(t,n[t])},checkPermission:function(e,t){var n=this.get(e);return n&&("r"===t||"rw"===n)},checkPathPermission:function(e,t){return!!this.checkPermission("*",t)||!!this.checkPermission(this._getModuleName(e),t)},reset:function(){this.rootPaths=[],this.scopeModeMap={}},_getModuleName:function(e){if("/"!==e[0])throw new Error("Path should start with a slash");var t=e.replace(/^\/public/,"").match(/^\/([^\/]*)\//);return t?t[1]:"*"},_adjustRootPaths:function(e){"*"in this.scopeModeMap||"*"===e?this.rootPaths=["/"]:e in this.scopeModeMap||(this.rootPaths.push("/"+e+"/"),this.rootPaths.push("/public/"+e+"/"))},_scopeNameForParameter:function(e){if("*"===e.name&&this.storageType){if("2012.04"===this.storageType)return"";if(this.storageType.match(/remotestorage-0[01]/))return"root"}return e.name},setStorageType:function(e){this.storageType=e}},Object.defineProperty(r.prototype,"scopes",{get:function(){return Object.keys(this.scopeModeMap).map(function(e){return{name:e,mode:this.scopeModeMap[e]}}.bind(this))}}),Object.defineProperty(r.prototype,"scopeParameter",{get:function(){return this.scopes.map(function(e){return this._scopeNameForParameter(e)+":"+e.mode}.bind(this)).join(" ")}}),r._rs_init=function(){},e.exports=r},function(e,t,n){"use strict";var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n(0),s=n(1),a=n(24),c={},l=function(e){return new Promise(function(t,n){return e in c?t(c[e]):new a({tls_only:!1,uri_fallback:!0,request_timeout:5e3}).lookup(e,function(s,a){if(s)return n(s);if("object"!==i(a.idx.links.remotestorage)||"number"!=typeof a.idx.links.remotestorage.length||a.idx.links.remotestorage.length<=0)return o("[Discover] WebFinger record for "+e+" does not have remotestorage defined in the links section ",JSON.stringify(a.json)),n("WebFinger record for "+e+" does not have remotestorage defined in the links section.");var l=a.idx.links.remotestorage[0],u=l.properties["http://tools.ietf.org/html/rfc6749#section-4.2"]||l.properties["auth-endpoint"],h=l.properties["http://remotestorage.io/spec/version"]||l.type;return c[e]={href:l.href,storageApi:h,authURL:u,properties:l.properties},r&&(localStorage["remotestorage:discover"]=JSON.stringify({cache:c})),t(c[e])})})};(l.DiscoveryError=function(e){this.name="DiscoveryError",this.message=e,this.stack=(new Error).stack}).prototype=Object.create(Error.prototype),l.DiscoveryError.prototype.constructor=l.DiscoveryError,l._rs_init=function(){if(r=s.localStorageAvailable()){var e;try{e=JSON.parse(localStorage["remotestorage:discover"])}catch(e){}e&&(c=e.cache)}},l._rs_supported=function(){return!!s.globalContext.XMLHttpRequest},l._rs_cleanup=function(){r&&delete localStorage["remotestorage:discover"]},e.exports=l},function(e,t,n){"use strict";function r(e){return"/"===e.substr(-1)&&(e=e.substr(0,e.length-1)),decodeURIComponent(e)}function i(e){return e.replace(/[^\/]+\/?$/,"")}function o(e){var t=e.split("/");return"/"===e.substr(-1)?t[t.length-2]+"/":t[t.length-1]}function s(e){return v(m+"/"+e)}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=n(4),l=n(5),u=n(8),h=n(2),d=n(1),f="https://www.googleapis.com",p="remotestorage:googledrive",m="/remotestorage",g=d.isFolder,v=d.cleanPath,y=d.shouldBeTreatedAsBinary,b=d.readBinaryData,w=void 0,x=function(e){this.maxAge=e,this._items={}};x.prototype={get:function(e){var t=this._items[e],n=(new Date).getTime();return t&&t.t>=n-this.maxAge?t.v:void 0},set:function(e,t){this._items[e]={v:t,t:(new Date).getTime()}}};var _=function(e,t){if(h(this,"connected","not-connected"),this.rs=e,this.clientId=t,this._fileIdCache=new x(300),w=d.localStorageAvailable()){var n=void 0;try{n=JSON.parse(localStorage.getItem(p))}catch(e){}n&&this.configure(n)}};_.prototype={connected:!1,online:!0,configure:function(e){var t=this;void 0!==e.userAddress&&(this.userAddress=e.userAddress),void 0!==e.token&&(this.token=e.token);var n=function(){w&&localStorage.setItem(p,JSON.stringify({userAddress:this.userAddress,token:this.token}))},r=function(){this.connected=!1,delete this.token,w&&localStorage.removeItem(p)};this.token?(this.connected=!0,this.userAddress?(this._emit("connected"),n.apply(this)):this.info().then(function(e){t.userAddress=e.user.emailAddress,t._emit("connected"),n.apply(t)}).catch(function(){r.apply(t),t.rs._emit("error",new Error("Could not fetch user info."))})):r.apply(this)},connect:function(){this.rs.setBackend("googledrive"),c(this.rs,"https://accounts.google.com/o/oauth2/auth","https://www.googleapis.com/auth/drive",String(c.getLocation()),this.clientId)},stopWaitingForToken:function(){this.connected||this._emit("not-connected")},get:function(e,t){return"/"===e.substr(-1)?this._getFolder(s(e),t):this._getFile(s(e),t)},put:function(e,t,n,r){function i(e){if(e.status>=200&&e.status<300){var t=JSON.parse(e.responseText),n=t.etag.substring(1,t.etag.length-1);return Promise.resolve({statusCode:200,contentType:t.mimeType,revision:n})}return 412===e.status?Promise.resolve({statusCode:412,revision:"conflict"}):Promise.reject("PUT failed with status "+e.status+" ("+e.responseText+")")}var o=this,a=s(e);return this._getFileId(a).then(function(e){return e?r&&"*"===r.ifNoneMatch?i({status:412}):o._updateFile(e,a,t,n,r).then(i):o._createFile(a,t,n,r).then(i)})},delete:function(e,t){var n=this,r=s(e);return this._getFileId(r).then(function(e){return e?n._getMeta(e).then(function(r){var i=void 0;return"object"===(void 0===r?"undefined":a(r))&&"string"==typeof r.etag&&(i=r.etag.substring(1,r.etag.length-1)),t&&t.ifMatch&&t.ifMatch!==i?{statusCode:412,revision:i}:n._request("DELETE",f+"/drive/v2/files/"+e,{}).then(function(e){return 200===e.status||204===e.status?{statusCode:200}:Promise.reject("Delete failed: "+e.status+" ("+e.responseText+")")})}):Promise.resolve({statusCode:200})})},info:function(){return this._request("GET","https://www.googleapis.com/drive/v2/about?fields=user",{}).then(function(e){try{var t=JSON.parse(e.responseText);return Promise.resolve(t)}catch(e){return Promise.reject(e)}})},_updateFile:function(e,t,n,r,i){var o=this,s={mimeType:r},a={"Content-Type":"application/json; charset=UTF-8"};return i&&i.ifMatch&&(a["If-Match"]='"'+i.ifMatch+'"'),this._request("PUT",f+"/upload/drive/v2/files/"+e+"?uploadType=resumable",{body:JSON.stringify(s),headers:a}).then(function(e){return 412===e.status?e:o._request("PUT",e.getResponseHeader("Location"),{body:r.match(/^application\/json/)?JSON.stringify(n):n})})},_createFile:function(e,t,n){var i=this;return this._getParentId(e).then(function(s){var a={title:r(o(e)),mimeType:n,parents:[{kind:"drive#fileLink",id:s}]};return i._request("POST",f+"/upload/drive/v2/files?uploadType=resumable",{body:JSON.stringify(a),headers:{"Content-Type":"application/json; charset=UTF-8"}}).then(function(e){return i._request("POST",e.getResponseHeader("Location"),{body:n.match(/^application\/json/)?JSON.stringify(t):t})})})},_getFile:function(e,t){var n=this;return this._getFileId(e).then(function(e){return n._getMeta(e).then(function(e){var r=void 0;if("object"===(void 0===e?"undefined":a(e))&&"string"==typeof e.etag&&(r=e.etag.substring(1,e.etag.length-1)),t&&t.ifNoneMatch&&r===t.ifNoneMatch)return Promise.resolve({statusCode:304});if(!e.downloadUrl){if(!e.exportLinks||!e.exportLinks["text/html"])return Promise.resolve({statusCode:200,body:"",contentType:e.mimeType,revision:r});e.mimeType+=";export=text/html",e.downloadUrl=e.exportLinks["text/html"]}return n._request("GET",e.downloadUrl,{}).then(function(t){var n=t.response;if(e.mimeType.match(/^application\/json/))try{n=JSON.parse(n)}catch(e){}else if(y(n,e.mimeType))return b(n,e.mimeType).then(function(t){return{statusCode:200,body:t,contentType:e.mimeType,revision:r}});return Promise.resolve({statusCode:200,body:n,contentType:e.mimeType,revision:r})})})})},_getFolder:function(e){var t=this;return this._getFileId(e).then(function(n){var r,i,o=void 0,s=void 0,a=void 0;return n?(r="'"+n+"' in parents",i="items(downloadUrl,etag,fileSize,id,mimeType,title)",t._request("GET",f+"/drive/v2/files?q="+encodeURIComponent(r)+"&fields="+encodeURIComponent(i)+"&maxResults=1000",{}).then(function(n){if(200!==n.status)return Promise.reject("request failed or something: "+n.status);try{o=JSON.parse(n.responseText)}catch(e){return Promise.reject("non-JSON response from GoogleDrive")}a={};var r=!0,i=!1,c=void 0;try{for(var l,u=o.items[Symbol.iterator]();!(r=(l=u.next()).done);r=!0){var h=l.value;s=h.etag.substring(1,h.etag.length-1),"application/vnd.google-apps.folder"===h.mimeType?(t._fileIdCache.set(e+h.title+"/",h.id),a[h.title+"/"]={ETag:s}):(t._fileIdCache.set(e+h.title,h.id),a[h.title]={ETag:s,"Content-Type":h.mimeType,"Content-Length":h.fileSize})}}catch(e){i=!0,c=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw c}}return Promise.resolve({statusCode:200,body:a,contentType:"application/json; charset=UTF-8",revision:void 0})})):Promise.resolve({statusCode:404})})},_getParentId:function(e){var t=this,n=i(e);return this._getFileId(n).then(function(e){return e?Promise.resolve(e):t._createFolder(n)})},_createFolder:function(e){var t=this;return this._getParentId(e).then(function(n){return t._request("POST",f+"/drive/v2/files",{body:JSON.stringify({title:r(o(e)),mimeType:"application/vnd.google-apps.folder",parents:[{id:n}]}),headers:{"Content-Type":"application/json; charset=UTF-8"}}).then(function(e){var t=JSON.parse(e.responseText);return Promise.resolve(t.id)})})},_getFileId:function(e){var t=this,n=void 0;return"/"===e?Promise.resolve("root"):(n=this._fileIdCache.get(e))?Promise.resolve(n):this._getFolder(i(e)).then(function(){return(n=t._fileIdCache.get(e))?Promise.resolve(n):"/"===e.substr(-1)?t._createFolder(e).then(function(){return t._getFileId(e)}):Promise.resolve()})},_getMeta:function(e){return this._request("GET",f+"/drive/v2/files/"+e,{}).then(function(t){return 200===t.status?Promise.resolve(JSON.parse(t.responseText)):Promise.reject("request (getting metadata for "+e+") failed with status: "+t.status)})},_request:function(e,t,n){var r=this;return n.headers||(n.headers={}),n.headers.Authorization="Bearer "+this.token,this.rs._emit("wire-busy",{method:e,isFolder:g(t)}),u.request.call(this,e,t,n).then(function(n){return n&&401===n.status?void r.connect():(r.online||(r.online=!0,r.rs._emit("network-online")),r.rs._emit("wire-done",{method:e,isFolder:g(t),success:!0}),Promise.resolve(n))},function(n){return r.online&&(r.online=!1,r.rs._emit("network-offline")),r.rs._emit("wire-done",{method:e,isFolder:g(t),success:!1}),Promise.reject(n)})}},_._rs_init=function(e){var t,n=e.apiKeys.googledrive;n&&(e.googledrive=new _(e,n.clientId),"googledrive"===e.backend&&(e._origRemote=e.remote,e.remote=e.googledrive,(t=e)._origBaseClientGetItemURL||(t._origBaseClientGetItemURL=l.prototype.getItemURL,l.prototype.getItemURL=function(){throw new Error("getItemURL is not implemented for Google Drive yet")})))},_._rs_supported=function(){return!0},_._rs_cleanup=function(e){var t;e.setBackend(void 0),e._origRemote&&(e.remote=e._origRemote,delete e._origRemote),(t=e)._origBaseClientGetItemURL&&(l.prototype.getItemURL=t._origBaseClientGetItemURL,delete t._origBaseClientGetItemURL)},e.exports=_},function(e,t,n){"use strict";var r=n(2),i="undefined"!=typeof window?"browser":"node",o={},s=function(){return o};s.isBrowser=function(){return"browser"===i},s.isNode=function(){return"node"===i},s.goBackground=function(){s._emit("background")},s.goForeground=function(){s._emit("foreground")},s._rs_init=function(){function e(){document[o.hiddenProperty]?s.goBackground():s.goForeground()}r(s,"background","foreground"),"browser"===i&&(void 0!==document.hidden?(o.hiddenProperty="hidden",o.visibilityChangeEvent="visibilitychange"):void 0!==document.mozHidden?(o.hiddenProperty="mozHidden",o.visibilityChangeEvent="mozvisibilitychange"):void 0!==document.msHidden?(o.hiddenProperty="msHidden",o.visibilityChangeEvent="msvisibilitychange"):void 0!==document.webkitHidden&&(o.hiddenProperty="webkitHidden",o.visibilityChangeEvent="webkitvisibilitychange"),document.addEventListener(o.visibilityChangeEvent,e,!1),e())},s._rs_cleanup=function(){},e.exports=s},function(e,t,n){"use strict";function r(e){this.defaultValue=e,this._storage={},this.set=this.justSet,this.delete=this.justDelete}function i(e){e._dropboxOrigSync||(e._dropboxOrigSync=e.sync.sync.bind(e.sync),e.sync.sync=function(){return this.dropbox.fetchDelta.apply(this.dropbox,arguments).then(e._dropboxOrigSync,function(t){return e._emit("error",new f.SyncError(t)),Promise.reject(t)})}.bind(e))}function o(e){!function(e){e._origRemote||(e._origRemote=e.remote,e.remote=e.dropbox)}(e),e.sync?i(e):e.on("connected",function(){e.sync&&i(e)}),function(e){e._origBaseClientGetItemURL||(e._origBaseClientGetItemURL=l.prototype.getItemURL,l.prototype.getItemURL=function(){throw new Error("getItemURL is not implemented for Dropbox yet")})}(e)}function s(e){!function(e){e._origRemote&&(e.remote=e._origRemote,delete e._origRemote)}(e),function(e){e._dropboxOrigSync&&(e.sync.sync=e._dropboxOrigSync,delete e._dropboxOrigSync)}(e),function(e){e._origBaseClientGetItemURL&&(l.prototype.getItemURL=e._origBaseClientGetItemURL,delete e._origBaseClientGetItemURL)}(e)}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=n(4),l=n(5),u=n(8),h=n(1),d=n(2),f=n(7),p=void 0,m="remotestorage:dropbox",g=h.isFolder,v=h.cleanPath,y=h.shouldBeTreatedAsBinary,b=h.readBinaryData,w=function(e){return v("/remotestorage/"+e).replace(/\/$/,"")},x=function(e,t){return new RegExp("^"+t.join("\\/")+"(\\/|$)").test(e.error_summary)},_=function(e){return e instanceof ArrayBuffer||u.isArrayBufferView(e)};r.prototype={get:function(e){e=e.toLowerCase();var t=this._storage[e];return void 0===t&&(t=this.defaultValue,this._storage[e]=t),t},propagateSet:function(e,t){return e=e.toLowerCase(),this._storage[e]===t?t:(this._propagate(e,t),this._storage[e]=t,t)},propagateDelete:function(e){return e=e.toLowerCase(),this._propagate(e,this._storage[e]),delete this._storage[e]},_activatePropagation:function(){return this.set=this.propagateSet,this.delete=this.propagateDelete,!0},justSet:function(e,t){return e=e.toLowerCase(),this._storage[e]=t,t},justDelete:function(e){return e=e.toLowerCase(),delete this._storage[e]},_propagate:function(e,t){for(var n=e.split("/").slice(0,-1),r="",i=0,o=n.length;i<o;i++)r+=n[i]+"/",t||(t=this._storage[r]+1),this._storage[r]=t}};var S=function(e){if(this.rs=e,this.connected=!1,this.rs=e,d(this,"connected","not-connected"),this.clientId=e.apiKeys.dropbox.appKey,this._revCache=new r("rev"),this._itemRefs={},p=h.localStorageAvailable()){var t;try{t=JSON.parse(localStorage.getItem(m))}catch(e){}t&&this.configure(t);try{this._itemRefs=JSON.parse(localStorage.getItem(m+":shares"))||{}}catch(e){}}this.connected&&setTimeout(this._emit.bind(this),0,"connected")};S.prototype={online:!0,connect:function(){this.rs.setBackend("dropbox"),this.token?o(this.rs):c(this.rs,"https://www.dropbox.com/oauth2/authorize","",String(c.getLocation()),this.clientId)},configure:function(e){void 0!==e.userAddress&&(this.userAddress=e.userAddress),void 0!==e.token&&(this.token=e.token);var t=function(){p&&localStorage.setItem(m,JSON.stringify({userAddress:this.userAddress,token:this.token}))},n=function(){this.connected=!1,p&&localStorage.removeItem(m)};this.token?(this.connected=!0,this.userAddress?(this._emit("connected"),t.apply(this)):this.info().then(function(e){this.userAddress=e.email,this._emit("connected"),t.apply(this)}.bind(this)).catch(function(){n.apply(this),this.rs._emit("error",new Error("Could not fetch user info."))}.bind(this))):n.apply(this)},stopWaitingForToken:function(){this.connected||this._emit("not-connected")},_getFolder:function(e){var t=this._revCache,n=this,r=function(n){var r,o;if(200!==n.status&&409!==n.status)return Promise.reject("Unexpected response status: "+n.status);try{r=JSON.parse(n.responseText)}catch(e){return Promise.reject(e)}return 409===n.status?x(r,["path","not_found"])?Promise.resolve({}):Promise.reject(new Error("API returned an error: "+r.error_summary)):(o=r.entries.reduce(function(n,r){var i="folder"===r[".tag"],o=r.path_lower.split("/").slice(-1)[0]+(i?"/":"");return n[o]=i?{ETag:t.get(e+o)}:{ETag:r.rev},n},{}),r.has_more?i(r.cursor).then(function(e){return Object.assign(o,e)}):Promise.resolve(o))},i=function(e){var t={body:{cursor:e}};return n._request("POST","https://api.dropboxapi.com/2/files/list_folder/continue",t).then(r)};return this._request("POST","https://api.dropboxapi.com/2/files/list_folder",{body:{path:w(e)}}).then(r).then(function(n){return Promise.resolve({statusCode:200,body:n,contentType:"application/json; charset=UTF-8",revision:t.get(e)})})},get:function(e,t){if(!this.connected)return Promise.reject("not connected (path: "+e+")");var n=this,r=this._revCache.get(e);if(null===r)return Promise.resolve({statusCode:404});if(t&&t.ifNoneMatch&&r&&r===t.ifNoneMatch)return Promise.resolve({statusCode:304});if("/"===e.substr(-1))return this._getFolder(e,t);var i={headers:{"Dropbox-API-Arg":JSON.stringify({path:w(e)})}};return t&&t.ifNoneMatch&&(i.headers["If-None-Match"]=t.ifNoneMatch),this._request("GET","https://content.dropboxapi.com/2/files/download",i).then(function(t){var r,i,o,s,a=t.status;if(200!==a&&409!==a)return Promise.resolve({statusCode:a});r=t.getResponseHeader("Dropbox-API-Result"),i=t.responseText,409===a&&(r=i);try{r=JSON.parse(r)}catch(e){return Promise.reject(e)}if(409===a)return x(r,["path","not_found"])?Promise.resolve({statusCode:404}):Promise.reject(new Error('API error while downloading file ("'+e+'"): '+r.error_summary));if(o=t.getResponseHeader("Content-Type"),s=r.rev,n._revCache.set(e,s),n._shareIfNeeded(e),y(t.response,o))return b(t.response,o).then(function(e){return{statusCode:a,body:e,contentType:o,revision:s}});try{i=JSON.parse(i),o="application/json; charset=UTF-8"}catch(e){}return Promise.resolve({statusCode:a,body:i,contentType:o,revision:s})})},put:function(e,t,n,r){var i=this;if(!this.connected)throw new Error("not connected (path: "+e+")");var o=this._revCache.get(e);if(r&&r.ifMatch&&o&&o!==r.ifMatch)return Promise.resolve({statusCode:412,revision:o});if(r&&"*"===r.ifNoneMatch&&o&&"rev"!==o)return Promise.resolve({statusCode:412,revision:o});if(!n.match(/charset=/)&&_(t)&&(n+="; charset=binary"),t.length>157286400)return Promise.reject(new Error("Cannot upload file larger than 150MB"));var s=r&&(r.ifMatch||"*"===r.ifNoneMatch),a={body:t,contentType:n,path:e};return(s?this._getMetadata(e).then(function(e){return r&&"*"===r.ifNoneMatch&&e?Promise.resolve({statusCode:412,revision:e.rev}):r&&r.ifMatch&&e&&e.rev!==r.ifMatch?Promise.resolve({statusCode:412,revision:e.rev}):i._uploadSimple(a)}):i._uploadSimple(a)).then(function(t){return i._shareIfNeeded(e),t})},delete:function(e,t){var n=this;if(!this.connected)throw new Error("not connected (path: "+e+")");var r=this._revCache.get(e);return t&&t.ifMatch&&r&&t.ifMatch!==r?Promise.resolve({statusCode:412,revision:r}):t&&t.ifMatch?this._getMetadata(e).then(function(r){return t&&t.ifMatch&&r&&r.rev!==t.ifMatch?Promise.resolve({statusCode:412,revision:r.rev}):n._deleteSimple(e)}):this._deleteSimple(e)},_shareIfNeeded:function(e){e.match(/^\/public\/.*[^\/]$/)&&void 0===this._itemRefs[e]&&this.share(e)},share:function(e){var t=this,n={body:{path:w(e)}};return this._request("POST","https://api.dropboxapi.com/2/sharing/create_shared_link_with_settings",n).then(function(n){if(200!==n.status&&409!==n.status)return Promise.reject(new Error("Invalid response status:"+n.status));var r;try{r=JSON.parse(n.responseText)}catch(e){return Promise.reject(new Error("Invalid response body: "+n.responseText))}return 409===n.status?x(r,["shared_link_already_exists"])?t._getSharedLink(e):Promise.reject(new Error("API error: "+r.error_summary)):Promise.resolve(r.url)}).then(function(n){return t._itemRefs[e]=n,p&&localStorage.setItem(m+":shares",JSON.stringify(t._itemRefs)),Promise.resolve(n)},function(t){return t.message='Sharing Dropbox file or folder ("'+e+'") failed: '+t.message,Promise.reject(t)})},info:function(){return this._request("POST","https://api.dropboxapi.com/2/users/get_current_account",{}).then(function(e){var t=e.responseText;try{t=JSON.parse(t)}catch(e){return Promise.reject(new Error("Could not query current account info: Invalid API response: "+t))}return Promise.resolve({email:t.email})})},_request:function(e,t,n){var r=this;return n.headers||(n.headers={}),n.headers.Authorization="Bearer "+this.token,"object"!==a(n.body)||_(n.body)||(n.body=JSON.stringify(n.body),n.headers["Content-Type"]="application/json; charset=UTF-8"),this.rs._emit("wire-busy",{method:e,isFolder:g(t)}),u.request.call(this,e,t,n).then(function(i){return i&&503===i.status?(r.online&&(r.online=!1,r.rs._emit("network-offline")),setTimeout(r._request(e,t,n),3210)):(r.online||(r.online=!0,
r.rs._emit("network-online")),r.rs._emit("wire-done",{method:e,isFolder:g(t),success:!0}),Promise.resolve(i))},function(n){return r.online&&(r.online=!1,r.rs._emit("network-offline")),r.rs._emit("wire-done",{method:e,isFolder:g(t),success:!1}),Promise.reject(n)})},fetchDelta:function(){var e=Array.prototype.slice.call(arguments),t=this;return t._revCache=new r("rev"),function n(r){var i="https://api.dropboxapi.com/2/files/list_folder",o=void 0;return"string"==typeof r?(i+="/continue",o={cursor:r}):o={path:"/remotestorage",recursive:!0,include_deleted:!0},t._request("POST",i,{body:o}).then(function(r){if(401===r.status)return t.rs._emit("error",new c.Unauthorized),Promise.resolve(e);if(200!==r.status&&409!==r.status)return Promise.reject(new Error("Invalid response status: "+r.status));var i=void 0;try{i=JSON.parse(r.responseText)}catch(e){return Promise.reject(new Error("Invalid response body: "+r.responseText))}if(409===r.status){if(!x(i,["path","not_found"]))return Promise.reject(new Error("API returned an error: "+i.error_summary));i={cursor:null,entries:[],has_more:!1}}return i.entries.forEach(function(e){var n=e.path_lower.substr("/remotestorage".length);"deleted"===e[".tag"]?(t._revCache.set(n,null),t._revCache.set(n+"/",null)):"file"===e[".tag"]&&t._revCache.set(n,e.rev)}),i.has_more?n(i.cursor):void 0}).catch(function(e){return"timeout"===e||e instanceof ProgressEvent?Promise.resolve():Promise.reject(e)})}().then(void 0,function(e){return"object"===(void 0===e?"undefined":a(e))&&"message"in e?e.message="Dropbox: fetchDelta: "+e.message:e="Dropbox: fetchDelta: "+e,Promise.reject(e)}).then(function(){return t._revCache&&t._revCache._activatePropagation(),Promise.resolve(e)})},_getMetadata:function(e){var t={path:w(e)};return this._request("POST","https://api.dropboxapi.com/2/files/get_metadata",{body:t}).then(function(e){if(200!==e.status&&409!==e.status)return Promise.reject(new Error("Invalid response status:"+e.status));var t=void 0;try{t=JSON.parse(e.responseText)}catch(t){return Promise.reject(new Error("Invalid response body: "+e.responseText))}return 409===e.status?x(t,["path","not_found"])?Promise.resolve():Promise.reject(new Error("API error: "+t.error_summary)):Promise.resolve(t)}).then(void 0,function(t){return t.message='Could not load metadata for file or folder ("'+e+'"): '+t.message,Promise.reject(t)})},_uploadSimple:function(e){var t=this,n={path:w(e.path),mode:{".tag":"overwrite"},mute:!0};return e.ifMatch&&(n.mode={".tag":"update",update:e.ifMatch}),this._request("POST","https://content.dropboxapi.com/2/files/upload",{body:e.body,headers:{"Content-Type":"application/octet-stream","Dropbox-API-Arg":JSON.stringify(n)}}).then(function(n){if(200!==n.status&&409!==n.status)return Promise.resolve({statusCode:n.status});var r=n.responseText;try{r=JSON.parse(r)}catch(e){return Promise.reject(new Error("Invalid API result: "+r))}return 409===n.status?x(r,["path","conflict"])?t._getMetadata(e.path).then(function(e){return Promise.resolve({statusCode:412,revision:e.rev})}):Promise.reject(new Error("API error: "+r.error_summary)):(t._revCache.propagateSet(e.path,r.rev),Promise.resolve({statusCode:n.status,revision:r.rev}))})},_deleteSimple:function(e){var t=this,n={path:w(e)};return this._request("POST","https://api.dropboxapi.com/2/files/delete",{body:n}).then(function(e){if(200!==e.status&&409!==e.status)return Promise.resolve({statusCode:e.status});var t=e.responseText;try{t=JSON.parse(t)}catch(e){return Promise.reject(new Error("Invalid response body: "+t))}return 409===e.status?x(t,["path_lookup","not_found"])?Promise.resolve({statusCode:404}):Promise.reject(new Error("API error: "+t.error_summary)):Promise.resolve({statusCode:200})}).then(function(n){return 200!==n.statusCode&&404!==n.statusCode||(t._revCache.delete(e),delete t._itemRefs[e]),Promise.resolve(n)},function(t){return t.message='Could not delete Dropbox file or folder ("'+e+'"): '+t.message,Promise.reject(t)})},_getSharedLink:function(e){var t={body:{path:w(e),direct_only:!0}};return this._request("POST","https://api.dropbox.com/2/sharing/list_shared_links",t).then(function(e){if(200!==e.status&&409!==e.status)return Promise.reject(new Error("Invalid response status: "+e.status));var t;try{t=JSON.parse(e.responseText)}catch(t){return Promise.reject(new Error("Invalid response body: "+e.responseText))}return 409===e.status?Promise.reject(new Error("API error: "+e.error_summary)):t.links.length?Promise.resolve(t.links[0].url):Promise.reject(new Error("No links returned"))},function(t){return t.message='Could not get link to a shared file or folder ("'+e+'"): '+t.message,Promise.reject(t)})}},S._rs_init=function(e){p=h.localStorageAvailable(),e.apiKeys.dropbox&&(e.dropbox=new S(e)),"dropbox"===e.backend&&o(e)},S._rs_supported=function(){return!0},S._rs_cleanup=function(e){s(e),p&&localStorage.removeItem(m),e.setBackend(void 0)},e.exports=S},function(e,t,n){"use strict";function r(e){return"number"==typeof e&&e>1e3&&e<36e5}var i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=n(1),a=n(15),c=n(13),l=n(12),u=n(5),h=n(3),d=n(4),f=n(7),p=n(0),m=n(22),g=s.getGlobalContext(),v=n(2),y=function(e){if("object"===(void 0===e?"undefined":o(e))&&s.extend(h,e),v(this,"ready","authing","connecting","connected","disconnected","not-connected","conflict","error","features-loaded","sync-interval-change","sync-req-done","sync-done","wire-busy","wire-done","network-offline","network-online"),this._pending=[],this._setGPD({get:this._pendingGPD("get"),put:this._pendingGPD("put"),delete:this._pendingGPD("delete")}),this._cleanups=[],this._pathHandlers={change:{}},this.apiKeys={},i=s.localStorageAvailable()){try{this.apiKeys=JSON.parse(localStorage.getItem("remotestorage:api-keys"))||{}}catch(e){}this.setBackend(localStorage.getItem("remotestorage:backend")||"remotestorage")}var t=this.on;this.on=function(e,n){if(this._allLoaded)switch(e){case"features-loaded":setTimeout(n,0);break;case"ready":this.remote&&setTimeout(n,0);break;case"connected":this.remote&&this.remote.connected&&setTimeout(n,0);break;case"not-connected":this.remote&&!this.remote.connected&&setTimeout(n,0)}return t.call(this,e,n)},this._init(),this.fireInitial=function(){this.local&&setTimeout(this.local.fireInitial.bind(this.local),0)}.bind(this),this.on("ready",this.fireInitial.bind(this)),this.loadModules()};y.Authorize=d,y.SyncError=f.SyncError,y.Unauthorized=d.Unauthorized,y.DiscoveryError=l.DiscoveryError,y.prototype={loadModules:function(){h.modules.forEach(this.addModule.bind(this))},authorize:function(e,t){this.access.setStorageType(this.remote.storageApi);var n=this.access.scopeParameter,r=g.cordova?t:String(d.getLocation()),i=r.match(/^(https?:\/\/[^\/]+)/)[0];d(this,e,n,r,i)},impliedauth:function(e,t){e=this.remote.storageApi,t=String(document.location),p("ImpliedAuth proceeding due to absent authURL; storageApi = "+e+" redirectUri = "+t),this.remote.configure({token:d.IMPLIED_FAKE_TOKEN}),document.location=t},connect:function(e,t){var n=this;if(this.setBackend("remotestorage"),e.indexOf("@")<0)this._emit("error",new y.DiscoveryError("User address doesn't contain an @."));else{if(g.cordova){if("string"!=typeof h.cordovaRedirectUri)return void this._emit("error",new y.DiscoveryError("Please supply a custom HTTPS redirect URI for your Cordova app"));if(!g.cordova.InAppBrowser)return void this._emit("error",new y.DiscoveryError("Please include the InAppBrowser Cordova plugin to enable OAuth"))}this.remote.configure({userAddress:e}),this._emit("connecting");var r=setTimeout(function(){this._emit("error",new y.DiscoveryError("No storage information found for this user address."))}.bind(this),h.discoveryTimeout);l(e).then(function(i){if(clearTimeout(r),n._emit("authing"),i.userAddress=e,n.remote.configure(i),!n.remote.connected)if(i.authURL)if(void 0===t)n.authorize(i.authURL,h.cordovaRedirectUri);else{if("string"!=typeof t)throw new Error("Supplied bearer token must be a string");p("Skipping authorization sequence and connecting with known token"),n.remote.configure({token:t})}else n.impliedauth()},function(){clearTimeout(r),n._emit("error",new y.DiscoveryError("No storage information found for this user address."))})}},reconnect:function(){this.remote.configure({token:null}),"remotestorage"===this.backend?this.connect(this.remote.userAddress):this.remote.connect()},disconnect:function(){this.remote&&this.remote.configure({userAddress:null,href:null,storageApi:null,token:null,properties:null}),this._setGPD({get:this._pendingGPD("get"),put:this._pendingGPD("put"),delete:this._pendingGPD("delete")});var e=this._cleanups.length,t=0,n=function(){++t>=e&&(this._init(),p("Done cleaning up, emitting disconnected and disconnect events"),this._emit("disconnected"))}.bind(this);e>0?this._cleanups.forEach(function(e){var t=e(this);"object"===(void 0===t?"undefined":o(t))&&"function"==typeof t.then?t.then(n):n()}.bind(this)):n()},setBackend:function(e){this.backend=e,i&&(e?localStorage.setItem("remotestorage:backend",e):localStorage.removeItem("remotestorage:backend"))},onChange:function(e,t){this._pathHandlers.change[e]||(this._pathHandlers.change[e]=[]),this._pathHandlers.change[e].push(t)},enableLog:function(){h.logging=!0},disableLog:function(){h.logging=!1},log:function(){p.apply(y,arguments)},setApiKeys:function(e){var t=this,n=["googledrive","dropbox"];return"object"===(void 0===e?"undefined":o(e))&&Object.keys(e).every(function(e){return-1!==n.indexOf(e)})?(Object.keys(e).forEach(function(n){var r=e[n];if(r){switch(n){case"dropbox":t.apiKeys.dropbox={appKey:r},void 0!==t.dropbox&&t.dropbox.clientId===r||a._rs_init(t);break;case"googledrive":t.apiKeys.googledrive={clientId:r},void 0!==t.googledrive&&t.googledrive.clientId===r||c._rs_init(t)}return!0}delete t.apiKeys[n]}),void(i&&localStorage.setItem("remotestorage:api-keys",JSON.stringify(this.apiKeys)))):(console.error("setApiKeys() was called with invalid arguments"),!1)},setCordovaRedirectUri:function(e){if("string"!=typeof e||!e.match(/http(s)?:\/\//))throw new Error("Cordova redirect URI must be a URI string");h.cordovaRedirectUri=e},_init:m.loadFeatures,features:m.features,loadFeature:m.loadFeature,featureSupported:m.featureSupported,featureDone:m.featureDone,featuresDone:m.featuresDone,featuresLoaded:m.featuresLoaded,featureInitialized:m.featureInitialized,featureFailed:m.featureFailed,hasFeature:m.hasFeature,_setCachingModule:m._setCachingModule,_collectCleanupFunctions:m._collectCleanupFunctions,_fireReady:m._fireReady,initFeature:m.initFeature,_setGPD:function(e,t){function n(e){return function(){return e.apply(t,arguments).then(function(e){return 403!==e.statusCode&&401!==e.statusCode||this._emit("error",new d.Unauthorized),Promise.resolve(e)}.bind(this))}}this.get=n(e.get),this.put=n(e.put),this.delete=n(e.delete)},_pendingGPD:function(e){return function(){var t=Array.prototype.slice.call(arguments);return new Promise(function(n,r){this._pending.push({method:e,args:t,promise:{resolve:n,reject:r}})}.bind(this))}.bind(this)},_processPending:function(){this._pending.forEach(function(e){try{this[e.method].apply(this,e.args).then(e.promise.resolve,e.promise.reject)}catch(t){e.promise.reject(t)}}.bind(this)),this._pending=[]},_bindChange:function(e){e.on("change",this._dispatchEvent.bind(this,"change"))},_dispatchEvent:function(e,t){var n=this;Object.keys(this._pathHandlers[e]).forEach(function(r){var i=r.length;t.path.substr(0,i)===r&&n._pathHandlers[e][r].forEach(function(e){var i={};for(var o in t)i[o]=t[o];i.relativePath=t.path.replace(new RegExp("^"+r),"");try{e(i)}catch(e){console.error("'change' handler failed: ",e,e.stack),n._emit("error",e)}})})},scope:function(e){if("string"!=typeof e)throw"Argument 'path' of baseClient.scope must be a string";if(!this.access.checkPathPermission(e,"r")){var t=e.replace(/(['\\])/g,"\\$1");console.warn("WARNING: please call remoteStorage.access.claim('"+t+"', 'r') (read only) or remoteStorage.access.claim('"+t+"', 'rw') (read/write) first")}return new u(this,e)},getSyncInterval:function(){return h.syncInterval},setSyncInterval:function(e){if(!r(e))throw e+" is not a valid sync interval";var t=h.syncInterval;h.syncInterval=parseInt(e,10),this._emit("sync-interval-change",{oldValue:t,newValue:e})},getBackgroundSyncInterval:function(){return h.backgroundSyncInterval},setBackgroundSyncInterval:function(e){if(!r(e))throw e+" is not a valid sync interval";var t=h.backgroundSyncInterval;h.backgroundSyncInterval=parseInt(e,10),this._emit("sync-interval-change",{oldValue:t,newValue:e})},getCurrentSyncInterval:function(){return h.isBackground?h.backgroundSyncInterval:h.syncInterval},getRequestTimeout:function(){return h.requestTimeout},setRequestTimeout:function(e){h.requestTimeout=parseInt(e,10)},syncCycle:function(){this.sync&&!this.sync.stopped&&(this.on("sync-done",function(){p("[Sync] Sync done. Setting timer to",this.getCurrentSyncInterval()),this.sync&&!this.sync.stopped&&(this._syncTimer&&(clearTimeout(this._syncTimer),this._syncTimer=void 0),this._syncTimer=setTimeout(this.sync.sync.bind(this.sync),this.getCurrentSyncInterval()))}.bind(this)),this.sync.sync())},startSync:function(){return h.cache?(this.sync.stopped=!1,this.syncStopped=!1,this.sync.sync()):(console.warn("Nothing to sync, because caching is disabled."),Promise.resolve())},stopSync:function(){clearTimeout(this._syncTimer),this._syncTimer=void 0,this.sync?(p("[Sync] Stopping sync"),this.sync.stopped=!0):(p("[Sync] Will instantiate sync stopped"),this.syncStopped=!0)}},y.util=s,Object.defineProperty(y.prototype,"connected",{get:function(){return this.remote.connected}});var b=n(11);Object.defineProperty(y.prototype,"access",{get:function(){var e=new b;return Object.defineProperty(this,"access",{value:e}),e},configurable:!0});var w=n(10);Object.defineProperty(y.prototype,"caching",{configurable:!0,get:function(){var e=new w;return Object.defineProperty(this,"caching",{value:e}),e}}),e.exports=y,n(17)},function(e,t,n){"use strict";var r=n(5),i=n(16);i.prototype.addModule=function(e){var t=e.name,n=e.builder;if(Object.defineProperty(this,t,{configurable:!0,get:function(){var e=this._loadModule(t,n);return Object.defineProperty(this,t,{value:e}),e}}),-1!==t.indexOf("-")){var r=t.replace(/\-[a-z]/g,function(e){return e[1].toUpperCase()});Object.defineProperty(this,r,{get:function(){return this[t]}})}},i.prototype._loadModule=function(e,t){if(t)return t(new r(this,"/"+e+"/"),new r(this,"/public/"+e+"/")).exports;throw"Unknown module: "+e}},function(e,t,n){"use strict";var r=n(2),i=n(0),o=n(6),s=function(){o(this),i("[InMemoryStorage] Registering events"),r(this,"change","local-events-done"),this._storage={}};s.prototype={getNodes:function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n]]=this._storage[e[n]];return Promise.resolve(t)},setNodes:function(e){for(var t in e)void 0===e[t]?delete this._storage[t]:this._storage[t]=e[t];return Promise.resolve()},forAllNodes:function(e){for(var t in this._storage)e(this.migrate(this._storage[t]));return Promise.resolve()}},s._rs_init=function(){},s._rs_supported=function(){return!0},s._rs_cleanup=function(){},e.exports=s},function(e,t,n){"use strict";function r(e){return e.substr(0,c.length)===c||e.substr(0,l.length)===l}var i=n(6),o=n(0),s=n(2),a=n(1),c="remotestorage:cache:nodes:",l="remotestorage:cache:changes:",u=function(){i(this),o("[LocalStorage] Registering events"),s(this,"change","local-events-done")};u.prototype={getNodes:function(e){for(var t={},n=0,r=e.length;n<r;n++)try{t[e[n]]=JSON.parse(localStorage[c+e[n]])}catch(r){t[e[n]]=void 0}return Promise.resolve(t)},setNodes:function(e){for(var t in e)localStorage[c+t]=JSON.stringify(e[t]);return Promise.resolve()},forAllNodes:function(e){for(var t,n=0,r=localStorage.length;n<r;n++)if(localStorage.key(n).substr(0,c.length)===c){try{t=this.migrate(JSON.parse(localStorage[localStorage.key(n)]))}catch(e){t=void 0}t&&e(t)}return Promise.resolve()}},u._rs_init=function(){},u._rs_supported=function(){return a.localStorageAvailable()},u._rs_cleanup=function(){for(var e=[],t=0,n=localStorage.length;t<n;t++){var i=localStorage.key(t);r(i)&&e.push(i)}e.forEach(function(e){o("[LocalStorage] Removing",e),delete localStorage[e]})},e.exports=u},function(e,t,n){"use strict";var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n(0),s=n(6),a=n(2),c=n(1),l=function(e){this.db=e||r,this.db?(s(this),a(this,"change","local-events-done"),this.getsRunning=0,this.putsRunning=0,this.changesQueued={},this.changesRunning={}):o("[IndexedDB] Failed to open DB")};l.prototype={getNodes:function(e){for(var t=[],n={},r=0,i=e.length;r<i;r++)void 0!==this.changesQueued[e[r]]?n[e[r]]=c.deepClone(this.changesQueued[e[r]]||void 0):void 0!==this.changesRunning[e[r]]?n[e[r]]=c.deepClone(this.changesRunning[e[r]]||void 0):t.push(e[r]);return t.length>0?this.getNodesFromDb(t).then(function(e){for(var t in n)e[t]=n[t];return e}):Promise.resolve(n)},setNodes:function(e){for(var t in e)this.changesQueued[t]=e[t]||!1;return this.maybeFlush(),Promise.resolve()},maybeFlush:function(){0===this.putsRunning?this.flushChangesQueued():this.commitSlownessWarning||(this.commitSlownessWarning=setInterval(function(){console.warn("WARNING: waited more than 10 seconds for previous commit to finish")},1e4))},flushChangesQueued:function(){this.commitSlownessWarning&&(clearInterval(this.commitSlownessWarning),this.commitSlownessWarning=null),Object.keys(this.changesQueued).length>0&&(this.changesRunning=this.changesQueued,this.changesQueued={},this.setNodesInDb(this.changesRunning).then(this.flushChangesQueued.bind(this)))},getNodesFromDb:function(e){var t=this;return new Promise(function(n,r){var i=t.db.transaction(["nodes"],"readonly"),o=i.objectStore("nodes"),s={};t.getsRunning++,e.map(function(e){o.get(e).onsuccess=function(t){s[e]=t.target.result}}),i.oncomplete=function(){n(s),this.getsRunning--}.bind(t),i.onerror=i.onabort=function(){r("get transaction error/abort"),this.getsRunning--}.bind(t)})},setNodesInDb:function(e){var t=this;return new Promise(function(n,r){var s=t.db.transaction(["nodes"],"readwrite"),a=s.objectStore("nodes"),c=(new Date).getTime();for(var l in t.putsRunning++,o("[IndexedDB] Starting put",e,t.putsRunning),e){var u=e[l];if("object"===(void 0===u?"undefined":i(u)))try{a.put(u)}catch(e){throw o("[IndexedDB] Error while putting",u,e),e}else try{a.delete(l)}catch(e){throw o("[IndexedDB] Error while removing",a,u,e),e}}s.oncomplete=function(){this.putsRunning--,o("[IndexedDB] Finished put",e,this.putsRunning,(new Date).getTime()-c+"ms"),n()}.bind(t),s.onerror=function(){this.putsRunning--,r("transaction error")}.bind(t),s.onabort=function(){r("transaction abort"),this.putsRunning--}.bind(t)})},reset:function(e){var t=this,n=this.db.name;this.db.close(),l.clean(this.db.name,function(){l.open(n,function(n,r){n?o("[IndexedDB] Error while resetting local storage",n):t.db=r,"function"==typeof e&&e(self)})})},forAllNodes:function(e){var t=this;return new Promise(function(n){t.db.transaction(["nodes"],"readonly").objectStore("nodes").openCursor().onsuccess=function(r){var i=r.target.result;i?(e(t.migrate(i.value)),i.continue()):n()}})},closeDB:function(){0===this.putsRunning?this.db.close():setTimeout(this.closeDB.bind(this),100)}},l.open=function(e,t){var n=setTimeout(function(){t("timeout trying to open db")},1e4);try{var r=indexedDB.open(e,2);r.onerror=function(){o("[IndexedDB] Opening DB failed",r),clearTimeout(n),t(r.error)},r.onupgradeneeded=function(e){var t=r.result;o("[IndexedDB] Upgrade: from ",e.oldVersion," to ",e.newVersion),1!==e.oldVersion&&(o("[IndexedDB] Creating object store: nodes"),t.createObjectStore("nodes",{keyPath:"path"})),o("[IndexedDB] Creating object store: changes"),t.createObjectStore("changes",{keyPath:"path"})},r.onsuccess=function(){clearTimeout(n);var i=r.result;return i.objectStoreNames.contains("nodes")&&i.objectStoreNames.contains("changes")?void t(null,r.result):(o("[IndexedDB] Missing object store. Resetting the database."),void l.clean(e,function(){l.open(e,t)}))}}catch(r){o("[IndexedDB] Failed to open database: "+r),o("[IndexedDB] Resetting database and trying again."),clearTimeout(n),l.clean(e,function(){l.open(e,t)})}},l.clean=function(e,t){var n=indexedDB.deleteDatabase(e);n.onsuccess=function(){o("[IndexedDB] Done removing DB"),t()},n.onerror=n.onabort=function(t){console.error('Failed to remove database "'+e+'"',t)}},l._rs_init=function(e){return new Promise(function(t,n){l.open("remotestorage",function(i,o){i?n(i):(r=o,o.onerror=function(){e._emit("error",i)},t())})})},l._rs_supported=function(){return new Promise(function(e,t){var n=c.getGlobalContext(),r=!1;if("undefined"!=typeof navigator&&navigator.userAgent.match(/Android (2|3|4\.[0-3])/)&&(navigator.userAgent.match(/Chrome|Firefox/)||(r=!0)),"indexedDB"in n&&!r)try{var i=indexedDB.open("rs-check");i.onerror=function(){t()},i.onsuccess=function(){i.result.close(),indexedDB.deleteDatabase("rs-check"),e()}}catch(e){t()}else t()})},l._rs_cleanup=function(e){return new Promise(function(t){e.local&&e.local.closeDB(),l.clean("remotestorage",t)})},e.exports=l},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(0),o={get:function(e,t){return this.local?(void 0===t&&("object"===r(this.remote)&&this.remote.connected&&this.remote.online?t=2*this.getSyncInterval():(i("Not setting default maxAge, because remote is offline or not connected"),t=!1)),function(e){return!1!==e&&"number"!=typeof e}(t)?Promise.reject("Argument 'maxAge' must be false or a number"):this.local.get(e,t,this.sync.queueGetRequest.bind(this.sync))):this.remote.get(e)},put:function(e,t,n){return function(e){return"dropbox"===this.backend&&e.match(/^\/public\/.*[^\/]$/)}.bind(this)(e)?o._wrapBusyDone.call(this,this.remote.put(e,t,n)):this.local?this.local.put(e,t,n):o._wrapBusyDone.call(this,this.remote.put(e,t,n))},delete:function(e){return this.local?this.local.delete(e):o._wrapBusyDone.call(this,this.remote.delete(e))},_wrapBusyDone:function(e){var t=this;return this._emit("wire-busy"),e.then(function(e){return t._emit("wire-done",{success:!0}),Promise.resolve(e)},function(e){return t._emit("wire-done",{success:!1}),Promise.reject(e)})}};e.exports=o},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(1),o=n(0),s=n(21),a=n(3),c={features:[],featuresDone:0,readyFired:!1,loadFeatures:function(){var e=this;for(var t in this.features=[],this.featuresDone=0,this.readyFired=!1,this.featureModules={WireClient:n(8),Dropbox:n(15),GoogleDrive:n(13),Access:n(11),Discover:n(12),Authorize:n(4),BaseClient:n(5),Env:n(14)},a.cache&&i.extend(this.featureModules,{Caching:n(10),IndexedDB:n(20),LocalStorage:n(19),InMemoryStorage:n(18),Sync:n(7)}),a.disableFeatures.forEach(function(t){e.featureModules[t]&&delete e.featureModules[t]}),this._allLoaded=!1,this.featureModules)this.loadFeature(t)},hasFeature:function(e){for(var t=this.features.length-1;t>=0;t--)if(this.features[t].name===e)return this.features[t].supported;return!1},loadFeature:function(e){var t=this,n=this.featureModules[e],i=!n._rs_supported||n._rs_supported();o("[RemoteStorage] [FEATURE "+e+"] initializing ..."),"object"===(void 0===i?"undefined":r(i))?i.then(function(){t.featureSupported(e,!0),t.initFeature(e)},function(){t.featureSupported(e,!1)}):"boolean"==typeof i?(this.featureSupported(e,i),i&&this.initFeature(e)):this.featureSupported(e,!1)},initFeature:function(e){var t=this,n=this.featureModules[e],i=void 0;try{i=n._rs_init(this)}catch(t){return void this.featureFailed(e,t)}"object"===(void 0===i?"undefined":r(i))&&"function"==typeof i.then?i.then(function(){t.featureInitialized(e)},function(n){t.featureFailed(e,n)}):this.featureInitialized(e)},featureFailed:function(e,t){o("[RemoteStorage] [FEATURE "+e+"] initialization failed ("+t+")"),this.featureDone()},featureSupported:function(e,t){o("[RemoteStorage] [FEATURE "+e+"] "+(t?"":" not")+" supported"),t||this.featureDone()},featureInitialized:function(e){o("[RemoteStorage] [FEATURE "+e+"] initialized."),this.features.push({name:e,init:this.featureModules[e]._rs_init,supported:!0,cleanup:this.featureModules[e]._rs_cleanup}),this.featureDone()},featureDone:function(){this.featuresDone++,this.featuresDone===Object.keys(this.featureModules).length&&setTimeout(this.featuresLoaded.bind(this),0)},_setCachingModule:function(){var e=this;["IndexedDB","LocalStorage","InMemoryStorage"].some(function(t){if(e.features.some(function(e){return e.name===t}))return e.features.local=e.featureModules[t],!0})},_fireReady:function(){try{this.readyFired||(this._emit("ready"),this.readyFired=!0)}catch(e){console.error("'ready' failed: ",e,e.stack),this._emit("error",e)}},featuresLoaded:function(){var e=this;o("[REMOTESTORAGE] All features loaded !"),this._setCachingModule(),this.local=a.cache&&this.features.local&&new this.features.local,this.local&&this.remote?(this._setGPD(s,this),this._bindChange(this.local)):this.remote&&this._setGPD(this.remote,this.remote),this.remote&&(this.remote.on("connected",function(){e._fireReady(),e._emit("connected")}),this.remote.on("not-connected",function(){e._fireReady(),e._emit("not-connected")}),this.remote.connected&&(this._fireReady(),this._emit("connected")),this.hasFeature("Authorize")||this.remote.stopWaitingForToken()),this._collectCleanupFunctions();try{this._allLoaded=!0,this._emit("features-loaded")}catch(e){i.logError(e),this._emit("error",e)}this._processPending()},_collectCleanupFunctions:function(){this._cleanups=[];for(var e=0;e<this.features.length;e++){var t=this.features[e].cleanup;"function"==typeof t&&this._cleanups.push(t)}}};e.exports=c},function(e,t){e.exports=XMLHttpRequest},function(e,t,n){var r;/*!
* webfinger.js
* version 2.6.6
* http://github.com/silverbucket/webfinger.js
*
* Developed and Maintained by:
* Nick Jennings <nick@silverbucket.net> 2012
*
* webfinger.js is released under the AGPL (see LICENSE).
*
* You don't have to do anything special to choose one license or the other and you don't
* have to notify anyone which license you are using.
* Please see the corresponding license file for details of these licenses.
* You are free to use, modify and distribute this software, but all copyright
* information must remain.
*
*/
"undefined"==typeof XMLHttpRequest&&(XMLHttpRequest=n(23)),function(n){function i(e){return e.toString=function(){return this.message},e}function o(e){"object"!=typeof e&&(e={}),this.config={tls_only:void 0===e.tls_only||e.tls_only,webfist_fallback:void 0!==e.webfist_fallback&&e.webfist_fallback,uri_fallback:void 0!==e.uri_fallback&&e.uri_fallback,request_timeout:void 0!==e.request_timeout?e.request_timeout:1e4}}var s={"http://webfist.org/spec/rel":"webfist","http://webfinger.net/rel/avatar":"avatar",remotestorage:"remotestorage","http://tools.ietf.org/id/draft-dejong-remotestorage":"remotestorage",remoteStorage:"remotestorage","http://www.packetizer.com/rel/share":"share","http://webfinger.net/rel/profile-page":"profile",me:"profile",vcard:"vcard",blog:"blog","http://packetizer.com/rel/blog":"blog","http://schemas.google.com/g/2010#updates-from":"updates","https://camlistore.org/rel/server":"camilstore"},a={avatar:[],remotestorage:[],blog:[],vcard:[],updates:[],share:[],profile:[],webfist:[],camlistore:[]},c=["webfinger","host-meta","host-meta.json"];o.prototype.__fetchJRD=function(e,t,n){function r(){if(!a){if(a=!0,200===c.status)return s.__isValidJSON(c.responseText)?n(c.responseText):t(i({message:"invalid json",url:e,status:c.status}));if(404===c.status)return t(i({message:"resource not found",url:e,status:c.status}));if(c.status>=301&&c.status<=302){var r=c.getResponseHeader("Location");return function(e){return"string"==typeof e&&"https"===e.split("://")[0]}(r)?o():t(i({message:"no redirect URL found",url:e,status:c.status}))}return t(i({message:"error during request",url:e,status:c.status}))}}function o(){c.onreadystatechange=function(){4===c.readyState&&r()},c.onload=function(){r()},c.ontimeout=function(){return t(i({message:"request timed out",url:e,status:c.status}))},c.open("GET",e,!0),c.timeout=s.config.request_timeout,c.setRequestHeader("Accept","application/jrd+json, application/json"),c.send()}var s=this,a=!1,c=new XMLHttpRequest;return o()},o.prototype.__isValidJSON=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},o.prototype.__isLocalhost=function(e){return/^localhost(\.localdomain)?(\:[0-9]+)?$/.test(e)},o.prototype.__processJRD=function(e,t,n,r){var o=JSON.parse(t);if("object"!=typeof o||"object"!=typeof o.links)return n(void 0!==o.error?i({message:o.error,request:e}):i({message:"unknown response from server",request:e}));var c=o.links;Array.isArray(c)||(c=[]);var l={object:o,json:t,idx:{}};l.idx.properties={name:void 0},l.idx.links=JSON.parse(JSON.stringify(a)),c.map(function(e,t){if(s.hasOwnProperty(e.rel)&&l.idx.links[s[e.rel]]){var n={};Object.keys(e).map(function(t,r){n[t]=e[t]}),l.idx.links[s[e.rel]].push(n)}});var u=JSON.parse(t).properties;for(var h in u)u.hasOwnProperty(h)&&"http://packetizer.com/ns/name"===h&&(l.idx.properties.name=u[h]);return r(l)},o.prototype.lookup=function(e,t){function n(){var t="";return e.split("://")[1]||(t="acct:"),l+"://"+s+"/.well-known/"+c[a]+"?resource="+t+e}function r(e){if(o.config.uri_fallback&&"webfist.org"!==s&&a!==c.length-1)return a+=1,i();if(!o.config.tls_only&&"https"===l)return a=0,l="http",i();if(!o.config.webfist_fallback||"webfist.org"===s)return t(e);a=0,l="http",s="webfist.org";var r=n();o.__fetchJRD(r,t,function(e){o.__processJRD(r,e,t,function(e){"object"==typeof e.idx.links.webfist&&"string"==typeof e.idx.links.webfist[0].href&&o.__fetchJRD(e.idx.links.webfist[0].href,t,function(e){o.__processJRD(r,e,t,function(e){return t(null,t)})})})})}function i(){var e=n();o.__fetchJRD(e,r,function(n){o.__processJRD(e,n,t,function(e){t(null,e)})})}if("string"!=typeof e)throw new Error("first parameter must be a user address");if("function"!=typeof t)throw new Error("second parameter must be a callback");var o=this,s="";s=e.indexOf("://")>-1?e.replace(/ /g,"").split("/")[2]:e.replace(/ /g,"").split("@")[1];var a=0,l="https";return o.__isLocalhost(s)&&(l="http"),setTimeout(i,0)},o.prototype.lookupLink=function(e,t,n){return a.hasOwnProperty(t)?void this.lookup(e,function(e,r){var i=r.idx.links[t];return e?n(e):0===i.length?n('no links found with rel="'+t+'"'):n(null,i[0])}):n("unsupported rel "+t)},void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,c=(1<<a)-1,l=c>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-l;else{if(o===c)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=l}return(f?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,c,l=8*o-i-1,u=(1<<l)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+f]=255&a,f+=p,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;e[n+f]=255&s,f+=p,s/=256,l-=8);e[n+f-p]|=128*m}},function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e,t,n){for(var r,i,s=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(o[(i=r)>>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]);return s.join("")}t.byteLength=function(e){return 3*e.length/4-r(e)},t.toByteArray=function(e){var t,n,i,o,c,l=e.length;o=r(e),c=new a(3*l/4-o),n=o>0?l-4:l;var u=0;for(t=0;t<n;t+=4)i=s[e.charCodeAt(t)]<<18|s[e.charCodeAt(t+1)]<<12|s[e.charCodeAt(t+2)]<<6|s[e.charCodeAt(t+3)],c[u++]=i>>16&255,c[u++]=i>>8&255,c[u++]=255&i;return 2===o?(i=s[e.charCodeAt(t)]<<2|s[e.charCodeAt(t+1)]>>4,c[u++]=255&i):1===o&&(i=s[e.charCodeAt(t)]<<10|s[e.charCodeAt(t+1)]<<4|s[e.charCodeAt(t+2)]>>2,c[u++]=i>>8&255,c[u++]=255&i),c},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,s="",a=[],c=0,l=n-r;c<l;c+=16383)a.push(i(e,c,c+16383>l?l:c+16383));return 1===r?(t=e[n-1],s+=o[t>>2],s+=o[t<<4&63],s+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],s+=o[t>>10],s+=o[t>>4&63],s+=o[t<<2&63],s+="="),a.push(s),a.join("")};for(var o=[],s=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,u=c.length;l<u;++l)o[l]=c[l],s[c.charCodeAt(l)]=l;s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},function(e,t,n){"use strict";(function(e){function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()<t)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=o.prototype:(null===e&&(e=new o(t)),e.length=t),e}function o(e,t,n){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return s(this,e,t,n)}function s(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),o.TYPED_ARRAY_SUPPORT?(e=t).__proto__=o.prototype:e=l(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!o.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),s=(e=i(e,r)).write(t,n);return s!==r&&(e=e.slice(0,s)),e}(e,t,n):function(e,t){if(o.isBuffer(t)){var n=0|u(t.length);return 0===(e=i(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?i(e,0):l(e,t);if("Buffer"===t.type&&U(t.data))return l(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function c(e,t){if(a(t),e=i(e,t<0?0:0|u(t)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function l(e,t){var n=t.length<0?0:0|u(t.length);e=i(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function u(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function h(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(e).length;default:if(r)return M(e).length;t=(""+t).toLowerCase(),r=!0}}function d(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function f(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:p(e,t,n,r,i);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):p(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function p(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var s,a=1,c=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,c/=2,l/=2,n/=2}if(i){var u=-1;for(s=n;s<c;s++)if(o(e,s)===o(t,-1===u?0:s-u)){if(-1===u&&(u=s),s-u+1===l)return u*a}else-1!==u&&(s-=s-u),u=-1}else for(n+l>c&&(n=c-l),s=n;s>=0;s--){for(var h=!0,d=0;d<l;d++)if(o(e,s+d)!==o(t,d)){h=!1;break}if(h)return s}return-1}function m(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function g(e,t,n,r){return D(M(t,e.length-n),e,n,r)}function v(e,t,n,r){return D(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function y(e,t,n,r){return v(e,t,n,r)}function b(e,t,n,r){return D(j(t),e,n,r)}function w(e,t,n,r){return D(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?L.fromByteArray(e):L.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,c,l=e[i],u=null,h=l>239?4:l>223?3:l>191?2:1;if(i+h<=n)switch(h){case 1:l<128&&(u=l);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&l)<<6|63&o)>127&&(u=c);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(c=(15&l)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(u=c)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=F)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=F));return n}(r)}function S(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function E(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function T(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=I(e[o]);return i}function k(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,n,r,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function z(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,i){return i||z(e,0,n,4),B.write(e,t,n,r,23,4),n+4}function R(e,t,n,r,i){return i||z(e,0,n,8),B.write(e,t,n,r,52,8),n+8}function I(e){return e<16?"0"+e.toString(16):e.toString(16)}function M(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function j(e){return L.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var L=n(27),B=n(26),U=n(25);t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return s(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return function(e,t,n,r){return a(t),t<=0?i(e,t):void 0!==n?"string"==typeof r?i(e,t).fill(n,r):i(e,t).fill(n):i(e,t)}(null,e,t,n)},o.allocUnsafe=function(e){return c(null,e)},o.allocUnsafeSlow=function(e){return c(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!U(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=o.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},o.byteLength=h,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)d(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)d(this,t,t+3),d(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)d(this,t,t+7),d(this,t+1,t+6),d(this,t+2,t+5),d(this,t+3,t+4);return this},o.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?_(this,0,e):function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return E(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var s=i-r,a=n-t,c=Math.min(s,a),l=this.slice(r,i),u=e.slice(t,n),h=0;h<c;++h)if(l[h]!==u[h]){s=l[h],a=u[h];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},o.prototype.indexOf=function(e,t,n){return f(this,e,t,n,!0)},o.prototype.lastIndexOf=function(e,t,n){return f(this,e,t,n,!1)},o.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return m(this,e,t,n);case"utf8":case"utf-8":return g(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return y(this,e,t,n);case"base64":return b(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var F=4096;o.prototype.slice=function(e,t){var n,r=this.length;if(e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),o.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=o.prototype;else{var i=t-e;n=new o(i,void 0);for(var s=0;s<i;++s)n[s]=this[s+e]}return n},o.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},o.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),B.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),B.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),B.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),B.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||C(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},o.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||C(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);C(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);C(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,s=r-n;if(this===e&&n<t&&t<r)for(i=s-1;i>=0;--i)e[i+t]=this[i+n];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},o.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var a=o.isBuffer(e)?e:M(new o(e,r).toString()),c=a.length;for(s=0;s<n-t;++s)this[s+t]=a[s%c]}return this};var q=/[^+\/0-9A-Za-z-_]/g}).call(this,n(9))},function(e,t,n){"use strict";var r={uris:{},schemas:{},aliases:{},declare:function(e,t,n,r){var i=e+"/"+t;if(r.extends){var o,s=r.extends.split("/");o=1===s.length?e+"/"+s.shift():s.join("/");var a=this.uris[o];if(!a)throw"Type '"+i+"' tries to extend unknown schema '"+o+"'";r.extends=this.schemas[a]}this.uris[i]=n,this.aliases[n]=i,this.schemas[n]=r},resolveAlias:function(e){return this.uris[e]},getSchema:function(e){return this.schemas[e]},inScope:function(e){var t=e.length,n={};for(var r in this.uris)if(r.substr(0,t+1)===e+"/"){var i=this.uris[r];n[i]=this.schemas[i]}return n}},i=function(e){var t=new Error("Schema not found: "+e);return t.name="SchemaNotFound",t};i.prototype=Error.prototype,r.SchemaNotFound=i,e.exports=r},function(e,t,n){var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){function e(e){return encodeURI(e).replace(/%25[0-9][0-9]/g,function(e){return"%"+e.substring(3)})}function t(t){var n="";p[t.charAt(0)]&&(n=t.charAt(0),t=t.substring(1));var r="",i="",o=!0,s=!1,a=!1;"+"===n?o=!1:"."===n?(i=".",r="."):"/"===n?(i="/",r="/"):"#"===n?(i="#",o=!1):";"===n?(i=";",r=";",s=!0,a=!0):"?"===n?(i="?",r="&",s=!0):"&"===n&&(i="&",r="&",s=!0);for(var c=[],l=t.split(","),u=[],h={},d=0;d<l.length;d++){var f=l[d],g=null;if(-1!==f.indexOf(":")){var v=f.split(":");f=v[0],g=parseInt(v[1],10)}for(var y={};m[f.charAt(f.length-1)];)y[f.charAt(f.length-1)]=!0,f=f.substring(0,f.length-1);var b={truncate:g,name:f,suffices:y};u.push(b),h[f]=b,c.push(f)}var w=function(t){for(var n="",c=0,l=0;l<u.length;l++){var h=u[l],d=t(h.name);if(null===d||void 0===d||Array.isArray(d)&&0===d.length||"object"==typeof d&&0===Object.keys(d).length)c++;else if(n+=l===c?i:r||",",Array.isArray(d)){s&&(n+=h.name+"=");for(var f=0;f<d.length;f++)f>0&&(n+=h.suffices["*"]&&r||",",h.suffices["*"]&&s&&(n+=h.name+"=")),n+=o?encodeURIComponent(d[f]).replace(/!/g,"%21"):e(d[f])}else if("object"==typeof d){s&&!h.suffices["*"]&&(n+=h.name+"=");var p=!0;for(var m in d)p||(n+=h.suffices["*"]&&r||","),p=!1,n+=o?encodeURIComponent(m).replace(/!/g,"%21"):e(m),n+=h.suffices["*"]?"=":",",n+=o?encodeURIComponent(d[m]).replace(/!/g,"%21"):e(d[m])}else s&&(n+=h.name,a&&""===d||(n+="=")),null!=h.truncate&&(d=d.substring(0,h.truncate)),n+=o?encodeURIComponent(d).replace(/!/g,"%21"):e(d)}return n};return w.varNames=c,{prefix:i,substitution:w}}function n(e){if(!(this instanceof n))return new n(e);for(var r=e.split("{"),i=[r.shift()],o=[],s=[],a=[];r.length>0;){var c=r.shift(),l=c.split("}")[0],u=c.substring(l.length+1),h=t(l);s.push(h.substitution),o.push(h.prefix),i.push(u),a=a.concat(h.substitution.varNames)}this.fill=function(e){for(var t=i[0],n=0;n<s.length;n++){var r=s[n];t+=r(e),t+=i[n+1]}return t},this.varNames=a,this.template=e}function r(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else{var i;for(i in e)if(void 0===t[i]&&void 0!==e[i])return!1;for(i in t)if(void 0===e[i]&&void 0!==t[i])return!1;for(i in e)if(!r(e[i],t[i]))return!1}return!0}return!1}function i(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function o(e,t){return t=i(t||""),e=i(e||""),t&&e?(t.protocol||e.protocol)+(t.protocol||t.authority?t.authority:e.authority)+(n=t.protocol||t.authority||"/"===t.pathname.charAt(0)?t.pathname:t.pathname?(e.authority&&!e.pathname?"/":"")+e.pathname.slice(0,e.pathname.lastIndexOf("/")+1)+t.pathname:e.pathname,r=[],n.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?r.pop():r.push(e)}),r.join("").replace(/^\//,"/"===n.charAt(0)?"/":""))+(t.protocol||t.authority||t.pathname?t.search:t.search||e.search)+t.hash:null;var n,r}function s(e){return e.split("#")[0]}function a(e,t){if(e&&"object"==typeof e)if(void 0===t?t=e.id:"string"==typeof e.id&&(t=o(t,e.id),e.id=t),Array.isArray(e))for(var n=0;n<e.length;n++)a(e[n],t);else for(var r in"string"==typeof e.$ref&&(e.$ref=o(t,e.$ref)),e)"enum"!==r&&a(e[r],t)}function c(e){var t=S[e=e||"en"];return function(e){var n=t[e.code]||_[e.code];if("string"!=typeof n)return"Unknown error code "+e.code+": "+JSON.stringify(e.messageParams);var r=e.params;return n.replace(/\{([^{}]*)\}/g,function(e,t){var n=r[t];return"string"==typeof n||"number"==typeof n?n:e})}}function l(e,t,n,r,i){if(Error.call(this),void 0===e)throw new Error("No error code supplied: "+r);this.message="",this.params=t,this.code=e,this.dataPath=n||"",this.schemaPath=r||"",this.subErrors=i||null;var o=new Error(this.message);if(this.stack=o.stack||o.stacktrace,!this.stack)try{throw o}catch(e){this.stack=e.stack||e.stacktrace}}var u,h,d,f;Object.keys||(Object.keys=(u=Object.prototype.hasOwnProperty,h=!{toString:null}.propertyIsEnumerable("toString"),f=(d=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on non-object");var t=[];for(var n in e)u.call(e,n)&&t.push(n);if(h)for(var r=0;r<f;r++)u.call(e,d[r])&&t.push(d[r]);return t})),Object.create||(Object.create=function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create implementation only accepts one parameter.");return e.prototype=t,new e}}()),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){if(null===this)throw new TypeError;var t=Object(this),n=t.length>>>0;if(0===n)return-1;var r=0;if(arguments.length>1&&((r=Number(arguments[1]))!=r?r=0:0!==r&&r!==1/0&&r!==-1/0&&(r=(r>0||-1)*Math.floor(Math.abs(r)))),r>=n)return-1;for(var i=r>=0?r:Math.max(n-Math.abs(r),0);i<n;i++)if(i in t&&t[i]===e)return i;return-1}),Object.isFrozen||(Object.isFrozen=function(e){for(var t="tv4_test_frozen_key";e.hasOwnProperty(t);)t+=Math.random();try{return e[t]=!0,delete e[t],!1}catch(e){return!0}});var p={"+":!0,"#":!0,".":!0,"/":!0,";":!0,"?":!0,"&":!0},m={"*":!0};n.prototype={toString:function(){return this.template},fillFromObject:function(e){return this.fill(function(t){return e[t]})}};var g=function(e,t,n,r,i){if(this.missing=[],this.missingMap={},this.formatValidators=e?Object.create(e.formatValidators):{},this.schemas=e?Object.create(e.schemas):{},this.collectMultiple=t,this.errors=[],this.handleError=t?this.collectError:this.returnError,r&&(this.checkRecursive=!0,this.scanned=[],this.scannedFrozen=[],this.scannedFrozenSchemas=[],this.scannedFrozenValidationErrors=[],this.validatedSchemasKey="tv4_validation_id",this.validationErrorsKey="tv4_validation_errors_id"),i&&(this.trackUnknownProperties=!0,this.knownPropertyPaths={},this.unknownPropertyPaths={}),this.errorReporter=n||c("en"),"string"==typeof this.errorReporter)throw new Error("debug");if(this.definedKeywords={},e)for(var o in e.definedKeywords)this.definedKeywords[o]=e.definedKeywords[o].slice(0)};g.prototype.defineKeyword=function(e,t){this.definedKeywords[e]=this.definedKeywords[e]||[],this.definedKeywords[e].push(t)},g.prototype.createError=function(e,t,n,r,i,o,s){var a=new l(e,t,n,r,i);return a.message=this.errorReporter(a,o,s),a},g.prototype.returnError=function(e){return e},g.prototype.collectError=function(e){return e&&this.errors.push(e),null},g.prototype.prefixErrors=function(e,t,n){for(var r=e;r<this.errors.length;r++)this.errors[r]=this.errors[r].prefixWith(t,n);return this},g.prototype.banUnknownProperties=function(e,t){for(var n in this.unknownPropertyPaths){var r=this.createError(b.UNKNOWN_PROPERTY,{path:n},n,"",null,e,t),i=this.handleError(r);if(i)return i}return null},g.prototype.addFormat=function(e,t){if("object"==typeof e){for(var n in e)this.addFormat(n,e[n]);return this}this.formatValidators[e]=t},g.prototype.resolveRefs=function(e,t){if(void 0!==e.$ref){if((t=t||{})[e.$ref])return this.createError(b.CIRCULAR_REFERENCE,{urls:Object.keys(t).join(", ")},"","",null,void 0,e);t[e.$ref]=!0,e=this.getSchema(e.$ref,t)}return e},g.prototype.getSchema=function(e,t){var n;if(void 0!==this.schemas[e])return n=this.schemas[e],this.resolveRefs(n,t);var r=e,i="";if(-1!==e.indexOf("#")&&(i=e.substring(e.indexOf("#")+1),r=e.substring(0,e.indexOf("#"))),"object"==typeof this.schemas[r]){n=this.schemas[r];var o=decodeURIComponent(i);if(""===o)return this.resolveRefs(n,t);if("/"!==o.charAt(0))return;for(var s=o.split("/").slice(1),a=0;a<s.length;a++){var c=s[a].replace(/~1/g,"/").replace(/~0/g,"~");if(void 0===n[c]){n=void 0;break}n=n[c]}if(void 0!==n)return this.resolveRefs(n,t)}void 0===this.missing[r]&&(this.missing.push(r),this.missing[r]=r,this.missingMap[r]=r)},g.prototype.searchSchemas=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)this.searchSchemas(e[n],t);else if(e&&"object"==typeof e)for(var r in"string"==typeof e.id&&function(e,t){if(t.substring(0,e.length)===e){var n=t.substring(e.length);if(t.length>0&&"/"===t.charAt(e.length-1)||"#"===n.charAt(0)||"?"===n.charAt(0))return!0}return!1}(t,e.id)&&void 0===this.schemas[e.id]&&(this.schemas[e.id]=e),e)if("enum"!==r)if("object"==typeof e[r])this.searchSchemas(e[r],t);else if("$ref"===r){var i=s(e[r]);i&&void 0===this.schemas[i]&&void 0===this.missingMap[i]&&(this.missingMap[i]=i)}},g.prototype.addSchema=function(e,t){if("string"!=typeof e||void 0===t){if("object"!=typeof e||"string"!=typeof e.id)return;e=(t=e).id}e===s(e)+"#"&&(e=s(e)),this.schemas[e]=t,delete this.missingMap[e],a(t,e),this.searchSchemas(t,e)},g.prototype.getSchemaMap=function(){var e={};for(var t in this.schemas)e[t]=this.schemas[t];return e},g.prototype.getSchemaUris=function(e){var t=[];for(var n in this.schemas)e&&!e.test(n)||t.push(n);return t},g.prototype.getMissingUris=function(e){var t=[];for(var n in this.missingMap)e&&!e.test(n)||t.push(n);return t},g.prototype.dropSchemas=function(){this.schemas={},this.reset()},g.prototype.reset=function(){this.missing=[],this.missingMap={},this.errors=[]},g.prototype.validateAll=function(e,t,n,r,i){var o;if(!(t=this.resolveRefs(t)))return null;if(t instanceof l)return this.errors.push(t),t;var s,a=this.errors.length,c=null,u=null;if(this.checkRecursive&&e&&"object"==typeof e){if(o=!this.scanned.length,e[this.validatedSchemasKey]){var h=e[this.validatedSchemasKey].indexOf(t);if(-1!==h)return this.errors=this.errors.concat(e[this.validationErrorsKey][h]),null}if(Object.isFrozen(e)&&-1!==(s=this.scannedFrozen.indexOf(e))){var d=this.scannedFrozenSchemas[s].indexOf(t);if(-1!==d)return this.errors=this.errors.concat(this.scannedFrozenValidationErrors[s][d]),null}if(this.scanned.push(e),Object.isFrozen(e))-1===s&&(s=this.scannedFrozen.length,this.scannedFrozen.push(e),this.scannedFrozenSchemas.push([])),c=this.scannedFrozenSchemas[s].length,this.scannedFrozenSchemas[s][c]=t,this.scannedFrozenValidationErrors[s][c]=[];else{if(!e[this.validatedSchemasKey])try{Object.defineProperty(e,this.validatedSchemasKey,{value:[],configurable:!0}),Object.defineProperty(e,this.validationErrorsKey,{value:[],configurable:!0})}catch(t){e[this.validatedSchemasKey]=[],e[this.validationErrorsKey]=[]}u=e[this.validatedSchemasKey].length,e[this.validatedSchemasKey][u]=t,e[this.validationErrorsKey][u]=[]}}var f=this.errors.length,p=this.validateBasic(e,t,i)||this.validateNumeric(e,t,i)||this.validateString(e,t,i)||this.validateArray(e,t,i)||this.validateObject(e,t,i)||this.validateCombinations(e,t,i)||this.validateHypermedia(e,t,i)||this.validateFormat(e,t,i)||this.validateDefinedKeywords(e,t,i)||null;if(o){for(;this.scanned.length;){var m=this.scanned.pop();delete m[this.validatedSchemasKey]}this.scannedFrozen=[],this.scannedFrozenSchemas=[]}if(p||f!==this.errors.length)for(;n&&n.length||r&&r.length;){var g=n&&n.length?""+n.pop():null,v=r&&r.length?""+r.pop():null;p&&(p=p.prefixWith(g,v)),this.prefixErrors(f,g,v)}return null!==c?this.scannedFrozenValidationErrors[s][c]=this.errors.slice(a):null!==u&&(e[this.validationErrorsKey][u]=this.errors.slice(a)),this.handleError(p)},g.prototype.validateFormat=function(e,t){if("string"!=typeof t.format||!this.formatValidators[t.format])return null;var n=this.formatValidators[t.format].call(null,e,t);return"string"==typeof n||"number"==typeof n?this.createError(b.FORMAT_CUSTOM,{message:n},"","/format",null,e,t):n&&"object"==typeof n?this.createError(b.FORMAT_CUSTOM,{message:n.message||"?"},n.dataPath||"",n.schemaPath||"/format",null,e,t):null},g.prototype.validateDefinedKeywords=function(e,t,n){for(var r in this.definedKeywords)if(void 0!==t[r])for(var i=this.definedKeywords[r],o=0;o<i.length;o++){var s=i[o],a=s(e,t[r],t,n);if("string"==typeof a||"number"==typeof a)return this.createError(b.KEYWORD_CUSTOM,{key:r,message:a},"","",null,e,t).prefixWith(null,r);if(a&&"object"==typeof a){var c=a.code;if("string"==typeof c){if(!b[c])throw new Error("Undefined error code (use defineError): "+c);c=b[c]}else"number"!=typeof c&&(c=b.KEYWORD_CUSTOM);var l="object"==typeof a.message?a.message:{key:r,message:a.message||"?"},u=a.schemaPath||"/"+r.replace(/~/g,"~0").replace(/\//g,"~1");return this.createError(c,l,a.dataPath||null,u,null,e,t)}}return null},g.prototype.validateBasic=function(e,t,n){var r;return(r=this.validateType(e,t,n))?r.prefixWith(null,"type"):(r=this.validateEnum(e,t,n))?r.prefixWith(null,"type"):null},g.prototype.validateType=function(e,t){if(void 0===t.type)return null;var n=typeof e;null===e?n="null":Array.isArray(e)&&(n="array");var r=t.type;Array.isArray(r)||(r=[r]);for(var i=0;i<r.length;i++){var o=r[i];if(o===n||"integer"===o&&"number"===n&&e%1==0)return null}return this.createError(b.INVALID_TYPE,{type:n,expected:r.join("/")},"","",null,e,t)},g.prototype.validateEnum=function(e,t){if(void 0===t.enum)return null;for(var n=0;n<t.enum.length;n++){var i=t.enum[n];if(r(e,i))return null}return this.createError(b.ENUM_MISMATCH,{value:"undefined"!=typeof JSON?JSON.stringify(e):e},"","",null,e,t)},g.prototype.validateNumeric=function(e,t,n){return this.validateMultipleOf(e,t,n)||this.validateMinMax(e,t,n)||this.validateNaN(e,t,n)||null};var v=Math.pow(2,-51),y=1-v;g.prototype.validateMultipleOf=function(e,t){var n=t.multipleOf||t.divisibleBy;if(void 0===n)return null;if("number"==typeof e){var r=e/n%1;if(r>=v&&r<y)return this.createError(b.NUMBER_MULTIPLE_OF,{value:e,multipleOf:n},"","",null,e,t)}return null},g.prototype.validateMinMax=function(e,t){if("number"!=typeof e)return null;if(void 0!==t.minimum){if(e<t.minimum)return this.createError(b.NUMBER_MINIMUM,{value:e,minimum:t.minimum},"","/minimum",null,e,t);if(t.exclusiveMinimum&&e===t.minimum)return this.createError(b.NUMBER_MINIMUM_EXCLUSIVE,{value:e,minimum:t.minimum},"","/exclusiveMinimum",null,e,t)}if(void 0!==t.maximum){if(e>t.maximum)return this.createError(b.NUMBER_MAXIMUM,{value:e,maximum:t.maximum},"","/maximum",null,e,t);if(t.exclusiveMaximum&&e===t.maximum)return this.createError(b.NUMBER_MAXIMUM_EXCLUSIVE,{value:e,maximum:t.maximum},"","/exclusiveMaximum",null,e,t)}return null},g.prototype.validateNaN=function(e,t){return"number"!=typeof e?null:!0===isNaN(e)||e===1/0||e===-1/0?this.createError(b.NUMBER_NOT_A_NUMBER,{value:e},"","/type",null,e,t):null},g.prototype.validateString=function(e,t,n){return this.validateStringLength(e,t,n)||this.validateStringPattern(e,t,n)||null},g.prototype.validateStringLength=function(e,t){return"string"!=typeof e?null:void 0!==t.minLength&&e.length<t.minLength?this.createError(b.STRING_LENGTH_SHORT,{length:e.length,minimum:t.minLength},"","/minLength",null,e,t):void 0!==t.maxLength&&e.length>t.maxLength?this.createError(b.STRING_LENGTH_LONG,{length:e.length,maximum:t.maxLength},"","/maxLength",null,e,t):null},g.prototype.validateStringPattern=function(e,t){if("string"!=typeof e||"string"!=typeof t.pattern&&!(t.pattern instanceof RegExp))return null;var n;if(t.pattern instanceof RegExp)n=t.pattern;else{var r,i="",o=t.pattern.match(/^\/(.+)\/([img]*)$/);o?(r=o[1],i=o[2]):r=t.pattern,n=new RegExp(r,i)}return n.test(e)?null:this.createError(b.STRING_PATTERN,{pattern:t.pattern},"","/pattern",null,e,t)},g.prototype.validateArray=function(e,t,n){return Array.isArray(e)&&(this.validateArrayLength(e,t,n)||this.validateArrayUniqueItems(e,t,n)||this.validateArrayItems(e,t,n))||null},g.prototype.validateArrayLength=function(e,t){var n;return void 0!==t.minItems&&e.length<t.minItems&&(n=this.createError(b.ARRAY_LENGTH_SHORT,{length:e.length,minimum:t.minItems},"","/minItems",null,e,t),this.handleError(n))?n:void 0!==t.maxItems&&e.length>t.maxItems&&(n=this.createError(b.ARRAY_LENGTH_LONG,{length:e.length,maximum:t.maxItems},"","/maxItems",null,e,t),this.handleError(n))?n:null},g.prototype.validateArrayUniqueItems=function(e,t){if(t.uniqueItems)for(var n=0;n<e.length;n++)for(var i=n+1;i<e.length;i++)if(r(e[n],e[i])){var o=this.createError(b.ARRAY_UNIQUE,{match1:n,match2:i},"","/uniqueItems",null,e,t);if(this.handleError(o))return o}return null},g.prototype.validateArrayItems=function(e,t,n){if(void 0===t.items)return null;var r,i;if(Array.isArray(t.items)){for(i=0;i<e.length;i++)if(i<t.items.length){if(r=this.validateAll(e[i],t.items[i],[i],["items",i],n+"/"+i))return r}else if(void 0!==t.additionalItems)if("boolean"==typeof t.additionalItems){if(!t.additionalItems&&(r=this.createError(b.ARRAY_ADDITIONAL_ITEMS,{},"/"+i,"/additionalItems",null,e,t),this.handleError(r)))return r}else if(r=this.validateAll(e[i],t.additionalItems,[i],["additionalItems"],n+"/"+i))return r}else for(i=0;i<e.length;i++)if(r=this.validateAll(e[i],t.items,[i],["items"],n+"/"+i))return r;return null},g.prototype.validateObject=function(e,t,n){return"object"!=typeof e||null===e||Array.isArray(e)?null:this.validateObjectMinMaxProperties(e,t,n)||this.validateObjectRequiredProperties(e,t,n)||this.validateObjectProperties(e,t,n)||this.validateObjectDependencies(e,t,n)||null},g.prototype.validateObjectMinMaxProperties=function(e,t){var n,r=Object.keys(e);return void 0!==t.minProperties&&r.length<t.minProperties&&(n=this.createError(b.OBJECT_PROPERTIES_MINIMUM,{propertyCount:r.length,minimum:t.minProperties},"","/minProperties",null,e,t),this.handleError(n))?n:void 0!==t.maxProperties&&r.length>t.maxProperties&&(n=this.createError(b.OBJECT_PROPERTIES_MAXIMUM,{propertyCount:r.length,maximum:t.maxProperties},"","/maxProperties",null,e,t),this.handleError(n))?n:null},g.prototype.validateObjectRequiredProperties=function(e,t){if(void 0!==t.required)for(var n=0;n<t.required.length;n++){var r=t.required[n];if(void 0===e[r]){var i=this.createError(b.OBJECT_REQUIRED,{key:r},"","/required/"+n,null,e,t);if(this.handleError(i))return i}}return null},g.prototype.validateObjectProperties=function(e,t,n){var r;for(var i in e){var o=n+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),s=!1;if(void 0!==t.properties&&void 0!==t.properties[i]&&(s=!0,r=this.validateAll(e[i],t.properties[i],[i],["properties",i],o)))return r;if(void 0!==t.patternProperties)for(var a in t.patternProperties){var c=new RegExp(a);if(c.test(i)&&(s=!0,r=this.validateAll(e[i],t.patternProperties[a],[i],["patternProperties",a],o)))return r}if(s)this.trackUnknownProperties&&(this.knownPropertyPaths[o]=!0,delete this.unknownPropertyPaths[o]);else if(void 0!==t.additionalProperties){if(this.trackUnknownProperties&&(this.knownPropertyPaths[o]=!0,delete this.unknownPropertyPaths[o]),"boolean"==typeof t.additionalProperties){if(!t.additionalProperties&&(r=this.createError(b.OBJECT_ADDITIONAL_PROPERTIES,{key:i},"","/additionalProperties",null,e,t).prefixWith(i,null),this.handleError(r)))return r}else if(r=this.validateAll(e[i],t.additionalProperties,[i],["additionalProperties"],o))return r}else this.trackUnknownProperties&&!this.knownPropertyPaths[o]&&(this.unknownPropertyPaths[o]=!0)}return null},g.prototype.validateObjectDependencies=function(e,t,n){var r;if(void 0!==t.dependencies)for(var i in t.dependencies)if(void 0!==e[i]){var o=t.dependencies[i];
if("string"==typeof o){if(void 0===e[o]&&(r=this.createError(b.OBJECT_DEPENDENCY_KEY,{key:i,missing:o},"","",null,e,t).prefixWith(null,i).prefixWith(null,"dependencies"),this.handleError(r)))return r}else if(Array.isArray(o))for(var s=0;s<o.length;s++){var a=o[s];if(void 0===e[a]&&(r=this.createError(b.OBJECT_DEPENDENCY_KEY,{key:i,missing:a},"","/"+s,null,e,t).prefixWith(null,i).prefixWith(null,"dependencies"),this.handleError(r)))return r}else if(r=this.validateAll(e,o,[],["dependencies",i],n))return r}return null},g.prototype.validateCombinations=function(e,t,n){return this.validateAllOf(e,t,n)||this.validateAnyOf(e,t,n)||this.validateOneOf(e,t,n)||this.validateNot(e,t,n)||null},g.prototype.validateAllOf=function(e,t,n){if(void 0===t.allOf)return null;for(var r,i=0;i<t.allOf.length;i++){var o=t.allOf[i];if(r=this.validateAll(e,o,[],["allOf",i],n))return r}return null},g.prototype.validateAnyOf=function(e,t,n){if(void 0===t.anyOf)return null;var r,i,o=[],s=this.errors.length;this.trackUnknownProperties&&(r=this.unknownPropertyPaths,i=this.knownPropertyPaths);for(var a=!0,c=0;c<t.anyOf.length;c++){this.trackUnknownProperties&&(this.unknownPropertyPaths={},this.knownPropertyPaths={});var l=t.anyOf[c],u=this.errors.length,h=this.validateAll(e,l,[],["anyOf",c],n);if(null===h&&u===this.errors.length){if(this.errors=this.errors.slice(0,s),this.trackUnknownProperties){for(var d in this.knownPropertyPaths)i[d]=!0,delete r[d];for(var f in this.unknownPropertyPaths)i[f]||(r[f]=!0);a=!1;continue}return null}h&&o.push(h.prefixWith(null,""+c).prefixWith(null,"anyOf"))}return this.trackUnknownProperties&&(this.unknownPropertyPaths=r,this.knownPropertyPaths=i),a?(o=o.concat(this.errors.slice(s)),this.errors=this.errors.slice(0,s),this.createError(b.ANY_OF_MISSING,{},"","/anyOf",o,e,t)):void 0},g.prototype.validateOneOf=function(e,t,n){if(void 0===t.oneOf)return null;var r,i,o=null,s=[],a=this.errors.length;this.trackUnknownProperties&&(r=this.unknownPropertyPaths,i=this.knownPropertyPaths);for(var c=0;c<t.oneOf.length;c++){this.trackUnknownProperties&&(this.unknownPropertyPaths={},this.knownPropertyPaths={});var l=t.oneOf[c],u=this.errors.length,h=this.validateAll(e,l,[],["oneOf",c],n);if(null===h&&u===this.errors.length){if(null!==o)return this.errors=this.errors.slice(0,a),this.createError(b.ONE_OF_MULTIPLE,{index1:o,index2:c},"","/oneOf",null,e,t);if(o=c,this.trackUnknownProperties){for(var d in this.knownPropertyPaths)i[d]=!0,delete r[d];for(var f in this.unknownPropertyPaths)i[f]||(r[f]=!0)}}else h&&s.push(h)}return this.trackUnknownProperties&&(this.unknownPropertyPaths=r,this.knownPropertyPaths=i),null===o?(s=s.concat(this.errors.slice(a)),this.errors=this.errors.slice(0,a),this.createError(b.ONE_OF_MISSING,{},"","/oneOf",s,e,t)):(this.errors=this.errors.slice(0,a),null)},g.prototype.validateNot=function(e,t,n){if(void 0===t.not)return null;var r,i,o=this.errors.length;this.trackUnknownProperties&&(r=this.unknownPropertyPaths,i=this.knownPropertyPaths,this.unknownPropertyPaths={},this.knownPropertyPaths={});var s=this.validateAll(e,t.not,null,null,n),a=this.errors.slice(o);return this.errors=this.errors.slice(0,o),this.trackUnknownProperties&&(this.unknownPropertyPaths=r,this.knownPropertyPaths=i),null===s&&0===a.length?this.createError(b.NOT_PASSED,{},"","/not",null,e,t):null},g.prototype.validateHypermedia=function(e,t,r){if(!t.links)return null;for(var i,o=0;o<t.links.length;o++){var s=t.links[o];if("describedby"===s.rel){for(var a=new n(s.href),c=!0,l=0;l<a.varNames.length;l++)if(!(a.varNames[l]in e)){c=!1;break}if(c){var u=a.fillFromObject(e),h={$ref:u};if(i=this.validateAll(e,h,[],["links",o],r))return i}}}};var b={INVALID_TYPE:0,ENUM_MISMATCH:1,ANY_OF_MISSING:10,ONE_OF_MISSING:11,ONE_OF_MULTIPLE:12,NOT_PASSED:13,NUMBER_MULTIPLE_OF:100,NUMBER_MINIMUM:101,NUMBER_MINIMUM_EXCLUSIVE:102,NUMBER_MAXIMUM:103,NUMBER_MAXIMUM_EXCLUSIVE:104,NUMBER_NOT_A_NUMBER:105,STRING_LENGTH_SHORT:200,STRING_LENGTH_LONG:201,STRING_PATTERN:202,OBJECT_PROPERTIES_MINIMUM:300,OBJECT_PROPERTIES_MAXIMUM:301,OBJECT_REQUIRED:302,OBJECT_ADDITIONAL_PROPERTIES:303,OBJECT_DEPENDENCY_KEY:304,ARRAY_LENGTH_SHORT:400,ARRAY_LENGTH_LONG:401,ARRAY_UNIQUE:402,ARRAY_ADDITIONAL_ITEMS:403,FORMAT_CUSTOM:500,KEYWORD_CUSTOM:501,CIRCULAR_REFERENCE:600,UNKNOWN_PROPERTY:1e3},w={};for(var x in b)w[b[x]]=x;var _={INVALID_TYPE:"Invalid type: {type} (expected {expected})",ENUM_MISMATCH:"No enum match for: {value}",ANY_OF_MISSING:'Data does not match any schemas from "anyOf"',ONE_OF_MISSING:'Data does not match any schemas from "oneOf"',ONE_OF_MULTIPLE:'Data is valid against more than one schema from "oneOf": indices {index1} and {index2}',NOT_PASSED:'Data matches schema from "not"',NUMBER_MULTIPLE_OF:"Value {value} is not a multiple of {multipleOf}",NUMBER_MINIMUM:"Value {value} is less than minimum {minimum}",NUMBER_MINIMUM_EXCLUSIVE:"Value {value} is equal to exclusive minimum {minimum}",NUMBER_MAXIMUM:"Value {value} is greater than maximum {maximum}",NUMBER_MAXIMUM_EXCLUSIVE:"Value {value} is equal to exclusive maximum {maximum}",NUMBER_NOT_A_NUMBER:"Value {value} is not a valid number",STRING_LENGTH_SHORT:"String is too short ({length} chars), minimum {minimum}",STRING_LENGTH_LONG:"String is too long ({length} chars), maximum {maximum}",STRING_PATTERN:"String does not match pattern: {pattern}",OBJECT_PROPERTIES_MINIMUM:"Too few properties defined ({propertyCount}), minimum {minimum}",OBJECT_PROPERTIES_MAXIMUM:"Too many properties defined ({propertyCount}), maximum {maximum}",OBJECT_REQUIRED:"Missing required property: {key}",OBJECT_ADDITIONAL_PROPERTIES:"Additional properties not allowed",OBJECT_DEPENDENCY_KEY:"Dependency failed - key must exist: {missing} (due to key: {key})",ARRAY_LENGTH_SHORT:"Array is too short ({length}), minimum {minimum}",ARRAY_LENGTH_LONG:"Array is too long ({length}), maximum {maximum}",ARRAY_UNIQUE:"Array items are not unique (indices {match1} and {match2})",ARRAY_ADDITIONAL_ITEMS:"Additional items not allowed",FORMAT_CUSTOM:"Format validation failed ({message})",KEYWORD_CUSTOM:"Keyword failed: {key} ({message})",CIRCULAR_REFERENCE:"Circular $refs: {urls}",UNKNOWN_PROPERTY:"Unknown property (not in schema)"};l.prototype=Object.create(Error.prototype),l.prototype.constructor=l,l.prototype.name="ValidationError",l.prototype.prefixWith=function(e,t){if(null!==e&&(e=e.replace(/~/g,"~0").replace(/\//g,"~1"),this.dataPath="/"+e+this.dataPath),null!==t&&(t=t.replace(/~/g,"~0").replace(/\//g,"~1"),this.schemaPath="/"+t+this.schemaPath),null!==this.subErrors)for(var n=0;n<this.subErrors.length;n++)this.subErrors[n].prefixWith(e,t);return this};var S={},E=function e(t){var n,r,i=new g,l={setErrorReporter:function(e){return"string"==typeof e?this.language(e):(r=e,!0)},addFormat:function(){i.addFormat.apply(i,arguments)},language:function(e){return e?(S[e]||(e=e.split("-")[0]),!!S[e]&&(n=e,e)):n},addLanguage:function(e,t){var n;for(n in b)t[n]&&!t[b[n]]&&(t[b[n]]=t[n]);var r=e.split("-")[0];if(S[r])for(n in S[e]=Object.create(S[r]),t)void 0===S[r][n]&&(S[r][n]=t[n]),S[e][n]=t[n];else S[e]=t,S[r]=t;return this},freshApi:function(t){var n=e();return t&&n.language(t),n},validate:function(e,t,o,s){var a=c(n),l=r?function(e,t,n){return r(e,t,n)||a(e,t,n)}:a,u=new g(i,!1,l,o,s);"string"==typeof t&&(t={$ref:t}),u.addSchema("",t);var h=u.validateAll(e,t,null,null,"");return!h&&s&&(h=u.banUnknownProperties(e,t)),this.error=h,this.missing=u.missing,this.valid=null===h,this.valid},validateResult:function(){var e={toString:function(){return this.valid?"valid":this.error.message}};return this.validate.apply(e,arguments),e},validateMultiple:function(e,t,o,s){var a=c(n),l=r?function(e,t,n){return r(e,t,n)||a(e,t,n)}:a,u=new g(i,!0,l,o,s);"string"==typeof t&&(t={$ref:t}),u.addSchema("",t),u.validateAll(e,t,null,null,""),s&&u.banUnknownProperties(e,t);var h={toString:function(){return this.valid?"valid":this.error.message}};return h.errors=u.errors,h.missing=u.missing,h.valid=0===h.errors.length,h},addSchema:function(){return i.addSchema.apply(i,arguments)},getSchema:function(){return i.getSchema.apply(i,arguments)},getSchemaMap:function(){return i.getSchemaMap.apply(i,arguments)},getSchemaUris:function(){return i.getSchemaUris.apply(i,arguments)},getMissingUris:function(){return i.getMissingUris.apply(i,arguments)},dropSchemas:function(){i.dropSchemas.apply(i,arguments)},defineKeyword:function(){i.defineKeyword.apply(i,arguments)},defineError:function(e,t,n){if("string"!=typeof e||!/^[A-Z]+(_[A-Z]+)*$/.test(e))throw new Error("Code name must be a string in UPPER_CASE_WITH_UNDERSCORES");if("number"!=typeof t||t%1!=0||t<1e4)throw new Error("Code number must be an integer > 10000");if(void 0!==b[e])throw new Error("Error already defined: "+e+" as "+b[e]);if(void 0!==w[t])throw new Error("Error code already used: "+w[t]+" as "+t);for(var r in b[e]=t,w[t]=e,_[e]=_[t]=n,S){var i=S[r];i[e]&&(i[t]=i[t]||i[e])}},reset:function(){i.reset(),this.error=null,this.missing=[],this.valid=!0},missing:[],error:null,valid:!0,normSchema:a,resolveUrl:o,getDocumentUri:s,errorCodes:b};return l.language(t||"en"),l}();return E.addLanguage("en-gb",_),E.tv4=E,E})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){e.exports=n(16)}])})},function(e,t){function n(e,t){var n=t||0,i=r;return i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]}for(var r=[],i=0;i<256;++i)r[i]=(i+256).toString(16).substr(1);e.exports=n},function(e,t){(function(t){var n,r=t.crypto||t.msCrypto;if(r&&r.getRandomValues){var i=new Uint8Array(16);n=function(){return r.getRandomValues(i),i}}if(!n){var o=new Array(16);n=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}e.exports=n}).call(t,function(){return this}())},function(e,t){window.requestAnimationFrame||function(){"use strict";window.requestAnimationFrame=window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(){var e=60,t=1e3/e,n=Date.now(),r=n;return function(e){var i=Date.now(),o=Math.max(0,t-(i-r)),s=i+o;return r=s,window.setTimeout(function(){e(s-n)},o)}}(),window.cancelAnimationFrame=window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.cancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.webkitCancelRequestAnimationFrame||function(e){window.clearTimeout(e)}}()},function(e,t,n){var r=n(2),i=n(1),o=n(4),s=n(8),a=n(6),c=n(3);const l=n(7);var u=i.Collection.extend({model:s,sync:a,initialize:function(e,t){r.bindAll(this,"sort","save","welcome","rsChange"),this.on("change:lastEdited",this.sort).on("change:lastEdited",this.save),this.once("sync",this.welcome),this.remote=t.remote,this.remote.on("change",this.rsChange)},addNew:r.throttle(function(e){return this.add(r.defaults(e||{},{id:l(),lastEdited:Date.now()}))},1e3,{leading:!0}),comparator:function(e,t){return e.get("lastEdited")>t.get("lastEdited")?-1:1},save:function(e){e.throttledSave()},welcome:function(){if(this.isEmpty()){const e=c.welcome.replace(new RegExp("{Alt}","g"),o.hotKey);this.addNew({content:e})}},events:[],rsChange:function(e){this.events.push(e),this.handleEvents()},handleEvents:r.debounce(function(){r.each(this.events,function(e){if("window"!==e.origin){if(e.oldValue&&!e.newValue)return void this.remove(e.oldValue);var t=this.get(e.newValue.id);if(!t)return void this.add(e.newValue);var n=e.newValue.lastEdited>t.get("lastEdited");n&&(this.set(e.newValue,{remove:!1}),this.trigger("remoteUpdate",e.newValue.id))}},this),this.events=[]},400)});e.exports=u},function(e,t,n){function r(){this.initialize()}var i=n(2),o=n(1),s=n(23),a=n(21),c=n(22),l=n(36),u=n(8),h=n(27),d=n(30),f="6p6q5imoisraq6k",p="376607343336-uabp27dse5s1jkr767jpdeqhj7t90bll.apps.googleusercontent.com";i.extend(r.prototype,o.Events,{initialize:function(){i.bindAll(this,"loadDoc","open","openOnCreate","handlePrevious","updateDocs","handleRemoteRemove","triggerConnected","triggerDisconnected");var e=new s({modules:[a]});e.setApiKeys({dropbox:f,googledrive:p}),e.access.claim("documents","rw"),e.caching.enable("/documents/notes/"),new c(e).attach("remotestorage-connect"),e.on("connected",i.bind(function(){this.triggerConnected(e.backend)},this)),e.on("disconnected",this.triggerDisconnected),this.state=new d,this.doc=new u,this.docs=new h(null,{remote:e.documents.privateList("notes")}),this.doc.on("change:content",this.doc.updateLastEdited).on("change:public",this.doc.updateLastEdited).on("change:content",this.doc.updateTitle).on("change:id",this.handlePrevious).on("change:id",this.setUrl).on("change",this.updateDocs),this.state.fetch().always(i.bind(function(){this.docs.fetch().always(this.loadDoc)},this)),this.app=new l({litewrite:this,remote:e.documents.publicList("notes"),model:this.doc,collection:this.docs})},loadDoc:function(){this.docs.on("add",this.openOnCreate).on("remove",this.handleRemoteRemove),this.trigger("ready")},open:function(e){i.isObject(e)||(e=this.docs.get(e),e||(this.docs.welcome(),e=this.docs.first())),this.doc.set(e.toJSON())},openOnCreate:function(e){e.isEmpty()&&this.open(e)},handlePrevious:function(e){var t=this.docs.get(e.previous("id"));t&&t.isEmpty()&&t.destroy()},updateDocs:function(e){this.docs.set(e.toJSON(),{add:!1,remove:!1})},handleRemoteRemove:function(e,t,n){var r=n.success&&n.error;r||this.open()},triggerConnected:function(e){this.trigger("connected",e)},triggerDisconnected:function(){this.trigger("disconnected"),this.docs.reset(),this.open()},setUrl:function(e){o.history.navigate(e.getUrl())}}),e.exports=r},function(e,t,n){function r(){window.location.hash=c,i.history.start()}n(12).polyfill(),n(13),n(26);var i=n(1),o=n(28),s=n(31),a=n(4);"serviceWorker"in navigator&&navigator.serviceWorker.register("service-worker.js");var c=window.location.hash;a.handleAppcacheUpdates();var l=(new o).on("ready",r);l.router=new s({litewrite:l})},function(e,t,n){var r=n(1),i=n(11),o=r.Model.extend({defaults:{id:0,query:""},localStorage:new i("litewriteState")});e.exports=o},function(e,t,n){var r=n(1),i=r.Router.extend({initialize:function(e){this.litewrite=e.litewrite},routes:{"!:url":"open","*404":"openFirst"},openFirst:function(){this.litewrite.open()},open:function(e){var t=e.match(/^\((.+?)\)/);if(!t)return void this.openFirst();var n=t[1];return n?void this.litewrite.open(n):void this.openFirst()}});e.exports=i},function(e,t,n){e.exports={emptyDoc:"Schreibe etwas …",search:"Suchen",footer:"write lite, open source",delete:"löschen",confirmDelete:"Möchtest du die Notiz wirklich löschen?",share:"teilen",unshare:"verstecken",open:"öffnen",modified:"zuletzt bearbeitet",updateCache:"Eine neue Version von Litewrite ist verfügbar. Seite neuladen?",welcome:n(17),secondsAgo:function(e){return 1===e?"vor einer Sekunde":"vor "+e+" Sekunden"},minutesAgo:function(e){return 1===e?"vor einer Minute":"vor "+e+" Minuten"},hoursAgo:function(e){return 1===e?"vor einer Stunde":"vor "+e+" Stunden"},daysAgo:function(e){return 1===e?"vor einem Tag":"vor "+e+" Tagen"},weeksAgo:function(e){return 1===e?"vor einer Woche":"vor "+e+" Wochen"},monthsAgo:function(e){return 1===e?"vor einem Monat":"vor "+e+" Monaten"},yearsAgo:function(e){return 1===e?"vor einem Jahr":"vor "+e+" Jahren"}}},function(e,t,n){e.exports={emptyDoc:"Write …",search:"Search",footer:"write lite, open source",delete:"delete",confirmDelete:"Are you sure that you want to delete the document?",share:"share",unshare:"unshare",open:"open",modified:"modified",updateCache:"New Litewrite version available. Refresh?",welcome:n(20),secondsAgo:function(e){return 1===e?"a second ago":e+" seconds ago"},minutesAgo:function(e){return 1===e?"a minute ago":e+" minutes ago"},hoursAgo:function(e){return 1===e?"an hour ago":e+" hours ago"},daysAgo:function(e){return 1===e?"a day ago":e+" days ago"},weeksAgo:function(e){return 1===e?"a week ago":e+" weeks ago"},monthsAgo:function(e){return 1===e?"a month ago":e+" months ago"},yearsAgo:function(e){return 1===e?"a year ago":e+" years ago"}}},function(e,t,n){e.exports={emptyDoc:"Écrire …",search:"Rechercher",footer:"Ecrivez léger, écrivez libre !",delete:"effacer",confirmDelete:"Voulez-vous vraiment supprimer la note ?",share:"partager",unshare:"cacher",open:"ouvrir",modified:"dernière modification",updateCache:"Une nouvelle version de Litewrite est disponible. La charger maintenant ?",welcome:n(18),secondsAgo:function(e){return 1===e?"il y a une seconde":"il y a "+e+" secondes"},minutesAgo:function(e){return 1===e?"il y a une minute":"il y a "+e+" minutes"},hoursAgo:function(e){return 1===e?"il y a une heure":"il y a "+e+" heures"},daysAgo:function(e){return 1===e?"il y a un jour":"il y a "+e+" jours"},weeksAgo:function(e){return 1===e?"il y a une semaine":"il y a "+e+" semaines"},monthsAgo:function(e){return 1===e?"il y a un mois":"il y a "+e+" mois"},yearsAgo:function(e){return 1===e?"il y a un an":"il y a "+e+" ans"}}},function(e,t,n){function r(e,t){var n=t>1?t+" ":"";return n+i(e,+t)+" назад"}function i(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}e.exports={emptyDoc:"Пишите …",search:"Найти",footer:"Пишите с легкостью! Исходный код открыт.",delete:"Удалить",confirmDelete:"Вы уверены, что хотите удалить документ?",share:"опубликовать",unshare:"отменить публикацию",open:"открыть",modified:"изменён",updateCache:"Доступна новая версия Litewrite. Загрузить?",welcome:n(19),secondsAgo:function(e){return r("секунду_секунды_секунд",e)},minutesAgo:function(e){return r("минуту_минуты_минут",e)},hoursAgo:function(e){return r("час_часа_часов",e)},daysAgo:function(e){return r("день_дня_дней",e)},weeksAgo:function(e){return r("неделю_недели_недель",e)},monthsAgo:function(e){return r("месяц_месяца_месяцев",e)},yearsAgo:function(e){return r("год_года_лет",e)}}},function(e,t,n){var r=n(1),i=n(2),o=n(41),s=n(40),a=n(38),c=n(37),l=n(42),u=n(43),h=n(39),d=n(4),f=10,p=r.View.extend({el:"body",initialize:function(e){i.bindAll(this,"toggleSearch"),this.litewrite=e.litewrite,this.editor=new s({model:this.model,litewrite:this.litewrite}),this.aside=new c({model:this.model,collection:this.collection}),this.search=new l({model:this.litewrite.state}),this.entries=new o({litewrite:this.litewrite,collection:this.collection}),this.date=new a({model:this.model});var t=new h({model:this.model}),n=new u({model:this.model,collection:this.collection,remote:e.remote});this.litewrite.on("ready",this.editor.render).on("ready",this.editor.desktopFocus).on("connected",n.show).on("disconnected",n.hide),this.collection.on("update",this.toggleSearch),this.search.on("focus",this.aside.show).on("blur",this.editor.desktopFocus),this.editor.on("typing",this.aside.desktopHide),this.aside.on("opening",this.editor.blur),this.entries.on("open",this.editor.desktopFocus).on("open",this.aside.hide),t.on("delete",this.editor.render).on("delete",this.editor.focus).on("delete",n.unshare)},events:{"click #add":"newDoc","touchend #add":"newDoc","click #menu-button":"toggleAside","touchend #menu-button":"toggleAside",keydown:"handleKey",keyup:"closeAside"},newDoc:function(){return d.isMobile&&this.aside.hide(),this.model.isEmpty()||this.collection.addNew(),this.editor.focus(),this.search.clear(),!1},toggleAside:function(){return this.aside.toggle(),!1},toggleSearch:function(){this.collection.length>=f?this.search.show():this.search.hide()},handleKey:function(e){var t=9===e.keyCode,n=83===e.keyCode,r=n&&e.metaKey;if(t&&!e.shiftKey&&this.editor.insertTab(),t||r)return void e.preventDefault();const i=d.isMac&&e.altKey||e.ctrlKey;if(i){var o=this.shortcuts[e.keyCode];o&&(e.preventDefault(),e.stopPropagation(),o.call(this,e))}},shortcuts:{32:function(){this.aside.toggle()},68:function(){this.newDoc()},38:function(){this.previous()},40:function(){this.next()},70:function(){this.search.focus()}},previous:function(){var e=this.entries.previous(this.model.id);e&&this.litewrite.open(e)},next:function(){var e=this.entries.next(this.model.id);e&&this.litewrite.open(e)},closeAside:function(e){var t=18===e.keyCode;t&&(this.search.isFocused()||this.aside.hide())}});e.exports=p},function(e,t,n){var r=n(2),i=n(5),o=n(1),s=n(4),a=n(9),c=n(3),l=3,u=o.View.extend({el:"body",initialize:function(){r.bindAll(this,"show","hide","toggle","desktopShow","desktopHide","handleSnapper","triggerOpening"),this.$sidebar=this.$("aside"),this.collection.on("add",this.desktopShow).on("remove",this.desktopShow).on("change:title",this.desktopShow),this.initSnapper(),this.setFooter()},initSnapper:function(){this.snapper=new a({element:this.$("#snap-content")[0],disable:"right",maxPosition:265}),this.snapper.on("end",this.triggerOpening),this.handleSnapper(),i(window).on("resize",this.handleSnapper)},triggerOpening:function(){this.snapper.state().info.opening&&this.trigger("opening")},show:function(){return s.isDesktop?void this.$el.addClass("show-aside"):void this.snapper.open("left")},hide:function(){return s.isMobile?void this.snapper.close():void(this.collection.length<l||this.model.isEmpty()||this.$el.removeClass("show-aside"))},toggle:function(){return s.isDesktop?void this.$el.toggleClass("show-aside"):"closed"===this.snapper.state().state?void this.show():void this.hide()},desktopShow:function(){s.isDesktop&&this.show()},desktopHide:r.debounce(function(){s.isDesktop&&this.hide()},3e3),handleSnapper:r.debounce(function(){return s.isMobile?void this.snapper.enable():(this.snapper.close(),void this.snapper.disable())},700),setFooter:function(){this.$sidebar.find("footer a").text(c.footer)}});e.exports=u},function(e,t,n){var r=n(2),i=n(1),o=n(3),s=2e4,a=i.View.extend({el:"#date",initialize:function(e){r.bindAll(this,"render"),this.model.on("change:lastEdited",this.render),this.refreshTimeout=null},render:function(){var e=this.model.formatDate();this.$el.html(e?o.modified+" "+e:""),this.refresh()},refresh:function(){clearTimeout(this.refreshTimeout),this.refreshTimeout=setTimeout(r.bind(function(){window.requestAnimationFrame(this.render)},this),s)}});e.exports=a},function(e,t,n){var r=n(1),i=n(2),o=n(3),s=r.View.extend({el:"#delete",initialize:function(){i.bindAll(this,"render"),this.model.on("change:content",this.render),this.$el.text(o.delete),this.render()},events:{click:"delete"},render:function(){this.$el.toggleClass("hide",""===this.model.get("content"))},delete:function(){window.confirm(o.confirmDelete)&&(this.model.set({content:"",cursorPos:0}),this.trigger("delete"))}});e.exports=s},function(e,t,n){var r=n(2),i=n(1),o=n(4),s=n(3),a=n(10),c=n(5),l=i.View.extend({el:"#editor",initialize:function(e){r.bindAll(this,"render","focus","blur","desktopFocus","handleCharEncodings","setCursor","insertTab"),this.litewrite=e.litewrite,this.litewrite.state.on("change:query",this.render),this.model.on("change:id",this.render).on("change:content",this.handleCharEncodings).on("update",this.render),a(this.$el),this.setPlaceholder(),this.render()},render:function(){var e=this.model.get("content"),t=this.litewrite.state.get("query"),n=this.applyHighlights(e,t);if(this.updateHighlight(n),e!==this.$el.val()){this.$el.val(e||""),a.update(this.$el);var r=this.model.get("cursorPos");r&&this.setCursor(r)}},focus:function(){return o.isDesktop?void this.$el.focus():void setTimeout(r.bind(this.$el.focus,this.$el),500)},desktopFocus:function(){o.isDesktop&&this.focus()},blur:function(){this.$el.blur()},events:{input:"updateOpenDoc"},updateOpenDoc:function(){this.model.set({content:this.$el.val(),cursorPos:this.$el.prop("selectionStart")}),this.trigger("typing")},handleCharEncodings:function(e){var t=e.get("content"),n=!!t.match("[Ѐ-ӿԀ-ԯ]");this.$el.toggleClass("cyrillic",n);var r=!!t.match("[-ۿݐ-ݿ-܀-ݏހ-]");this.$el.toggleClass("rtl",r)},setPlaceholder:function(){this.$el.attr("placeholder",s.emptyDoc)},setCursor:function(e){this.$el.prop("selectionStart",e).prop("selectionEnd",e)},insertTab:function(){var e=this.$el.prop("selectionStart"),t=this.$el.val();this.$el.val(t.substring(0,e)+"\t"+t.substring(e,t.length)),this.setCursor(e+1),this.updateOpenDoc()},escapeRegex:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},applyHighlights:function(e,t){var n=new RegExp(this.escapeRegex(t),"gi");e=e.replace(/\n$/g,"\n\n").replace(n,"<mark>$&</mark>");var r=window.navigator.userAgent.toLowerCase(),i=!!r.match(/msie|trident\/7|edge/);return i&&(e=e.replace(/ /g," <wbr>")),e},updateHighlight:function(e){c(".highlights").html(e)}});e.exports=l},function(e,t,n){var r=n(2),i=n(1),o=n(15),s=n(3),a=i.View.extend({el:"#entries",initialize:function(e){r.bindAll(this,"filter","render","update","toTop","removeItem","selectDoc","openFirst"),this.litewrite=e.litewrite,this.template=r.template(o),this.collection.on("add",this.render).on("change:title",this.update).on("change:lastEdited",this.toTop).on("remove",this.removeItem),this.litewrite.doc.on("change:id",this.selectDoc),this.litewrite.state.on("change:query",this.render).on("change:query",this.openFirst)},events:{"click .item":"openDoc"},serialize:function(){var e=this.collection.filter(this.filter).map(function(e){var t=e.toJSON();return t.opacity=e.getOpacity(),t.url=e.getUrl(),t});return{docs:e,placeholder:s.emptyDoc}},filter:function(e){var t=this.litewrite.state.get("query");return!t||e.get("content").toLowerCase().indexOf(t.toLowerCase())!==-1},render:function(){this.$el.html(this.template(this.serialize())),this.selectDoc()},find:function(e){return this.$(".item[data-id="+e+"]")},update:function(e){var t=this.find(e.id).find("a");return!t.length||e.isEmpty()?void this.render():(t.text(e.get("title")),void t.attr("href","#!"+e.getUrl()))},toTop:function(e){var t=this.removeItem(e);t.children("a").css("opacity",1),this.$el.prepend(t)},removeItem:function(e){return this.find(e.id).remove()},selectDoc:function(){this.$selected&&this.$selected.removeClass("selected"),this.$selected=this.find(this.litewrite.doc.id).addClass("selected")},selectedFirst:function(){return this.$selected.attr("data-id")===this.collection.first().id},openDoc:function(e){e.preventDefault();var t=this.$(e.currentTarget).attr("data-id");this.litewrite.open(t),this.trigger("open")},openFirst:function(){var e=this.$(".item").attr("data-id");this.litewrite.open(e)},previous:function(e){return this.find(e).prev().attr("data-id")},next:function(e){return this.find(e).next().attr("data-id")}});e.exports=a},function(e,t,n){var r=n(1),i=n(3),o=r.View.extend({el:"#search",initialize:function(){this.render(),this.setPlaceholder()},events:{search:"search",keyup:"handleKey",focus:"triggerFocus"},render:function(){this.$el.val(this.model.get("query"))},search:function(){var e=this.$el.val();this.model.save("query",e)},handleKey:function(e){var t=13===e.which;return t?(e.preventDefault(),void this.trigger("blur")):void this.search()},focus:function(){this.$el.removeClass("hide"),this.$el.focus()},triggerFocus:function(){this.trigger("focus")},isFocused:function(){return this.$el.is(":focus")},show:function(){this.$el.removeClass("hide")},hide:function(){this.model.get("query")||(this.$el.addClass("hide"),this.trigger("blur"))},clear:function(){this.model.save("query",""),this.render()},setPlaceholder:function(){this.$el.attr("placeholder",i.search)}});e.exports=o},function(e,t,n){var r=n(2),i=n(1),o=n(16),s=n(3),a=i.View.extend({el:"#sharing",initialize:function(e){r.bindAll(this,"setLink","updatePublic","show","hide","unshare"),this.remote=e.remote,this.template=r.template(o),this.$shareButton=this.$(".share"),this.$link=this.$(".link"),this.$unshareButton=this.$(".unshare"),this.model.on("change:public",this.setLink),this.collection.on("sync",this.updatePublic),this.render()},events:{"click .share":"share","click .unshare":"unshare"},render:function(){this.$shareButton.text(s.share),this.$link.text(s.open),this.$unshareButton.text(s.unshare),this.setLink()},share:function(){var e=this.renderDocument(this.model);this.remote.addRaw("text/html",e).then(r.bind(function(e){this.model.set("public",e)},this))},unshare:function(){var e=this.model.get("public");if(e){var t=e.split("/").slice(-2).join("/");this.remote.remove(t).then(r.bind(function(e){this.model.set("public",null)},this))}},setLink:function(){var e=this.model.get("public");e&&this.$link.attr("href",e),this.$el.toggleClass("is-shared",!!e)},updatePublic:function(e){if(e.get("public")){var t=e.get("public").match(/.+\/(.+?)$/)[1],n=this.renderDocument(e);this.remote.setRaw(t,"text/html",n)}},renderDocument:function(e){var t=e.toJSON();return t.date=new Date(t.lastEdited).toDateString(),this.template(t)},show:function(e){"remotestorage"===e&&this.$el.removeClass("hide")},hide:function(){this.$el.addClass("hide")}});e.exports=a},function(e,t){}]);