From 09be00036a6541eaea4745fb33e64f1c3debb02f Mon Sep 17 00:00:00 2001 From: nero120 Date: Thu, 19 Jul 2018 17:35:24 +0100 Subject: [PATCH] Updated docs to request api status from relative path. --- dist/docs/index.js | 4 ++-- dist/docs/index.js.map | 2 +- src/docs/index.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/docs/index.js b/dist/docs/index.js index 5931b82..8115dd3 100644 --- a/dist/docs/index.js +++ b/dist/docs/index.js @@ -1,4 +1,4 @@ -!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){r(2),t.exports=r(11)},function(t,e,r){"use strict";var n=this&&this.__decorate||function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,u)}s((n=n.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),r(3);const i=r(13),a=r(5),u=r(7);r(8),r(10);class s{constructor(){a.polyfill()}init(){return o(this,void 0,void 0,function*(){this.enableMenu(),this.checkStatus();new u('a[href*="#"]',{updateURL:!1})})}checkStatus(){return o(this,void 0,void 0,function*(){const t=document.querySelector("#version"),e=document.querySelector("#currentstatus");try{const r=yield fetch("/info");if(!r.ok)throw new Error(r.statusText);const n=yield r.json();switch(n&&(t.textContent=n.version),n.status){case 1:e.textContent="Online",e.className="success";break;case 3:e.textContent="Not accepting new syncs",e.className="warning";break;default:case 2:e.textContent="Offline",e.className="danger"}}catch(t){e.textContent="Offline",e.className="danger"}})}enableMenu(){const t=document.querySelector(".nav-menu-button"),e=document.querySelector("nav"),r=()=>{e.classList.contains("open")?(e.classList.remove("open"),t.classList.remove("hide"),document.body.classList.remove("noscroll")):(e.classList.add("open"),t.classList.add("hide"),document.body.classList.add("noscroll"))};t.addEventListener("click",t=>{r()});const n=e.querySelectorAll("a");Array.from(n).forEach(t=>{t.addEventListener("click",t=>{r()})})}}n([i.autobind],s.prototype,"init",null);const c=new s;document.addEventListener("DOMContentLoaded",c.init)},function(t,e,r){},,function(t,e,r){(function(e,r){ +!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){r(2),t.exports=r(11)},function(t,e,r){"use strict";var n=this&&this.__decorate||function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,u)}s((n=n.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),r(3);const i=r(13),a=r(5),u=r(7);r(8),r(10);class s{constructor(){a.polyfill()}init(){return o(this,void 0,void 0,function*(){this.enableMenu(),this.checkStatus();new u('a[href*="#"]',{updateURL:!1})})}checkStatus(){return o(this,void 0,void 0,function*(){const t=document.querySelector("#version"),e=document.querySelector("#currentstatus");try{const r=yield fetch(`${location.pathname}info`);if(!r.ok)throw new Error(r.statusText);const n=yield r.json();switch(n&&(t.textContent=n.version),n.status){case 1:e.textContent="Online",e.className="success";break;case 3:e.textContent="Not accepting new syncs",e.className="warning";break;default:case 2:e.textContent="Offline",e.className="danger"}}catch(t){e.textContent="Offline",e.className="danger"}})}enableMenu(){const t=document.querySelector(".nav-menu-button"),e=document.querySelector("nav"),r=()=>{e.classList.contains("open")?(e.classList.remove("open"),t.classList.remove("hide"),document.body.classList.remove("noscroll")):(e.classList.add("open"),t.classList.add("hide"),document.body.classList.add("noscroll"))};t.addEventListener("click",t=>{r()});const n=e.querySelectorAll("a");Array.from(n).forEach(t=>{t.addEventListener("click",t=>{r()})})}}n([i.autobind],s.prototype,"init",null);const c=new s;document.addEventListener("DOMContentLoaded",c.init)},function(t,e,r){},,function(t,e,r){(function(e,r){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) @@ -6,4 +6,4 @@ * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version v4.2.4+314e4831 */ -!function(e,r){t.exports=r()}(0,function(){"use strict";function t(t){return"function"==typeof t}var n=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=0,i=void 0,a=void 0,u=function(t,e){p[o]=t,p[o+1]=e,2===(o+=2)&&(a?a(y):v())};var s="undefined"!=typeof window?window:void 0,c=s||{},l=c.MutationObserver||c.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==e&&"[object process]"==={}.toString.call(e),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(y,1)}}var p=new Array(1e3);function y(){for(var t=0;t1)for(var r=1;r=1&&e<=31||127==e||0===o&&e>=48&&e<=57||1===o&&e>=48&&e<=57&&45===a?"\\"+e.toString(16)+" ":e>=128||45===e||95===e||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?r.charAt(o):"\\"+r.charAt(o)}var u;try{u=decodeURIComponent("#"+i)}catch(t){u="#"+i}return u},a=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},u=function(t){return t?n(t)+t.offsetTop:0},s=function(e,r,n,o){if(r.emitEvents&&"function"==typeof t.CustomEvent){var i=new CustomEvent(e,{bubbles:!0,detail:{anchor:n,toggle:o}});document.dispatchEvent(i)}};return function(n,c){var l,f,h,d,p,y,v={cancelScroll:function(t){cancelAnimationFrame(y),y=null,t||s("scrollCancel",l)},animateScroll:function(n,o,i){var c=r(l||e,i||{}),f="[object Number]"===Object.prototype.toString.call(n),p=f||!n.tagName?null:n;if(f||p){var m=t.pageYOffset;c.header&&!h&&(h=document.querySelector(c.header)),d||(d=u(h));var b,g,w,_=f?n:function(e,r,n,o){var i=0;if(e.offsetParent)do{i+=e.offsetTop,e=e.offsetParent}while(e);return i=Math.max(i-r-n,0),o&&(i=Math.min(i,a()-t.innerHeight)),i}(p,d,parseInt("function"==typeof c.offset?c.offset(n,o):c.offset,10),c.clip),O=_-m,A=a(),S=0,T=function(e,r){var i=t.pageYOffset;if(e==r||i==r||(m=A)return v.cancelScroll(!0),function(e,r,n){0===e&&document.body.focus(),n||(e.focus(),document.activeElement!==e&&(e.setAttribute("tabindex","-1"),e.focus(),e.style.outline="none"),t.scrollTo(0,r))}(n,r,f),s("scrollStop",c,n,o),b=null,y=null,!0},E=function(e){b||(b=e),g=(S+=e-b)/parseInt(c.speed,10),w=m+O*function(t,e){var r;return"easeInQuad"===t.easing&&(r=e*e),"easeOutQuad"===t.easing&&(r=e*(2-e)),"easeInOutQuad"===t.easing&&(r=e<.5?2*e*e:(4-2*e)*e-1),"easeInCubic"===t.easing&&(r=e*e*e),"easeOutCubic"===t.easing&&(r=--e*e*e+1),"easeInOutCubic"===t.easing&&(r=e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1),"easeInQuart"===t.easing&&(r=e*e*e*e),"easeOutQuart"===t.easing&&(r=1- --e*e*e*e),"easeInOutQuart"===t.easing&&(r=e<.5?8*e*e*e*e:1-8*--e*e*e*e),"easeInQuint"===t.easing&&(r=e*e*e*e*e),"easeOutQuint"===t.easing&&(r=1+--e*e*e*e*e),"easeInOutQuint"===t.easing&&(r=e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e),t.customEasing&&(r=t.customEasing(e)),r||e}(c,g=g>1?1:g),t.scrollTo(0,Math.floor(w)),T(w,_)||(y=t.requestAnimationFrame(E),b=e)};0===t.pageYOffset&&t.scrollTo(0,0),function(t,e,r){e||history.pushState&&r.updateURL&&history.pushState({smoothScroll:JSON.stringify(r),anchor:t.id},document.title,t===document.documentElement?"#top":"#"+t.id)}(n,f,c),s("scrollStart",c,n,o),v.cancelScroll(!0),t.requestAnimationFrame(E)}}},m=function(e){if(!("matchMedia"in t&&t.matchMedia("(prefers-reduced-motion)").matches)&&0===e.button&&!e.metaKey&&!e.ctrlKey&&"closest"in e.target&&(f=e.target.closest(n))&&"a"===f.tagName.toLowerCase()&&!e.target.closest(l.ignore)&&f.hostname===t.location.hostname&&f.pathname===t.location.pathname&&/#/.test(f.href)){var r=i(o(f.hash)),a=l.topOnEmptyHash&&"#"===r?document.documentElement:document.querySelector(r);(a=a||"#top"!==r?a:document.documentElement)&&(e.preventDefault(),v.animateScroll(a,f))}},b=function(t){if(history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(l)&&history.state.anchor){var e=document.querySelector(i(o(history.state.anchor)));e&&v.animateScroll(e,null,{updateURL:!1})}},g=function(t){p||(p=setTimeout(function(){p=null,d=u(h)},66))};return v.destroy=function(){l&&(document.removeEventListener("click",m,!1),t.removeEventListener("resize",g,!1),t.removeEventListener("popstate",b,!1),v.cancelScroll(),l=null,null,f=null,h=null,d=null,p=null,y=null)},v.init=function(n){if(!("querySelector"in document&&"addEventListener"in t&&"requestAnimationFrame"in t&&"closest"in t.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";v.destroy(),l=r(e,n||{}),h=l.header?document.querySelector(l.header):null,d=u(h),document.addEventListener("click",m,!1),h&&t.addEventListener("resize",g,!1),l.updateURL&&l.popstate&&t.addEventListener("popstate",b,!1)},v.init(c),v}}(r)}.apply(e,[]))||(t.exports=n)}(void 0!==r?r:"undefined"!=typeof window?window:this)}).call(this,r(0))},function(t,e,r){},,function(t,e){!function(t){"use strict";if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=function(t){return t&&DataView.prototype.isPrototypeOf(t)},o=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};l.prototype.append=function(t,e){t=u(t),e=s(e);var r=this.map[t];this.map[t]=r?r+","+e:e},l.prototype.delete=function(t){delete this.map[u(t)]},l.prototype.get=function(t){return t=u(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(u(t))},l.prototype.set=function(t,e){this.map[u(t)]=s(e)},l.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},l.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),c(t)},l.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),c(t)},l.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),c(t)},e.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},y.call(v.prototype),y.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var a=[301,302,303,307,308];b.redirect=function(t,e){if(-1===a.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},t.Headers=l,t.Request=v,t.Response=b,t.fetch=function(t,r){return new Promise(function(n,o){var i=new v(t,r),a=new XMLHttpRequest;a.onload=function(){var t={status:a.status,statusText:a.statusText,headers:function(t){var e=new l;return t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}}),e}(a.getAllResponseHeaders()||"")};t.url="responseURL"in a?a.responseURL:t.headers.get("X-Request-URL");var e="response"in a?a.response:a.responseText;n(new b(e,t))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&e.blob&&(a.responseType="blob"),i.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function s(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(r[Symbol.iterator]=function(){return r}),r}function l(t){this.map={},t instanceof l?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function h(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function d(t){var e=new FileReader,r=h(e);return e.readAsArrayBuffer(t),r}function p(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&n(t))this._bodyArrayBuffer=p(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!o(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=p(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=h(e);return e.readAsText(t),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function m(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}}),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},function(t,e,r){},,function(t,e,r){"use strict";r.r(e);var n=Object.defineProperty;function o(t,e,r){var o=r.configurable,i=r.enumerable,a=r.initializer,u=r.value;return{configurable:o,enumerable:i,get:function(){if(this!==t){var r=a?a.call(this):u;return n(this,e,{configurable:o,enumerable:i,writable:!0,value:r}),r}},set:E(e)}}function i(){for(var t=arguments.length,e=Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:e.key)+arguments[2]})}},{key:"key",get:function(){return this.childDescriptor.key}},{key:"parentNotation",get:function(){return this.parentKlass.constructor.name+"#"+this.parentPropertySignature}},{key:"childNotation",get:function(){return this.childKlass.constructor.name+"#"+this.childPropertySignature}},{key:"parentTopic",get:function(){return this._getTopic(this.parentDescriptor)}},{key:"childTopic",get:function(){return this._getTopic(this.childDescriptor)}},{key:"parentPropertySignature",get:function(){return this._extractTopicSignature(this.parentTopic)}},{key:"childPropertySignature",get:function(){return this._extractTopicSignature(this.childTopic)}}]),L(t,[{key:"assert",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!0!==t&&this.error("{child} does not properly override {parent}"+e)}},{key:"error",value:function(t){var e=this;throw t=t.replace("{parent}",function(t){return e.parentNotation}).replace("{child}",function(t){return e.childNotation}),new SyntaxError(t)}}]),t}();function U(t){return t.hasOwnProperty("value")?"data":t.hasOwnProperty("get")||t.hasOwnProperty("set")?"accessor":"data"}function B(t,e,r){r.assert(t.length===e.length)}function R(t,e,r){var n=U(t),o=U(e);switch(n!==o&&r.error('descriptor types do not match. {parent} is "'+n+'", {child} is "'+o+'"'),o){case"data":!function(t,e,r){var n=I(t.value),o=I(e.value);switch("undefined"===n&&"undefined"===o&&r.error("descriptor values are both undefined. (class properties are are not currently supported)'"),n!==o&&("function"===o&&void 0===n||void 0!==n)&&r.error('value types do not match. {parent} is "'+n+'", {child} is "'+o+'"'),o){case"function":B(t.value,e.value,r);break;default:r.error('Unexpected error. Please file a bug with: {parent} is "'+n+'", {child} is "'+o+'"')}}(t,e,r);break;case"accessor":!function(t,e,r){var n="function"==typeof t.get,o="function"==typeof e.get,i="function"==typeof t.set,a="function"==typeof e.set;(n||o)&&(!n&&i&&r.error("{parent} is setter but {child} is getter"),!o&&a&&r.error("{parent} is getter but {child} is setter"),B(t.get,e.get,r)),(i||a)&&(!i&&n&&r.error("{parent} is getter but {child} is setter"),!a&&o&&r.error("{parent} is setter but {child} is getter"),B(t.set,e.set,r))}(t,e,r)}}var F=[function(t){return t.toLowerCase()},function(t){return t.toUpperCase()},function(t){return t+"s"},function(t){return t.slice(0,-1)},function(t){return t.slice(1,t.length)}];function z(t,e,r){r.key=e;var n=Object.getPrototypeOf(t),o=Object.getOwnPropertyDescriptor(n,e),i=new D(n,t,o,r);if(void 0===o){var a=function(t,e){for(var r=0,n=F.length;rs||"function"==typeof s&&s.apply(this,arguments))&&(l.profile(a),e.profileLastRan=t);try{return f.apply(this,arguments)}finally{l.profileEnd(a)}}})}function Vt(){for(var t=arguments.length,e=Array(t),r=0;r1)for(var r=1;r=1&&e<=31||127==e||0===o&&e>=48&&e<=57||1===o&&e>=48&&e<=57&&45===a?"\\"+e.toString(16)+" ":e>=128||45===e||95===e||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?r.charAt(o):"\\"+r.charAt(o)}var u;try{u=decodeURIComponent("#"+i)}catch(t){u="#"+i}return u},a=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},u=function(t){return t?n(t)+t.offsetTop:0},s=function(e,r,n,o){if(r.emitEvents&&"function"==typeof t.CustomEvent){var i=new CustomEvent(e,{bubbles:!0,detail:{anchor:n,toggle:o}});document.dispatchEvent(i)}};return function(n,c){var l,f,h,d,p,y,v={cancelScroll:function(t){cancelAnimationFrame(y),y=null,t||s("scrollCancel",l)},animateScroll:function(n,o,i){var c=r(l||e,i||{}),f="[object Number]"===Object.prototype.toString.call(n),p=f||!n.tagName?null:n;if(f||p){var m=t.pageYOffset;c.header&&!h&&(h=document.querySelector(c.header)),d||(d=u(h));var b,g,w,_=f?n:function(e,r,n,o){var i=0;if(e.offsetParent)do{i+=e.offsetTop,e=e.offsetParent}while(e);return i=Math.max(i-r-n,0),o&&(i=Math.min(i,a()-t.innerHeight)),i}(p,d,parseInt("function"==typeof c.offset?c.offset(n,o):c.offset,10),c.clip),O=_-m,A=a(),S=0,T=function(e,r){var i=t.pageYOffset;if(e==r||i==r||(m=A)return v.cancelScroll(!0),function(e,r,n){0===e&&document.body.focus(),n||(e.focus(),document.activeElement!==e&&(e.setAttribute("tabindex","-1"),e.focus(),e.style.outline="none"),t.scrollTo(0,r))}(n,r,f),s("scrollStop",c,n,o),b=null,y=null,!0},E=function(e){b||(b=e),g=(S+=e-b)/parseInt(c.speed,10),w=m+O*function(t,e){var r;return"easeInQuad"===t.easing&&(r=e*e),"easeOutQuad"===t.easing&&(r=e*(2-e)),"easeInOutQuad"===t.easing&&(r=e<.5?2*e*e:(4-2*e)*e-1),"easeInCubic"===t.easing&&(r=e*e*e),"easeOutCubic"===t.easing&&(r=--e*e*e+1),"easeInOutCubic"===t.easing&&(r=e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1),"easeInQuart"===t.easing&&(r=e*e*e*e),"easeOutQuart"===t.easing&&(r=1- --e*e*e*e),"easeInOutQuart"===t.easing&&(r=e<.5?8*e*e*e*e:1-8*--e*e*e*e),"easeInQuint"===t.easing&&(r=e*e*e*e*e),"easeOutQuint"===t.easing&&(r=1+--e*e*e*e*e),"easeInOutQuint"===t.easing&&(r=e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e),t.customEasing&&(r=t.customEasing(e)),r||e}(c,g=g>1?1:g),t.scrollTo(0,Math.floor(w)),T(w,_)||(y=t.requestAnimationFrame(E),b=e)};0===t.pageYOffset&&t.scrollTo(0,0),function(t,e,r){e||history.pushState&&r.updateURL&&history.pushState({smoothScroll:JSON.stringify(r),anchor:t.id},document.title,t===document.documentElement?"#top":"#"+t.id)}(n,f,c),s("scrollStart",c,n,o),v.cancelScroll(!0),t.requestAnimationFrame(E)}}},m=function(e){if(!("matchMedia"in t&&t.matchMedia("(prefers-reduced-motion)").matches)&&0===e.button&&!e.metaKey&&!e.ctrlKey&&"closest"in e.target&&(f=e.target.closest(n))&&"a"===f.tagName.toLowerCase()&&!e.target.closest(l.ignore)&&f.hostname===t.location.hostname&&f.pathname===t.location.pathname&&/#/.test(f.href)){var r=i(o(f.hash)),a=l.topOnEmptyHash&&"#"===r?document.documentElement:document.querySelector(r);(a=a||"#top"!==r?a:document.documentElement)&&(e.preventDefault(),v.animateScroll(a,f))}},b=function(t){if(history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(l)&&history.state.anchor){var e=document.querySelector(i(o(history.state.anchor)));e&&v.animateScroll(e,null,{updateURL:!1})}},g=function(t){p||(p=setTimeout(function(){p=null,d=u(h)},66))};return v.destroy=function(){l&&(document.removeEventListener("click",m,!1),t.removeEventListener("resize",g,!1),t.removeEventListener("popstate",b,!1),v.cancelScroll(),l=null,null,f=null,h=null,d=null,p=null,y=null)},v.init=function(n){if(!("querySelector"in document&&"addEventListener"in t&&"requestAnimationFrame"in t&&"closest"in t.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";v.destroy(),l=r(e,n||{}),h=l.header?document.querySelector(l.header):null,d=u(h),document.addEventListener("click",m,!1),h&&t.addEventListener("resize",g,!1),l.updateURL&&l.popstate&&t.addEventListener("popstate",b,!1)},v.init(c),v}}(r)}.apply(e,[]))||(t.exports=n)}(void 0!==r?r:"undefined"!=typeof window?window:this)}).call(this,r(0))},function(t,e,r){},,function(t,e){!function(t){"use strict";if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=function(t){return t&&DataView.prototype.isPrototypeOf(t)},o=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};l.prototype.append=function(t,e){t=u(t),e=s(e);var r=this.map[t];this.map[t]=r?r+","+e:e},l.prototype.delete=function(t){delete this.map[u(t)]},l.prototype.get=function(t){return t=u(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(u(t))},l.prototype.set=function(t,e){this.map[u(t)]=s(e)},l.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},l.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),c(t)},l.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),c(t)},l.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),c(t)},e.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},y.call(v.prototype),y.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var a=[301,302,303,307,308];b.redirect=function(t,e){if(-1===a.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},t.Headers=l,t.Request=v,t.Response=b,t.fetch=function(t,r){return new Promise(function(n,o){var i=new v(t,r),a=new XMLHttpRequest;a.onload=function(){var t={status:a.status,statusText:a.statusText,headers:function(t){var e=new l;return t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}}),e}(a.getAllResponseHeaders()||"")};t.url="responseURL"in a?a.responseURL:t.headers.get("X-Request-URL");var e="response"in a?a.response:a.responseText;n(new b(e,t))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&e.blob&&(a.responseType="blob"),i.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function s(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(r[Symbol.iterator]=function(){return r}),r}function l(t){this.map={},t instanceof l?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function h(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function d(t){var e=new FileReader,r=h(e);return e.readAsArrayBuffer(t),r}function p(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&n(t))this._bodyArrayBuffer=p(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!o(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=p(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=h(e);return e.readAsText(t),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function m(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}}),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},function(t,e,r){},,function(t,e,r){"use strict";r.r(e);var n=Object.defineProperty;function o(t,e,r){var o=r.configurable,i=r.enumerable,a=r.initializer,u=r.value;return{configurable:o,enumerable:i,get:function(){if(this!==t){var r=a?a.call(this):u;return n(this,e,{configurable:o,enumerable:i,writable:!0,value:r}),r}},set:E(e)}}function i(){for(var t=arguments.length,e=Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:e.key)+arguments[2]})}},{key:"key",get:function(){return this.childDescriptor.key}},{key:"parentNotation",get:function(){return this.parentKlass.constructor.name+"#"+this.parentPropertySignature}},{key:"childNotation",get:function(){return this.childKlass.constructor.name+"#"+this.childPropertySignature}},{key:"parentTopic",get:function(){return this._getTopic(this.parentDescriptor)}},{key:"childTopic",get:function(){return this._getTopic(this.childDescriptor)}},{key:"parentPropertySignature",get:function(){return this._extractTopicSignature(this.parentTopic)}},{key:"childPropertySignature",get:function(){return this._extractTopicSignature(this.childTopic)}}]),L(t,[{key:"assert",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!0!==t&&this.error("{child} does not properly override {parent}"+e)}},{key:"error",value:function(t){var e=this;throw t=t.replace("{parent}",function(t){return e.parentNotation}).replace("{child}",function(t){return e.childNotation}),new SyntaxError(t)}}]),t}();function U(t){return t.hasOwnProperty("value")?"data":t.hasOwnProperty("get")||t.hasOwnProperty("set")?"accessor":"data"}function B(t,e,r){r.assert(t.length===e.length)}function R(t,e,r){var n=U(t),o=U(e);switch(n!==o&&r.error('descriptor types do not match. {parent} is "'+n+'", {child} is "'+o+'"'),o){case"data":!function(t,e,r){var n=I(t.value),o=I(e.value);switch("undefined"===n&&"undefined"===o&&r.error("descriptor values are both undefined. (class properties are are not currently supported)'"),n!==o&&("function"===o&&void 0===n||void 0!==n)&&r.error('value types do not match. {parent} is "'+n+'", {child} is "'+o+'"'),o){case"function":B(t.value,e.value,r);break;default:r.error('Unexpected error. Please file a bug with: {parent} is "'+n+'", {child} is "'+o+'"')}}(t,e,r);break;case"accessor":!function(t,e,r){var n="function"==typeof t.get,o="function"==typeof e.get,i="function"==typeof t.set,a="function"==typeof e.set;(n||o)&&(!n&&i&&r.error("{parent} is setter but {child} is getter"),!o&&a&&r.error("{parent} is getter but {child} is setter"),B(t.get,e.get,r)),(i||a)&&(!i&&n&&r.error("{parent} is getter but {child} is setter"),!a&&o&&r.error("{parent} is setter but {child} is getter"),B(t.set,e.set,r))}(t,e,r)}}var F=[function(t){return t.toLowerCase()},function(t){return t.toUpperCase()},function(t){return t+"s"},function(t){return t.slice(0,-1)},function(t){return t.slice(1,t.length)}];function z(t,e,r){r.key=e;var n=Object.getPrototypeOf(t),o=Object.getOwnPropertyDescriptor(n,e),i=new D(n,t,o,r);if(void 0===o){var a=function(t,e){for(var r=0,n=F.length;rs||"function"==typeof s&&s.apply(this,arguments))&&(l.profile(a),e.profileLastRan=t);try{return f.apply(this,arguments)}finally{l.profileEnd(a)}}})}function Vt(){for(var t=arguments.length,e=Array(t),r=0;r