xrsh-com/com/lib/aframe-remotestorage.min.js
Leon van Kammen 1ebb8b32ab
All checks were successful
/ test (push) Successful in 6s
feat/remotestorage
2025-04-25 16:18:40 +02:00

416 lines
212 KiB
JavaScript

/*! For license information please see remotestorage.js.LICENSE.txt */!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("RemoteStorage",[],t):"object"==typeof exports?exports.RemoteStorage=t():e.RemoteStorage=t()}(this,function(){return function(){var n,s={548:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Access=void 0;class n{static _rs_init(){}constructor(){this.reset()}get scopes(){return Object.keys(this.scopeModeMap).map(e=>({name:e,mode:this.scopeModeMap[e]}))}get scopeParameter(){return this.scopes.map(e=>`${this._scopeNameForParameter(e)}:${e.mode}`).join(" ")}claim(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(e){return this.scopeModeMap[e]}remove(e){const t={};for(const e in this.scopeModeMap)t[e]=this.scopeModeMap[e];this.reset(),delete t[e];for(const e in t)this.claim(e,t[e])}checkPermission(e,t){const n=this.get(e);return n&&("r"===t||"rw"===n)}checkPathPermission(e,t){if(this.checkPermission("*",t))return!0;const n=this._getModuleName(e);return!!this.checkPermission(n,t)}reset(){this.rootPaths=[],this.scopeModeMap={}}_getModuleName(e){if("/"!==e[0])throw new Error("Path should start with a slash");const t=e.replace(/^\/public/,"").match(/^\/([^/]*)\//);return t?t[1]:"*"}_adjustRootPaths(e){"*"in this.scopeModeMap||"*"===e?this.rootPaths=["/"]:e in this.scopeModeMap||(this.rootPaths.push("/"+e+"/"),this.rootPaths.push("/public/"+e+"/"))}_scopeNameForParameter(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(e){this.storageType=e}}t.Access=n,t.default=n},275:function(e,t,n){"use strict";var c=this&&this.__awaiter||function(e,t,n,s){return new(n||(n=Promise))(function(o,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function c(e){try{a(s.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,c)}a((s=s.apply(e,t||[])).next())})},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Authorize=void 0;const o=l(n(334)),i=n(746),a=l(n(503)),d=n(368);let r;function u(e){const n=e||s.getLocation().href,t={};for(const[e,s]of new URL(n).searchParams)t[e]=s;const o=n.indexOf("#");if(-1===o)return t;const i=n.substring(o+1);return i.includes("=")?i.split("&").reduce(function(e,t){const n=t.split("=");if("state"===n[0]&&n[1].match(/rsDiscovery/)){let t=decodeURIComponent(n[1]);const s=t.substr(t.indexOf("rsDiscovery=")).split("&")[0].split("=")[1];e.rsDiscovery=JSON.parse(atob(s)),t=t.replace(new RegExp("&?rsDiscovery="+s),""),t.length>0&&(e.state=t)}else e[decodeURIComponent(n[0])]=decodeURIComponent(n[1]);return e},t):t}class s{static authorize(e,t){if((0,o.default)("[Authorize] authURL = ",t.authURL,"scope = ",t.scope,"redirectUri = ",t.redirectUri,"clientId = ",t.clientId,"response_type =",t.response_type),!t.scope)throw new Error("Cannot authorize due to undefined or empty scope; did you forget to access.claim()?");if(!(0,i.localStorageAvailable)()&&"remotestorage"===e.backend){t.redirectUri+=t.redirectUri.indexOf("#")>0?"&":"#";const n={userAddress:e.remote.userAddress,href:e.remote.href,storageApi:e.remote.storageApi,properties:e.remote.properties};t.redirectUri+="rsDiscovery="+(0,i.toBase64)(JSON.stringify(n))}const n=function(e){const n=new URL(e.redirectUri);e.state||(e.state=n.hash?n.hash.substring(1):""),e.response_type||(e.response_type="token");const t=new URL(e.authURL);t.searchParams.set("redirect_uri",e.redirectUri.replace(/#.*$/,"")),t.searchParams.set("scope",e.scope),t.searchParams.set("client_id",e.clientId);for(const n of["state","response_type","code_challenge","code_challenge_method","token_access_type"]){const s=e[n];s&&t.searchParams.set(n,s)}return t.href}(t);i.globalContext.cordova?s.openWindow(n,t.redirectUri,"location=yes,clearsessioncache=yes,clearcache=yes").then(t=>{e.remote.configure({token:t.access_token})}):s.setLocation(n)}static refreshAccessToken(e,t,n){return c(this,void 0,void 0,function*(){var s,i,r;yield t.configure({token:null,tokenType:null});const c=new URLSearchParams({grant_type:"refresh_token",client_id:t.clientId,refresh_token:n}),e=yield(0,d.requestWithTimeout)("POST",t.TOKEN_URL,{headers:{"Content-Type":"application/x-www-form-urlencoded"},body:c.toString(),responseType:"json"});if(200!==e?.status)throw yield t.configure({refreshToken:null}),new a.default("refresh token rejected:"+JSON.stringify(e.response));{(0,o.default)(`[Authorize] access token good for ${null===(s=e?.response)||void 0===s?void 0:s.expires_in} seconds`);const n={token:null===(i=e?.response)||void 0===i?void 0:i.access_token,tokenType:null===(r=e?.response)||void 0===r?void 0:r.token_type};if(!n.token)throw new Error(`no access_token in "successful" refresh: ${e.response}`);yield t.configure(n)}})}static setLocation(e){if("string"==typeof e)document.location.href=e;else{if("object"!=typeof e)throw"Invalid location "+e;document.location=e}}static _rs_supported(){return"undefined"!=typeof document}static _rs_cleanup(e){e.removeEventListener("features-loaded",r)}}t.Authorize=s,s.IMPLIED_FAKE_TOKEN=!1,s.getLocation=function(){return document.location},s.openWindow=function(e,t,n){return new Promise((s,o)=>{const i=open(e,"_blank",n);function a(){o("Authorization was canceled")}i&&!i.closed?(i.addEventListener("loadstart",function(e){if(0!==e.url.indexOf(t))return;i.removeEventListener("exit",a),i.close();const n=u(e.url);n?s(n):o("Authorization error")}),i.addEventListener("exit",a)):o("Authorization popup was blocked")})},s._rs_init=function(e){const t=u();let n;t&&(n=s.getLocation(),n.hash=""),r=function(){let i=!1;if(t){if(t.error)throw"access_denied"===t.error?new a.default("Authorization failed: access denied",{code:"access_denied"}):new a.default(`Authorization failed: ${t.error}`);t.rsDiscovery&&e.remote.configure(t.rsDiscovery),t.access_token&&(e.remote.configure({token:t.access_token}),i=!0),t.remotestorage&&(e.connect(t.remotestorage),i=!0),t.state&&(n=s.getLocation(),s.setLocation(n.href.split("#")[0]+"#"+t.state)),t.code&&(function(t){c(this,void 0,void 0,function*(){var a,r,c,l;const u=sessionStorage.getItem("remotestorage:codeVerifier");if(!u)return void(0,o.default)("[Authorize] Ignoring OAuth code parameter, because no PKCE code verifier found in sessionStorage");n=s.getLocation();let h=n.origin;"/"!==n.pathname&&(h+=n.pathname);const m=new URLSearchParams({code:t,grant_type:"authorization_code",client_id:e.remote.clientId,redirect_uri:h,code_verifier:u}),i=yield(0,d.requestWithTimeout)("POST",e.remote.TOKEN_URL,{headers:{"Content-Type":"application/x-www-form-urlencoded"},body:m.toString(),responseType:"json"});if(200===i.status){(0,o.default)(`[Authorize] access token good for ${null===(a=i?.response)||void 0===a?void 0:a.expires_in} seconds`);const t={token:null===(r=i?.response)||void 0===r?void 0:r.access_token,refreshToken:null===(c=i?.response)||void 0===c?void 0:c.refresh_token,tokenType:null===(l=i?.response)||void 0===l?void 0:l.token_type};t.token?e.remote.configure(t):e._emit("error",new Error(`no access_token in "successful" response: ${i.response}`)),sessionStorage.removeItem("remotestorage:codeVerifier")}else e._emit("error",new Error(`${i.statusText}: ${i.response}`))})}(t.code),i=!0),i||e.remote.stopWaitingForToken()}else e.remote.stopWaitingForToken()},e.on("features-loaded",r)},t.default=s},424:function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,s){return new(n||(n=Promise))(function(o,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function c(e){try{a(s.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,c)}a((s=s.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseClient=void 0;const r=i(n(439)),c=i(n(613)),l=i(n(491)),d=i(n(93)),u=i(n(28)),a=n(746);class s{constructor(e,t){if(this.schemas={configurable:!0,get(){return s.Types.inScope(this.moduleName)}},"/"!==t[t.length-1])throw"Not a folder: "+t;"/"===t&&(this.makePath=e=>("/"===e[0]?"":"/")+e),this.storage=e,this.base=t,this.moduleName=function(e){const t=e.split("/");return e.length>2?t[1]:"root"}(this.base),this.addEvents(["change"]),this.on=this.on.bind(this),e.onChange(this.base,this._fireChange.bind(this))}scope(e){return new s(this.storage,this.makePath(e))}getListing(e,t){return o(this,void 0,void 0,function*(){if("string"!=typeof e)e="";else if(e.length>0&&!(0,a.isFolder)(e))return Promise.reject("Not a folder: "+e);return this.storage.get(this.makePath(e),t).then(e=>404===e.statusCode?{}:e.body)})}getAll(e,t){return o(this,void 0,void 0,function*(){if("string"!=typeof e)e="";else if(e.length>0&&!(0,a.isFolder)(e))return Promise.reject("Not a folder: "+e);return this.storage.get(this.makePath(e),t).then(n=>{if(404===n.statusCode)return{};if("object"==typeof n.body){const s=Object.keys(n.body);if(0===s.length)return{};const o=s.map(s=>this.storage.get(this.makePath(e+s),t).then(e=>{if("string"==typeof e.body)try{e.body=JSON.parse(e.body)}catch{}"object"==typeof e.body&&(n.body[s]=e.body)}));return Promise.all(o).then(()=>n.body)}})})}getFile(e,t){return o(this,void 0,void 0,function*(){return"string"!=typeof e?Promise.reject("Argument 'path' of baseClient.getFile must be a string"):this.storage.get(this.makePath(e),t).then(e=>({data:e.body,contentType:e.contentType,revision:e.revision}))})}storeFile(e,t,n){return o(this,void 0,void 0,function*(){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"!=typeof 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(e=>200===e.statusCode||201===e.statusCode?e.revision:Promise.reject("Request (PUT "+this.makePath(t)+") failed with status: "+e.statusCode)))})}getObject(e,t){return o(this,void 0,void 0,function*(){return"string"!=typeof e?Promise.reject("Argument 'path' of baseClient.getObject must be a string"):this.storage.get(this.makePath(e),t).then(t=>{if("object"==typeof t.body)return t.body;if("string"==typeof t.body)try{return JSON.parse(t.body)}catch{throw new Error("Not valid JSON: "+this.makePath(e))}else if(void 0!==t.body&&200===t.statusCode)return Promise.reject("Not an object: "+this.makePath(e))})})}storeObject(e,t,n){return o(this,void 0,void 0,function*(){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"!=typeof n)return Promise.reject("Argument 'object' of baseClient.storeObject must be an object");this._attachType(n,e);try{const e=this.validate(n);if(!e.valid)return Promise.reject(e)}catch(e){return Promise.reject(e)}return this.storage.put(this.makePath(t),JSON.stringify(n),"application/json; charset=UTF-8").then(e=>200===e.statusCode||201===e.statusCode?e.revision:Promise.reject("Request (PUT "+this.makePath(t)+") failed with status: "+e.statusCode))})}remove(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(e){if("string"!=typeof e)throw"Argument 'path' of baseClient.getItemURL must be a string";return this.storage.connected?(e=(0,a.cleanPath)(this.makePath(e)),this.storage.remote.href+e):void 0}cache(e,t="ALL"){if("string"!=typeof e)throw"Argument 'path' of baseClient.cache must be a string";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}declareType(e,t,n){let o;if(n&&"string"==typeof t)o=t;else if(n||"string"==typeof t){if(!n&&"string"==typeof t)throw new Error("declareType() requires a JSON Schema object to be passed, in order to validate object types/formats")}else n=t,o=this._defaultTypeURI(e);s.Types.declare(this.moduleName,e,o,n)}validate(e){const t=s.Types.getSchema(e["@context"]);if(t)return r.default.validateResult(e,t);throw new l.default(e["@context"])}_defaultTypeURI(e){return"http://remotestorage.io/spec/modules/"+encodeURIComponent(this.moduleName)+"/"+encodeURIComponent(e)}_attachType(e,t){e["@context"]=s.Types.resolveAlias(this.moduleName+"/"+t)||this._defaultTypeURI(t)}makePath(e){return this.base+(e||"")}_fireChange(e){u.default.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{}}),this._emit("change",e))}static _rs_init(){}}t.BaseClient=s,s.Types=c.default,(0,a.applyMixins)(s,[d.default]),t.default=s},285:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Caching=void 0;const s=n(746),a=i(n(334));class o{constructor(){this.pendingActivations=[],this.reset()}set(e,t){if("string"!=typeof e)throw new Error("path should be a string");if(!(0,s.isFolder)(e))throw new Error("path should be a folder");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(e){this.set(e,"ALL")}disable(e){this.set(e,"FLUSH")}onActivate(e){(0,a.default)("[Caching] Setting activate handler",e,this.pendingActivations),this.activateHandler=e;for(let t=0;t<this.pendingActivations.length;t++)e(this.pendingActivations[t]);this.pendingActivations=[]}checkPath(e){return void 0!==this._rootPaths[e]?this._rootPaths[e]:"/"===e?"SEEN":this.checkPath((0,s.containingFolder)(e))}reset(){this._rootPaths={}}static _rs_init(){}}t.Caching=o,t.default=o},496:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,s){return new(n||(n=Promise))(function(o,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function c(e){try{a(s.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,c)}a((s=s.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const u=i(n(93)),r=i(n(28)),h=i(n(334)),s=n(746);function o(e){if("object"==typeof e&&"string"==typeof e.path)if((0,s.isFolder)(e.path)){{if(e.local&&e.local.itemsMap)return e.local;if(e.common&&e.common.itemsMap)return e.common}}else{if(e.local){if(e.local.body&&e.local.contentType)return e.local;if(!1===e.local.body)return}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 c(e,t){for(const s in e){if(e[s]&&e[s].remote)return!0;const n=o(e[s]);if(n&&n.timestamp&&(new Date).getTime()-n.timestamp<=t)return!1;if(!n)return!0}return!0}function l(e){const t={path:e,common:{}};return(0,s.isFolder)(e)&&(t.common.itemsMap={}),t}function m(e,t){return e.common||(e.common={itemsMap:{}}),e.common.itemsMap||(e.common.itemsMap={}),e.local||(e.local=(0,s.deepClone)(e.common)),e.local.itemsMap||(e.local.itemsMap=e.common.itemsMap),e.local.itemsMap[t]=!0,e}class d{constructor(){this._updateNodesRunning=!1,this._updateNodesQueued=[]}get(e,t,n){return a(this,void 0,void 0,function*(){return"number"==typeof t?this.getNodes((0,s.pathsFromRoot)(e)).then(s=>{const i=o(s[e]);return c(s,t)?n(e):i?{statusCode:200,body:i.body||i.itemsMap,contentType:i.contentType}:{statusCode:404}}):this.getNodes([e]).then(t=>{const n=o(t[e]);if(n){if((0,s.isFolder)(e))for(const e in n.itemsMap)n.itemsMap.hasOwnProperty(e)&&!1===n.itemsMap[e]&&delete n.itemsMap[e];return{statusCode:200,body:n.body||n.itemsMap,contentType:n.contentType}}return{statusCode:404}})})}put(e,t,n){return a(this,void 0,void 0,function*(){const i=(0,s.pathsFromRoot)(e);return this._updateNodes(i,function(e,s){try{for(let a=0,d=e.length;a<d;a++){const c=e[a];let r,i=s[c];i||(s[c]=i=l(c)),0===a?(r=o(i),i.local={body:t,contentType:n,previousBody:r?r.body:void 0,previousContentType:r?r.contentType:void 0}):i=m(i,e[a-1].substring(c.length))}return s}catch(e){throw(0,h.default)("[Cachinglayer] Error during PUT",s,e),e}})})}delete(e){const t=(0,s.pathsFromRoot)(e);return this._updateNodes(t,function(e,t){for(let i=0,c=e.length;i<c;i++){const r=e[i],n=t[r];let a;if(n){if(0===i)a=o(n),n.local={body:!1,previousBody:a?a.body:void 0,previousContentType:a?a.contentType:void 0};else{n.local||(n.local=(0,s.deepClone)(n.common));const t=e[i-1].substring(r.length);if(delete n.local.itemsMap[t],Object.getOwnPropertyNames(n.local.itemsMap).length>0)break}}else console.error("Cannot delete non-existing node "+r)}return t})}flush(e){return this._getAllDescendentPaths(e).then(e=>this.getNodes(e)).then(e=>{for(const n in e){const t=e[n];t&&t.common&&t.local&&this._emitChange({path:t.path,origin:"local",oldValue:!1===t.local.body?void 0:t.local.body,newValue:!1===t.common.body?void 0:t.common.body}),e[n]=void 0}return this.setNodes(e)})}_emitChange(e){r.default.changeEvents[e.origin]&&this._emit("change",e)}fireInitial(){r.default.changeEvents.local&&this.forAllNodes(e=>{if((0,s.isDocument)(e.path)){const t=o(e);t&&this._emitChange({path:e.path,origin:"local",oldValue:void 0,oldContentType:void 0,newValue:t.body,newContentType:t.contentType})}}).then(()=>{this._emit("local-events-done")})}onDiff(e){this.diffHandler=e}migrate(e){return"object"!=typeof e||e.common||(e.common={},"string"==typeof e.path?"/"===e.path.substr(-1)&&"object"==typeof e.body&&(e.common.itemsMap=e.body):(e.local||(e.local={}),e.local.body=e.body,e.local.contentType=e.contentType)),e}_updateNodes(e,t){return new Promise((n,s)=>{this._doUpdateNodes(e,t,{resolve:n,reject:s})})}_doUpdateNodes(e,t,n){this._updateNodesRunning?this._updateNodesQueued.push({paths:e,cb:t,promise:n}):(this._updateNodesRunning=!0,this.getNodes(e).then(o=>{const a=(0,s.deepClone)(o),i=[];o=t(e,o);for(const t in o){const e=o[t];(0,s.equal)(e,a[t])?delete o[t]:(0,s.isDocument)(t)&&((0,s.equal)(e.local.body,e.local.previousBody)&&e.local.contentType===e.local.previousContentType||i.push({path:t,origin:"window",oldValue:e.local.previousBody,newValue:!1===e.local.body?void 0:e.local.body,oldContentType:e.local.previousContentType,newContentType:e.local.contentType}),delete e.local.previousBody,delete e.local.previousContentType)}this.setNodes(o).then(()=>{this._emitChangeEvents(i),n.resolve({statusCode:200})})}).then(()=>Promise.resolve(),e=>{n.reject(e)}).then(()=>{this._updateNodesRunning=!1;const e=this._updateNodesQueued.shift();e&&this._doUpdateNodes(e.paths,e.cb,e.promise)}))}_emitChangeEvents(e){for(let t=0,n=e.length;t<n;t++)this._emitChange(e[t]),this.diffHandler&&this.diffHandler(e[t].path)}_getAllDescendentPaths(e){return(0,s.isFolder)(e)?this.getNodes([e]).then(t=>{const n=[e],s=o(t[e]),i=Object.keys(s.itemsMap).map(t=>this._getAllDescendentPaths(e+t).then(e=>{for(let t=0,s=e.length;t<s;t++)n.push(e[t])}));return Promise.all(i).then(()=>n)}):Promise.resolve([e])}_getInternals(){return{getLatest:o,makeNode:l,isOutdated:c}}}(0,s.applyMixins)(d,[u.default]),e.exports=d},28:function(e){"use strict";e.exports={cache:!0,changeEvents:{local:!0,window:!1,remote:!0,conflict:!0},cordovaRedirectUri:void 0,logging:!1,modules:[],backgroundSyncInterval:6e4,disableFeatures:[],discoveryTimeout:5e3,isBackground:!1,requestTimeout:3e4,syncInterval:1e4}},373:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const d=a(n(199)),l=a(n(28)),u=a(n(334)),r=n(746);let i;const c="remotestorage:discover";let o={};const s=function(e){return new Promise((t,n)=>{if(e in o)return t(o[e]);const s=new d.default({tls_only:!1,uri_fallback:!0,request_timeout:l.default.discoveryTimeout});return setTimeout(()=>n(new Error("timed out")),l.default.discoveryTimeout),s.lookup(e,function(s,a){if(s)return n(s);if("object"!=typeof a.idx.links.remotestorage||"number"!=typeof a.idx.links.remotestorage.length||a.idx.links.remotestorage.length<=0)return(0,u.default)("[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.");const r=a.idx.links.remotestorage[0],l=r.properties["http://tools.ietf.org/html/rfc6749#section-4.2"]||r.properties["auth-endpoint"],d=r.properties["http://remotestorage.io/spec/version"]||r.type;return o[e]={href:r.href,storageApi:d,authURL:l,properties:r.properties},i&&localStorage.setItem(c,JSON.stringify({cache:o})),t(o[e])})})};(s.DiscoveryError=function(e){this.name="DiscoveryError",this.message=e,this.stack=(new Error).stack}).prototype=Object.create(Error.prototype),s.DiscoveryError.prototype.constructor=s.DiscoveryError,s._rs_init=function(){if(i=(0,r.localStorageAvailable)(),i)try{const e=JSON.parse(localStorage[c]);o=e.cache}catch{}},s._rs_supported=function(){return Object.prototype.hasOwnProperty.call(r.globalContext,"fetch")||Object.prototype.hasOwnProperty.call(r.globalContext,"XMLHttpRequest")},s._rs_cleanup=function(){i&&delete localStorage[c]},e.exports=s},706:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,s){return new(n||(n=Promise))(function(o,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function c(e){try{a(s.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,c)}a((s=s.apply(e,t||[])).next())})},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const x=c(n(93)),u=c(n(424)),w=c(n(941)),E=c(n(982)),m=c(n(503)),s=n(746),h=n(368),k=n(684),O=c(n(275));let o;const l="remotestorage:dropbox",g="https://api.dropboxapi.com/2/files/list_folder",v="https://api.dropboxapi.com/2/files/list_folder/continue",b="/remotestorage";function a(e){return(b+"/"+e).replace(/\/+$/,"").replace(/\/+/g,"/")}const C=/[\u007f-\uffff]/g;function _(e){return JSON.stringify(e).replace(C,function(e){return"\\u"+("000"+e.charCodeAt(0).toString(16)).slice(-4)})}function i(e,t){return new RegExp("^"+t.join("\\/")+"(\\/|$)").test(e.error_summary)}function f(e){return e instanceof ArrayBuffer||(0,h.isArrayBufferView)(e)}class d extends k.RemoteBase{constructor(e){if(super(e),this.online=!0,this.storageApi="draft-dejong-remotestorage-19",this._initialFetchDone=!1,this.addEvents(["connected","not-connected"]),this.clientId=e.apiKeys.dropbox.appKey,this.TOKEN_URL="https://api.dropboxapi.com/oauth2/token",this._revCache=new w.default("rev"),this._fetchDeltaCursor=null,this._fetchDeltaPromise=null,this._itemRefs={},o=(0,s.localStorageAvailable)(),o){const e=(0,s.getJSONFromLocalStorage)(l);e&&this.configure(e),this._itemRefs=(0,s.getJSONFromLocalStorage)(`${l}:shares`)||{}}this.connected&&setTimeout(this._emit.bind(this),0,"connected")}connect(){return r(this,void 0,void 0,function*(){try{if(this.rs.setBackend("dropbox"),this.token)p(this.rs);else{const{codeVerifier:t,codeChallenge:n,state:e}=yield(0,s.generateCodeVerifier)();sessionStorage.setItem("remotestorage:codeVerifier",t),sessionStorage.setItem("remotestorage:state",e),this.rs.authorize({authURL:"https://www.dropbox.com/oauth2/authorize",scope:"account_info.read files.content.read files.content.write files.metadata.read files.metadata.write",clientId:this.clientId,response_type:"code",state:e,code_challenge:n,code_challenge_method:"S256",token_access_type:"offline"})}}catch(e){throw this.rs._emit("error",e),this.rs.setBackend(void 0),e}})}configure(e){return r(this,void 0,void 0,function*(){void 0!==e.userAddress&&(this.userAddress=e.userAddress),void 0!==e.token&&(this.token=e.token),void 0!==e.refreshToken&&(this.refreshToken=e.refreshToken),void 0!==e.tokenType&&(this.tokenType=e.tokenType);const t=()=>{o&&localStorage.setItem(l,JSON.stringify({userAddress:this.userAddress,token:this.token,refreshToken:this.refreshToken,tokenType:this.tokenType}))};if(this.refreshToken||this.token)if(this.connected=!0,this.userAddress)this._emit("connected"),t();else try{const e=yield this.info();this.userAddress=e.email,this._emit("connected"),t()}catch{this.connected=!1,this.rs._emit("error",new Error("Could not fetch user info.")),t.apply(this)}else(()=>{this.connected=!1,o&&localStorage.removeItem(l),this.rs.setBackend(void 0)})()})}_getFolder(e){const t=this._revCache,n=n=>{let o;if(200!==n.status&&409!==n.status)return Promise.reject("Unexpected response status: "+n.status);try{o=JSON.parse(n.responseText)}catch(e){return Promise.reject(e)}if(409===n.status)return i(o,["path","not_found"])?Promise.resolve({}):Promise.reject(new Error("API returned an error: "+o.error_summary));const a=o.entries.reduce((n,s)=>{try{const i="folder"===s[".tag"],o=s.path_display.split("/").slice(-1)[0]+(i?"/":"");if(i)n[o]={ETag:t.get(e+o)};else{const t=new Date(s.server_modified);n[o]={ETag:s.rev,"Content-Length":s.size,"Last-Modified":t.toUTCString()},this._revCache.set(e+o,s.rev)}}catch(t){console.error(`[Dropbox] folder “${e}” has entry ${JSON.stringify(s)}:`,t)}return n},{});return o.has_more?s(o.cursor).then(function(e){return Object.assign(a,e)}):Promise.resolve(a)},s=e=>{const t={body:{cursor:e}};return this._request("POST",v,t).then(n)};return this._request("POST",g,{body:{path:a(e)}}).then(n).then(function(n){return Promise.resolve({statusCode:200,body:n,contentType:"application/json; charset=UTF-8",revision:t.get(e)})})}get(e,t={}){if(!this.connected)return Promise.reject("not connected (path: "+e+")");const n=this._revCache.get(e);if(null===n)return Promise.resolve({statusCode:404});if(t&&t.ifNoneMatch){if(!this._initialFetchDone)return this.fetchDelta().then(()=>this.get(e,t));if(n&&n===t.ifNoneMatch)return Promise.resolve({statusCode:304})}if("/"===e.slice(-1))return this._getFolder(e);const o={headers:{"Dropbox-API-Arg":_({path:a(e)})},responseType:"arraybuffer"};return t&&t.ifNoneMatch&&(o.headers["If-None-Match"]=t.ifNoneMatch),this._request("GET","https://content.dropboxapi.com/2/files/download",o).then(t=>{const o=t.status;let n,a,r,c;return 200!==o&&409!==o?Promise.resolve({statusCode:o}):(n=t.getResponseHeader("Dropbox-API-Result"),(0,s.getTextFromArrayBuffer)(t.response,"UTF-8").then(l=>{a=l,409===o&&(n=a);try{n=JSON.parse(n)}catch(e){return Promise.reject(e)}if(409===o)return i(n,["path","not_found"])?{statusCode:404}:Promise.reject(new Error('API error while downloading file ("'+e+'"): '+n.error_summary));if(r=t.getResponseHeader("Content-Type"),c=n.rev,this._revCache.set(e,c),this._shareIfNeeded(e),(0,s.shouldBeTreatedAsBinary)(l,r))a=t.response;else try{a=JSON.parse(a),r="application/json; charset=UTF-8"}catch{}return{statusCode:o,body:a,contentType:r,revision:c}}))})}put(){return r(this,arguments,void 0,function*(e,t,n,s={}){if(!this.connected)throw new Error("not connected (path: "+e+")");const o=this._revCache.get(e);if(s&&s.ifMatch&&o&&o!==s.ifMatch)return{statusCode:412,revision:o};if(s&&"*"===s.ifNoneMatch&&o&&"rev"!==o)return{statusCode:412,revision:o};if(!n.match(/charset=/)&&f(t)&&(n+="; charset=binary"),t.length>157286400)throw new Error("Cannot upload file larger than 150MB");const i={body:t,contentType:n,path:e};if(s&&(s.ifMatch||"*"===s.ifNoneMatch)){const t=yield this._getMetadata(e);if(s&&"*"===s.ifNoneMatch&&t)return{statusCode:412,revision:t.rev};if(s&&s.ifMatch&&t&&t.rev!==s.ifMatch)return{statusCode:412,revision:t.rev}}const a=yield this._uploadSimple(i);return this._shareIfNeeded(e),a})}delete(){return r(this,arguments,void 0,function*(e,t={}){if(!this.connected)throw new Error("not connected (path: "+e+")");const n=this._revCache.get(e);if(t?.ifMatch&&n&&t.ifMatch!==n)return{statusCode:412,revision:n};if(t?.ifMatch){const n=yield this._getMetadata(e);if(t?.ifMatch&&n&&n.rev!==t.ifMatch)return{statusCode:412,revision:n.rev}}return this._deleteSimple(e)})}_shareIfNeeded(e){if(e.match(/^\/public\/.*[^/]$/)&&void 0===this._itemRefs[e])return this.share(e)}share(e){const t={body:{path:a(e)}};return this._request("POST","https://api.dropboxapi.com/2/sharing/create_shared_link_with_settings",t).then(t=>{if(200!==t.status&&409!==t.status)return Promise.reject(new Error("Invalid response status:"+t.status));let n;try{n=JSON.parse(t.responseText)}catch{return Promise.reject(new Error("Invalid response body: "+t.responseText))}return 409===t.status?i(n,["shared_link_already_exists"])?this._getSharedLink(e):Promise.reject(new Error("API error: "+n.error_summary)):Promise.resolve(n.url)}).then(t=>(this._itemRefs[e]=t,o&&localStorage.setItem(l+":shares",JSON.stringify(this._itemRefs)),Promise.resolve(t)),t=>(t.message='Sharing Dropbox file or folder ("'+e+'") failed: '+t.message,Promise.reject(t)))}info(){return this._request("POST","https://api.dropboxapi.com/2/users/get_current_account",{}).then(function(e){let t;try{const n=JSON.parse(e.responseText);t=n?.email}catch{return Promise.reject(new Error("Could not query current account info: Invalid API response: "+e.responseText))}return Promise.resolve({email:t})})}_request(){return r(this,arguments,void 0,function*(e,t,n,o=1){if(this.isForbiddenRequestMethod(e,t))throw`Don't use ${e} on directories!`;if(!this.token)throw new m.default("No access token");n.headers||(n.headers={}),n.headers.Authorization="Bearer "+this.token,"object"!=typeof n.body||f(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:(0,s.isFolder)(t)});try{const i=yield(0,h.requestWithTimeout)(e,t,n);return this.online||(this.online=!0,this.rs._emit("network-online")),this.rs._emit("wire-done",{method:e,isFolder:(0,s.isFolder)(t),success:!0}),401===i?.status&&this.refreshToken?o>=3?(console.error(`Abandoned after ${o} attempts: ${e} ${t}`),i):(this.rs._emit("wire-busy",{method:e,isFolder:(0,s.isFolder)(t)}),yield O.default.refreshAccessToken(this.rs,this,this.refreshToken),this.rs._emit("wire-done",{method:e,isFolder:(0,s.isFolder)(t),success:!0}),this._request(e,t,n,o+1)):[503,429].includes(i?.status)?(this.online&&(this.online=!1,this.rs._emit("network-offline")),o>=3?(console.warn(`Abandoned after ${o} attempts: ${e} ${t}`),i):(yield new Promise(e=>setTimeout(e,(0,h.retryAfterMs)(i))),this._request(e,t,n,o+1))):i}catch(n){throw this.online&&(this.online=!1,this.rs._emit("network-offline")),this.rs._emit("wire-done",{method:e,isFolder:(0,s.isFolder)(t),success:!1}),n}})}fetchDelta(...t){if(this._fetchDeltaPromise)return this._fetchDeltaPromise;const e=t=>r(this,void 0,void 0,function*(){let n,s;"string"==typeof t?(n=v,s={cursor:t}):(n=g,s={path:b,recursive:!0,include_deleted:!0});try{const a=yield this._request("POST",n,{body:s});if(401===a.status)throw new m.default;if(200!==a.status&&409!==a.status)throw new Error("Invalid response status: "+a.status);let o;try{o=JSON.parse(a.responseText)}catch{throw new Error("Invalid response body: "+a.responseText)}if(409===a.status){if(!i(o,["path","not_found"]))throw new Error("API returned an error: "+o.error_summary);o={cursor:null,entries:[],has_more:!1}}if(t||this._revCache.deactivatePropagation(),o.entries.forEach(e=>{const t=e.path_display.slice(14);"deleted"===e[".tag"]?(this._revCache.delete(t),this._revCache.delete(t+"/")):"file"===e[".tag"]&&this._revCache.set(t,e.rev)}),this._fetchDeltaCursor=o.cursor,o.has_more)return e(o.cursor);this._revCache.activatePropagation(),this._initialFetchDone=!0}catch(e){if("timeout"===e)return;throw e}});return this._fetchDeltaPromise=e(this._fetchDeltaCursor).catch(e=>("object"==typeof e&&"message"in e?e.message="Dropbox: fetchDelta: "+e.message:e=`Dropbox: fetchDelta: ${e}`,this.rs._emit("error",e),this._fetchDeltaPromise=null,Promise.reject(e))).then(()=>(this._fetchDeltaPromise=null,Promise.resolve(t))),this._fetchDeltaPromise}_getMetadata(e){const t={path:a(e)};return this._request("POST","https://api.dropboxapi.com/2/files/get_metadata",{body:t}).then(e=>{if(200!==e.status&&409!==e.status)return Promise.reject(new Error("Invalid response status:"+e.status));let t;try{t=JSON.parse(e.responseText)}catch{return Promise.reject(new Error("Invalid response body: "+e.responseText))}return 409===e.status?i(t,["path","not_found"])?Promise.resolve():Promise.reject(new Error("API error: "+t.error_summary)):Promise.resolve(t)}).then(void 0,t=>(t.message='Could not load metadata for file or folder ("'+e+'"): '+t.message,Promise.reject(t)))}_uploadSimple(e){const t={path:a(e.path),mode:{".tag":"overwrite",update:void 0},mute:!0};return e.ifMatch&&(t.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":_(t)}}).then(t=>{if(200!==t.status&&409!==t.status)return Promise.resolve({statusCode:t.status});let n;try{n=JSON.parse(t.responseText)}catch{return Promise.reject(new Error("Invalid API result: "+t.responseText))}return 409===t.status?i(n,["path","conflict"])?this._getMetadata(e.path).then(function(e){return Promise.resolve({statusCode:412,revision:e.rev})}):(this.rs._emit("error",new Error(n.error_summary)),Promise.resolve({statusCode:t.status})):(this._revCache.set(e.path,n.rev),Promise.resolve({statusCode:t.status,revision:n.rev}))})}_deleteSimple(e){const t={path:a(e)};return this._request("POST","https://api.dropboxapi.com/2/files/delete",{body:t}).then(e=>{if(200!==e.status&&409!==e.status)return Promise.resolve({statusCode:e.status});let t;try{t=JSON.parse(e.responseText)}catch{return Promise.reject(new Error("Invalid response body: "+e.responseText))}if(409===e.status){if(i(t,["path_lookup","not_found"]))return Promise.resolve({statusCode:404});this.rs._emit("error",new Error(t.error_summary))}return Promise.resolve({statusCode:e.status})}).then(t=>(200!==t.statusCode&&404!==t.statusCode||(this._revCache.delete(e),delete this._itemRefs[e]),Promise.resolve(t)),t=>(t.message='Could not delete Dropbox file or folder ("'+e+'"): '+t.message,Promise.reject(t)))}_getSharedLink(e){return r(this,void 0,void 0,function*(){const t={body:{path:a(e),direct_only:!0}};return this._request("POST","https://api.dropbox.com/2/sharing/list_shared_links",t).then(e=>{if(200!==e.status&&409!==e.status)return Promise.reject(new Error("Invalid response status: "+e.status));let t;try{t=JSON.parse(e.responseText)}catch{return Promise.reject(new Error("Invalid response body: "+e.responseText))}return 409===e.status?Promise.reject(new Error("API error: "+t?.error_summary||0)):t.links.length?Promise.resolve(t.links[0].url):Promise.reject(new Error("No links returned"))},t=>(t.message='Could not get link to a shared file or folder ("'+e+'"): '+t.message,Promise.reject(t)))})}static _rs_init(e){o=(0,s.localStorageAvailable)(),e.apiKeys.dropbox&&(e.dropbox=new d(e)),"dropbox"===e.backend&&p(e)}static _rs_supported(){return!0}static _rs_cleanup(e){!function(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&&(u.default.prototype.getItemURL=e._origBaseClientGetItemURL,delete e._origBaseClientGetItemURL)}(e),j(e)}(e),o&&localStorage.removeItem(l),e.setBackend(void 0)}}function y(e,...t){e._dropboxOrigSync||(e._dropboxOrigSync=e.sync.sync.bind(e.sync),e.sync.sync=function(){return this.dropbox.fetchDelta(e,...t).then(e._dropboxOrigSync,function(t){e._emit("error",new E.default(t)),e._emit("sync-done")})}.bind(e))}function j(e){e._dropboxOrigSyncCycle&&(e.syncCycle=e._dropboxOrigSyncCycle,delete e._dropboxOrigSyncCycle)}function p(e){!function(e){e._origRemote||(e._origRemote=e.remote,e.remote=e.dropbox)}(e),e.sync?y(e):function(e,...t){e._dropboxOrigSyncCycle||(e._dropboxOrigSyncCycle=e.syncCycle,e.syncCycle=()=>{if(!e.sync)throw new Error("expected sync to be initialized by now");y(e),e._dropboxOrigSyncCycle(e,...t),j(e)})}(e),function(e){e._origBaseClientGetItemURL||(e._origBaseClientGetItemURL=u.default.prototype.getItemURL,u.default.prototype.getItemURL=function(){throw new Error("getItemURL is not implemented for Dropbox yet")})}(e)}(0,s.applyMixins)(d,[x.default]),e.exports=d},451:function(e,t,n){"use strict";const o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(93)),i=n(746);class s{constructor(){this.addEvents(["background","foreground"]),this.mode="undefined"!=typeof window?"browser":"node","browser"===this.mode&&(this.setBrowserPrefixedNames(),document.addEventListener(this.visibilityChangeEvent,this.setVisibility.bind(this),!1),this.setVisibility())}setBrowserPrefixedNames(){"browser"===this.mode&&(void 0!==document.hidden?(this.hiddenProperty="hidden",this.visibilityChangeEvent="visibilitychange"):void 0!==document.mozHidden?(this.hiddenProperty="mozHidden",this.visibilityChangeEvent="mozvisibilitychange"):void 0!==document.msHidden?(this.hiddenProperty="msHidden",this.visibilityChangeEvent="msvisibilitychange"):void 0!==document.webkitHidden&&(this.hiddenProperty="webkitHidden",this.visibilityChangeEvent="webkitvisibilitychange"))}setVisibility(){document[this.hiddenProperty]?this.goBackground():this.goForeground()}isBrowser(){return"browser"===this.mode}isNode(){return"node"===this.mode}goBackground(){this._emit("background")}goForeground(){this._emit("foreground")}static _rs_init(){}static _rs_cleanup(){}}(0,i.applyMixins)(s,[o.default]),e.exports=s},93:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EventHandling=void 0;const i=o(n(334));class s{addEvents(e){e.forEach(e=>this._addEvent(e))}addEventListener(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");(0,i.default)("[EventHandling] Adding event listener",e),this._validateEvent(e),this._handlers[e].push(t)}on(e,t){return this.addEventListener(e,t)}removeEventListener(e,t){this._validateEvent(e);const n=this._handlers[e].length;for(let s=0;s<n;s++)if(this._handlers[e][s]===t)return void this._handlers[e].splice(s,1)}_emit(e,...t){this._validateEvent(e),this._handlers[e].slice().forEach(e=>{e.apply(this,t)})}_validateEvent(e){if(!(e in this._handlers))throw new Error("Unknown event: "+e)}_delegateEvent(e,t){t.on(e,t=>{this._emit(e,t)})}_addEvent(e){void 0===this._handlers&&(this._handlers={}),this._handlers[e]=[]}}t.EventHandling=s,t.default=s},545:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=s(n(28)),u=s(n(451)),o=s(n(334)),a=n(746),f=s(n(370)),l=s(n(548)),d=s(n(275)),r=s(n(373)),h=s(n(424)),m=s(n(801)),c=s(n(706)),p=s(n(600)),g=s(n(313)),v=s(n(285)),b=s(n(567)),j=s(n(794)),y=s(n(365)),_={features:[],featuresDone:0,readyFired:!1,loadFeatures(){this.features=[],this.featuresDone=0,this.readyFired=!1,this.featureModules={WireClient:p.default,Dropbox:c.default,GoogleDrive:m.default,Access:l.default,Discover:r.default,Authorize:d.default,BaseClient:h.default,Env:u.default},i.default.cache&&(0,a.extend)(this.featureModules,{Caching:v.default,IndexedDB:b.default,LocalStorage:j.default,InMemoryStorage:y.default,Sync:g.default}),i.default.disableFeatures.forEach(e=>{this.featureModules[e]&&delete this.featureModules[e]}),this._allLoaded=!1;for(const e in this.featureModules)this.loadFeature(e)},hasFeature(e){for(let t=this.features.length-1;t>=0;t--)if(this.features[t].name===e)return this.features[t].supported;return!1},loadFeature(e){const n=this.featureModules[e],t=!n._rs_supported||n._rs_supported();(0,o.default)(`[RemoteStorage] [FEATURE ${e}] initializing ...`),"object"==typeof t?t.then(()=>{this.featureSupported(e,!0),this.initFeature(e)},()=>{this.featureSupported(e,!1)}):"boolean"==typeof t?(this.featureSupported(e,t),t&&this.initFeature(e)):this.featureSupported(e,!1)},initFeature(e){const n=this.featureModules[e];let t;try{t=n._rs_init(this)}catch(t){return void this.featureFailed(e,t)}"object"==typeof t&&"function"==typeof t.then?t.then(()=>{this.featureInitialized(e)},t=>{this.featureFailed(e,t)}):this.featureInitialized(e)},featureFailed(e,t){(0,o.default)(`[RemoteStorage] [FEATURE ${e}] initialization failed (${t})`),this.featureDone()},featureSupported(e,t){(0,o.default)(`[RemoteStorage] [FEATURE ${e}]${t?"":"not "} supported`),t||this.featureDone()},featureInitialized(e){(0,o.default)(`[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(){this.featuresDone++,this.featuresDone===Object.keys(this.featureModules).length&&setTimeout(this.featuresLoaded.bind(this),0)},_setCachingModule(){["IndexedDB","LocalStorage","InMemoryStorage"].some(e=>{if(this.features.some(t=>t.name===e))return this.features.local=this.featureModules[e],!0})},_fireReady(){try{this.readyFired||(this._emit("ready"),this.readyFired=!0)}catch(e){console.error("'ready' failed: ",e,e.stack),this._emit("error",e)}},featuresLoaded(){(0,o.default)("[RemoteStorage] All features loaded"),this._setCachingModule(),this.local=i.default.cache&&this.features.local&&new this.features.local,this.local&&this.remote?(this._setGPD(f.default,this),this._bindChange(this.local)):this.remote&&this._setGPD(this.remote,this.remote),this.remote&&(this.remote.on("connected",()=>{this._fireReady(),this._emit("connected")}),this.remote.on("not-connected",()=>{this._fireReady(),this._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){(0,a.logError)(e),this._emit("error",e)}this._processPending()},_collectCleanupFunctions(){this._cleanups=[];for(let e=0;e<this.features.length;e++){const t=this.features[e].cleanup;"function"==typeof t&&this._cleanups.push(t)}}};e.exports=_},801:function(e,t,n){"use strict";var f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const c=f(n(424)),b=f(n(93)),s=n(746),g=n(368),p=n(684),o="https://www.googleapis.com",r="remotestorage:googledrive",u="application/vnd.google-apps.folder";let a;function h(e){return"/"===e.substr(-1)&&(e=e.substr(0,e.length-1)),decodeURIComponent(e)}function m(e){return e.replace(/[^/]+\/?$/,"")}function d(e){const t=e.split("/");return"/"===e.substr(-1)?t[t.length-2]+"/":t[t.length-1]}function i(e){return(0,s.cleanPath)(`/remotestorage/${e}`)}class v{constructor(e){this._items={},this.maxAge=e,this._items={}}get(e){const t=this._items[e],n=(new Date).getTime();return t&&t.t>=n-this.maxAge?t.v:void 0}set(e,t){this._items[e]={v:t,t:(new Date).getTime()}}}class l extends p.RemoteBase{constructor(e,t){if(super(e),this.online=!0,this.storageApi="draft-dejong-remotestorage-19",this.addEvents(["connected","not-connected"]),this.clientId=t,this._fileIdCache=new v(300),a=(0,s.localStorageAvailable)(),a){const e=(0,s.getJSONFromLocalStorage)(r);e&&this.configure(e)}}configure(e){void 0!==e.userAddress&&(this.userAddress=e.userAddress),void 0!==e.token&&(this.token=e.token);const t=function(){a&&localStorage.setItem(r,JSON.stringify({userAddress:this.userAddress,token:this.token}))},n=function(){this.connected=!1,delete this.token,a&&localStorage.removeItem(r)};this.token?(this.connected=!0,this.userAddress?(this._emit("connected"),t.apply(this)):this.info().then(e=>{this.userAddress=e.user.emailAddress,this._emit("connected"),t.apply(this)}).catch(()=>{n.apply(this),this.rs._emit("error",new Error("Could not fetch user info."))})):n.apply(this)}connect(){this.rs.setBackend("googledrive"),this.rs.authorize({authURL:"https://accounts.google.com/o/oauth2/auth",scope:"https://www.googleapis.com/auth/drive",clientId:this.clientId})}get(e,t={}){return(0,s.isFolder)(e)?this._getFolder(i(e)):this._getFile(i(e),t)}put(e,t,n,s={}){const o=i(e);function a(e){if(e.status>=200&&e.status<300){const t=JSON.parse(e.responseText),n=this.stripQuotes(t.etag);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+")")}return this._getFileId(o).then(e=>e?s&&"*"===s.ifNoneMatch?a({status:412}):this._updateFile(e,o,t,n,s).then(a):this._createFile(o,t,n).then(a))}delete(e,t={}){const n=i(e);return this._getFileId(n).then(e=>e?this._getMeta(e).then(n=>{let s;return"object"==typeof n&&"string"==typeof n.etag&&(s=this.stripQuotes(n.etag)),t&&t.ifMatch&&t.ifMatch!==s?{statusCode:412,revision:s}:this._request("DELETE",o+"/drive/v2/files/"+e,{}).then(e=>200===e.status||204===e.status?{statusCode:200}:Promise.reject("Delete failed: "+e.status+" ("+e.responseText+")"))}):Promise.resolve({statusCode:200}))}info(){const e=o+"/drive/v2/about?fields=user";return this._request("GET",e,{}).then(function(e){try{const t=JSON.parse(e.responseText);return Promise.resolve(t)}catch(e){return Promise.reject(e)}})}_updateFile(e,t,n,s,i){const r={mimeType:s},a={"Content-Type":"application/json; charset=UTF-8"};return i&&i.ifMatch&&(a["If-Match"]=this.addQuotes(i.ifMatch)),this._request("PUT",o+"/upload/drive/v2/files/"+e+"?uploadType=resumable",{body:JSON.stringify(r),headers:a}).then(e=>412===e.status?e:this._request("PUT",e.getResponseHeader("Location"),{body:s.match(/^application\/json/)?JSON.stringify(n):n}))}_createFile(e,t,n){return this._getParentId(e).then(s=>{const i={title:h(d(e)),mimeType:n,parents:[{kind:"drive#fileLink",id:s}]};return this._request("POST",o+"/upload/drive/v2/files?uploadType=resumable",{body:JSON.stringify(i),headers:{"Content-Type":"application/json; charset=UTF-8"}}).then(e=>this._request("POST",e.getResponseHeader("Location"),{body:n.match(/^application\/json/)?JSON.stringify(t):t}))})}_getFile(e,t){return this._getFileId(e).then(e=>this._getMeta(e).then(e=>{let n;if("object"==typeof e&&"string"==typeof e.etag&&(n=this.stripQuotes(e.etag)),t&&t.ifNoneMatch&&n===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:n});e.mimeType+=";export=text/html",e.downloadUrl=e.exportLinks["text/html"]}return this._request("GET",e.downloadUrl,{responseType:"arraybuffer"}).then(t=>(0,s.getTextFromArrayBuffer)(t.response,"UTF-8").then(function(o){let i=o;if(e.mimeType.match(/^application\/json/))try{i=JSON.parse(i)}catch{}else(0,s.shouldBeTreatedAsBinary)(o,e.mimeType)&&(i=t.response);return{statusCode:200,body:i,contentType:e.mimeType,revision:n}}))}))}_getFolder(e){return this._getFileId(e).then(t=>{let a,i,n;if(!t)return Promise.resolve({statusCode:404});const r="'"+t+"' in parents";return this._request("GET",o+"/drive/v2/files?q="+encodeURIComponent(r)+"&fields="+encodeURIComponent("items(downloadUrl,etag,fileSize,id,mimeType,title,labels)")+"&maxResults=1000&trashed=false",{}).then(t=>{var o;if(200!==t.status)return Promise.reject("request failed or something: "+t.status);try{a=JSON.parse(t.responseText)}catch{return Promise.reject("non-JSON response from GoogleDrive")}n={};for(const t of a.items)(null===(o=t.labels)||void 0===o?void 0:o.trashed)||(i=this.stripQuotes(t.etag),t.mimeType===u?(this._fileIdCache.set(e+(0,s.cleanPath)(t.title)+"/",t.id),n[t.title+"/"]={ETag:i}):(this._fileIdCache.set(e+(0,s.cleanPath)(t.title),t.id),n[t.title]={ETag:i,"Content-Type":t.mimeType,"Content-Length":t.fileSize}));return Promise.resolve({statusCode:200,body:n,contentType:"application/json; charset=UTF-8",revision:void 0})})})}_getParentId(e){const t=m(e);return this._getFileId(t).then(e=>e?Promise.resolve(e):this._createFolder(t))}_createFolder(e){return this._getParentId(e).then(t=>this._request("POST",o+"/drive/v2/files",{body:JSON.stringify({title:h(d(e)),mimeType:u,parents:[{id:t}]}),headers:{"Content-Type":"application/json; charset=UTF-8"}}).then(e=>{const t=JSON.parse(e.responseText);return Promise.resolve(t.id)}))}_getFileId(e){let t;return"/"===e?Promise.resolve("root"):(t=this._fileIdCache.get(e))?Promise.resolve(t):this._getFolder(m(e)).then(()=>(t=this._fileIdCache.get(e),t?Promise.resolve(t):"/"===e.substr(-1)?this._createFolder(e).then(()=>this._getFileId(e)):Promise.resolve()))}_getMeta(e){return this._request("GET",o+"/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(e,t,n){return this.isForbiddenRequestMethod(e,t)?Promise.reject(`Don't use ${e} on directories!`):(n.headers||(n.headers={}),n.headers.Authorization="Bearer "+this.token,this.rs._emit("wire-busy",{method:e,isFolder:(0,s.isFolder)(t)}),(0,g.requestWithTimeout)(e,t,n).then(n=>n&&401===n.status?void this.connect():(this.online||(this.online=!0,this.rs._emit("network-online")),this.rs._emit("wire-done",{method:e,isFolder:(0,s.isFolder)(t),success:!0}),Promise.resolve(n)),n=>(this.online&&(this.online=!1,this.rs._emit("network-offline")),this.rs._emit("wire-done",{method:e,isFolder:(0,s.isFolder)(t),success:!1}),Promise.reject(n))))}static _rs_init(e){const t=e.apiKeys.googledrive;var n;t&&(e.googledrive=new l(e,t.clientId),"googledrive"===e.backend&&(e._origRemote=e.remote,e.remote=e.googledrive,(n=e)._origBaseClientGetItemURL||(n._origBaseClientGetItemURL=c.default.prototype.getItemURL,c.default.prototype.getItemURL=function(){throw new Error("getItemURL is not implemented for Google Drive yet")})))}static _rs_supported(){return!0}static _rs_cleanup(e){var t;e.setBackend(void 0),e._origRemote&&(e.remote=e._origRemote,delete e._origRemote),(t=e)._origBaseClientGetItemURL&&(c.default.prototype.getItemURL=t._origBaseClientGetItemURL,delete t._origBaseClientGetItemURL)}}(0,s.applyMixins)(l,[b.default]),e.exports=l},567:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,s){return new(n||(n=Promise))(function(o,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function c(e){try{a(s.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,c)}a((s=s.apply(e,t||[])).next())})},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const d=r(n(93)),u=r(n(496)),s=r(n(334)),a=n(746),c="remotestorage";let l;class o extends u.default{constructor(e){super(),this.addEvents(["change","local-events-done"]),this.db=e||l,this.db?(this.getsRunning=0,this.putsRunning=0,this.changesQueued={},this.changesRunning={},this.commitSlownessWarning=null):(0,s.default)("[IndexedDB] Failed to open DB")}getNodes(e){return i(this,void 0,void 0,function*(){const n=[],t={};for(let s=0,o=e.length;s<o;s++)void 0!==this.changesQueued[e[s]]?t[e[s]]=(0,a.deepClone)(this.changesQueued[e[s]]||void 0):void 0!==this.changesRunning[e[s]]?t[e[s]]=(0,a.deepClone)(this.changesRunning[e[s]]||void 0):n.push(e[s]);return n.length>0?this.getNodesFromDb(n).then(function(e){for(const n in t)e[n]=t[n];return e}):Promise.resolve(t)})}setNodes(e){return i(this,void 0,void 0,function*(){for(const t in e)this.changesQueued[t]=e[t]||!1;return this.maybeFlush(),Promise.resolve()})}maybeFlush(){0===this.putsRunning?this.flushChangesQueued():this.commitSlownessWarning||(this.commitSlownessWarning=n.g.setInterval(function(){console.warn("WARNING: waited more than 10 seconds for previous commit to finish")},1e4))}flushChangesQueued(){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(e){return new Promise((t,n)=>{const s=this.db.transaction(["nodes"],"readonly"),i=s.objectStore("nodes"),o={};this.getsRunning++,e.map(e=>{i.get(e).onsuccess=t=>{o[e]=t.target.result}}),s.oncomplete=()=>{t(o),this.getsRunning--},s.onerror=s.onabort=()=>{n("get transaction error/abort"),this.getsRunning--}})}setNodesInDb(e){return i(this,void 0,void 0,function*(){return new Promise((t,n)=>{const o=this.db.transaction(["nodes"],"readwrite"),i=o.objectStore("nodes"),a=(new Date).getTime();this.putsRunning++,(0,s.default)("[IndexedDB] Starting put",e,this.putsRunning);for(const n in e){const t=e[n];if("object"==typeof t)try{i.put(t)}catch(e){throw(0,s.default)("[IndexedDB] Error while putting",t,e),e}else try{i.delete(n)}catch(e){throw(0,s.default)("[IndexedDB] Error while removing",i,t,e),e}}o.oncomplete=()=>{this.putsRunning--,(0,s.default)("[IndexedDB] Finished put",e,this.putsRunning,(new Date).getTime()-a+"ms"),t()},o.onerror=()=>{this.putsRunning--,n("transaction error")},o.onabort=()=>{n("transaction abort"),this.putsRunning--}})})}reset(e){const t=this.db.name;this.db.close(),o.clean(this.db.name,()=>{o.open(t,(t,n)=>{t?(0,s.default)("[IndexedDB] Error while resetting local storage",t):this.db=n,"function"==typeof e&&e(self)})})}forAllNodes(e){return i(this,void 0,void 0,function*(){return new Promise(t=>{this.db.transaction(["nodes"],"readonly").objectStore("nodes").openCursor().onsuccess=n=>{const s=n.target.result;s?(e(this.migrate(s.value)),s.continue()):t()}})})}closeDB(){0===this.putsRunning?this.db.close():setTimeout(this.closeDB.bind(this),100)}static open(e,t){const n=setTimeout(function(){t("timeout trying to open db")},1e4);try{const i=indexedDB.open(e,2);i.onerror=function(){(0,s.default)("[IndexedDB] Opening DB failed",i),clearTimeout(n),t(i.error)},i.onupgradeneeded=function(e){const t=i.result;(0,s.default)("[IndexedDB] Upgrade: from ",e.oldVersion," to ",e.newVersion),1!==e.oldVersion&&((0,s.default)("[IndexedDB] Creating object store: nodes"),t.createObjectStore("nodes",{keyPath:"path"})),(0,s.default)("[IndexedDB] Creating object store: changes"),t.createObjectStore("changes",{keyPath:"path"})},i.onsuccess=function(){clearTimeout(n);const a=i.result;if(!a.objectStoreNames.contains("nodes")||!a.objectStoreNames.contains("changes"))return(0,s.default)("[IndexedDB] Missing object store. Resetting the database."),void o.clean(e,function(){o.open(e,t)});t(null,i.result)}}catch(i){(0,s.default)("[IndexedDB] Failed to open database: "+i),(0,s.default)("[IndexedDB] Resetting database and trying again."),clearTimeout(n),o.clean(e,function(){o.open(e,t)})}}static clean(e,t){const n=indexedDB.deleteDatabase(e);n.onsuccess=function(){(0,s.default)("[IndexedDB] Done removing DB"),t()},n.onerror=n.onabort=function(t){console.error('Failed to remove database "'+e+'"',t)}}static _rs_init(e){return new Promise((t,n)=>{o.open(c,function(s,o){s?n(s):(l=o,o.onerror=()=>{e._emit("error",s)},t())})})}static _rs_supported(){return new Promise((e,t)=>{const s=(0,a.getGlobalContext)();let n=!1;if("undefined"!=typeof navigator&&navigator.userAgent.match(/Android (2|3|4\.[0-3])/)&&(navigator.userAgent.match(/Chrome|Firefox/)||(n=!0)),"indexedDB"in s&&!n)try{const n=indexedDB.open("rs-check");n.onerror=function(){t()},n.onsuccess=function(){n.result.close(),indexedDB.deleteDatabase("rs-check"),e()}}catch{t()}else t()})}static _rs_cleanup(e){return new Promise(t=>{e.local&&e.local.closeDB(),o.clean(c,t)})}diffHandler(){}}(0,a.applyMixins)(o,[d.default]),e.exports=o},365:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const a=s(n(93)),r=s(n(496)),o=n(746);class i extends r.default{constructor(){super(),this._storage={},this.addEvents(["change","local-events-done"])}getNodes(e){const t={};for(let n=0,s=e.length;n<s;n++)t[e[n]]=(0,o.deepClone)(this._storage[e[n]]);return Promise.resolve(t)}setNodes(e){for(const t in e)void 0===e[t]?delete this._storage[t]:this._storage[t]=e[t];return Promise.resolve()}forAllNodes(e){for(const t in this._storage)e(this.migrate(this._storage[t]));return Promise.resolve()}diffHandler(){}static _rs_init(){}static _rs_supported(){return!0}static _rs_cleanup(){}}(0,o.applyMixins)(i,[a.default]),e.exports=i},794:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const r=o(n(496)),c=o(n(93)),l=o(n(334)),i=n(746),s="remotestorage:cache:nodes:";function d(e){return e.substr(0,26)===s||"remotestorage:cache:changes:"===e.substr(0,28)}class a extends r.default{constructor(){super(),this.addEvents(["change","local-events-done"])}diffHandler(...e){}getNodes(e){const t={};for(let n=0,o=e.length;n<o;n++)try{t[e[n]]=JSON.parse(localStorage[s+e[n]])}catch{t[e[n]]=void 0}return Promise.resolve(t)}setNodes(e){for(const t in e)localStorage[s+t]=JSON.stringify(e[t]);return Promise.resolve()}forAllNodes(e){let t;for(let n=0,o=localStorage.length;n<o;n++)if(localStorage.key(n).substr(0,26)===s){try{t=this.migrate(JSON.parse(localStorage[localStorage.key(n)]))}catch{t=void 0}t&&e(t)}return Promise.resolve()}static _rs_init(){}static _rs_supported(){return(0,i.localStorageAvailable)()}static _rs_cleanup(){const e=[];for(let t=0,s=localStorage.length;t<s;t++){const n=localStorage.key(t);d(n)&&e.push(n)}e.forEach(e=>{(0,l.default)("[LocalStorage] Removing",e),delete localStorage[e]})}}(0,i.applyMixins)(a,[c.default]),e.exports=a},334:function(e,t,n){"use strict";const s=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(28));e.exports=function(...e){s.default.logging&&console.log(...e)}},684:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteBase=void 0;const o=s(n(93)),i=n(746);class a extends o.default{constructor(e){super(),this.rs=e,this.connected=!1}stopWaitingForToken(){this.connected||this._emit("not-connected")}addQuotes(e){return"string"!=typeof e?e:"*"===e?"*":'"'+e+'"'}stripQuotes(e){return"string"!=typeof e?e:e.replace(/^["']|["']$/g,"")}isForbiddenRequestMethod(e,t){return("PUT"===e||"DELETE"===e)&&(0,i.isFolder)(t)}}t.RemoteBase=a},423:function(e,t,n){"use strict";var r,y=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,o)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),k=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),E=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n,t={};if(e!=null)for(n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&y(t,e,n);return k(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteStorage=void 0;const s=a(n(28)),m=a(n(334)),c=n(746),C=a(n(548)),l=a(n(275)),u=a(n(424)),O=a(n(285)),w=n(93),v=a(n(801)),j=a(n(706)),f=a(n(373)),b=a(n(982)),g=a(n(503)),i=a(n(545)),_=E(n(746)),h=(0,c.getGlobalContext)();let d;function x(e){return 403!==e.statusCode&&401!==e.statusCode||this._emit("error",new g.default),Promise.resolve(e)}function p(e){return"number"==typeof e&&e>=2e3&&e<=36e5}!function(e){e.GOOGLE="googledrive",e.DROPBOX="dropbox"}(r||(r={}));class o{constructor(e){if(this._pending=[],this._cleanups=[],this._pathHandlers={change:{}},this.apiKeys={},this._init=i.default.loadFeatures,this.features=i.default.features,this.loadFeature=i.default.loadFeature,this.featureSupported=i.default.featureSupported,this.featureDone=i.default.featureDone,this.featuresDone=i.default.featuresDone,this.featuresLoaded=i.default.featuresLoaded,this.featureInitialized=i.default.featureInitialized,this.featureFailed=i.default.featureFailed,this.hasFeature=i.default.hasFeature,this._setCachingModule=i.default._setCachingModule,this._collectCleanupFunctions=i.default._collectCleanupFunctions,this._fireReady=i.default._fireReady,this.initFeature=i.default.initFeature,"object"==typeof e&&(0,c.extend)(s.default,e),this.addEvents(["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._setGPD({get:this._pendingGPD("get"),put:this._pendingGPD("put"),delete:this._pendingGPD("delete")}),d=(0,c.localStorageAvailable)(),d){this.apiKeys=(0,c.getJSONFromLocalStorage)("remotestorage:api-keys")||{};const e=localStorage.getItem("remotestorage:backend");"dropbox"===e||"googledrive"===e?this.setBackend(e):this.setBackend("remotestorage")}const 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()}get connected(){return this.remote.connected}loadModules(){s.default.modules.forEach(this.addModule.bind(this))}authorize(e){if(this.access.setStorageType(this.remote.storageApi),void 0===e.scope&&(e.scope=this.access.scopeParameter),h.cordova)e.redirectUri=s.default.cordovaRedirectUri;else{const t=l.default.getLocation();let n=t.origin;"/"!==t.pathname&&(n+=t.pathname),e.redirectUri=n}void 0===e.clientId&&(e.clientId=e.redirectUri.match(/^(https?:\/\/[^/]+)/)[0]),l.default.authorize(this,e)}impliedauth(e,t){e=e||this.remote.storageApi,t=t||String(document.location),(0,m.default)("ImpliedAuth proceeding due to absent authURL; storageApi = "+e+" redirectUri = "+t),this.remote.configure({token:l.default.IMPLIED_FAKE_TOKEN}),document.location.href=t}connect(e,t){if(this.setBackend("remotestorage"),e.indexOf("@")<0&&!e.match(/^(https?:\/\/)?[^\s/$.?#]+\.[^\s]*$/))this._emit("error",new o.DiscoveryError("Not a valid user address or URL."));else{if(e.indexOf("@")<0&&!e.match(/^https?:\/\//)&&(e=`https://${e}`),h.cordova){if("string"!=typeof s.default.cordovaRedirectUri)return void this._emit("error",new o.DiscoveryError("Please supply a custom HTTPS redirect URI for your Cordova app"));if(!h.cordova.InAppBrowser)return void this._emit("error",new o.DiscoveryError("Please include the InAppBrowser Cordova plugin to enable OAuth"))}this.remote.configure({userAddress:e}),this._emit("connecting"),(0,f.default)(e).then(n=>{if(this._emit("authing"),n.userAddress=e,this.remote.configure(n),!this.remote.connected)if(n.authURL)if(void 0===t)this.authorize({authURL:n.authURL});else{if("string"!=typeof t)throw new Error("Supplied bearer token must be a string");(0,m.default)("Skipping authorization sequence and connecting with known token"),this.remote.configure({token:t})}else this.impliedauth()},()=>{this._emit("error",new o.DiscoveryError("No storage information found for this user address."))})}}reconnect(){this.remote.configure({token:null}),"remotestorage"===this.backend?this.connect(this.remote.userAddress):this.remote.connect()}disconnect(){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")});const t=this._cleanups.length;let n=0;const e=()=>{n++,n>=t&&(this._init(),this._emit("disconnected"))};t>0?this._cleanups.forEach(t=>{const n=t(this);"object"==typeof n&&"function"==typeof n.then?n.then(e):e()}):e()}setBackend(e){this.backend=e,d&&(void 0!==e?localStorage.setItem("remotestorage:backend",e):localStorage.removeItem("remotestorage:backend"))}onChange(e,t){this._pathHandlers.change[e]||(this._pathHandlers.change[e]=[]),this._pathHandlers.change[e].push(t)}enableLog(){s.default.logging=!0}disableLog(){s.default.logging=!1}log(...e){m.default.apply(o,e)}setApiKeys(e){const t=[r.GOOGLE,r.DROPBOX];if("object"!=typeof e||!Object.keys(e).every(e=>t.includes(e)))return console.error("setApiKeys() was called with invalid arguments"),!1;Object.keys(e).forEach(t=>{const n=e[t];if(n){switch(t){case r.DROPBOX:this.apiKeys[r.DROPBOX]={appKey:n},void 0!==this.dropbox&&this.dropbox.clientId===n||j.default._rs_init(this);break;case r.GOOGLE:this.apiKeys[r.GOOGLE]={clientId:n},void 0!==this.googledrive&&this.googledrive.clientId===n||v.default._rs_init(this)}return!0}delete this.apiKeys[t]}),d&&localStorage.setItem("remotestorage:api-keys",JSON.stringify(this.apiKeys))}setCordovaRedirectUri(e){if("string"!=typeof e||!e.match(/http(s)?:\/\//))throw new Error("Cordova redirect URI must be a URI string");s.default.cordovaRedirectUri=e}_setGPD(e,t){function n(e){return function(...n){return e.apply(t,n).then(x.bind(this))}}this.get=n(e.get),this.put=n(e.put),this.delete=n(e.delete)}_pendingGPD(e){return(...t)=>{const n=Array.prototype.slice.call(t);return new Promise((t,s)=>{this._pending.push({method:e,args:n,promise:{resolve:t,reject:s}})})}}_processPending(){this._pending.forEach(e=>{try{this[e.method](...e.args).then(e.promise.resolve,e.promise.reject)}catch(t){e.promise.reject(t)}}),this._pending=[]}_bindChange(e){e.on("change",this._dispatchEvent.bind(this,"change"))}_dispatchEvent(e,t){Object.keys(this._pathHandlers[e]).forEach(n=>{const s=n.length;t.path.substr(0,s)===n&&this._pathHandlers[e][n].forEach(e=>{const s={};for(const e in t)s[e]=t[e];s.relativePath=t.path.replace(new RegExp("^"+n),"");try{e(s)}catch(e){console.error("'change' handler failed: ",e,e.stack),this._emit("error",e)}})})}scope(e){if("string"!=typeof e)throw"Argument 'path' of baseClient.scope must be a string";return this.access.checkPathPermission(e,"r")||console.warn("WARNING: Please use remoteStorage.access.claim() to ask for access permissions first: https://remotestoragejs.readthedocs.io/en/latest/js-api/access.html#claim"),new u.default(this,e)}getSyncInterval(){return s.default.syncInterval}setSyncInterval(e){if(!p(e))throw e+" is not a valid sync interval";const t=s.default.syncInterval;s.default.syncInterval=e,this._emit("sync-interval-change",{oldValue:t,newValue:e})}getBackgroundSyncInterval(){return s.default.backgroundSyncInterval}setBackgroundSyncInterval(e){if(!p(e))throw e+" is not a valid sync interval";const t=s.default.backgroundSyncInterval;s.default.backgroundSyncInterval=e,this._emit("sync-interval-change",{oldValue:t,newValue:e})}getCurrentSyncInterval(){return s.default.isBackground?s.default.backgroundSyncInterval:s.default.syncInterval}getRequestTimeout(){return s.default.requestTimeout}setRequestTimeout(e){if("number"!=typeof e)throw e+" is not a valid request timeout";s.default.requestTimeout=e}syncCycle(){this.sync&&!this.sync.stopped&&(this.on("sync-done",()=>{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()))}),this.sync.sync())}startSync(){return s.default.cache?(this.sync.stopped=!1,this.syncStopped=!1,this.sync.sync()):(console.warn("Nothing to sync, because caching is disabled."),Promise.resolve())}stopSync(){clearTimeout(this._syncTimer),this._syncTimer=void 0,this.sync?this.sync.stopped=!0:this.syncStopped=!0}addModule(e){const t=e.name,n=e.builder;if(Object.defineProperty(this,t,{configurable:!0,get:function(){const e=this._loadModule(t,n);return Object.defineProperty(this,t,{value:e}),e}}),-1!==t.indexOf("-")){const e=t.replace(/-[a-z]/g,function(e){return e[1].toUpperCase()});Object.defineProperty(this,e,{get:function(){return this[t]}})}}_loadModule(e,t){if(t)return t(new u.default(this,"/"+e+"/"),new u.default(this,"/public/"+e+"/")).exports;throw"Unknown module: "+e}}t.RemoteStorage=o,o.Authorize=l.default,o.SyncError=b.default,o.Unauthorized=g.default,o.DiscoveryError=f.default.DiscoveryError,o.util=_,Object.defineProperty(o.prototype,"access",{get:function(){const e=new C.default;return Object.defineProperty(this,"access",{value:e}),e},configurable:!0}),Object.defineProperty(o.prototype,"caching",{configurable:!0,get:function(){const e=new O.default;return Object.defineProperty(this,"caching",{value:e}),e}}),(0,c.applyMixins)(o,[w.EventHandling]),t.default=o},368:function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,t,n,s){return new(n||(n=Promise))(function(o,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function c(e){try{a(s.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,c)}a((s=s.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayBufferView=void 0,t.retryAfterMs=function(e){const t=1e3*parseInt(e.getResponseHeader("Retry-After"));return t>=1e3?t:Math.max(1500,Math.min(6e4,Math.round(o.default.syncInterval/(2.9+.2*Math.random()))))},t.requestWithTimeout=function(e,n,i){return s(this,void 0,void 0,function*(){return"function"==typeof fetch?function(e,t,n){return s(this,void 0,void 0,function*(){const s="function"==typeof AbortController?new AbortController:null;let r;const l=new Promise((e,t)=>{r=setTimeout(()=>{s&&s.abort(),t("timeout")},o.default.requestTimeout)});let i;const c={},d=fetch(t,{method:e,headers:n.headers,body:n.body,signal:s?s.signal:void 0}).then(e=>{switch((0,a.default)("[requests fetch]",e),e.headers.forEach((e,t)=>{c[t.toUpperCase()]=e}),i={readyState:4,status:e.status,statusText:e.statusText,response:void 0,getResponseHeader:e=>c[e.toUpperCase()]||null,responseType:n.responseType,responseURL:t},n.responseType){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"json":return e.json();case void 0:case"":case"text":return e.text();default:throw new Error("responseType 'document' is not currently supported using fetch")}}).then(e=>(i.response=e,n.responseType&&"text"!==n.responseType||(i.responseText=e),i)).finally(()=>{clearTimeout(r)});return Promise.race([d,l])})}(e,n,i):"function"==typeof XMLHttpRequest?function(e,n,i){return s(this,void 0,void 0,function*(){return new Promise((s,r)=>{(0,a.default)("[requests XHR]",e,n);let d=!1;const u=setTimeout(()=>{d=!0,r("timeout")},o.default.requestTimeout),c=new XMLHttpRequest;if(c.open(e,n,!0),i.responseType&&(c.responseType=i.responseType),i.headers)for(const e in i.headers)c.setRequestHeader(e,i.headers[e]);c.onload=()=>{d||(clearTimeout(u),s(c))},c.onerror=e=>{d||(clearTimeout(u),r(e))};let l=i.body;"object"==typeof l&&!(0,t.isArrayBufferView)(l)&&l instanceof ArrayBuffer&&(l=new Uint8Array(l)),c.send(l)})})}(e,n,i):Promise.reject("[Requests] You need to add a polyfill for fetch or XMLHttpRequest")})};const a=i(n(334)),o=i(n(28));if("function"==typeof(n.g||window).ArrayBufferView)t.isArrayBufferView=function(e){return e&&e instanceof(n.g||window).ArrayBufferView};else{const e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];t.isArrayBufferView=function(t){for(let n=0;n<8;n++)if(t instanceof e[n])return!0;return!1}}},941:function(e){"use strict";e.exports=class{constructor(e){this._itemsRev={},this._storage={},this._canPropagate=!1,this.defaultValue=e,this.activatePropagation()}get(e){e=e.toLowerCase();let t=this._storage[e];return void 0===t&&(t=this.defaultValue,this._storage[e]=t),t}set(e,t){return e=e.toLowerCase(),this._storage[e]===t||(this._storage[e]=t,t||delete this._itemsRev[e],this._updateParentFolderItemRev(e,t),this._canPropagate&&this._propagate(e)),t}delete(e){return this.set(e,null)}deactivatePropagation(){return this._canPropagate=!1,!0}activatePropagation(){return this._canPropagate||(this._generateFolderRev("/"),this._canPropagate=!0),!0}_hashCode(e){let t=0;if(0===e.length)return t;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}_generateHash(e){const t=e.sort().join("|");return""+this._hashCode(t)}_updateParentFolderItemRev(e,t){if("/"!==e){const n=this._getParentFolder(e);this._itemsRev[n]||(this._itemsRev[n]={});const s=this._itemsRev[n];t?s[e]=t:delete s[e],this._updateParentFolderItemRev(n,this.defaultValue)}}_getParentFolder(e){return e.substr(0,e.lastIndexOf("/",e.length-2)+1)}_propagate(e){if("/"!==e){const t=this._getParentFolder(e),n=this._itemsRev[t],s=[];for(const e in n)s.push(n[e]);const o=this._generateHash(s);this.set(t,o)}}_generateFolderRev(e){const t=this._itemsRev[e];let n=this.defaultValue;if(t){const e=[];for(const n in t){let s;s="/"===n.substr(-1)?this._generateFolderRev(n):t[n],e.push(s)}e.length>0&&(n=this._generateHash(e))}return this.set(e,n),n}}},491:function(e){"use strict";class t extends Error{constructor(e){super();const t=new Error("Schema not found: "+e);return t.name="SchemaNotFound",t}}e.exports=t},982:function(e){"use strict";class t extends Error{constructor(e){super(),this.name="SyncError",this.message="Sync failed: ","string"==typeof e?this.message+=e:(this.message+=e.message,this.stack=e.stack,this.originalError=e)}}e.exports=t},313:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,s){return new(n||(n=Promise))(function(o,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function c(e){try{a(s.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,c)}a((s=s.apply(e,t||[])).next())})},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Sync=void 0;const h=a(n(28)),b=a(n(451)),m=a(n(93)),o=a(n(334)),v=a(n(275)),p=a(n(982)),f=a(n(503)),s=n(746);let d,l;function r(e,t,n){return{action:e,path:t,promise:n}}function g(e,t){return e.common.revision!==t&&(!e.remote||e.remote.revision!==t)}function u(e){return e.common&&e.common.revision}class c{constructor(e){this._finishedTasks=[],this.rs=e,this._tasks={},this._running={},this._timeStarted={},this.numThreads=10,this.rs.local.onDiff(e=>{this.addTask(e),this.doTasks()}),this.rs.caching.onActivate(e=>{this.addTask(e),this.doTasks()}),this.addEvents(["done","req-done"])}now(){return(new Date).getTime()}queueGetRequest(e){return new Promise((t,n)=>{this.rs.remote.connected?this.rs.remote.online?(this.addTask(e,function(){this.rs.local.get(e).then(e=>t(e))}.bind(this)),this.doTasks()):n("cannot fulfill maxAge requirement - remote is not online"):n("cannot fulfill maxAge requirement - remote is not connected")})}corruptServerItemsMap(e,t){if("object"!=typeof e||Array.isArray(e))return!0;for(const n in e){const o=e[n];if("object"!=typeof o)return!0;if("string"!=typeof o.ETag)return!0;if((0,s.isFolder)(n)){if(-1!==n.substring(0,n.length-1).indexOf("/"))return!0}else{if(-1!==n.indexOf("/"))return!0;if(t){if("string"!=typeof o["Content-Type"])return!0;if("number"!=typeof o["Content-Length"])return!0}}}return!1}corruptItemsMap(e){if("object"!=typeof e||Array.isArray(e))return!0;for(const t in e)if("boolean"!=typeof e[t])return!0;return!1}corruptRevision(e){return"object"!=typeof e||Array.isArray(e)||e.revision&&"string"!=typeof e.revision||e.body&&"string"!=typeof e.body&&"object"!=typeof 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(e){return"object"!=typeof 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(){return Object.getOwnPropertyNames(this._tasks).length>0}collectDiffTasks(){return i(this,void 0,void 0,function*(){let e=0;return this.rs.local.forAllNodes(t=>{e>100||(this.isCorrupt(t)?((0,o.default)("[Sync] WARNING: corrupt node in local cache",t),"object"==typeof t&&t.path&&(this.addTask(t.path),e++)):(this.needsFetch(t)&&this.rs.access.checkPathPermission(t.path,"r")||(0,s.isDocument)(t.path)&&this.needsPush(t)&&this.rs.access.checkPathPermission(t.path,"rw"))&&(this.addTask(t.path),e++))}).then(()=>e).catch(e=>{throw e})})}inConflict(e){return e.local&&e.remote&&(void 0!==e.remote.body||e.remote.itemsMap)}needsRefresh(e){return!!e.common&&(!e.common.timestamp||this.now()-e.common.timestamp>h.default.syncInterval)}needsFetch(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(e){return!this.inConflict(e)&&(!!e.local&&!e.push||void 0)}needsRemotePut(e){return e.local&&e.local.body}needsRemoteDelete(e){return e.local&&!1===e.local.body}getParentPath(e){const t=e.match(/^(.*\/)([^/]+\/?)$/);if(t)return t[1];throw new Error('Not a valid path: "'+e+'"')}deleteChildPathsFromTasks(){for(const e in this._tasks){const t=(0,s.pathsFromRoot)(e);for(let 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(){return i(this,void 0,void 0,function*(){return this.rs.local.forAllNodes(e=>{let t;if(this.needsRefresh(e)){try{t=this.getParentPath(e.path)}catch{}t&&this.rs.access.checkPathPermission(t,"r")?this.addTask(t):this.rs.access.checkPathPermission(e.path,"r")&&this.addTask(e.path)}}).then(()=>this.deleteChildPathsFromTasks()).catch(e=>{throw e})})}flush(e){for(const t in e)"FLUSH"===this.rs.caching.checkPath(t)&&e[t]&&!e[t].local&&((0,o.default)("[Sync] Flushing",t),e[t]=void 0);return e}doTask(e){return this.rs.local.getNodes([e]).then(t=>{const n=t[e];return void 0===n||function(e){return e.remote&&e.remote.revision&&!e.remote.itemsMap&&!e.remote.body}(n)?r("get",e,this.rs.remote.get(e)):this.needsRemotePut(n)?(n.push=(0,s.deepClone)(n.local),n.push.timestamp=this.now(),this.rs.local.setNodes(this.flush(t)).then(()=>{let t;return t=u(n)?{ifMatch:n.common.revision}:{ifNoneMatch:"*"},r("put",e,this.rs.remote.put(e,n.push.body,n.push.contentType,t))})):this.needsRemoteDelete(n)?(n.push={body:!1,timestamp:this.now()},this.rs.local.setNodes(this.flush(t)).then(()=>u(n)?r("delete",e,this.rs.remote.delete(e,{ifMatch:n.common.revision})):r("get",e,this.rs.remote.get(e)))):u(n)?r("get",e,this.rs.remote.get(e,{ifNoneMatch:n.common.revision})):r("get",e,this.rs.remote.get(e))})}autoMergeFolder(e){if(e.remote.itemsMap&&(e.common=e.remote,delete e.remote,e.common.itemsMap)){for(const t in e.common.itemsMap)e.local.itemsMap[t]||(e.local.itemsMap[t]=!1);(0,s.equal)(e.local.itemsMap,e.common.itemsMap)&&delete e.local}return e}autoMergeDocument(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&&((0,o.default)("[Sync] Emitting keep/revert"),this.rs.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(e){if(e.remote){if(e.local)return(0,s.isFolder)(e.path)?this.autoMergeFolder(e):this.autoMergeDocument(e);if((0,s.isFolder)(e.path))void 0!==e.remote.itemsMap&&(e.common=e.remote,delete e.remote);else if(void 0!==e.remote.body){const 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.rs.local._emitChange(t),!e.remote.body)return;e.common=e.remote,delete e.remote}return e}e.common.body&&this.rs.local._emitChange({origin:"remote",path:e.path,oldValue:e.common.body,newValue:void 0,oldContentType:e.common.contentType,newContentType:void 0})}updateCommonTimestamp(e,t){return i(this,void 0,void 0,function*(){return this.rs.local.getNodes([e]).then(n=>(n[e]&&n[e].common&&n[e].common.revision===t&&(n[e].common.timestamp=this.now()),this.rs.local.setNodes(this.flush(n))))})}markChildren(e,t,n,o){return i(this,void 0,void 0,function*(){const a=[],i={},r={};for(const n in t)a.push(e+n),i[e+n]=t[n];for(const t in o)a.push(e+t);return this.rs.local.getNodes(a).then(t=>{let c,a;for(const l in t)if(a=t[l],i[l])a&&a.common?g(a,i[l].ETag)&&(n[l]=(0,s.deepClone)(a),n[l].remote={revision:i[l].ETag,timestamp:this.now()},n[l]=this.autoMerge(n[l])):(c=this.rs.caching.checkPath(l),"ALL"===c&&(n[l]={path:l,common:{timestamp:this.now()},remote:{revision:i[l].ETag,timestamp:this.now()}})),n[l]&&i[l]["Content-Type"]&&(n[l].remote.contentType=i[l]["Content-Type"]),n[l]&&i[l]["Content-Length"]&&(n[l].remote.contentLength=i[l]["Content-Length"]);else if(o[l.substring(e.length)]&&a&&a.common){if(a.common.itemsMap)for(const e in a.common.itemsMap)r[l+e]=!0;if(a.local&&a.local.itemsMap)for(const e in a.local.itemsMap)r[l+e]=!0;if(a.remote||(0,s.isFolder)(l))n[l]=void 0;else if(n[l]=this.autoMerge(a),void 0===n[l]){const o=this.getParentPath(l),t=n[o],i=l.substring(e.length);t&&t.local&&(delete t.local.itemsMap[i],(0,s.equal)(t.local.itemsMap,t.common.itemsMap)&&delete t.local)}}return this.deleteRemoteTrees(Object.keys(r),n).then(e=>this.rs.local.setNodes(this.flush(e)))})})}deleteRemoteTrees(e,t){return i(this,void 0,void 0,function*(){return 0===e.length?Promise.resolve(t):this.rs.local.getNodes(e).then(e=>i(this,void 0,void 0,function*(){const n={};function o(e,t){if(e&&e.itemsMap)for(const s in e.itemsMap)n[t+s]=!0}for(const n in e){const i=e[n];i&&((0,s.isFolder)(n)?(o(i.common,n),o(i.local,n)):i.common&&void 0!==typeof i.common.body&&(t[n]=(0,s.deepClone)(i),t[n].remote={body:!1,timestamp:this.now()},t[n]=this.autoMerge(t[n])))}return this.deleteRemoteTrees(Object.keys(n),t).then(e=>this.rs.local.setNodes(this.flush(e)))}))})}completeFetch(e,t,n,o){return i(this,void 0,void 0,function*(){let a,i;const r=(0,s.pathsFromRoot)(e);return(0,s.isFolder)(e)?a=[e]:(i=r[1],a=[e,i]),this.rs.local.getNodes(a).then(a=>{let l,c,r=a[e];const d={};function u(e){if(e&&e.itemsMap)for(l in e.itemsMap)t[l]||(d[l]=!0)}if("object"==typeof r&&r.path===e&&"object"==typeof r.common||(r={path:e,common:{}},a[e]=r),r.remote={revision:o,timestamp:this.now()},(0,s.isFolder)(e))for(l in u(r.common),u(r.remote),r.remote.itemsMap={},t)r.remote.itemsMap[l]=!0;else r.remote.body=t,r.remote.contentType=n,c=a[i],c&&c.local&&c.local.itemsMap&&(l=e.substring(i.length),c.local.itemsMap[l]=!0,(0,s.equal)(c.local.itemsMap,c.common.itemsMap)&&delete c.local);return a[e]=this.autoMerge(r),{toBeSaved:a,missingChildren:d}})})}completePush(e,t,n,a){return i(this,void 0,void 0,function*(){return this.rs.local.getNodes([e]).then(i=>{const r=i[e];if(!r.push)throw this.stopped=!0,new Error("completePush called but no push version!");return n?((0,o.default)("[Sync] We have a conflict"),r.remote&&r.remote.revision===a||(r.remote={revision:a||"conflict",timestamp:this.now()},delete r.push),i[e]=this.autoMerge(r)):(r.common={revision:a,timestamp:this.now()},"put"===t?(r.common.body=r.push.body,r.common.contentType=r.push.contentType,(0,s.equal)(r.local.body,r.push.body)&&r.local.contentType===r.push.contentType&&delete r.local,delete r.push):"delete"===t&&(!1===r.local.body?i[e]=void 0:delete r.push)),this.rs.local.setNodes(this.flush(i))})})}dealWithFailure(e){return i(this,void 0,void 0,function*(){return this.rs.local.getNodes([e]).then(t=>{if(t[e])return delete t[e].push,this.rs.local.setNodes(this.flush(t))})})}interpretStatus(e){const t={statusCode:e,successful:void 0,conflict:void 0,unAuth:void 0,notFound:void 0,changed:void 0,networkProblems:void 0};if("string"==typeof e&&("offline"===e||"timeout"===e))return t.successful=!1,t.networkProblems=!0,t;if("number"==typeof e){const n=Math.floor(e/100);return t.successful=2===n||304===e||412===e||404===e,t.conflict=412===e,t.unAuth=401===e&&this.rs.remote.token!==v.default.IMPLIED_FAKE_TOKEN||402===e||403===e,t.notFound=404===e,t.changed=304!==e,t}}handleGetResponse(e,t,n,a,r){return i(this,void 0,void 0,function*(){return t.notFound&&(n=!!(0,s.isFolder)(e)&&{}),t.changed?this.completeFetch(e,n,a,r).then(t=>(0,s.isFolder)(e)?this.corruptServerItemsMap(n)?((0,o.default)("[Sync] WARNING: Discarding corrupt folder description from server for "+e),!1):this.markChildren(e,n,t.toBeSaved,t.missingChildren).then(()=>!0):this.rs.local.setNodes(this.flush(t.toBeSaved)).then(()=>!0)):this.updateCommonTimestamp(e,r).then(()=>!0)})}handleResponse(e,t,n){const s=this.interpretStatus(n.statusCode);if(s.successful){if("get"===t)return this.handleGetResponse(e,s,n.body,n.contentType,n.revision);if("put"===t||"delete"===t)return this.completePush(e,t,s.conflict,n.revision).then(function(){return!0});throw new Error(`cannot handle response for unknown action ${t}`)}{let t;return t=s.unAuth?new f.default:s.networkProblems?new p.default("Network request failed."):new Error("HTTP response code "+s.statusCode+" received."),this.dealWithFailure(e).then(()=>{throw this.rs._emit("error",t),t})}}finishTask(e,t=!0){if(void 0!==e.action){if(!t||!((0,o.default)("[Sync] queue finished task:",e.path),this._finishedTasks.push(e),this._finishedTasks.length>1))return(0,o.default)("[Sync] run task:",e.path),e.promise.then(t=>this.handleResponse(e.path,e.action,t),t=>((0,o.default)("[Sync] wireclient rejects its promise!",e.path,e.action,t),this.handleResponse(e.path,e.action,{statusCode:"offline"}))).then(t=>i(this,void 0,void 0,function*(){if(this._finishedTasks.shift(),delete this._timeStarted[e.path],delete this._running[e.path],t&&this._tasks[e.path]){for(let t=0;t<this._tasks[e.path].length;t++)this._tasks[e.path][t]();delete this._tasks[e.path]}this.rs._emit("sync-req-done",{tasksRemaining:Object.keys(this._tasks).length}),this._finishedTasks.length>0?this.finishTask(this._finishedTasks[0],!1):yield this.collectTasks(!1).then(()=>{!this.hasTasks()||this.stopped?((0,o.default)("[Sync] Sync is done! Reschedule?",Object.getOwnPropertyNames(this._tasks).length,this.stopped),this.done||(this.done=!0,this.rs._emit("sync-done",{completed:!0}))):setTimeout(()=>{this.doTasks()},10)})}),t=>{(0,o.default)("[Sync] Error",t),this._finishedTasks.shift(),delete this._timeStarted[e.path],delete this._running[e.path],this.rs._emit("sync-req-done",{tasksRemaining:Object.keys(this._tasks).length}),this._finishedTasks.length>0?this.finishTask(this._finishedTasks[0],!1):this.done||(this.done=!0,this.rs._emit("sync-done",{completed:!1}))});(0,o.default)("[Sync] delaying finished task:",e.path)}else delete this._running[e.path]}doTasks(){let s,e,t=0;s=this.rs.remote.connected?this.rs.remote.online?this.numThreads:1:0;const n=s-Object.getOwnPropertyNames(this._running).length;if(n<=0)return!0;for(e in this._tasks)if(!this._running[e]&&(this._timeStarted[e]=this.now(),this._running[e]=this.doTask(e),this._running[e].then(this.finishTask.bind(this)),t++,t>=n))return!0;return t>=n}collectTasks(e){return i(this,void 0,void 0,function*(){return this.hasTasks()||this.stopped?Promise.resolve():this.collectDiffTasks().then(t=>t||!1===e?Promise.resolve():this.collectRefreshTasks(),function(e){throw e})})}addTask(e,t){this._tasks[e]||(this._tasks[e]=[]),"function"==typeof t&&this._tasks[e].push(t)}sync(){return this.done=!1,this.doTasks()?Promise.resolve():this.collectTasks().then(()=>{try{this.doTasks()}catch(e){(0,o.default)("[Sync] doTasks error",e)}},function(e){throw(0,o.default)("[Sync] Sync error",e),new Error("Local cache unavailable")})}static _rs_init(e){d=function(){(0,o.default)("[Sync] syncCycleCb calling syncCycle");const t=new b.default;t.isBrowser()&&function(e,t){function n(e){const n=t.getCurrentSyncInterval();h.default.isBackground=!e;const s=t.getCurrentSyncInterval();t._emit("sync-interval-change",{oldValue:n,newValue:s})}e.on("background",()=>n(!1)),e.on("foreground",()=>n(!0))}(t,e),e.sync||(e.sync=new c(e),e.syncStopped&&((0,o.default)("[Sync] Instantiating sync stopped"),e.sync.stopped=!0,delete e.syncStopped)),(0,o.default)("[Sync] syncCycleCb calling syncCycle"),e.syncCycle()},l=function(){e.removeEventListener("connected",l),e.startSync()},e.on("ready",d),e.on("connected",l)}static _rs_cleanup(e){e.stopSync(),e.removeEventListener("ready",d),e.removeEventListener("connected",l),e.sync=void 0,delete e.sync}}t.Sync=c,(0,s.applyMixins)(c,[m.default]),t.default=c},370:function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,s){return new(n||(n=Promise))(function(o,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function c(e){try{a(s.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,c)}a((s=s.apply(e,t||[])).next())})};const i=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(334));function a(e){return"dropbox"===this.backend&&!!e.match(/^\/public\/.*[^/]$/)}const s={get:function(e,t){if(this.local){if(void 0===t)t="object"==typeof(n=this).remote&&n.remote.connected&&n.remote.online?2*n.getSyncInterval():((0,i.default)("Not setting default maxAge, because remote is offline or not connected"),!1);else if("number"!=typeof t&&!1!==t)return Promise.reject("Argument 'maxAge' must be 'false' or a number");return this.local.get(e,t,this.sync.queueGetRequest.bind(this.sync))}return this.remote.get(e);var n},put:function(e,t,n){return a.bind(this)(e)?s._wrapBusyDone.call(this,this.remote.put(e,t,n)):this.local?this.local.put(e,t,n):s._wrapBusyDone.call(this,this.remote.put(e,t,n))},delete:function(e){return this.local?this.local.delete(e):s._wrapBusyDone.call(this,this.remote.delete(e))},_wrapBusyDone:function(e){return o(this,void 0,void 0,function*(){return this._emit("wire-busy"),e.then(e=>(this._emit("wire-done",{success:!0}),Promise.resolve(e)),e=>(this._emit("wire-done",{success:!1}),Promise.reject(e)))})}};e.exports=s},613:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseClientTypes=void 0;class n{constructor(){this.uris={},this.schemas={},this.aliases={}}declare(e,t,n,s){const o=e+"/"+t;if(s.extends){const t=s.extends.split("/"),n=1===t.length?e+"/"+t.shift():t.join("/"),i=this.uris[n];if(!i)throw"Type '"+o+"' tries to extend unknown schema '"+n+"'";s.extends=this.schemas[i]}this.uris[o]=n,this.aliases[n]=o,this.schemas[n]=s}resolveAlias(e){return this.uris[e]}getSchema(e){return this.schemas[e]}inScope(e){const n=e.length,t={};for(const s in this.uris)if(s.substr(0,n+1)===e+"/"){const e=this.uris[s];t[e]=this.schemas[e]}return t}}t.BaseClientTypes=n;const s=new n;t.default=s},503:function(e){"use strict";class t extends Error{constructor(e,t={}){super(),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}}e.exports=t},746:function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,s){return new(n||(n=Promise))(function(o,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function c(e){try{a(s.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,c)}a((s=s.apply(e,t||[])).next())})};function s(e,t){if("object"==typeof e&&!Array.isArray(e)&&null!==e)for(const n in e)if("object"==typeof e[n]&&null!==e[n])if("[object ArrayBuffer]"===e[n].toString()){t[n]=new ArrayBuffer(e[n].byteLength);const s=new Int8Array(e[n]);new Int8Array(t[n]).set(s)}else s(e[n],t[n])}Object.defineProperty(t,"__esModule",{value:!0}),t.toBase64=t.getTextFromArrayBuffer=t.shouldBeTreatedAsBinary=t.getJSONFromLocalStorage=t.localStorageAvailable=t.pathsFromRoot=t.deepClone=t.equal=t.bindAll=t.cleanPath=t.baseName=t.isDocument=t.isFolder=t.containingFolder=t.extend=t.getGlobalContext=t.globalContext=t.logError=void 0,t.generateCodeVerifier=function(){return o(this,arguments,void 0,function*(e=128){const t=new Uint8Array(e);crypto.getRandomValues(t);const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=Array.from(t).map(e=>n[e%66]),i=s.join(""),a=Uint8Array.from(s.map(e=>e.charCodeAt(0))),r=(o=yield crypto.subtle.digest("SHA-256",a),btoa(String.fromCharCode.apply(null,new Uint8Array(o))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""));var o;return crypto.getRandomValues(t),{codeVerifier:i,codeChallenge:r,state:Array.from(t).map(e=>n[e%66]).join("")}})},t.applyMixins=function(e,t){t.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(n=>{Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})})},t.logError=e=>{"string"==typeof e?console.error(e):console.error(e.message,e.stack)},t.globalContext="undefined"!=typeof window?window:"object"==typeof self?self:n.g,t.getGlobalContext=()=>"undefined"!=typeof window?window:"object"==typeof self?self:n.g,t.extend=(...e)=>{const t=e[0];return Array.prototype.slice.call(e,1).forEach(function(e){for(const n in e)t[n]=e[n]}),t},t.containingFolder=e=>{if(""===e)return"/";if(!e)throw"Path not given!";return e.replace(/\/+/g,"/").replace(/[^/]+\/?$/,"")},t.isFolder=e=>"/"===e.slice(-1),t.isDocument=e=>!(0,t.isFolder)(e),t.baseName=e=>{const n=e.split("/");return(0,t.isFolder)(e)?n[n.length-2]+"/":n[n.length-1]},t.cleanPath=e=>e.replace(/\/+/g,"/").split("/").map(encodeURIComponent).join("/").replace(/'/g,"%27"),t.bindAll=e=>{for(const t in this)"function"==typeof e[t]&&(e[t]=e[t].bind(e))},t.equal=(e,n,s=[])=>{let o;if(typeof e!=typeof n)return!1;if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return e===n;if("function"==typeof e)return e.toString()===n.toString();if(e instanceof ArrayBuffer&&n instanceof ArrayBuffer&&(e=new Uint8Array(e),n=new Uint8Array(n)),e instanceof Array){{if(e.length!==n.length)return!1;for(let o=0,i=e.length;o<i;o++)if(!(0,t.equal)(e[o],n[o],s))return!1}}else{for(o in e)if(e.hasOwnProperty(o)&&!(o in n))return!1;for(o in n){if(!n.hasOwnProperty(o))continue;if(!(o in e))return!1;let i;if("object"==typeof n[o]){if(s.indexOf(n[o])>=0)continue;i=s.slice(),i.push(n[o])}if(!(0,t.equal)(e[o],n[o],i))return!1}}return!0},t.deepClone=e=>{if(void 0!==e){const t=JSON.parse(JSON.stringify(e));return s(e,t),t}},t.pathsFromRoot=e=>{const n=[e],t=e.replace(/\/$/,"").split("/");for(;t.length>1;)t.pop(),n.push(t.join("/")+"/");return n},t.localStorageAvailable=()=>{const e=(0,t.getGlobalContext)();if(!("localStorage"in e))return!1;try{return e.localStorage.setItem("rs-check","1"),e.localStorage.removeItem("rs-check"),!0}catch{return!1}},t.getJSONFromLocalStorage=e=>{const n=(0,t.getGlobalContext)();try{return JSON.parse(n.localStorage.getItem(e))}catch{}},t.shouldBeTreatedAsBinary=(e,t)=>!!(t&&t.match(/charset=binary/)||/[\x00-\x08\x0E-\x1F\uFFFD]/.test(e)),t.getTextFromArrayBuffer=(e,n)=>new Promise(s=>{if("undefined"==typeof Blob||"undefined"==typeof FileReader){const t=Buffer.from(e);s(t.toString(n))}else{let a;const o=t.globalContext;if(o.BlobBuilder=o.BlobBuilder||o.WebKitBlobBuilder,void 0!==o.BlobBuilder){const t=new o.BlobBuilder;t.append(e),a=t.getBlob()}else a=new Blob([e]);const i=new FileReader;"function"==typeof i.addEventListener?i.addEventListener("loadend",function(e){s(e.target.result)}):i.onloadend=function(e){s(e.target.result)},i.readAsText(a,n)}}),t.toBase64=e=>{const n=(0,t.getGlobalContext)();return"btoa"in n?n.btoa(e):Buffer.from(e).toString("base64")}},600:function(e,t,n){"use strict";var f=this&&this.__awaiter||function(e,t,n,s){return new(n||(n=Promise))(function(o,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function c(e){try{a(s.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,c)}a((s=s.apply(e,t||[])).next())})},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const d=a(n(275)),u=a(n(93)),h=a(n(503)),i=a(n(334)),s=n(746),l=n(368),m=n(684);let o;const r="remotestorage:wireclient",p={"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};class c extends m.RemoteBase{constructor(e){if(super(e),this._revisionCache={},o=(0,s.localStorageAvailable)(),this.addEvents(["connected","not-connected"]),o){const e=function(){const e=(0,s.getJSONFromLocalStorage)(r)||{},{userAddress:t,href:n,storageApi:o,token:i,properties:a}=e;return{userAddress:t,href:n,storageApi:o,token:i,properties:a}}();e&&setTimeout(()=>{this.configure(e)},0)}this.connected&&setTimeout(this._emit.bind(this),0,"connected")}get storageType(){if(this.storageApi){const e=this.storageApi.match(/draft-dejong-(remotestorage-\d\d)/);return e?e[1]:"2012.04"}}_request(e,t,n,o,a,r,c){return f(this,void 0,void 0,function*(){if(this.isForbiddenRequestMethod(e,t))return Promise.reject(`Don't use ${e} on directories!`);let u;return n!==d.default.IMPLIED_FAKE_TOKEN&&(o.Authorization="Bearer "+n),this.rs._emit("wire-busy",{method:e,isFolder:(0,s.isFolder)(t)}),(0,l.requestWithTimeout)(e,t,{body:a,headers:o,responseType:"arraybuffer"}).then(n=>{if(this.online||(this.online=!0,this.rs._emit("network-online")),this.rs._emit("wire-done",{method:e,isFolder:(0,s.isFolder)(t),success:!0}),o=n.status,[401,403,404,412].indexOf(o)>=0)return(0,i.default)("[WireClient] Error response status",n.status),u=r?this.stripQuotes(n.getResponseHeader("ETag")):void 0,401===n.status&&this.rs._emit("error",new h.default),Promise.resolve({statusCode:n.status,revision:u});if(function(e){return[201,204,304].indexOf(e)>=0}(n.status)||200===n.status&&"GET"!==e)return u=this.stripQuotes(n.getResponseHeader("ETag")),(0,i.default)("[WireClient] Successful request",u),Promise.resolve({statusCode:n.status,revision:u});{const e=n.getResponseHeader("Content-Type");u=r?this.stripQuotes(n.getResponseHeader("ETag")):200===n.status?c:void 0;const t=function(e){let t,n="utf-8";return e&&(t=e.match(/charset=(.+)$/),t&&(n=t[1])),n}(e);return(0,s.shouldBeTreatedAsBinary)(n.response,e)?((0,i.default)("[WireClient] Successful request with unknown or binary mime-type",u),Promise.resolve({statusCode:n.status,body:n.response,contentType:e,revision:u})):(0,s.getTextFromArrayBuffer)(n.response,t).then(t=>((0,i.default)("[WireClient] Successful request",u),Promise.resolve({statusCode:n.status,body:t,contentType:e,revision:u})))}var o},n=>(this.online&&(this.online=!1,this.rs._emit("network-offline")),this.rs._emit("wire-done",{method:e,isFolder:(0,s.isFolder)(t),success:!1}),Promise.reject(n)))})}configure(e){if("object"!=typeof e)throw new Error("WireClient configure settings parameter should be an object");if(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),"string"==typeof this.storageApi){const e=p[this.storageApi]||5;this.supportsRevs=e>=2}this.href&&this.token?(this.connected=!0,this.online=!0,this._emit("connected")):this.connected=!1,o&&(localStorage[r]=JSON.stringify({userAddress:this.userAddress,href:this.href,storageApi:this.storageApi,token:this.token,properties:this.properties}))}get(e,t={}){if(!this.connected)return Promise.reject("not connected (path: "+e+")");const n={};return this.supportsRevs&&t.ifNoneMatch&&(n["If-None-Match"]=this.addQuotes(t.ifNoneMatch)),this._request("GET",this.href+(0,s.cleanPath)(e),this.token,n,void 0,this.supportsRevs,this._revisionCache[e]).then(t=>{if(!(0,s.isFolder)(e))return Promise.resolve(t);let n={};if(void 0!==t.body)try{t.body=JSON.parse(t.body)}catch{return Promise.reject("Folder description at "+this.href+(0,s.cleanPath)(e)+" is not JSON")}if(200===t.statusCode&&"object"==typeof t.body){if(0===Object.keys(t.body).length)t.statusCode=404;else if("http://remotestorage.io/spec/folder-description"===(o=t.body)["@context"]&&"object"==typeof o.items){for(const n in t.body.items)this._revisionCache[e+n]=t.body.items[n].ETag;n=t.body.items}else Object.keys(t.body).forEach(s=>{this._revisionCache[e+s]=t.body[s],n[s]={ETag:t.body[s]}});return t.body=n,Promise.resolve(t)}return Promise.resolve(t);var o})}put(e,t,n,o={}){if(!this.connected)return Promise.reject("not connected (path: "+e+")");!n.match(/charset=/)&&(t instanceof ArrayBuffer||(0,l.isArrayBufferView)(t))&&(n+="; charset=binary");const i={"Content-Type":n};return this.supportsRevs&&(o.ifMatch&&(i["If-Match"]=this.addQuotes(o.ifMatch)),o.ifNoneMatch&&(i["If-None-Match"]=this.addQuotes(o.ifNoneMatch))),this._request("PUT",this.href+(0,s.cleanPath)(e),this.token,i,t,this.supportsRevs)}delete(e,t={}){if(!this.connected)throw new Error("not connected (path: "+e+")");t||(t={});const n={};return this.supportsRevs&&t.ifMatch&&(n["If-Match"]=this.addQuotes(t.ifMatch)),this._request("DELETE",this.href+(0,s.cleanPath)(e),this.token,n,void 0,this.supportsRevs)}static _rs_init(e){e.remote=new c(e),e.remote.online=!0}static _rs_supported(){return"function"==typeof fetch||"function"==typeof XMLHttpRequest}static _rs_cleanup(){o&&delete localStorage[r]}}(0,s.applyMixins)(c,[u.default]),e.exports=c},439:function(e,t){var n,s=function(){Object.keys||(Object.keys=(p=Object.prototype.hasOwnProperty,_=!{toString:null}.propertyIsEnumerable("toString"),y=(m=["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,s,n=[];for(s in e)p.call(e,s)&&n.push(s);if(_)for(t=0;t<y;t++)p.call(e,m[t])&&n.push(m[t]);return n})),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,n,o=Object(this),s=o.length>>>0;if(0===s)return-1;if(t=0,arguments.length>1&&((t=Number(arguments[1]))!=t?t=0:0!==t&&t!==1/0&&t!==-1/0&&(t=(t>0||-1)*Math.floor(Math.abs(t)))),t>=s)return-1;for(n=t>=0?t:Math.max(s-Math.abs(t),0);n<s;n++)if(n in o&&o[n]===e)return n;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{return!0}});var e,t,n,o,i,a,m,f,p,v,j,y,_,O={"+":!0,"#":!0,".":!0,"/":!0,";":!0,"?":!0,"&":!0},w={"*":!0};function r(e){return encodeURI(e).replace(/%25[0-9][0-9]/g,function(e){return"%"+e.substring(3)})}function x(e){n="",O[e.charAt(0)]&&(n=e.charAt(0),e=e.substring(1));var t,n,d,u,h,m,f,s="",o="",a=!0,i=!1,v=!1;"+"===n?a=!1:"."===n?(o=".",s="."):"/"===n?(o="/",s="/"):"#"===n?(o="#",a=!1):";"===n?(o=";",s=";",i=!0,v=!0):"?"===n?(o="?",s="&",i=!0):"&"===n&&(o="&",s="&",i=!0);for(var g=[],p=e.split(","),c=[],b={},l=0;l<p.length;l++){t=p[l],d=null,-1!==t.indexOf(":")&&(u=t.split(":"),t=u[0],d=parseInt(u[1],10));for(h={};w[t.charAt(t.length-1)];)h[t.charAt(t.length-1)]=!0,t=t.substring(0,t.length-1);m={truncate:d,name:t,suffices:h},c.push(m),b[t]=m,g.push(t)}return f=function(e){for(var t,l,d,h,m,n="",f=0,u=0;u<c.length;u++)if(l=c[u],t=e(l.name),t==null||Array.isArray(t)&&0===t.length||"object"==typeof t&&0===Object.keys(t).length)f++;else if(n+=u===f?o:s||",",Array.isArray(t)){i&&(n+=l.name+"=");for(d=0;d<t.length;d++)d>0&&(n+=l.suffices["*"]&&s||",",l.suffices["*"]&&i&&(n+=l.name+"=")),n+=a?encodeURIComponent(t[d]).replace(/!/g,"%21"):r(t[d])}else if("object"==typeof t){i&&!l.suffices["*"]&&(n+=l.name+"="),m=!0;for(h in t)m||(n+=l.suffices["*"]&&s||","),m=!1,n+=a?encodeURIComponent(h).replace(/!/g,"%21"):r(h),n+=l.suffices["*"]?"=":",",n+=a?encodeURIComponent(t[h]).replace(/!/g,"%21"):r(t[h])}else i&&(n+=l.name,v&&""===t||(n+="=")),null!=l.truncate&&(t=t.substring(0,l.truncate)),n+=a?encodeURIComponent(t).replace(/!/g,"%21"):r(t);return n},f.varNames=g,{prefix:o,substitution:f}}function l(e){if(!(this instanceof l))return new l(e);for(var t=e.split("{"),n=[t.shift()],c=[],s=[],o=[];t.length>0;){var a=t.shift(),r=a.split("}")[0],d=a.substring(r.length+1),i=x(r);s.push(i.substitution),c.push(i.prefix),n.push(d),o=o.concat(i.substitution.varNames)}this.fill=function(e){for(var o=n[0],t=0;t<s.length;t++)o+=(0,s[t])(e),o+=n[t+1];return o},this.varNames=o,this.template=e}l.prototype={toString:function(){return this.template},fillFromObject:function(e){return this.fill(function(t){return e[t]})}},e=function(e,t,n,s,o){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,s&&(this.checkRecursive=!0,this.scanned=[],this.scannedFrozen=[],this.scannedFrozenSchemas=[],this.scannedFrozenValidationErrors=[],this.validatedSchemasKey="tv4_validation_id",this.validationErrorsKey="tv4_validation_errors_id"),o&&(this.trackUnknownProperties=!0,this.knownPropertyPaths={},this.unknownPropertyPaths={}),this.errorReporter=n||h("en"),"string"==typeof this.errorReporter)throw new Error("debug");if(this.definedKeywords={},e)for(var i in e.definedKeywords)this.definedKeywords[i]=e.definedKeywords[i].slice(0)};function c(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,s=0;s<e.length;s++)if(!c(e[s],t[s]))return!1}}else{for(n in e)if(void 0===t[n]&&void 0!==e[n])return!1;for(n in t)if(void 0===e[n]&&void 0!==t[n])return!1;for(n in e)if(!c(e[n],t[n]))return!1}return!0}return!1}e.prototype.defineKeyword=function(e,t){this.definedKeywords[e]=this.definedKeywords[e]||[],this.definedKeywords[e].push(t)},e.prototype.createError=function(e,t,n,o,i,a,r){var c=new s(e,t,n,o,i);return c.message=this.errorReporter(c,a,r),c},e.prototype.returnError=function(e){return e},e.prototype.collectError=function(e){return e&&this.errors.push(e),null},e.prototype.prefixErrors=function(e,t,n){for(var s=e;s<this.errors.length;s++)this.errors[s]=this.errors[s].prefixWith(t,n);return this},e.prototype.banUnknownProperties=function(e,n){for(s in this.unknownPropertyPaths){var s,i=this.createError(t.UNKNOWN_PROPERTY,{path:s},s,"",null,e,n),o=this.handleError(i);if(o)return o}return null},e.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},e.prototype.resolveRefs=function(e,n){if(void 0!==e.$ref){if((n=n||{})[e.$ref])return this.createError(t.CIRCULAR_REFERENCE,{urls:Object.keys(n).join(", ")},"","",null,void 0,e);n[e.$ref]=!0,e=this.getSchema(e.$ref,n)}return e},e.prototype.getSchema=function(e,t){if(void 0!==this.schemas[e])return n=this.schemas[e],this.resolveRefs(n,t);var n,o,i,a,r,s=e,c="";if(-1!==e.indexOf("#")&&(c=e.substring(e.indexOf("#")+1),s=e.substring(0,e.indexOf("#"))),"object"==typeof this.schemas[s]){if(n=this.schemas[s],o=decodeURIComponent(c),""===o)return this.resolveRefs(n,t);if("/"!==o.charAt(0))return;for(a=o.split("/").slice(1),i=0;i<a.length;i++){if(r=a[i].replace(/~1/g,"/").replace(/~0/g,"~"),void 0===n[r]){n=void 0;break}n=n[r]}if(void 0!==n)return this.resolveRefs(n,t)}void 0===this.missing[s]&&(this.missing.push(s),this.missing[s]=s,this.missingMap[s]=s)},e.prototype.searchSchemas=function(e,t){if(Array.isArray(e))for(var n,s,o=0;o<e.length;o++)this.searchSchemas(e[o],t);else if(e&&"object"==typeof e)for(s 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)"enum"!==s&&("object"==typeof e[s]?this.searchSchemas(e[s],t):"$ref"===s&&(n=d(e[s]),n&&void 0===this.schemas[n]&&void 0===this.missingMap[n]&&(this.missingMap[n]=n)))},e.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===d(e)+"#"&&(e=d(e)),this.schemas[e]=t,delete this.missingMap[e],u(t,e),this.searchSchemas(t,e)},e.prototype.getSchemaMap=function(){var t,e={};for(t in this.schemas)e[t]=this.schemas[t];return e},e.prototype.getSchemaUris=function(e){var n,t=[];for(n in this.schemas)e&&!e.test(n)||t.push(n);return t},e.prototype.getMissingUris=function(e){var n,t=[];for(n in this.missingMap)e&&!e.test(n)||t.push(n);return t},e.prototype.dropSchemas=function(){this.schemas={},this.reset()},e.prototype.reset=function(){this.missing=[],this.missingMap={},this.errors=[]},e.prototype.validateAll=function(e,t,n,o,i){if(!(t=this.resolveRefs(t)))return null;if(t instanceof s)return this.errors.push(t),t;var a,r,d,u,h,m,f,p,g=this.errors.length,c=null,l=null;if(this.checkRecursive&&e&&"object"==typeof e){if(p=!this.scanned.length,e[this.validatedSchemasKey]&&(d=e[this.validatedSchemasKey].indexOf(t),-1!==d))return this.errors=this.errors.concat(e[this.validationErrorsKey][d]),null;if(Object.isFrozen(e)&&-1!==(a=this.scannedFrozen.indexOf(e))&&(u=this.scannedFrozenSchemas[a].indexOf(t),-1!==u))return this.errors=this.errors.concat(this.scannedFrozenValidationErrors[a][u]),null;if(this.scanned.push(e),Object.isFrozen(e))-1===a&&(a=this.scannedFrozen.length,this.scannedFrozen.push(e),this.scannedFrozenSchemas.push([])),c=this.scannedFrozenSchemas[a].length,this.scannedFrozenSchemas[a][c]=t,this.scannedFrozenValidationErrors[a][c]=[];else{if(!e[this.validatedSchemasKey])try{Object.defineProperty(e,this.validatedSchemasKey,{value:[],configurable:!0}),Object.defineProperty(e,this.validationErrorsKey,{value:[],configurable:!0})}catch{e[this.validatedSchemasKey]=[],e[this.validationErrorsKey]=[]}l=e[this.validatedSchemasKey].length,e[this.validatedSchemasKey][l]=t,e[this.validationErrorsKey][l]=[]}}if(h=this.errors.length,r=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,p){for(;this.scanned.length;)delete this.scanned.pop()[this.validatedSchemasKey];this.scannedFrozen=[],this.scannedFrozenSchemas=[]}if(r||h!==this.errors.length)for(;n&&n.length||o&&o.length;)m=n&&n.length?""+n.pop():null,f=o&&o.length?""+o.pop():null,r&&(r=r.prefixWith(m,f)),this.prefixErrors(h,m,f);return null!==c?this.scannedFrozenValidationErrors[a][c]=this.errors.slice(g):null!==l&&(e[this.validationErrorsKey][l]=this.errors.slice(g)),this.handleError(r)},e.prototype.validateFormat=function(e,n){if("string"!=typeof n.format||!this.formatValidators[n.format])return null;var s=this.formatValidators[n.format].call(null,e,n);return"string"==typeof s||"number"==typeof s?this.createError(t.FORMAT_CUSTOM,{message:s},"","/format",null,e,n):s&&"object"==typeof s?this.createError(t.FORMAT_CUSTOM,{message:s.message||"?"},s.dataPath||"",s.schemaPath||"/format",null,e,n):null},e.prototype.validateDefinedKeywords=function(e,n,s){for(a in this.definedKeywords)if(void 0!==n[a])for(var o,i,a,l,d,c=this.definedKeywords[a],r=0;r<c.length;r++){if(o=(0,c[r])(e,n[a],n,s),"string"==typeof o||"number"==typeof o)return this.createError(t.KEYWORD_CUSTOM,{key:a,message:o},"","",null,e,n).prefixWith(null,a);if(o&&"object"==typeof o){if(i=o.code,"string"==typeof i){if(!t[i])throw new Error("Undefined error code (use defineError): "+i);i=t[i]}else"number"!=typeof i&&(i=t.KEYWORD_CUSTOM);return l="object"==typeof o.message?o.message:{key:a,message:o.message||"?"},d=o.schemaPath||"/"+a.replace(/~/g,"~0").replace(/\//g,"~1"),this.createError(i,l,o.dataPath||null,d,null,e,n)}}return null},e.prototype.validateBasic=function(e,t,n){var s;return(s=this.validateType(e,t,n))||(s=this.validateEnum(e,t,n))?s.prefixWith(null,"type"):null},e.prototype.validateType=function(e,n){if(void 0===n.type)return null;var s,i,a,o=typeof e;null===e?o="null":Array.isArray(e)&&(o="array"),s=n.type,Array.isArray(s)||(s=[s]);for(i=0;i<s.length;i++)if(a=s[i],a===o||"integer"===a&&"number"===o&&e%1==0)return null;return this.createError(t.INVALID_TYPE,{type:o,expected:s.join("/")},"","",null,e,n)},e.prototype.validateEnum=function(e,n){if(void 0===n.enum)return null;for(var s=0;s<n.enum.length;s++)if(c(e,n.enum[s]))return null;return this.createError(t.ENUM_MISMATCH,{value:"undefined"!=typeof JSON?JSON.stringify(e):e},"","",null,e,n)},e.prototype.validateNumeric=function(e,t,n){return this.validateMultipleOf(e,t,n)||this.validateMinMax(e,t,n)||this.validateNaN(e,t,n)||null},f=Math.pow(2,-51),v=1-f;function b(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 g(e,t){return t=b(t||""),e=b(e||""),t&&e?(t.protocol||e.protocol)+(t.protocol||t.authority?t.authority:e.authority)+(s=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,n=[],s.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^/]*/g,function(e){"/.."===e?n.pop():n.push(e)}),n.join("").replace(/^\//,"/"===s.charAt(0)?"/":""))+(t.protocol||t.authority||t.pathname?t.search:t.search||e.search)+t.hash:null;var n,s}function d(e){return e.split("#")[0]}function u(e,t){if(e&&"object"==typeof e)if(void 0===t?t=e.id:"string"==typeof e.id&&(t=g(t,e.id),e.id=t),Array.isArray(e))for(var s,n=0;n<e.length;n++)u(e[n],t);else for(s in"string"==typeof e.$ref&&(e.$ref=g(t,e.$ref)),e)"enum"!==s&&u(e[s],t)}function h(e){var t=n[e=e||"en"];return function(e){var s,n=t[e.code]||i[e.code];return"string"!=typeof n?"Unknown error code "+e.code+": "+JSON.stringify(e.messageParams):(s=e.params,n.replace(/\{([^{}]*)\}/g,function(e,t){var n=s[t];return"string"==typeof n||"number"==typeof n?n:e}))}}e.prototype.validateMultipleOf=function(e,n){var o,s=n.multipleOf||n.divisibleBy;return void 0===s?null:"number"==typeof e&&(o=e/s%1,o>=f&&o<v)?this.createError(t.NUMBER_MULTIPLE_OF,{value:e,multipleOf:s},"","",null,e,n):null},e.prototype.validateMinMax=function(e,n){if("number"!=typeof e)return null;if(void 0!==n.minimum){if(e<n.minimum)return this.createError(t.NUMBER_MINIMUM,{value:e,minimum:n.minimum},"","/minimum",null,e,n);if(n.exclusiveMinimum&&e===n.minimum)return this.createError(t.NUMBER_MINIMUM_EXCLUSIVE,{value:e,minimum:n.minimum},"","/exclusiveMinimum",null,e,n)}if(void 0!==n.maximum){if(e>n.maximum)return this.createError(t.NUMBER_MAXIMUM,{value:e,maximum:n.maximum},"","/maximum",null,e,n);if(n.exclusiveMaximum&&e===n.maximum)return this.createError(t.NUMBER_MAXIMUM_EXCLUSIVE,{value:e,maximum:n.maximum},"","/exclusiveMaximum",null,e,n)}return null},e.prototype.validateNaN=function(e,n){return"number"!=typeof e?null:!0===isNaN(e)||e===1/0||e===-1/0?this.createError(t.NUMBER_NOT_A_NUMBER,{value:e},"","/type",null,e,n):null},e.prototype.validateString=function(e,t,n){return this.validateStringLength(e,t,n)||this.validateStringPattern(e,t,n)||null},e.prototype.validateStringLength=function(e,n){return"string"!=typeof e?null:void 0!==n.minLength&&e.length<n.minLength?this.createError(t.STRING_LENGTH_SHORT,{length:e.length,minimum:n.minLength},"","/minLength",null,e,n):void 0!==n.maxLength&&e.length>n.maxLength?this.createError(t.STRING_LENGTH_LONG,{length:e.length,maximum:n.maxLength},"","/maxLength",null,e,n):null},e.prototype.validateStringPattern=function(e,n){if("string"!=typeof e||"string"!=typeof n.pattern&&!(n.pattern instanceof RegExp))return null;if(n.pattern instanceof RegExp)s=n.pattern;else{var s,o,a="",i=n.pattern.match(/^\/(.+)\/([img]*)$/);i?(o=i[1],a=i[2]):o=n.pattern,s=new RegExp(o,a)}return s.test(e)?null:this.createError(t.STRING_PATTERN,{pattern:n.pattern},"","/pattern",null,e,n)},e.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},e.prototype.validateArrayLength=function(e,n){var s;return void 0!==n.minItems&&e.length<n.minItems&&(s=this.createError(t.ARRAY_LENGTH_SHORT,{length:e.length,minimum:n.minItems},"","/minItems",null,e,n),this.handleError(s))||void 0!==n.maxItems&&e.length>n.maxItems&&(s=this.createError(t.ARRAY_LENGTH_LONG,{length:e.length,maximum:n.maxItems},"","/maxItems",null,e,n),this.handleError(s))?s:null},e.prototype.validateArrayUniqueItems=function(e,n){if(n.uniqueItems)for(var o,i,s=0;s<e.length;s++)for(o=s+1;o<e.length;o++)if(c(e[s],e[o])&&(i=this.createError(t.ARRAY_UNIQUE,{match1:s,match2:o},"","/uniqueItems",null,e,n),this.handleError(i)))return i;return null},e.prototype.validateArrayItems=function(e,n,s){if(void 0===n.items)return null;var o,i;if(Array.isArray(n.items)){for(o=0;o<e.length;o++)if(o<n.items.length){if(i=this.validateAll(e[o],n.items[o],[o],["items",o],s+"/"+o))return i}else if(void 0!==n.additionalItems)if("boolean"==typeof n.additionalItems){if(!n.additionalItems&&(i=this.createError(t.ARRAY_ADDITIONAL_ITEMS,{},"/"+o,"/additionalItems",null,e,n),this.handleError(i)))return i}else if(i=this.validateAll(e[o],n.additionalItems,[o],["additionalItems"],s+"/"+o))return i}else for(o=0;o<e.length;o++)if(i=this.validateAll(e[o],n.items,[o],["items"],s+"/"+o))return i;return null},e.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},e.prototype.validateObjectMinMaxProperties=function(e,n){var s,o=Object.keys(e);return void 0!==n.minProperties&&o.length<n.minProperties&&(s=this.createError(t.OBJECT_PROPERTIES_MINIMUM,{propertyCount:o.length,minimum:n.minProperties},"","/minProperties",null,e,n),this.handleError(s))||void 0!==n.maxProperties&&o.length>n.maxProperties&&(s=this.createError(t.OBJECT_PROPERTIES_MAXIMUM,{propertyCount:o.length,maximum:n.maxProperties},"","/maxProperties",null,e,n),this.handleError(s))?s:null},e.prototype.validateObjectRequiredProperties=function(e,n){if(void 0!==n.required)for(var o,i,s=0;s<n.required.length;s++)if(o=n.required[s],void 0===e[o]&&(i=this.createError(t.OBJECT_REQUIRED,{key:o},"","/required/"+s,null,e,n),this.handleError(i)))return i;return null},e.prototype.validateObjectProperties=function(e,n,s){for(o in e){var o,i,c,a=s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),r=!1;if(void 0!==n.properties&&void 0!==n.properties[o]&&(r=!0,i=this.validateAll(e[o],n.properties[o],[o],["properties",o],a)))return i;if(void 0!==n.patternProperties)for(c in n.patternProperties)if(new RegExp(c).test(o)&&(r=!0,i=this.validateAll(e[o],n.patternProperties[c],[o],["patternProperties",c],a)))return i;if(r)this.trackUnknownProperties&&(this.knownPropertyPaths[a]=!0,delete this.unknownPropertyPaths[a]);else if(void 0!==n.additionalProperties){if(this.trackUnknownProperties&&(this.knownPropertyPaths[a]=!0,delete this.unknownPropertyPaths[a]),"boolean"==typeof n.additionalProperties){if(!n.additionalProperties&&(i=this.createError(t.OBJECT_ADDITIONAL_PROPERTIES,{key:o},"","/additionalProperties",null,e,n).prefixWith(o,null),this.handleError(i)))return i}else if(i=this.validateAll(e[o],n.additionalProperties,[o],["additionalProperties"],a))return i}else this.trackUnknownProperties&&!this.knownPropertyPaths[a]&&(this.unknownPropertyPaths[a]=!0)}return null},e.prototype.validateObjectDependencies=function(e,n,s){if(void 0!==n.dependencies)for(i in n.dependencies)if(void 0!==e[i]){var o,i,r,c,a=n.dependencies[i];if("string"==typeof a){if(void 0===e[a]&&(o=this.createError(t.OBJECT_DEPENDENCY_KEY,{key:i,missing:a},"","",null,e,n).prefixWith(null,i).prefixWith(null,"dependencies"),this.handleError(o)))return o}else if(Array.isArray(a)){for(r=0;r<a.length;r++)if(c=a[r],void 0===e[c]&&(o=this.createError(t.OBJECT_DEPENDENCY_KEY,{key:i,missing:c},"","/"+r,null,e,n).prefixWith(null,i).prefixWith(null,"dependencies"),this.handleError(o)))return o}else if(o=this.validateAll(e,a,[],["dependencies",i],s))return o}return null},e.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},e.prototype.validateAllOf=function(e,t,n){if(void 0===t.allOf)return null;for(var o,i,s=0;s<t.allOf.length;s++)if(i=t.allOf[s],o=this.validateAll(e,i,[],["allOf",s],n))return o;return null},e.prototype.validateAnyOf=function(e,n,s){if(void 0===n.anyOf)return null;var o,i,a,l,u,h,r=[],c=this.errors.length;this.trackUnknownProperties&&(i=this.unknownPropertyPaths,a=this.knownPropertyPaths);for(l=!0,o=0;o<n.anyOf.length;o++){this.trackUnknownProperties&&(this.unknownPropertyPaths={},this.knownPropertyPaths={});var m=n.anyOf[o],f=this.errors.length,d=this.validateAll(e,m,[],["anyOf",o],s);if(null===d&&f===this.errors.length){if(this.errors=this.errors.slice(0,c),this.trackUnknownProperties){for(u in this.knownPropertyPaths)a[u]=!0,delete i[u];for(h in this.unknownPropertyPaths)a[h]||(i[h]=!0);l=!1;continue}return null}d&&r.push(d.prefixWith(null,""+o).prefixWith(null,"anyOf"))}return this.trackUnknownProperties&&(this.unknownPropertyPaths=i,this.knownPropertyPaths=a),l?(r=r.concat(this.errors.slice(c)),this.errors=this.errors.slice(0,c),this.createError(t.ANY_OF_MISSING,{},"","/anyOf",r,e,n)):void 0},e.prototype.validateOneOf=function(e,n,s){if(void 0===n.oneOf)return null;var o,i,a,u,h,r=null,c=[],l=this.errors.length;this.trackUnknownProperties&&(i=this.unknownPropertyPaths,a=this.knownPropertyPaths);for(o=0;o<n.oneOf.length;o++){this.trackUnknownProperties&&(this.unknownPropertyPaths={},this.knownPropertyPaths={});var m=n.oneOf[o],f=this.errors.length,d=this.validateAll(e,m,[],["oneOf",o],s);if(null===d&&f===this.errors.length){{if(null!==r)return this.errors=this.errors.slice(0,l),this.createError(t.ONE_OF_MULTIPLE,{index1:r,index2:o},"","/oneOf",null,e,n);if(r=o,this.trackUnknownProperties){for(u in this.knownPropertyPaths)a[u]=!0,delete i[u];for(h in this.unknownPropertyPaths)a[h]||(i[h]=!0)}}}else d&&c.push(d)}return this.trackUnknownProperties&&(this.unknownPropertyPaths=i,this.knownPropertyPaths=a),null===r?(c=c.concat(this.errors.slice(l)),this.errors=this.errors.slice(0,l),this.createError(t.ONE_OF_MISSING,{},"","/oneOf",c,e,n)):(this.errors=this.errors.slice(0,l),null)},e.prototype.validateNot=function(e,n,s){if(void 0===n.not)return null;o=this.errors.length,this.trackUnknownProperties&&(i=this.unknownPropertyPaths,a=this.knownPropertyPaths,this.unknownPropertyPaths={},this.knownPropertyPaths={});var o,i,a,r=this.validateAll(e,n.not,null,null,s),c=this.errors.slice(o);return this.errors=this.errors.slice(0,o),this.trackUnknownProperties&&(this.unknownPropertyPaths=i,this.knownPropertyPaths=a),null===r&&0===c.length?this.createError(t.NOT_PASSED,{},"","/not",null,e,n):null},e.prototype.validateHypermedia=function(e,t,n){if(!t.links)return null;for(s=0;s<t.links.length;s++)if(o=t.links[s],"describedby"===o.rel){for(var s,o,r,d,i=new l(o.href),c=!0,a=0;a<i.varNames.length;a++)if(!(i.varNames[a]in e)){c=!1;break}if(c&&(d={$ref:i.fillFromObject(e)},r=this.validateAll(e,d,[],["links",s],n)))return r}},t={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},a={};for(j in t)a[t[j]]=j;i={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)"};function s(e,t,n,s,o){if(Error.call(this),void 0===e)throw new Error("No error code supplied: "+s);this.message="",this.params=t,this.code=e,this.dataPath=n||"",this.schemaPath=s||"",this.subErrors=o||null;var i=new Error(this.message);if(this.stack=i.stack||i.stacktrace,!this.stack)try{throw i}catch(e){this.stack=e.stack||e.stacktrace}}return s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.prototype.name="ValidationError",s.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},n={},o=function s(o){var c,l,r=new e,m={setErrorReporter:function(e){return"string"==typeof e?this.language(e):(c=e,!0)},addFormat:function(){r.addFormat.apply(r,arguments)},language:function(e){return e?(n[e]||(e=e.split("-")[0]),!!n[e]&&(l=e,e)):l},addLanguage:function(e,s){for(o in t)s[o]&&!s[t[o]]&&(s[t[o]]=s[o]);var o,i=e.split("-")[0];if(n[i])for(o in n[e]=Object.create(n[i]),s)void 0===n[i][o]&&(n[i][o]=s[o]),n[e][o]=s[o];else n[e]=s,n[i]=s;return this},freshApi:function(e){var t=s();return e&&t.language(e),t},validate:function(t,n,s,o){var i,d=h(l),u=c?function(e,t,n){return c(e,t,n)||d(e,t,n)}:d,a=new e(r,!1,u,s,o);return"string"==typeof n&&(n={$ref:n}),a.addSchema("",n),i=a.validateAll(t,n,null,null,""),!i&&o&&(i=a.banUnknownProperties(t,n)),this.error=i,this.missing=a.missing,this.valid=null===i,this.valid},validateResult:function(){var e={toString:function(){return this.valid?"valid":this.error.message}};return this.validate.apply(e,arguments),e},validateMultiple:function(t,n,s,o){var i,d=h(l),u=c?function(e,t,n){return c(e,t,n)||d(e,t,n)}:d,a=new e(r,!0,u,s,o);return"string"==typeof n&&(n={$ref:n}),a.addSchema("",n),a.validateAll(t,n,null,null,""),o&&a.banUnknownProperties(t,n),i={toString:function(){return this.valid?"valid":this.error.message}},i.errors=a.errors,i.missing=a.missing,i.valid=0===i.errors.length,i},addSchema:function(){return r.addSchema.apply(r,arguments)},getSchema:function(){return r.getSchema.apply(r,arguments)},getSchemaMap:function(){return r.getSchemaMap.apply(r,arguments)},getSchemaUris:function(){return r.getSchemaUris.apply(r,arguments)},getMissingUris:function(){return r.getMissingUris.apply(r,arguments)},dropSchemas:function(){r.dropSchemas.apply(r,arguments)},defineKeyword:function(){r.defineKeyword.apply(r,arguments)},defineError:function(e,s,o){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 s||s%1!=0||s<1e4)throw new Error("Code number must be an integer > 10000");if(void 0!==t[e])throw new Error("Error already defined: "+e+" as "+t[e]);if(void 0!==a[s])throw new Error("Error code already used: "+a[s]+" as "+s);for(c in t[e]=s,a[s]=e,i[e]=i[s]=o,n){var c,r=n[c];r[e]&&(r[s]=r[s]||r[e])}},reset:function(){r.reset(),this.error=null,this.missing=[],this.valid=!0},missing:[],error:null,valid:!0,normSchema:u,resolveUrl:g,getDocumentUri:d,errorCodes:t};return m.language(o||"en"),m}(),o.addLanguage("en-gb",i),o.tv4=o,o};void 0===(n=s.apply(t,[]))||(e.exports=n)},199:function(e,t,n){var s;"function"!=typeof fetch&&"function"!=typeof XMLHttpRequest&&(XMLHttpRequest=n(317)),function(){var a={"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"},r={avatar:[],remotestorage:[],blog:[],vcard:[],updates:[],share:[],profile:[],webfist:[],camlistore:[]},c=["webfinger","host-meta","host-meta.json"];function o(e){return e.toString=function(){return this.message},e}function i(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}}i.prototype.__fetchJRD=function(e,t,n){if("function"==typeof fetch)return this.__fetchJRD_fetch(e,t,n);if("function"==typeof XMLHttpRequest)return this.__fetchJRD_XHR(e,t,n);throw new Error("add a polyfill for fetch or XMLHttpRequest")},i.prototype.__fetchJRD_fetch=function(e,t,n){i=this,"function"==typeof AbortController&&(s=new AbortController);var s,i,a=fetch(e,{headers:{Accept:"application/jrd+json, application/json"},signal:s?s.signal:void 0}).then(function(t){if(t.ok)return t.text();throw o(404===t.status?{message:"resource not found",url:e,status:t.status}:{message:"error during request",url:e,status:t.status})},function(t){throw o({message:"error during request",url:e,status:void 0,err:t})}).then(function(t){if(i.__isValidJSON(t))return t;throw o({message:"invalid json",url:e,status:void 0})}),r=new Promise(function(t,n){setTimeout(function(){n(o({message:"request timed out",url:e,status:void 0})),s&&s.abort()},i.config.request_timeout)});Promise.race([a,r]).then(function(e){n(e)}).catch(function(e){t(e)})},i.prototype.__fetchJRD_XHR=function(e,t,n){var i=this,a=!1,s=new XMLHttpRequest;function r(){if(!a)return a=!0,200===s.status?i.__isValidJSON(s.responseText)?n(s.responseText):t(o({message:"invalid json",url:e,status:s.status})):404===s.status?t(o({message:"resource not found",url:e,status:s.status})):s.status>=301&&s.status<=302?function(e){return"string"==typeof e&&"https"===e.split("://")[0]}(s.getResponseHeader("Location"))?c():t(o({message:"no redirect URL found",url:e,status:s.status})):t(o({message:"error during request",url:e,status:s.status}))}function c(){s.onreadystatechange=function(){4===s.readyState&&r()},s.onload=function(){r()},s.ontimeout=function(){return t(o({message:"request timed out",url:e,status:s.status}))},s.open("GET",e,!0),s.timeout=i.config.request_timeout,s.setRequestHeader("Accept","application/jrd+json, application/json"),s.send()}return c()},i.prototype.__isValidJSON=function(e){try{JSON.parse(e)}catch{return!1}return!0},i.prototype.__isLocalhost=function(e){return/^localhost(\.localdomain)?(:[0-9]+)?$/.test(e)},i.prototype.__processJRD=function(e,t,n,s){var i,l,d,u,c=JSON.parse(t);if("object"!=typeof c||"object"!=typeof c.links)return n(o(void 0!==c.error?{message:c.error,request:e}:{message:"unknown response from server",request:e}));l=c.links,Array.isArray(l)||(l=[]),i={object:c,json:t,idx:{}},i.idx.properties={name:void 0},i.idx.links=JSON.parse(JSON.stringify(r)),l.map(function(e){if(a.hasOwnProperty(e.rel)&&i.idx.links[a[e.rel]]){var n={};Object.keys(e).map(function(t){n[t]=e[t]}),i.idx.links[a[e.rel]].push(n)}}),d=JSON.parse(t).properties;for(u in d)d.hasOwnProperty(u)&&"http://packetizer.com/ns/name"===u&&(i.idx.properties.name=d[u]);return s(i)},i.prototype.lookup=function(e,t){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 n=this,s="",s=e.indexOf("://")>-1?e.replace(/ /g,"").split("/")[2]:e.replace(/ /g,"").split("@")[1],o=0,i="https";function r(){var t="";return e.split("://")[1]||(t="acct:"),i+"://"+s+"/.well-known/"+c[o]+"?resource="+t+e}function l(e){if(n.config.uri_fallback&&"webfist.org"!==s&&o!==c.length-1)return o+=1,a();if(!n.config.tls_only&&"https"===i)return o=0,i="http",a();if(!n.config.webfist_fallback||"webfist.org"===s)return t(e);o=0,i="http",s="webfist.org";var l=r();n.__fetchJRD(l,t,function(e){n.__processJRD(l,e,t,function(e){"object"==typeof e.idx.links.webfist&&"string"==typeof e.idx.links.webfist[0].href&&n.__fetchJRD(e.idx.links.webfist[0].href,t,function(e){n.__processJRD(l,e,t,function(){return t(null,t)})})})})}function a(){var e=r();n.__fetchJRD(e,l,function(s){n.__processJRD(e,s,t,function(e){t(null,e)})})}return n.__isLocalhost(s)&&(i="http"),setTimeout(a,0)},i.prototype.lookupLink=function(e,t,n){if(!r.hasOwnProperty(t))return n("unsupported rel "+t);this.lookup(e,function(e,s){var o=s.idx.links[t];return e?n(e):0===o.length?n('no links found with rel="'+t+'"'):n(null,o[0])})},void 0===(s=function(){return i}.apply(t,[]))||(e.exports=s)}()},317:function(e){e.exports=XMLHttpRequest}},t={};function e(n){var o,i=t[n];return void 0!==i?i.exports:(o=t[n]={exports:{}},s[n].call(o.exports,o,o.exports,e),o.exports)}return e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),n=e(423),n.default}()}),!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Widget=t():e.Widget=t()}(self,function(){return(()=>{"use strict";var n,e={d:(t,n)=>{for(var s in n)e.o(n,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:n[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}e.d(t,{default:()=>i}),n=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(s(this,e),this.rs=t,this.leaveOpen=!!n.leaveOpen&&n.leaveOpen,this.autoCloseAfter=n.autoCloseAfter?n.autoCloseAfter:1500,this.skipInitial=!!n.skipInitial&&n.skipInitial,this.logging=!!n.logging&&n.logging,n.hasOwnProperty("modalBackdrop")){if("boolean"!=typeof n.modalBackdrop&&"onlySmallScreens"!==n.modalBackdrop)throw'options.modalBackdrop has to be true/false or "onlySmallScreens"';this.modalBackdrop=n.modalBackdrop}else this.modalBackdrop="onlySmallScreens";this.active=!1,this.online=!1,this.closed=!1,this.lastSynced=null,this.lastSyncedUpdateLoop=null}var t,n;return t=e,n=[{key:"log",value:function(){if(this.logging){for(var t,n=arguments.length,s=new Array(n),e=0;e<n;e++)s[e]=arguments[e];(t=console).debug.apply(t,["[RS-WIDGET] "].concat(s))}}},{key:"eventHandler",value:function(e,t){var s,n=this;switch(this.log("EVENT: ",e),e){case"ready":this.setState(this.state);break;case"sync-req-done":this.syncInProgress=!0,this.rsSyncButton.classList.add("rs-rotate"),setTimeout(function(){n.syncInProgress&&(n.rsConnectedLabel.textContent="Synchronizing")},1e3);break;case"sync-done":if(this.online&&!t.completed)return;this.syncInProgress=!1,this.rsSyncButton.classList.remove("rs-rotate"),this.updateLastSyncedStatus(),!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(e){return n.eventHandler("sync-req-done",e)}),this.rs.on("sync-done",function(e){return n.eventHandler("sync-done",e)})):(this.rsSyncButton.classList.add("rs-hidden"),setTimeout(this.close.bind(this),this.autoCloseAfter)),s=this.rs.remote.userAddress,this.rsConnectedUser.innerHTML=s,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: "'.concat(t,'"'))}}},{key:"setState",value:function(e){if(e){this.log("Setting state ",e);var t,s,n=document.querySelector(".rs-box.rs-selected");n&&(n.classList.remove("rs-selected"),n.setAttribute("aria-hidden","true")),t=document.querySelector(".rs-box.rs-box-"+e),t&&(t.classList.add("rs-selected"),t.setAttribute("aria-hidden","false")),s=this.rsWidget.className.match(/rs-state-\S+/g)[0],this.rsWidget.classList.remove(s),this.rsWidget.classList.add("rs-state-".concat(e||this.state)),this.state=e}}},{key:"setInitialState",value:function(){this.skipInitial?this.showChooseOrSignIn():this.setState("initial")}},{key:"createHtmlTemplate",value:function(){var t,e=document.createElement("div");return e.id="remotestorage-widget",e.innerHTML='<div class="remotestorage-widget-modal-backdrop"></div> <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" aria-hidden="false"> <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" aria-hidden="true"> <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" aria-hidden="true"> <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" aria-hidden="true"> <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 <a class="rs-help" href="https://remotestorage.io/" target="_blank" rel="noopener">storage provider of your choice</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" aria-hidden="true"> <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> <button type="submit" class="rs-connect">Connect</button> <a href="https://remotestorage.io/get/" class="rs-help" target="_blank" rel="noopener">Need help?</a> </form> </div> </div> </div> ',t=document.createElement("style"),t.innerHTML=`#remotestorage-widget {
z-index: 21000000;
}
.rs-widget {
box-sizing: border-box;
overflow: hidden;
max-width: 350px;
padding: 10px;
margin: 10px;
border-radius: 3px;
background-color: #fff;
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);
font-family: arial, sans-serif;
font-size: 16px;
color: #333;
will-change: max-height, height, width, opacity, max-width, background, box-shadow;
transition-property: width, height, opacity, max-width, max-height, background, box-shadow;
transition-duration: 300ms;
}
.rs-widget * {
box-sizing: border-box;
}
.rs-widget .rs-hidden {
display: none;
}
.rs-box {
overflow: hidden;
will-change: height;
transition-property: height, width, max-height;
transition-duration: 300ms;
transition-timing-function: ease-in;
opacity: 0;
max-height: 0px;
}
.rs-box.rs-selected:not([aria-hidden=true]) {
opacity: 1;
max-height: 420px;
}
/* Main logo */
.rs-main-logo {
float: left;
height: 36px;
width: 36px;
margin-top: 1px;
margin-right: 0.625em;
transition: margin-left 300ms ease-out, transform 300ms ease-out;
cursor: pointer;
}
.rs-widget .rs-backend-remotestorage svg#rs-main-logo-remotestorage {
display: block;
}
.rs-widget[class*="rs-backend-"]:not(.rs-backend-remotestorage) svg#rs-main-logo-remotestorage {
display: none;
}
.rs-widget.rs-backend-dropbox svg#rs-main-logo-dropbox {
display: block;
}
.rs-widget:not(.rs-backend-dropbox) svg#rs-main-logo-dropbox {
display: none;
}
.rs-widget.rs-backend-googledrive svg#rs-main-logo-googledrive {
display: block;
}
.rs-widget:not(.rs-backend-googledrive) svg#rs-main-logo-googledrive {
display: none;
}
polygon.rs-logo-shape {
fill: #FF4B03;
}
polygon.rs-logo-shape,
#rs-main-logo-dropbox path,
#rs-main-logo-googledrive path {
transition-property: fill;
transition-duration: 0.5s;
}
.rs-offline polygon.rs-logo-shape,
.rs-offline #rs-main-logo-dropbox path,
.rs-offline #rs-main-logo-googledrive path {
fill: #888;
transition-property: fill;
transition-duration: 0.5s;
}
/* Hide everything except logo when connected and clicked outside of box */
.rs-closed {
max-width: 56px;
background-color: transparent;
box-shadow: none;
opacity: 0.5;
transition: max-height 100ms ease-out 0ms, max-width 300ms ease-out 300ms, background 300ms ease-in 200ms, opacity 300ms ease 200ms;
}
.rs-closed:hover {
cursor: pointer;
opacity: 1;
}
.rs-box-initial {
transition-duration: 0ms;
}
.rs-box-initial:hover {
cursor: pointer;
}
.rs-widget a {
color: #0093cc;
}
/* HEADLINE */
.rs-small-headline {
font-size: 1em;
font-weight: bold;
margin: 0;
margin-bottom: 2px;
height: 1.2em;
word-break: break-all;
overflow: hidden;
line-height: 1em;
}
.rs-sub-headline {
word-break: break-all;
overflow: hidden;
color: #666;
font-size: 0.92em;
height: 1.2em;
}
.rs-big-headline {
font-size: 1.625em;
font-weight: normal;
text-align: center;
margin-top: 20px;
margin-bottom: 20px;
}
/* BUTTONS */
.rs-button {
font: inherit;
color: inherit;
background-color: transparent;
border: 1px solid #dcdcdc;
border-radius: 3px;
cursor: pointer;
}
.rs-button-small {
padding: 0.6em 0.7em;
margin-left: 0.2em;
transition: border-color 300ms ease-out;
}
.rs-button-small svg {
vertical-align: top;
}
.rs-button-wrap {
margin-top: 10px;
}
.rs-button-wrap img,
.rs-button-wrap svg {
float: left;
margin-right: 0.6em;
width: 40px;
height: 40px;
}
.rs-button-big {
padding: 15px 10px;
margin-bottom: 10px;
display: block;
width: 100%;
text-align: left;
transition: box-shadow 200ms;
}
.rs-button-big > div {
font-size: 1.125em;
padding: 10px 0;
}
.rs-button-big:hover {
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);
}
.rs-button-big:active {
background-color: #eee;
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);
}
.rs-button-big:last-child {
margin-bottom: 0;
}
.rs-content {
padding: 0 10px 10px 10px;
}
.rs-state-choose .rs-main-logo,
.rs-state-sign-in .rs-main-logo {
margin-left: 45%;
float: none;
}
.rs-sign-in-form input[type=text] {
padding: 15px 10px;
display: block;
width: 100%;
font: inherit;
height: 52px;
border: 1px solid #aaa;
border-radius: 0;
box-shadow: none;
}
.rs-sign-in-form button.rs-connect {
padding: 15px 10px;
margin-top: 20px;
margin-bottom: 15px;
display: block;
width: 100%;
border: none;
border-radius: 3px;
background-color: #3fb34f;
font: inherit;
color: #fff;
transition: box-shadow 200ms, background-color 200ms;
}
.rs-sign-in-form button.rs-connect:hover {
cursor: pointer;
background-color: #4BCB5D;
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);
}
.rs-sign-in-form button.rs-connect:active {
background-color: #3fb34f;
}
.rs-sign-in-form button.rs-connect:disabled,
.rs-sign-in-form button.rs-connect:disabled:hover {
background-color: #aaa;
}
.rs-sign-in-form button.rs-connecting svg {
height: 1em;
width: auto;
vertical-align: middle;
margin-left: 0.5em;
animation: rs-spin 1s linear infinite;
}
.rs-sign-in-error.rs-hidden,
.rs-box-error.rs-hidden {
height: 0;
}
.rs-sign-in-error.rs-visible,
.rs-box-error.rs-visible {
height: auto;
border-radius: 3px;
padding: 0.5em 0.5em;
margin-top: 0.5em;
text-align: center;
background-color: rgba(255,0,0,0.1);
color: darkred;
}
.rs-box-error {
display: flex;
flex-direction: row;
}
.rs-box-error .rs-error-message {
flex: auto;
}
/*Choose provider box */
.rs-box-choose {
text-align: center;
overflow: hidden;
}
.rs-box-choose p {
margin-top: 0;
margin-bottom: 20px;
line-height: 1.4em;
}
/*Connected box */
.rs-box-connected {
display: flex;
flex-direction: row;
height: 40px;
transition: height 0s;
}
.rs-connected-text {
flex: auto;
min-width: 0;
}
.rs-box-connected .rs-user {
font-weight: bold;
text-overflow: ellipsis;
overflow: hidden;
word-break: keep-all;
}
.rs-connected-buttons, .rs-error-buttons {
flex: none;
}
.rs-disconnect:hover {
border-color: #FF2D2D;
}
.rs-disconnect:hover .rs-icon{
fill: #FF2D2D;
}
.rs-sync:hover {
border-color: #FFBB0C;
}
.rs-sync:hover .rs-icon {
fill: #FFBB0C;
}
.rs-sync.rs-rotate {
border-color: #FFBB0C;
}
.rs-sync.rs-rotate .rs-icon {
fill: #FFBB0C;
animation: rs-spin 1s linear infinite;
}
/* Floating widget styles (top right corner) */
.rs-floating {
position: fixed;
top: 0;
right: 0;
}
@keyframes rs-spin {
100% {
transform: rotate(360deg);
transform: rotate(360deg);
}
}
/* Small/mobile screens */
@media screen and (max-width: 420px) {
.rs-widget {
font-size: 100%;
transition: all 300ms ease-out;
max-width: 400px;
}
.rs-floating {
position: relative;
top: auto;
right: auto
}
.rs-closed {
max-width: 56px;
}
.rs-state-choose,
.rs-state-sign-in {
position: fixed;
top: 0;
left: 0;
right: 0;
max-width: 100%;
}
}
/* remove dotted outline border on Firefox */
.rs-widget a:focus,
.rs-widget a:active,
.rs-widget button:focus,
.rs-widget input:focus {
outline:none;
}
.rs-widget button::-moz-focus-inner,
.rs-widget input[type="button"]::-moz-focus-inner {
border:0;
}
/* prevent rounded buttons on mobile Safari */
.rs-widget button,
.rs-widget input[type="button"] {
-webkit-appearance: none;
}
.remotestorage-widget-modal-backdrop {
display: none;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.5);
opacity: 0;
transition: opacity 0.3s linear;
}
.remotestorage-widget-modal-backdrop.visible {
opacity: 1;
transition: opacity 0.3s linear;
}
`,e.appendChild(t),e}},{key:"setModalClass",value:function(){if(this.modalBackdrop){if("onlySmallScreens"===this.modalBackdrop&&!this.isSmallScreen())return;this.rsWidget.classList.add("rs-modal")}}},{key:"setupElements",value:function(){this.rsWidget=document.querySelector(".rs-widget"),this.rsBackdrop=document.querySelector(".remotestorage-widget-modal-backdrop"),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.rsAddressInput=this.rsSignInForm.querySelector("input[name=rs-user-address]"),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")}},{key:"setupHandlers",value: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()}},{key:"attach",value:function(e){var t,n=this.createHtmlTemplate();if(e){if(t=document.getElementById(e),!parent)throw'Failed to find target DOM element with id="'+e+'"'}else t=document.body;t.appendChild(n),this.setupElements(),this.setupHandlers(),this.setInitialState(),this.setModalClass()}},{key:"setEventListeners",value:function(){var e=this;this.rsSignInForm.addEventListener("submit",function(t){t.preventDefault();var n=document.querySelector("input[name=rs-user-address]").value;e.disableConnectButton(),e.rs.connect(n)})}},{key:"showChooseOrSignIn",value:function(){this.rsWidget.classList.contains("rs-modal")&&(this.rsBackdrop.style.display="block",this.rsBackdrop.classList.add("visible")),this.rs.apiKeys&&Object.keys(this.rs.apiKeys).length>0?this.setState("choose"):this.setState("sign-in")}},{key:"setClickHandlers",value:function(){var e=this;this.rsInitial.addEventListener("click",function(){return e.showChooseOrSignIn()}),this.rsChooseRemoteStorageButton.addEventListener("click",function(){e.setState("sign-in"),e.rsAddressInput.focus()}),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.rsConnectedLabel.textContent="Synchronizing",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()})}},{key:"toggle",value:function(){this.closed?this.open():"initial"===this.state?this.showChooseOrSignIn():this.close()}},{key:"open",value:function(){this.closed=!1,this.rsWidget.classList.remove("rs-closed"),this.shouldCloseWhenSyncDone=!1;var e=document.querySelector(".rs-box.rs-selected");e&&e.setAttribute("aria-hidden","false")}},{key:"close",value:function(){var e,t=this;"error"!==this.state&&(!this.leaveOpen&&this.active?(this.closed=!0,this.rsWidget.classList.add("rs-closed"),e=document.querySelector(".rs-box.rs-selected"),e&&e.setAttribute("aria-hidden","true")):this.active?this.setState("connected"):this.setInitialState(),this.rsWidget.classList.contains("rs-modal")&&(this.rsBackdrop.classList.remove("visible"),setTimeout(function(){t.rsBackdrop.style.display="none"},300)))}},{key:"disableConnectButton",value:function(){this.rsConnectButton.disabled=!0,this.rsConnectButton.classList.add("rs-connecting"),this.rsConnectButton.innerHTML="Connecting ".concat(`<svg width="38" height="38" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#fff">
<g fill="none" fill-rule="evenodd">
<g transform="translate(1 1)" stroke-width="2">
<circle stroke-opacity=".5" cx="18" cy="18" r="18"/>
<path d="M36 18c0-9.94-8.06-18-18-18"></path>
</g>
</g>
</svg>
`)}},{key:"enableConnectButton",value:function(){this.rsConnectButton.disabled=!1,this.rsConnectButton.textContent="Connect",this.rsConnectButton.classList.remove("rs-connecting")}},{key:"setOffline",value:function(){this.online&&(this.rsWidget.classList.add("rs-offline"),this.rsConnectedLabel.textContent="Offline",this.online=!1)}},{key:"setOnline",value:function(){this.online||(this.rsWidget.classList.remove("rs-offline"),this.active&&(this.rsConnectedLabel.textContent="Connected")),this.online=!0}},{key:"setBackendClass",value: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-".concat(e))}},{key:"showErrorBox",value:function(e){this.rsErrorBox.innerHTML=e,this.setState("error")}},{key:"hideErrorBox",value:function(){this.rsErrorBox.innerHTML="",this.close()}},{key:"handleDiscoveryError",value: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.enableConnectButton()}},{key:"handleSyncError",value:function(e){console.debug('Encountered SyncError: "'.concat(e.message,'"')),this.setOffline()}},{key:"handleUnauthorized",value: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"))}},{key:"updateLastSyncedStatus",value:function(){var t,e=new Date;if(this.online)return this.lastSynced=e,void(this.rsConnectedLabel.textContent="Synced just now");this.lastSynced?(t=Math.round((e.getTime()-this.lastSynced.getTime())/1e3),this.rsConnectedLabel.textContent="Synced ".concat(t," seconds ago")):this.rsWidget.classList.contains("rs-state-unauthorized")||(this.rsConnectedLabel.textContent="Offline")}},{key:"isSmallScreen",value:function(){return window.innerWidth<421}}],n&&o(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();const i=n;return t.default})()}),AFRAME.registerComponent("remotestorage",{schema:{dropbox:{type:"string",default:""},googledrive:{type:"string",default:""},leaveOpen:{type:"bool",default:!1},autoCloseAfter:{type:"number",default:1500},skipInitial:{type:"bool",default:!1},logging:{type:"bool",default:!1},modalBackdrop:{type:"string",default:"onlySmallScreens"},folder:{type:"string"},domid:{type:"string"}},init:function(){let t={};remoteStorage=this.remoteStorage=new RemoteStorage({logging:this.data.logging}),this.data.dropbox&&(t.dropbox=this.data.dropbox),this.data.googledrive&&(t.googledrive=this.data.googledrive),Object.keys(t).length&&remoteStorage.setApiKeys(t),remoteStorage.on("connected",e=>this.el.sceneEl.emit("remoteStorage.connected",e)),remoteStorage.on("network-offline",e=>this.el.sceneEl.emit("remoteStorage.network-offline",e)),remoteStorage.on("network-online",e=>this.el.sceneEl.emit("remoteStorage.network-online",e)),remoteStorage.on("error",e=>this.el.sceneEl.emit("remoteStorage.error",e)),remoteStorage.on("ready",e=>this.el.sceneEl.emit("remoteStorage.ready",e)),remoteStorage.access.claim(this.data.folder,"rw"),remoteStorage.caching.enable(`/${this.data.folder}/`);let e={...this.data};e.modalBackdrop=="false"&&(e.modalBackdrop=!1),e.modalBackdrop=="true"&&(e.modalBackdrop=!0),widget=this.widget=new Widget(remoteStorage,e),widget.attach(this.data.domid)}})