!function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var l,c,p,f;
/* Riot v5.1.1, @license MIT */function h(t){return t.replace(/-(\w)/g,(function(t,e){return e.toUpperCase()}))}function d(t,e){t.firstChild&&(e.appendChild(t.firstChild),d(t,e))}function m(t){Array.from(t).forEach(g)}var g=function(t){return t&&t.parentNode&&t.parentNode.removeChild(t)},y=function(t,e){return e&&e.parentNode&&e.parentNode.insertBefore(t,e)},v={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4},b={ATTRIBUTE:0,EVENT:1,TEXT:2,VALUE:3};function x(e,n){return t(e)===n}function T(t){var e=t.ownerSVGElement;return!!e||null===e}function w(t){return!N(t.content)}function A(t){return x(t,"function")}function E(t){return!N(t)&&x(t,"object")}function N(t){return null==t}var S=Symbol("unmount"),O={nodes:[],mount:function(t,e){return this.update(t,e)},update:function(t,e){var n=this.placeholder,r=this.nodes,i=this.childrenMap,o=t===S?null:this.evaluate(t),s=o?Array.from(o):[],u=(n.parentNode,function(t,e,n,r){var i=r.condition,o=r.template,s=r.childrenMap,u=r.itemName,l=r.getKey,c=r.indexName,p=r.root,f=r.isTemplateTag,h=new Map,d=[],m=[];return t.forEach((function(t,r){var g=function(t,e){var n=e.itemName,r=e.indexName,i=e.index,o=e.item;t[n]=o,r&&(t[r]=i);return t}(Object.create(e),{itemName:u,indexName:c,index:r,item:t}),y=l?l(g):r,v=s.get(y);if(!function(t,e){return!!t&&!1===Boolean(t(e))}(i,g)){var b=v?v.template:o.clone(),x=v?b.el:p.cloneNode(),T=!v,w=f&&T?function(t){var e=t.dom.cloneNode(!0);return{avoidDOMInjection:!0,fragment:e,children:Array.from(e.childNodes)}}(b):{};if(T?d.push((function(){return b.mount(x,g,n,w)})):d.push((function(){return b.update(g,n)})),f){var A=w.children||b.children;m.push.apply(m,a(A))}else m.push(x);s.delete(y),h.set(y,{template:b,context:g,index:r})}})),{newChildrenMap:h,batches:d,futureNodes:m}}(s,t,e,this)),l=u.newChildrenMap,c=u.batches,p=u.futureNodes;return function(t,e,n,r,i){for(var o,a,s=n.length,u=e.length,l=s,c=0,p=0,f=null;c<u||p<l;)if(u===c)for(var h=l<s?p?r(n[p-1],-0).nextSibling:r(n[l-p],0):i;p<l;)y(r(n[p++],1),h);else if(l===p)for(;c<u;)f&&f.has(e[c])||g(r(e[c],-1)),c++;else if(e[c]===n[p])c++,p++;else if(e[u-1]===n[l-1])u--,l--;else if(e[c]===n[l-1]&&n[p]===e[u-1]){var d=r(e[--u],-1).nextSibling;y(r(n[p++],1),r(e[c++],-1).nextSibling),y(r(n[--l],1),d),e[u]=n[l]}else{if(!f){f=new Map;for(var m=p;m<l;)f.set(n[m],m++)}if(f.has(e[c])){var v=f.get(e[c]);if(p<v&&v<l){for(var b=c,x=1;++b<u&&b<l&&f.get(e[b])===v+x;)x++;if(x>v-p)for(var T=r(e[c],0);p<v;)y(r(n[p++],1),T);else o=r(n[p++],1),(a=r(e[c++],-1))&&a.parentNode&&a.parentNode.replaceChild(o,a)}else c++}else g(r(e[c++],-1))}}(0,r,p,function(t,e){return function(n,r){if(r<0){var i=t.pop();if(i){var o=i.template,a=i.context;o.unmount(a,e,null)}}return n}}(Array.from(i.values()),e),n),c.forEach((function(t){return t()})),this.childrenMap=l,this.nodes=p,this},unmount:function(t,e){return this.update(S,e),this}};var j={mount:function(t,e){return this.update(t,e)},update:function(t,e){var n,r=this,i=!!this.evaluate(t),o=!this.value&&i,a=this.value&&!i;switch(!0){case o:n=r.node.cloneNode(),y(n,r.placeholder),r.template=r.template.clone(),r.template.mount(n,t,e);break;case a:this.unmount(t);break;default:i&&this.template.update(t,e)}return this.value=i,this},unmount:function(t,e){return this.template.unmount(t,e,!0),this}};function M(t){throw new Error(t)}function I(t){return t.reduce((function(t,e){var n=e.value,r=e.type;switch(!0){case!e.name&&0===r:return Object.assign({},t,n);case 3===r:t.value=e.value;break;default:t[h(e.name)]=e.value}return t}),{})}var _="removeAttribute",C="setAttribute",k="undefined"==typeof Element?{}:Element.prototype,z=function(t){var e=this,n=new Map,r=function(r){return(n.has(r)||n.set(r,t.call(e,r)))&&n.get(r)};return r.cache=n,r}((function(t){return k.hasOwnProperty(t)}));function U(t,e,n,r){var i=e.name;if(!i)return r&&function(t,e,n){var r=e?Object.keys(e):[];Object.keys(n).filter((function(t){return!r.includes(t)})).forEach((function(e){return t.removeAttribute(e)}))}(t,n,r),void(n&&function(t,e){Object.entries(e).forEach((function(e){var n=o(e,2),r=n[0],i=n[1];return U(t,{name:r},i)}))}(t,n));!z(i)&&(function(t){return x(t,"boolean")}(n)||E(n)||A(n))&&(t[i]=n),t[function(t){return N(t)||!1===t||""===t||E(t)||A(t)?_:C}(n)](i,function(t,e){return!0===e?t:e}(i,n))}var B=/^on/,R={handleEvent:function(t){this[t.type](t)}},F=new WeakMap;function P(t){return N(t)?"":t}var L=function(t,e){var n=t.childNodes[e];if(n.nodeType===Node.COMMENT_NODE){var r=document.createTextNode("");return t.replaceChild(r,n),r}return n};var D=(i(l={},0,U),i(l,1,(function(t,e,n){var r=e.name.replace(B,""),i=F.get(t)||function(t){var e=Object.create(R);return F.set(t,e),e}(t),a=o(function(t){return Array.isArray(t)?t:[t,!1]}(n),2),s=a[0],u=a[1],l=i[r],c=s&&!l;l&&!s&&t.removeEventListener(r,i),c&&t.addEventListener(r,i,u),i[r]=s})),i(l,2,(function(t,e,n){t.data=P(n)})),i(l,3,(function(t,e,n){t.value=P(n)})),l),K={mount:function(t){return this.value=this.evaluate(t),H(this,this.value),this},update:function(t){var e=this.evaluate(t);return this.value!==e&&(H(this,e),this.value=e),this},unmount:function(){return 1===this.type&&H(this,null),this}};function H(t,e){return D[t.type](t.node,t,e,t.value)}function Y(t,e){return Object.assign({},K,e,{node:2===e.type?L(t,e.childNodeIndex):t})}var $=new Map,W=Symbol("riot-component"),V=new Set,X="is",G="mount",Z="update",q="unmount",J="shouldUpdate",Q="onBeforeMount",tt="onMounted",et="onBeforeUpdate",nt="onUpdated",rt="onBeforeUnmount",it="onUnmounted",ot="props",at="state",st="slots",ut="root",lt=Symbol.for("pure"),ct=Symbol("parent"),pt=Symbol("attributes"),ft=Symbol("template"),ht=Object.freeze({__proto__:null,COMPONENTS_IMPLEMENTATION_MAP:$,DOM_COMPONENT_INSTANCE_PROPERTY:W,PLUGINS_SET:V,IS_DIRECTIVE:X,VALUE_ATTRIBUTE:"value",MOUNT_METHOD_KEY:G,UPDATE_METHOD_KEY:Z,UNMOUNT_METHOD_KEY:q,SHOULD_UPDATE_KEY:J,ON_BEFORE_MOUNT_KEY:Q,ON_MOUNTED_KEY:tt,ON_BEFORE_UPDATE_KEY:et,ON_UPDATED_KEY:nt,ON_BEFORE_UNMOUNT_KEY:rt,ON_UNMOUNTED_KEY:it,PROPS_KEY:ot,STATE_KEY:at,SLOTS_KEY:st,ROOT_KEY:ut,IS_PURE_SYMBOL:lt,PARENT_KEY_SYMBOL:ct,ATTRIBUTES_KEY_SYMBOL:pt,TEMPLATE_KEY_SYMBOL:ft});var dt=function(t,e){return t[ct]||e},mt={attributes:[],getTemplateScope:function(t,e){return function(t,e,n){if(!t||!t.length)return n;var r=t.map((function(t){return Object.assign({},t,{value:t.evaluate(e)})}));return Object.assign(Object.create(n||null),I(r))}(this.attributes,t,e)},mount:function(t,e){var n=this,r=!!t.slots&&t.slots.find((function(t){return t.id===n.name})),i=this.node.parentNode,o=dt(t,e);return this.template=r&&At(r.html,r.bindings).createDOM(i),this.template&&(this.template.mount(this.node,this.getTemplateScope(t,o),o),this.template.children=Array.from(this.node.childNodes),gt(this.node)),g(this.node),this},update:function(t,e){if(this.template){var n=dt(t,e);this.template.update(this.getTemplateScope(t,n),n)}return this},unmount:function(t,e,n){return this.template&&this.template.unmount(this.getTemplateScope(t,e),null,n),this}};function gt(t){var e=t&&t.firstChild;e&&(y(e,t),gt(t))}var yt={mount:function(t){return this.update(t)},update:function(t,e){var n=this.evaluate(t);return n===this.name?this.tag.update(t):(this.unmount(t,e,!0),this.name=n,this.tag=function(t,e,n){return void 0===e&&(e=[]),void 0===n&&(n=[]),t?t({slots:e,attributes:n}):At(function(t){return t.reduce((function(t,e){return t+e.html}),"")}(e),[].concat(a(function(t){return t.reduce((function(t,e){var n=e.bindings;return t.concat(n)}),[])}(e)),[{expressions:n.map((function(t){return Object.assign({type:0},t)}))}]))}(this.getComponent(n),this.slots,this.attributes),this.tag.mount(this.node,t)),this},unmount:function(t,e,n){return this.tag&&this.tag.unmount(n),this}};var vt=(i(c={},1,(function(t,e){var n=e.evaluate,r=e.template,i=document.createTextNode("");return y(i,t),g(t),Object.assign({},j,{node:t,evaluate:n,placeholder:i,template:r.createDOM(t)})})),i(c,2,(function(t,e){var n,r,o=e.expressions;return Object.assign({},(n=o.map((function(e){return Y(t,e)})),["mount","update","unmount"].reduce((function(t,e){return Object.assign({},t,i({},e,(function(t){return n.map((function(n){return n[e](t)}))&&r})))}),{})))})),i(c,0,(function(t,e){var n=e.evaluate,r=e.condition,i=e.itemName,o=e.indexName,a=e.getKey,s=e.template,u=document.createTextNode(""),l=t.cloneNode();return y(u,t),g(t),Object.assign({},O,{childrenMap:new Map,node:t,root:l,condition:r,evaluate:n,isTemplateTag:w(l),template:s.createDOM(t),getKey:a,indexName:o,itemName:i,placeholder:u})})),i(c,3,(function(t,e){var n=e.evaluate,r=e.getComponent,i=e.slots,o=e.attributes;return Object.assign({},yt,{node:t,evaluate:n,slots:i,attributes:o,getComponent:r})})),i(c,4,(function(t,e){var n=e.name,r=e.attributes;return Object.assign({},mt,{attributes:r,node:t,name:n})})),c);function bt(t,e){return t.map((function(t){return 2===t.type?Object.assign({},t,{childNodeIndex:t.childNodeIndex+e}):t}))}function xt(t,e){return T(t)?function(t,e){return e.ownerDocument.importNode((new window.DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg">'.concat(t,"</svg>"),"application/xml").documentElement,!0)}(e,t):function(t,e){var n=w(e)?e:document.createElement("template");return n.innerHTML=t,n.content}(e,t)}function Tt(t,e){switch(!0){case T(t):d(e,t);break;case w(t):t.parentNode.replaceChild(e,t);break;default:t.appendChild(e)}}var wt=Object.freeze({createDOM:function(t){return this.dom=this.dom||function(t,e){return e&&("string"==typeof e?xt(t,e):e)}(t,this.html),this},mount:function(t,e,n,r){var i=this;if(void 0===r&&(r={}),!t)throw new Error("Please provide DOM node to mount properly your template");this.el&&this.unmount(e);var o=r,a=o.fragment,s=o.children,u=o.avoidDOMInjection,l=(s?s[0]:t).parentNode,c=w(t),p=c?Math.max(Array.from(l.childNodes).indexOf(t),0):null;return this.isTemplateTag=c,this.createDOM(t),this.dom&&(this.fragment=a||this.dom.cloneNode(!0)),this.el=this.isTemplateTag?l:t,this.children=this.isTemplateTag?s||Array.from(this.fragment.childNodes):null,!u&&this.fragment&&Tt(t,this.fragment),this.bindings=this.bindingsData.map((function(t){return function(t,e,n){var r=e.selector,i=e.type,o=e.redundantAttribute,a=e.expressions,s=r?t.querySelector(r):t;o&&s.removeAttribute(o);var u=a||[];return(vt[i]||vt[2])(s,Object.assign({},e,{expressions:n&&!r?bt(u,n):u}))}(i.el,t,p)})),this.bindings.forEach((function(t){return t.mount(e,n)})),this},update:function(t,e){return this.bindings.forEach((function(n){return n.update(t,e)})),this},unmount:function(t,e,n){if(this.el){switch(this.bindings.forEach((function(r){return r.unmount(t,e,n)})),!0){case this.children&&null!==n:m(this.children);break;case!0===n:g(this.el);break;case null!==n:m(this.el.childNodes)}this.el=null}return this},clone:function(){return Object.assign({},this,{el:null})}});function At(t,e){return void 0===e&&(e=[]),Object.assign({},wt,{html:t,bindingsData:e})}function Et(){return this}function Nt(t){return A(t)?t.prototype&&t.prototype.constructor?new t:t():t}function St(t,e,n,r){return void 0===r&&(r={}),Object.defineProperty(t,e,Object.assign({value:n,enumerable:!1,writable:!1,configurable:!0},r)),t}function Ot(t,e,n){return Object.entries(e).forEach((function(e){var r=o(e,2),i=r[0],a=r[1];St(t,i,a,n)})),t}function jt(t,e){return Object.entries(e).forEach((function(e){var n=o(e,2),r=n[0],i=n[1];t[r]||(t[r]=i)})),t}function Mt(t){return Array.isArray(t)?t:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&"number"==typeof t.length?Array.from(t):[t]}function It(t,e){return Mt("string"==typeof t?(e||document).querySelectorAll(t):t)}var _t=function(t){return 1===t.length?t[0]:t};function Ct(e,n,r){var o="object"===t(n)?n:i({},n,r),a=Object.keys(o);return Mt(e).forEach((function(t){a.forEach((function(e){return t.setAttribute(e,o[e])}))})),e}function kt(t,e){return function(t,e,n){var r="string"==typeof e?[e]:e;return _t(Mt(t).map((function(t){return _t(r.map((function(e){return t[n](e)})))})))}(t,e,"getAttribute")}var zt,Ut=new Map,Bt=function(){return zt||(Ct(zt=It("style[riot]")[0]||document.createElement("style"),"type","text/css"),zt.parentNode||document.head.appendChild(zt),zt)},Rt={CSS_BY_NAME:Ut,add:function(t,e){return Ut.has(t)||(Ut.set(t,e),this.inject()),this},inject:function(){return Bt().innerHTML=a(Ut.values()).join("\n"),this},remove:function(t){return Ut.has(t)&&(Ut.delete(t),this.inject()),this}};function Ft(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return(r=[].concat(n,a(r))).length<t.length?Ft.apply(void 0,[t].concat(a(r))):t.apply(void 0,a(r))}}var Pt=Object.freeze({$:function(t){return It(t,this.root)[0]},$$:function(t){return It(t,this.root)}}),Lt=Object.freeze((i(p={},G,Et),i(p,Z,Et),i(p,q,Et),p)),Dt=Object.freeze((i(f={},J,Et),i(f,Q,Et),i(f,tt,Et),i(f,et,Et),i(f,nt,Et),i(f,rt,Et),i(f,it,Et),f)),Kt=Object.assign({},Lt,{clone:Et,createDOM:Et});function Ht(t,e){return void 0===e&&(e={}),Object.assign({},function(t){return Array.from(t.attributes).reduce((function(t,e){return t[h(e.name)]=e.value,t}),{})}(t),Nt(e))}var Yt=function(t,e){return t[W]=e};function $t(t){return[G,Z,q].reduce((function(e,n){return e[n]=t(n),e}),{})}function Wt(t){var e=t.css,n=t.template,r=t.exports,a=t.name,s=n?function(t,e){return t(At,b,v,(function(t){return e[t]||$.get(t)}))}(n,r?function(t){void 0===t&&(t={});return Object.entries(Nt(t)).reduce((function(t,e){var n,r=o(e,2),i=r[0],a=r[1];return t[(n=i,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=Wt(a),t}),{})}(r.components):{}):Kt;return function(t){var o=t.slots,u=t.attributes,l=t.props;if(r&&r[lt])return function(t,e){var n=e.slots,r=e.attributes,i=e.props,o=e.css;e.template&&M("Pure components can not have html"),o&&M("Pure components do not have css");var a=jt(t({slots:n,attributes:r,props:i}),Lt);return $t((function(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(t===G){var i=n[0];Yt(i,a)}return a[t].apply(a,n),a}}))}(r,{slots:o,attributes:u,props:l,css:e,template:n});var c=Nt(r)||{},p=function(t){var e,n=t.css,r=t.template,o=t.componentAPI,a=t.name;n&&a&&Rt.add(a,n);return Ft(Gt)(Ot(jt(o,Object.assign({},Dt,i({},at,{}))),Object.assign((i(e={},st,null),i(e,ut,null),e),Pt,{name:a,css:n,template:r})))}({css:e,template:s,componentAPI:c,name:a})({slots:o,attributes:u,props:l});return{mount:function(t,e,n){return p.mount(t,n,e)},update:function(t,e){return p.update(e,t)},unmount:function(t){return p.unmount(t)}}}}function Vt(t,e){return Object.assign({},t,Nt(e))}function Xt(t,e){(function(t){return kt(t,X)||t.tagName.toLowerCase()})(t)!==e&&Ct(t,X,e)}function Gt(t,e){var n,r=e.slots,i=e.attributes,o=e.props;return n=function(t){return a(V).reduce((function(t,e){return e(t)||t}),t)}(Ot(Object.create(t),{mount:function(e,n,a){return void 0===n&&(n={}),this[pt]=function(t,e){void 0===e&&(e=[]);var n=e.map((function(e){return Y(t,e)})),r={};return Object.assign(r,Object.assign({expressions:n},$t((function(t){return function(e){return n.forEach((function(n){return n[t](e)})),r}}))))}(e,i).mount(a),St(this,ot,Object.freeze(Object.assign({},Ht(e,o),I(this[pt].expressions)))),this.state=Vt(this.state,n),this[ft]=this.template.createDOM(e).clone(),Yt(e,this),t.name&&Xt(e,t.name),St(this,ut,e),St(this,st,r),this.onBeforeMount(this.props,this.state),this[ct]=a,this[ft].mount(e,this,a),this.onMounted(this.props,this.state),this},update:function(t,e){void 0===t&&(t={}),e&&(this[ct]=e,this[pt].update(e));var n=I(this[pt].expressions);if(!1!==this.shouldUpdate(n,this.props))return St(this,ot,Object.freeze(Object.assign({},this.props,n))),this.state=Vt(this.state,t),this.onBeforeUpdate(this.props,this.state),this[ft].update(this,this[ct]),this.onUpdated(this.props,this.state),this},unmount:function(t){return this.onBeforeUnmount(this.props,this.state),this[pt].unmount(),this[ft].unmount(this,this[ct],null===t?null:!t),this.onUnmounted(this.props,this.state),this}})),Object.keys(t).filter((function(e){return A(t[e])})).forEach((function(t){n[t]=n[t].bind(n)})),n}ht.DOM_COMPONENT_INSTANCE_PROPERTY,ht.COMPONENTS_IMPLEMENTATION_MAP,ht.PLUGINS_SET;var Zt={css:null,exports:{onMounted(){this.root.innerHTML=this.props.content,this.update()}},template:null,name:"annotation"};function qt(t){var e={exports:{}};return t(e,e.exports),e.exports}for(var Jt,Qt=qt((function(t){!function(){function e(t,e,n){return t.call.apply(t.bind,arguments)}function n(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function r(t,i,o){return(r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?e:n).apply(null,arguments)}var i=Date.now||function(){return+new Date};function o(t,e){this.a=t,this.o=e||t,this.c=this.o.document}var a=!!window.FontFace;function s(t,e,n,r){if(e=t.c.createElement(e),n)for(var i in n)n.hasOwnProperty(i)&&("style"==i?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r&&e.appendChild(t.c.createTextNode(r)),e}function u(t,e,n){(t=t.c.getElementsByTagName(e)[0])||(t=document.documentElement),t.insertBefore(n,t.lastChild)}function l(t){t.parentNode&&t.parentNode.removeChild(t)}function c(t,e,n){e=e||[],n=n||[];for(var r=t.className.split(/\s+/),i=0;i<e.length;i+=1){for(var o=!1,a=0;a<r.length;a+=1)if(e[i]===r[a]){o=!0;break}o||r.push(e[i])}for(e=[],i=0;i<r.length;i+=1){for(o=!1,a=0;a<n.length;a+=1)if(r[i]===n[a]){o=!0;break}o||e.push(r[i])}t.className=e.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function p(t,e){for(var n=t.className.split(/\s+/),r=0,i=n.length;r<i;r++)if(n[r]==e)return!0;return!1}function f(t,e,n){function r(){c&&i&&o&&(c(l),c=null)}e=s(t,"link",{rel:"stylesheet",href:e,media:"all"});var i=!1,o=!0,l=null,c=n||null;a?(e.onload=function(){i=!0,r()},e.onerror=function(){i=!0,l=Error("Stylesheet failed to load"),r()}):setTimeout((function(){i=!0,r()}),0),u(t,"head",e)}function h(t,e,n,r){var i=t.c.getElementsByTagName("head")[0];if(i){var o=s(t,"script",{src:e}),a=!1;return o.onload=o.onreadystatechange=function(){a||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(a=!0,n&&n(null),o.onload=o.onreadystatechange=null,"HEAD"==o.parentNode.tagName&&i.removeChild(o))},i.appendChild(o),setTimeout((function(){a||(a=!0,n&&n(Error("Script load timeout")))}),r||5e3),o}return null}function d(){this.a=0,this.c=null}function m(t){return t.a++,function(){t.a--,y(t)}}function g(t,e){t.c=e,y(t)}function y(t){0==t.a&&t.c&&(t.c(),t.c=null)}function v(t){this.a=t||"-"}function b(t,e){this.c=t,this.f=4,this.a="n";var n=(e||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function x(t){var e=[];t=t.split(/,\s*/);for(var n=0;n<t.length;n++){var r=t[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?e.push("'"+r+"'"):e.push(r)}return e.join(",")}function T(t){return t.a+t.f}function w(t){var e="normal";return"o"===t.a?e="oblique":"i"===t.a&&(e="italic"),e}function A(t){var e=4,n="n",r=null;return t&&((r=t.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=t.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?e=7:/[1-9]00/.test(r[1])&&(e=parseInt(r[1].substr(0,1),10)))),n+e}function E(t,e){this.c=t,this.f=t.o.document.documentElement,this.h=e,this.a=new v("-"),this.j=!1!==e.events,this.g=!1!==e.classes}function N(t){if(t.g){var e=p(t.f,t.a.c("wf","active")),n=[],r=[t.a.c("wf","loading")];e||n.push(t.a.c("wf","inactive")),c(t.f,n,r)}S(t,"inactive")}function S(t,e,n){t.j&&t.h[e]&&(n?t.h[e](n.c,T(n)):t.h[e]())}function O(){this.c={}}function j(t,e){this.c=t,this.f=e,this.a=s(this.c,"span",{"aria-hidden":"true"},this.f)}function M(t){u(t.c,"body",t.a)}function I(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+x(t.c)+";font-style:"+w(t)+";font-weight:"+t.f+"00;"}function _(t,e,n,r,i,o){this.g=t,this.j=e,this.a=r,this.c=n,this.f=i||3e3,this.h=o||void 0}function C(t,e,n,r,i,o,a){this.v=t,this.B=e,this.c=n,this.a=r,this.s=a||"BESbswy",this.f={},this.w=i||3e3,this.u=o||null,this.m=this.j=this.h=this.g=null,this.g=new j(this.c,this.s),this.h=new j(this.c,this.s),this.j=new j(this.c,this.s),this.m=new j(this.c,this.s),t=I(t=new b(this.a.c+",serif",T(this.a))),this.g.a.style.cssText=t,t=I(t=new b(this.a.c+",sans-serif",T(this.a))),this.h.a.style.cssText=t,t=I(t=new b("serif",T(this.a))),this.j.a.style.cssText=t,t=I(t=new b("sans-serif",T(this.a))),this.m.a.style.cssText=t,M(this.g),M(this.h),M(this.j),M(this.m)}v.prototype.c=function(t){for(var e=[],n=0;n<arguments.length;n++)e.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return e.join(this.a)},_.prototype.start=function(){var t=this.c.o.document,e=this,n=i(),r=new Promise((function(r,o){!function a(){i()-n>=e.f?o():t.fonts.load(function(t){return w(t)+" "+t.f+"00 300px "+x(t.c)}(e.a),e.h).then((function(t){1<=t.length?r():setTimeout(a,25)}),(function(){o()}))}()})),o=null,a=new Promise((function(t,n){o=setTimeout(n,e.f)}));Promise.race([a,r]).then((function(){o&&(clearTimeout(o),o=null),e.g(e.a)}),(function(){e.j(e.a)}))};var k={D:"serif",C:"sans-serif"},z=null;function U(){if(null===z){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);z=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return z}function B(t,e,n){for(var r in k)if(k.hasOwnProperty(r)&&e===t.f[k[r]]&&n===t.f[k[r]])return!0;return!1}function R(t){var e,n=t.g.a.offsetWidth,o=t.h.a.offsetWidth;(e=n===t.f.serif&&o===t.f["sans-serif"])||(e=U()&&B(t,n,o)),e?i()-t.A>=t.w?U()&&B(t,n,o)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?F(t,t.v):F(t,t.B):function(t){setTimeout(r((function(){R(this)}),t),50)}(t):F(t,t.v)}function F(t,e){setTimeout(r((function(){l(this.g.a),l(this.h.a),l(this.j.a),l(this.m.a),e(this.a)}),t),0)}function P(t,e,n){this.c=t,this.a=e,this.f=0,this.m=this.j=!1,this.s=n}C.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=i(),R(this)};var L=null;function D(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&c(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),S(t,"active")):N(t.a))}function K(t){this.j=t,this.a=new O,this.h=0,this.f=this.g=!0}function H(t,e,n,i,o){var a=0==--t.h;(t.f||t.g)&&setTimeout((function(){var t=o||null,s=i||{};if(0===n.length&&a)N(e.a);else{e.f+=n.length,a&&(e.j=a);var u,l=[];for(u=0;u<n.length;u++){var p=n[u],f=s[p.c],h=e.a,d=p;if(h.g&&c(h.f,[h.a.c("wf",d.c,T(d).toString(),"loading")]),S(h,"fontloading",d),h=null,null===L)if(window.FontFace){d=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var m=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);L=d?42<parseInt(d[1],10):!m}else L=!1;h=L?new _(r(e.g,e),r(e.h,e),e.c,p,e.s,f):new C(r(e.g,e),r(e.h,e),e.c,p,e.s,t,f),l.push(h)}for(u=0;u<l.length;u++)l[u].start()}}),0)}function Y(t,e){this.c=t,this.a=e}function $(t,e){this.c=t,this.a=e}function W(t,e){this.c=t||V,this.a=[],this.f=[],this.g=e||""}P.prototype.g=function(t){var e=this.a;e.g&&c(e.f,[e.a.c("wf",t.c,T(t).toString(),"active")],[e.a.c("wf",t.c,T(t).toString(),"loading"),e.a.c("wf",t.c,T(t).toString(),"inactive")]),S(e,"fontactive",t),this.m=!0,D(this)},P.prototype.h=function(t){var e=this.a;if(e.g){var n=p(e.f,e.a.c("wf",t.c,T(t).toString(),"active")),r=[],i=[e.a.c("wf",t.c,T(t).toString(),"loading")];n||r.push(e.a.c("wf",t.c,T(t).toString(),"inactive")),c(e.f,r,i)}S(e,"fontinactive",t),D(this)},K.prototype.load=function(t){this.c=new o(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,function(t,e,n){var r=[],i=n.timeout;!function(t){t.g&&c(t.f,[t.a.c("wf","loading")]),S(t,"loading")}(e);r=function(t,e,n){var r,i=[];for(r in e)if(e.hasOwnProperty(r)){var o=t.c[r];o&&i.push(o(e[r],n))}return i}(t.a,n,t.c);var o=new P(t.c,e,i);for(t.h=r.length,e=0,n=r.length;e<n;e++)r[e].load((function(e,n,r){H(t,o,e,n,r)}))}(this,new E(this.c,t),t)},Y.prototype.load=function(t){function e(){if(o["__mti_fntLst"+r]){var n,i=o["__mti_fntLst"+r](),a=[];if(i)for(var s=0;s<i.length;s++){var u=i[s].fontfamily;null!=i[s].fontStyle&&null!=i[s].fontWeight?(n=i[s].fontStyle+i[s].fontWeight,a.push(new b(u,n))):a.push(new b(u))}t(a)}else setTimeout((function(){e()}),50)}var n=this,r=n.a.projectId,i=n.a.version;if(r){var o=n.c.o;h(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+r+".js"+(i?"?v="+i:""),(function(i){i?t([]):(o["__MonotypeConfiguration__"+r]=function(){return n.a},e())})).id="__MonotypeAPIScript__"+r}else t([])},$.prototype.load=function(t){var e,n,r=this.a.urls||[],i=this.a.families||[],o=this.a.testStrings||{},a=new d;for(e=0,n=r.length;e<n;e++)f(this.c,r[e],m(a));var s=[];for(e=0,n=i.length;e<n;e++)if((r=i[e].split(":"))[1])for(var u=r[1].split(","),l=0;l<u.length;l+=1)s.push(new b(r[0],u[l]));else s.push(new b(r[0]));g(a,(function(){t(s,o)}))};var V="https://fonts.googleapis.com/css";function X(t){this.f=t,this.a=[],this.c={}}var G={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},Z={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},q={i:"i",italic:"i",n:"n",normal:"n"},J=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function Q(t,e){this.c=t,this.a=e}var tt={Arimo:!0,Cousine:!0,Tinos:!0};function et(t,e){this.c=t,this.a=e}function nt(t,e){this.c=t,this.f=e,this.a=[]}Q.prototype.load=function(t){var e=new d,n=this.c,r=new W(this.a.api,this.a.text),i=this.a.families;!function(t,e){for(var n=e.length,r=0;r<n;r++){var i=e[r].split(":");3==i.length&&t.f.push(i.pop());var o="";2==i.length&&""!=i[1]&&(o=":"),t.a.push(i.join(o))}}(r,i);var o=new X(i);!function(t){for(var e=t.f.length,n=0;n<e;n++){var r=t.f[n].split(":"),i=r[0].replace(/\+/g," "),o=["n4"];if(2<=r.length){var a;if(a=[],s=r[1])for(var s,u=(s=s.split(",")).length,l=0;l<u;l++){var c;if((c=s[l]).match(/^[\w-]+$/))if(null==(p=J.exec(c.toLowerCase())))c="";else{if(c=null==(c=p[2])||""==c?"n":q[c],null==(p=p[1])||""==p)p="4";else var p=Z[p]||(isNaN(p)?"4":p.substr(0,1));c=[c,p].join("")}else c="";c&&a.push(c)}0<a.length&&(o=a),3==r.length&&(a=[],0<(r=(r=r[2])?r.split(","):a).length&&(r=G[r[0]])&&(t.c[i]=r))}for(t.c[i]||(r=G[i])&&(t.c[i]=r),r=0;r<o.length;r+=1)t.a.push(new b(i,o[r]))}}(o),f(n,function(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var e=t.a.length,n=[],r=0;r<e;r++)n.push(t.a[r].replace(/ /g,"+"));return e=t.c+"?family="+n.join("%7C"),0<t.f.length&&(e+="&subset="+t.f.join(",")),0<t.g.length&&(e+="&text="+encodeURIComponent(t.g)),e}(r),m(e)),g(e,(function(){t(o.a,o.c,tt)}))},et.prototype.load=function(t){var e=this.a.id,n=this.c.o;e?h(this.c,(this.a.api||"https://use.typekit.net")+"/"+e+".js",(function(e){if(e)t([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){e=n.Typekit.config.fn;for(var r=[],i=0;i<e.length;i+=2)for(var o=e[i],a=e[i+1],s=0;s<a.length;s++)r.push(new b(o,a[s]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(t){}t(r)}}),2e3):t([])},nt.prototype.load=function(t){var e=this.f.id,n=this.c.o,r=this;e?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[e]=function(e,n){for(var i=0,o=n.fonts.length;i<o;++i){var a=n.fonts[i];r.a.push(new b(a.name,A("font-weight:"+a.weight+";font-style:"+a.style)))}t(r.a)},h(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(t){return t.o.location.hostname||t.a.location.hostname}(this.c)+"/"+e+".js",(function(e){e&&t([])}))):t([])};var rt=new K(window);rt.a.c.custom=function(t,e){return new $(e,t)},rt.a.c.fontdeck=function(t,e){return new nt(e,t)},rt.a.c.monotype=function(t,e){return new Y(e,t)},rt.a.c.typekit=function(t,e){return new et(e,t)},rt.a.c.google=function(t,e){return new Q(e,t)};var it={load:r(rt.load,rt)};t.exports?t.exports=it:(window.WebFont=it,window.WebFontConfig&&rt.load(window.WebFontConfig))}()})),te=qt((function(t){var e={};e.hex={rgb:function(t){return t&&null!=t.match(/^0x([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/i)?[(t>>8)+16*(t>>8),((240&t)>>4)+16*((240&t)>>4),(15&t)+16*(15&t)]:t&&null!=t.match(/^0x([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/i)?[t>>16,(65280&t)>>8,255&t]:void 0},rgba:function(t){var e=this.rgb(t);return e?[e[0],e[1],e[2],1]:null},hsl:function(t){var n=this.rgb(t);return n?e.rgb.hsl(n):null},hsla:function(t){var e=this.hsl(t);return!e||[e[0],e[1],e[2],1]},fromString:function(t){if(t)return(t=t.replace(/^#*/,"0x"))<=16777215&&(5==t.length||8==t.length)?t:void 0},toString:function(t){if(t)return t.replace(/^(0x)?/i,"#")},isValid:function(t){return null!=this.fromString(t)}},e.rgb={hex:function(t){if(t){var e=Number(t[0]).toString(16),n=Number(t[1]).toString(16),r=Number(t[2]).toString(16);return(1===e.length?"0":"")+e+(1===n.length?"0":"")+n+(1===r.length?"0":"")+r}},rgba:function(t){return t?[t[0],t[1],t[2],1]:null},hsl:function(t){if(t&&Array.isArray(t)&&!(t.length<3)){var e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(e,n,r),o=Math.min(e,n,r),a=i-o,s=0;switch(i){case o:s=0;break;case e:s=(n-r)/a+(n<r?6:0);break;case n:s=(r-e)/a+2;break;case r:s=(e-n)/a+4}var u=.5*(i+o);return[60*s,0==a?0:a/(1-Math.abs(2*u-1)),u]}},hsla:function(t){var e=this.hsl(t);return e?[e[0],e[1],e[2],1]:null},fromString:function(t){var e;if(t)return(null!=(e=(t=t.replace(/ /g,"")).match(/^rgb\(([0-9]+),([0-9]+),([0-9]+)\)$/i))||null!=(e=t.match(/^\[?([0-9]+),([0-9]+),([0-9]+)\]?$/)))&&e[1]<=255&&e[2]<=255&&e[3]<=255?[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]:void 0},toString:function(t){if(t&&Array.isArray(t)&&3==t.length)return"rgb("+t[0]+","+t[1]+","+t[2]+")"},convertFromString:function(t){return e.hex.rgb(e.hex.fromString(t))||e.hsl.rgb(e.hsl.fromString(t))||e.rgb.fromString(t)},isValid:function(t){return null!=this.fromString(t)}},e.rgba={hex:function(t){return t?e.rgb.hex(t):null},rgb:function(t){return t?[t[0],t[1],t[2]]:null},hsl:function(t){return e.rgb.hsl(t)},hsla:function(t){var n=e.rgb.hsl(t);return n?[n[0],n[1],n[2],t[3]]:null},fromString:function(t){var e;if(t)return null!=(e=(t=t.replace(/ /g,"")).match(/^rgba\(([0-9]+),([0-9]+),([0-9]+),([0-9.]+)\)$/i))||null!=(e=t.match(/^\[?([0-9]+),([0-9]+),([0-9]+),([0-9.]+)\]?$/))?[parseInt(e[1]),parseInt(e[2]),parseInt(e[3]),parseInt(e[4])]:void 0},toString:function(t){if(t&&Array.isArray(t)&&t.length>=4)return"rgba("+Math.round(t[0])+","+Math.round(t[1])+","+Math.round(t[2])+","+t[3]+")"},isValid:function(t){return null!=this.fromString(t)}},e.hsl={hex:function(t){var n=e.hsl.rgb(t);return n?e.rgb.hex(n):null},rgb:function(t){if(t){var e,n=t[0],r=t[1],i=t[2],o=(1-Math.abs(2*i-1))*r,a=o*(1-Math.abs(n/60%2-1)),s=i-o/2;return n<60?e=[o+s,a+s,s]:n<120?e=[a+s,o+s,s]:n<180?e=[s,o+s,a+s]:n<240?e=[s,a+s,o+s]:n<300?e=[a+s,s,o+s]:n<360&&(e=[o+s,s,a+s]),e?[Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])]:void 0}},rgba:function(t){var e=this.rgb(t);return e?[e[0],e[1],e[2],1]:null},hsla:function(t){return t?[t[0],t[1],t[2],1]:null},fromString:function(t){var e;if(t&&(null!=(e=(t=t.replace(/ /g,"")).match(/^hsl\(([0-9.]+),([0-9.]+)(%?),([0-9.]+)(%?)\)$/i))||null!=(e=t.match(/^\[?([0-9.]+),([0-9.]+)(%?),([0-9.]+)(%?)\]?$/)))){var n=[parseFloat(e[1]),"%"==e[3]?e[2]/100:parseFloat(e[2]),"%"==e[5]?e[4]/100:parseFloat(e[4])];if(n[0]<360&&n[1]<=1&&n[2]<=1)return n}},toString:function(t){if(t&&Array.isArray(t)&&3==t.length)return"hsl("+(1*t[0]).toFixed(2)+", "+(100*t[1]).toFixed(2)+"%, "+(100*t[2]).toFixed(2)+"%)"},isValid:function(t){return null!=this.fromString(t)}},e.hsla={hex:function(t){return e.hsl.hex(t)},rgb:function(t){return e.hsl.rgb(t)},rgba:function(t){var e=this.rgb(t);return e?[e[0],e[1],e[2],t[3]]:null},hsl:function(t){return t?[t[0],t[1],t[2]]:null},fromString:function(t){var e;if(t&&((null!=(e=(t=t.replace(/ /g,"")).match(/^hsla\(([0-9.]+),([0-9.]+)(%?),([0-9.]+)(%?),([0-9.]+)\)$/i))||null!=(e=t.match(/^\[?([0-9.]+),([0-9.]+)(%?),([0-9.]+)(%?),([0-9.]+)\]?$/)))&&(t=[parseFloat(e[1]),"%"==e[3]?e[2]/100:parseFloat(e[2]),"%"==e[5]?e[4]/100:parseFloat(e[4]),parseFloat(e[6])])[0]<360&&t[1]<=1&&t[2]<=1))return t},toString:function(t){if(t&&Array.isArray(t)&&4==t.length)return"hsla("+(1*t[0]).toFixed(2)+", "+(100*t[1]).toFixed(2)+"%, "+(100*t[2]).toFixed(2)+"%,"+t[3]+")"},isValid:function(t){return null!=this.fromString(t)}},e.isValid=function(t){return e.hex.isValid(t)||e.rgb.isValid(t)||e.rgba.isValid(t)||e.hsl.isValid(t)||e.hsla.isValid(t)},e.getStringTypeAndValue=function(t){var n=e.hex.fromString(t),r=e.rgb.fromString(t),i=e.rgba.fromString(t),o=e.hsl.fromString(t),a=e.hsla.fromString(t);return n?{value:n,type:"hex"}:r?{value:r,type:"rgb"}:i?{value:i,type:"rgba"}:o?{value:o,type:"hsl"}:a?{value:a,type:"hsla"}:void 0},t.exports=e,"undefined"!=typeof window&&(window.colorConverter=e)})),ee=function(){function t(){e(this,t)}return r(t,[{key:"findStopLessThanOrEqualTo",value:function(t,e){for(var n,r,i=0,o=t.length-1,a=0;i<=o;){if(n=t[a=Math.floor((i+o)/2)][0],r=t[a+1][0],e===n||e>n&&e<r)return a;n<e?i=a+1:n>e&&(o=a-1)}return Math.max(a-1,0)}},{key:"interpolationFactor",value:function(t,e,n,r){var i=r-n,o=t-n;return 0===i?0:1===e||void 0===e?o/i:(Math.pow(e,o)-1)/(Math.pow(e,i)-1)}},{key:"number",value:function(t,e,n){return t*(1-n)+e*n}},{key:"array",value:function(t,e,n){return t.map((function(t,r){return this.number(t,e[r],n)}))}},{key:"asExpression",value:function(t){if(Array.isArray(t))return t;if(!t.stops)throw new Error("".concat(JSON.stringify(t)," is not a correct expression"));return 1===t.base||void 0===t.base?["interpolate",["linear"],["zoom"]].concat(t.stops.reduce((function(t,e){return t.concat(e)}),[])):["interpolate",["exponential",t.base],["zoom"]].concat(t.stops.reduce((function(t,e){return t.concat(e)}),[]))}},{key:"parseInterpolate",value:function(t,e){if(!t||"interpolate"!==t[0]||t.length<4)return null;var n="exponential"===t[1][0]?t[1][1]:1,r=t.slice(3).reduce((function(t,e,n){return n%2==0?t.push([e]):t[t.length-1].push(e),t}),[]);if(1===r.length||r[0][0]>=e)return{value:r[0][1]};if(r[r.length-1][0]<=e)return{value:r[r.length-1][1]};var i=this.findStopLessThanOrEqualTo(r,e);return{lower:r[i][1],upper:r[i+1][1],t:this.interpolationFactor(e,n,r[i][0],r[i+1][0])}}}]),t}(),ne=function(){function t(){e(this,t),this._families={}}return r(t,[{key:"getWeight",value:function(t){return/extra(- )?light/i.test(t)?200:/light/i.test(t)?300:/semi(- )?bold/i.test(t)?600:/bold/i.test(t)?700:/black/i.test(t)?900:400}},{key:"getStyle",value:function(t){return/italic$/i.test(t)?"italic":"normal"}},{key:"getFamily",value:function(t){var e=t.split(/( black| bold| light| regular| semi[- ]?bold| extra[- ]?light| italic)/i);return e&&e[0]?e[0]:""}},{key:"getProps",value:function(t){return{family:this.getFamily(t),style:this.getStyle(t),weight:this.getWeight(t)}}},{key:"add",value:function(t){this._families[t.family]=this._families[t.family]||[];var e=t.weight+("italic"==t.style?"i":"");-1==this._families[t.family].indexOf(e)&&this._families[t.family].push(e)}},{key:"download",value:function(){var t=[];for(var e in this._families)t.push(e+":"+this._families[e].join(","));t.length>0&&Qt.load({google:{families:t}})}}]),t}(),re=new(function(){function n(){e(this,n),this.zooms=this.generateArray(1,20),this.expressions=new ee,this.fonts=new ne}return r(n,[{key:"generateArray",value:function(t,e){for(var n=[],r=t;r<e;r++)n.push(r);return n}},{key:"getZooms",value:function(e){return void 0===e?this.zooms:"number"==typeof e?[e]:"object"===t(e)&&"number"==typeof e.minzoom&&"number"==typeof e.maxzoom?this.generateArray(e.minzoom,e.maxzoom):e}},{key:"parseNumber",value:function(t,e,n){if(void 0!==t.minzoom&&n<t.minzoom||void 0!==t.maxzoom&&t.maxzoom<n)return 0;if(void 0===e)return 1;if("number"==typeof e)return e;var r=this.expressions.asExpression(e),i=this.expressions.parseInterpolate(r,n);return i?i.value?i.value:+this.expressions.number(i.lower,i.upper,i.t).toFixed(2):void 0}},{key:"parseColor",value:function(t,e,n){if(void 0!==t.minzoom&&n<t.minzoom||void 0!==t.maxzoom&&t.maxzoom<n)return"#000";if(void 0===e)return"#000";if("string"==typeof e)return e;var r=this.expressions.asExpression(e),i=this.expressions.parseInterpolate(r,n);if(i){if(i.value)return i.value;var o=te.getStringTypeAndValue(i.lower),a=te.getStringTypeAndValue(i.upper),s="rgb"===o.type?o.value:te[o.type].rgb(o.value),u="rgb"===a.type?a.value:te[a.type].rgb(a.value);return te.rgba.toString([this.expressions.number(s[0],u[0],i.t),this.expressions.number(s[1],u[1],i.t),this.expressions.number(s[2],u[2],i.t),1])}}},{key:"renderLine",value:function(t,e){var n=this.widthAndColorByZooms(t,{width:t.paint["line-width"],color:t.paint["line-color"],zooms:e,opacity:t.paint["line-opacity"]});if(t.paint["line-gap-width"]){var r=this.widthAndColorByZooms(t,{width:t.paint["line-gap-width"],color:t.paint["line-color"],zooms:e,opacity:t.paint["line-opacity"]});for(var i in r)n[i]&&"number"==typeof n[i].width&&(n[i].width+=r[i].width)}return n}},{key:"widthAndColorByZooms",value:function(t,e){var n=this,r=e.color||"#000",i=e.width||1,o=e.opacity,a=e.zooms||this.zooms,s={maxWidth:0};return s.id=t.id,a.forEach((function(e){var a=n.parseNumber(t,i,e);a>s.maxWidth&&(s.maxWidth=a),s[e]={width:isNaN(a)?0:a,color:n.parseColor(t,r,e),opacity:n.parseNumber(t,o,e)}})),s}},{key:"borderStyleFromCasing",value:function(t,e,n){if(!(t&&e&&t[n]&&e[n]))return"";var r=Math.max((t[n].width-e[n].width)/2,0);return"border-top-width:"+r+"px;border-bottom-width:"+r+"px;border-top-color:"+t[n].color+";border-bottom-color:"+t[n].color+";border-top-style:solid;border-bottom-style:solid;"}}]),n}()),ie=(Jt={css:null,exports:{components:{Annotation:Zt,LineRender:{css:null,exports:{state:{casing:{},lines:[]},onMounted(){this.state.casing={},this.state.lines=this.props.layers.filter((t=>{if(t.metadata&&t.metadata["taxonomy:group"]===this.props.group&&("line"==t.type||t.ref)){if(!t.metadata["taxonomy:casing"]&&!t.ref)return!0;this.state.casing[t.metadata["taxonomy:casing"]||t.ref]=t}return!1})).map((t=>(this.state.casing[t.id]&&(this.state.casing[t.id]=re.renderLine(this.state.casing[t.id],this.props.zooms)),re.renderLine(t,this.props.zooms)))),this.update()},getMinHeight(t){const e=12+t.maxWidth+(this.state.casing[t.id]?this.state.casing[t.id].maxWidth:0);return e>25?e:25},taxonomy:re},template:function(t,e,n,r){return t('<h2 expr18="expr18"> </h2><div class="render-container"><div expr19="expr19" class="render-column"></div><div class="render-column"><span class="render-header">id</span><div expr23="expr23" class="render-item"></div></div></div>',[{redundantAttribute:"expr18",selector:"[expr18]",expressions:[{type:e.TEXT,childNodeIndex:0,evaluate:function(t){return t.props.title}},{type:e.ATTRIBUTE,name:"id",evaluate:function(t){return t.props.group}}]},{type:n.EACH,getKey:null,condition:null,template:t('<span expr20="expr20" class="render-header"> </span><div expr21="expr21" class="render-item"></div>',[{redundantAttribute:"expr20",selector:"[expr20]",expressions:[{type:e.TEXT,childNodeIndex:0,evaluate:function(t){return t.zoom}}]},{type:n.EACH,getKey:null,condition:function(t){return t.state.lines},template:t('<canvas expr22="expr22"></canvas>',[{expressions:[{type:e.ATTRIBUTE,name:"style",evaluate:function(t){return["min-height: ",t.getMinHeight(t.line),"px;"].join("")}}]},{redundantAttribute:"expr22",selector:"[expr22]",expressions:[{type:e.ATTRIBUTE,name:"style",evaluate:function(t){return["width: 55px; height: ",t.line[t.zoom].width,"px; background-color: ",t.line[t.zoom].color,"; ",t.taxonomy.borderStyleFromCasing(t.state.casing[t.line.id],t.line,t.zoom)," opacity: ",t.line[t.zoom].opacity,";"].join("")}}]}]),redundantAttribute:"expr21",selector:"[expr21]",itemName:"line",indexName:null,evaluate:function(t){return t.state.lines}}]),redundantAttribute:"expr19",selector:"[expr19]",itemName:"zoom",indexName:null,evaluate:function(t){return t.props.zooms}},{type:n.EACH,getKey:null,condition:function(t){return t.state.lines},template:t(" ",[{expressions:[{type:e.TEXT,childNodeIndex:0,evaluate:function(t){return[t.line.id].join("")}},{type:e.ATTRIBUTE,name:"style",evaluate:function(t){return["min-height: ",t.getMinHeight(t.line),"px;"].join("")}}]}]),redundantAttribute:"expr23",selector:"[expr23]",itemName:"line",indexName:null,evaluate:function(t){return t.state.lines}}])},name:"line-render"},PolygonRender:{css:null,exports:{state:{casing:{},polygons:[]},onMounted(){this.state.polygons=this.props.layers.filter((t=>{if(t.metadata&&t.metadata["taxonomy:group"]===this.props.group){if("fill"==t.type&&!t.metadata["taxonomy:casing"])return!0;"line"==t.type&&t.metadata["taxonomy:casing"]&&(this.state.casing[t.metadata["taxonomy:casing"]]=t)}return!1})).map((t=>(this.state.casing[t.id]?this.state.casing[t.id]={color:re.parseColor(t,this.state.casing[t.id].paint["line-color"],this.props.zooms[0]),width:re.parseNumber(t,this.state.casing[t.id].paint["line-width"],this.props.zooms[0]),id:this.state.casing[t.id].id}:t.paint["fill-outline-color"]&&(this.state.casing[t.id]={color:re.parseColor(t,t.paint["fill-outline-color"],this.props.zooms[0]),width:1,id:t.id}),{color:re.parseColor(t,t.paint["fill-color"],this.props.zooms[0]),id:t.id,opacity:re.parseNumber(t,t.paint["fill-opacity"],this.props.zooms[0])}))),this.update()}},template:function(t,e,n,r){return t('<h2 expr8="expr8"> </h2><div class="render-container"><div expr9="expr9" class="render-item"></div></div>',[{redundantAttribute:"expr8",selector:"[expr8]",expressions:[{type:e.TEXT,childNodeIndex:0,evaluate:function(t){return t.props.title}},{type:e.ATTRIBUTE,name:"id",evaluate:function(t){return t.props.group}}]},{type:n.EACH,getKey:null,condition:function(t){return t.state.polygons},template:t('<canvas expr10="expr10"></canvas><span expr11="expr11"> </span>',[{redundantAttribute:"expr10",selector:"[expr10]",expressions:[{type:e.ATTRIBUTE,name:"style",evaluate:function(t){return["width: 100px; height: 100px; background-color: ",t.polygon.color,"; ",t.state.casing[t.polygon.id]?"border: "+t.state.casing[t.polygon.id].width+"px solid "+t.state.casing[t.polygon.id].color+";":""," opacity: ",t.polygon.opacity,";"].join("")}}]},{redundantAttribute:"expr11",selector:"[expr11]",expressions:[{type:e.TEXT,childNodeIndex:0,evaluate:function(t){return t.polygon.id}}]}]),redundantAttribute:"expr9",selector:"[expr9]",itemName:"polygon",indexName:null,evaluate:function(t){return t.state.polygons}}])},name:"polygon-render"},SymbolRender:{css:null,exports:{state:{casing:{},symbols:[]},onMounted(){this.state.symbols=this.props.layers.filter((t=>t.metadata&&t.metadata["taxonomy:group"]===this.props.group&&"symbol"==t.type)).map((t=>{t.paint["text-halo-color"]&&(this.state.casing[t.id]=re.widthAndColorByZooms(t,{width:t.paint["text-halo-width"],color:t.paint["text-halo-color"],zooms:this.props.zooms}));const e=re.widthAndColorByZooms(t,{width:t.layout["text-size"],color:t.paint["text-color"],zooms:this.props.zooms});e["text-transform"]=t.layout["text-transform"]||"none",e.example=t.metadata["taxonomy:example"];const n=re.fonts.getProps(t.layout["text-font"][0]);return e.fontStyle=this.fontPropsToStyle(n),re.fonts.add(n),e})),this.update()},fontPropsToStyle:t=>"font-style: "+t.style+"; font-weight: "+t.weight+"; font-family: '"+t.family+"';",getMinHeight(t){const e=8+t.maxWidth+(this.state.casing[t.id]?this.state.casing[t.id].maxWidth:0);return e>25?e:25}},template:function(t,e,n,r){return t('<h2 expr12="expr12"> </h2><div class="render-container"><div expr13="expr13" class="render-column"></div><div class="render-column"><span class="render-header">id</span><div expr17="expr17" class="render-item"></div></div></div>',[{redundantAttribute:"expr12",selector:"[expr12]",expressions:[{type:e.TEXT,childNodeIndex:0,evaluate:function(t){return t.props.title}},{type:e.ATTRIBUTE,name:"id",evaluate:function(t){return t.props.group}}]},{type:n.EACH,getKey:null,condition:null,template:t('<span expr14="expr14" class="render-header"> </span><div expr15="expr15" class="render-item"></div>',[{redundantAttribute:"expr14",selector:"[expr14]",expressions:[{type:e.TEXT,childNodeIndex:0,evaluate:function(t){return t.zoom}}]},{type:n.EACH,getKey:null,condition:function(t){return t.state.symbols},template:t('<span expr16="expr16"> </span>',[{expressions:[{type:e.ATTRIBUTE,name:"style",evaluate:function(t){return["min-height: ",t.getMinHeight(t.symbol),"px;"].join("")}}]},{redundantAttribute:"expr16",selector:"[expr16]",expressions:[{type:e.TEXT,childNodeIndex:0,evaluate:function(t){return t.symbol.example||t.symbol.id}},{type:e.ATTRIBUTE,name:"style",evaluate:function(t){return["font-size: ",t.symbol[t.zoom].width,"px; color: ",t.symbol[t.zoom].color,"; ",t.state.casing[t.symbol.id]&&t.state.casing[t.symbol.id][t.zoom]?"text-shadow: 0 0 "+t.state.casing[t.symbol.id][t.zoom].width+"px "+t.state.casing[t.symbol.id][t.zoom].color+";":""," ",t.symbol.fontStyle," text-transform: ",t.symbol["text-transform"],";"].join("")}}]}]),redundantAttribute:"expr15",selector:"[expr15]",itemName:"symbol",indexName:null,evaluate:function(t){return t.state.symbols}}]),redundantAttribute:"expr13",selector:"[expr13]",itemName:"zoom",indexName:null,evaluate:function(t){return t.props.zooms}},{type:n.EACH,getKey:null,condition:function(t){return t.state.symbols},template:t(" ",[{expressions:[{type:e.TEXT,childNodeIndex:0,evaluate:function(t){return[t.symbol.id].join("")}},{type:e.ATTRIBUTE,name:"style",evaluate:function(t){return["min-height: ",t.getMinHeight(t.symbol),"px;"].join("")}}]}]),redundantAttribute:"expr17",selector:"[expr17]",itemName:"symbol",indexName:null,evaluate:function(t){return t.state.symbols}}])},name:"symbol-render"}},fetchStyleURL(t){var e=new XMLHttpRequest;e.addEventListener("load",(function(){switch(this.status){case 200:return t(null,JSON.parse(this.responseText));case 400:return t("You sent a bad request.");case 401:return t("You are not authorized to use this style.");case 500:return t("This server can not answer yet.")}})),e.open("GET",this.props.styleUrl),e.send()},setBackgroundColor(){var t=this.style.layers;for(var e in t)if("background"===t[e].type)return void(this.$(".container").style["background-color"]=t[e].paint["background-color"]||"#fff")},onMounted(){if(!this.props.styleUrl)return console.error("Style URL is missing");this.fetchStyleURL(((t,e)=>{if(t)return console.error("Error in fetch style");this.style=e,this.update()}))},onUpdated(){this.setBackgroundColor(),re.fonts.download();const t=location&&location.hash&&location.hash.replace("#",""),e=t&&this.$(t);e&&window.scrollTo({top:e.offsetTop,behavior:"smooth"})},taxonomy:re},template:function(t,e,n,r){return t('<div expr0="expr0" class="container"></div>',[{type:n.IF,evaluate:function(t){return t.style&&t.style.metadata},redundantAttribute:"expr0",selector:"[expr0]",template:t('<div expr1="expr1" class="taxonomy-item"></div><div expr3="expr3" class="taxonomy-item"></div><div style="font-size: 12px; text-align: center">\n      Powered by <a href="https://www.jawg.io/">Jawg<span style="color: #2999fd">Maps</span></a>. Contribute on <a href="https://github.com/jawg/taxonomy/">GitHub</a>.\n    </div>',[{type:n.IF,evaluate:function(t){return t.style.metadata["taxonomy:title"]},redundantAttribute:"expr1",selector:"[expr1]",template:t('<h1 expr2="expr2"> </h1>',[{redundantAttribute:"expr2",selector:"[expr2]",expressions:[{type:e.TEXT,childNodeIndex:0,evaluate:function(t){return t.style.metadata["taxonomy:title"]}}]}])},{type:n.EACH,getKey:null,condition:null,template:t('<line-render expr4="expr4"></line-render><polygon-render expr5="expr5"></polygon-render><symbol-render expr6="expr6"></symbol-render><annotation expr7="expr7"></annotation>',[{type:n.IF,evaluate:function(t){return"line"===t.group.type},redundantAttribute:"expr4",selector:"[expr4]",template:t(null,[{type:n.TAG,getComponent:r,evaluate:function(t){return"line-render"},slots:[],attributes:[{type:e.ATTRIBUTE,name:"layers",evaluate:function(t){return t.style.layers}},{type:e.ATTRIBUTE,name:"title",evaluate:function(t){return t.group.title}},{type:e.ATTRIBUTE,name:"group",evaluate:function(t){return t.group.id}},{type:e.ATTRIBUTE,name:"zooms",evaluate:function(t){return t.taxonomy.getZooms(t.group.zooms)}}]}])},{type:n.IF,evaluate:function(t){return"polygon"===t.group.type},redundantAttribute:"expr5",selector:"[expr5]",template:t(null,[{type:n.TAG,getComponent:r,evaluate:function(t){return"polygon-render"},slots:[],attributes:[{type:e.ATTRIBUTE,name:"layers",evaluate:function(t){return t.style.layers}},{type:e.ATTRIBUTE,name:"title",evaluate:function(t){return t.group.title}},{type:e.ATTRIBUTE,name:"group",evaluate:function(t){return t.group.id}},{type:e.ATTRIBUTE,name:"zooms",evaluate:function(t){return t.taxonomy.getZooms(t.group.zooms)}}]}])},{type:n.IF,evaluate:function(t){return"symbol"===t.group.type},redundantAttribute:"expr6",selector:"[expr6]",template:t(null,[{type:n.TAG,getComponent:r,evaluate:function(t){return"symbol-render"},slots:[],attributes:[{type:e.ATTRIBUTE,name:"layers",evaluate:function(t){return t.style.layers}},{type:e.ATTRIBUTE,name:"title",evaluate:function(t){return t.group.title}},{type:e.ATTRIBUTE,name:"group",evaluate:function(t){return t.group.id}},{type:e.ATTRIBUTE,name:"zooms",evaluate:function(t){return t.taxonomy.getZooms(t.group.zooms)}}]}])},{type:n.IF,evaluate:function(t){return"annotation"===t.group.type},redundantAttribute:"expr7",selector:"[expr7]",template:t(null,[{type:n.TAG,getComponent:r,evaluate:function(t){return"annotation"},slots:[],attributes:[{type:e.ATTRIBUTE,name:"layers",evaluate:function(t){return t.style.layers}},{type:e.ATTRIBUTE,name:"content",evaluate:function(t){return t.group.content}},{type:e.ATTRIBUTE,name:"group",evaluate:function(t){return t.group.id}},{type:e.ATTRIBUTE,name:"zooms",evaluate:function(t){return t.taxonomy.getZooms(t.group.zooms)}}]}])}]),redundantAttribute:"expr3",selector:"[expr3]",itemName:"group",indexName:null,evaluate:function(t){return t.style.metadata["taxonomy:groups"]}}])}])},name:"taxonomy"},function(t,e,n){var r=void 0===n?{}:n,i=r.slots,o=r.attributes,a=r.parentScope;return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}((function(e){return e.mount(t,a)}),(function(t){return t({props:e,slots:i,attributes:o})}),Wt)(Jt)}),oe=0;oe<document.getElementsByTagName("taxonomy").length;oe++)ie(document.getElementsByTagName("taxonomy").item(oe))}();
