2 lines
222 KiB
JavaScript
2 lines
222 KiB
JavaScript
!function(t){function e(e){for(var n,i,o=e[0],a=e[1],s=0,c=[];s<o.length;s++)i=o[s],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&c.push(r[i][0]),r[i]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n]);for(u&&u(e);c.length;)c.shift()()}var n={},r={0:0};function i(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(t){var e=[],n=r[t];if(0!==n)if(n)e.push(n[2]);else{var o=new Promise((function(e,i){n=r[t]=[e,i]}));e.push(n[2]=o);var a,s=document.createElement("script");s.charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.src=function(t){return i.p+""+t+".bundle.js"}(t);var u=new Error;a=function(e){s.onerror=s.onload=null,clearTimeout(c);var n=r[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),o=e&&e.target&&e.target.src;u.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",u.name="ChunkLoadError",u.type=i,u.request=o,n[1](u)}r[t]=void 0}};var c=setTimeout((function(){a({type:"timeout",target:s})}),12e4);s.onerror=s.onload=a,document.head.appendChild(s)}return Promise.all(e)},i.m=t,i.c=n,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="js/dist/",i.oe=function(t){throw console.error(t),t};var o=window.webpackJsonp=window.webpackJsonp||[],a=o.push.bind(o);o.push=e,o=o.slice();for(var s=0;s<o.length;s++)e(o[s]);var u=a;i(i.s=379)}([function(t,e,n){t.exports=n(170)},function(t,e,n){t.exports=n(234)},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){var r=n(186);function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),r(t,i.key,i)}}t.exports=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}},function(t,e,n){"use strict";function r(t){return(r="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})(t)}var i=n(15),o=n(57).f,a=n(107),s=n(10),u=n(27),c=n(35),l=n(28),f=function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var n,h,d,p,v,m,y,g,b=t.target,x=t.global,w=t.stat,k=t.proto,S=x?i:w?i[b]:(i[b]||{}).prototype,E=x?s:s[b]||(s[b]={}),L=E.prototype;for(d in e)n=!a(x?d:b+(w?".":"#")+d,t.forced)&&S&&l(S,d),v=E[d],n&&(m=t.noTargetGet?(g=o(S,d))&&g.value:S[d]),p=n&&m?m:e[d],n&&r(v)===r(p)||(y=t.bind&&n?u(p,i):t.wrap&&n?f(p):k&&"function"==typeof p?u(Function.call,p):p,(t.sham||p&&p.sham||v&&v.sham)&&c(y,"sham",!0),E[d]=y,k&&(l(s,h=b+"Prototype")||c(s,h,{}),s[h][d]=p,t.real&&L&&!L[d]&&c(L,d,p)))}},function(t,e,n){t.exports=n(304)},function(t,e,n){var r=n(247),i=n(140);function o(e){return t.exports=o=i?r:function(t){return t.__proto__||r(t)},o(e)}t.exports=o},function(t,e,n){var r=n(139),i=n(98);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=r(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}},function(t,e,n){var r=n(50),i=n(246);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}},function(t,e,n){t.exports=n(228)},function(t,e){t.exports={}},function(t,e,n){var r=n(25);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){t.exports=n(213)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=!0},function(t,e,n){(function(e){function n(t){return(n="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})(t)}var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==("undefined"==typeof globalThis?"undefined":n(globalThis))&&globalThis)||r("object"==("undefined"==typeof window?"undefined":n(window))&&window)||r("object"==("undefined"==typeof self?"undefined":n(self))&&self)||r("object"==(void 0===e?"undefined":n(e))&&e)||Function("return this")()}).call(this,n(105))},function(t,e,n){var r=n(15),i=n(85),o=n(28),a=n(70),s=n(86),u=n(109),c=i("wks"),l=r.Symbol,f=u?l:l&&l.withoutSetter||a;t.exports=function(t){return o(c,t)||(s&&o(l,t)?c[t]=l[t]:c[t]=f("Symbol."+t)),c[t]}},function(t,e,n){t.exports=n(189)},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,n){function r(t){return(r="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})(t)}var i=n(11),o=n(122),a=n(41),s=n(27),u=n(62),c=n(123),l=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,f,h){var d,p,v,m,y,g,b,x=s(e,n,f?2:1);if(h)d=t;else{if("function"!=typeof(p=u(t)))throw TypeError("Target is not iterable");if(o(p)){for(v=0,m=a(t.length);m>v;v++)if((y=f?x(i(b=t[v])[0],b[1]):x(t[v]))&&y instanceof l)return y;return new l(!1)}d=p.call(t)}for(g=d.next;!(b=g.call(d)).done;)if("object"==r(y=c(d,x,b.value,f))&&y&&y instanceof l)return y;return new l(!1)}).stop=function(t){return new l(!0,t)}},function(t,e,n){t.exports=n(190)},function(t,e,n){t.exports=n(191)},function(t,e,n){t.exports=n(210)},function(t,e,n){t.exports=n(174)},function(t,e,n){var r=n(10),i=n(28),o=n(96),a=n(31).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},function(t,e){function n(t){return(n="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})(t)}t.exports=function(t){return"object"===n(t)?null!==t:"function"==typeof t}},function(t,e,n){var r=n(13);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(18);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(10),i=n(15),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t])||o(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},function(t,e,n){t.exports=n(185)},function(t,e,n){var r=n(26),i=n(106),o=n(11),a=n(67),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(o(t),e=a(e,!0),o(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(10);t.exports=function(t){return r[t+"Prototype"]}},function(t,e,n){t.exports=n(320)},function(t,e,n){t.exports=n(266)},function(t,e,n){var r=n(26),i=n(31),o=n(47);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(66);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(14),i=n(95);t.exports=r?i:function(t){return Map.prototype.entries.call(t)}},function(t,e,n){t.exports=n(260)},function(t,e,n){t.exports=n(300)},function(t,e,n){var r=n(82),i=n(66);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(68),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){"use strict";var r=n(175).charAt,i=n(43),o=n(89),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(t){a(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=s(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){var r,i,o,a=n(176),s=n(15),u=n(25),c=n(35),l=n(28),f=n(72),h=n(60),d=s.WeakMap;if(a){var p=new d,v=p.get,m=p.has,y=p.set;r=function(t,e){return y.call(p,t,e),e},i=function(t){return v.call(p,t)||{}},o=function(t){return m.call(p,t)}}else{var g=f("state");h[g]=!0,r=function(t,e){return c(t,g,e),e},i=function(t){return l(t,g)?t[g]:{}},o=function(t){return l(t,g)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(92),i=n(31).f,o=n(35),a=n(28),s=n(178),u=n(16)("toStringTag");t.exports=function(t,e,n,c){if(t){var l=n?t:t.prototype;a(l,u)||i(l,u,{configurable:!0,value:e}),c&&!r&&o(l,"toString",s)}}},function(t,e,n){n(118);var r=n(180),i=n(15),o=n(52),a=n(35),s=n(49),u=n(16)("toStringTag");for(var c in r){var l=i[c],f=l&&l.prototype;f&&o(f)!==u&&a(f,u,c),s[c]=s.Array}},function(t,e,n){var r=n(26),i=n(13),o=n(28),a=Object.defineProperty,s={},u=function(t){throw t};t.exports=function(t,e){if(o(s,t))return s[t];e||(e={});var n=[][t],c=!!o(e,"ACCESSORS")&&e.ACCESSORS,l=o(e,0)?e[0]:u,f=o(e,1)?e[1]:void 0;return s[t]=!!n&&!i((function(){if(c&&!r)return!0;var t={length:-1};c?a(t,1,{enumerable:!0,get:u}):t[1]=1,n.call(t,l,f)}))}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r,i=n(11),o=n(177),a=n(91),s=n(60),u=n(117),c=n(83),l=n(72),f=l("IE_PROTO"),h=function(){},d=function(t){return"<script>"+t+"<\/script>"},p=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;p=r?function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=c("iframe")).style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F);for(var n=a.length;n--;)delete p.prototype[a[n]];return p()};s[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=i(t),n=new h,h.prototype=null,n[f]=t):n=p(),void 0===e?n:o(n,e)}},function(t,e){t.exports={}},function(t,e,n){var r=n(219),i=n(97);function o(e){return t.exports=o="function"==typeof i&&"symbol"==typeof r?function(t){return typeof t}:function(t){return t&&"function"==typeof i&&t.constructor===i&&t!==i.prototype?"symbol":typeof t},o(e)}t.exports=o},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(92),i=n(51),o=n(16)("toStringTag"),a="Arguments"==i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:a?i(e):"Object"==(r=i(e))&&"function"==typeof e.callee?"Arguments":r}},function(t,e,n){var r=n(35);t.exports=function(t,e,n,i){i&&i.enumerable?t[e]=n:r(t,e,n)}},function(t,e,n){var r=n(27),i=n(82),o=n(36),a=n(41),s=n(84),u=[].push,c=function(t){var e=1==t,n=2==t,c=3==t,l=4==t,f=6==t,h=5==t||f;return function(d,p,v,m){for(var y,g,b=o(d),x=i(b),w=r(p,v,3),k=a(x.length),S=0,E=m||s,L=e?E(d,k):n?E(d,0):void 0;k>S;S++)if((h||S in x)&&(g=w(y=x[S],S,b),t))if(e)L[S]=g;else if(g)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:u.call(L,y)}else if(l)return!1;return f?-1:c||l?l:L}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},function(t,e,n){var r=n(251),i=n(253),o=n(145),a=n(259);t.exports=function(t){return r(t)||i(t)||o(t)||a()}},function(t,e,n){t.exports=n(324)},function(t,e,n){var r=n(26),i=n(81),o=n(47),a=n(40),s=n(67),u=n(28),c=n(106),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=s(e,!0),c)try{return l(t,e)}catch(t){}if(u(t,e))return o(!i.f.call(t,e),t[e])}},function(t,e,n){var r=n(51);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(13),i=n(16),o=n(87),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e){t.exports={}},function(t,e,n){var r=n(28),i=n(36),o=n(72),a=n(114),s=o("IE_PROTO"),u=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=i(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r=n(52),i=n(49),o=n(16)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(11),i=n(18),o=n(16)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},function(t,e,n){"use strict";var r=n(18),i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},function(t,e,n){t.exports=n(275)},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(25);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){"use strict";var r=n(67),i=n(31),o=n(47);t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},function(t,e){},function(t,e,n){var r=n(85),i=n(70),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},function(t,e,n){var r=n(115),i=n(91);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){t.exports=n(236)},function(t,e,n){(function(n){var r,i;function o(t){return(o="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})(t)}i=this,void 0===(r=function(){return i.Chartist=function(){var t={version:"0.11.4"};return function(t,e){"use strict";var n=t.window,r=t.document;e.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},e.noop=function(t){return t},e.alphaNumerate=function(t){return String.fromCharCode(97+t%26)},e.extend=function(t){var n,r,i;for(t=t||{},n=1;n<arguments.length;n++)for(var a in r=arguments[n])"object"!==o(i=r[a])||null===i||i instanceof Array?t[a]=i:t[a]=e.extend(t[a],i);return t},e.replaceAll=function(t,e,n){return t.replace(new RegExp(e,"g"),n)},e.ensureUnit=function(t,e){return"number"==typeof t&&(t+=e),t},e.quantity=function(t){if("string"==typeof t){var e=/^(\d+)\s*(.*)$/g.exec(t);return{value:+e[1],unit:e[2]||void 0}}return{value:t}},e.querySelector=function(t){return t instanceof Node?t:r.querySelector(t)},e.times=function(t){return Array.apply(null,new Array(t))},e.sum=function(t,e){return t+(e||0)},e.mapMultiply=function(t){return function(e){return e*t}},e.mapAdd=function(t){return function(e){return e+t}},e.serialMap=function(t,n){var r=[],i=Math.max.apply(null,t.map((function(t){return t.length})));return e.times(i).forEach((function(e,i){var o=t.map((function(t){return t[i]}));r[i]=n.apply(null,o)})),r},e.roundWithPrecision=function(t,n){var r=Math.pow(10,n||e.precision);return Math.round(t*r)/r},e.precision=8,e.escapingMap={"&":"&","<":"<",">":">",'"':""","'":"'"},e.serialize=function(t){return null==t?t:("number"==typeof t?t=""+t:"object"===o(t)&&(t=JSON.stringify({data:t})),Object.keys(e.escapingMap).reduce((function(t,n){return e.replaceAll(t,n,e.escapingMap[n])}),t))},e.deserialize=function(t){if("string"!=typeof t)return t;t=Object.keys(e.escapingMap).reduce((function(t,n){return e.replaceAll(t,e.escapingMap[n],n)}),t);try{t=void 0!==(t=JSON.parse(t)).data?t.data:t}catch(t){}return t},e.createSvg=function(t,n,r,i){var o;return n=n||"100%",r=r||"100%",Array.prototype.slice.call(t.querySelectorAll("svg")).filter((function(t){return t.getAttributeNS(e.namespaces.xmlns,"ct")})).forEach((function(e){t.removeChild(e)})),(o=new e.Svg("svg").attr({width:n,height:r}).addClass(i))._node.style.width=n,o._node.style.height=r,t.appendChild(o._node),o},e.normalizeData=function(t,n,r){var i,o={raw:t,normalized:{}};return o.normalized.series=e.getDataArray({series:t.series||[]},n,r),i=o.normalized.series.every((function(t){return t instanceof Array}))?Math.max.apply(null,o.normalized.series.map((function(t){return t.length}))):o.normalized.series.length,o.normalized.labels=(t.labels||[]).slice(),Array.prototype.push.apply(o.normalized.labels,e.times(Math.max(0,i-o.normalized.labels.length)).map((function(){return""}))),n&&e.reverseData(o.normalized),o},e.safeHasProperty=function(t,e){return null!==t&&"object"===o(t)&&t.hasOwnProperty(e)},e.isDataHoleValue=function(t){return null==t||"number"==typeof t&&isNaN(t)},e.reverseData=function(t){t.labels.reverse(),t.series.reverse();for(var e=0;e<t.series.length;e++)"object"===o(t.series[e])&&void 0!==t.series[e].data?t.series[e].data.reverse():t.series[e]instanceof Array&&t.series[e].reverse()},e.getDataArray=function(t,n,r){return t.series.map((function t(n){if(e.safeHasProperty(n,"value"))return t(n.value);if(e.safeHasProperty(n,"data"))return t(n.data);if(n instanceof Array)return n.map(t);if(!e.isDataHoleValue(n)){if(r){var i={};return"string"==typeof r?i[r]=e.getNumberOrUndefined(n):i.y=e.getNumberOrUndefined(n),i.x=n.hasOwnProperty("x")?e.getNumberOrUndefined(n.x):i.x,i.y=n.hasOwnProperty("y")?e.getNumberOrUndefined(n.y):i.y,i}return e.getNumberOrUndefined(n)}}))},e.normalizePadding=function(t,e){return e=e||0,"number"==typeof t?{top:t,right:t,bottom:t,left:t}:{top:"number"==typeof t.top?t.top:e,right:"number"==typeof t.right?t.right:e,bottom:"number"==typeof t.bottom?t.bottom:e,left:"number"==typeof t.left?t.left:e}},e.getMetaData=function(t,e){var n=t.data?t.data[e]:t[e];return n?n.meta:void 0},e.orderOfMagnitude=function(t){return Math.floor(Math.log(Math.abs(t))/Math.LN10)},e.projectLength=function(t,e,n){return e/n.range*t},e.getAvailableHeight=function(t,n){return Math.max((e.quantity(n.height).value||t.height())-(n.chartPadding.top+n.chartPadding.bottom)-n.axisX.offset,0)},e.getHighLow=function(t,n,r){var i={high:void 0===(n=e.extend({},n,r?n["axis"+r.toUpperCase()]:{})).high?-Number.MAX_VALUE:+n.high,low:void 0===n.low?Number.MAX_VALUE:+n.low},o=void 0===n.high,a=void 0===n.low;return(o||a)&&function t(e){if(void 0!==e)if(e instanceof Array)for(var n=0;n<e.length;n++)t(e[n]);else{var s=r?+e[r]:+e;o&&s>i.high&&(i.high=s),a&&s<i.low&&(i.low=s)}}(t),(n.referenceValue||0===n.referenceValue)&&(i.high=Math.max(n.referenceValue,i.high),i.low=Math.min(n.referenceValue,i.low)),i.high<=i.low&&(0===i.low?i.high=1:i.low<0?i.high=0:(i.high>0||(i.high=1),i.low=0)),i},e.isNumeric=function(t){return null!==t&&isFinite(t)},e.isFalseyButZero=function(t){return!t&&0!==t},e.getNumberOrUndefined=function(t){return e.isNumeric(t)?+t:void 0},e.isMultiValue=function(t){return"object"===o(t)&&("x"in t||"y"in t)},e.getMultiValue=function(t,n){return e.isMultiValue(t)?e.getNumberOrUndefined(t[n||"y"]):e.getNumberOrUndefined(t)},e.rho=function(t){if(1===t)return t;function e(t,n){return t%n==0?n:e(n,t%n)}function n(t){return t*t+1}var r,i=2,o=2;if(t%2==0)return 2;do{i=n(i)%t,o=n(n(o))%t,r=e(Math.abs(i-o),t)}while(1===r);return r},e.getBounds=function(t,n,r,i){var o,a,s,u=0,c={high:n.high,low:n.low};c.valueRange=c.high-c.low,c.oom=e.orderOfMagnitude(c.valueRange),c.step=Math.pow(10,c.oom),c.min=Math.floor(c.low/c.step)*c.step,c.max=Math.ceil(c.high/c.step)*c.step,c.range=c.max-c.min,c.numberOfSteps=Math.round(c.range/c.step);var l=e.projectLength(t,c.step,c)<r,f=i?e.rho(c.range):0;if(i&&e.projectLength(t,1,c)>=r)c.step=1;else if(i&&f<c.step&&e.projectLength(t,f,c)>=r)c.step=f;else for(;;){if(l&&e.projectLength(t,c.step,c)<=r)c.step*=2;else{if(l||!(e.projectLength(t,c.step/2,c)>=r))break;if(c.step/=2,i&&c.step%1!=0){c.step*=2;break}}if(u++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}function h(t,e){return t===(t+=e)&&(t*=1+(e>0?2221e-19:-2221e-19)),t}for(c.step=Math.max(c.step,2221e-19),a=c.min,s=c.max;a+c.step<=c.low;)a=h(a,c.step);for(;s-c.step>=c.high;)s=h(s,-c.step);c.min=a,c.max=s,c.range=c.max-c.min;var d=[];for(o=c.min;o<=c.max;o=h(o,c.step)){var p=e.roundWithPrecision(o);p!==d[d.length-1]&&d.push(p)}return c.values=d,c},e.polarToCartesian=function(t,e,n,r){var i=(r-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}},e.createChartRect=function(t,n,r){var i=!(!n.axisX&&!n.axisY),o=i?n.axisY.offset:0,a=i?n.axisX.offset:0,s=t.width()||e.quantity(n.width).value||0,u=t.height()||e.quantity(n.height).value||0,c=e.normalizePadding(n.chartPadding,r);s=Math.max(s,o+c.left+c.right),u=Math.max(u,a+c.top+c.bottom);var l={padding:c,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return i?("start"===n.axisX.position?(l.y2=c.top+a,l.y1=Math.max(u-c.bottom,l.y2+1)):(l.y2=c.top,l.y1=Math.max(u-c.bottom-a,l.y2+1)),"start"===n.axisY.position?(l.x1=c.left+o,l.x2=Math.max(s-c.right,l.x1+1)):(l.x1=c.left,l.x2=Math.max(s-c.right-o,l.x1+1))):(l.x1=c.left,l.x2=Math.max(s-c.right,l.x1+1),l.y2=c.top,l.y1=Math.max(u-c.bottom,l.y2+1)),l},e.createGrid=function(t,n,r,i,o,a,s,u){var c={};c[r.units.pos+"1"]=t,c[r.units.pos+"2"]=t,c[r.counterUnits.pos+"1"]=i,c[r.counterUnits.pos+"2"]=i+o;var l=a.elem("line",c,s.join(" "));u.emit("draw",e.extend({type:"grid",axis:r,index:n,group:a,element:l},c))},e.createGridBackground=function(t,e,n,r){var i=t.elem("rect",{x:e.x1,y:e.y2,width:e.width(),height:e.height()},n,!0);r.emit("draw",{type:"gridBackground",group:t,element:i})},e.createLabel=function(t,n,i,o,a,s,u,c,l,f,h){var d,p={};if(p[a.units.pos]=t+u[a.units.pos],p[a.counterUnits.pos]=u[a.counterUnits.pos],p[a.units.len]=n,p[a.counterUnits.len]=Math.max(0,s-10),f){var v=r.createElement("span");v.className=l.join(" "),v.setAttribute("xmlns",e.namespaces.xhtml),v.innerText=o[i],v.style[a.units.len]=Math.round(p[a.units.len])+"px",v.style[a.counterUnits.len]=Math.round(p[a.counterUnits.len])+"px",d=c.foreignObject(v,e.extend({style:"overflow: visible;"},p))}else d=c.elem("text",p,l.join(" ")).text(o[i]);h.emit("draw",e.extend({type:"label",axis:a,index:i,group:c,element:d,text:o[i]},p))},e.getSeriesOption=function(t,e,n){if(t.name&&e.series&&e.series[t.name]){var r=e.series[t.name];return r.hasOwnProperty(n)?r[n]:e[n]}return e[n]},e.optionsProvider=function(t,r,i){var o,a,s=e.extend({},t),u=[];function c(t){var u=o;if(o=e.extend({},s),r)for(a=0;a<r.length;a++)n.matchMedia(r[a][0]).matches&&(o=e.extend(o,r[a][1]));i&&t&&i.emit("optionsChanged",{previousOptions:u,currentOptions:o})}if(!n.matchMedia)throw"window.matchMedia not found! Make sure you're using a polyfill.";if(r)for(a=0;a<r.length;a++){var l=n.matchMedia(r[a][0]);l.addListener(c),u.push(l)}return c(),{removeMediaQueryListeners:function(){u.forEach((function(t){t.removeListener(c)}))},getCurrentOptions:function(){return e.extend({},o)}}},e.splitIntoSegments=function(t,n,r){r=e.extend({},{increasingX:!1,fillHoles:!1},r);for(var i=[],o=!0,a=0;a<t.length;a+=2)void 0===e.getMultiValue(n[a/2].value)?r.fillHoles||(o=!0):(r.increasingX&&a>=2&&t[a]<=t[a-2]&&(o=!0),o&&(i.push({pathCoordinates:[],valueData:[]}),o=!1),i[i.length-1].pathCoordinates.push(t[a],t[a+1]),i[i.length-1].valueData.push(n[a/2]));return i}}(this||n,t),function(t,e){"use strict";e.Interpolation={},e.Interpolation.none=function(t){return t=e.extend({},{fillHoles:!1},t),function(n,r){for(var i=new e.Svg.Path,o=!0,a=0;a<n.length;a+=2){var s=n[a],u=n[a+1],c=r[a/2];void 0!==e.getMultiValue(c.value)?(o?i.move(s,u,!1,c):i.line(s,u,!1,c),o=!1):t.fillHoles||(o=!0)}return i}},e.Interpolation.simple=function(t){t=e.extend({},{divisor:2,fillHoles:!1},t);var n=1/Math.max(1,t.divisor);return function(r,i){for(var o,a,s,u=new e.Svg.Path,c=0;c<r.length;c+=2){var l=r[c],f=r[c+1],h=(l-o)*n,d=i[c/2];void 0!==d.value?(void 0===s?u.move(l,f,!1,d):u.curve(o+h,a,l-h,f,l,f,!1,d),o=l,a=f,s=d):t.fillHoles||(o=l=s=void 0)}return u}},e.Interpolation.cardinal=function(t){t=e.extend({},{tension:1,fillHoles:!1},t);var n=Math.min(1,Math.max(0,t.tension)),r=1-n;return function i(o,a){var s=e.splitIntoSegments(o,a,{fillHoles:t.fillHoles});if(s.length){if(s.length>1){var u=[];return s.forEach((function(t){u.push(i(t.pathCoordinates,t.valueData))})),e.Svg.Path.join(u)}if(o=s[0].pathCoordinates,a=s[0].valueData,o.length<=4)return e.Interpolation.none()(o,a);for(var c=(new e.Svg.Path).move(o[0],o[1],!1,a[0]),l=0,f=o.length;f-2>l;l+=2){var h=[{x:+o[l-2],y:+o[l-1]},{x:+o[l],y:+o[l+1]},{x:+o[l+2],y:+o[l+3]},{x:+o[l+4],y:+o[l+5]}];f-4===l?h[3]=h[2]:l||(h[0]={x:+o[l],y:+o[l+1]}),c.curve(n*(-h[0].x+6*h[1].x+h[2].x)/6+r*h[2].x,n*(-h[0].y+6*h[1].y+h[2].y)/6+r*h[2].y,n*(h[1].x+6*h[2].x-h[3].x)/6+r*h[2].x,n*(h[1].y+6*h[2].y-h[3].y)/6+r*h[2].y,h[2].x,h[2].y,!1,a[(l+2)/2])}return c}return e.Interpolation.none()([])}},e.Interpolation.monotoneCubic=function(t){return t=e.extend({},{fillHoles:!1},t),function n(r,i){var o=e.splitIntoSegments(r,i,{fillHoles:t.fillHoles,increasingX:!0});if(o.length){if(o.length>1){var a=[];return o.forEach((function(t){a.push(n(t.pathCoordinates,t.valueData))})),e.Svg.Path.join(a)}if(r=o[0].pathCoordinates,i=o[0].valueData,r.length<=4)return e.Interpolation.none()(r,i);var s,u,c=[],l=[],f=r.length/2,h=[],d=[],p=[],v=[];for(s=0;s<f;s++)c[s]=r[2*s],l[s]=r[2*s+1];for(s=0;s<f-1;s++)p[s]=l[s+1]-l[s],v[s]=c[s+1]-c[s],d[s]=p[s]/v[s];for(h[0]=d[0],h[f-1]=d[f-2],s=1;s<f-1;s++)0===d[s]||0===d[s-1]||d[s-1]>0!=d[s]>0?h[s]=0:(h[s]=3*(v[s-1]+v[s])/((2*v[s]+v[s-1])/d[s-1]+(v[s]+2*v[s-1])/d[s]),isFinite(h[s])||(h[s]=0));for(u=(new e.Svg.Path).move(c[0],l[0],!1,i[0]),s=0;s<f-1;s++)u.curve(c[s]+v[s]/3,l[s]+h[s]*v[s]/3,c[s+1]-v[s]/3,l[s+1]-h[s+1]*v[s]/3,c[s+1],l[s+1],!1,i[s+1]);return u}return e.Interpolation.none()([])}},e.Interpolation.step=function(t){return t=e.extend({},{postpone:!0,fillHoles:!1},t),function(n,r){for(var i,o,a,s=new e.Svg.Path,u=0;u<n.length;u+=2){var c=n[u],l=n[u+1],f=r[u/2];void 0!==f.value?(void 0===a?s.move(c,l,!1,f):(t.postpone?s.line(c,o,!1,a):s.line(i,l,!1,f),s.line(c,l,!1,f)),i=c,o=l,a=f):t.fillHoles||(i=o=a=void 0)}return s}}}(0,t),function(t,e){"use strict";e.EventEmitter=function(){var t=[];return{addEventHandler:function(e,n){t[e]=t[e]||[],t[e].push(n)},removeEventHandler:function(e,n){t[e]&&(n?(t[e].splice(t[e].indexOf(n),1),0===t[e].length&&delete t[e]):delete t[e])},emit:function(e,n){t[e]&&t[e].forEach((function(t){t(n)})),t["*"]&&t["*"].forEach((function(t){t(e,n)}))}}}}(0,t),function(t,e){"use strict";function n(t){var e=[];if(t.length)for(var n=0;n<t.length;n++)e.push(t[n]);return e}e.Class={extend:function(t,n){var r=n||this.prototype||e.Class,i=Object.create(r);e.Class.cloneDefinitions(i,t);var o=function(){var t,n=i.constructor||function(){};return t=this===e?Object.create(i):this,n.apply(t,Array.prototype.slice.call(arguments,0)),t};return o.prototype=i,o.super=r,o.extend=this.extend,o},cloneDefinitions:function(){var t=n(arguments),e=t[0];return t.splice(1,t.length-1).forEach((function(t){Object.getOwnPropertyNames(t).forEach((function(n){delete e[n],Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))})),e}}}(0,t),function(t,e){"use strict";var n=t.window;function r(){n.addEventListener("resize",this.resizeListener),this.optionsProvider=e.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter),this.eventEmitter.addEventHandler("optionsChanged",function(){this.update()}.bind(this)),this.options.plugins&&this.options.plugins.forEach(function(t){t instanceof Array?t[0](this,t[1]):t(this)}.bind(this)),this.eventEmitter.emit("data",{type:"initial",data:this.data}),this.createChart(this.optionsProvider.getCurrentOptions()),this.initializeTimeoutId=void 0}e.Base=e.Class.extend({constructor:function(t,n,i,o,a){this.container=e.querySelector(t),this.data=n||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.defaultOptions=i,this.options=o,this.responsiveOptions=a,this.eventEmitter=e.EventEmitter(),this.supportsForeignObject=e.Svg.isSupported("Extensibility"),this.supportsAnimations=e.Svg.isSupported("AnimationEventsAttribute"),this.resizeListener=function(){this.update()}.bind(this),this.container&&(this.container.__chartist__&&this.container.__chartist__.detach(),this.container.__chartist__=this),this.initializeTimeoutId=setTimeout(r.bind(this),0)},optionsProvider:void 0,container:void 0,svg:void 0,eventEmitter:void 0,createChart:function(){throw new Error("Base chart type can't be instantiated!")},update:function(t,n,r){return t&&(this.data=t||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.eventEmitter.emit("data",{type:"update",data:this.data})),n&&(this.options=e.extend({},r?this.options:this.defaultOptions,n),this.initializeTimeoutId||(this.optionsProvider.removeMediaQueryListeners(),this.optionsProvider=e.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter))),this.initializeTimeoutId||this.createChart(this.optionsProvider.getCurrentOptions()),this},detach:function(){return this.initializeTimeoutId?n.clearTimeout(this.initializeTimeoutId):(n.removeEventListener("resize",this.resizeListener),this.optionsProvider.removeMediaQueryListeners()),this},on:function(t,e){return this.eventEmitter.addEventHandler(t,e),this},off:function(t,e){return this.eventEmitter.removeEventHandler(t,e),this},version:e.version,supportsForeignObject:!1})}(this||n,t),function(t,e){"use strict";var n=t.document;e.Svg=e.Class.extend({constructor:function(t,r,i,o,a){t instanceof Element?this._node=t:(this._node=n.createElementNS(e.namespaces.svg,t),"svg"===t&&this.attr({"xmlns:ct":e.namespaces.ct})),r&&this.attr(r),i&&this.addClass(i),o&&(a&&o._node.firstChild?o._node.insertBefore(this._node,o._node.firstChild):o._node.appendChild(this._node))},attr:function(t,n){return"string"==typeof t?n?this._node.getAttributeNS(n,t):this._node.getAttribute(t):(Object.keys(t).forEach(function(n){if(void 0!==t[n])if(-1!==n.indexOf(":")){var r=n.split(":");this._node.setAttributeNS(e.namespaces[r[0]],n,t[n])}else this._node.setAttribute(n,t[n])}.bind(this)),this)},elem:function(t,n,r,i){return new e.Svg(t,n,r,this,i)},parent:function(){return this._node.parentNode instanceof SVGElement?new e.Svg(this._node.parentNode):null},root:function(){for(var t=this._node;"svg"!==t.nodeName;)t=t.parentNode;return new e.Svg(t)},querySelector:function(t){var n=this._node.querySelector(t);return n?new e.Svg(n):null},querySelectorAll:function(t){var n=this._node.querySelectorAll(t);return n.length?new e.Svg.List(n):null},getNode:function(){return this._node},foreignObject:function(t,r,i,o){if("string"==typeof t){var a=n.createElement("div");a.innerHTML=t,t=a.firstChild}t.setAttribute("xmlns",e.namespaces.xmlns);var s=this.elem("foreignObject",r,i,o);return s._node.appendChild(t),s},text:function(t){return this._node.appendChild(n.createTextNode(t)),this},empty:function(){for(;this._node.firstChild;)this._node.removeChild(this._node.firstChild);return this},remove:function(){return this._node.parentNode.removeChild(this._node),this.parent()},replace:function(t){return this._node.parentNode.replaceChild(t._node,this._node),t},append:function(t,e){return e&&this._node.firstChild?this._node.insertBefore(t._node,this._node.firstChild):this._node.appendChild(t._node),this},classes:function(){return this._node.getAttribute("class")?this._node.getAttribute("class").trim().split(/\s+/):[]},addClass:function(t){return this._node.setAttribute("class",this.classes(this._node).concat(t.trim().split(/\s+/)).filter((function(t,e,n){return n.indexOf(t)===e})).join(" ")),this},removeClass:function(t){var e=t.trim().split(/\s+/);return this._node.setAttribute("class",this.classes(this._node).filter((function(t){return-1===e.indexOf(t)})).join(" ")),this},removeAllClasses:function(){return this._node.setAttribute("class",""),this},height:function(){return this._node.getBoundingClientRect().height},width:function(){return this._node.getBoundingClientRect().width},animate:function(t,n,r){return void 0===n&&(n=!0),Object.keys(t).forEach(function(i){function o(t,n){var o,a,s,u={};t.easing&&(s=t.easing instanceof Array?t.easing:e.Svg.Easing[t.easing],delete t.easing),t.begin=e.ensureUnit(t.begin,"ms"),t.dur=e.ensureUnit(t.dur,"ms"),s&&(t.calcMode="spline",t.keySplines=s.join(" "),t.keyTimes="0;1"),n&&(t.fill="freeze",u[i]=t.from,this.attr(u),a=e.quantity(t.begin||0).value,t.begin="indefinite"),o=this.elem("animate",e.extend({attributeName:i},t)),n&&setTimeout(function(){try{o._node.beginElement()}catch(e){u[i]=t.to,this.attr(u),o.remove()}}.bind(this),a),r&&o._node.addEventListener("beginEvent",function(){r.emit("animationBegin",{element:this,animate:o._node,params:t})}.bind(this)),o._node.addEventListener("endEvent",function(){r&&r.emit("animationEnd",{element:this,animate:o._node,params:t}),n&&(u[i]=t.to,this.attr(u),o.remove())}.bind(this))}t[i]instanceof Array?t[i].forEach(function(t){o.bind(this)(t,!1)}.bind(this)):o.bind(this)(t[i],n)}.bind(this)),this}}),e.Svg.isSupported=function(t){return n.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#"+t,"1.1")},e.Svg.Easing={easeInSine:[.47,0,.745,.715],easeOutSine:[.39,.575,.565,1],easeInOutSine:[.445,.05,.55,.95],easeInQuad:[.55,.085,.68,.53],easeOutQuad:[.25,.46,.45,.94],easeInOutQuad:[.455,.03,.515,.955],easeInCubic:[.55,.055,.675,.19],easeOutCubic:[.215,.61,.355,1],easeInOutCubic:[.645,.045,.355,1],easeInQuart:[.895,.03,.685,.22],easeOutQuart:[.165,.84,.44,1],easeInOutQuart:[.77,0,.175,1],easeInQuint:[.755,.05,.855,.06],easeOutQuint:[.23,1,.32,1],easeInOutQuint:[.86,0,.07,1],easeInExpo:[.95,.05,.795,.035],easeOutExpo:[.19,1,.22,1],easeInOutExpo:[1,0,0,1],easeInCirc:[.6,.04,.98,.335],easeOutCirc:[.075,.82,.165,1],easeInOutCirc:[.785,.135,.15,.86],easeInBack:[.6,-.28,.735,.045],easeOutBack:[.175,.885,.32,1.275],easeInOutBack:[.68,-.55,.265,1.55]},e.Svg.List=e.Class.extend({constructor:function(t){var n=this;this.svgElements=[];for(var r=0;r<t.length;r++)this.svgElements.push(new e.Svg(t[r]));Object.keys(e.Svg.prototype).filter((function(t){return-1===["constructor","parent","querySelector","querySelectorAll","replace","append","classes","height","width"].indexOf(t)})).forEach((function(t){n[t]=function(){var r=Array.prototype.slice.call(arguments,0);return n.svgElements.forEach((function(n){e.Svg.prototype[t].apply(n,r)})),n}}))}})}(this||n,t),function(t,e){"use strict";var n={m:["x","y"],l:["x","y"],c:["x1","y1","x2","y2","x","y"],a:["rx","ry","xAr","lAf","sf","x","y"]},r={accuracy:3};function i(t,n,r,i,o,a){var s=e.extend({command:o?t.toLowerCase():t.toUpperCase()},n,a?{data:a}:{});r.splice(i,0,s)}function o(t,e){t.forEach((function(r,i){n[r.command.toLowerCase()].forEach((function(n,o){e(r,n,i,o,t)}))}))}e.Svg.Path=e.Class.extend({constructor:function(t,n){this.pathElements=[],this.pos=0,this.close=t,this.options=e.extend({},r,n)},position:function(t){return void 0!==t?(this.pos=Math.max(0,Math.min(this.pathElements.length,t)),this):this.pos},remove:function(t){return this.pathElements.splice(this.pos,t),this},move:function(t,e,n,r){return i("M",{x:+t,y:+e},this.pathElements,this.pos++,n,r),this},line:function(t,e,n,r){return i("L",{x:+t,y:+e},this.pathElements,this.pos++,n,r),this},curve:function(t,e,n,r,o,a,s,u){return i("C",{x1:+t,y1:+e,x2:+n,y2:+r,x:+o,y:+a},this.pathElements,this.pos++,s,u),this},arc:function(t,e,n,r,o,a,s,u,c){return i("A",{rx:+t,ry:+e,xAr:+n,lAf:+r,sf:+o,x:+a,y:+s},this.pathElements,this.pos++,u,c),this},scale:function(t,e){return o(this.pathElements,(function(n,r){n[r]*="x"===r[0]?t:e})),this},translate:function(t,e){return o(this.pathElements,(function(n,r){n[r]+="x"===r[0]?t:e})),this},transform:function(t){return o(this.pathElements,(function(e,n,r,i,o){var a=t(e,n,r,i,o);(a||0===a)&&(e[n]=a)})),this},parse:function(t){var r=t.replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").split(/[\s,]+/).reduce((function(t,e){return e.match(/[A-Za-z]/)&&t.push([]),t[t.length-1].push(e),t}),[]);"Z"===r[r.length-1][0].toUpperCase()&&r.pop();var i=r.map((function(t){var r=t.shift(),i=n[r.toLowerCase()];return e.extend({command:r},i.reduce((function(e,n,r){return e[n]=+t[r],e}),{}))})),o=[this.pos,0];return Array.prototype.push.apply(o,i),Array.prototype.splice.apply(this.pathElements,o),this.pos+=i.length,this},stringify:function(){var t=Math.pow(10,this.options.accuracy);return this.pathElements.reduce(function(e,r){var i=n[r.command.toLowerCase()].map(function(e){return this.options.accuracy?Math.round(r[e]*t)/t:r[e]}.bind(this));return e+r.command+i.join(",")}.bind(this),"")+(this.close?"Z":"")},clone:function(t){var n=new e.Svg.Path(t||this.close);return n.pos=this.pos,n.pathElements=this.pathElements.slice().map((function(t){return e.extend({},t)})),n.options=e.extend({},this.options),n},splitByCommand:function(t){var n=[new e.Svg.Path];return this.pathElements.forEach((function(r){r.command===t.toUpperCase()&&0!==n[n.length-1].pathElements.length&&n.push(new e.Svg.Path),n[n.length-1].pathElements.push(r)})),n}}),e.Svg.Path.elementDescriptions=n,e.Svg.Path.join=function(t,n,r){for(var i=new e.Svg.Path(n,r),o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.pathElements.length;s++)i.pathElements.push(a.pathElements[s]);return i}}(0,t),function(t,e){"use strict";t.window,t.document;var n={x:{pos:"x",len:"width",dir:"horizontal",rectStart:"x1",rectEnd:"x2",rectOffset:"y2"},y:{pos:"y",len:"height",dir:"vertical",rectStart:"y2",rectEnd:"y1",rectOffset:"x1"}};e.Axis=e.Class.extend({constructor:function(t,e,r,i){this.units=t,this.counterUnits=t===n.x?n.y:n.x,this.chartRect=e,this.axisLength=e[t.rectEnd]-e[t.rectStart],this.gridOffset=e[t.rectOffset],this.ticks=r,this.options=i},createGridAndLabels:function(t,n,r,i,o){var a=i["axis"+this.units.pos.toUpperCase()],s=this.ticks.map(this.projectValue.bind(this)),u=this.ticks.map(a.labelInterpolationFnc);s.forEach(function(c,l){var f,h={x:0,y:0};f=s[l+1]?s[l+1]-c:Math.max(this.axisLength-c,30),e.isFalseyButZero(u[l])&&""!==u[l]||("x"===this.units.pos?(c=this.chartRect.x1+c,h.x=i.axisX.labelOffset.x,"start"===i.axisX.position?h.y=this.chartRect.padding.top+i.axisX.labelOffset.y+(r?5:20):h.y=this.chartRect.y1+i.axisX.labelOffset.y+(r?5:20)):(c=this.chartRect.y1-c,h.y=i.axisY.labelOffset.y-(r?f:0),"start"===i.axisY.position?h.x=r?this.chartRect.padding.left+i.axisY.labelOffset.x:this.chartRect.x1-10:h.x=this.chartRect.x2+i.axisY.labelOffset.x+10),a.showGrid&&e.createGrid(c,l,this,this.gridOffset,this.chartRect[this.counterUnits.len](),t,[i.classNames.grid,i.classNames[this.units.dir]],o),a.showLabel&&e.createLabel(c,f,l,u,this,a.offset,h,n,[i.classNames.label,i.classNames[this.units.dir],"start"===a.position?i.classNames[a.position]:i.classNames.end],r,o))}.bind(this))},projectValue:function(t,e,n){throw new Error("Base axis can't be instantiated!")}}),e.Axis.units=n}(this||n,t),function(t,e){"use strict";t.window,t.document,e.AutoScaleAxis=e.Axis.extend({constructor:function(t,n,r,i){var o=i.highLow||e.getHighLow(n,i,t.pos);this.bounds=e.getBounds(r[t.rectEnd]-r[t.rectStart],o,i.scaleMinSpace||20,i.onlyInteger),this.range={min:this.bounds.min,max:this.bounds.max},e.AutoScaleAxis.super.constructor.call(this,t,r,this.bounds.values,i)},projectValue:function(t){return this.axisLength*(+e.getMultiValue(t,this.units.pos)-this.bounds.min)/this.bounds.range}})}(this||n,t),function(t,e){"use strict";t.window,t.document,e.FixedScaleAxis=e.Axis.extend({constructor:function(t,n,r,i){var o=i.highLow||e.getHighLow(n,i,t.pos);this.divisor=i.divisor||1,this.ticks=i.ticks||e.times(this.divisor).map(function(t,e){return o.low+(o.high-o.low)/this.divisor*e}.bind(this)),this.ticks.sort((function(t,e){return t-e})),this.range={min:o.low,max:o.high},e.FixedScaleAxis.super.constructor.call(this,t,r,this.ticks,i),this.stepLength=this.axisLength/this.divisor},projectValue:function(t){return this.axisLength*(+e.getMultiValue(t,this.units.pos)-this.range.min)/(this.range.max-this.range.min)}})}(this||n,t),function(t,e){"use strict";t.window,t.document,e.StepAxis=e.Axis.extend({constructor:function(t,n,r,i){e.StepAxis.super.constructor.call(this,t,r,i.ticks,i);var o=Math.max(1,i.ticks.length-(i.stretch?1:0));this.stepLength=this.axisLength/o},projectValue:function(t,e){return this.stepLength*e}})}(this||n,t),function(t,e){"use strict";t.window,t.document;var n={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:e.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:e.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea:!1,areaBase:0,lineSmooth:!0,showGridBackground:!1,low:void 0,high:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:!1,reverseData:!1,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};e.Line=e.Base.extend({constructor:function(t,r,i,o){e.Line.super.constructor.call(this,t,r,n,e.extend({},n,i),o)},createChart:function(t){var r=e.normalizeData(this.data,t.reverseData,!0);this.svg=e.createSvg(this.container,t.width,t.height,t.classNames.chart);var i,o,a=this.svg.elem("g").addClass(t.classNames.gridGroup),s=this.svg.elem("g"),u=this.svg.elem("g").addClass(t.classNames.labelGroup),c=e.createChartRect(this.svg,t,n.padding);i=void 0===t.axisX.type?new e.StepAxis(e.Axis.units.x,r.normalized.series,c,e.extend({},t.axisX,{ticks:r.normalized.labels,stretch:t.fullWidth})):t.axisX.type.call(e,e.Axis.units.x,r.normalized.series,c,t.axisX),o=void 0===t.axisY.type?new e.AutoScaleAxis(e.Axis.units.y,r.normalized.series,c,e.extend({},t.axisY,{high:e.isNumeric(t.high)?t.high:t.axisY.high,low:e.isNumeric(t.low)?t.low:t.axisY.low})):t.axisY.type.call(e,e.Axis.units.y,r.normalized.series,c,t.axisY),i.createGridAndLabels(a,u,this.supportsForeignObject,t,this.eventEmitter),o.createGridAndLabels(a,u,this.supportsForeignObject,t,this.eventEmitter),t.showGridBackground&&e.createGridBackground(a,c,t.classNames.gridBackground,this.eventEmitter),r.raw.series.forEach(function(n,a){var u=s.elem("g");u.attr({"ct:series-name":n.name,"ct:meta":e.serialize(n.meta)}),u.addClass([t.classNames.series,n.className||t.classNames.series+"-"+e.alphaNumerate(a)].join(" "));var l=[],f=[];r.normalized.series[a].forEach(function(t,s){var u={x:c.x1+i.projectValue(t,s,r.normalized.series[a]),y:c.y1-o.projectValue(t,s,r.normalized.series[a])};l.push(u.x,u.y),f.push({value:t,valueIndex:s,meta:e.getMetaData(n,s)})}.bind(this));var h={lineSmooth:e.getSeriesOption(n,t,"lineSmooth"),showPoint:e.getSeriesOption(n,t,"showPoint"),showLine:e.getSeriesOption(n,t,"showLine"),showArea:e.getSeriesOption(n,t,"showArea"),areaBase:e.getSeriesOption(n,t,"areaBase")},d=("function"==typeof h.lineSmooth?h.lineSmooth:h.lineSmooth?e.Interpolation.monotoneCubic():e.Interpolation.none())(l,f);if(h.showPoint&&d.pathElements.forEach(function(r){var s=u.elem("line",{x1:r.x,y1:r.y,x2:r.x+.01,y2:r.y},t.classNames.point).attr({"ct:value":[r.data.value.x,r.data.value.y].filter(e.isNumeric).join(","),"ct:meta":e.serialize(r.data.meta)});this.eventEmitter.emit("draw",{type:"point",value:r.data.value,index:r.data.valueIndex,meta:r.data.meta,series:n,seriesIndex:a,axisX:i,axisY:o,group:u,element:s,x:r.x,y:r.y})}.bind(this)),h.showLine){var p=u.elem("path",{d:d.stringify()},t.classNames.line,!0);this.eventEmitter.emit("draw",{type:"line",values:r.normalized.series[a],path:d.clone(),chartRect:c,index:a,series:n,seriesIndex:a,seriesMeta:n.meta,axisX:i,axisY:o,group:u,element:p})}if(h.showArea&&o.range){var v=Math.max(Math.min(h.areaBase,o.range.max),o.range.min),m=c.y1-o.projectValue(v);d.splitByCommand("M").filter((function(t){return t.pathElements.length>1})).map((function(t){var e=t.pathElements[0],n=t.pathElements[t.pathElements.length-1];return t.clone(!0).position(0).remove(1).move(e.x,m).line(e.x,e.y).position(t.pathElements.length+1).line(n.x,m)})).forEach(function(e){var s=u.elem("path",{d:e.stringify()},t.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:r.normalized.series[a],path:e.clone(),series:n,seriesIndex:a,axisX:i,axisY:o,chartRect:c,index:a,group:u,element:s})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:o.bounds,chartRect:c,axisX:i,axisY:o,svg:this.svg,options:t})}})}(this||n,t),function(t,e){"use strict";t.window,t.document;var n={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:e.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:e.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,showGridBackground:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};e.Bar=e.Base.extend({constructor:function(t,r,i,o){e.Bar.super.constructor.call(this,t,r,n,e.extend({},n,i),o)},createChart:function(t){var r,i;t.distributeSeries?(r=e.normalizeData(this.data,t.reverseData,t.horizontalBars?"x":"y")).normalized.series=r.normalized.series.map((function(t){return[t]})):r=e.normalizeData(this.data,t.reverseData,t.horizontalBars?"x":"y"),this.svg=e.createSvg(this.container,t.width,t.height,t.classNames.chart+(t.horizontalBars?" "+t.classNames.horizontalBars:""));var o=this.svg.elem("g").addClass(t.classNames.gridGroup),a=this.svg.elem("g"),s=this.svg.elem("g").addClass(t.classNames.labelGroup);if(t.stackBars&&0!==r.normalized.series.length){var u=e.serialMap(r.normalized.series,(function(){return Array.prototype.slice.call(arguments).map((function(t){return t})).reduce((function(t,e){return{x:t.x+(e&&e.x)||0,y:t.y+(e&&e.y)||0}}),{x:0,y:0})}));i=e.getHighLow([u],t,t.horizontalBars?"x":"y")}else i=e.getHighLow(r.normalized.series,t,t.horizontalBars?"x":"y");i.high=+t.high||(0===t.high?0:i.high),i.low=+t.low||(0===t.low?0:i.low);var c,l,f,h,d,p=e.createChartRect(this.svg,t,n.padding);l=t.distributeSeries&&t.stackBars?r.normalized.labels.slice(0,1):r.normalized.labels,t.horizontalBars?(c=h=void 0===t.axisX.type?new e.AutoScaleAxis(e.Axis.units.x,r.normalized.series,p,e.extend({},t.axisX,{highLow:i,referenceValue:0})):t.axisX.type.call(e,e.Axis.units.x,r.normalized.series,p,e.extend({},t.axisX,{highLow:i,referenceValue:0})),f=d=void 0===t.axisY.type?new e.StepAxis(e.Axis.units.y,r.normalized.series,p,{ticks:l}):t.axisY.type.call(e,e.Axis.units.y,r.normalized.series,p,t.axisY)):(f=h=void 0===t.axisX.type?new e.StepAxis(e.Axis.units.x,r.normalized.series,p,{ticks:l}):t.axisX.type.call(e,e.Axis.units.x,r.normalized.series,p,t.axisX),c=d=void 0===t.axisY.type?new e.AutoScaleAxis(e.Axis.units.y,r.normalized.series,p,e.extend({},t.axisY,{highLow:i,referenceValue:0})):t.axisY.type.call(e,e.Axis.units.y,r.normalized.series,p,e.extend({},t.axisY,{highLow:i,referenceValue:0})));var v=t.horizontalBars?p.x1+c.projectValue(0):p.y1-c.projectValue(0),m=[];f.createGridAndLabels(o,s,this.supportsForeignObject,t,this.eventEmitter),c.createGridAndLabels(o,s,this.supportsForeignObject,t,this.eventEmitter),t.showGridBackground&&e.createGridBackground(o,p,t.classNames.gridBackground,this.eventEmitter),r.raw.series.forEach(function(n,i){var o,s,u=i-(r.raw.series.length-1)/2;o=t.distributeSeries&&!t.stackBars?f.axisLength/r.normalized.series.length/2:t.distributeSeries&&t.stackBars?f.axisLength/2:f.axisLength/r.normalized.series[i].length/2,(s=a.elem("g")).attr({"ct:series-name":n.name,"ct:meta":e.serialize(n.meta)}),s.addClass([t.classNames.series,n.className||t.classNames.series+"-"+e.alphaNumerate(i)].join(" ")),r.normalized.series[i].forEach(function(a,l){var y,g,b,x;if(x=t.distributeSeries&&!t.stackBars?i:t.distributeSeries&&t.stackBars?0:l,y=t.horizontalBars?{x:p.x1+c.projectValue(a&&a.x?a.x:0,l,r.normalized.series[i]),y:p.y1-f.projectValue(a&&a.y?a.y:0,x,r.normalized.series[i])}:{x:p.x1+f.projectValue(a&&a.x?a.x:0,x,r.normalized.series[i]),y:p.y1-c.projectValue(a&&a.y?a.y:0,l,r.normalized.series[i])},f instanceof e.StepAxis&&(f.options.stretch||(y[f.units.pos]+=o*(t.horizontalBars?-1:1)),y[f.units.pos]+=t.stackBars||t.distributeSeries?0:u*t.seriesBarDistance*(t.horizontalBars?-1:1)),b=m[l]||v,m[l]=b-(v-y[f.counterUnits.pos]),void 0!==a){var w={};w[f.units.pos+"1"]=y[f.units.pos],w[f.units.pos+"2"]=y[f.units.pos],!t.stackBars||"accumulate"!==t.stackMode&&t.stackMode?(w[f.counterUnits.pos+"1"]=v,w[f.counterUnits.pos+"2"]=y[f.counterUnits.pos]):(w[f.counterUnits.pos+"1"]=b,w[f.counterUnits.pos+"2"]=m[l]),w.x1=Math.min(Math.max(w.x1,p.x1),p.x2),w.x2=Math.min(Math.max(w.x2,p.x1),p.x2),w.y1=Math.min(Math.max(w.y1,p.y2),p.y1),w.y2=Math.min(Math.max(w.y2,p.y2),p.y1);var k=e.getMetaData(n,l);g=s.elem("line",w,t.classNames.bar).attr({"ct:value":[a.x,a.y].filter(e.isNumeric).join(","),"ct:meta":e.serialize(k)}),this.eventEmitter.emit("draw",e.extend({type:"bar",value:a,index:l,meta:k,series:n,seriesIndex:i,axisX:h,axisY:d,chartRect:p,group:s,element:g},w))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:c.bounds,chartRect:p,axisX:h,axisY:d,svg:this.svg,options:t})}})}(this||n,t),function(t,e){"use strict";t.window,t.document;var n={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",sliceDonutSolid:"ct-slice-donut-solid",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutSolid:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:e.noop,labelDirection:"neutral",reverseData:!1,ignoreEmptyValues:!1};function r(t,e,n){var r=e.x>t.x;return r&&"explode"===n||!r&&"implode"===n?"start":r&&"implode"===n||!r&&"explode"===n?"end":"middle"}e.Pie=e.Base.extend({constructor:function(t,r,i,o){e.Pie.super.constructor.call(this,t,r,n,e.extend({},n,i),o)},createChart:function(t){var i,o,a,s,u,c=e.normalizeData(this.data),l=[],f=t.startAngle;this.svg=e.createSvg(this.container,t.width,t.height,t.donut?t.classNames.chartDonut:t.classNames.chartPie),o=e.createChartRect(this.svg,t,n.padding),a=Math.min(o.width()/2,o.height()/2),u=t.total||c.normalized.series.reduce((function(t,e){return t+e}),0);var h=e.quantity(t.donutWidth);"%"===h.unit&&(h.value*=a/100),a-=t.donut&&!t.donutSolid?h.value/2:0,s="outside"===t.labelPosition||t.donut&&!t.donutSolid?a:"center"===t.labelPosition?0:t.donutSolid?a-h.value/2:a/2,s+=t.labelOffset;var d={x:o.x1+o.width()/2,y:o.y2+o.height()/2},p=1===c.raw.series.filter((function(t){return t.hasOwnProperty("value")?0!==t.value:0!==t})).length;c.raw.series.forEach(function(t,e){l[e]=this.svg.elem("g",null,null)}.bind(this)),t.showLabel&&(i=this.svg.elem("g",null,null)),c.raw.series.forEach(function(n,o){if(0!==c.normalized.series[o]||!t.ignoreEmptyValues){l[o].attr({"ct:series-name":n.name}),l[o].addClass([t.classNames.series,n.className||t.classNames.series+"-"+e.alphaNumerate(o)].join(" "));var v=u>0?f+c.normalized.series[o]/u*360:0,m=Math.max(0,f-(0===o||p?0:.2));v-m>=359.99&&(v=m+359.99);var y,g,b,x=e.polarToCartesian(d.x,d.y,a,m),w=e.polarToCartesian(d.x,d.y,a,v),k=new e.Svg.Path(!t.donut||t.donutSolid).move(w.x,w.y).arc(a,a,0,v-f>180,0,x.x,x.y);t.donut?t.donutSolid&&(b=a-h.value,y=e.polarToCartesian(d.x,d.y,b,f-(0===o||p?0:.2)),g=e.polarToCartesian(d.x,d.y,b,v),k.line(y.x,y.y),k.arc(b,b,0,v-f>180,1,g.x,g.y)):k.line(d.x,d.y);var S=t.classNames.slicePie;t.donut&&(S=t.classNames.sliceDonut,t.donutSolid&&(S=t.classNames.sliceDonutSolid));var E=l[o].elem("path",{d:k.stringify()},S);if(E.attr({"ct:value":c.normalized.series[o],"ct:meta":e.serialize(n.meta)}),t.donut&&!t.donutSolid&&(E._node.style.strokeWidth=h.value+"px"),this.eventEmitter.emit("draw",{type:"slice",value:c.normalized.series[o],totalDataSum:u,index:o,meta:n.meta,series:n,group:l[o],element:E,path:k.clone(),center:d,radius:a,startAngle:f,endAngle:v}),t.showLabel){var L,A;L=1===c.raw.series.length?{x:d.x,y:d.y}:e.polarToCartesian(d.x,d.y,s,f+(v-f)/2),A=c.normalized.labels&&!e.isFalseyButZero(c.normalized.labels[o])?c.normalized.labels[o]:c.normalized.series[o];var M=t.labelInterpolationFnc(A,o);if(M||0===M){var O=i.elem("text",{dx:L.x,dy:L.y,"text-anchor":r(d,L,t.labelDirection)},t.classNames.label).text(""+M);this.eventEmitter.emit("draw",{type:"label",index:o,group:i,element:O,text:""+M,x:L.x,y:L.y})}}f=v}}.bind(this)),this.eventEmitter.emit("created",{chartRect:o,svg:this.svg,options:t})},determineAnchorPosition:r})}(this||n,t),t}()}.apply(e,[]))||(t.exports=r)}).call(this,n(105))},function(t,e,n){t.exports=n(271)},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(13),i=n(51),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},function(t,e,n){var r=n(15),i=n(25),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},function(t,e,n){var r=n(25),i=n(58),o=n(16)("species");t.exports=function(t,e){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},function(t,e,n){var r=n(14),i=n(108);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.4",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(13);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(t,e,n){var r,i,o=n(15),a=n(88),s=o.process,u=s&&s.versions,c=u&&u.v8;c?i=(r=c.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},function(t,e,n){var r=n(29);t.exports=r("navigator","userAgent")||""},function(t,e,n){"use strict";var r=n(4),i=n(112),o=n(61),a=n(93),s=n(44),u=n(35),c=n(53),l=n(16),f=n(14),h=n(49),d=n(113),p=d.IteratorPrototype,v=d.BUGGY_SAFARI_ITERATORS,m=l("iterator"),y=function(){return this};t.exports=function(t,e,n,l,d,g,b){i(n,e,l);var x,w,k,S=function(t){if(t===d&&O)return O;if(!v&&t in A)return A[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},E=e+" Iterator",L=!1,A=t.prototype,M=A[m]||A["@@iterator"]||d&&A[d],O=!v&&M||S(d),_="Array"==e&&A.entries||M;if(_&&(x=o(_.call(new t)),p!==Object.prototype&&x.next&&(f||o(x)===p||(a?a(x,p):"function"!=typeof x[m]&&u(x,m,y)),s(x,E,!0,!0),f&&(h[E]=y))),"values"==d&&M&&"values"!==M.name&&(L=!0,O=function(){return M.call(this)}),f&&!b||A[m]===O||u(A,m,O),h[e]=O,d)if(w={values:S("values"),keys:g?O:S("keys"),entries:S("entries")},b)for(k in w)(v||L||!(k in A))&&c(A,k,w[k]);else r({target:e,proto:!0,forced:v||L},w);return w}},function(t,e,n){var r=n(68),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){var r={};r[n(16)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){var r=n(11),i=n(179);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},function(t,e,n){var r=n(53);t.exports=function(t,e,n){for(var i in e)n&&n.unsafe&&t[i]?t[i]=e[i]:r(t,i,e[i],n);return t}},function(t,e,n){var r=n(11),i=n(62);t.exports=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return r(e.call(t))}},function(t,e,n){var r=n(16);e.f=r},function(t,e,n){t.exports=n(222)},function(t,e,n){var r=n(140);function i(e,n){return t.exports=i=r||function(t,e){return t.__proto__=e,t},i(e,n)}t.exports=i},function(t,e,n){var r=n(66),i="["+n(77)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(o,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},function(t,e,n){var r=n(357),i=n(153),o=n(98),a=n(362);function s(e,n,u){return a()?t.exports=s=i:t.exports=s=function(t,e,n){var i=[null];i.push.apply(i,e);var a=new(r(Function).apply(t,i));return n&&o(a,n.prototype),a},s.apply(null,arguments)}t.exports=s},function(t,e,n){t.exports=n(276)},function(t,e,n){t.exports=n(291)},function(t,e,n){t.exports=n(366)},function(t,e,n){"use strict";var r=n(4),i=n(13),o=n(58),a=n(25),s=n(36),u=n(41),c=n(69),l=n(84),f=n(59),h=n(16),d=n(87),p=h("isConcatSpreadable"),v=d>=51||!i((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),m=f("concat"),y=function(t){if(!a(t))return!1;var e=t[p];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,forced:!v||!m},{concat:function(t){var e,n,r,i,o,a=s(this),f=l(a,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(o=-1===e?a:arguments[e],y(o)){if(h+(i=u(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,h++)n in o&&c(f,h,o[n])}else{if(h>=9007199254740991)throw TypeError("Maximum allowed index exceeded");c(f,h++,o)}return f.length=h,f}})},function(t,e){function n(t){return(n="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})(t)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}t.exports=r},function(t,e,n){var r=n(26),i=n(13),o=n(83);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(13),i=/#|\.prototype\./,o=function(t,e){var n=s[a(t)];return n==c||n!=u&&("function"==typeof e?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";t.exports=o},function(t,e,n){var r=n(15),i=n(173),o=r["__core-js_shared__"]||i("__core-js_shared__",{});t.exports=o},function(t,e,n){function r(t){return(r="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})(t)}var i=n(86);t.exports=i&&!Symbol.sham&&"symbol"==r(Symbol.iterator)},function(t,e,n){n(71),n(42),n(45),n(181),n(128),n(184);var r=n(10);t.exports=r.Promise},function(t,e,n){var r=n(108),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},function(t,e,n){"use strict";var r=n(113).IteratorPrototype,i=n(48),o=n(47),a=n(44),s=n(49),u=function(){return this};t.exports=function(t,e,n){var c=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),a(t,c,!1,!0),s[c]=u,t}},function(t,e,n){"use strict";var r,i,o,a=n(61),s=n(35),u=n(28),c=n(16),l=n(14),f=c("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),l||u(r,f)||s(r,f,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(t,e,n){var r=n(13);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){var r=n(28),i=n(40),o=n(116).indexOf,a=n(60);t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(40),i=n(41),o=n(90),a=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),l=o(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){var r=n(29);t.exports=r("document","documentElement")},function(t,e,n){"use strict";var r=n(40),i=n(119),o=n(49),a=n(43),s=n(89),u=a.set,c=a.getterFor("Array Iterator");t.exports=s(Array,"Array",(function(t,e){u(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(15);t.exports=r.Promise},function(t,e,n){"use strict";var r=n(29),i=n(31),o=n(16),a=n(26),s=o("species");t.exports=function(t){var e=r(t),n=i.f;a&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(16),i=n(49),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},function(t,e,n){var r=n(11);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(16)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},function(t,e,n){var r,i,o,a=n(15),s=n(13),u=n(51),c=n(27),l=n(117),f=n(83),h=n(126),d=a.location,p=a.setImmediate,v=a.clearImmediate,m=a.process,y=a.MessageChannel,g=a.Dispatch,b=0,x={},w=function(t){if(x.hasOwnProperty(t)){var e=x[t];delete x[t],e()}},k=function(t){return function(){w(t)}},S=function(t){w(t.data)},E=function(t){a.postMessage(t+"",d.protocol+"//"+d.host)};p&&v||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return x[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(b),b},v=function(t){delete x[t]},"process"==u(m)?r=function(t){m.nextTick(k(t))}:g&&g.now?r=function(t){g.now(k(t))}:y&&!h?(o=(i=new y).port2,i.port1.onmessage=S,r=c(o.postMessage,o,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||s(E)||"file:"===d.protocol?r="onreadystatechange"in f("script")?function(t){l.appendChild(f("script")).onreadystatechange=function(){l.removeChild(this),w(t)}}:function(t){setTimeout(k(t),0)}:(r=E,a.addEventListener("message",S,!1))),t.exports={set:p,clear:v}},function(t,e,n){var r=n(88);t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(t,e,n){var r=n(11),i=n(25),o=n(64);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(4),i=n(18),o=n(64),a=n(75),s=n(19);r({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=o.f(e),r=n.resolve,u=n.reject,c=a((function(){var n=i(e.resolve),o=[],a=0,u=1;s(t,(function(t){var i=a++,s=!1;o.push(void 0),u++,n.call(e,t).then((function(t){s||(s=!0,o[i]={status:"fulfilled",value:t},--u||r(o))}),(function(t){s||(s=!0,o[i]={status:"rejected",reason:t},--u||r(o))}))})),--u||r(o)}));return c.error&&u(c.value),n.promise}})},function(t,e,n){var r=n(4),i=n(15),o=n(88),a=[].slice,s=function(t){return function(e,n){var r=arguments.length>2,i=r?a.call(arguments,2):void 0;return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(o)},{setTimeout:s(i.setTimeout),setInterval:s(i.setInterval)})},function(t,e,n){n(188);var r=n(10).Object,i=t.exports=function(t,e,n){return r.defineProperty(t,e,n)};r.defineProperty.sham&&(i.sham=!0)},function(t,e,n){n(104),n(71),n(192),n(195),n(196),n(197),n(198),n(133),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209);var r=n(10);t.exports=r.Symbol},function(t,e,n){var r=n(115),i=n(91).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){n(24)("iterator")},function(t,e,n){n(42),n(211);var r=n(10);t.exports=r.Array.from},function(t,e,n){var r=n(214),i=Array.prototype;t.exports=function(t){var e=t.slice;return t===i||t instanceof Array&&e===i.slice?r:e}},function(t,e,n){n(229);var r=n(10);t.exports=r.Array.isArray},function(t,e,n){n(235);var r=n(10);t.exports=r.Reflect.construct},function(t,e,n){"use strict";var r=n(18),i=n(25),o=[].slice,a={},s=function(t,e,n){if(!(e in a)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";a[e]=Function("C,a","return new C("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=o.call(arguments,1),a=function(){var r=n.concat(o.call(arguments));return this instanceof a?s(e,r.length,r):e.apply(t,r)};return i(e.prototype)&&(a.prototype=e.prototype),a}},function(t,e,n){t.exports=n(240)},function(t,e,n){t.exports=n(243)},function(t,e,n){t.exports=n(252)},function(t,e){t.exports=function(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}},function(t,e,n){t.exports=n(254)},function(t,e,n){t.exports=n(255)},function(t,e,n){var r=n(143),i=n(257),o=n(142);t.exports=function(t,e){var n;if(t){if("string"==typeof t)return o(t,e);var a=i(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?r(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?o(t,e):void 0}}},function(t,e,n){n(265);var r=n(10).Object,i=t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)};r.getOwnPropertyDescriptor.sham&&(i.sham=!0)},function(t,e,n){"use strict";var r=n(4),i=n(15),o=n(148),a=n(13),s=n(35),u=n(19),c=n(74),l=n(25),f=n(44),h=n(31).f,d=n(54).forEach,p=n(26),v=n(43),m=v.set,y=v.getterFor;t.exports=function(t,e,n){var v,g=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),x=g?"set":"add",w=i[t],k=w&&w.prototype,S={};if(p&&"function"==typeof w&&(b||k.forEach&&!a((function(){(new w).entries().next()})))){v=e((function(e,n){m(c(e,v,t),{type:t,collection:new w}),null!=n&&u(n,e[x],e,g)}));var E=y(t);d(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in k)||b&&"clear"==t||s(v.prototype,t,(function(n,r){var i=E(this).collection;if(!e&&b&&!l(n))return"get"==t&&void 0;var o=i[t](0===n?0:n,r);return e?this:o}))})),b||h(v.prototype,"size",{configurable:!0,get:function(){return E(this).collection.size}})}else v=n.getConstructor(e,t,g,x),o.REQUIRED=!0;return f(v,t,!1,!0),S[t]=v,r({global:!0,forced:!0},S),b||n.setStrong(v,t,g),v}},function(t,e,n){function r(t){return(r="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})(t)}var i=n(60),o=n(25),a=n(28),s=n(31).f,u=n(70),c=n(274),l=u("meta"),f=0,h=Object.isExtensible||function(){return!0},d=function(t){s(t,l,{value:{objectID:"O"+ ++f,weakData:{}}})},p=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==r(t)?t:("string"==typeof t?"S":"P")+t;if(!a(t,l)){if(!h(t))return"F";if(!e)return"E";d(t)}return t[l].objectID},getWeakData:function(t,e){if(!a(t,l)){if(!h(t))return!0;if(!e)return!1;d(t)}return t[l].weakData},onFreeze:function(t){return c&&p.REQUIRED&&h(t)&&!a(t,l)&&d(t),t}};i[l]=!0},function(t,e,n){"use strict";var r=n(31).f,i=n(48),o=n(94),a=n(27),s=n(74),u=n(19),c=n(89),l=n(121),f=n(26),h=n(148).fastKey,d=n(43),p=d.set,v=d.getterFor;t.exports={getConstructor:function(t,e,n,c){var l=t((function(t,r){s(t,l,e),p(t,{type:e,index:i(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=r&&u(r,t[c],t,n)})),d=v(e),m=function(t,e,n){var r,i,o=d(t),a=y(t,e);return a?a.value=n:(o.last=a={index:i=h(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),f?o.size++:t.size++,"F"!==i&&(o.index[i]=a)),t},y=function(t,e){var n,r=d(t),i=h(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return o(l.prototype,{clear:function(){for(var t=d(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=d(this),n=y(this,t);if(n){var r=n.next,i=n.previous;delete e.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),e.first==n&&(e.first=r),e.last==n&&(e.last=i),f?e.size--:this.size--}return!!n},forEach:function(t){for(var e,n=d(this),r=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!y(this,t)}}),o(l.prototype,n?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return m(this,0===t?0:t,e)}}:{add:function(t){return m(this,t=0===t?0:t,t)}}),f&&r(l.prototype,"size",{get:function(){return d(this).size}}),l},setStrong:function(t,e,n){var r=e+" Iterator",i=v(e),o=v(r);c(t,e,(function(t,e){p(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){var r=n(325),i=Array.prototype;t.exports=function(t){var e=t.indexOf;return t===i||t instanceof Array&&e===i.indexOf?r:e}},function(t,e,n){"use strict";var r=n(11);t.exports=function(t,e){var n,i=r(this),o=arguments.length>2?arguments[2]:void 0;if("function"!=typeof e&&"function"!=typeof o)throw TypeError("At least one callback required");return i.has(t)?(n=i.get(t),"function"==typeof e&&(n=e(n),i.set(t,n))):"function"==typeof o&&(n=o(),i.set(t,n)),n}},function(t,e,n){var r=n(359),i=Function.prototype;t.exports=function(t){var e=t.bind;return t===i||t instanceof Function&&e===i.bind?r:e}},function(t,e,n){t.exports=n(361)},function(t,e,n){t.exports=n(216)},function(t,e,n){t.exports=n(230)},function(t,e,n){t.exports=n(264)},function(t,e,n){var r=n(278);function i(t,e,n,i,o,a,s){try{var u=t[a](s),c=u.value}catch(t){return void n(t)}u.done?e(c):r.resolve(c).then(i,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new r((function(r,o){var a=t.apply(e,n);function s(t){i(a,r,o,s,u,"next",t)}function u(t){i(a,r,o,s,u,"throw",t)}s(void 0)}))}}},function(t,e,n){var r=n(284),i=n(286),o=n(290);function a(e,n,s){return"undefined"!=typeof Reflect&&i?t.exports=a=i:t.exports=a=function(t,e,n){var i=o(t,e);if(i){var a=r(i,e);return a.get?a.get.call(n):a.value}},a(e,n,s||e)}t.exports=a},function(t,e,n){t.exports=n(295)},function(t,e,n){t.exports=n(308)},function(t,e,n){t.exports=n(311)},function(t,e,n){t.exports=n(315)},function(t,e,n){var r=n(139),i=n(327),o=n(6),a=n(98),s=n(354),u=n(100);function c(e){var n="function"==typeof i?new i:void 0;return t.exports=c=function(t){if(null===t||!s(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return u(t,arguments,o(this).constructor)}return e.prototype=r(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),a(e,t)},c(e)}t.exports=c},function(t,e,n){t.exports=n(363)},function(t,e,n){var r,i,o;o=this,r=[n(79)],void 0===(i=function(t){return o.returnExportsGlobal=function(t){return function(t){"use strict";var e={axisTitle:"",axisClass:"ct-axis-title",offset:{x:0,y:0},textAnchor:"middle",flipTitle:!1},n={axisX:e,axisY:e},r=function(t){return t instanceof Function?t():t},i=function(t){return t instanceof Function?t():t};t.plugins=t.plugins||{},t.plugins.ctAxisTitle=function(e){return e=t.extend({},n,e),function(n){n.on("created",(function(n){if(!e.axisX.axisTitle&&!e.axisY.axisTitle)throw new Error("ctAxisTitle plugin - You must provide at least one axis title");if(!n.axisX&&!n.axisY)throw new Error("ctAxisTitle plugin can only be used on charts that have at least one axis");var o,a,s,u=t.normalizePadding(n.options.chartPadding);if(e.axisX.axisTitle&&n.axisX&&(o=n.axisX.axisLength/2+n.options.axisY.offset+u.left,a=u.top,"end"===n.options.axisY.position&&(o-=n.options.axisY.offset),"end"===n.options.axisX.position&&(a+=n.axisY.axisLength),(s=new t.Svg("text")).addClass(i(e.axisX.axisClass)),s.text(r(e.axisX.axisTitle)),s.attr({x:o+e.axisX.offset.x,y:a+e.axisX.offset.y,"text-anchor":e.axisX.textAnchor}),n.svg.append(s,!0)),e.axisY.axisTitle&&n.axisY){o=0,a=n.axisY.axisLength/2+u.top,"start"===n.options.axisX.position&&(a+=n.options.axisX.offset),"end"===n.options.axisY.position&&(o=n.axisX.axisLength);var c="rotate("+(e.axisY.flipTitle?-90:90)+", "+o+", "+a+")";(s=new t.Svg("text")).addClass(i(e.axisY.axisClass)),s.text(r(e.axisY.axisTitle)),s.attr({x:o+e.axisY.offset.x,y:a+e.axisY.offset.y,transform:c,"text-anchor":e.axisY.textAnchor}),n.svg.append(s,!0)}}))}}}(t),t.plugins.ctAxisTitle}(t)}.apply(e,r))||(t.exports=i)},function(t,e,n){var r=n(367),i=n(368),o=n(145),a=n(369);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||a()}},function(t,e,n){t.exports=n(370)},function(t,e,n){t.exports=n(374)},function(t,e,n){t.exports=n(375)},function(t,e,n){var r=n(171);t.exports=r},function(t,e,n){var r=n(172),i=Array.prototype;t.exports=function(t){var e=t.concat;return t===i||t instanceof Array&&e===i.concat?r:e}},function(t,e,n){n(104);var r=n(32);t.exports=r("Array").concat},function(t,e,n){var r=n(15),i=n(35);t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(110);t.exports=r},function(t,e,n){var r=n(68),i=n(66),o=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},function(t,e,n){var r=n(15),i=n(111),o=r.WeakMap;t.exports="function"==typeof o&&/native code/.test(i(o))},function(t,e,n){var r=n(26),i=n(31),o=n(11),a=n(73);t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),s=r.length,u=0;s>u;)i.f(t,n=r[u++],e[n]);return t}},function(t,e,n){"use strict";var r=n(92),i=n(52);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},function(t,e,n){var r=n(25);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){"use strict";var r,i,o,a,s=n(4),u=n(14),c=n(15),l=n(29),f=n(120),h=n(53),d=n(94),p=n(44),v=n(121),m=n(25),y=n(18),g=n(74),b=n(51),x=n(111),w=n(19),k=n(124),S=n(63),E=n(125).set,L=n(182),A=n(127),M=n(183),O=n(64),_=n(75),P=n(43),C=n(107),T=n(16),j=n(87),I=T("species"),U="Promise",D=P.get,N=P.set,z=P.getterFor(U),R=f,V=c.TypeError,B=c.document,F=c.process,H=l("fetch"),q=O.f,G=q,X="process"==b(F),Y=!!(B&&B.createEvent&&c.dispatchEvent),J=C(U,(function(){if(!(x(R)!==String(R))){if(66===j)return!0;if(!X&&"function"!=typeof PromiseRejectionEvent)return!0}if(u&&!R.prototype.finally)return!0;if(j>=51&&/native code/.test(R))return!1;var t=R.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[I]=e,!(t.then((function(){}))instanceof e)})),W=J||!k((function(t){R.all(t).catch((function(){}))})),Z=function(t){var e;return!(!m(t)||"function"!=typeof(e=t.then))&&e},$=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;L((function(){for(var i=e.value,o=1==e.state,a=0;r.length>a;){var s,u,c,l=r[a++],f=o?l.ok:l.fail,h=l.resolve,d=l.reject,p=l.domain;try{f?(o||(2===e.rejection&&et(t,e),e.rejection=1),!0===f?s=i:(p&&p.enter(),s=f(i),p&&(p.exit(),c=!0)),s===l.promise?d(V("Promise-chain cycle")):(u=Z(s))?u.call(s,h,d):h(s)):d(i)}catch(t){p&&!c&&p.exit(),d(t)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&K(t,e)}))}},Q=function(t,e,n){var r,i;Y?((r=B.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},(i=c["on"+t])?i(r):"unhandledrejection"===t&&M("Unhandled promise rejection",n)},K=function(t,e){E.call(c,(function(){var n,r=e.value;if(tt(e)&&(n=_((function(){X?F.emit("unhandledRejection",r,t):Q("unhandledrejection",t,r)})),e.rejection=X||tt(e)?2:1,n.error))throw n.value}))},tt=function(t){return 1!==t.rejection&&!t.parent},et=function(t,e){E.call(c,(function(){X?F.emit("rejectionHandled",t):Q("rejectionhandled",t,e.value)}))},nt=function(t,e,n,r){return function(i){t(e,n,i,r)}},rt=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,$(t,e,!0))},it=function t(e,n,r,i){if(!n.done){n.done=!0,i&&(n=i);try{if(e===r)throw V("Promise can't be resolved itself");var o=Z(r);o?L((function(){var i={done:!1};try{o.call(r,nt(t,e,i,n),nt(rt,e,i,n))}catch(t){rt(e,i,t,n)}})):(n.value=r,n.state=1,$(e,n,!1))}catch(t){rt(e,{done:!1},t,n)}}};J&&(R=function(t){g(this,R,U),y(t),r.call(this);var e=D(this);try{t(nt(it,this,e),nt(rt,this,e))}catch(t){rt(this,e,t)}},(r=function(t){N(this,{type:U,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(R.prototype,{then:function(t,e){var n=z(this),r=q(S(this,R));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=X?F.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&$(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r,e=D(t);this.promise=t,this.resolve=nt(it,t,e),this.reject=nt(rt,t,e)},O.f=q=function(t){return t===R||t===o?new i(t):G(t)},u||"function"!=typeof f||(a=f.prototype.then,h(f.prototype,"then",(function(t,e){var n=this;return new R((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof H&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return A(R,H.apply(c,arguments))}}))),s({global:!0,wrap:!0,forced:J},{Promise:R}),p(R,U,!1,!0),v(U),o=l(U),s({target:U,stat:!0,forced:J},{reject:function(t){var e=q(this);return e.reject.call(void 0,t),e.promise}}),s({target:U,stat:!0,forced:u||J},{resolve:function(t){return A(u&&this===o?R:this,t)}}),s({target:U,stat:!0,forced:W},{all:function(t){var e=this,n=q(e),r=n.resolve,i=n.reject,o=_((function(){var n=y(e.resolve),o=[],a=0,s=1;w(t,(function(t){var u=a++,c=!1;o.push(void 0),s++,n.call(e,t).then((function(t){c||(c=!0,o[u]=t,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(t){var e=this,n=q(e),r=n.reject,i=_((function(){var i=y(e.resolve);w(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(t,e,n){var r,i,o,a,s,u,c,l,f=n(15),h=n(57).f,d=n(51),p=n(125).set,v=n(126),m=f.MutationObserver||f.WebKitMutationObserver,y=f.process,g=f.Promise,b="process"==d(y),x=h(f,"queueMicrotask"),w=x&&x.value;w||(r=function(){var t,e;for(b&&(t=y.domain)&&t.exit();i;){e=i.fn,i=i.next;try{e()}catch(t){throw i?a():o=void 0,t}}o=void 0,t&&t.enter()},b?a=function(){y.nextTick(r)}:m&&!v?(s=!0,u=document.createTextNode(""),new m(r).observe(u,{characterData:!0}),a=function(){u.data=s=!s}):g&&g.resolve?(c=g.resolve(void 0),l=c.then,a=function(){l.call(c,r)}):a=function(){p.call(f,r)}),t.exports=w||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,a()),o=e}},function(t,e,n){var r=n(15);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(120),a=n(13),s=n(29),u=n(63),c=n(127),l=n(53);r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=u(this,s("Promise")),n="function"==typeof t;return this.then(n?function(n){return c(e,t()).then((function(){return n}))}:t,n?function(n){return c(e,t()).then((function(){throw n}))}:t)}}),i||"function"!=typeof o||o.prototype.finally||l(o.prototype,"finally",s("Promise").prototype.finally)},function(t,e,n){n(129);var r=n(10);t.exports=r.setTimeout},function(t,e,n){t.exports=n(187)},function(t,e,n){var r=n(130);t.exports=r},function(t,e,n){var r=n(4),i=n(26);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(31).f})},function(t,e,n){n(45),n(42);var r=n(95);t.exports=r},function(t,e,n){n(45),n(42);var r=n(62);t.exports=r},function(t,e,n){var r=n(131);t.exports=r},function(t,e,n){"use strict";function r(t){return(r="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})(t)}var i=n(4),o=n(15),a=n(29),s=n(14),u=n(26),c=n(86),l=n(109),f=n(13),h=n(28),d=n(58),p=n(25),v=n(11),m=n(36),y=n(40),g=n(67),b=n(47),x=n(48),w=n(73),k=n(132),S=n(193),E=n(194),L=n(57),A=n(31),M=n(81),O=n(35),_=n(53),P=n(85),C=n(72),T=n(60),j=n(70),I=n(16),U=n(96),D=n(24),N=n(44),z=n(43),R=n(54).forEach,V=C("hidden"),B=I("toPrimitive"),F=z.set,H=z.getterFor("Symbol"),q=Object.prototype,G=o.Symbol,X=a("JSON","stringify"),Y=L.f,J=A.f,W=S.f,Z=M.f,$=P("symbols"),Q=P("op-symbols"),K=P("string-to-symbol-registry"),tt=P("symbol-to-string-registry"),et=P("wks"),nt=o.QObject,rt=!nt||!nt.prototype||!nt.prototype.findChild,it=u&&f((function(){return 7!=x(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=Y(q,e);r&&delete q[e],J(t,e,n),r&&t!==q&&J(q,e,r)}:J,ot=function(t,e){var n=$[t]=x(G.prototype);return F(n,{type:"Symbol",tag:t,description:e}),u||(n.description=e),n},at=l?function(t){return"symbol"==r(t)}:function(t){return Object(t)instanceof G},st=function(t,e,n){t===q&&st(Q,e,n),v(t);var r=g(e,!0);return v(n),h($,r)?(n.enumerable?(h(t,V)&&t[V][r]&&(t[V][r]=!1),n=x(n,{enumerable:b(0,!1)})):(h(t,V)||J(t,V,b(1,{})),t[V][r]=!0),it(t,r,n)):J(t,r,n)},ut=function(t,e){v(t);var n=y(e),r=w(n).concat(ht(n));return R(r,(function(e){u&&!ct.call(n,e)||st(t,e,n[e])})),t},ct=function(t){var e=g(t,!0),n=Z.call(this,e);return!(this===q&&h($,e)&&!h(Q,e))&&(!(n||!h(this,e)||!h($,e)||h(this,V)&&this[V][e])||n)},lt=function(t,e){var n=y(t),r=g(e,!0);if(n!==q||!h($,r)||h(Q,r)){var i=Y(n,r);return!i||!h($,r)||h(n,V)&&n[V][r]||(i.enumerable=!0),i}},ft=function(t){var e=W(y(t)),n=[];return R(e,(function(t){h($,t)||h(T,t)||n.push(t)})),n},ht=function(t){var e=t===q,n=W(e?Q:y(t)),r=[];return R(n,(function(t){!h($,t)||e&&!h(q,t)||r.push($[t])})),r};(c||(_((G=function(){if(this instanceof G)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=j(t),n=function t(n){this===q&&t.call(Q,n),h(this,V)&&h(this[V],e)&&(this[V][e]=!1),it(this,e,b(1,n))};return u&&rt&&it(q,e,{configurable:!0,set:n}),ot(e,t)}).prototype,"toString",(function(){return H(this).tag})),_(G,"withoutSetter",(function(t){return ot(j(t),t)})),M.f=ct,A.f=st,L.f=lt,k.f=S.f=ft,E.f=ht,U.f=function(t){return ot(I(t),t)},u&&(J(G.prototype,"description",{configurable:!0,get:function(){return H(this).description}}),s||_(q,"propertyIsEnumerable",ct,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:G}),R(w(et),(function(t){D(t)})),i({target:"Symbol",stat:!0,forced:!c},{for:function(t){var e=String(t);if(h(K,e))return K[e];var n=G(e);return K[e]=n,tt[n]=e,n},keyFor:function(t){if(!at(t))throw TypeError(t+" is not a symbol");if(h(tt,t))return tt[t]},useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),i({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return void 0===e?x(t):ut(x(t),e)},defineProperty:st,defineProperties:ut,getOwnPropertyDescriptor:lt}),i({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ft,getOwnPropertySymbols:ht}),i({target:"Object",stat:!0,forced:f((function(){E.f(1)}))},{getOwnPropertySymbols:function(t){return E.f(m(t))}}),X)&&i({target:"JSON",stat:!0,forced:!c||f((function(){var t=G();return"[null]"!=X([t])||"{}"!=X({a:t})||"{}"!=X(Object(t))}))},{stringify:function(t,e,n){for(var r,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=e,(p(e)||void 0!==t)&&!at(t))return d(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!at(e))return e}),i[1]=e,X.apply(null,i)}});G.prototype[B]||O(G.prototype,B,G.prototype.valueOf),N(G,"Symbol"),T[V]=!0},function(t,e,n){function r(t){return(r="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})(t)}var i=n(40),o=n(132).f,a={}.toString,s="object"==("undefined"==typeof window?"undefined":r(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==a.call(t)?function(t){try{return o(t)}catch(t){return s.slice()}}(t):o(i(t))}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){n(24)("asyncIterator")},function(t,e){},function(t,e,n){n(24)("hasInstance")},function(t,e,n){n(24)("isConcatSpreadable")},function(t,e,n){n(24)("match")},function(t,e,n){n(24)("matchAll")},function(t,e,n){n(24)("replace")},function(t,e,n){n(24)("search")},function(t,e,n){n(24)("species")},function(t,e,n){n(24)("split")},function(t,e,n){n(24)("toPrimitive")},function(t,e,n){n(24)("toStringTag")},function(t,e,n){n(24)("unscopables")},function(t,e,n){n(44)(Math,"Math",!0)},function(t,e,n){var r=n(15);n(44)(r.JSON,"JSON",!0)},function(t,e,n){var r=n(134);t.exports=r},function(t,e,n){var r=n(4),i=n(212);r({target:"Array",stat:!0,forced:!n(124)((function(t){Array.from(t)}))},{from:i})},function(t,e,n){"use strict";var r=n(27),i=n(36),o=n(123),a=n(122),s=n(41),u=n(69),c=n(62);t.exports=function(t){var e,n,l,f,h,d,p=i(t),v="function"==typeof this?this:Array,m=arguments.length,y=m>1?arguments[1]:void 0,g=void 0!==y,b=c(p),x=0;if(g&&(y=r(y,m>2?arguments[2]:void 0,2)),null==b||v==Array&&a(b))for(n=new v(e=s(p.length));e>x;x++)d=g?y(p[x],x):p[x],u(n,x,d);else for(h=(f=b.call(p)).next,n=new v;!(l=h.call(f)).done;x++)d=g?o(f,y,[l.value,x],!0):l.value,u(n,x,d);return n.length=x,n}},function(t,e,n){var r=n(135);t.exports=r},function(t,e,n){n(215);var r=n(32);t.exports=r("Array").slice},function(t,e,n){"use strict";var r=n(4),i=n(25),o=n(58),a=n(90),s=n(41),u=n(40),c=n(69),l=n(16),f=n(59),h=n(46),d=f("slice"),p=h("slice",{ACCESSORS:!0,0:0,1:2}),v=l("species"),m=[].slice,y=Math.max;r({target:"Array",proto:!0,forced:!d||!p},{slice:function(t,e){var n,r,l,f=u(this),h=s(f.length),d=a(t,h),p=a(void 0===e?h:e,h);if(o(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[v])&&(n=void 0):n=void 0,n===Array||void 0===n))return m.call(f,d,p);for(r=new(void 0===n?Array:n)(y(p-d,0)),l=0;d<p;d++,l++)d in f&&c(r,l,f[d]);return r.length=l,r}})},function(t,e,n){var r=n(217);t.exports=r},function(t,e,n){n(218);var r=n(10);r.JSON||(r.JSON={stringify:JSON.stringify}),t.exports=function(t,e,n){return r.JSON.stringify.apply(null,arguments)}},function(t,e,n){var r=n(4),i=n(29),o=n(13),a=i("JSON","stringify"),s=/[\uD800-\uDFFF]/g,u=/^[\uD800-\uDBFF]$/,c=/^[\uDC00-\uDFFF]$/,l=function(t,e,n){var r=n.charAt(e-1),i=n.charAt(e+1);return u.test(t)&&!c.test(i)||c.test(t)&&!u.test(r)?"\\u"+t.charCodeAt(0).toString(16):t},f=o((function(){return'"\\udf06\\ud834"'!==a("\udf06\ud834")||'"\\udead"'!==a("\udead")}));a&&r({target:"JSON",stat:!0,forced:f},{stringify:function(t,e,n){var r=a.apply(null,arguments);return"string"==typeof r?r.replace(s,l):r}})},function(t,e,n){t.exports=n(220)},function(t,e,n){var r=n(221);t.exports=r},function(t,e,n){n(133),n(42),n(45);var r=n(96);t.exports=r.f("iterator")},function(t,e,n){var r=n(131);n(223),n(224),n(225),n(226),n(227),t.exports=r},function(t,e,n){n(24)("asyncDispose")},function(t,e,n){n(24)("dispose")},function(t,e,n){n(24)("observable")},function(t,e,n){n(24)("patternMatch")},function(t,e,n){n(24)("replaceAll")},function(t,e,n){var r=n(136);t.exports=r},function(t,e,n){n(4)({target:"Array",stat:!0},{isArray:n(58)})},function(t,e,n){var r=n(231);t.exports=r},function(t,e,n){n(232);var r=n(10);t.exports=r.URLSearchParams},function(t,e,n){"use strict";n(118);var r=n(4),i=n(29),o=n(233),a=n(53),s=n(94),u=n(44),c=n(112),l=n(43),f=n(74),h=n(28),d=n(27),p=n(52),v=n(11),m=n(25),y=n(48),g=n(47),b=n(95),x=n(62),w=n(16),k=i("fetch"),S=i("Headers"),E=w("iterator"),L=l.set,A=l.getterFor("URLSearchParams"),M=l.getterFor("URLSearchParamsIterator"),O=/\+/g,_=Array(4),P=function(t){return _[t-1]||(_[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},C=function(t){try{return decodeURIComponent(t)}catch(e){return t}},T=function(t){var e=t.replace(O," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(P(n--),C);return e}},j=/[!'()~]|%20/g,I={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},U=function(t){return I[t]},D=function(t){return encodeURIComponent(t).replace(j,U)},N=function(t,e){if(e)for(var n,r,i=e.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),t.push({key:T(r.shift()),value:T(r.join("="))}))},z=function(t){this.entries.length=0,N(this.entries,t)},R=function(t,e){if(t<e)throw TypeError("Not enough arguments")},V=c((function(t,e){L(this,{type:"URLSearchParamsIterator",iterator:b(A(t).entries),kind:e})}),"Iterator",(function(){var t=M(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n})),B=function(){f(this,B,"URLSearchParams");var t,e,n,r,i,o,a,s,u,c=arguments.length>0?arguments[0]:void 0,l=this,d=[];if(L(l,{type:"URLSearchParams",entries:d,updateURL:function(){},updateSearchParams:z}),void 0!==c)if(m(c))if("function"==typeof(t=x(c)))for(n=(e=t.call(c)).next;!(r=n.call(e)).done;){if((a=(o=(i=b(v(r.value))).next).call(i)).done||(s=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");d.push({key:a.value+"",value:s.value+""})}else for(u in c)h(c,u)&&d.push({key:u,value:c[u]+""});else N(d,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},F=B.prototype;s(F,{append:function(t,e){R(arguments.length,2);var n=A(this);n.entries.push({key:t+"",value:e+""}),n.updateURL()},delete:function(t){R(arguments.length,1);for(var e=A(this),n=e.entries,r=t+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;e.updateURL()},get:function(t){R(arguments.length,1);for(var e=A(this).entries,n=t+"",r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){R(arguments.length,1);for(var e=A(this).entries,n=t+"",r=[],i=0;i<e.length;i++)e[i].key===n&&r.push(e[i].value);return r},has:function(t){R(arguments.length,1);for(var e=A(this).entries,n=t+"",r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){R(arguments.length,1);for(var n,r=A(this),i=r.entries,o=!1,a=t+"",s=e+"",u=0;u<i.length;u++)(n=i[u]).key===a&&(o?i.splice(u--,1):(o=!0,n.value=s));o||i.push({key:a,value:s}),r.updateURL()},sort:function(){var t,e,n,r=A(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(t=o[n],e=0;e<n;e++)if(i[e].key>t.key){i.splice(e,0,t);break}e===n&&i.push(t)}r.updateURL()},forEach:function(t){for(var e,n=A(this).entries,r=d(t,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new V(this,"keys")},values:function(){return new V(this,"values")},entries:function(){return new V(this,"entries")}},{enumerable:!0}),a(F,E,F.entries),a(F,"toString",(function(){for(var t,e=A(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(D(t.key)+"="+D(t.value));return n.join("&")}),{enumerable:!0}),u(B,"URLSearchParams"),r({global:!0,forced:!o},{URLSearchParams:B}),o||"function"!=typeof k||"function"!=typeof S||r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,n,r,i=[t];return arguments.length>1&&(e=arguments[1],m(e)&&(n=e.body,"URLSearchParams"===p(n)&&((r=e.headers?new S(e.headers):new S).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=y(e,{body:g(0,String(n)),headers:g(0,r)}))),i.push(e)),k.apply(this,i)}}),t.exports={URLSearchParams:B,getState:A}},function(t,e,n){var r=n(13),i=n(16),o=n(14),a=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(t,e,n){var r=n(137);t.exports=r},function(t,e,n){var r=n(4),i=n(29),o=n(18),a=n(11),s=n(25),u=n(48),c=n(138),l=n(13),f=i("Reflect","construct"),h=l((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),d=!l((function(){f((function(){}))})),p=h||d;r({target:"Reflect",stat:!0,forced:p,sham:p},{construct:function(t,e){o(t),a(e);var n=arguments.length<3?t:o(arguments[2]);if(d&&!h)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(c.apply(t,r))}var i=n.prototype,l=u(s(i)?i:Object.prototype),p=Function.apply.call(t,l,e);return s(p)?p:l}})},function(t,e,n){var r=n(237);t.exports=r},function(t,e,n){n(238);var r=n(10);t.exports=r.Number.isSafeInteger},function(t,e,n){var r=n(4),i=n(239),o=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){var r=n(25),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e,n){var r=n(241);t.exports=r},function(t,e,n){n(242);var r=n(10).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){n(4)({target:"Object",stat:!0,sham:!n(26)},{create:n(48)})},function(t,e,n){var r=n(244);t.exports=r},function(t,e,n){n(245);var r=n(10);t.exports=r.Object.setPrototypeOf},function(t,e,n){n(4)({target:"Object",stat:!0},{setPrototypeOf:n(93)})},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){t.exports=n(248)},function(t,e,n){var r=n(249);t.exports=r},function(t,e,n){n(250);var r=n(10);t.exports=r.Object.getPrototypeOf},function(t,e,n){var r=n(4),i=n(13),o=n(36),a=n(61),s=n(114);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(o(t))}})},function(t,e,n){var r=n(141),i=n(142);t.exports=function(t){if(r(t))return i(t)}},function(t,e,n){var r=n(136);t.exports=r},function(t,e,n){var r=n(143),i=n(144),o=n(97);t.exports=function(t){if(void 0!==o&&i(Object(t)))return r(t)}},function(t,e,n){var r=n(134);t.exports=r},function(t,e,n){n(45),n(42);var r=n(256);t.exports=r},function(t,e,n){var r=n(52),i=n(16),o=n(49),a=i("iterator");t.exports=function(t){var e=Object(t);return void 0!==e[a]||"@@iterator"in e||o.hasOwnProperty(r(e))}},function(t,e,n){t.exports=n(258)},function(t,e,n){var r=n(135);t.exports=r},function(t,e){t.exports=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(t,e,n){var r=n(261);t.exports=r},function(t,e,n){var r=n(262),i=Array.prototype;t.exports=function(t){var e=t.find;return t===i||t instanceof Array&&e===i.find?r:e}},function(t,e,n){n(263);var r=n(32);t.exports=r("Array").find},function(t,e,n){"use strict";var r=n(4),i=n(54).find,o=n(119),a=n(46),s=!0,u=a("find");"find"in[]&&Array(1).find((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!u},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(t,e,n){var r=n(146);t.exports=r},function(t,e,n){var r=n(4),i=n(13),o=n(40),a=n(57).f,s=n(26),u=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},function(t,e,n){n(45);var r=n(267),i=n(52),o=Array.prototype,a={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.forEach;return t===o||t instanceof Array&&e===o.forEach||a.hasOwnProperty(i(t))?r:e}},function(t,e,n){var r=n(268);t.exports=r},function(t,e,n){n(269);var r=n(32);t.exports=r("Array").forEach},function(t,e,n){"use strict";var r=n(4),i=n(270);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(t,e,n){"use strict";var r=n(54).forEach,i=n(76),o=n(46),a=i("forEach"),s=o("forEach");t.exports=a&&s?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){var r=n(272);t.exports=r},function(t,e,n){n(273),n(71),n(42),n(45);var r=n(10);t.exports=r.Set},function(t,e,n){"use strict";var r=n(147),i=n(149);t.exports=r("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},function(t,e,n){var r=n(13);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){var r=n(130);t.exports=r},function(t,e,n){(function(t){function e(t){return(e="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})(t)}var n=function(t){"use strict";var n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return L()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function d(){}var p={};p[o]=function(){return this};var v=Object.getPrototypeOf,m=v&&v(v(E([])));m&&m!==n&&r.call(m,o)&&(p=m);var y=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function b(t,n){var i;this._invoke=function(o,a){function s(){return new n((function(i,s){!function i(o,a,s,u){var l=c(t[o],t,a);if("throw"!==l.type){var f=l.arg,h=f.value;return h&&"object"===e(h)&&r.call(h,"__await")?n.resolve(h.__await).then((function(t){i("next",t,s,u)}),(function(t){i("throw",t,s,u)})):n.resolve(h).then((function(t){f.value=t,s(f)}),(function(t){return i("throw",t,s,u)}))}u(l.arg)}(o,a,i,s)}))}return i=i?i.then(s,s):s()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=y.constructor=d,d.constructor=h,d[s]=h.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(b.prototype),b.prototype[a]=function(){return this},t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(y),y[s]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}("object"===e(t)?t.exports:{});try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}}).call(this,n(277)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){t.exports=n(279)},function(t,e,n){var r=n(110);n(280),n(281),n(282),n(283),t.exports=r},function(t,e,n){"use strict";var r=n(4),i=n(26),o=n(61),a=n(93),s=n(48),u=n(31),c=n(47),l=n(19),f=n(35),h=n(43),d=h.set,p=h.getterFor("AggregateError"),v=function(t,e){var n=this;if(!(n instanceof v))return new v(t,e);a&&(n=a(new Error(e),o(n)));var r=[];return l(t,r.push,r),i?d(n,{errors:r,type:"AggregateError"}):n.errors=r,void 0!==e&&f(n,"message",String(e)),n};v.prototype=s(Error.prototype,{constructor:c(5,v),message:c(5,""),name:c(5,"AggregateError")}),i&&u.f(v.prototype,"errors",{get:function(){return p(this).errors},configurable:!0}),r({global:!0},{AggregateError:v})},function(t,e,n){n(128)},function(t,e,n){"use strict";var r=n(4),i=n(64),o=n(75);r({target:"Promise",stat:!0},{try:function(t){var e=i.f(this),n=o(t);return(n.error?e.reject:e.resolve)(n.value),e.promise}})},function(t,e,n){"use strict";var r=n(4),i=n(18),o=n(29),a=n(64),s=n(75),u=n(19);r({target:"Promise",stat:!0},{any:function(t){var e=this,n=a.f(e),r=n.resolve,c=n.reject,l=s((function(){var n=i(e.resolve),a=[],s=0,l=1,f=!1;u(t,(function(t){var i=s++,u=!1;a.push(void 0),l++,n.call(e,t).then((function(t){u||f||(f=!0,r(t))}),(function(t){u||f||(u=!0,a[i]=t,--l||c(new(o("AggregateError"))(a,"No one promise resolved")))}))})),--l||c(new(o("AggregateError"))(a,"No one promise resolved"))}));return l.error&&c(l.value),n.promise}})},function(t,e,n){t.exports=n(285)},function(t,e,n){var r=n(146);t.exports=r},function(t,e,n){t.exports=n(287)},function(t,e,n){var r=n(288);t.exports=r},function(t,e,n){n(289);var r=n(10);t.exports=r.Reflect.get},function(t,e,n){var r=n(4),i=n(25),o=n(11),a=n(28),s=n(57),u=n(61);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,c,l=arguments.length<3?e:arguments[2];return o(e)===l?e[n]:(r=s.f(e,n))?a(r,"value")?r.value:void 0===r.get?void 0:r.get.call(l):i(c=u(e))?t(c,n,l):void 0}})},function(t,e,n){var r=n(6);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}},function(t,e,n){var r=n(292);t.exports=r},function(t,e,n){n(293);var r=n(10);t.exports=r.parseFloat},function(t,e,n){var r=n(4),i=n(294);r({global:!0,forced:parseFloat!=i},{parseFloat:i})},function(t,e,n){var r=n(15),i=n(99).trim,o=n(77),a=r.parseFloat,s=1/a(o+"-0")!=-1/0;t.exports=s?function(t){var e=i(String(t)),n=a(e);return 0===n&&"-"==e.charAt(0)?-0:n}:a},function(t,e,n){var r=n(296);t.exports=r},function(t,e,n){var r=n(297),i=String.prototype;t.exports=function(t){var e=t.trim;return"string"==typeof t||t===i||t instanceof String&&e===i.trim?r:e}},function(t,e,n){n(298);var r=n(32);t.exports=r("String").trim},function(t,e,n){"use strict";var r=n(4),i=n(99).trim;r({target:"String",proto:!0,forced:n(299)("trim")},{trim:function(){return i(this)}})},function(t,e,n){var r=n(13),i=n(77);t.exports=function(t){return r((function(){return!!i[t]()||"
"!="
"[t]()||i[t].name!==t}))}},function(t,e,n){var r=n(301);t.exports=r},function(t,e,n){n(302);var r=n(10);t.exports=r.parseInt},function(t,e,n){var r=n(4),i=n(303);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(t,e,n){var r=n(15),i=n(99).trim,o=n(77),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");t.exports=u?function(t,e){var n=i(String(t));return a(n,e>>>0||(s.test(n)?16:10))}:a},function(t,e,n){var r=n(305);t.exports=r},function(t,e,n){var r=n(306),i=Array.prototype;t.exports=function(t){var e=t.map;return t===i||t instanceof Array&&e===i.map?r:e}},function(t,e,n){n(307);var r=n(32);t.exports=r("Array").map},function(t,e,n){"use strict";var r=n(4),i=n(54).map,o=n(59),a=n(46),s=o("map"),u=a("map");r({target:"Array",proto:!0,forced:!s||!u},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(309);t.exports=r},function(t,e,n){n(310);var r=n(10);t.exports=r.Object.keys},function(t,e,n){var r=n(4),i=n(36),o=n(73);r({target:"Object",stat:!0,forced:n(13)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},function(t,e,n){var r=n(312);t.exports=r},function(t,e,n){var r=n(313),i=Array.prototype;t.exports=function(t){var e=t.filter;return t===i||t instanceof Array&&e===i.filter?r:e}},function(t,e,n){n(314);var r=n(32);t.exports=r("Array").filter},function(t,e,n){"use strict";var r=n(4),i=n(54).filter,o=n(59),a=n(46),s=o("filter"),u=a("filter");r({target:"Array",proto:!0,forced:!s||!u},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(316);t.exports=r},function(t,e,n){var r=n(317),i=Array.prototype;t.exports=function(t){var e=t.reduce;return t===i||t instanceof Array&&e===i.reduce?r:e}},function(t,e,n){n(318);var r=n(32);t.exports=r("Array").reduce},function(t,e,n){"use strict";var r=n(4),i=n(319).left,o=n(76),a=n(46),s=o("reduce"),u=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!s||!u},{reduce:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(18),i=n(36),o=n(82),a=n(41),s=function(t){return function(e,n,s,u){r(n);var c=i(e),l=o(c),f=a(c.length),h=t?f-1:0,d=t?-1:1;if(s<2)for(;;){if(h in l){u=l[h],h+=d;break}if(h+=d,t?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;t?h>=0:f>h;h+=d)h in l&&(u=n(u,l[h],h,c));return u}};t.exports={left:s(!1),right:s(!0)}},function(t,e,n){var r=n(321);t.exports=r},function(t,e,n){var r=n(322),i=Array.prototype;t.exports=function(t){var e=t.splice;return t===i||t instanceof Array&&e===i.splice?r:e}},function(t,e,n){n(323);var r=n(32);t.exports=r("Array").splice},function(t,e,n){"use strict";var r=n(4),i=n(90),o=n(68),a=n(41),s=n(36),u=n(84),c=n(69),l=n(59),f=n(46),h=l("splice"),d=f("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,v=Math.min;r({target:"Array",proto:!0,forced:!h||!d},{splice:function(t,e){var n,r,l,f,h,d,m=s(this),y=a(m.length),g=i(t,y),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=y-g):(n=b-2,r=v(p(o(e),0),y-g)),y+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(l=u(m,r),f=0;f<r;f++)(h=g+f)in m&&c(l,f,m[h]);if(l.length=r,n<r){for(f=g;f<y-r;f++)d=f+n,(h=f+r)in m?m[d]=m[h]:delete m[d];for(f=y;f>y-r+n;f--)delete m[f-1]}else if(n>r)for(f=y-r;f>g;f--)d=f+n-1,(h=f+r-1)in m?m[d]=m[h]:delete m[d];for(f=0;f<n;f++)m[f+g]=arguments[f+2];return m.length=y-r+n,l}})},function(t,e,n){var r=n(150);t.exports=r},function(t,e,n){n(326);var r=n(32);t.exports=r("Array").indexOf},function(t,e,n){"use strict";var r=n(4),i=n(116).indexOf,o=n(76),a=n(46),s=[].indexOf,u=!!s&&1/[1].indexOf(1,-0)<0,c=o("indexOf"),l=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:u||!c||!l},{indexOf:function(t){return u?s.apply(this,arguments)||0:i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){t.exports=n(328)},function(t,e,n){var r=n(329);n(331),n(333),n(335),n(337),n(338),n(339),n(340),n(341),n(342),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),t.exports=r},function(t,e,n){n(330),n(71),n(42),n(45);var r=n(10);t.exports=r.Map},function(t,e,n){"use strict";var r=n(147),i=n(149);t.exports=r("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},function(t,e,n){n(4)({target:"Map",stat:!0},{from:n(332)})},function(t,e,n){"use strict";var r=n(18),i=n(27),o=n(19);t.exports=function(t){var e,n,a,s,u=arguments.length,c=u>1?arguments[1]:void 0;return r(this),(e=void 0!==c)&&r(c),null==t?new this:(n=[],e?(a=0,s=i(c,u>2?arguments[2]:void 0,2),o(t,(function(t){n.push(s(t,a++))}))):o(t,n.push,n),new this(n))}},function(t,e,n){n(4)({target:"Map",stat:!0},{of:n(334)})},function(t,e,n){"use strict";t.exports=function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(336);r({target:"Map",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},function(t,e,n){"use strict";var r=n(11),i=n(18);t.exports=function(){for(var t,e=r(this),n=i(e.delete),o=!0,a=0,s=arguments.length;a<s;a++)t=n.call(e,arguments[a]),o=o&&t;return!!o}},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(11),a=n(27),s=n(37),u=n(19);r({target:"Map",proto:!0,real:!0,forced:i},{every:function(t){var e=o(this),n=s(e),r=a(t,arguments.length>1?arguments[1]:void 0,3);return!u(n,(function(t,n){if(!r(n,t,e))return u.stop()}),void 0,!0,!0).stopped}})},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(29),a=n(11),s=n(18),u=n(27),c=n(63),l=n(37),f=n(19);r({target:"Map",proto:!0,real:!0,forced:i},{filter:function(t){var e=a(this),n=l(e),r=u(t,arguments.length>1?arguments[1]:void 0,3),i=new(c(e,o("Map"))),h=s(i.set);return f(n,(function(t,n){r(n,t,e)&&h.call(i,t,n)}),void 0,!0,!0),i}})},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(11),a=n(27),s=n(37),u=n(19);r({target:"Map",proto:!0,real:!0,forced:i},{find:function(t){var e=o(this),n=s(e),r=a(t,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(t,n){if(r(n,t,e))return u.stop(n)}),void 0,!0,!0).result}})},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(11),a=n(27),s=n(37),u=n(19);r({target:"Map",proto:!0,real:!0,forced:i},{findKey:function(t){var e=o(this),n=s(e),r=a(t,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(t,n){if(r(n,t,e))return u.stop(t)}),void 0,!0,!0).result}})},function(t,e,n){"use strict";var r=n(4),i=n(19),o=n(18);r({target:"Map",stat:!0},{groupBy:function(t,e){var n=new this;o(e);var r=o(n.has),a=o(n.get),s=o(n.set);return i(t,(function(t){var i=e(t);r.call(n,i)?a.call(n,i).push(t):s.call(n,i,[t])})),n}})},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(11),a=n(37),s=n(343),u=n(19);r({target:"Map",proto:!0,real:!0,forced:i},{includes:function(t){return u(a(o(this)),(function(e,n){if(s(n,t))return u.stop()}),void 0,!0,!0).stopped}})},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){"use strict";var r=n(4),i=n(19),o=n(18);r({target:"Map",stat:!0},{keyBy:function(t,e){var n=new this;o(e);var r=o(n.set);return i(t,(function(t){r.call(n,e(t),t)})),n}})},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(11),a=n(37),s=n(19);r({target:"Map",proto:!0,real:!0,forced:i},{keyOf:function(t){return s(a(o(this)),(function(e,n){if(n===t)return s.stop(e)}),void 0,!0,!0).result}})},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(29),a=n(11),s=n(18),u=n(27),c=n(63),l=n(37),f=n(19);r({target:"Map",proto:!0,real:!0,forced:i},{mapKeys:function(t){var e=a(this),n=l(e),r=u(t,arguments.length>1?arguments[1]:void 0,3),i=new(c(e,o("Map"))),h=s(i.set);return f(n,(function(t,n){h.call(i,r(n,t,e),n)}),void 0,!0,!0),i}})},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(29),a=n(11),s=n(18),u=n(27),c=n(63),l=n(37),f=n(19);r({target:"Map",proto:!0,real:!0,forced:i},{mapValues:function(t){var e=a(this),n=l(e),r=u(t,arguments.length>1?arguments[1]:void 0,3),i=new(c(e,o("Map"))),h=s(i.set);return f(n,(function(t,n){h.call(i,t,r(n,t,e))}),void 0,!0,!0),i}})},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(11),a=n(18),s=n(19);r({target:"Map",proto:!0,real:!0,forced:i},{merge:function(t){for(var e=o(this),n=a(e.set),r=0;r<arguments.length;)s(arguments[r++],n,e,!0);return e}})},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(11),a=n(18),s=n(37),u=n(19);r({target:"Map",proto:!0,real:!0,forced:i},{reduce:function(t){var e=o(this),n=s(e),r=arguments.length<2,i=r?void 0:arguments[1];if(a(t),u(n,(function(n,o){r?(r=!1,i=o):i=t(i,o,n,e)}),void 0,!0,!0),r)throw TypeError("Reduce of empty map with no initial value");return i}})},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(11),a=n(27),s=n(37),u=n(19);r({target:"Map",proto:!0,real:!0,forced:i},{some:function(t){var e=o(this),n=s(e),r=a(t,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(t,n){if(r(n,t,e))return u.stop()}),void 0,!0,!0).stopped}})},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(11),a=n(18);r({target:"Map",proto:!0,real:!0,forced:i},{update:function(t,e){var n=o(this),r=arguments.length;a(e);var i=n.has(t);if(!i&&r<3)throw TypeError("Updating absent value");var s=i?n.get(t):a(r>2?arguments[2]:void 0)(t,n);return n.set(t,e(s,t,n)),n}})},function(t,e,n){"use strict";n(4)({target:"Map",proto:!0,real:!0,forced:n(14)},{upsert:n(151)})},function(t,e,n){"use strict";n(4)({target:"Map",proto:!0,real:!0,forced:n(14)},{updateOrInsert:n(151)})},function(t,e,n){var r=n(355);t.exports=function(t){var e;return-1!==r(e=Function.toString.call(t)).call(e,"[native code]")}},function(t,e,n){t.exports=n(356)},function(t,e,n){var r=n(150);t.exports=r},function(t,e,n){t.exports=n(358)},function(t,e,n){var r=n(152);t.exports=r},function(t,e,n){n(360);var r=n(32);t.exports=r("Function").bind},function(t,e,n){n(4)({target:"Function",proto:!0},{bind:n(138)})},function(t,e,n){var r=n(137);t.exports=r},function(t,e,n){var r=n(153);t.exports=function(){if("undefined"==typeof Reflect||!r)return!1;if(r.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(r(Date,[],(function(){}))),!0}catch(t){return!1}}},function(t,e,n){var r=n(364);t.exports=r},function(t,e,n){n(365);var r=n(10);t.exports=r.Math.trunc},function(t,e,n){var r=n(4),i=Math.ceil,o=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(t>0?o:i)(t)}})},function(t,e,n){var r=n(152);t.exports=r},function(t,e,n){var r=n(141);t.exports=function(t){if(r(t))return t}},function(t,e,n){var r=n(17),i=n(144),o=n(97);t.exports=function(t,e){if(void 0!==o&&i(Object(t))){var n=[],a=!0,s=!1,u=void 0;try{for(var c,l=r(t);!(a=(c=l.next()).done)&&(n.push(c.value),!e||n.length!==e);a=!0);}catch(t){s=!0,u=t}finally{try{a||null==l.return||l.return()}finally{if(s)throw u}}return n}}},function(t,e){t.exports=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(t,e,n){var r=n(371);t.exports=r},function(t,e,n){n(372);var r=n(10);t.exports=r.Object.entries},function(t,e,n){var r=n(4),i=n(373).entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},function(t,e,n){var r=n(26),i=n(73),o=n(40),a=n(81).f,s=function(t){return function(e){for(var n,s=o(e),u=i(s),c=u.length,l=0,f=[];c>l;)n=u[l++],r&&!a.call(s,n)||f.push(t?[n,s[n]]:s[n]);return f}};t.exports={entries:s(!0),values:s(!1)}},function(t,e,n){n(129);var r=n(10);t.exports=r.setInterval},function(t,e,n){var r=n(376);t.exports=r},function(t,e,n){var r=n(377),i=Array.prototype;t.exports=function(t){var e=t.sort;return t===i||t instanceof Array&&e===i.sort?r:e}},function(t,e,n){n(378);var r=n(32);t.exports=r("Array").sort},function(t,e,n){"use strict";var r=n(4),i=n(18),o=n(36),a=n(13),s=n(76),u=[],c=u.sort,l=a((function(){u.sort(void 0)})),f=a((function(){u.sort(null)})),h=s("sort");r({target:"Array",proto:!0,forced:l||!f||!h},{sort:function(t){return void 0===t?c.call(o(this)):c.call(o(this),i(t))}})},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o=n(23),a=n.n(o),s=n(30),u=n.n(s),c=n(2),l=n.n(c),f=n(3),h=n.n(f),d=n(17),p=n.n(d),v=n(20),m=n.n(v),y=n(21),g=n.n(y),b=n(22),x=n.n(b),w=n(12),k=n.n(w),S=n(154),E=n.n(S),L=n(50),A=n.n(L),M=n(9),O=n.n(M),_=n(155),P=n.n(_);function C(t){if(void 0===g.a||null==m()(t)){if(O()(t)||(t=function(t,e){var n;if(!t)return;if("string"==typeof t)return T(t,e);var r=k()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return x()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return T(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=p()(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function T(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 j=function(){function t(){l()(this,t)}return h()(t,null,[{key:"post",value:function(t,e,n){var r=n||{};return r.method="POST",this.ajax(t,e,r)}},{key:"get",value:function(t,e,n){var r=n||{};return r.method="GET",this.ajax(t,e,r)}},{key:"ajax",value:function(t,e,n){var r=this,o=[];e=e||{};var s=(n=n||{}).method||"GET",u=new XMLHttpRequest;return new a.a((function(n,a){var c;if(u.onreadystatechange=function(){if(u.readyState===XMLHttpRequest.DONE){var t="",e=!0;if(200===u.status)try{var r=JSON.parse(u.responseText);r&&(r.error?r.message&&(t=r.message):(n&&"function"==typeof n&&n(r),e=!1))}catch(e){t=e.message}else t="HTTP error ".concat(u.status);e&&a&&"function"==typeof a&&a(new Error(t))}},e instanceof HTMLFormElement)c="POST"===s?new FormData(e):new P.a(new FormData(e)).toString();else{for(var l in e)if(e.hasOwnProperty(l))if(O()(e[l])){var f,h=C(e[l]);try{for(h.s();!(f=h.n()).done;){var d,p=f.value;o.push(i()(d="".concat(l,"[]=")).call(d,r.encodeValue(p)))}}catch(t){h.e(t)}finally{h.f()}}else{var v;o.push(i()(v="".concat(l,"=")).call(v,r.encodeValue(e[l])))}c=(c=o.join("&")).replace(/%20/g,"+")}"GET"===s&&c.length&&(t+="?".concat(c),c=null),u.open(s,t,!0),"POST"!==s||e instanceof HTMLFormElement||u.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u.send(c)}))}},{key:"encodeValue",value:function(t){return"object"===A()(t)&&(t=E()(t)),encodeURIComponent(t)}}]),t}(),I=n(1),U=n.n(I),D=n(78),N=n.n(D),z=n(7),R=n.n(z),V=n(8),B=n.n(V),F=n(6),H=n.n(F),q=n(55),G=n.n(q),X=n(38),Y=n.n(X),J=n(156),W=n.n(J),Z=n(34),$=n.n(Z),Q=n(80),K=n.n(Q),tt=n(65),et=n.n(tt),nt=n(101),rt=n.n(nt),it=n(157),ot=n.n(it);function at(t){if(void 0===g.a||null==m()(t)){if(O()(t)||(t=function(t,e){var n;if(!t)return;if("string"==typeof t)return st(t,e);var r=k()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return x()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return st(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=p()(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function st(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 ut=function(){function t(){l()(this,t)}return h()(t,null,[{key:"observe",value:function(t,e,n){if("object"!==A()(t)||null===t)throw new Error("Invalid argument: invalid object");if("function"==typeof n)this.observeProperty(t,e,n);else{if("function"!=typeof e)throw new Error("Invalid argument for observe");this.observeRecursive(t,e)}}},{key:"notify",value:function(t,e){var n,r=at(t);try{var i=function(){var t=n.value;ot()(rt.a.mark((function n(){return rt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t(e);case 2:case"end":return n.stop()}}),n)})))()};for(r.s();!(n=r.n()).done;)i()}catch(t){r.e(t)}finally{r.f()}}},{key:"forceUpdate",value:function(t,e){var n=t._values[e],r=t._observers[e];this.notify(r,n)}},{key:"isObserved",value:function(t,e,n){if("object"!==A()(t)||null===t||!t.hasOwnProperty(e))return!1;var r=!!(t._observers&&t._observers[e]&&t._observers[e].size>0);return r&&n?t._observers[e].has(n):r}},{key:"setSilently",value:function(t,e,n){if(!t.hasOwnProperty(e))throw new Error('Invalid argument: object does not have property "'.concat(e,'"'));if(this.isObserved(t,e)){if(t._values[e]=n,O()(t[e])){var r,i=at(t._observers[e]);try{for(i.s();!(r=i.n()).done;){var o=r.value;this.observeArray(t[e],o)}}catch(t){i.e(t)}finally{i.f()}}}else t[e]=n}},{key:"observeProperty",value:function(e,n,r){var o=this;if(!e.hasOwnProperty(n))throw new Error('Invalid argument: object does not have property "'.concat(n,'"'));if(this.isObserved(e,n,r))throw new Error("Observer already registered for property ".concat(n));this.addObserver(e,r,n),e.hasOwnProperty("_values")||et()(e,"_values",{enumerable:!1,configurable:!1,value:{}}),e._values[n]=e[n],et()(e,n,{get:function(){return e._values[n]},set:function(r){var a;e._values[n]!==r&&(e._values[n]=r,"".concat(n," = "),O()(r)&&r.length&&i()(a="[".concat(r[0],", …](")).call(a,r.length,")"),t.notify(e._observers[n],r));O()(e[n])&&o.observeArray(e[n],e._observers[n])}}),O()(e[n])&&this.observeArray(e[n],r)}},{key:"observeRecursive",value:function(e,n){if(O()(e))this.observeArray(e,n);else for(var r in e)e.hasOwnProperty(r)&&t.observeProperty(e,r,n)}},{key:"observeArray",value:function(t,e){if(e instanceof K.a){var n,r=at(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.addObserver(t,i)}}catch(t){r.e(t)}finally{r.f()}}else this.addObserver(t,e);this.overrideArrayPrototypes(t,arguments)}},{key:"addObserver",value:function(t,e,n){t.hasOwnProperty("_observers")||et()(t,"_observers",{enumerable:!1,configurable:!1,value:3===arguments.length?[]:new K.a}),3===arguments.length?(t._observers[n]||(t._observers[n]=new K.a),t._observers[n].add(e)):t._observers.add(e)}},{key:"unobserve",value:function(t,e,n){if("function"==typeof n)this.unobserveProperty(t,e,n);else{if("function"!=typeof e)throw new Error("Invalid argument for unobserve");O()(t)?this.unobserveArray(t,e):this.unobserveRecursive(t,e)}}},{key:"unobserveAll",value:function(t,e){if(1===arguments.length)for(var n in t)t.hasOwnProperty(n)&&this.unobserveAll(t,n);else if(this.isObserved(t,e)){if("Removing all observers for ".concat(e,"…"),O()(t[e]))this.restoreArrayPrototypes(t[e]);else if("object"===A()(t[e])&&null!==t[e])for(var r in t[e])t[e].hasOwnProperty(r)&&this.unobserveAll(t[e],r);delete t._observers[e],delete t[e],t[e]=t._values[e],delete t._values[e]}}},{key:"unobserveProperty",value:function(t,e,n){O()(t[e])&&this.unobserveArray(t[e],n),this.removeObserver(t,n,e),t._observers[e].size||(delete t[e],t[e]=t._values[e],delete t._values[e])}},{key:"unobserveRecursive",value:function(e,n){for(var r in e)e.hasOwnProperty(r)&&t.unobserveProperty(e,r,n)}},{key:"unobserveArray",value:function(t,e){this.removeObserver(t,e),t._observers.size||this.restoreArrayPrototypes(t)}},{key:"overrideArrayPrototypes",value:function(e){var n;$()(n=["pop","push","reverse","shift","sort","splice","unshift"]).call(n,(function(n){var r=W()(Array.prototype,n);e.hasOwnProperty(n)||(r.value=function(){var r,o=Array.prototype[n].apply(e,arguments);return"[".concat(n,"] "),e.length&&i()(r="[".concat(e[0],", …](")).call(r,e.length,")"),t.notify(e._observers,e),o},et()(e,n,r))}))}},{key:"restoreArrayPrototypes",value:function(t){var e;$()(e=["pop","push","reverse","shift","sort","splice","unshift"]).call(e,(function(e){delete t[e]}))}},{key:"removeObserver",value:function(t,e,n){if(t.hasOwnProperty("_observers")){var r;if(3===arguments.length){if(!t._observers[n])return;r=t._observers[n],"Removing observer for ".concat(n,"…")}else r=t._observers;$()(r).call(r,(function(t){t===e&&r.delete(t)}))}}}]),t}();function ct(t){if(void 0===g.a||null==m()(t)){if(O()(t)||(t=function(t,e){var n;if(!t)return;if("string"==typeof t)return lt(t,e);var r=k()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return x()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lt(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=p()(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function lt(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 ft=function(){function t(e,n,r){if(l()(this,t),!(e instanceof HTMLSelectElement))throw new Error("Invalid argument for select");this.element=e,this.hasAllOption=!1,this.allText="",r&&r.length&&(this.allText=r),n&&n.length?this.head=n:(this.hasHead=!1,this.headText="")}return h()(t,[{key:"showAllOption",value:function(e){e&&(this.allText=e),this.hasAllOption=!0;var n=this.hasHead?1:0;this.element.add(new Option(this.allText,t.allValue),n)}},{key:"hideAllOption",value:function(){var e=this.selected===t.allValue;this.hasAllOption=!1,this.remove(t.allValue),e&&(this.selected=this.hasHead?t.headValue:"",this.element.dispatchEvent(new Event("change")))}},{key:"addHead",value:function(){var e=new Option(this.headText,t.headValue,!0,!0);e.disabled=!0,this.element.options.add(e,0)}},{key:"hasValue",value:function(t){return void 0!==this.getOption(t)}},{key:"getOption",value:function(t){var e;return Y()(e=G()(this.element.options)).call(e,(function(e){return e.value===t}))}},{key:"remove",value:function(t){var e=this.getOption(t);e&&this.element.remove(e.index)}},{key:"setOptions",value:function(e,n){var r=this;n=n||this.element.value,this.element.options.length=0,this.hasHead&&this.addHead(),this.hasAllOption&&this.element.add(new Option(this.allText,t.allValue,!1,n===t.allValue));var i,o=ct(e);try{var a=function(){var t=i.value,e=new Option(t.listText,t.listValue,!1,n===t.listValue);r.element.add(e),ut.observe(t,"listText",(function(t){e.text=t}))};for(o.s();!(i=o.n()).done;)a()}catch(t){o.e(t)}finally{o.f()}}},{key:"selected",set:function(t){this.hasValue(t)&&(this.element.value=t)},get:function(){return this.element.value}},{key:"head",set:function(t){t.length&&(this.hasHead=!0,this.headText=t,this.addHead())},get:function(){return this.headText}}],[{key:"allValue",get:function(){return"all"}},{key:"headValue",get:function(){return"0"}}]),t}(),ht=function(){function t(){l()(this,t),this.listValue=ft.allValue,this.listText="-"}return h()(t,[{key:"listItem",value:function(t,e){this.listValue=String(t),this.listText=String(e)}},{key:"toString",value:function(){var t;return i()(t="[".concat(this.listValue,", ")).call(t,this.listText,"]")}}]),t}(),dt=n(158),pt=n.n(dt),vt=n(102),mt=n.n(vt),yt=n(159),gt=n.n(yt),bt=n(39),xt=n.n(bt),wt=n(5),kt=n.n(wt),St=function(){function t(){l()(this,t)}return h()(t,null,[{key:"setCookie",value:function(t,e){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,a="";if(o){var s=new Date;s.setTime(s.getTime()+24*o*60*60*1e3),a="; expires=".concat(s.toUTCString())}document.cookie=i()(n=i()(r="ulogger_".concat(t,"=")).call(r,e)).call(n,a,"; path=/; samesite=lax")}},{key:"sprintf",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o=0,a=t.replace(/%%|%s|%d/g,(function(t){if("%%"===t)return"%";var e;if("%d"===t&&isNaN(n[o])&&void 0!==n[o])throw new Error(i()(e="Wrong format specifier ".concat(t," for ")).call(e,n[o]," argument"));if(void 0===n[o])throw new Error("Missing argument for format specifier ".concat(t));return n[o++]}));if(o<n.length)throw new Error("Unused argument for format specifier ".concat(t));return a}},{key:"addScript",value:function(t,e,n,r){if(e&&document.getElementById(e))n instanceof Function&&n();else{var i=document.createElement("script");i.type="text/javascript",i.src=t,e&&(i.id=e),i.async=!0,n instanceof Function&&(i.onload=n),r instanceof Function&&(i.onerror=function(){return r(new Error("error loading ".concat(e," script")))}),document.getElementsByTagName("head")[0].appendChild(i)}}},{key:"loadScript",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4,i=new a.a((function(r,i){return t.addScript(e,n,r,i)})),o=this.timeoutPromise(r);return a.a.race([i,o])}},{key:"timeoutPromise",value:function(t){return new a.a((function(e,n){var r=u()((function(){clearTimeout(r),n(new Error("timeout (".concat(t," ms).")))}),t)}))}},{key:"htmlEncode",value:function(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}},{key:"hexToRGBA",value:function(t,e){var n,r;return e=void 0!==e?e:1,"rgba(".concat(i()(n=kt()(r=(t=t.replace("#","")).match(new RegExp("(.{".concat(t.length/3,"})"),"g"))).call(r,(function(e){return xt()(t.length%2?e+e:e,16)}))).call(n,e).join(","),")")}},{key:"addCss",value:function(t,e){if(!e||!document.getElementById(e)){var n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=t,e&&(n.id=e),document.getElementsByTagName("head")[0].appendChild(n)}}},{key:"removeElementById",value:function(t){var e=document.getElementById(t);e&&e.remove()}},{key:"nodeFromHtml",value:function(t){var e=document.createElement("template");return e.innerHTML=gt()(t).call(t),e.content.childNodes.length>1?e.content.childNodes:e.content.firstChild}},{key:"getFloat",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.getParsed(e,n,"float")}},{key:"getInteger",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.getParsed(e,n,"int")}},{key:"getString",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.getParsed(e,n,"string")}},{key:"getParsed",value:function(t,e,n){if(e&&null===t)return null;var r;switch(n){case"float":r=mt()(t);break;case"int":r=Math.round(mt()(t));break;case"string":r=String(t);break;default:throw new Error("Unknown type")}if(null==t||"string"!==n&&isNaN(r))throw new Error("Invalid value");return r}},{key:"getTimeString",value:function(t){var e,n,r,o,a="";return{date:i()(e=i()(n="".concat(t.getFullYear(),"-")).call(n,k()(r="0".concat(t.getMonth()+1)).call(r,-2),"-")).call(e,k()(o="0".concat(t.getDate())).call(o,-2)),time:t.toTimeString().replace(/^\s*([^ ]+)([^(]*)(\([^)]*\))*/,(function(t,e,n,r){return n&&(a=n.replace(/(0(?=[1-9]00))|(00\b)/g,""),r&&/[A-Z]/.test(r)&&(a+=r.match(/\b[A-Z]+/g).join(""))),e})),zone:a}}},{key:"openUrl",value:function(t){window.location.assign(t)}},{key:"deg2rad",value:function(t){return t*Math.PI/180}}]),t}(),Et=function(){function t(){l()(this,t)}return h()(t,[{key:"hasComment",value:function(){return null!=this.comment&&this.comment.length>0}},{key:"hasImage",value:function(){return null!=this.image&&this.image.length>0}},{key:"delete",value:function(){return t.update({action:"delete",posid:this.id})}},{key:"save",value:function(){return t.update({action:"update",posid:this.id,comment:this.comment})}},{key:"distanceTo",value:function(t){var e=St.deg2rad(this.latitude),n=St.deg2rad(this.longitude),r=St.deg2rad(t.latitude),i=r-e,o=St.deg2rad(t.longitude)-n;return 6371e3*(2*Math.asin(Math.sqrt(Math.pow(Math.sin(i/2),2)+Math.cos(e)*Math.cos(r)*Math.pow(Math.sin(o/2),2))))}},{key:"secondsTo",value:function(t){return this.timestamp-t.timestamp}},{key:"totalSpeed",get:function(){return this.totalSeconds?this.totalMeters/this.totalSeconds:0}}],[{key:"fromJson",value:function(e){var n=new t;return n.id=St.getInteger(e.id),n.latitude=St.getFloat(e.latitude),n.longitude=St.getFloat(e.longitude),n.altitude=St.getInteger(e.altitude,!0),n.speed=St.getFloat(e.speed,!0),n.bearing=St.getInteger(e.bearing,!0),n.accuracy=St.getInteger(e.accuracy,!0),n.provider=St.getString(e.provider,!0),n.comment=St.getString(e.comment,!0),n.image=St.getString(e.image,!0),n.username=St.getString(e.username),n.trackname=St.getString(e.trackname),n.trackid=St.getInteger(e.trackid),n.timestamp=St.getInteger(e.timestamp),n.meters=St.getInteger(e.meters),n.seconds=St.getInteger(e.seconds),n.totalMeters=0,n.totalSeconds=0,n}},{key:"update",value:function(t){return j.post("utils/handleposition.php",t)}}]),t}();function Lt(t){if(void 0===g.a||null==m()(t)){if(O()(t)||(t=function(t,e){var n;if(!t)return;if("string"==typeof t)return At(t,e);var r=k()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return x()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return At(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=p()(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function At(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}function Mt(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var Ot=function(t){R()(n,t);var e=Mt(n);function n(){var t;return l()(this,n),(t=e.call(this)).positions=[],t}return h()(n,[{key:"clear",value:function(){this.positions.length=0}},{key:"isLastPosition",value:function(t){return!0}},{key:"isFirstPosition",value:function(t){return!0}},{key:"fromJson",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[];e?n=this.positions:this.clear();var r,i=Lt(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;n.push(Et.fromJson(o))}}catch(t){i.e(t)}finally{i.f()}this.positions=n}},{key:"fetchLatest",value:function(){var t=this;return this.clear(),n.fetch({last:!0}).then((function(e){t.fromJson(e)}))}},{key:"length",get:function(){return this.positions.length}},{key:"hasPositions",get:function(){return this.positions.length>0}}],[{key:"fetchLatest",value:function(){var t=new n;return t.fetchLatest().then((function(){return t.length?t:null}))}},{key:"fetch",value:function(t){return j.get("utils/getpositions.php",t)}}]),n}(ht);function _t(t){if(void 0===g.a||null==m()(t)){if(O()(t)||(t=function(t,e){var n;if(!t)return;if("string"==typeof t)return Pt(t,e);var r=k()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return x()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pt(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=p()(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function Pt(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}function Ct(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var Tt=function(t){R()(n,t);var e=Ct(n);function n(t,r,i){var o;if(l()(this,n),o=e.call(this),!N()(t)||t<=0||!r||!(i instanceof Dt))throw new Error("Invalid argument for track constructor");return o.id=t,o.name=r,o.user=i,o.plotData=[],o.maxId=0,o.totalMeters=0,o.totalSeconds=0,o.listItem(t,r),o}return h()(n,[{key:"setName",value:function(t){this.name=t,this.listText=t}},{key:"clear",value:function(){pt()(H()(n.prototype),"clear",this).call(this),this.clearTrackCounters()}},{key:"clearTrackCounters",value:function(){this.maxId=0,this.plotData.length=0,this.totalMeters=0,this.totalSeconds=0}},{key:"isEqualTo",value:function(t){return!!t&&t.id===this.id}},{key:"fromJson",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[];e&&this.hasPositions?n=this.positions:this.clear();var r,i=_t(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=Et.fromJson(o);this.calculatePosition(a),n.push(a)}}catch(t){i.e(t)}finally{i.f()}this.positions=n}},{key:"isLastPosition",value:function(t){return this.length>0&&t===this.length-1}},{key:"isFirstPosition",value:function(t){return this.length>0&&0===t}},{key:"fetchPositions",value:function(){var t=this,e={userid:this.user.id,trackid:this.id};return this.maxId&&(e.afterid=this.maxId),Ot.fetch(e).then((function(n){t.fromJson(n,e.afterid>0)}))}},{key:"export",value:function(t){if(this.hasPositions){var e,n,r=i()(e=i()(n="utils/export.php?type=".concat(t,"&userid=")).call(n,this.user.id,"&trackid=")).call(e,this.id);St.openUrl(r)}}},{key:"delete",value:function(){return n.update({action:"delete",trackid:this.id})}},{key:"saveMeta",value:function(){return n.update({action:"update",trackid:this.id,trackname:this.name})}},{key:"recalculatePositions",value:function(){this.clearTrackCounters();var t,e=null,n=_t(this.positions);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.meters=e?r.distanceTo(e):0,r.seconds=e?r.secondsTo(e):0,this.calculatePosition(r),e=r}}catch(t){n.e(t)}finally{n.f()}}},{key:"calculatePosition",value:function(t){this.totalMeters+=t.meters,this.totalSeconds+=t.seconds,t.totalMeters=this.totalMeters,t.totalSeconds=this.totalSeconds,null!=t.altitude&&this.plotData.push({x:t.totalMeters,y:t.altitude}),t.id>this.maxId&&(this.maxId=t.id)}},{key:"hasPlotData",get:function(){return this.plotData.length>0}}],[{key:"fetchLatest",value:function(t){return this.fetch({last:!0,userid:t.id}).then((function(e){if(e.length){var r=new n(e[0].trackid,e[0].trackname,t);return r.fromJson(e),r}return null}))}},{key:"fetchList",value:function(t){return j.get("utils/gettracks.php",{userid:t.id}).then((function(e){var r,i=[],o=_t(e);try{for(o.s();!(r=o.n()).done;){var a=r.value;i.push(new n(a.id,a.name,t))}}catch(t){o.e(t)}finally{o.f()}return i}))}},{key:"import",value:function(t,e){return j.post("utils/import.php",t).then((function(t){var r,i=[],o=_t(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;i.push(new n(a.id,a.name,e))}}catch(t){o.e(t)}finally{o.f()}return i}))}},{key:"update",value:function(t){return j.post("utils/handletrack.php",t)}}]),n}(Ot);function jt(t){if(void 0===g.a||null==m()(t)){if(O()(t)||(t=function(t,e){var n;if(!t)return;if("string"==typeof t)return It(t,e);var r=k()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return x()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return It(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=p()(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function It(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}function Ut(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var Dt=function(t){R()(n,t);var e=Ut(n);function n(t,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(l()(this,n),i=e.call(this),!N()(t)||t<=0)throw new Error("Invalid argument for user constructor");return i.id=t,i.login=r,i.isAdmin=o,i.listItem(t,r),i}return h()(n,[{key:"isEqualTo",value:function(t){return!!t&&t.id===this.id}},{key:"fetchLastPosition",value:function(){return Tt.fetchLatest(this)}},{key:"delete",value:function(){return n.update({action:"delete",login:this.login})}},{key:"setPassword",value:function(t,e){return j.post("utils/changepass.php",{login:this.login,pass:t,oldpass:e})}},{key:"modify",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i={action:"update",login:this.login,admin:t};return r&&(i.pass=r),n.update(i).then((function(){e.isAdmin=t}))}}],[{key:"fetchList",value:function(){return j.get("utils/getusers.php").then((function(t){var e,r=[],i=jt(t);try{for(i.s();!(e=i.n()).done;){var o=e.value;r.push(new n(o.id,o.login,o.isAdmin))}}catch(t){i.e(t)}finally{i.f()}return r}))}},{key:"add",value:function(t,e){return n.update({action:"add",login:t,pass:e}).then((function(e){return new n(e.id,t)}))}},{key:"update",value:function(t){return j.post("utils/handleuser.php",t)}}]),n}(ht),Nt=function(){function t(){l()(this,t),this._isAdmin=!1,this._isAuthenticated=!1,this._user=null}return h()(t,[{key:"load",value:function(t){t&&t.isAuthenticated&&(this.user=new Dt(t.userId,t.userLogin),this.isAdmin=t.isAdmin)}},{key:"user",set:function(t){t?(this._user=t,this._isAuthenticated=!0):(this._user=null,this._isAuthenticated=!1,this._isAdmin=!1)},get:function(){return this._user}},{key:"isAdmin",set:function(t){if(!this._user)throw new Error("No authenticated user");this._isAdmin=t},get:function(){return this._isAdmin}},{key:"isAuthenticated",get:function(){return this._isAuthenticated}}]),t}(),zt=n(160),Rt=n.n(zt),Vt=n(161),Bt=n.n(Vt),Ft=n(162),Ht=n.n(Ft),qt=n(33),Gt=n.n(qt),Xt=n(56),Yt=n.n(Xt),Jt=n(163),Wt=n.n(Jt);function Zt(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var $t=function(t){R()(n,t);var e=Zt(n);function n(t,r,i,o){var a;return l()(this,n),(a=e.call(this)).id=t,a.name=r,a.url=i,a.priority=o,a.listItem(t,r),a}return h()(n,[{key:"setName",value:function(t){this.name=t,this.listItem(this.id,this.name)}},{key:"setUrl",value:function(t){this.url=t}}]),n}(ht);function Qt(t){if(void 0===g.a||null==m()(t)){if(O()(t)||(t=function(t,e){var n;if(!t)return;if("string"==typeof t)return Kt(t,e);var r=k()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return x()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kt(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=p()(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function Kt(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}function te(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var ee=function(t){R()(n,t);var e=te(n);function n(){return l()(this,n),e.apply(this,arguments)}return h()(n,[{key:"addNewLayer",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.addLayer(this.getMaxId()+1,t,e,n)}},{key:"addLayer",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.push(new $t(t,e,n,r))}},{key:"delete",value:function(t){var e,n,r,i=Yt()(e=kt()(n=this).call(n,(function(t){return t.id}))).call(e,t);Gt()(r=this).call(r,i,1)}},{key:"get",value:function(t){var e;return Y()(e=this).call(e,(function(e){return e.id===t}))}},{key:"getMaxId",value:function(){var t,e;return Math.max.apply(Math,i()(t=G()(kt()(e=this).call(e,(function(t){return t.id})))).call(t,[0]))}},{key:"setPriorityLayer",value:function(t){var e,n=Qt(this);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.id>0&&r.id===t?r.priority=1:r.priority=0}}catch(t){n.e(t)}finally{n.f()}}},{key:"getPriorityLayer",value:function(){var t,e=Qt(this);try{for(e.s();!(t=e.n()).done;){var n=t.value;if(n.priority>0)return n.id}}catch(t){e.e(t)}finally{e.f()}return 0}},{key:"load",value:function(t){this.length=0;var e,n=Qt(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.id>0&&this.addLayer(r.id,r.name,r.url,r.priority)}}catch(t){n.e(t)}finally{n.f()}}}]),n}(Wt()(Array)),ne=function(){function t(){l()(this,t),this.initialize()}return h()(t,[{key:"initialize",value:function(){this.interval=10,this.units="metric",this.lang="en",this.mapApi="openlayers",this.googleKey="",this.olLayers=new ee,this.initLatitude=52.23,this.initLongitude=21.01,this.requireAuth=!0,this.publicTracks=!1,this.passStrength=2,this.passLenMin=10,this.strokeWeight=2,this.strokeColor="#ff0000",this.strokeOpacity=1,this.colorNormal="#ffffff",this.colorStart="#55b500",this.colorStop="#ff6a00",this.colorExtra="#cccccc",this.colorHilite="#feff6a",this.initUnits()}},{key:"initUnits",value:function(){"imperial"===this.units?(this.factorSpeed=2.237,this.unitSpeed="unitmph",this.factorDistance=3.28,this.unitDistance="unitft",this.factorDistanceMajor=.621,this.unitDistanceMajor="unitmi"):"nautical"===this.units?(this.factorSpeed=1.944,this.unitSpeed="unitkt",this.factorDistance=1,this.unitDistance="unitm",this.factorDistanceMajor=.54,this.unitDistanceMajor="unitnm"):(this.factorSpeed=3.6,this.unitSpeed="unitkmh",this.factorDistance=1,this.unitDistance="unitm",this.factorDistanceMajor=1,this.unitDistanceMajor="unitkm"),this.unitDay="unitday"}},{key:"load",value:function(t){if(t){for(var e in t)"layers"===e?this.olLayers.load(t[e]):t.hasOwnProperty(e)&&this.hasOwnProperty(e)&&(this[e]=t[e]);this.initUnits()}}},{key:"save",value:function(t){var e,n,r=this;return this.load(t),t=Ht()(e=Bt()(n=Rt()(this)).call(n,(function(t){return"function"!=typeof r[t]}))).call(e,(function(t,e){return t[e]=r[e],t}),{}),j.post("utils/saveconfig.php",t)}},{key:"reinitialize",value:function(){ut.unobserveAll(this),this.initialize()}},{key:"onChanged",value:function(t,e){ut.observe(this,t,e)}},{key:"validPassStrength",value:function(t){return this.getPassRegExp().test(t)}},{key:"getPassRegExp",value:function(){var t="";return this.passStrength>0&&(t+="(?=.*[a-z])(?=.*[A-Z])"),this.passStrength>1&&(t+="(?=.*[0-9])"),this.passStrength>2&&(t+="(?=.*[^a-zA-Z0-9])"),this.passLenMin>0&&(t+="(?=.{".concat(this.passLenMin,",})")),0===t.length&&(t=".*"),new RegExp(t)}}]),t}(),re=n(164),ie=n.n(re),oe=function(){function t(){l()(this,t),this.strings={},this.config=null}return h()(t,[{key:"init",value:function(t,e){this.config=t,e&&(this.strings=e)}},{key:"_",value:function(t){if(void 0===this.strings[t])throw new Error("Unknown localized string");for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o;return n.length?St.sprintf.apply(St,i()(o=[this.strings[t]]).call(o,n)):this.strings[t]}},{key:"unit",value:function(t){var e=this.config[t];if(void 0===this.config[t])throw new Error("Unknown localized unit");return this._(e)}},{key:"getLocaleSpeed",value:function(t,e){var n,r=Math.round(t*this.config.factorSpeed*100)/100;return e?i()(n="".concat(r.toLocaleString(this.config.lang)," ")).call(n,this.unit("unitSpeed")):r}},{key:"getLocaleDistanceMajor",value:function(t,e){var n,r=Math.round(t*this.config.factorDistanceMajor/10)/100;return e?i()(n="".concat(r.toLocaleString(this.config.lang)," ")).call(n,this.unit("unitDistanceMajor")):r}},{key:"getLocaleDistance",value:function(t,e){var n,r=Math.round(t*this.config.factorDistance*100)/100;return e?i()(n="".concat(r.toLocaleString(this.config.lang)," ")).call(n,this.unit("unitDistance")):r}},{key:"getLocaleAltitude",value:function(t,e){return this.getLocaleDistance(t,e)}},{key:"getLocaleAccuracy",value:function(t,e){return this.getLocaleDistance(t,e)}},{key:"getLocaleDuration",value:function(t){var e,n,r,o,a=Math.floor(t/86400),s=Math.floor(t%86400/3600),u=Math.floor(t%86400%3600/60);return t=t%86400%3600%60,(a>0?i()(e="".concat(a," ")).call(e,this.unit("unitDay")," "):"")+k()(n="00".concat(s)).call(n,-2)+":"+k()(r="00".concat(u)).call(r,-2)+":"+k()(o="00".concat(t)).call(o,-2)}},{key:"getLocaleCoordinates",value:function(t){var e;return i()(e="".concat(this.coordStr(t.longitude,!0)," ")).call(e,this.coordStr(t.latitude,!1))}},{key:"coordStr",value:function(t,e){var n,r,o,a=ie()(t),s=Math.abs(60*(t-a));return o=e?t<0?"W":"E":t<0?"S":"N",i()(n=i()(r="".concat(Math.abs(a).toLocaleString(this.config.lang),"°")).call(r,s.toLocaleString(this.config.lang,{maximumFractionDigits:2}),"'")).call(n,o)}},{key:"getLocalePassRules",value:function(){var t="";return this.config.passLenMin>0&&(t=St.sprintf(this._("passlenmin")+"\n",this.config.passLenMin)),this.config.passStrength>0&&this.config.passStrength<4&&(t+=this._("passrules_".concat(this.config.passStrength))),t}},{key:"getLangList",value:function(){return this.strings.langArr||{}}}]),t}(),ae=function(){function t(){l()(this,t),this.auth=new Nt,this.config=new ne,this.lang=new oe}return h()(t,[{key:"initialize",value:function(){var t=this;return j.get("utils/getinit.php").then((function(e){if(!(e&&e.auth&&e.config&&e.lang))throw new Error("Corrupted initialization data");t.auth.load(e.auth),t.config.load(e.config),t.lang.init(t.config,e.lang)}))}}],[{key:"waitForDom",value:function(){return new a.a((function(t){"complete"===document.readyState||"interactive"===document.readyState?u()(t,1):document.addEventListener("DOMContentLoaded",t)}))}}]),t}(),se=new ae,ue=se.config,ce=se.lang,le=se.auth,fe=n(79),he=n.n(fe),de=n(103),pe=n.n(de),ve=function(){function t(e){l()(this,t),this._model=e,this.root=document}return h()(t,[{key:"bindAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;for(var e in this.root=t,this._model){var n;if(this._model.hasOwnProperty(e))pe()(n=this).call(n,e)}}},{key:"bind",value:function(t){var e=this,n=this.root.querySelectorAll("[data-".concat("bind","]"));$()(n).call(n,(function(n){pe()(n.dataset)===t&&(n instanceof HTMLInputElement||n instanceof HTMLSelectElement||n instanceof HTMLTextAreaElement?e.onChangeBind(n,t):n instanceof HTMLAnchorElement||n instanceof HTMLButtonElement?e.onClickBind(n,t):e.viewUpdateBind(n,t))}))}},{key:"onClickBind",value:function(t,e){var n=this;t.addEventListener("click",(function(t){if("function"!=typeof n._model[e])throw new Error("Property ".concat(e," is not a callback"));n._model[e](t),t.preventDefault()}))}},{key:"onChangeBind",value:function(t,e){var n=this,r="value",i=function(t){return t};"checkbox"===t.type&&(r="checked",i=function(t){return!!t}),t.addEventListener("change",(function(){n._model[e]=t[r]})),ut.observe(this.model,e,(function(e){e=i(e),t[r]!==e&&(t[r]=e)}))}},{key:"viewUpdateBind",value:function(t,e){ut.observe(this.model,e,(function(e){t.innerHTML!==e&&(t.innerHTML=e)}))}},{key:"onChanged",value:function(t,e){ut.observe(this.model,t,e)}},{key:"unsubscribe",value:function(t,e){ut.unobserve(this.model,t,e)}},{key:"getBoundElement",value:function(t){return this.root.querySelector("[data-bind='".concat(t,"']"))}},{key:"model",get:function(){return this._model}}]),t}(),me=n(165),ye=n.n(me);function ge(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var be=function(t){R()(n,t);var e=ge(n);function n(t){var r;return l()(this,n),(r=e.call(this,{pointSelected:null,chartVisible:!1,buttonVisible:!1,onChartToggle:null,onMenuToggle:null})).state=t,r.data=[],r.chart=null,r.chartPoints=null,r.chartElement=document.querySelector("#chart"),r.chartContainer=r.chartElement.parentElement,r.buttonElement=document.querySelector("#altitudes"),r}return h()(n,[{key:"init",value:function(){return this.chartSetup(),this.setObservers(),this.bindAll(),this}},{key:"chartSetup",value:function(){var t,e=this;St.addCss("css/dist/chartist.css","chartist_css"),this.chart=new he.a.Line(this.chartElement,{series:[this.data]},{lineSmooth:!0,showArea:!0,axisX:{type:he.a.AutoScaleAxis,onlyInteger:!0,showLabel:!1},plugins:[ye()({axisY:{axisTitle:i()(t="".concat(ce._("altitude")," (")).call(t,ce.unit("unitDistance"),")"),axisClass:"ct-axis-title",offset:{x:0,y:11},textAnchor:"middle",flipTitle:!0}})]}),this.chart.on("created",(function(){return e.onCreated()}))}},{key:"onCreated",value:function(){var t=this;if(this.data.length&&this.data.length<=1e3){this.chartPoints=document.querySelectorAll(".ct-series .ct-point");for(var e=this.chartPoints.length,n=function(e){t.chartPoints[e].addEventListener("click",(function(){t.model.pointSelected=e}))},r=0;r<e;r++)n(r)}}},{key:"setObservers",value:function(){var t=this;this.state.onChanged("currentTrack",(function(e){e&&ut.observe(e,"positions",(function(){t.onTrackUpdate(e,!0)})),t.onTrackUpdate(e)})),this.onChanged("buttonVisible",(function(e){return t.renderButton(e)})),this.onChanged("chartVisible",(function(e){return t.renderContainer(e)})),this.model.onChartToggle=function(){t.model.chartVisible=!t.model.chartVisible},this.model.onMenuToggle=function(){t.model.chartVisible&&t.chart.update()}}},{key:"onTrackUpdate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.render(t,e),this.model.buttonVisible=!!t&&t.hasPlotData}},{key:"renderContainer",value:function(t){t?(this.chartContainer.style.display="block",this.render(this.state.currentTrack)):this.chartContainer.style.display="none"}},{key:"renderButton",value:function(t){this.buttonElement.style.visibility=t?"visible":"hidden"}},{key:"render",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[];if(t&&t.hasPlotData&&this.model.chartVisible?n=t.plotData:this.model.chartVisible=!1,e||this.data!==n){var r;i()(r="Chart".concat(e?" forced":""," update (")).call(r,n.length,")"),this.data=n;var o={lineSmooth:n.length<=1e3};this.chart.update({series:[n]},o,!0)}}},{key:"pointAddClass",value:function(t,e){this.model.chartVisible&&this.chartPoints.length>t&&this.chartPoints[t].classList.add(e)}},{key:"pointsRemoveClass",value:function(t){var e;this.model.chartVisible&&this.chartPoints&&$()(e=this.chartPoints).call(e,(function(e){return e.classList.remove(t)}))}},{key:"onPointOver",value:function(t){this.pointAddClass(t,"ct-point-hilight")}},{key:"onPointOut",value:function(){this.pointsRemoveClass("ct-point-hilight")}},{key:"onPointSelect",value:function(t){this.pointAddClass(t,"ct-point-selected")}},{key:"onPointUnselect",value:function(){this.pointsRemoveClass("ct-point-selected")}}]),n}(ve),xe=n(166),we=n.n(xe),ke=n(167),Se=n.n(ke),Ee=n(100),Le=n.n(Ee),Ae=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l()(this,t),this.autoClose=r.autoClose||0,this.hasButton=void 0!==r.hasButton?r.hasButton:0===this.autoClose,this.fixedPosition=r.fixed||!1;var i='<div class="alert"><span>'.concat(e,"</span></div>");if(this.box=St.nodeFromHtml(i),r.id&&(this.box.id=r.id),r.class&&this.box.classList.add(r.class),this.hasButton){var o=document.createElement("button");o.setAttribute("type","button"),o.textContent="×",o.onclick=function(){return n.destroy()},this.box.appendChild(o)}this.closeHandle=null}return h()(t,[{key:"render",value:function(){var e=this;if(!this.fixedPosition){var n=t.getPosition();n&&(this.box.style.top="".concat(n,"px"))}document.body.appendChild(this.box),u()((function(){e.box&&e.box.classList.add("in")}),50)}},{key:"destroy",value:function(){if(this.closeHandle&&(clearTimeout(this.closeHandle),this.closeHandle=null),this.box&&document.body.contains(this.box)){var t=this.box;requestAnimationFrame((function(){t.classList.add("out"),u()((function(){t.remove()}),1e3)})),this.box=null}}}],[{key:"getPosition",value:function(){var t=document.querySelectorAll(".alert"),e=t[t.length-1],n=0;if(e){var r=document.body.clientHeight-100;(n=e.getBoundingClientRect().bottom)>r&&(n=r)}return n}},{key:"show",value:function(e,n){var r=new t(e,n);return r.render(),r.autoClose&&(r.closeHandle=u()((function(){return r.destroy()}),r.autoClose)),r}},{key:"error",value:function(t,e){var n,r;e instanceof Error&&console.error(i()(n=i()(r="".concat(e.name,": ")).call(r,e.message," (")).call(n,e.stack,")"));return this.show(t,{class:"error"})}},{key:"toast",value:function(t){return this.show(t,{class:"toast",autoClose:1e4})}},{key:"spinner",value:function(){return this.show("",{class:"spinner",hasButton:!1,fixed:!0})}}]),t}();function Me(t){if(void 0===g.a||null==m()(t)){if(O()(t)||(t=function(t,e){var n;if(!t)return;if("string"==typeof t)return Oe(t,e);var r=k()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return x()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Oe(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=p()(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function Oe(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 _e=function(){function t(e){l()(this,t);var n=document.createElement("div");n.setAttribute("id","modal");var r=document.createElement("div");r.setAttribute("id","modal-header");var i=document.createElement("button");i.setAttribute("id","modal-close"),i.setAttribute("type","button"),i.setAttribute("class","button-reject"),i.setAttribute("data-bind","onCancel");var o=document.createElement("img");o.setAttribute("src","images/close.svg"),o.setAttribute("alt",ce._("close")),i.append(o),r.append(i);var a=document.createElement("div");if(a.setAttribute("id","modal-body"),"string"==typeof e)a.innerHTML=e;else if(e instanceof NodeList||e instanceof Array){var s,u=Me(e);try{for(u.s();!(s=u.n()).done;){var c=s.value;a.append(c)}}catch(t){u.e(t)}finally{u.f()}}else a.append(e);a.prepend(r),n.append(a),this.element=n,this.visible=!1}return h()(t,[{key:"show",value:function(){this.visible||(document.body.append(this.element),this.visible=!0)}},{key:"destroy",value:function(){document.body.removeChild(this.element),this.visible=!1}}],[{key:"isConfirmed",value:function(t){return confirm(t)}}]),t}();function Pe(t){if(void 0===g.a||null==m()(t)){if(O()(t)||(t=function(t,e){var n;if(!t)return;if("string"==typeof t)return Ce(t,e);var r=k()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return x()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ce(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=p()(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function Ce(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}function Te(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var je=function(t){R()(n,t);var e=Te(n);function n(){var t,r;return l()(this,n),(r=e.call(this,{interval:ue.interval,units:ue.units,lang:ue.lang,mapApi:ue.mapApi,googleKey:ue.googleKey,layerId:ue.olLayers.getPriorityLayer().toString(),layers:Le()(ee,i()(t=[new $t(0,"OpenStreetMap","",0)]).call(t,G()(ue.olLayers))),layerName:null,layerUrl:null,initLatitude:ue.initLatitude,initLongitude:ue.initLongitude,requireAuth:ue.requireAuth,publicTracks:ue.publicTracks,passStrength:ue.passStrength,passLenMin:ue.passLenMin,strokeWeight:ue.strokeWeight,strokeColor:ue.strokeColor,strokeOpacity:ue.strokeOpacity,colorNormal:ue.colorNormal,colorStart:ue.colorStart,colorStop:ue.colorStop,colorExtra:ue.colorExtra,colorHilite:ue.colorHilite})).model.onCancel=function(){return r.onCancel()},r.model.onSave=function(){return r.onSave()},r.model.onLayerUpdate=function(){return r.onLayerUpdate()},r.model.onLayerCancel=function(){return r.onLayerCancel()},r.model.onLayerEdit=function(){return r.onLayerEdit()},r.model.onLayerDelete=function(){return r.onLayerDelete()},r.model.onLayerAdd=function(){return r.onLayerAdd()},r}return h()(n,[{key:"init",value:function(){var t=this,e=this.getHtml();this.dialog=new _e(e),this.dialog.show(),this.bindAll(this.dialog.element),this.toggleEditEl=this.getBoundElement("onLayerEdit").parentNode,this.layerEditEl=this.getBoundElement("layerName").parentNode,this.layerSelect=new ft(this.getBoundElement("layerId")),this.layerSelect.setOptions(this.model.layers,this.currentLayer().listValue),this.setPublicTracksActivity(this.model.requireAuth),this.toggleEditVisible(),this.onChanged("layerId",(function(e){var n=t.model.layers.get(xt()(e));t.model.layerName=n?n.name:"",t.model.layerUrl=n?n.url:"",t.toggleEditVisible()})),this.onChanged("layers",(function(e){return t.layerSelect.setOptions(e)})),this.onChanged("requireAuth",(function(e){t.setPublicTracksActivity(e)}))}},{key:"setPublicTracksActivity",value:function(t){t?this.getBoundElement("publicTracks").disabled=!1:(this.model.publicTracks=!0,this.getBoundElement("publicTracks").disabled=!0)}},{key:"onCancel",value:function(){this.dialog.destroy()}},{key:"onSave",value:function(){var t=this;this.validate()&&(this.model.layers.setPriorityLayer(xt()(this.model.layerId)),ue.save(this.model).then((function(){return t.dialog.destroy()})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)})))}},{key:"validate",value:function(){return this.dialog.element.querySelector("form").checkValidity()}},{key:"toggleEditVisible",value:function(){xt()(this.model.layerId)>0?this.toggleEditEl.style.visibility="visible":(this.toggleEditEl.style.visibility="hidden",this.hideEditElement())}},{key:"onLayerDelete",value:function(){this.model.layers.delete(xt()(this.model.layerId)),this.model.layerId="0"}},{key:"onLayerEdit",value:function(){"none"===this.layerEditEl.style.display?this.showEditElement():this.hideEditElement()}},{key:"onLayerUpdate",value:function(){if(this.model.layerName&&this.model.layerUrl){if("-1"===this.model.layerId)this.model.layers.addNewLayer(this.model.layerName,this.model.layerUrl);else{var t=this.currentLayer();t.setName(this.model.layerName),t.setUrl(this.model.layerUrl)}this.hideEditElement(),this.layerSelect.setOptions(this.model.layers)}}},{key:"onLayerCancel",value:function(){this.hideEditElement(),this.layerSelect.setOptions(this.model.layers)}},{key:"onLayerAdd",value:function(){this.model.layerId="-1",this.onLayerEdit()}},{key:"hideEditElement",value:function(){this.layerEditEl.style.display="none"}},{key:"showEditElement",value:function(){this.layerEditEl.style.display="block"}},{key:"currentLayer",value:function(){return this.model.layers.get(xt()(this.model.layerId))}},{key:"getHtml",value:function(){for(var t,e,n,r,o,a,s,u,c,l,f,h,d,p,v,m,y,g,b,x,w,k,S,E,L,A,M,O,_,P,C,T,j,I,U,D,N,z,R,V,B,F,H,q,G,X,Y,J,W,Z,$,Q,K,tt,et="",nt=0,rt=Se()(ce.getLangList());nt<rt.length;nt++){var it,ot,at=we()(rt[nt],2),st=at[0],ut=at[1];et+=i()(it=i()(ot='<option value="'.concat(st,'"')).call(ot,this.model.lang===st?" selected":"",">")).call(it,ut,"</option>")}for(var ct="",lt=0,ft=["metric","imperial","nautical"];lt<ft.length;lt++){var ht,dt,pt=ft[lt];ct+=i()(ht=i()(dt='<option value="'.concat(pt,'"')).call(dt,this.model.units===pt?" selected":"",">")).call(ht,ce._(pt),"</option>")}var vt,mt="",yt=Pe(this.model.layers);try{for(yt.s();!(vt=yt.n()).done;){var gt,bt,xt=vt.value;mt+=i()(gt=i()(bt='<option value="'.concat(xt.id,'"')).call(bt,xt.priority>0?" selected":"",">")).call(gt,xt.name,"</option>")}}catch(t){yt.e(t)}finally{yt.f()}return i()(t=i()(e=i()(n=i()(r=i()(o=i()(a=i()(s=i()(u=i()(c=i()(l=i()(f=i()(h=i()(d=i()(p=i()(v=i()(m=i()(y=i()(g=i()(b=i()(x=i()(w=i()(k=i()(S=i()(E=i()(L=i()(A=i()(M=i()(O=i()(_=i()(P=i()(C=i()(T=i()(j=i()(I=i()(U=i()(D=i()(N=i()(z=i()(R=i()(V=i()(B=i()(F=i()(H=i()(q=i()(G=i()(X=i()(Y=i()(J=i()(W=i()(Z=i()($=i()(Q=i()(K=i()(tt='<div><img style="vertical-align: bottom; margin-right: 10px;" src="images/settings.svg" alt="'.concat(ce._("settings"),'"> <b>')).call(tt,ce._("editingconfig"),'</b></div>\n <div style="clear: both; padding-bottom: 1em;"></div>\n <form id="configForm">\n <label><b>')).call(K,ce._("language"),'</b>\n <select data-bind="lang">\n ')).call(Q,et,"\n </select></label>\n <label><b>")).call($,ce._("units"),'</b>\n <select data-bind="units">\n ')).call(Z,ct,"\n </select></label>\n <label><b>")).call(W,ce._("api"),'</b>\n <select data-bind="mapApi">\n <option value="openlayers"')).call(J,"openlayers"===this.model.mapApi?" selected":"",'>OpenLayers</option>\n <option value="gmaps"')).call(Y,"gmaps"===this.model.mapApi?" selected":"",">Google Maps</option>\n </select></label>\n <label><b>")).call(X,ce._("ollayers"),'</b>\n <select data-bind="layerId">\n ')).call(G,mt,'\n </select>\n <a data-bind="onLayerAdd"><img src="images/add.svg" alt="')).call(q,ce._("add"),'"></a> \n <span style="visibility: hidden;">\n <a data-bind="onLayerEdit"><img src="images/edit.svg" alt="')).call(H,ce._("edit"),'"></a> \n <a data-bind="onLayerDelete"><img src="images/delete.svg" alt="')).call(F,ce._("delete"),'"></a>\n </span></label>\n <div style="display: none; text-align: center;">\n <input type="text" maxlength="50" placeholder="')).call(B,ce._("layername"),'" data-bind="layerName">\n <input type="text" maxlength="255" placeholder="')).call(V,ce._("layerurl"),'" data-bind="layerUrl">\n <button class="button-resolve" data-bind="onLayerUpdate" type="submit">')).call(R,ce._("submit"),'</button>\n <button class="button-reject" data-bind="onLayerCancel" type="button">')).call(z,ce._("cancel"),"</button>\n </div>\n <label><b>")).call(N,ce._("interval"),'</b>\n <input type="number" data-bind="interval" min="1" value="')).call(D,this.model.interval,'" required></label>\n <label><b>')).call(U,ce._("longitude"),'</b>\n <input type="number" data-bind="initLongitude" min="-180" max="180" step="0.01" value="')).call(I,this.model.initLongitude,'" required></label>\n <label><b>')).call(j,ce._("latitude"),'</b>\n <input type="number" data-bind="initLatitude" min="-90" max="90" step="0.01" value="')).call(T,this.model.initLatitude,'" required></label>\n <label><b>')).call(C,ce._("googlekey"),'</b>\n <input type="text" data-bind="googleKey" value="')).call(P,this.model.googleKey,'"></label>\n <label><b>')).call(_,ce._("passlength"),'</b>\n <input type="number" data-bind="passLenMin" min="1" value="')).call(O,this.model.passLenMin,'" required></label>\n <label><b>')).call(M,ce._("passstrength"),'</b>\n <select data-bind="passStrength">\n <option value="0"')).call(A,0===this.model.passStrength?" selected":"",'>password</option>\n <option value="1"')).call(L,1===this.model.passStrength?" selected":"",'>paSsword</option>\n <option value="2"')).call(E,2===this.model.passStrength?" selected":"",'>paSsword1</option>\n <option value="3"')).call(S,3===this.model.passStrength?" selected":"",">paSsword1#</option>\n </select></label>\n <label><b>")).call(k,ce._("requireauth"),'</b>\n <input type="checkbox" data-bind="requireAuth"')).call(w,this.model.requireAuth?" checked":"","></label>\n <label><b>")).call(x,ce._("publictracks"),'</b>\n <input type="checkbox" data-bind="publicTracks"')).call(b,this.model.publicTracks?" checked":"","></label>\n <label><b>")).call(g,ce._("strokeweight"),'</b>\n <input type="number" data-bind="strokeWeight" min="1" value="')).call(y,this.model.strokeWeight,'" required></label>\n <label><b>')).call(m,ce._("strokeopacity"),'</b>\n <input type="number" data-bind="strokeOpacity" min="0" max="1" step="0.01" value="')).call(v,this.model.strokeOpacity,'" required></label>\n <label><b>')).call(p,ce._("strokecolor"),'</b>\n <input type="color" data-bind="strokeColor" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(d,this.model.strokeColor,'" required></label>\n <label><b>')).call(h,ce._("colornormal"),'</b>\n <input type="color" data-bind="colorNormal" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(f,this.model.colorNormal,'" required></label>\n <label><b>')).call(l,ce._("colorstart"),'</b>\n <input type="color" data-bind="colorStart" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(c,this.model.colorStart,'" required></label>\n <label><b>')).call(u,ce._("colorstop"),'</b>\n <input type="color" data-bind="colorStop" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(s,this.model.colorStop,'" required></label>\n <label><b>')).call(a,ce._("colorextra"),'</b>\n <input type="color" data-bind="colorExtra" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(o,this.model.colorExtra,'" required></label>\n <label><b>')).call(r,ce._("colorhilite"),'</b>\n <input type="color" data-bind="colorHilite" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(n,this.model.colorHilite,'" required></label>\n <div class="buttons">\n <button class="button-reject" data-bind="onCancel" type="button">')).call(e,ce._("cancel"),'</button>\n <button class="button-resolve" data-bind="onSave" type="submit">')).call(t,ce._("submit"),"</button>\n </div>\n </form>")}}]),n}(ve);function Ie(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var Ue=function(t){R()(n,t);var e=Ie(n);function n(t){var r;return l()(this,n),(r=e.call(this,ue)).state=t,r.model.onSetInterval=function(){return r.setAutoReloadInterval()},r.model.onConfigEdit=function(){return r.showConfigDialog()},r}return h()(n,[{key:"init",value:function(){return this.setObservers(),this.bindAll(),this}},{key:"setObservers",value:function(){this.onChanged("mapApi",(function(t){St.setCookie("api",t)})),this.onChanged("lang",(function(t){St.setCookie("lang",t),n.reload()})),this.onChanged("units",(function(t){St.setCookie("units",t),n.reload()})),this.onChanged("interval",(function(t){St.setCookie("interval",t)}))}},{key:"setAutoReloadInterval",value:function(){var t=xt()(prompt(ce._("newinterval")));isNaN(t)||t===this.model.interval||(this.model.interval=t)}},{key:"showConfigDialog",value:function(){new je(this).init()}}],[{key:"reload",value:function(){window.location.reload()}}]),n}(ve);function De(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var Ne,ze=function(t){R()(n,t);var e=De(n);function n(t){var r;return l()(this,n),(r=e.call(this,{onMenuToggle:null,onShowUserMenu:null})).state=t,r.model.onMenuToggle=function(){return r.toggleSideMenu()},r.model.onShowUserMenu=function(){return r.toggleUserMenu()},r.hideUserMenuCallback=function(t){return r.hideUserMenu(t)},r.menuEl=document.querySelector("#menu"),r.userMenuEl=document.querySelector("#user-menu"),r}return h()(n,[{key:"init",value:function(){return this.bindAll(),this}},{key:"toggleSideMenu",value:function(){this.menuEl.classList.contains("menu-hidden")?this.menuEl.classList.remove("menu-hidden"):this.menuEl.classList.add("menu-hidden")}},{key:"toggleUserMenu",value:function(){this.userMenuEl.classList.contains("menu-hidden")?(this.userMenuEl.classList.remove("menu-hidden"),window.addEventListener("click",this.hideUserMenuCallback,!0)):this.userMenuEl.classList.add("menu-hidden")}},{key:"hideUserMenu",value:function(t){var e=t.target;this.userMenuEl.classList.add("menu-hidden"),window.removeEventListener("click",this.hideUserMenuCallback,!0),"user-menu"!==e.parentElement.id&&t.stopPropagation()}}]),n}(ve),Re=function(){function t(e){l()(this,t),this.map=null,this.viewModel=e,this.polies=[],this.markers=[],this.popup=null,this.timeoutHandle=0}return h()(t,[{key:"init",value:function(){var e=this,n="?".concat(ue.googleKey?"key=".concat(ue.googleKey,"&"):"","callback=gm_loaded");return a.a.all([t.onScriptLoaded(),St.loadScript("https://maps.googleapis.com/maps/api/js".concat(n),"mapapi_gmaps",t.loadTimeoutMs)]).then((function(){return e.initMap()}))}},{key:"initMap",value:function(){var t=this,e={center:new google.maps.LatLng(ue.initLatitude,ue.initLongitude),zoom:8,mapTypeId:google.maps.MapTypeId.TERRAIN,scaleControl:!0,controlSize:30};this.map=new google.maps.Map(this.viewModel.mapElement,e),this.popup=new google.maps.InfoWindow,this.popup.addListener("closeclick",(function(){t.popupClose()}))}},{key:"cleanup",value:function(){this.polies.length=0,this.markers.length=0,this.popup=null,kt()(this)&&kt()(this).getDiv()&&(kt()(this).getDiv().innerHTML=""),this.map=null}},{key:"displayTrack",value:function(t,e){var n=this;if(!t||!t.hasPositions)return a.a.resolve();var r,i=new a.a((function(t){google.maps.event.addListenerOnce(kt()(n),"tilesloaded",(function(){t()}))})),o={strokeColor:ue.strokeColor,strokeOpacity:ue.strokeOpacity,strokeWeight:ue.strokeWeight},s=new google.maps.LatLngBounds;if(this.polies.length){r=this.polies[0];for(var c=0;c<this.markers.length;c++)s.extend(this.markers[c].getPosition())}else(r=new google.maps.Polyline(o)).setMap(kt()(this)),this.polies.push(r);var l=r.getPath(),f=this.markers.length;f>0&&this.removePoint(--f);for(var h=f;h<t.length;h++){this.setMarker(h,t);var d=t.positions[h],p=new google.maps.LatLng(d.latitude,d.longitude);t instanceof Tt&&l.push(p),s.extend(p)}if(e&&(kt()(this).fitBounds(s),1===t.length)){var v=google.maps.event.addListenerOnce(kt()(this),"bounds_changed",(function(){this.getZoom()&&this.setZoom(15)}));u()((function(){google.maps.event.removeListener(v)}),2e3)}return i}},{key:"clearMap",value:function(){if(this.polies)for(var t=0;t<this.polies.length;t++)this.polies[t].setMap(null);if(this.markers)for(var e=0;e<this.markers.length;e++)this.markers[e].setMap(null);this.popup.getMap()&&this.popupClose(),this.popup.setContent(""),this.markers.length=0,this.polies.length=0}},{key:"setMarker",value:function(e,n){var r,i=this,o=n.positions[e],a=new google.maps.Marker({position:new google.maps.LatLng(o.latitude,o.longitude),title:new Date(1e3*o.timestamp).toLocaleString(),map:kt()(this)}),s=o.hasComment()||o.hasImage();r=n.isLastPosition(e)?t.getMarkerIcon(ue.colorStop,!0,s):n.isFirstPosition(e)?t.getMarkerIcon(ue.colorStart,!0,s):t.getMarkerIcon(s?ue.colorExtra:ue.colorNormal,!1,s),a.setIcon(r),a.addListener("click",(function(){i.popupOpen(e,a)})),a.addListener("mouseover",(function(){i.viewModel.model.markerOver=e})),a.addListener("mouseout",(function(){i.viewModel.model.markerOver=null})),this.markers.push(a)}},{key:"removePoint",value:function(t){var e;this.markers.length>t&&(this.markers[t].setMap(null),Gt()(e=this.markers).call(e,t,1),this.polies.length&&this.polies[0].getPath().removeAt(t),this.viewModel.model.markerSelect===t&&this.popupClose())}},{key:"popupOpen",value:function(t,e){this.popup.setContent(this.viewModel.getPopupElement(t)),this.popup.open(kt()(this),e),this.viewModel.model.markerSelect=t}},{key:"popupClose",value:function(){this.viewModel.model.markerSelect=null,this.popup.close()}},{key:"animateMarker",value:function(e){var n=this;this.popup.getMap()&&(this.popupClose(),clearTimeout(this.timeoutHandle));var r=this.markers[e].getIcon();this.markers[e].setIcon(t.getMarkerIcon(ue.colorHilite,!1,!1)),this.markers[e].setAnimation(google.maps.Animation.BOUNCE),this.timeoutHandle=u()((function(){n.markers[e].setIcon(r),n.markers[e].setAnimation(null)}),2e3)}},{key:"getBounds",value:function(){var t=kt()(this).getBounds(),e=t.getSouthWest().lat(),n=t.getSouthWest().lng(),r=t.getNorthEast().lat();return[n,e,t.getNorthEast().lng(),r]}},{key:"zoomToExtent",value:function(){for(var t=new google.maps.LatLngBounds,e=0;e<this.markers.length;e++)t.extend(this.markers[e].getPosition());kt()(this).fitBounds(t)}},{key:"zoomToBounds",value:function(t){var e=new google.maps.LatLng(t[1],t[0]),n=new google.maps.LatLng(t[3],t[2]),r=new google.maps.LatLngBounds(e,n);kt()(this).fitBounds(r)}},{key:"updateSize",value:function(){}}],[{key:"onScriptLoaded",value:function(){var e=St.timeoutPromise(t.loadTimeoutMs),n=new a.a((function(e,n){window.gm_loaded=function(){t.gmInitialized=!0,e()},window.gm_authFailure=function(){t.authError=!0;var e=ce._("apifailure","Google Maps");e+="<br><br>"+ce._("gmauthfailure"),e+="<br><br>"+ce._("gmapilink"),t.gmInitialized&&Ae.error(e),n(new Error(e))},t.authError&&window.gm_authFailure(),t.gmInitialized&&window.gm_loaded()}));return a.a.race([n,e])}},{key:"getMarkerIcon",value:function(t,e,n){return{anchor:new google.maps.Point(15,35),url:Xe.getSvgSrc(t,e,n)}}},{key:"loadTimeoutMs",get:function(){return 1e4}}]),t}();function Ve(t){if(void 0===g.a||null==m()(t)){if(O()(t)||(t=function(t,e){var n;if(!t)return;if("string"==typeof t)return Be(t,e);var r=k()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return x()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Be(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=p()(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function Be(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}Re.authError=!1,Re.gmInitialized=!1;var Fe=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;l()(this,t),this.map=null,this.viewModel=e,this.layerTrack=null,this.layerMarkers=null,this.selectedLayer=null,this.markerStyles=null,this.popup=null,n&&(Ne=n)}return h()(t,[{key:"init",value:function(){var t=this;return St.addCss("css/dist/ol.css","ol_css"),(Ne?a.a.resolve():n.e(1).then(n.bind(null,396)).then((function(t){Ne=t}))).then((function(){t.initMap(),t.initLayers(),t.initStyles(),t.initPopups()}))}},{key:"initMap",value:function(){var t=this,e=[new Ne.control.Zoom,new Ne.control.Rotate,new Ne.control.ScaleLine],n=new Ne.View({center:Ne.proj.fromLonLat([ue.initLongitude,ue.initLatitude]),zoom:8});this.map=new Ne.Map({target:this.viewModel.mapElement,controls:e,view:n}),kt()(this).on("pointermove",(function(e){var n=kt()(t).forEachFeatureAtPixel(e.pixel,(function(t,e){return"Markers"===e.get("name")?t:null}));if(n){kt()(t).getTargetElement().style.cursor="pointer";var r=n.getId();r!==t.viewModel.model.markerOver&&(t.viewModel.model.markerOver=r)}else kt()(t).getTargetElement().style.cursor="",t.viewModel.model.markerOver=null}))}},{key:"initLayers",value:function(){var t=new Ne.layer.TileLayer({name:"OpenStreetMap",visible:!0,source:new Ne.source.OSM});kt()(this).addLayer(t),this.selectedLayer=t;var e,n=Ve(ue.olLayers);try{for(n.s();!(e=n.n()).done;){var r=e.value,i=new Ne.layer.TileLayer({name:r.name,visible:!1,source:new Ne.source.XYZ({url:r.url})});kt()(this).addLayer(i),r.priority&&(this.selectedLayer.setVisible(!1),this.selectedLayer=i,this.selectedLayer.setVisible(!0))}}catch(t){n.e(t)}finally{n.f()}var o=new Ne.style.Style({stroke:new Ne.style.Stroke({color:St.hexToRGBA(ue.strokeColor,ue.strokeOpacity),width:ue.strokeWeight})});this.layerTrack=new Ne.layer.VectorLayer({name:"Track",type:"data",source:new Ne.source.Vector,style:o}),this.layerMarkers=new Ne.layer.VectorLayer({name:"Markers",type:"data",source:new Ne.source.Vector}),kt()(this).addLayer(this.layerTrack),kt()(this).addLayer(this.layerMarkers),this.initLayerSwitcher()}},{key:"initStyles",value:function(){var t=[.5,1];this.markerStyles={start:new Ne.style.Style({image:new Ne.style.Icon({anchor:t,src:Xe.getSvgSrc(ue.colorStart,!0)})}),stop:new Ne.style.Style({image:new Ne.style.Icon({anchor:t,src:Xe.getSvgSrc(ue.colorStop,!0)})}),normal:new Ne.style.Style({image:new Ne.style.Icon({anchor:t,opacity:.7,src:Xe.getSvgSrc(ue.colorNormal,!1)})}),extra:new Ne.style.Style({image:new Ne.style.Icon({anchor:t,src:Xe.getSvgSrc(ue.colorExtra,!1,!0)})}),startExtra:new Ne.style.Style({image:new Ne.style.Icon({anchor:t,src:Xe.getSvgSrc(ue.colorStart,!0,!0)})}),stopExtra:new Ne.style.Style({image:new Ne.style.Icon({anchor:t,src:Xe.getSvgSrc(ue.colorStop,!0,!0)})}),hilite:new Ne.style.Style({image:new Ne.style.Icon({anchor:t,src:Xe.getSvgSrc(ue.colorHilite,!1)})})}}},{key:"initPopups",value:function(){var t=this,e=document.createElement("div");e.id="popup-container",e.className="ol-popup";var n=document.createElement("div");n.id="popup-content",e.appendChild(n);var r=document.createElement("a");r.className="ol-popup-closer",e.appendChild(r),this.popup=new Ne.Overlay({element:e,autoPan:!0,autoPanAnimation:{duration:250}}),kt()(this).addOverlay(this.popup),r.onclick=function(){return t.popupClose(),r.blur(),!1},kt()(this).on("click",(function(e){var n=e.coordinate,r=kt()(t).forEachFeatureAtPixel(e.pixel,(function(t,e){return"Markers"===e.get("name")?t:null}));r?t.popupOpen(r.getId(),n):t.popupClose()}))}},{key:"popupOpen",value:function(t,e){this.popup.getElement().firstElementChild.innerHTML="",this.popup.getElement().firstElementChild.appendChild(this.viewModel.getPopupElement(t)),this.popup.setPosition(e),this.viewModel.model.markerSelect=t}},{key:"popupClose",value:function(){this.popup&&(this.popup.setPosition(void 0),this.popup.getElement().firstElementChild.innerHTML=""),this.viewModel.model.markerSelect=null}},{key:"switchLayer",value:function(t){var e,n=this;$()(e=kt()(this).getLayers()).call(e,(function(e){e.get("name")===t&&("data"===e.get("type")?e.getVisible()?e.setVisible(!1):e.setVisible(!0):(n.selectedLayer.setVisible(!1),n.selectedLayer=e,e.setVisible(!0)))}))}},{key:"initLayerSwitcher",value:function(){var t,e=this,n=document.createElement("div");n.id="switcher",n.className="ol-control",document.body.appendChild(n);var r=document.createElement("div");r.id="switcher-content",r.className="ol-layerswitcher",n.appendChild(r);var i=document.createElement("a");i.className="ol-popup-closer",n.appendChild(i),$()(t=kt()(this).getLayers()).call(t,(function(t){var n=document.createElement("label");n.innerHTML=t.get("name"),r.appendChild(n);var i=document.createElement("input");"data"===t.get("type")?(i.type="checkbox",n.className="ol-datalayer"):i.type="radio",i.name="layer",i.value=t.get("name"),i.onclick=function(t){var n=t.target;e.switchLayer(n.value)},t.getVisible()&&(i.checked=!0),n.insertBefore(i,n.childNodes[0])}));var o=document.createElement("button"),a=document.createElement("img");a.src="images/layers.svg",a.style.width="60%",o.appendChild(a);var s=function(){"block"===n.style.display?n.style.display="none":n.style.display="block"};i.addEventListener("click",s,!1),o.addEventListener("click",s,!1),o.addEventListener("touchstart",s,!1);var u=document.createElement("div");u.className="ol-switcher-button ol-unselectable ol-control",u.appendChild(o);var c=new Ne.control.Control({element:u});kt()(this).addControl(c)}},{key:"cleanup",value:function(){this.layerTrack=null,this.layerMarkers=null,this.selectedLayer=null,this.markerStyles=null,St.removeElementById("switcher"),kt()(this)&&kt()(this).getTargetElement()&&(kt()(this).getTargetElement().innerHTML=""),this.map=null}},{key:"displayTrack",value:function(t,e){var n=this;if(!t||!t.hasPositions)return a.a.resolve();var r=new a.a((function(t){kt()(n).once("rendercomplete",(function(){t()}))})),i=this.layerMarkers?this.layerMarkers.getSource().getFeatures().length:0;i>0&&this.removePoint(--i);for(var o=i;o<t.length;o++)this.setMarker(o,t);if(t instanceof Tt){var s;if(this.layerTrack&&this.layerTrack.getSource().getFeatures().length)s=this.layerTrack.getSource().getFeatures()[0].getGeometry();else{s=new Ne.geom.LineString([]);var u=new Ne.Feature({geometry:s});this.layerTrack.getSource().addFeature(u)}for(var c=i;c<t.length;c++){var l=t.positions[c];s.appendCoordinate(Ne.proj.fromLonLat([l.longitude,l.latitude]))}}var f=this.layerMarkers.getSource().getExtent();return e&&(f=this.fitToExtent(f)),this.setZoomToExtent(f),r}},{key:"setZoomToExtent",value:function(e){var n,r=this;$()(n=kt()(this).getControls()).call(n,(function(t){t instanceof Ne.control.ZoomToExtent&&kt()(r).removeControl(t)})),kt()(this).addControl(new Ne.control.ZoomToExtent({extent:e,label:t.getExtentImg()}))}},{key:"fitToExtent",value:function(e){return kt()(this).getView().fit(e,{padding:[40,10,10,10]}),kt()(this).getView().getZoom()>t.ZOOM_MAX&&(kt()(this).getView().setZoom(t.ZOOM_MAX),e=kt()(this).getView().calculateExtent(kt()(this).getSize())),e}},{key:"clearMap",value:function(){this.popupClose(),this.layerTrack&&this.layerTrack.getSource().clear(),this.layerMarkers&&this.layerMarkers.getSource().clear()}},{key:"getMarkerStyle",value:function(t,e){var n=e.positions[t],r=this.markerStyles.normal;return n.hasComment()||n.hasImage()?r=e.isLastPosition(t)?this.markerStyles.stopExtra:e.isFirstPosition(t)?this.markerStyles.startExtra:this.markerStyles.extra:e.isLastPosition(t)?r=this.markerStyles.stop:e.isFirstPosition(t)&&(r=this.markerStyles.start),r}},{key:"setMarker",value:function(t,e){var n=e.positions[t],r=new Ne.Feature({geometry:new Ne.geom.Point(Ne.proj.fromLonLat([n.longitude,n.latitude]))}),i=this.getMarkerStyle(t,e);r.setStyle(i),r.setId(t),this.layerMarkers.getSource().addFeature(r)}},{key:"removePoint",value:function(t){var e=this.layerMarkers.getSource().getFeatureById(t);if(e){if(this.layerMarkers.getSource().removeFeature(e),this.layerTrack){var n=this.layerTrack.getSource().getFeatures()[0].getGeometry(),r=n.getCoordinates();Gt()(r).call(r,t,1),n.setCoordinates(r)}this.viewModel.model.markerSelect===t&&this.popupClose()}}},{key:"animateMarker",value:function(t){var e=this.layerMarkers.getSource().getFeatureById(t),n=e.getStyle();e.setStyle(this.markerStyles.hilite),u()((function(){return e.setStyle(n)}),2e3)}},{key:"getBounds",value:function(){var t=kt()(this).getView().calculateExtent(kt()(this).getSize()),e=Ne.proj.toLonLat([t[0],t[1]]),n=Ne.proj.toLonLat([t[2],t[3]]);return[e[0],e[1],n[0],n[1]]}},{key:"zoomToExtent",value:function(){kt()(this).getView().fit(this.layerMarkers.getSource().getExtent())}},{key:"zoomToBounds",value:function(t){var e=Ne.proj.fromLonLat([t[0],t[1]]),n=Ne.proj.fromLonLat([t[2],t[3]]);kt()(this).getView().fit([e[0],e[1],n[0],n[1]])}},{key:"updateSize",value:function(){kt()(this).updateSize()}}],[{key:"getExtentImg",value:function(){var t=document.createElement("img");return t.src="images/extent.svg",t.style.width="60%",t}}]),t}();function He(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}Fe.ZOOM_MAX=20;var qe=function(t){R()(n,t);var e=He(n);function n(t,r){var i;return l()(this,n),(i=e.call(this,{onPositionDelete:null,onPositionUpdate:null,onCancel:null,comment:""})).state=t,i.positionIndex=r,i.position=i.state.currentTrack.positions[r],i.model.onPositionDelete=function(){return i.onPositionDelete()},i.model.onPositionUpdate=function(){return i.onPositionUpdate()},i.model.onCancel=function(){return i.onCancel()},i}return h()(n,[{key:"init",value:function(){var t=this.getHtml();this.dialog=new _e(t),this.dialog.show(),this.bindAll(this.dialog.element)}},{key:"getHtml",value:function(){var t,e,n,r,o,a;return i()(t=i()(e=i()(n=i()(r=i()(o=i()(a='<div class="red-button button-resolve"><b><a data-bind="onPositionDelete">'.concat(ce._("delposition"),"</a></b></div>\n <div>")).call(a,ce._("editingposition",this.positionIndex+1,"<b>".concat(St.htmlEncode(this.position.trackname),"</b>")),'</div>\n <div style="clear: both; padding-bottom: 1em;"></div>\n <form id="positionForm">\n <label><b>')).call(o,ce._("comment"),'</b></label><br>\n <textarea style="width:100%;" maxlength="255" rows="5" placeholder="')).call(r,ce._("comment"),'" name="comment" data-bind="comment">')).call(n,this.position.hasComment()?St.htmlEncode(this.position.comment):"",'</textarea>\n <div class="buttons">\n <button class="button-reject" data-bind="onCancel" type="button">')).call(e,ce._("cancel"),'</button>\n <button class="button-resolve" data-bind="onPositionUpdate" type="submit">')).call(t,ce._("submit"),"</button>\n </div>\n </form>")}},{key:"onPositionDelete",value:function(){var t=this;_e.isConfirmed(ce._("positiondelwarn",this.positionIndex+1,St.htmlEncode(this.position.trackname)))&&this.position.delete().then((function(){var e,n=t.state.currentTrack;t.state.currentTrack=null,Gt()(e=n.positions).call(e,t.positionIndex,1),n.recalculatePositions(),t.state.currentTrack=n,t.dialog.destroy()})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)}))}},{key:"onPositionUpdate",value:function(){var t=this;this.validate()&&(this.position.comment=this.model.comment,this.position.save().then((function(){ut.forceUpdate(t.state,"currentTrack"),t.dialog.destroy()})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)})))}},{key:"onCancel",value:function(){this.dialog.destroy()}},{key:"validate",value:function(){return this.model.comment!==this.position.comment}}]),n}(ve);function Ge(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var Xe=function(t){R()(n,t);var e=Ge(n);function n(t){var r;return l()(this,n),(r=e.call(this,{markerOver:null,markerSelect:null,onMenuToggle:null})).model.onMenuToggle=function(){return r.onMapResize()},r.state=t,r.mapElement=document.querySelector("#map-canvas"),r.savedBounds=null,r.api=null,r}return h()(n,[{key:"init",value:function(){return this.bindAll(),this.setObservers(),this}},{key:"loadMapAPI",value:function(t){var e=this,n=this.api;if(this.api=null,n){try{this.savedBounds=n.getBounds()}catch(t){this.savedBounds=null}n.cleanup()}(n=this.getApi(t)).init().then((function(){e.api=n,e.onReady()})).catch((function(e){var n=ce._("apifailure",t);e&&e.message&&(n+=" (".concat(e.message,")")),Ae.error(n,e),ue.mapApi="gmaps"===t?"openlayers":"gmaps"}))}},{key:"getApi",value:function(t){return"gmaps"===t?new Re(this):new Fe(this)}},{key:"onReady",value:function(){this.savedBounds&&this.api.zoomToBounds(this.savedBounds),this.state.currentTrack&&this.displayTrack(this.state.currentTrack,null===this.savedBounds)}},{key:"setObservers",value:function(){var t=this;ue.onChanged("mapApi",(function(e){t.loadMapAPI(e)})),this.state.onChanged("currentTrack",(function(e){t.api&&(t.api.clearMap(),e&&(ut.observe(e,"positions",(function(){t.displayTrack(e,!1),t.api.zoomToExtent()})),t.displayTrack(e,!0)))}))}},{key:"displayTrack",value:function(t,e){var n=this;this.state.jobStart(),this.api.displayTrack(t,e).finally((function(){return n.state.jobStop()}))}},{key:"getPopupElement",value:function(t){var e,n,r,o,a,s,u,c,l,f,h,d,p,v,m,y,g,b,x,w,k,S,E,L,A,M,O,_,P,C,T,j,I,U=this,D=this.state.currentTrack.positions[t],N=this.state.currentTrack.length,z=this.state.currentTrack.user,R=le.user&&(le.isAdmin||le.user===z),V="–––",B="–––";if(D.timestamp>0){var F,H=St.getTimeString(new Date(1e3*D.timestamp));V=H.date,B=i()(F="".concat(H.time,'<span class="smaller">')).call(F,H.zone,"</span>")}var q,G="";if("gps"===D.provider)G=i()(q=' <img class="icon" alt="'.concat(ce._("gps"),'" title="')).call(q,ce._("gps"),'" src="images/gps_dark.svg">');else if("network"===D.provider){var X;G=i()(X=' <img class="icon" alt="'.concat(ce._("network"),'" title="')).call(X,ce._("network"),'" src="images/network_dark.svg">')}var Y="";R&&(Y='<a id="editposition" class="menu-link" data-bind="onUserAdd">'.concat(ce._("editposition"),"</a>"));var J,W,Z,$,Q,K,tt,et,nt,rt="";this.state.showLatest||(rt=i()(J=i()(W=i()(Z=i()($=i()(Q=i()(K=i()(tt=i()(et=i()(nt='<div id="pright">\n <img class="icon" alt="'.concat(ce._("track"),'" src="images/stats_blue.svg" style="margin-left: 3em;"><br>\n <img class="icon" alt="')).call(nt,ce._("ttime"),'" title="')).call(et,ce._("ttime"),'" src="images/time_blue.svg"> ')).call(tt,ce.getLocaleDuration(D.totalSeconds),'<br>\n <img class="icon" alt="')).call(K,ce._("aspeed"),'" title="')).call(Q,ce._("aspeed"),'" src="images/speed_blue.svg"> ')).call($,ce.getLocaleSpeed(D.totalSpeed,!0),'<br>\n <img class="icon" alt="')).call(Z,ce._("tdistance"),'" title="')).call(W,ce._("tdistance"),'" src="images/distance_blue.svg"> ')).call(J,ce.getLocaleDistanceMajor(D.totalMeters,!0),"<br>\n </div>"));var it=i()(e=i()(n=i()(r=i()(o=i()(a=i()(s=i()(u=i()(c=i()(l=i()(f=i()(h=i()(d=i()(p=i()(v=i()(m=i()(y=i()(g=i()(b=i()(x=i()(w=i()(k=i()(S=i()(E='<div id="pheader">\n <div><img alt="'.concat(ce._("user"),'" title="')).call(E,ce._("user"),'" src="images/user_dark.svg"> ')).call(S,St.htmlEncode(D.username),'</div>\n <div><img alt="')).call(k,ce._("track"),'" title="')).call(w,ce._("track"),'" src="images/route_dark.svg"> ')).call(x,St.htmlEncode(D.trackname),'</div>\n </div>\n <div id="pbody">\n ')).call(b,D.hasComment()?'<div id="pcomments">'.concat(St.htmlEncode(D.comment).replace(/\n/,"<br>"),"</div>"):"","\n ")).call(g,D.hasImage()?'<div id="pimage"><img src="uploads/'.concat(D.image,'" alt="image"></div>'):"",'\n <div id="pleft">\n <img class="icon" alt="')).call(y,ce._("time"),'" title="')).call(m,ce._("time"),'" src="images/calendar_dark.svg"> ')).call(v,V,'<br>\n <img class="icon" alt="')).call(p,ce._("time"),'" title="')).call(d,ce._("time"),'" src="images/clock_dark.svg"> ')).call(h,B,"<br>\n ")).call(f,null!==D.speed?i()(L=i()(A='<img class="icon" alt="'.concat(ce._("speed"),'" title="')).call(A,ce._("speed"),'" src="images/speed_dark.svg">')).call(L,ce.getLocaleSpeed(D.speed,!0),"<br>"):"","\n ")).call(l,null!==D.altitude?i()(M=i()(O='<img class="icon" alt="'.concat(ce._("altitude"),'" title="')).call(O,ce._("altitude"),'" src="images/altitude_dark.svg">')).call(M,ce.getLocaleAltitude(D.altitude,!0),"<br>"):"","\n ")).call(c,null!==D.accuracy?i()(_=i()(P=i()(C='<img class="icon" alt="'.concat(ce._("accuracy"),'" title="')).call(C,ce._("accuracy"),'" src="images/accuracy_dark.svg">')).call(P,ce.getLocaleAccuracy(D.accuracy,!0))).call(_,G,"<br>"):"","\n ")).call(u,null!==D.bearing?i()(T=i()(j=i()(I='<img class="icon" alt="'.concat(ce._("bearing"),'" title="')).call(I,ce._("bearing"),'" src="images/bearing.svg" style="transform: rotate(')).call(j,D.bearing,'deg) scale(1.2);">')).call(T,D.bearing,"°<br>"):"",'\n <img class="icon" alt="')).call(s,ce._("position"),'" title="')).call(a,ce._("position"),'" src="images/position.svg">')).call(o,ce.getLocaleCoordinates(D),"<br>\n </div>")).call(r,rt,'</div>\n <div id="pfooter"><div>')).call(n,ce._("pointof",t+1,N),"</div><div>")).call(e,Y,"</div></div>"),ot=document.createElement("div");(ot.setAttribute("id","popup"),ot.innerHTML=it,D.hasImage())&&(ot.querySelector("#pimage img").onclick=function(){var t=new _e('<img src="uploads/'.concat(D.image,'" alt="image">'));t.element.querySelector("#modal-close").onclick=function(){return t.destroy()},t.element.classList.add("image"),t.show()});R&&(ot.querySelector("#editposition").onclick=function(){new qe(U.state,t).init()});return ot}},{key:"onMapResize",value:function(){this.api&&this.api.updateSize()}}],[{key:"getMarkerPath",value:function(t){return t?"M15,34.911c0,0,0.359-3.922,1.807-8.588c0.414-1.337,1.011-2.587,2.495-4.159c1.152-1.223,3.073-2.393,3.909-4.447c1.681-6.306-3.676-9.258-8.211-9.258c-4.536,0-9.893,2.952-8.211,9.258c0.836,2.055,2.756,3.225,3.91,4.447c1.484,1.572,2.08,2.822,2.495,4.159C14.64,30.989,15,34.911,15,34.911z M18,15.922c0,1.705-1.342,3.087-2.999,3.087c-1.657,0-3-1.382-3-3.087c0-1.704,1.343-3.086,3-3.086C16.658,12.836,18,14.218,18,15.922z":"M14.999,34.911c0,0,0.232-1.275,1.162-4.848c0.268-1.023,0.652-1.98,1.605-3.184c0.742-0.937,1.975-1.832,2.514-3.404c1.082-4.828-2.363-7.088-5.281-7.088c-2.915,0-6.361,2.26-5.278,7.088c0.538,1.572,1.771,2.468,2.514,3.404c0.953,1.203,1.337,2.16,1.604,3.184C14.77,33.635,14.999,34.911,14.999,34.911z"}},{key:"getMarkerExtra",value:function(t){var e,n=t?"M26.074,13.517":"M23.328,20.715",r=t?"M28.232,10.942":"M25.486,18.141";return i()(e='<path fill="none" stroke="red" stroke-width="2" d="'.concat(n,'c0-3.961-3.243-7.167-7.251-7.167"/>\n <path fill="none" stroke="red" stroke-width="2" d="')).call(e,r,'c-0.5-4.028-3.642-7.083-7.724-7.542"/>')}},{key:"getSvgSrc",value:function(t,e,r){var o,a,s=i()(o=i()(a='<svg viewBox="0 0 30 35" width="30px" height="35px" xmlns="http://www.w3.org/2000/svg">\n <g><path stroke="black" fill="'.concat(t,'" d="')).call(a,n.getMarkerPath(e),'"/>')).call(o,r?n.getMarkerExtra(e):"","</g></svg>");return"data:image/svg+xml,".concat(encodeURIComponent(s))}}]),n}(ve),Ye=n(168),Je=n.n(Ye);function We(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var Ze=function(t){R()(n,t);var e=We(n);function n(t){var r;return l()(this,n),(r=e.call(this,{onTrackDelete:null,onTrackUpdate:null,onCancel:null,trackname:""})).track=t.state.currentTrack,r.trackVM=t,r.model.onTrackDelete=function(){return r.onTrackDelete()},r.model.onTrackUpdate=function(){return r.onTrackUpdate()},r.model.onCancel=function(){return r.onCancel()},r}return h()(n,[{key:"init",value:function(){var t=this.getHtml();this.dialog=new _e(t),this.dialog.show(),this.bindAll(this.dialog.element)}},{key:"getHtml",value:function(){var t,e,n,r,o,a;return i()(t=i()(e=i()(n=i()(r=i()(o=i()(a='<div class="red-button button-resolve"><b><a data-bind="onTrackDelete">'.concat(ce._("deltrack"),"</a></b></div>\n <div>")).call(a,ce._("editingtrack","<b>".concat(St.htmlEncode(this.track.name),"</b>")),'</div>\n <div style="clear: both; padding-bottom: 1em;"></div>\n <form id="trackForm">\n <label><b>')).call(o,ce._("trackname"),'</b></label>\n <input type="text" placeholder="')).call(r,ce._("trackname"),'" name="trackname" data-bind="trackname" value="')).call(n,St.htmlEncode(this.track.name),'" required>\n <div class="buttons">\n <button class="button-reject" data-bind="onCancel" type="button">')).call(e,ce._("cancel"),'</button>\n <button class="button-resolve" data-bind="onTrackUpdate" type="submit">')).call(t,ce._("submit"),"</button>\n </div>\n </form>")}},{key:"onTrackDelete",value:function(){var t=this;_e.isConfirmed(ce._("trackdelwarn",St.htmlEncode(this.track.name)))&&this.track.delete().then((function(){t.trackVM.onTrackDeleted(),t.dialog.destroy()})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)}))}},{key:"onTrackUpdate",value:function(){var t=this;this.validate()&&(this.track.setName(this.model.trackname),this.track.saveMeta().then((function(){return t.dialog.destroy()})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)})))}},{key:"onCancel",value:function(){this.dialog.destroy()}},{key:"validate",value:function(){return this.model.trackname!==this.track.name&&(!!this.model.trackname||(Ae.error(ce._("allrequired")),!1))}}]),n}(ve);function $e(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var Qe=function(t){R()(n,t);var e=$e(n);function n(t){var r;l()(this,n),(r=e.call(this,{trackList:[],currentTrackId:"",showLatest:!1,autoReload:!1,inputFile:!1,summary:!1,onReload:null,onExportGpx:null,onExportKml:null,onImportGpx:null,onTrackEdit:null})).setClickHandlers();var i=document.querySelector("#track");return r.importEl=document.querySelector("#input-file"),r.editEl=r.getBoundElement("onTrackEdit"),r.select=new ft(i),r.state=t,r.timerId=0,r}return h()(n,[{key:"init",value:function(){return this.setObservers(),this.bindAll(),this}},{key:"setObservers",value:function(){var t=this;this.onChanged("trackList",(function(e){t.select.setOptions(e)})),this.onChanged("currentTrackId",(function(e){t.onTrackSelect(e)})),this.onChanged("inputFile",(function(e){e&&t.onImport()})),this.onChanged("autoReload",(function(e){t.autoReload(e)})),this.onChanged("showLatest",(function(e){t.state.showLatest=e,t.onReload(!0)})),this.state.onChanged("currentUser",(function(e){e?(t.loadTrackList(),n.setMenuVisible(t.editEl,!0)):(t.model.currentTrackId="",t.model.trackList=[],n.setMenuVisible(t.editEl,!1))})),this.state.onChanged("currentTrack",(function(e){t.renderSummary(),e&&ut.observe(e,"positions",(function(){t.renderSummary()}))})),this.state.onChanged("showAllUsers",(function(e){e&&t.loadAllUsersPosition()})),ue.onChanged("interval",(function(){t.timerId&&(t.stopAutoReload(),t.startAutoReload())}))}},{key:"setClickHandlers",value:function(){var t=this;this.model.onReload=function(){return t.onReload()};var e=function(e){return function(){t.state.currentTrack&&t.state.currentTrack.export(e)}};this.model.onExportGpx=e("gpx"),this.model.onExportKml=e("kml"),this.model.onImportGpx=function(){return t.importEl.click()},this.model.onTrackEdit=function(){return t.showDialog()}}},{key:"onReload",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.state.showLatest?this.state.showAllUsers?this.loadAllUsersPosition():this.state.currentUser&&this.onUserLastPosition():this.state.currentTrack instanceof Tt?this.onTrackUpdate(t):this.state.currentTrack instanceof Ot?this.state.currentTrack=null:this.state.currentUser&&this.loadTrackList()}},{key:"onImport",value:function(){var t=this,e=this.importEl.parentElement,n=e.elements.MAX_FILE_SIZE.value;this.importEl.files&&1===this.importEl.files.length&&this.importEl.files[0].size>n?Ae.error(ce._("isizefailure",n)):le.isAuthenticated?(this.state.jobStart(),Tt.import(e,le.user).then((function(e){e.length&&(e.length>1&&Ae.toast(ce._("imultiple",e.length)),t.model.trackList=i()(e).call(e,t.model.trackList),t.model.currentTrackId=e[0].listValue)})).catch((function(t){var e;return Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)})).finally((function(){t.model.inputFile="",t.state.jobStop()}))):Ae.error(ce._("notauthorized"))}},{key:"onTrackSelect",value:function(t){var e,n=this,r=Y()(e=this.model.trackList).call(e,(function(e){return e.listValue===t}));r?r.isEqualTo(this.state.currentTrack)||(this.state.jobStart(),r.fetchPositions().then((function(){var t;i()(t="currentTrack id: ".concat(r.id,", loaded ")).call(t,r.length," positions"),n.state.currentTrack=r,n.model.showLatest&&(n.model.showLatest=!1)})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)})).finally((function(){return n.state.jobStop()}))):this.state.currentTrack=null}},{key:"onTrackUpdate",value:function(t){t&&this.state.currentTrack.clear(),this.state.currentTrack.fetchPositions().catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)}))}},{key:"onUserLastPosition",value:function(){var t=this;this.state.currentUser.fetchLastPosition().then((function(e){var n;e&&(Y()(n=t.model.trackList).call(n,(function(t){return t.listValue===e.listValue}))||t.model.trackList.unshift(e),t.state.currentTrack=e,t.model.currentTrackId=e.listValue)})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)}))}},{key:"loadAllUsersPosition",value:function(){var t=this;this.state.jobStart(),Ot.fetchLatest().then((function(e){e&&(t.model.trackList=[],t.model.currentTrackId="",t.state.currentTrack=e)})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)})).finally((function(){return t.state.jobStop()}))}},{key:"loadTrackList",value:function(){var t=this;this.state.jobStart(),Tt.fetchList(this.state.currentUser).then((function(e){t.model.trackList=e,e.length?t.state.showLatest?t.onUserLastPosition():t.model.currentTrackId=e[0].listValue:t.model.currentTrackId=""})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)})).finally((function(){return t.state.jobStop()}))}},{key:"showDialog",value:function(){new Ze(this).init()}},{key:"onTrackDeleted",value:function(){var t,e,n=Yt()(t=this.model.trackList).call(t,this.state.currentTrack);(this.state.currentTrack=null,-1!==n)&&(Gt()(e=this.model.trackList).call(e,n,1),this.model.trackList.length?(n>=this.model.trackList.length&&(n=this.model.trackList.length-1),this.model.currentTrackId=this.model.trackList[n].listValue):this.model.currentTrackId="")}},{key:"autoReload",value:function(t){t?this.startAutoReload():this.stopAutoReload()}},{key:"startAutoReload",value:function(){var t=this;this.timerId=Je()((function(){return t.onReload()}),1e3*ue.interval)}},{key:"stopAutoReload",value:function(){clearInterval(this.timerId),this.timerId=0}},{key:"renderSummary",value:function(){if(this.state.currentTrack&&this.state.currentTrack.hasPositions){var t=this.state.currentTrack.positions[this.state.currentTrack.length-1];if(this.state.showLatest){var e,n,r,o=new Date,a=new Date(1e3*t.timestamp),s=St.getTimeString(a),u=a.toDateString()!==o.toDateString()?"".concat(s.date,"<br>"):"",c=i()(e="".concat(s.time,'<span style="font-weight:normal">')).call(e,s.zone,"</span>");this.model.summary=i()(n=i()(r='\n <div class="menu-title">'.concat(ce._("latest"),":</div>\n ")).call(r,u,"\n ")).call(n,c)}else{var l,f,h,d,p,v;this.model.summary=i()(l=i()(f=i()(h=i()(d=i()(p=i()(v='\n <div class="menu-title">'.concat(ce._("summary"),'</div>\n <div><img class="icon" alt="')).call(v,ce._("tdistance"),'" title="')).call(p,ce._("tdistance"),'" src="images/distance.svg"> ')).call(d,ce.getLocaleDistanceMajor(t.totalMeters,!0),'</div>\n <div><img class="icon" alt="')).call(h,ce._("ttime"),'" title="')).call(f,ce._("ttime"),'" src="images/time.svg"> ')).call(l,ce.getLocaleDuration(t.totalSeconds),"</div>")}}else this.model.summary=""}}],[{key:"setMenuVisible",value:function(t,e){t&&(e?t.classList.remove("menu-hidden"):t.classList.add("menu-hidden"))}}]),n}(ve),Ke=n(169),tn=n.n(Ke);function en(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var nn=function(t){R()(n,t);var e=en(n);function n(t,r){var i;return l()(this,n),(i=e.call(this,{onUserDelete:null,onUserUpdate:null,onPassChange:null,onUserAdd:null,onCancel:null,passVisibility:!1,login:null,password:null,password2:null,oldPassword:null,admin:!1})).user=t.state.currentUser,i.type=r,i.userVM=t,i.model.onUserDelete=function(){return i.onUserDelete()},i.model.onUserUpdate=function(){return i.onUserUpdate()},i.model.onPassChange=function(){return i.onPassChange()},i.model.onUserAdd=function(){return i.onUserAdd()},i.model.onCancel=function(){return i.onCancel()},i}return h()(n,[{key:"init",value:function(){var t=this.getHtml();this.dialog=new _e(t),this.dialog.show(),this.bindAll(this.dialog.element);var e=this.getBoundElement("passInput");e&&this.onChanged("passVisibility",(function(){"none"===e.style.display?e.style.display="block":e.style.display="none"}))}},{key:"onUserDelete",value:function(){var t=this;_e.isConfirmed(ce._("userdelwarn",St.htmlEncode(this.user.login)))&&this.user.delete().then((function(){t.userVM.onUserDeleted(),t.dialog.destroy()})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)}))}},{key:"onUserUpdate",value:function(){var t=this;if(this.validate()){var e=this.model.passVisibility?this.model.password:null;this.user.modify(this.model.admin,e).then((function(){return t.dialog.destroy()})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)}))}}},{key:"onPassChange",value:function(){var t=this;this.model.passVisibility=!0,this.validate()&&le.user.setPassword(this.model.password,this.model.oldPassword).then((function(){return t.dialog.destroy()})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)}))}},{key:"onUserAdd",value:function(){var t=this;this.model.passVisibility=!0,this.validate()&&Dt.add(this.model.login,this.model.password,this.model.admin).then((function(e){t.userVM.onUserAdded(e),t.dialog.destroy()})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)}))}},{key:"onCancel",value:function(){this.dialog.destroy()}},{key:"validate",value:function(){if("add"===this.type){if(!this.model.login)return Ae.error(ce._("allrequired")),!1}else if("pass"===this.type&&!this.model.oldPassword)return Ae.error(ce._("allrequired")),!1;if(this.model.passVisibility){if(!this.model.password||!this.model.password2)return Ae.error(ce._("allrequired")),!1;if(this.model.password!==this.model.password2)return Ae.error(ce._("passnotmatch")),!1;if(!ue.validPassStrength(this.model.password))return Ae.error(ce.getLocalePassRules()),!1}return!0}},{key:"getHtml",value:function(){var t,e,n,r,o,a,s,u,c,l,f,h,d,p,v,m,y,g,b,x,w,k,S,E,L="",A="";switch(this.type){case"add":S="onUserAdd",A=i()(t="<label><b>".concat(ce._("username"),'</b></label>\n <input type="text" placeholder="')).call(t,ce._("usernameenter"),'" name="login" data-bind="login" required>'),E=i()(e=i()(n=i()(r=i()(o="<label><b>".concat(ce._("password"),'</b></label>\n <input type="password" placeholder="')).call(o,ce._("passwordenter"),'" name="password" data-bind="password" required>\n <label><b>')).call(r,ce._("passwordrepeat"),'</b></label>\n <input type="password" placeholder="')).call(n,ce._("passwordenter"),'" name="password2" data-bind="password2" required>\n <label><b>')).call(e,ce._("admin"),'</b></label>\n <input type="checkbox" name="admin" data-bind="admin">');break;case"edit":S="onUserUpdate",L=i()(a='<div class="red-button button-resolve"><b><a data-bind="onUserDelete">'.concat(ce._("deluser"),"</a></b></div>\n <div>")).call(a,ce._("editinguser","<b>".concat(St.htmlEncode(this.user.login),"</b>")),'</div>\n <div style="clear: both; padding-bottom: 1em;"></div>'),E=i()(s=i()(u=i()(c=i()(l=i()(f=i()(h="<label><b>".concat(ce._("changepass"),'</b></label>\n <input type="checkbox" name="changepass" data-bind="passVisibility"><br>\n <div style="display: none;" data-bind="passInput">\n <label><b>')).call(h,ce._("password"),'</b></label>\n <input type="password" placeholder="')).call(f,ce._("passwordenter"),'" name="password" data-bind="password" required>\n <label><b>')).call(l,ce._("passwordrepeat"),'</b></label>\n <input type="password" placeholder="')).call(c,ce._("passwordenter"),'" name="password2" data-bind="password2" required>\n </div>\n <label><b>')).call(u,ce._("admin"),'</b></label>\n <input type="checkbox" name="admin" data-bind="admin" ')).call(s,this.user.isAdmin?"checked":"",">");break;case"pass":S="onPassChange",E=i()(d=i()(p=i()(v=i()(m=i()(y="<label><b>".concat(ce._("oldpassword"),'</b></label>\n <input type="password" placeholder="')).call(y,ce._("passwordenter"),'" name="old-password" data-bind="oldPassword" required>\n <label><b>')).call(m,ce._("newpassword"),'</b></label>\n <input type="password" placeholder="')).call(v,ce._("passwordenter"),'" name="password" data-bind="password" required>\n <label><b>')).call(p,ce._("newpasswordrepeat"),'</b></label>\n <input type="password" placeholder="')).call(d,ce._("passwordenter"),'" name="password2" data-bind="password2" required>');break;default:throw new Error("Unknown dialog type: ".concat(this.type))}return i()(g=i()(b=i()(x=i()(w=i()(k="".concat(L,'\n <form id="userForm">\n ')).call(k,A,"\n ")).call(w,E,'\n <div class="buttons">\n <button class="button-reject" type="button" data-bind="onCancel">')).call(x,ce._("cancel"),'</button>\n <button class="button-resolve" type="submit" data-bind="')).call(b,S,'">')).call(g,ce._("submit"),"</button>\n </div>\n </form>")}}]),n}(ve);function rn(t){var e=function(){if("undefined"==typeof Reflect||!U.a)return!1;if(U.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(U()(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=H()(t);if(e){var i=H()(this).constructor;n=U()(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var on=function(t){R()(n,t);var e=rn(n);function n(t){var r;l()(this,n),(r=e.call(this,{userList:[],currentUserId:"0",onUserEdit:null,onUserAdd:null,onPasswordChange:null})).setClickHandlers();var i=document.querySelector("#user");return r.editEl=r.getBoundElement("onUserEdit"),r.select=new ft(i,ce._("suser"),"- ".concat(ce._("allusers")," -")),r.state=t,r}return h()(n,[{key:"setClickHandlers",value:function(){var t=this;this.model.onUserEdit=function(){return t.showDialog("edit")},this.model.onUserAdd=function(){return t.showDialog("add")},this.model.onPasswordChange=function(){return t.showDialog("pass")}}},{key:"init",value:function(){var t=this;return this.setObservers(this.state),this.bindAll(),Dt.fetchList().then((function(e){if(t.model.userList=e,e.length){var n=e[0].listValue;if(le.isAuthenticated){var r,i=Y()(r=t.model.userList).call(r,(function(t){return t.listValue===le.user.listValue}));i&&(n=i.listValue)}t.model.currentUserId=n}})).catch((function(t){var e;Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t.message),t)})),this}},{key:"setObservers",value:function(t){var e=this;this.onChanged("userList",(function(t){e.select.setOptions(t)})),this.onChanged("currentUserId",(function(t){var r;e.state.showAllUsers=t===ft.allValue,e.state.currentUser=Y()(r=e.model.userList).call(r,(function(e){return e.listValue===t}))||null,n.setMenuVisible(e.editEl,null!==e.state.currentUser&&!e.state.currentUser.isEqualTo(le.user))})),t.onChanged("showLatest",(function(t){t?e.select.showAllOption():e.select.hideAllOption()}))}},{key:"showDialog",value:function(t){new nn(this,t).init()}},{key:"onUserAdded",value:function(t){var e;this.model.userList.push(t),tn()(e=this.model.userList).call(e,(function(t,e){return t.login>e.login?1:-1}))}},{key:"onUserDeleted",value:function(){var t,e,n=Yt()(t=this.model.userList).call(t,this.state.currentUser);(this.state.currentUser=null,-1!==n)&&(Gt()(e=this.model.userList).call(e,n,1),this.model.userList.length?(n>=this.model.userList.length&&(n=this.model.userList.length-1),this.model.currentUserId=this.model.userList[n].listValue):this.model.currentUserId="0")}}],[{key:"setMenuVisible",value:function(t,e){t&&(e?t.classList.remove("menu-hidden"):t.classList.add("menu-hidden"))}}]),n}(ve),an=function(){function t(e){l()(this,t),this.spinner=null,this.state=e}return h()(t,[{key:"init",value:function(){var t=this;this.state.onChanged("activeJobs",(function(e){e>0?t.spinner||(t.spinner=Ae.spinner()):t.spinner&&(t.spinner.destroy(),t.spinner=null)}))}}]),t}(),sn=function(){function t(){l()(this,t),this.currentTrack=null,this.currentUser=null,this.showLatest=!1,this.showAllUsers=!1,this.activeJobs=0}return h()(t,[{key:"jobStart",value:function(){this.activeJobs++}},{key:"jobStop",value:function(){this.activeJobs--}},{key:"onChanged",value:function(t,e){ut.observe(this,t,e)}}]),t}(),un=ae.waitForDom(),cn=se.initialize();a.a.all([un,cn]).then((function(){var t,e,n,r,i,o,a,s;t=new sn,e=new an(t),n=new ze(t),r=new on(t),i=new Qe(t),o=new Xe(t),a=new be(t),s=new Ue(t),e.init(),n.init(),r.init(),i.init(),o.init().loadMapAPI(ue.mapApi),a.init(),s.init(),o.onChanged("markerOver",(function(t){null!==t?a.onPointOver(t):a.onPointOut()})),o.onChanged("markerSelect",(function(t){null!==t?a.onPointSelect(t):a.onPointUnselect()})),a.onChanged("pointSelected",(function(t){null!==t&&o.api.animateMarker(t)}))})).catch((function(t){var e;return Ae.error(i()(e="".concat(ce._("actionfailure"),"\n")).call(e,t))}))}]);
|
||
//# sourceMappingURL=bundle.js.map
|