ulogger-server/js/dist/bundle.js
Bartek Fabiszewski 03d21fe2d6 Update dist bundle
2021-08-31 21:14:01 +02:00

2 lines
239 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(){var t,e,n={6012:function(t,e,n){t.exports=n(3241)},7245:function(t,e,n){t.exports=n(7605)},6824:function(t,e,n){t.exports=n(8687)},1467:function(t,e,n){t.exports=n(6127)},2717:function(t,e,n){t.exports=n(1830)},5877:function(t,e,n){t.exports=n(6845)},1060:function(t,e,n){t.exports=n(9886)},509:function(t,e,n){t.exports=n(2939)},7526:function(t,e,n){t.exports=n(4205)},6235:function(t,e,n){t.exports=n(7772)},222:function(t,e,n){t.exports=n(4396)},589:function(t,e,n){t.exports=n(4242)},1624:function(t,e,n){t.exports=n(6841)},9989:function(t,e,n){t.exports=n(9990)},9733:function(t,e,n){t.exports=n(8430)},8409:function(t,e,n){t.exports=n(4682)},543:function(t,e,n){t.exports=n(5227)},6544:function(t,e,n){t.exports=n(2556)},6130:function(t,e,n){t.exports=n(1209)},6330:function(t,e,n){t.exports=n(1483)},6950:function(t,e,n){t.exports=n(2162)},2554:function(t,e,n){t.exports=n(1665)},457:function(t,e,n){t.exports=n(8173)},7112:function(t,e,n){t.exports=n(263)},4061:function(t,e,n){t.exports=n(6017)},8889:function(t,e,n){t.exports=n(8945)},6142:function(t,e,n){t.exports=n(830)},9533:function(t,e,n){t.exports=n(8993)},7828:function(t,e,n){t.exports=n(688)},8975:function(t,e,n){t.exports=n(1422)},8680:function(t,e,n){t.exports=n(9259)},5726:function(t,e,n){t.exports=n(8327)},3668:function(t,e,n){t.exports=n(6438)},61:function(t,e,n){t.exports=n(5365)},6460:function(t,e,n){t.exports=n(4338)},1685:function(t,e,n){t.exports=n(2538)},215:function(t,e,n){t.exports=n(499)},2829:function(t,e,n){t.exports=n(488)},7448:function(t,e,n){t.exports=n(6760)},5826:function(t,e,n){var r,i,o;o=this,r=[n(274)],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,l=t.normalizePadding(n.options.chartPadding);if(e.axisX.axisTitle&&n.axisX&&(o=n.axisX.axisLength/2+n.options.axisY.offset+l.left,a=l.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+l.top,"start"===n.options.axisX.position&&(a+=n.options.axisX.offset),"end"===n.options.axisY.position&&(o=n.axisX.axisLength);var u="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:u,"text-anchor":e.axisY.textAnchor}),n.svg.append(s,!0)}}))}}}(t),t.plugins.ctAxisTitle}(t)}.apply(e,r))||(t.exports=i)},274:function(t,e,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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"},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){function i(t){if(e.safeHasProperty(t,"value"))return i(t.value);if(e.safeHasProperty(t,"data"))return i(t.data);if(t instanceof Array)return t.map(i);if(!e.isDataHoleValue(t)){if(r){var n={};return"string"==typeof r?n[r]=e.getNumberOrUndefined(t):n.y=e.getNumberOrUndefined(t),n.x=t.hasOwnProperty("x")?e.getNumberOrUndefined(t.x):n.x,n.y=t.hasOwnProperty("y")?e.getNumberOrUndefined(t.y):n.y,n}return e.getNumberOrUndefined(t)}}return t.series.map(i)},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;function s(t){if(void 0!==t)if(t instanceof Array)for(var e=0;e<t.length;e++)s(t[e]);else{var n=r?+t[r]:+t;o&&n>i.high&&(i.high=n),a&&n<i.low&&(i.low=n)}}return(o||a)&&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,l=0,u={high:n.high,low:n.low};u.valueRange=u.high-u.low,u.oom=e.orderOfMagnitude(u.valueRange),u.step=Math.pow(10,u.oom),u.min=Math.floor(u.low/u.step)*u.step,u.max=Math.ceil(u.high/u.step)*u.step,u.range=u.max-u.min,u.numberOfSteps=Math.round(u.range/u.step);var c=e.projectLength(t,u.step,u)<r,f=i?e.rho(u.range):0;if(i&&e.projectLength(t,1,u)>=r)u.step=1;else if(i&&f<u.step&&e.projectLength(t,f,u)>=r)u.step=f;else for(;;){if(c&&e.projectLength(t,u.step,u)<=r)u.step*=2;else{if(c||!(e.projectLength(t,u.step/2,u)>=r))break;if(u.step/=2,i&&u.step%1!=0){u.step*=2;break}}if(l++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}var h=2221e-19;function d(t,e){return t===(t+=e)&&(t*=1+(e>0?h:-h)),t}for(u.step=Math.max(u.step,h),a=u.min,s=u.max;a+u.step<=u.low;)a=d(a,u.step);for(;s-u.step>=u.high;)s=d(s,-u.step);u.min=a,u.max=s,u.range=u.max-u.min;var p=[];for(o=u.min;o<=u.max;o=d(o,u.step)){var v=e.roundWithPrecision(o);v!==p[p.length-1]&&p.push(v)}return u.values=p,u},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,l=t.height()||e.quantity(n.height).value||0,u=e.normalizePadding(n.chartPadding,r);s=Math.max(s,o+u.left+u.right),l=Math.max(l,a+u.top+u.bottom);var c={padding:u,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return i?("start"===n.axisX.position?(c.y2=u.top+a,c.y1=Math.max(l-u.bottom,c.y2+1)):(c.y2=u.top,c.y1=Math.max(l-u.bottom-a,c.y2+1)),"start"===n.axisY.position?(c.x1=u.left+o,c.x2=Math.max(s-u.right,c.x1+1)):(c.x1=u.left,c.x2=Math.max(s-u.right-o,c.x1+1))):(c.x1=u.left,c.x2=Math.max(s-u.right,c.x1+1),c.y2=u.top,c.y1=Math.max(l-u.bottom,c.y2+1)),c},e.createGrid=function(t,n,r,i,o,a,s,l){var u={};u[r.units.pos+"1"]=t,u[r.units.pos+"2"]=t,u[r.counterUnits.pos+"1"]=i,u[r.counterUnits.pos+"2"]=i+o;var c=a.elem("line",u,s.join(" "));l.emit("draw",e.extend({type:"grid",axis:r,index:n,group:a,element:c},u))},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,l,u,c,f,h){var d,p={};if(p[a.units.pos]=t+l[a.units.pos],p[a.counterUnits.pos]=l[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=c.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=u.foreignObject(v,e.extend({style:"overflow: visible;"},p))}else d=u.elem("text",p,c.join(" ")).text(o[i]);h.emit("draw",e.extend({type:"label",axis:a,index:i,group:u,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),l=[];function u(t){var l=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:l,currentOptions:o})}function c(){l.forEach((function(t){t.removeListener(u)}))}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 f=n.matchMedia(r[a][0]);f.addListener(u),l.push(f)}return u(),{removeMediaQueryListeners:c,getCurrentOptions:function(){return e.extend({},o)}}},e.splitIntoSegments=function(t,n,r){var i={increasingX:!1,fillHoles:!1};r=e.extend({},i,r);for(var o=[],a=!0,s=0;s<t.length;s+=2)void 0===e.getMultiValue(n[s/2].value)?r.fillHoles||(a=!0):(r.increasingX&&s>=2&&t[s]<=t[s-2]&&(a=!0),a&&(o.push({pathCoordinates:[],valueData:[]}),a=!1),o[o.length-1].pathCoordinates.push(t[s],t[s+1]),o[o.length-1].valueData.push(n[s/2]));return o}}(this||n.g,t),function(t,e){"use strict";e.Interpolation={},e.Interpolation.none=function(t){var n={fillHoles:!1};return t=e.extend({},n,t),function(n,r){for(var i=new e.Svg.Path,o=!0,a=0;a<n.length;a+=2){var s=n[a],l=n[a+1],u=r[a/2];void 0!==e.getMultiValue(u.value)?(o?i.move(s,l,!1,u):i.line(s,l,!1,u),o=!1):t.fillHoles||(o=!0)}return i}},e.Interpolation.simple=function(t){var n={divisor:2,fillHoles:!1};t=e.extend({},n,t);var r=1/Math.max(1,t.divisor);return function(n,i){for(var o,a,s,l=new e.Svg.Path,u=0;u<n.length;u+=2){var c=n[u],f=n[u+1],h=(c-o)*r,d=i[u/2];void 0!==d.value?(void 0===s?l.move(c,f,!1,d):l.curve(o+h,a,c-h,f,c,f,!1,d),o=c,a=f,s=d):t.fillHoles||(o=c=s=void 0)}return l}},e.Interpolation.cardinal=function(t){var n={tension:1,fillHoles:!1};t=e.extend({},n,t);var r=Math.min(1,Math.max(0,t.tension)),i=1-r;return function n(o,a){var s=e.splitIntoSegments(o,a,{fillHoles:t.fillHoles});if(s.length){if(s.length>1){var l=[];return s.forEach((function(t){l.push(n(t.pathCoordinates,t.valueData))})),e.Svg.Path.join(l)}if(o=s[0].pathCoordinates,a=s[0].valueData,o.length<=4)return e.Interpolation.none()(o,a);for(var u,c=(new e.Svg.Path).move(o[0],o[1],!1,a[0]),f=0,h=o.length;h-2*!u>f;f+=2){var d=[{x:+o[f-2],y:+o[f-1]},{x:+o[f],y:+o[f+1]},{x:+o[f+2],y:+o[f+3]},{x:+o[f+4],y:+o[f+5]}];u?f?h-4===f?d[3]={x:+o[0],y:+o[1]}:h-2===f&&(d[2]={x:+o[0],y:+o[1]},d[3]={x:+o[2],y:+o[3]}):d[0]={x:+o[h-2],y:+o[h-1]}:h-4===f?d[3]=d[2]:f||(d[0]={x:+o[f],y:+o[f+1]}),c.curve(r*(-d[0].x+6*d[1].x+d[2].x)/6+i*d[2].x,r*(-d[0].y+6*d[1].y+d[2].y)/6+i*d[2].y,r*(d[1].x+6*d[2].x-d[3].x)/6+i*d[2].x,r*(d[1].y+6*d[2].y-d[3].y)/6+i*d[2].y,d[2].x,d[2].y,!1,a[(f+2)/2])}return c}return e.Interpolation.none()([])}},e.Interpolation.monotoneCubic=function(t){var n={fillHoles:!1};return t=e.extend({},n,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,l,u=[],c=[],f=r.length/2,h=[],d=[],p=[],v=[];for(s=0;s<f;s++)u[s]=r[2*s],c[s]=r[2*s+1];for(s=0;s<f-1;s++)p[s]=c[s+1]-c[s],v[s]=u[s+1]-u[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(l=(new e.Svg.Path).move(u[0],c[0],!1,i[0]),s=0;s<f-1;s++)l.curve(u[s]+v[s]/3,c[s]+h[s]*v[s]/3,u[s+1]-v[s]/3,c[s+1]-h[s+1]*v[s]/3,u[s+1],c[s+1],!1,i[s+1]);return l}return e.Interpolation.none()([])}},e.Interpolation.step=function(t){var n={postpone:!0,fillHoles:!1};return t=e.extend({},n,t),function(n,r){for(var i,o,a,s=new e.Svg.Path,l=0;l<n.length;l+=2){var u=n[l],c=n[l+1],f=r[l/2];void 0!==f.value?(void 0===a?s.move(u,c,!1,f):(t.postpone?s.line(u,o,!1,a):s.line(i,c,!1,f),s.line(u,c,!1,f)),i=u,o=c,a=f):t.fillHoles||(i=o=a=void 0)}return s}}}(this||n.g,t),function(t,e){"use strict";e.EventEmitter=function(){var t=[];function e(e,n){t[e]=t[e]||[],t[e].push(n)}function n(e,n){t[e]&&(n?(t[e].splice(t[e].indexOf(n),1),0===t[e].length&&delete t[e]):delete t[e])}function r(e,n){t[e]&&t[e].forEach((function(t){t(n)})),t["*"]&&t["*"].forEach((function(t){t(e,n)}))}return{addEventHandler:e,removeEventHandler:n,emit:r}}}(this||n.g,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}function r(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}function i(){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}e.Class={extend:r,cloneDefinitions:i}}(this||n.g,t),function(t,e){"use strict";var n=t.window;function r(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}function i(){return this.initializeTimeoutId?n.clearTimeout(this.initializeTimeoutId):(n.removeEventListener("resize",this.resizeListener),this.optionsProvider.removeMediaQueryListeners()),this}function o(t,e){return this.eventEmitter.addEventHandler(t,e),this}function a(t,e){return this.eventEmitter.removeEventHandler(t,e),this}function s(){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}function l(t,n,r,i,o){this.container=e.querySelector(t),this.data=n||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.defaultOptions=r,this.options=i,this.responsiveOptions=o,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(s.bind(this),0)}e.Base=e.Class.extend({constructor:l,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:r,detach:i,on:o,off:a,version:e.version,supportsForeignObject:!1})}(this||n.g,t),function(t,e){"use strict";var n=t.document;function r(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))}function i(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)}function o(t,n,r,i){return new e.Svg(t,n,r,this,i)}function a(){return this._node.parentNode instanceof SVGElement?new e.Svg(this._node.parentNode):null}function s(){for(var t=this._node;"svg"!==t.nodeName;)t=t.parentNode;return new e.Svg(t)}function l(t){var n=this._node.querySelector(t);return n?new e.Svg(n):null}function u(t){var n=this._node.querySelectorAll(t);return n.length?new e.Svg.List(n):null}function c(){return this._node}function f(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}function h(t){return this._node.appendChild(n.createTextNode(t)),this}function d(){for(;this._node.firstChild;)this._node.removeChild(this._node.firstChild);return this}function p(){return this._node.parentNode.removeChild(this._node),this.parent()}function v(t){return this._node.parentNode.replaceChild(t._node,this._node),t}function m(t,e){return e&&this._node.firstChild?this._node.insertBefore(t._node,this._node.firstChild):this._node.appendChild(t._node),this}function y(){return this._node.getAttribute("class")?this._node.getAttribute("class").trim().split(/\s+/):[]}function g(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}function b(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}function x(){return this._node.setAttribute("class",""),this}function w(){return this._node.getBoundingClientRect().height}function k(){return this._node.getBoundingClientRect().width}function S(t,n,r){return void 0===n&&(n=!0),Object.keys(t).forEach(function(i){function o(t,n){var o,a,s,l={};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",l[i]=t.from,this.attr(l),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){l[i]=t.to,this.attr(l),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&&(l[i]=t.to,this.attr(l),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=e.Class.extend({constructor:r,attr:i,elem:o,parent:a,root:s,querySelector:l,querySelectorAll:u,getNode:c,foreignObject:f,text:h,empty:d,remove:p,replace:v,append:m,classes:y,addClass:g,removeClass:b,removeAllClasses:x,height:w,width:k,animate:S}),e.Svg.isSupported=function(t){return n.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#"+t,"1.1")};var E={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]};function A(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}}))}e.Svg.Easing=E,e.Svg.List=e.Class.extend({constructor:A})}(this||n.g,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)}))}))}function a(t,n){this.pathElements=[],this.pos=0,this.close=t,this.options=e.extend({},r,n)}function s(t){return void 0!==t?(this.pos=Math.max(0,Math.min(this.pathElements.length,t)),this):this.pos}function l(t){return this.pathElements.splice(this.pos,t),this}function u(t,e,n,r){return i("M",{x:+t,y:+e},this.pathElements,this.pos++,n,r),this}function c(t,e,n,r){return i("L",{x:+t,y:+e},this.pathElements,this.pos++,n,r),this}function f(t,e,n,r,o,a,s,l){return i("C",{x1:+t,y1:+e,x2:+n,y2:+r,x:+o,y:+a},this.pathElements,this.pos++,s,l),this}function h(t,e,n,r,o,a,s,l,u){return i("A",{rx:+t,ry:+e,xAr:+n,lAf:+r,sf:+o,x:+a,y:+s},this.pathElements,this.pos++,l,u),this}function d(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}function p(){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":"")}function v(t,e){return o(this.pathElements,(function(n,r){n[r]*="x"===r[0]?t:e})),this}function m(t,e){return o(this.pathElements,(function(n,r){n[r]+="x"===r[0]?t:e})),this}function y(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}function g(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}function b(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}function x(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}e.Svg.Path=e.Class.extend({constructor:a,position:s,remove:l,move:u,line:c,curve:f,arc:h,scale:v,translate:m,transform:y,parse:d,stringify:p,clone:g,splitByCommand:b}),e.Svg.Path.elementDescriptions=n,e.Svg.Path.join=x}(this||n.g,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"}};function r(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}function i(t,n,r,i,o){var a=i["axis"+this.units.pos.toUpperCase()],s=this.ticks.map(this.projectValue.bind(this)),l=this.ticks.map(a.labelInterpolationFnc);s.forEach(function(u,c){var f,h={x:0,y:0};f=s[c+1]?s[c+1]-u:Math.max(this.axisLength-u,30),e.isFalseyButZero(l[c])&&""!==l[c]||("x"===this.units.pos?(u=this.chartRect.x1+u,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)):(u=this.chartRect.y1-u,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(u,c,this,this.gridOffset,this.chartRect[this.counterUnits.len](),t,[i.classNames.grid,i.classNames[this.units.dir]],o),a.showLabel&&e.createLabel(u,f,c,l,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))}e.Axis=e.Class.extend({constructor:r,createGridAndLabels:i,projectValue:function(t,e,n){throw new Error("Base axis can't be instantiated!")}}),e.Axis.units=n}(this||n.g,t),function(t,e){"use strict";function n(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)}function r(t){return this.axisLength*(+e.getMultiValue(t,this.units.pos)-this.bounds.min)/this.bounds.range}t.window,t.document,e.AutoScaleAxis=e.Axis.extend({constructor:n,projectValue:r})}(this||n.g,t),function(t,e){"use strict";function n(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}function r(t){return this.axisLength*(+e.getMultiValue(t,this.units.pos)-this.range.min)/(this.range.max-this.range.min)}t.window,t.document,e.FixedScaleAxis=e.Axis.extend({constructor:n,projectValue:r})}(this||n.g,t),function(t,e){"use strict";function n(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}function r(t,e){return this.stepLength*e}t.window,t.document,e.StepAxis=e.Axis.extend({constructor:n,projectValue:r})}(this||n.g,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"}};function r(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"),l=this.svg.elem("g").addClass(t.classNames.labelGroup),u=e.createChartRect(this.svg,t,n.padding);i=void 0===t.axisX.type?new e.StepAxis(e.Axis.units.x,r.normalized.series,u,e.extend({},t.axisX,{ticks:r.normalized.labels,stretch:t.fullWidth})):t.axisX.type.call(e,e.Axis.units.x,r.normalized.series,u,t.axisX),o=void 0===t.axisY.type?new e.AutoScaleAxis(e.Axis.units.y,r.normalized.series,u,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,u,t.axisY),i.createGridAndLabels(a,l,this.supportsForeignObject,t,this.eventEmitter),o.createGridAndLabels(a,l,this.supportsForeignObject,t,this.eventEmitter),t.showGridBackground&&e.createGridBackground(a,u,t.classNames.gridBackground,this.eventEmitter),r.raw.series.forEach(function(n,a){var l=s.elem("g");l.attr({"ct:series-name":n.name,"ct:meta":e.serialize(n.meta)}),l.addClass([t.classNames.series,n.className||t.classNames.series+"-"+e.alphaNumerate(a)].join(" "));var c=[],f=[];r.normalized.series[a].forEach(function(t,s){var l={x:u.x1+i.projectValue(t,s,r.normalized.series[a]),y:u.y1-o.projectValue(t,s,r.normalized.series[a])};c.push(l.x,l.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())(c,f);if(h.showPoint&&d.pathElements.forEach(function(r){var s=l.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:l,element:s,x:r.x,y:r.y})}.bind(this)),h.showLine){var p=l.elem("path",{d:d.stringify()},t.classNames.line,!0);this.eventEmitter.emit("draw",{type:"line",values:r.normalized.series[a],path:d.clone(),chartRect:u,index:a,series:n,seriesIndex:a,seriesMeta:n.meta,axisX:i,axisY:o,group:l,element:p})}if(h.showArea&&o.range){var v=Math.max(Math.min(h.areaBase,o.range.max),o.range.min),m=u.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=l.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:u,index:a,group:l,element:s})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:o.bounds,chartRect:u,axisX:i,axisY:o,svg:this.svg,options:t})}function i(t,r,i,o){e.Line.super.constructor.call(this,t,r,n,e.extend({},n,i),o)}e.Line=e.Base.extend({constructor:i,createChart:r})}(this||n.g,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"}};function r(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 l=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([l],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 u,c,f,h,d,p=e.createChartRect(this.svg,t,n.padding);c=t.distributeSeries&&t.stackBars?r.normalized.labels.slice(0,1):r.normalized.labels,t.horizontalBars?(u=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:c}):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:c}):t.axisX.type.call(e,e.Axis.units.x,r.normalized.series,p,t.axisX),u=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+u.projectValue(0):p.y1-u.projectValue(0),m=[];f.createGridAndLabels(o,s,this.supportsForeignObject,t,this.eventEmitter),u.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,l=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,c){var y,g,b,x;if(x=t.distributeSeries&&!t.stackBars?i:t.distributeSeries&&t.stackBars?0:c,y=t.horizontalBars?{x:p.x1+u.projectValue(a&&a.x?a.x:0,c,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-u.projectValue(a&&a.y?a.y:0,c,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:l*t.seriesBarDistance*(t.horizontalBars?-1:1)),b=m[c]||v,m[c]=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[c]),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,c);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:c,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:u.bounds,chartRect:p,axisX:h,axisY:d,svg:this.svg,options:t})}function i(t,r,i,o){e.Bar.super.constructor.call(this,t,r,n,e.extend({},n,i),o)}e.Bar=e.Base.extend({constructor:i,createChart:r})}(this||n.g,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"}function i(t){var i,o,a,s,l,u=e.normalizeData(this.data),c=[],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),l=t.total||u.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===u.raw.series.filter((function(t){return t.hasOwnProperty("value")?0!==t.value:0!==t})).length;u.raw.series.forEach(function(t,e){c[e]=this.svg.elem("g",null,null)}.bind(this)),t.showLabel&&(i=this.svg.elem("g",null,null)),u.raw.series.forEach(function(n,o){if(0!==u.normalized.series[o]||!t.ignoreEmptyValues){c[o].attr({"ct:series-name":n.name}),c[o].addClass([t.classNames.series,n.className||t.classNames.series+"-"+e.alphaNumerate(o)].join(" "));var v=l>0?f+u.normalized.series[o]/l*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=c[o].elem("path",{d:k.stringify()},S);if(E.attr({"ct:value":u.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:u.normalized.series[o],totalDataSum:l,index:o,meta:n.meta,series:n,group:c[o],element:E,path:k.clone(),center:d,radius:a,startAngle:f,endAngle:v}),t.showLabel){var A,L;A=1===u.raw.series.length?{x:d.x,y:d.y}:e.polarToCartesian(d.x,d.y,s,f+(v-f)/2),L=u.normalized.labels&&!e.isFalseyButZero(u.normalized.labels[o])?u.normalized.labels[o]:u.normalized.series[o];var T=t.labelInterpolationFnc(L,o);if(T||0===T){var M=i.elem("text",{dx:A.x,dy:A.y,"text-anchor":r(d,A,t.labelDirection)},t.classNames.label).text(""+T);this.eventEmitter.emit("draw",{type:"label",index:o,group:i,element:M,text:""+T,x:A.x,y:A.y})}}f=v}}.bind(this)),this.eventEmitter.emit("created",{chartRect:o,svg:this.svg,options:t})}function o(t,r,i,o){e.Pie.super.constructor.call(this,t,r,n,e.extend({},n,i),o)}e.Pie=e.Base.extend({constructor:o,createChart:i,determineAnchorPosition:r})}(this||n.g,t),t}()}.apply(e,[]))||(t.exports=r)},9831:function(t,e,n){n(2496),n(9419);var r=n(6035);t.exports=r.Array.from},8187:function(t,e,n){n(5815);var r=n(6035);t.exports=r.Array.isArray},9147:function(t,e,n){n(1402);var r=n(638);t.exports=r("Array").concat},3842:function(t,e,n){n(2386);var r=n(638);t.exports=r("Array").filter},2166:function(t,e,n){n(5057);var r=n(638);t.exports=r("Array").find},566:function(t,e,n){n(9346);var r=n(638);t.exports=r("Array").indexOf},2688:function(t,e,n){n(9778);var r=n(638);t.exports=r("Array").map},7586:function(t,e,n){n(791);var r=n(638);t.exports=r("Array").slice},8868:function(t,e,n){n(4985);var r=n(638);t.exports=r("Array").sort},4063:function(t,e,n){n(3374);var r=n(638);t.exports=r("Array").splice},1495:function(t,e,n){n(1875);var r=n(638);t.exports=r("Function").bind},4341:function(t,e,n){n(598),n(2496);var r=n(1520);t.exports=r},3249:function(t,e,n){var r=n(1495),i=Function.prototype;t.exports=function(t){var e=t.bind;return t===i||t instanceof Function&&e===i.bind?r:e}},2079:function(t,e,n){var r=n(9147),i=Array.prototype;t.exports=function(t){var e=t.concat;return t===i||t instanceof Array&&e===i.concat?r:e}},2258:function(t,e,n){var r=n(3842),i=Array.prototype;t.exports=function(t){var e=t.filter;return t===i||t instanceof Array&&e===i.filter?r:e}},5294:function(t,e,n){var r=n(2166),i=Array.prototype;t.exports=function(t){var e=t.find;return t===i||t instanceof Array&&e===i.find?r:e}},7076:function(t,e,n){var r=n(566),i=Array.prototype;t.exports=function(t){var e=t.indexOf;return t===i||t instanceof Array&&e===i.indexOf?r:e}},3692:function(t,e,n){var r=n(2688),i=Array.prototype;t.exports=function(t){var e=t.map;return t===i||t instanceof Array&&e===i.map?r:e}},4485:function(t,e,n){var r=n(7586),i=Array.prototype;t.exports=function(t){var e=t.slice;return t===i||t instanceof Array&&e===i.slice?r:e}},633:function(t,e,n){var r=n(8868),i=Array.prototype;t.exports=function(t){var e=t.sort;return t===i||t instanceof Array&&e===i.sort?r:e}},3095:function(t,e,n){var r=n(4063),i=Array.prototype;t.exports=function(t){var e=t.splice;return t===i||t instanceof Array&&e===i.splice?r:e}},1599:function(t,e,n){var r=n(8734),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}},3658:function(t,e,n){n(4802);var r=n(6035);r.JSON||(r.JSON={stringify:JSON.stringify}),t.exports=function(t,e,n){return r.JSON.stringify.apply(null,arguments)}},1523:function(t,e,n){n(598),n(8453),n(5345),n(2496);var r=n(6035);t.exports=r.Map},9490:function(t,e,n){n(9588);var r=n(6035);t.exports=r.Math.trunc},7854:function(t,e,n){n(2458),t.exports=Math.pow(2,-52)},2852:function(t,e,n){n(8854);var r=n(6035);t.exports=r.Number.isSafeInteger},3192:function(t,e,n){n(4851);var r=n(6035).Object;t.exports=function(t,e){return r.create(t,e)}},2807:function(t,e,n){n(4137);var r=n(6035).Object,i=t.exports=function(t,e,n){return r.defineProperty(t,e,n)};r.defineProperty.sham&&(i.sham=!0)},4180:function(t,e,n){n(9817);var r=n(6035);t.exports=r.Object.entries},9739:function(t,e,n){n(6467);var r=n(6035).Object,i=t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)};r.getOwnPropertyDescriptor.sham&&(i.sham=!0)},5759:function(t,e,n){n(5465);var r=n(6035);t.exports=r.Object.getPrototypeOf},5553:function(t,e,n){n(4933);var r=n(6035);t.exports=r.Object.keys},7866:function(t,e,n){n(6592);var r=n(6035);t.exports=r.Object.setPrototypeOf},7647:function(t,e,n){n(4233),n(598),n(5345),n(357),n(9891),n(1323),n(9393),n(2496);var r=n(6035);t.exports=r.Promise},700:function(t,e,n){n(5801);var r=n(6035);t.exports=r.Reflect.construct},836:function(t,e,n){n(2879);var r=n(6035);t.exports=r.Reflect.get},5293:function(t,e,n){n(598),n(5345),n(4046),n(2496);var r=n(6035);t.exports=r.Set},8734:function(t,e,n){n(5753);var r=n(638);t.exports=r("String").trim},6493:function(t,e,n){n(1402),n(5345),n(6713),n(1160),n(3902),n(8353),n(8186),n(7059),n(6398),n(8578),n(3318),n(9544),n(2125),n(6121),n(7223),n(5737),n(5948),n(3837),n(3397),n(9297);var r=n(6035);t.exports=r.Symbol},9647:function(t,e,n){n(598),n(5345),n(2496),n(7059);var r=n(7905);t.exports=r.f("iterator")},1665:function(t,e,n){var r=n(3241);t.exports=r},8173:function(t,e,n){var r=n(3579);t.exports=r},263:function(t,e,n){var r=n(8801);t.exports=r},6017:function(t,e,n){var r=n(3399);t.exports=r},8945:function(t,e,n){var r=n(6553);t.exports=r},830:function(t,e,n){var r=n(6845);t.exports=r},8993:function(t,e,n){var r=n(8044);n(7009),n(8104),n(3279),n(1189),n(8180),n(1121),n(7879),n(5336),n(5677),n(3285),n(6272),n(2647),n(8796),n(6857),n(2645),n(9639),n(3357),n(5653),n(4694),n(671),t.exports=r},688:function(t,e,n){var r=n(5022);t.exports=r},1422:function(t,e,n){var r=n(1997);t.exports=r},9259:function(t,e,n){var r=n(8430);t.exports=r},8327:function(t,e,n){var r=n(1092);t.exports=r},6438:function(t,e,n){var r=n(3194);t.exports=r},5365:function(t,e,n){var r=n(5227);n(4024),n(9389),n(1898),n(9975),t.exports=r},4338:function(t,e,n){var r=n(2556);t.exports=r},2538:function(t,e,n){var r=n(1024);t.exports=r},499:function(t,e,n){var r=n(1483);n(1634),n(8251),n(4461),n(1482),n(5777),n(9181),n(8472),t.exports=r},488:function(t,e,n){var r=n(4809);t.exports=r},2680:function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},2605:function(t,e,n){var r=n(9574);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},8695:function(t){t.exports=function(){}},9730:function(t){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},6879:function(t,e,n){var r=n(9574);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},4769:function(t,e,n){"use strict";var r=n(490),i=n(4267),o=n(1905),a=n(7336),s=n(1547),l=n(592),u=n(7829),c=n(1520);t.exports=function(t){var e,n,f,h,d,p,v=i(t),m="function"==typeof this?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,b=void 0!==g,x=c(v),w=0;if(b&&(g=r(g,y>2?arguments[2]:void 0,2)),null==x||m==Array&&a(x))for(n=new m(e=s(v.length));e>w;w++)p=b?g(v[w],w):v[w],l(n,w,p);else for(d=(h=u(v,x)).next,n=new m;!(f=d.call(h)).done;w++)p=b?o(h,g,[f.value,w],!0):f.value,l(n,w,p);return n.length=w,n}},9760:function(t,e,n){var r=n(7816),i=n(1547),o=n(2005),a=function(t){return function(e,n,a){var s,l=r(e),u=i(l.length),c=o(a,u);if(t&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},4496:function(t,e,n){var r=n(490),i=n(5769),o=n(4267),a=n(1547),s=n(2757),l=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,c=4==t,f=6==t,h=7==t,d=5==t||f;return function(p,v,m,y){for(var g,b,x=o(p),w=i(x),k=r(v,m,3),S=a(w.length),E=0,A=y||s,L=e?A(p,S):n||h?A(p,0):void 0;S>E;E++)if((d||E in w)&&(b=k(g=w[E],E,x),t))if(e)L[E]=b;else if(b)switch(t){case 3:return!0;case 5:return g;case 6:return E;case 2:l.call(L,g)}else switch(t){case 4:return!1;case 7:l.call(L,g)}return f?-1:u||c?c:L}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},8555:function(t,e,n){var r=n(8790),i=n(2735),o=n(6952),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}))}},74:function(t,e,n){"use strict";var r=n(8790);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},4936:function(t){var e=Math.floor,n=function(t,e){for(var n,r,i=t.length,o=1;o<i;){for(r=o,n=t[o];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},r=function(t,e,n){for(var r=t.length,i=e.length,o=0,a=0,s=[];o<r||a<i;)o<r&&a<i?s.push(n(t[o],e[a])<=0?t[o++]:e[a++]):s.push(o<r?t[o++]:e[a++]);return s};t.exports=function t(i,o){var a=i.length,s=e(a/2);return a<8?n(i,o):r(t(i.slice(0,s),o),t(i.slice(s),o),o)}},1118:function(t,e,n){var r=n(9574),i=n(8984),o=n(2735)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)?r(e)&&null===(e=e[o])&&(e=void 0):e=void 0),void 0===e?Array:e}},2757:function(t,e,n){var r=n(1118);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},1905:function(t,e,n){var r=n(6879),i=n(9368);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){i(t,"throw",e)}}},9069:function(t,e,n){var r=n(2735)("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}},8154:function(t){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},5885:function(t,e,n){var r=n(2401),i=n(8154),o=n(2735)("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}},7424:function(t,e,n){"use strict";var r=n(6879),i=n(2680);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}},4719:function(t,e,n){"use strict";var r=n(2680),i=n(490),o=n(9335);t.exports=function(t){var e,n,a,s,l=arguments.length,u=l>1?arguments[1]:void 0;return r(this),(e=void 0!==u)&&r(u),null==t?new this:(n=[],e?(a=0,s=i(u,l>2?arguments[2]:void 0,2),o(t,(function(t){n.push(s(t,a++))}))):o(t,n.push,{that:n}),new this(n))}},7743:function(t){"use strict";t.exports=function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}},1088:function(t,e,n){"use strict";var r=n(6445).f,i=n(4045),o=n(4675),a=n(490),s=n(9730),l=n(9335),u=n(5329),c=n(6619),f=n(41),h=n(5697).fastKey,d=n(975),p=d.set,v=d.getterFor;t.exports={getConstructor:function(t,e,n,u){var c=t((function(t,r){s(t,c,e),p(t,{type:e,index:i(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=r&&l(r,t[u],{that:t,AS_ENTRIES: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(c.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=this,n=d(e),r=y(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),f?n.size--:e.size--}return!!r},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(c.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(c.prototype,"size",{get:function(){return d(this).size}}),c},setStrong:function(t,e,n){var r=e+" Iterator",i=v(e),o=v(r);u(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),c(e)}}},943:function(t,e,n){"use strict";var r=n(1301),i=n(4569),o=n(5697),a=n(8790),s=n(8444),l=n(9335),u=n(9730),c=n(9574),f=n(6482),h=n(6445).f,d=n(4496).forEach,p=n(41),v=n(975),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(u(e,v,t),{type:t,collection:new w}),null!=n&&l(n,e[x],{that:e,AS_ENTRIES: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&&!c(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.enable();return f(v,t,!1,!0),S[t]=v,r({global:!0,forced:!0},S),b||n.setStrong(v,t,g),v}},5949:function(t,e,n){var r=n(8790);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},6745:function(t,e,n){"use strict";var r=n(3327).IteratorPrototype,i=n(4045),o=n(3196),a=n(6482),s=n(8830),l=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),a(t,u,!1,!0),s[u]=l,t}},8444:function(t,e,n){var r=n(41),i=n(6445),o=n(3196);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},3196:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},592:function(t,e,n){"use strict";var r=n(4773),i=n(6445),o=n(3196);t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},5329:function(t,e,n){"use strict";var r=n(1301),i=n(6745),o=n(6066),a=n(2370),s=n(6482),l=n(8444),u=n(1120),c=n(2735),f=n(1567),h=n(8830),d=n(3327),p=d.IteratorPrototype,v=d.BUGGY_SAFARI_ITERATORS,m=c("iterator"),y="keys",g="values",b="entries",x=function(){return this};t.exports=function(t,e,n,c,d,w,k){i(n,e,c);var S,E,A,L=function(t){if(t===d&&_)return _;if(!v&&t in O)return O[t];switch(t){case y:case g:case b:return function(){return new n(this,t)}}return function(){return new n(this)}},T=e+" Iterator",M=!1,O=t.prototype,P=O[m]||O["@@iterator"]||d&&O[d],_=!v&&P||L(d),I="Array"==e&&O.entries||P;if(I&&(S=o(I.call(new t)),p!==Object.prototype&&S.next&&(f||o(S)===p||(a?a(S,p):"function"!=typeof S[m]&&l(S,m,x)),s(S,T,!0,!0),f&&(h[T]=x))),d==g&&P&&P.name!==g&&(M=!0,_=function(){return P.call(this)}),f&&!k||O[m]===_||l(O,m,_),h[e]=_,d)if(E={values:L(g),keys:w?_:L(y),entries:L(b)},k)for(A in E)(v||M||!(A in O))&&u(O,A,E[A]);else r({target:e,proto:!0,forced:v||M},E);return E}},7025:function(t,e,n){var r=n(6035),i=n(8061),o=n(7905),a=n(6445).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},41:function(t,e,n){var r=n(8790);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2167:function(t,e,n){var r=n(4569),i=n(9574),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},4317:function(t){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}},1067:function(t,e,n){var r=n(3265).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},283: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)}t.exports="object"==("undefined"==typeof window?"undefined":e(window))},1651:function(t,e,n){var r=n(3265);t.exports=/MSIE|Trident/.test(r)},9391:function(t,e,n){var r=n(3265),i=n(4569);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==i.Pebble},4352:function(t,e,n){var r=n(3265);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},478:function(t,e,n){var r=n(8154),i=n(4569);t.exports="process"==r(i.process)},122:function(t,e,n){var r=n(3265);t.exports=/web0s(?!.*chrome)/i.test(r)},3265:function(t,e,n){var r=n(5972);t.exports=r("navigator","userAgent")||""},6952:function(t,e,n){var r,i,o=n(4569),a=n(3265),s=o.process,l=o.Deno,u=s&&s.versions||l&&l.version,c=u&&u.v8;c?i=(r=c.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},1825:function(t,e,n){var r=n(3265).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},638:function(t,e,n){var r=n(6035);t.exports=function(t){return r[t+"Prototype"]}},667:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1301: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(4569),o=n(2435).f,a=n(3730),s=n(6035),l=n(490),u=n(8444),c=n(8061),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]||u(s,b,{})[b],A=E.prototype;for(d in e)n=!a(x?d:b+(w?".":"#")+d,t.forced)&&S&&c(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?l(p,i):t.wrap&&n?f(p):k&&"function"==typeof p?l(Function.call,p):p,(t.sham||p&&p.sham||v&&v.sham)&&u(y,"sham",!0),u(E,d,y),k&&(c(s,h=b+"Prototype")||u(s,h,{}),u(s[h],d,p),t.real&&A&&!A[d]&&u(A,d,p)))}},8790:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},9132:function(t,e,n){var r=n(8790);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},490:function(t,e,n){var r=n(2680);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)}}},5024:function(t,e,n){"use strict";var r=n(2680),i=n(9574),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}},5972:function(t,e,n){var r=n(6035),i=n(4569),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]}},1520:function(t,e,n){var r=n(5885),i=n(8830),o=n(2735)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},7829:function(t,e,n){var r=n(6879),i=n(1520);t.exports=function(t,e){var n=arguments.length<2?i(t):e;if("function"!=typeof n)throw TypeError(String(t)+" is not iterable");return r(n.call(t))}},2447:function(t,e,n){var r=n(7829);t.exports=r},4569: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=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==("undefined"==typeof globalThis?"undefined":r(globalThis))&&globalThis)||i("object"==("undefined"==typeof window?"undefined":r(window))&&window)||i("object"==("undefined"==typeof self?"undefined":r(self))&&self)||i("object"==(void 0===n.g?"undefined":r(n.g))&&n.g)||function(){return this}()||Function("return this")()},8061:function(t,e,n){var r=n(4267),i={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return i.call(r(t),e)}},5583:function(t){t.exports={}},9538:function(t,e,n){var r=n(4569);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},1140:function(t,e,n){var r=n(5972);t.exports=r("document","documentElement")},3899:function(t,e,n){var r=n(41),i=n(8790),o=n(2167);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},5769:function(t,e,n){var r=n(8790),i=n(8154),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},8304:function(t,e,n){var r=n(9047),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},5697: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(1301),o=n(5583),a=n(9574),s=n(8061),l=n(6445).f,u=n(9792),c=n(3720),f=n(158),h=n(9132),d=!1,p=f("meta"),v=0,m=Object.isExtensible||function(){return!0},y=function(t){l(t,p,{value:{objectID:"O"+v++,weakData:{}}})},g=t.exports={enable:function(){g.enable=function(){},d=!0;var t=u.f,e=[].splice,n={};n[p]=1,t(n).length&&(u.f=function(n){for(var r=t(n),i=0,o=r.length;i<o;i++)if(r[i]===p){e.call(r,i,1);break}return r},i({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==r(t)?t:("string"==typeof t?"S":"P")+t;if(!s(t,p)){if(!m(t))return"F";if(!e)return"E";y(t)}return t[p].objectID},getWeakData:function(t,e){if(!s(t,p)){if(!m(t))return!0;if(!e)return!1;y(t)}return t[p].weakData},onFreeze:function(t){return h&&d&&m(t)&&!s(t,p)&&y(t),t}};o[p]=!0},975:function(t,e,n){var r,i,o,a=n(3693),s=n(4569),l=n(9574),u=n(8444),c=n(8061),f=n(9047),h=n(3674),d=n(5583),p="Object already initialized",v=s.WeakMap;if(a||f.state){var m=f.state||(f.state=new v),y=m.get,g=m.has,b=m.set;r=function(t,e){if(g.call(m,t))throw new TypeError(p);return e.facade=t,b.call(m,t,e),e},i=function(t){return y.call(m,t)||{}},o=function(t){return g.call(m,t)}}else{var x=h("state");d[x]=!0,r=function(t,e){if(c(t,x))throw new TypeError(p);return e.facade=t,u(t,x,e),e},i=function(t){return c(t,x)?t[x]:{}},o=function(t){return c(t,x)}}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(!l(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},7336:function(t,e,n){var r=n(2735),i=n(8830),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},8984:function(t,e,n){var r=n(8154);t.exports=Array.isArray||function(t){return"Array"==r(t)}},5991:function(t,e,n){var r=n(8061);t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},3730:function(t,e,n){var r=n(8790),i=/#|\.prototype\./,o=function(t,e){var n=s[a(t)];return n==u||n!=l&&("function"==typeof e?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},5903:function(t,e,n){var r=n(9574),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},9574: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)}t.exports=function(t){return"object"===e(t)?null!==t:"function"==typeof t}},1567:function(t){t.exports=!0},3608: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(5972),o=n(5699);t.exports=o?function(t){return"symbol"==r(t)}:function(t){var e=i("Symbol");return"function"==typeof e&&Object(t)instanceof e}},9335: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(6879),o=n(7336),a=n(1547),s=n(490),l=n(7829),u=n(1520),c=n(9368),f=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var h,d,p,v,m,y,g,b=n&&n.that,x=!(!n||!n.AS_ENTRIES),w=!(!n||!n.IS_ITERATOR),k=!(!n||!n.INTERRUPTED),S=s(e,b,1+x+k),E=function(t){return h&&c(h,"return",t),new f(!0,t)},A=function(t){return x?(i(t),k?S(t[0],t[1],E):S(t[0],t[1])):k?S(t,E):S(t)};if(w)h=t;else{if("function"!=typeof(d=u(t)))throw TypeError("Target is not iterable");if(o(d)){for(p=0,v=a(t.length);v>p;p++)if((m=A(t[p]))&&m instanceof f)return m;return new f(!1)}h=l(t,d)}for(y=h.next;!(g=y.call(h)).done;){try{m=A(g.value)}catch(t){c(h,"throw",t)}if("object"==r(m)&&m&&m instanceof f)return m}return new f(!1)}},9368:function(t,e,n){var r=n(6879);t.exports=function(t,e,n){var i,o;r(t);try{if(void 0===(i=t.return)){if("throw"===e)throw n;return n}i=i.call(t)}catch(t){o=!0,i=t}if("throw"===e)throw n;if(o)throw i;return r(i),n}},3327:function(t,e,n){"use strict";var r,i,o,a=n(8790),s=n(6066),l=n(8444),u=n(8061),c=n(2735),f=n(1567),h=c("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(i=s(s(o)))!==Object.prototype&&(r=i):d=!0);var p=null==r||a((function(){var t={};return r[h].call(t)!==t}));p&&(r={}),f&&!p||u(r,h)||l(r,h,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},8830:function(t){t.exports={}},9874:function(t,e,n){"use strict";var r=n(6879);t.exports=function(t,e){var n=r(this),i=n.has(t)&&"update"in e?e.update(n.get(t),t,n):e.insert(t,n);return n.set(t,i),i}},3268:function(t,e,n){"use strict";var r=n(6879);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}},3853:function(t,e,n){var r,i,o,a,s,l,u,c,f=n(4569),h=n(2435).f,d=n(912).set,p=n(4352),v=n(9391),m=n(122),y=n(478),g=f.MutationObserver||f.WebKitMutationObserver,b=f.document,x=f.process,w=f.Promise,k=h(f,"queueMicrotask"),S=k&&k.value;S||(r=function(){var t,e;for(y&&(t=x.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()},p||y||m||!g||!b?!v&&w&&w.resolve?((u=w.resolve(void 0)).constructor=w,c=u.then,a=function(){c.call(u,r)}):a=y?function(){x.nextTick(r)}:function(){d.call(f,r)}:(s=!0,l=b.createTextNode(""),new g(r).observe(l,{characterData:!0}),a=function(){l.data=s=!s})),t.exports=S||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,a()),o=e}},6495:function(t,e,n){var r=n(4569);t.exports=r.Promise},7873:function(t,e,n){var r=n(6952),i=n(8790);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8437:function(t,e,n){var r=n(8790),i=n(2735),o=n(1567),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}))},3693:function(t,e,n){var r=n(4569),i=n(8304),o=r.WeakMap;t.exports="function"==typeof o&&/native code/.test(i(o))},8532:function(t,e,n){"use strict";var r=n(2680),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)}},4045:function(t,e,n){var r,i=n(6879),o=n(931),a=n(667),s=n(5583),l=n(1140),u=n(2167),c=n(3674),f=c("IE_PROTO"),h=function(){},d=function(t){return"<script>"+t+"</"+"script>"},p=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;v="undefined"!=typeof document?document.domain&&r?p(r):((e=u("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):p(r);for(var n=a.length;n--;)delete v.prototype[a[n]];return v()};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=v(),void 0===e?n:o(n,e)}},931:function(t,e,n){var r=n(41),i=n(6445),o=n(6879),a=n(2518);t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),s=r.length,l=0;s>l;)i.f(t,n=r[l++],e[n]);return t}},6445:function(t,e,n){var r=n(41),i=n(3899),o=n(6879),a=n(4773),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(o(t),e=a(e),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}},2435:function(t,e,n){var r=n(41),i=n(665),o=n(3196),a=n(7816),s=n(4773),l=n(8061),u=n(3899),c=Object.getOwnPropertyDescriptor;e.f=r?c:function(t,e){if(t=a(t),e=s(e),u)try{return c(t,e)}catch(t){}if(l(t,e))return o(!i.f.call(t,e),t[e])}},3720: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(7816),o=n(9792).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))}},9792:function(t,e,n){var r=n(4839),i=n(667).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},8440:function(t,e){e.f=Object.getOwnPropertySymbols},6066:function(t,e,n){var r=n(8061),i=n(4267),o=n(3674),a=n(5949),s=o("IE_PROTO"),l=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?l:null}},4839:function(t,e,n){var r=n(8061),i=n(7816),o=n(9760).indexOf,a=n(5583);t.exports=function(t,e){var n,s=i(t),l=0,u=[];for(n in s)!r(a,n)&&r(s,n)&&u.push(n);for(;e.length>l;)r(s,n=e[l++])&&(~o(u,n)||u.push(n));return u}},2518:function(t,e,n){var r=n(4839),i=n(667);t.exports=Object.keys||function(t){return r(t,i)}},665:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2370:function(t,e,n){var r=n(6879),i=n(2605);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)},8227:function(t,e,n){var r=n(41),i=n(2518),o=n(7816),a=n(665).f,s=function(t){return function(e){for(var n,s=o(e),l=i(s),u=l.length,c=0,f=[];u>c;)n=l[c++],r&&!a.call(s,n)||f.push(t?[n,s[n]]:s[n]);return f}};t.exports={entries:s(!0),values:s(!1)}},1127:function(t,e,n){"use strict";var r=n(2401),i=n(5885);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},8968:function(t,e,n){var r=n(9574);t.exports=function(t,e){var n,i;if("string"===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("string"!==e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},6035:function(t){t.exports={}},9409:function(t){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},513:function(t,e,n){var r=n(6879),i=n(9574),o=n(8532);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}},4675:function(t,e,n){var r=n(1120);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}},1120:function(t,e,n){var r=n(8444);t.exports=function(t,e,n,i){i&&i.enumerable?t[e]=n:r(t,e,n)}},7339:function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},4723:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},4430:function(t,e,n){var r=n(4569);t.exports=function(t,e){try{Object.defineProperty(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},6619:function(t,e,n){"use strict";var r=n(5972),i=n(6445),o=n(2735),a=n(41),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}})}},6482:function(t,e,n){var r=n(2401),i=n(6445).f,o=n(8444),a=n(8061),s=n(1127),l=n(2735)("toStringTag");t.exports=function(t,e,n,u){if(t){var c=n?t:t.prototype;a(c,l)||i(c,l,{configurable:!0,value:e}),u&&!r&&o(c,"toString",s)}}},3674:function(t,e,n){var r=n(7450),i=n(158),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},9047:function(t,e,n){var r=n(4569),i=n(4430),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},7450:function(t,e,n){var r=n(1567),i=n(9047);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.16.4",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6723:function(t,e,n){var r=n(6879),i=n(2680),o=n(2735)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},2997:function(t,e,n){var r=n(8305),i=n(3593),o=n(7339),a=function(t){return function(e,n){var a,s,l=i(o(e)),u=r(n),c=l.length;return u<0||u>=c?t?"":void 0:(a=l.charCodeAt(u))<55296||a>56319||u+1===c||(s=l.charCodeAt(u+1))<56320||s>57343?t?l.charAt(u):a:t?l.slice(u,u+2):s-56320+(a-55296<<10)+65536}};t.exports={codeAt:a(!1),charAt:a(!0)}},2640:function(t,e,n){var r=n(8790),i=n(4931);t.exports=function(t){return r((function(){return!!i[t]()||"…"!="…"[t]()||i[t].name!==t}))}},9394:function(t,e,n){var r=n(7339),i=n(3593),o="["+n(4931)+"]",a=RegExp("^"+o+o+"*"),s=RegExp(o+o+"*$"),l=function(t){return function(e){var n=i(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(s,"")),n}};t.exports={start:l(1),end:l(2),trim:l(3)}},912:function(t,e,n){var r,i,o,a,s=n(4569),l=n(8790),u=n(490),c=n(1140),f=n(2167),h=n(4352),d=n(478),p=s.setImmediate,v=s.clearImmediate,m=s.process,y=s.MessageChannel,g=s.Dispatch,b=0,x={},w="onreadystatechange";try{r=s.location}catch(t){}var k=function(t){if(x.hasOwnProperty(t)){var e=x[t];delete x[t],e()}},S=function(t){return function(){k(t)}},E=function(t){k(t.data)},A=function(t){s.postMessage(String(t),r.protocol+"//"+r.host)};p&&v||(p=function(t){for(var e=[],n=arguments.length,r=1;n>r;)e.push(arguments[r++]);return x[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},i(b),b},v=function(t){delete x[t]},d?i=function(t){m.nextTick(S(t))}:g&&g.now?i=function(t){g.now(S(t))}:y&&!h?(a=(o=new y).port2,o.port1.onmessage=E,i=u(a.postMessage,a,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts&&r&&"file:"!==r.protocol&&!l(A)?(i=A,s.addEventListener("message",E,!1)):i=w in f("script")?function(t){c.appendChild(f("script")).onreadystatechange=function(){c.removeChild(this),k(t)}}:function(t){setTimeout(S(t),0)}),t.exports={set:p,clear:v}},2005:function(t,e,n){var r=n(8305),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)}},7816:function(t,e,n){var r=n(5769),i=n(7339);t.exports=function(t){return r(i(t))}},8305:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},1547:function(t,e,n){var r=n(8305),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},4267:function(t,e,n){var r=n(7339);t.exports=function(t){return Object(r(t))}},809:function(t,e,n){var r=n(9574),i=n(3608),o=n(8968),a=n(2735)("toPrimitive");t.exports=function(t,e){if(!r(t)||i(t))return t;var n,s=t[a];if(void 0!==s){if(void 0===e&&(e="default"),n=s.call(t,e),!r(n)||i(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),o(t,e)}},4773:function(t,e,n){var r=n(809),i=n(3608);t.exports=function(t){var e=r(t,"string");return i(e)?e:String(e)}},2401:function(t,e,n){var r={};r[n(2735)("toStringTag")]="z",t.exports="[object z]"===String(r)},3593:function(t,e,n){var r=n(3608);t.exports=function(t){if(r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},158:function(t){var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},5699: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(7873);t.exports=i&&!Symbol.sham&&"symbol"==r(Symbol.iterator)},7905:function(t,e,n){var r=n(2735);e.f=r},2735:function(t,e,n){var r=n(4569),i=n(7450),o=n(8061),a=n(158),s=n(7873),l=n(5699),u=i("wks"),c=r.Symbol,f=l?c:c&&c.withoutSetter||a;t.exports=function(t){return o(u,t)&&(s||"string"==typeof u[t])||(s&&o(c,t)?u[t]=c[t]:u[t]=f("Symbol."+t)),u[t]}},4931:function(t){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},4233:function(t,e,n){"use strict";var r=n(1301),i=n(6066),o=n(2370),a=n(4045),s=n(8444),l=n(3196),u=n(9335),c=n(3593),f=function(t,e){var n=this;if(!(n instanceof f))return new f(t,e);o&&(n=o(new Error(void 0),i(n))),void 0!==e&&s(n,"message",c(e));var r=[];return u(t,r.push,{that:r}),s(n,"errors",r),n};f.prototype=a(Error.prototype,{constructor:l(5,f),message:l(5,""),name:l(5,"AggregateError")}),r({global:!0},{AggregateError:f})},1402:function(t,e,n){"use strict";var r=n(1301),i=n(8790),o=n(8984),a=n(9574),s=n(4267),l=n(1547),u=n(592),c=n(2757),f=n(8555),h=n(2735),d=n(6952),p=h("isConcatSpreadable"),v=9007199254740991,m="Maximum allowed index exceeded",y=d>=51||!i((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),g=f("concat"),b=function(t){if(!a(t))return!1;var e=t[p];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,forced:!y||!g},{concat:function(t){var e,n,r,i,o,a=s(this),f=c(a,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(b(o=-1===e?a:arguments[e])){if(h+(i=l(o.length))>v)throw TypeError(m);for(n=0;n<i;n++,h++)n in o&&u(f,h,o[n])}else{if(h>=v)throw TypeError(m);u(f,h++,o)}return f.length=h,f}})},2386:function(t,e,n){"use strict";var r=n(1301),i=n(4496).filter;r({target:"Array",proto:!0,forced:!n(8555)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},5057:function(t,e,n){"use strict";var r=n(1301),i=n(4496).find,o=n(8695),a="find",s=!0;a in[]&&Array(1).find((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(a)},9419:function(t,e,n){var r=n(1301),i=n(4769);r({target:"Array",stat:!0,forced:!n(9069)((function(t){Array.from(t)}))},{from:i})},9346:function(t,e,n){"use strict";var r=n(1301),i=n(9760).indexOf,o=n(74),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,l=o("indexOf");r({target:"Array",proto:!0,forced:s||!l},{indexOf:function(t){return s?a.apply(this,arguments)||0:i(this,t,arguments.length>1?arguments[1]:void 0)}})},5815:function(t,e,n){n(1301)({target:"Array",stat:!0},{isArray:n(8984)})},598:function(t,e,n){"use strict";var r=n(7816),i=n(8695),o=n(8830),a=n(975),s=n(5329),l="Array Iterator",u=a.set,c=a.getterFor(l);t.exports=s(Array,"Array",(function(t,e){u(this,{type:l,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")},9778:function(t,e,n){"use strict";var r=n(1301),i=n(4496).map;r({target:"Array",proto:!0,forced:!n(8555)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},791:function(t,e,n){"use strict";var r=n(1301),i=n(9574),o=n(8984),a=n(2005),s=n(1547),l=n(7816),u=n(592),c=n(2735),f=n(8555)("slice"),h=c("species"),d=[].slice,p=Math.max;r({target:"Array",proto:!0,forced:!f},{slice:function(t,e){var n,r,c,f=l(this),v=s(f.length),m=a(t,v),y=a(void 0===e?v:e,v);if(o(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[h])&&(n=void 0):n=void 0,n===Array||void 0===n))return d.call(f,m,y);for(r=new(void 0===n?Array:n)(p(y-m,0)),c=0;m<y;m++,c++)m in f&&u(r,c,f[m]);return r.length=c,r}})},4985:function(t,e,n){"use strict";var r=n(1301),i=n(2680),o=n(4267),a=n(1547),s=n(3593),l=n(8790),u=n(4936),c=n(74),f=n(1067),h=n(1651),d=n(6952),p=n(1825),v=[],m=v.sort,y=l((function(){v.sort(void 0)})),g=l((function(){v.sort(null)})),b=c("sort"),x=!l((function(){if(d)return d<70;if(!(f&&f>3)){if(h)return!0;if(p)return p<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)v.push({k:e+r,v:n})}for(v.sort((function(t,e){return e.v-t.v})),r=0;r<v.length;r++)e=v[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));r({target:"Array",proto:!0,forced:y||!g||!b||!x},{sort:function(t){void 0!==t&&i(t);var e=o(this);if(x)return void 0===t?m.call(e):m.call(e,t);var n,r,l=[],c=a(e.length);for(r=0;r<c;r++)r in e&&l.push(e[r]);for(n=(l=u(l,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:s(e)>s(n)?1:-1}}(t))).length,r=0;r<n;)e[r]=l[r++];for(;r<c;)delete e[r++];return e}})},3374:function(t,e,n){"use strict";var r=n(1301),i=n(2005),o=n(8305),a=n(1547),s=n(4267),l=n(2757),u=n(592),c=n(8555)("splice"),f=Math.max,h=Math.min,d=9007199254740991,p="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!c},{splice:function(t,e){var n,r,c,v,m,y,g=s(this),b=a(g.length),x=i(t,b),w=arguments.length;if(0===w?n=r=0:1===w?(n=0,r=b-x):(n=w-2,r=h(f(o(e),0),b-x)),b+n-r>d)throw TypeError(p);for(c=l(g,r),v=0;v<r;v++)(m=x+v)in g&&u(c,v,g[m]);if(c.length=r,n<r){for(v=x;v<b-r;v++)y=v+n,(m=v+r)in g?g[y]=g[m]:delete g[y];for(v=b;v>b-r+n;v--)delete g[v-1]}else if(n>r)for(v=b-r;v>x;v--)y=v+n-1,(m=v+r-1)in g?g[y]=g[m]:delete g[y];for(v=0;v<n;v++)g[v+x]=arguments[v+2];return g.length=b-r+n,c}})},1875:function(t,e,n){n(1301)({target:"Function",proto:!0},{bind:n(5024)})},4802:function(t,e,n){var r=n(1301),i=n(5972),o=n(8790),a=i("JSON","stringify"),s=/[\uD800-\uDFFF]/g,l=/^[\uD800-\uDBFF]$/,u=/^[\uDC00-\uDFFF]$/,c=function(t,e,n){var r=n.charAt(e-1),i=n.charAt(e+1);return l.test(t)&&!u.test(i)||u.test(t)&&!l.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,c):r}})},3837:function(t,e,n){var r=n(4569);n(6482)(r.JSON,"JSON",!0)},8453:function(t,e,n){"use strict";var r=n(943),i=n(1088);t.exports=r("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},3397:function(){},9588:function(t,e,n){var r=n(1301),i=Math.ceil,o=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(t>0?o:i)(t)}})},2458:function(t,e,n){n(1301)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},8854:function(t,e,n){var r=n(1301),i=n(5903),o=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},4851:function(t,e,n){n(1301)({target:"Object",stat:!0,sham:!n(41)},{create:n(4045)})},4137:function(t,e,n){var r=n(1301),i=n(41);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(6445).f})},9817:function(t,e,n){var r=n(1301),i=n(8227).entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},6467:function(t,e,n){var r=n(1301),i=n(8790),o=n(7816),a=n(2435).f,s=n(41),l=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||l,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},5465:function(t,e,n){var r=n(1301),i=n(8790),o=n(4267),a=n(6066),s=n(5949);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(o(t))}})},4933:function(t,e,n){var r=n(1301),i=n(4267),o=n(2518);r({target:"Object",stat:!0,forced:n(8790)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},6592:function(t,e,n){n(1301)({target:"Object",stat:!0},{setPrototypeOf:n(2370)})},5345:function(){},9891:function(t,e,n){"use strict";var r=n(1301),i=n(2680),o=n(8532),a=n(9409),s=n(9335);r({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=o.f(e),r=n.resolve,l=n.reject,u=a((function(){var n=i(e.resolve),o=[],a=0,l=1;s(t,(function(t){var i=a++,s=!1;o.push(void 0),l++,n.call(e,t).then((function(t){s||(s=!0,o[i]={status:"fulfilled",value:t},--l||r(o))}),(function(t){s||(s=!0,o[i]={status:"rejected",reason:t},--l||r(o))}))})),--l||r(o)}));return u.error&&l(u.value),n.promise}})},1323:function(t,e,n){"use strict";var r=n(1301),i=n(2680),o=n(5972),a=n(8532),s=n(9409),l=n(9335),u="No one promise resolved";r({target:"Promise",stat:!0},{any:function(t){var e=this,n=a.f(e),r=n.resolve,c=n.reject,f=s((function(){var n=i(e.resolve),a=[],s=0,f=1,h=!1;l(t,(function(t){var i=s++,l=!1;a.push(void 0),f++,n.call(e,t).then((function(t){l||h||(h=!0,r(t))}),(function(t){l||h||(l=!0,a[i]=t,--f||c(new(o("AggregateError"))(a,u)))}))})),--f||c(new(o("AggregateError"))(a,u))}));return f.error&&c(f.value),n.promise}})},9393:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6495),a=n(8790),s=n(5972),l=n(6723),u=n(513),c=n(1120);if(r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=l(this,s("Promise")),n="function"==typeof t;return this.then(n?function(n){return u(e,t()).then((function(){return n}))}:t,n?function(n){return u(e,t()).then((function(){throw n}))}:t)}}),!i&&"function"==typeof o){var f=s("Promise").prototype.finally;o.prototype.finally!==f&&c(o.prototype,"finally",f,{unsafe:!0})}},357:function(t,e,n){"use strict";var r,i,o,a,s=n(1301),l=n(1567),u=n(4569),c=n(5972),f=n(6495),h=n(1120),d=n(4675),p=n(2370),v=n(6482),m=n(6619),y=n(9574),g=n(2680),b=n(9730),x=n(8304),w=n(9335),k=n(9069),S=n(6723),E=n(912).set,A=n(3853),L=n(513),T=n(9538),M=n(8532),O=n(9409),P=n(975),_=n(3730),I=n(2735),C=n(283),j=n(478),R=n(6952),U=I("species"),N="Promise",D=P.get,z=P.set,B=P.getterFor(N),V=f&&f.prototype,F=f,H=V,q=u.TypeError,G=u.document,X=u.process,Y=M.f,W=Y,Z=!!(G&&G.createEvent&&u.dispatchEvent),J="function"==typeof PromiseRejectionEvent,$="unhandledrejection",K=!1,Q=_(N,(function(){var t=x(F),e=t!==String(F);if(!e&&66===R)return!0;if(l&&!H.finally)return!0;if(R>=51&&/native code/.test(t))return!1;var n=new F((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[U]=r,!(K=n.then((function(){}))instanceof r)||!e&&C&&!J})),tt=Q||!k((function(t){F.all(t).catch((function(){}))})),et=function(t){var e;return!(!y(t)||"function"!=typeof(e=t.then))&&e},nt=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;A((function(){for(var r=t.value,i=1==t.state,o=0;n.length>o;){var a,s,l,u=n[o++],c=i?u.ok:u.fail,f=u.resolve,h=u.reject,d=u.domain;try{c?(i||(2===t.rejection&&at(t),t.rejection=1),!0===c?a=r:(d&&d.enter(),a=c(r),d&&(d.exit(),l=!0)),a===u.promise?h(q("Promise-chain cycle")):(s=et(a))?s.call(a,f,h):f(a)):h(r)}catch(t){d&&!l&&d.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&it(t)}))}},rt=function(t,e,n){var r,i;Z?((r=G.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},!J&&(i=u["on"+t])?i(r):t===$&&T("Unhandled promise rejection",n)},it=function(t){E.call(u,(function(){var e,n=t.facade,r=t.value;if(ot(t)&&(e=O((function(){j?X.emit("unhandledRejection",r,n):rt($,n,r)})),t.rejection=j||ot(t)?2:1,e.error))throw e.value}))},ot=function(t){return 1!==t.rejection&&!t.parent},at=function(t){E.call(u,(function(){var e=t.facade;j?X.emit("rejectionHandled",e):rt("rejectionhandled",e,t.value)}))},st=function(t,e,n){return function(r){t(e,r,n)}},lt=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,nt(t,!0))},ut=function t(e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===n)throw q("Promise can't be resolved itself");var i=et(n);i?A((function(){var r={done:!1};try{i.call(n,st(t,r,e),st(lt,r,e))}catch(t){lt(r,t,e)}})):(e.value=n,e.state=1,nt(e,!1))}catch(t){lt({done:!1},t,e)}}};if(Q&&(H=(F=function(t){b(this,F,N),g(t),r.call(this);var e=D(this);try{t(st(ut,e),st(lt,e))}catch(t){lt(e,t)}}).prototype,(r=function(t){z(this,{type:N,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(H,{then:function(t,e){var n=B(this),r=Y(S(this,F));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=j?X.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&nt(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=st(ut,e),this.reject=st(lt,e)},M.f=Y=function(t){return t===F||t===o?new i(t):W(t)},!l&&"function"==typeof f&&V!==Object.prototype)){a=V.then,K||(h(V,"then",(function(t,e){var n=this;return new F((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),h(V,"catch",H.catch,{unsafe:!0}));try{delete V.constructor}catch(t){}p&&p(V,H)}s({global:!0,wrap:!0,forced:Q},{Promise:F}),v(F,N,!1,!0),m(N),o=c(N),s({target:N,stat:!0,forced:Q},{reject:function(t){var e=Y(this);return e.reject.call(void 0,t),e.promise}}),s({target:N,stat:!0,forced:l||Q},{resolve:function(t){return L(l&&this===o?F:this,t)}}),s({target:N,stat:!0,forced:tt},{all:function(t){var e=this,n=Y(e),r=n.resolve,i=n.reject,o=O((function(){var n=g(e.resolve),o=[],a=0,s=1;w(t,(function(t){var l=a++,u=!1;o.push(void 0),s++,n.call(e,t).then((function(t){u||(u=!0,o[l]=t,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(t){var e=this,n=Y(e),r=n.reject,i=O((function(){var i=g(e.resolve);w(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},5801:function(t,e,n){var r=n(1301),i=n(5972),o=n(2680),a=n(6879),s=n(9574),l=n(4045),u=n(5024),c=n(8790),f=i("Reflect","construct"),h=c((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),d=!c((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(u.apply(t,r))}var i=n.prototype,c=l(s(i)?i:Object.prototype),p=Function.apply.call(t,c,e);return s(p)?p:c}})},2879:function(t,e,n){var r=n(1301),i=n(9574),o=n(6879),a=n(5991),s=n(2435),l=n(6066);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,u,c=arguments.length<3?e:arguments[2];return o(e)===c?e[n]:(r=s.f(e,n))?a(r)?r.value:void 0===r.get?void 0:r.get.call(c):i(u=l(e))?t(u,n,c):void 0}})},9297:function(){},4046:function(t,e,n){"use strict";var r=n(943),i=n(1088);t.exports=r("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},2496:function(t,e,n){"use strict";var r=n(2997).charAt,i=n(3593),o=n(975),a=n(5329),s="String Iterator",l=o.set,u=o.getterFor(s);a(String,"String",(function(t){l(this,{type:s,string:i(t),index:0})}),(function(){var t,e=u(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})}))},5753:function(t,e,n){"use strict";var r=n(1301),i=n(9394).trim;r({target:"String",proto:!0,forced:n(2640)("trim")},{trim:function(){return i(this)}})},1160:function(t,e,n){n(7025)("asyncIterator")},3902:function(){},8353:function(t,e,n){n(7025)("hasInstance")},8186:function(t,e,n){n(7025)("isConcatSpreadable")},7059:function(t,e,n){n(7025)("iterator")},6713:function(t,e,n){"use strict";var r=n(1301),i=n(4569),o=n(5972),a=n(1567),s=n(41),l=n(7873),u=n(8790),c=n(8061),f=n(8984),h=n(9574),d=n(3608),p=n(6879),v=n(4267),m=n(7816),y=n(4773),g=n(3593),b=n(3196),x=n(4045),w=n(2518),k=n(9792),S=n(3720),E=n(8440),A=n(2435),L=n(6445),T=n(665),M=n(8444),O=n(1120),P=n(7450),_=n(3674),I=n(5583),C=n(158),j=n(2735),R=n(7905),U=n(7025),N=n(6482),D=n(975),z=n(4496).forEach,B=_("hidden"),V="Symbol",F=j("toPrimitive"),H=D.set,q=D.getterFor(V),G=Object.prototype,X=i.Symbol,Y=o("JSON","stringify"),W=A.f,Z=L.f,J=S.f,$=T.f,K=P("symbols"),Q=P("op-symbols"),tt=P("string-to-symbol-registry"),et=P("symbol-to-string-registry"),nt=P("wks"),rt=i.QObject,it=!rt||!rt.prototype||!rt.prototype.findChild,ot=s&&u((function(){return 7!=x(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=W(G,e);r&&delete G[e],Z(t,e,n),r&&t!==G&&Z(G,e,r)}:Z,at=function(t,e){var n=K[t]=x(X.prototype);return H(n,{type:V,tag:t,description:e}),s||(n.description=e),n},st=function(t,e,n){t===G&&st(Q,e,n),p(t);var r=y(e);return p(n),c(K,r)?(n.enumerable?(c(t,B)&&t[B][r]&&(t[B][r]=!1),n=x(n,{enumerable:b(0,!1)})):(c(t,B)||Z(t,B,b(1,{})),t[B][r]=!0),ot(t,r,n)):Z(t,r,n)},lt=function(t,e){p(t);var n=m(e),r=w(n).concat(ht(n));return z(r,(function(e){s&&!ut.call(n,e)||st(t,e,n[e])})),t},ut=function(t){var e=y(t),n=$.call(this,e);return!(this===G&&c(K,e)&&!c(Q,e))&&(!(n||!c(this,e)||!c(K,e)||c(this,B)&&this[B][e])||n)},ct=function(t,e){var n=m(t),r=y(e);if(n!==G||!c(K,r)||c(Q,r)){var i=W(n,r);return!i||!c(K,r)||c(n,B)&&n[B][r]||(i.enumerable=!0),i}},ft=function(t){var e=J(m(t)),n=[];return z(e,(function(t){c(K,t)||c(I,t)||n.push(t)})),n},ht=function(t){var e=t===G,n=J(e?Q:m(t)),r=[];return z(n,(function(t){!c(K,t)||e&&!c(G,t)||r.push(K[t])})),r};(l||(O((X=function(){if(this instanceof X)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,e=C(t),n=function t(n){this===G&&t.call(Q,n),c(this,B)&&c(this[B],e)&&(this[B][e]=!1),ot(this,e,b(1,n))};return s&&it&&ot(G,e,{configurable:!0,set:n}),at(e,t)}).prototype,"toString",(function(){return q(this).tag})),O(X,"withoutSetter",(function(t){return at(C(t),t)})),T.f=ut,L.f=st,A.f=ct,k.f=S.f=ft,E.f=ht,R.f=function(t){return at(j(t),t)},s&&(Z(X.prototype,"description",{configurable:!0,get:function(){return q(this).description}}),a||O(G,"propertyIsEnumerable",ut,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:X}),z(w(nt),(function(t){U(t)})),r({target:V,stat:!0,forced:!l},{for:function(t){var e=g(t);if(c(tt,e))return tt[e];var n=X(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!d(t))throw TypeError(t+" is not a symbol");if(c(et,t))return et[t]},useSetter:function(){it=!0},useSimple:function(){it=!1}}),r({target:"Object",stat:!0,forced:!l,sham:!s},{create:function(t,e){return void 0===e?x(t):lt(x(t),e)},defineProperty:st,defineProperties:lt,getOwnPropertyDescriptor:ct}),r({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:ft,getOwnPropertySymbols:ht}),r({target:"Object",stat:!0,forced:u((function(){E.f(1)}))},{getOwnPropertySymbols:function(t){return E.f(v(t))}}),Y)&&r({target:"JSON",stat:!0,forced:!l||u((function(){var t=X();return"[null]"!=Y([t])||"{}"!=Y({a:t})||"{}"!=Y(Object(t))}))},{stringify:function(t,e,n){for(var r,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=e,(h(e)||void 0!==t)&&!d(t))return f(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!d(e))return e}),i[1]=e,Y.apply(null,i)}});X.prototype[F]||M(X.prototype,F,X.prototype.valueOf),N(X,V),I[B]=!0},8578:function(t,e,n){n(7025)("matchAll")},6398:function(t,e,n){n(7025)("match")},3318:function(t,e,n){n(7025)("replace")},9544:function(t,e,n){n(7025)("search")},2125:function(t,e,n){n(7025)("species")},6121:function(t,e,n){n(7025)("split")},7223:function(t,e,n){n(7025)("toPrimitive")},5737:function(t,e,n){n(7025)("toStringTag")},5948:function(t,e,n){n(7025)("unscopables")},4024:function(t,e,n){n(4233)},3279:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(7424);r({target:"Map",proto:!0,real:!0,forced:i},{deleteAll:function(){return o.apply(this,arguments)}})},1189:function(t,e,n){"use strict";n(1301)({target:"Map",proto:!0,real:!0,forced:n(1567)},{emplace:n(9874)})},8180:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(490),s=n(2447),l=n(9335);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!l(n,(function(t,n,i){if(!r(n,t,e))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},1121:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(5972),a=n(6879),s=n(2680),l=n(490),u=n(6723),c=n(2447),f=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{filter:function(t){var e=a(this),n=c(e),r=l(t,arguments.length>1?arguments[1]:void 0,3),i=new(u(e,o("Map"))),h=s(i.set);return f(n,(function(t,n){r(n,t,e)&&h.call(i,t,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}})},5336:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(490),s=n(2447),l=n(9335);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 l(n,(function(t,n,i){if(r(n,t,e))return i(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},7879:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(490),s=n(2447),l=n(9335);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 l(n,(function(t,n,i){if(r(n,t,e))return i(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},7009:function(t,e,n){n(1301)({target:"Map",stat:!0},{from:n(4719)})},5677:function(t,e,n){"use strict";var r=n(1301),i=n(9335),o=n(2680);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}})},3285:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(2447),s=n(4723),l=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{includes:function(t){return l(a(o(this)),(function(e,n,r){if(s(n,t))return r()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},6272:function(t,e,n){"use strict";var r=n(1301),i=n(9335),o=n(2680);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}})},2647:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(2447),s=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{keyOf:function(t){return s(a(o(this)),(function(e,n,r){if(n===t)return r(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},8796:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(5972),a=n(6879),s=n(2680),l=n(490),u=n(6723),c=n(2447),f=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{mapKeys:function(t){var e=a(this),n=c(e),r=l(t,arguments.length>1?arguments[1]:void 0,3),i=new(u(e,o("Map"))),h=s(i.set);return f(n,(function(t,n){h.call(i,r(n,t,e),n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}})},6857:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(5972),a=n(6879),s=n(2680),l=n(490),u=n(6723),c=n(2447),f=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{mapValues:function(t){var e=a(this),n=c(e),r=l(t,arguments.length>1?arguments[1]:void 0,3),i=new(u(e,o("Map"))),h=s(i.set);return f(n,(function(t,n){h.call(i,t,r(n,t,e))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}})},2645:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(2680),s=n(9335);r({target:"Map",proto:!0,real:!0,forced:i},{merge:function(t){for(var e=o(this),n=a(e.set),r=arguments.length,i=0;i<r;)s(arguments[i++],n,{that:e,AS_ENTRIES:!0});return e}})},8104:function(t,e,n){n(1301)({target:"Map",stat:!0},{of:n(7743)})},9639:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(2680),s=n(2447),l=n(9335);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),l(n,(function(n,o){r?(r=!1,i=o):i=t(i,o,n,e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r)throw TypeError("Reduce of empty map with no initial value");return i}})},3357:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(490),s=n(2447),l=n(9335);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 l(n,(function(t,n,i){if(r(n,t,e))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},671:function(t,e,n){"use strict";n(1301)({target:"Map",proto:!0,real:!0,forced:n(1567)},{updateOrInsert:n(3268)})},5653:function(t,e,n){"use strict";var r=n(1301),i=n(1567),o=n(6879),a=n(2680);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}})},4694:function(t,e,n){"use strict";n(1301)({target:"Map",proto:!0,real:!0,forced:n(1567)},{upsert:n(3268)})},9389:function(t,e,n){n(9891)},9975:function(t,e,n){n(1323)},1898:function(t,e,n){"use strict";var r=n(1301),i=n(8532),o=n(9409);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}})},1634:function(t,e,n){n(7025)("asyncDispose")},8251:function(t,e,n){n(7025)("dispose")},4461:function(t,e,n){n(7025)("matcher")},1482:function(t,e,n){n(7025)("metadata")},5777:function(t,e,n){n(7025)("observable")},9181:function(t,e,n){n(7025)("patternMatch")},8472:function(t,e,n){n(7025)("replaceAll")},1782:function(t,e,n){n(598);var r=n(4317),i=n(4569),o=n(5885),a=n(8444),s=n(8830),l=n(2735)("toStringTag");for(var u in r){var c=i[u],f=c&&c.prototype;f&&o(f)!==l&&a(f,l,u),s[u]=s.Array}},964:function(t,e,n){"use strict";n(598);var r=n(1301),i=n(5972),o=n(8437),a=n(1120),s=n(4675),l=n(6482),u=n(6745),c=n(975),f=n(9730),h=n(8061),d=n(490),p=n(5885),v=n(6879),m=n(9574),y=n(3593),g=n(4045),b=n(3196),x=n(7829),w=n(1520),k=n(2735),S=i("fetch"),E=i("Request"),A=E&&E.prototype,L=i("Headers"),T=k("iterator"),M="URLSearchParams",O="URLSearchParamsIterator",P=c.set,_=c.getterFor(M),I=c.getterFor(O),C=/\+/g,j=Array(4),R=function(t){return j[t-1]||(j[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},U=function(t){try{return decodeURIComponent(t)}catch(e){return t}},N=function(t){var e=t.replace(C," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(R(n--),U);return e}},D=/[!'()~]|%20/g,z={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},B=function(t){return z[t]},V=function(t){return encodeURIComponent(t).replace(D,B)},F=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:N(r.shift()),value:N(r.join("="))}))},H=function(t){this.entries.length=0,F(this.entries,t)},q=function(t,e){if(t<e)throw TypeError("Not enough arguments")},G=u((function(t,e){P(this,{type:O,iterator:x(_(t).entries),kind:e})}),"Iterator",(function(){var t=I(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})),X=function(){f(this,X,M);var t,e,n,r,i,o,a,s,l,u=arguments.length>0?arguments[0]:void 0,c=this,d=[];if(P(c,{type:M,entries:d,updateURL:function(){},updateSearchParams:H}),void 0!==u)if(m(u))if("function"==typeof(t=w(u)))for(n=(e=x(u,t)).next;!(r=n.call(e)).done;){if((a=(o=(i=x(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:y(a.value),value:y(s.value)})}else for(l in u)h(u,l)&&d.push({key:l,value:y(u[l])});else F(d,"string"==typeof u?"?"===u.charAt(0)?u.slice(1):u:y(u))},Y=X.prototype;if(s(Y,{append:function(t,e){q(arguments.length,2);var n=_(this);n.entries.push({key:y(t),value:y(e)}),n.updateURL()},delete:function(t){q(arguments.length,1);for(var e=_(this),n=e.entries,r=y(t),i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;e.updateURL()},get:function(t){q(arguments.length,1);for(var e=_(this).entries,n=y(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){q(arguments.length,1);for(var e=_(this).entries,n=y(t),r=[],i=0;i<e.length;i++)e[i].key===n&&r.push(e[i].value);return r},has:function(t){q(arguments.length,1);for(var e=_(this).entries,n=y(t),r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){q(arguments.length,1);for(var n,r=_(this),i=r.entries,o=!1,a=y(t),s=y(e),l=0;l<i.length;l++)(n=i[l]).key===a&&(o?i.splice(l--,1):(o=!0,n.value=s));o||i.push({key:a,value:s}),r.updateURL()},sort:function(){var t,e,n,r=_(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=_(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 G(this,"keys")},values:function(){return new G(this,"values")},entries:function(){return new G(this,"entries")}},{enumerable:!0}),a(Y,T,Y.entries),a(Y,"toString",(function(){for(var t,e=_(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(V(t.key)+"="+V(t.value));return n.join("&")}),{enumerable:!0}),l(X,M),r({global:!0,forced:!o},{URLSearchParams:X}),!o&&"function"==typeof L){var W=function(t){if(m(t)){var e,n=t.body;if(p(n)===M)return(e=t.headers?new L(t.headers):new L).has("content-type")||e.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),g(t,{body:b(0,String(n)),headers:b(0,e)})}return t};if("function"==typeof S&&r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return S(t,arguments.length>1?W(arguments[1]):{})}}),"function"==typeof E){var Z=function(t){return f(this,Z,"Request"),new E(t,arguments.length>1?W(arguments[1]):{})};A.constructor=Z,Z.prototype=A,r({global:!0,forced:!0},{Request:Z})}}t.exports={URLSearchParams:X,getState:_}},3241:function(t,e,n){var r=n(9831);t.exports=r},3579:function(t,e,n){var r=n(8187);t.exports=r},8801:function(t,e,n){var r=n(4341);n(1782),t.exports=r},3399:function(t,e,n){var r=n(3249);t.exports=r},7605:function(t,e,n){var r=n(2079);t.exports=r},8687:function(t,e,n){var r=n(2258);t.exports=r},6127:function(t,e,n){var r=n(5294);t.exports=r},6553:function(t,e,n){var r=n(7076);t.exports=r},1830:function(t,e,n){var r=n(3692);t.exports=r},6845:function(t,e,n){var r=n(4485);t.exports=r},9886:function(t,e,n){var r=n(633);t.exports=r},2939:function(t,e,n){var r=n(3095);t.exports=r},4205:function(t,e,n){var r=n(1599);t.exports=r},7772:function(t,e,n){var r=n(3658);t.exports=r},8044:function(t,e,n){var r=n(1523);n(1782),t.exports=r},4396:function(t,e,n){var r=n(9490);t.exports=r},4242:function(t,e,n){var r=n(7854);t.exports=r},6841:function(t,e,n){var r=n(2852);t.exports=r},5022:function(t,e,n){var r=n(3192);t.exports=r},1997:function(t,e,n){var r=n(2807);t.exports=r},9990:function(t,e,n){var r=n(4180);t.exports=r},8430:function(t,e,n){var r=n(9739);t.exports=r},1092:function(t,e,n){var r=n(5759);t.exports=r},4682:function(t,e,n){var r=n(5553);t.exports=r},3194:function(t,e,n){var r=n(7866);t.exports=r},5227:function(t,e,n){var r=n(7647);n(1782),t.exports=r},2556:function(t,e,n){var r=n(700);t.exports=r},1024:function(t,e,n){var r=n(836);t.exports=r},1209:function(t,e,n){var r=n(5293);n(1782),t.exports=r},1483:function(t,e,n){var r=n(6493);n(1782),t.exports=r},4809:function(t,e,n){var r=n(9647);n(1782),t.exports=r},2162:function(t,e,n){var r=n(1228);n(1782),t.exports=r},1228:function(t,e,n){n(964);var r=n(6035);t.exports=r.URLSearchParams},6760: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=function(t){"use strict";var e,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r=h;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===v){if("throw"===i)throw o;return _()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=L(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=f(t,e,n);if("normal"===l.type){if(r=n.done?v:d,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=v,n.method="throw",n.arg=l.arg)}}}(t,n,a),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function y(){}function g(){}function b(){}var x={};u(x,a,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(P([])));k&&k!==n&&i.call(k,a)&&(x=k);var S=b.prototype=y.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(o,a,s,l){var u=f(t[o],t,a);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"===r(h)&&i.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,l)}),(function(t){n("throw",t,s,l)})):e.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return n("throw",t,s,l)}))}l(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}}function L(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=f(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function T(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 M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function P(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:_}}function _(){return{value:e,done:!0}}return g.prototype=b,u(S,"constructor",b),u(b,"constructor",g),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},E(A.prototype),u(A.prototype,s,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new A(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(S),u(S,l,"Generator"),u(S,a,(function(){return this})),u(S,"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=P,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},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 n=this;function r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;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,m):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),m},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),M(n),m}},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;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}("object"===r(t=n.nmd(t))?t.exports:{});try{regeneratorRuntime=i}catch(t){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}}},r={};function i(t){var e=r[t];if(void 0!==e)return e.exports;var o=r[t]={id:t,loaded:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=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.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.f={},i.e=function(t){return Promise.all(Object.keys(i.f).reduce((function(e,n){return i.f[n](t,e),e}),[]))},i.u=function(t){return t+".bundle.js"},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t={},e="ulogger-server:",i.l=function(n,r,o,a){if(t[n])t[n].push(r);else{var s,l;if(void 0!==o)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var f=u[c];if(f.getAttribute("src")==n||f.getAttribute("data-webpack")==e+o){s=f;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",e+o),s.src=n),t[n]=[r];var h=function(e,r){s.onerror=s.onload=null,clearTimeout(d);var i=t[n];if(delete t[n],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((function(t){return t(r)})),e)return e(r)},d=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},i.p="js/dist/",function(){var t={179:0};i.f.j=function(e,n){var r=i.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,i){r=t[e]=[n,i]}));n.push(r[2]=o);var a=i.p+i.u(e),s=new Error;i.l(a,(function(n){if(i.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,r[1](s)}}),"chunk-"+e,e)}};var e=function(e,n){var r,o,a=n[0],s=n[1],l=n[2],u=0;if(a.some((function(e){return 0!==t[e]}))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(l)l(i)}for(e&&e(n);u<a.length;u++)o=a[u],i.o(t,o)&&t[o]&&t[o][0](),t[a[u]]=0},n=self.webpackChunkulogger_server=self.webpackChunkulogger_server||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),function(){"use strict";var t=i(543),e=i.n(t),n=i(7245),r=i.n(n);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=i(8975);function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a(t,r.key,r)}}function l(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}var u=i(5877),c=i.n(u),f=i(6012),h=i.n(f),d=i(6330),p=i.n(d),v=i(7112),m=i.n(v),y=i(215),g=i(2829);function b(t){return(b="function"==typeof y&&"symbol"==typeof g?function(t){return typeof t}:function(t){return t&&"function"==typeof y&&t.constructor===y&&t!==y.prototype?"symbol":typeof t})(t)}var x=i(6950),w=i.n(x),k=i(6235),S=i.n(k);function E(t,e){var n=void 0!==p()&&m()(t)||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return A(t,e);var r=c()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return h()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var L=function(){function t(){o(this,t)}return l(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,n,i){var o=this,a=[];n=n||{};var s=(i=i||{}).method||"GET",l=new XMLHttpRequest;return new(e())((function(e,i){var u;if(l.onreadystatechange=function(){if(l.readyState===XMLHttpRequest.DONE){var t="",n=!0;if(200===l.status)try{var r=JSON.parse(l.responseText);r&&(r.error?r.message&&(t=r.message):(e&&"function"==typeof e&&e(r),n=!1))}catch(e){t=e.message}else t="HTTP error ".concat(l.status);n&&i&&"function"==typeof i&&i(new Error(t))}},n instanceof HTMLFormElement&&(n=new FormData(n)),n instanceof FormData)u="POST"===s?n:new(w())(n).toString();else{for(var c in n)if(n.hasOwnProperty(c))if(Array.isArray(n[c])){var f,h=E(n[c]);try{for(h.s();!(f=h.n()).done;){var d,p=f.value;a.push(r()(d="".concat(c,"[]=")).call(d,o.encodeValue(p)))}}catch(t){h.e(t)}finally{h.f()}}else{var v;a.push(r()(v="".concat(c,"=")).call(v,o.encodeValue(n[c])))}u=(u=a.join("&")).replace(/%20/g,"+")}"GET"===s&&u.length&&(t+="?".concat(u),u=null),l.open(s,t,!0),"POST"!==s||n instanceof FormData||l.setRequestHeader("Content-type","application/x-www-form-urlencoded"),l.send(u)}))}},{key:"encodeValue",value:function(t){return"object"===b(t)&&(t=S()(t)),encodeURIComponent(t)}}]),t}(),T=i(6544),M=i.n(T),O=i(7828),P=i(3668);function _(t,e){return(_=P||function(t,e){return t.__proto__=e,t})(t,e)}function I(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=O(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_(t,e)}function C(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}var j=i(5726);function R(t){return(R=P?j:function(t){return t.__proto__||j(t)})(t)}var U=i(1624),N=i.n(U),D=i(457);function z(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 B=i(2554);var V=i(6142);function F(t,e){var n;if(t){if("string"==typeof t)return z(t,e);var r=V(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?B(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?z(t,e):void 0}}function H(t){return function(t){if(D(t))return z(t)}(t)||function(t){if(void 0!==y&&null!=v(t)||null!=t["@@iterator"])return B(t)}(t)||F(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var q=i(1467),G=i.n(q),X=i(61);function Y(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):X.resolve(l).then(r,i)}var W=i(6130),Z=i.n(W),J=i(9733),$=i.n(J),K=i(7448),Q=i.n(K);function tt(t,e){var n=void 0!==p()&&m()(t)||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return et(t,e);var r=c()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return h()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return et(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function et(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 nt=function(){function t(){o(this,t)}return l(t,null,[{key:"observe",value:function(t,e,n){if("object"!==b(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=tt(t);try{var i=function(){var t,r=n.value;(t=Q().mark((function t(){return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r(e);case 2:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new X((function(r,i){var o=t.apply(e,n);function a(t){Y(o,r,i,a,s,"next",t)}function s(t){Y(o,r,i,a,s,"throw",t)}a(void 0)}))})()};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"!==b(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,Array.isArray(t[e])){var r,i=tt(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,i){var o=this;if(!e.hasOwnProperty(n))throw new Error('Invalid argument: object does not have property "'.concat(n,'"'));if(this.isObserved(e,n,i))throw new Error("Observer already registered for property ".concat(n));this.addObserver(e,i,n),e.hasOwnProperty("_values")||Object.defineProperty(e,"_values",{enumerable:!1,configurable:!1,value:{}}),e._values[n]=e[n],Object.defineProperty(e,n,{get:function(){return e._values[n]},set:function(i){var a;e._values[n]!==i&&(e._values[n]=i,"".concat(n," = "),Array.isArray(i)&&i.length&&r()(a="[".concat(i[0],", …](")).call(a,i.length,")"),t.notify(e._observers[n],i));Array.isArray(e[n])&&o.observeArray(e[n],e._observers[n])}}),Array.isArray(e[n])&&this.observeArray(e[n],i)}},{key:"observeRecursive",value:function(e,n){if(Array.isArray(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 Z()){var n,r=tt(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")||Object.defineProperty(t,"_observers",{enumerable:!1,configurable:!1,value:3===arguments.length?[]:new(Z())}),3===arguments.length?(t._observers[n]||(t._observers[n]=new(Z())),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");Array.isArray(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,"…"),Array.isArray(t[e]))this.restoreArrayPrototypes(t[e]);else if("object"===b(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){Array.isArray(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){["pop","push","reverse","shift","sort","splice","unshift"].forEach((function(n){var i=$()(Array.prototype,n);e.hasOwnProperty(n)||(i.value=function(){var i,o=Array.prototype[n].apply(e,arguments);return"[".concat(n,"] "),e.length&&r()(i="[".concat(e[0],", …](")).call(i,e.length,")"),t.notify(e._observers,e),o},Object.defineProperty(e,n,i))}))}},{key:"restoreArrayPrototypes",value:function(t){["pop","push","reverse","shift","sort","splice","unshift"].forEach((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.forEach((function(t){t===e&&r.delete(t)}))}}}]),t}();function rt(t,e){var n=void 0!==p()&&m()(t)||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return it(t,e);var r=c()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return h()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return it(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}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}var ot=function(){function t(e,n,r){if(o(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 l(t,[{key:"selected",get:function(){return this.element.value},set:function(t){this.hasValue(t)&&(this.element.value=t)}},{key:"head",get:function(){return this.headText},set:function(t){t.length&&(this.hasHead=!0,this.headText=t,this.addHead())}},{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 G()(e=H(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=rt(e);try{var a=function(){var t=i.value,e=new Option(t.listText,t.listValue,!1,n===t.listValue);r.element.add(e),nt.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:"allValue",get:function(){return"all"}},{key:"headValue",get:function(){return"0"}}]),t}(),at=function(){function t(){o(this,t),this.listValue=ot.allValue,this.listText="-"}return l(t,[{key:"listItem",value:function(t,e){this.listValue=String(t),this.listText=String(e)}},{key:"toString",value:function(){var t;return r()(t="[".concat(this.listValue,", ")).call(t,this.listText,"]")}}]),t}(),st=i(1685),lt=i(8680);function ut(t,e,n){return(ut="undefined"!=typeof Reflect&&st?st:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=R(t)););return t}(t,e);if(r){var i=lt(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}var ct=i(2717),ft=i.n(ct),ht=i(7526),dt=i.n(ht),pt=i(8409),vt=i.n(pt),mt=function(){function t(){o(this,t)}return l(t,null,[{key:"setCookie",value:function(t,e){var n,i,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=r()(n=r()(i="ulogger_".concat(t,"=")).call(i,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),i=1;i<e;i++)n[i-1]=arguments[i];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(r()(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(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4,o=new(e())((function(e,i){return t.addScript(n,r,e,i)})),a=this.timeoutPromise(i);return e().race([o,a])}},{key:"timeoutPromise",value:function(t){return new(e())((function(e,n){var r=setTimeout((function(){clearTimeout(r),n(new Error("timeout (".concat(t," ms).")))}),t)}))}},{key:"htmlEncode",value:function(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}},{key:"hexToRGBA",value:function(t,e){var n,i;return e=void 0!==e?e:1,"rgba(".concat(r()(n=ft()(i=(t=t.replace("#","")).match(new RegExp("(.{".concat(t.length/3,"})"),"g"))).call(i,(function(e){return parseInt(t.length%2?e+e:e,16)}))).call(n,e).join(","),")")}},{key:"getScaleColor",value:function(t,e,n){var i,o;if(n<0||n>1)throw new Error("Invalid value");for(var a=[],s=0;s<3;s++){if(t[s]<0||t[s]>255||e[s]<0||e[s]>255)throw new Error("Invalid value");a[s]=Math.round((e[s]-t[s])*n+t[s])}return r()(i=r()(o="rgb(".concat(a[0],", ")).call(o,a[1],", ")).call(i,a[2],")")}},{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=dt()(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=parseFloat(t);break;case"int":r=Math.round(parseFloat(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,i,o,a="";return{date:r()(e=r()(n="".concat(t.getFullYear(),"-")).call(n,c()(i="0".concat(t.getMonth()+1)).call(i,-2),"-")).call(e,c()(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}},{key:"isDeepEqual",value:function(t,e){var n=this;return vt()(t).every((function(r){return"object"===b(t[r])&&null!==t[r]&&"object"===b(e[r])&&null!==e[r]?n.isDeepEqual(t[r],e[r]):t[r]===e[r]}))}}]),t}(),yt=function(){function t(){o(this,t)}return l(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:"hasSpeed",value:function(){return null!=this.speed}},{key:"hasAltitude",value:function(){return null!=this.altitude}},{key:"getImagePath",value:function(){return this.hasImage()?"uploads/".concat(this.image):null}},{key:"totalSpeed",get:function(){return this.totalSeconds?this.totalMeters/this.totalSeconds: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:"imageDelete",value:function(){var e=this;return t.update({action:"imagedel",posid:this.id}).then((function(){e.image=null}))}},{key:"imageAdd",value:function(e){var n=this,r=new FormData;return r.append("image",e),r.append("action","imageadd"),r.append("posid",this.id),t.update(r).then((function(t){n.image=t.image}))}},{key:"distanceTo",value:function(t){var e=mt.deg2rad(this.latitude),n=mt.deg2rad(this.longitude),r=mt.deg2rad(t.latitude),i=r-e,o=mt.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:"fromJson",value:function(e){var n=new t;return n.id=mt.getInteger(e.id),n.latitude=mt.getFloat(e.latitude),n.longitude=mt.getFloat(e.longitude),n.altitude=mt.getInteger(e.altitude,!0),n.speed=mt.getFloat(e.speed,!0),n.bearing=mt.getInteger(e.bearing,!0),n.accuracy=mt.getInteger(e.accuracy,!0),n.provider=mt.getString(e.provider,!0),n.comment=mt.getString(e.comment,!0),n.image=mt.getString(e.image,!0),n.username=mt.getString(e.username),n.trackname=mt.getString(e.trackname),n.trackid=mt.getInteger(e.trackid),n.timestamp=mt.getInteger(e.timestamp),n.meters=mt.getInteger(e.meters),n.seconds=mt.getInteger(e.seconds),n.totalMeters=0,n.totalSeconds=0,n}},{key:"update",value:function(t){return L.post("utils/handleposition.php",t)}}]),t}();function gt(t,e){var n=void 0!==p()&&m()(t)||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return bt(t,e);var r=c()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return h()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function bt(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 xt(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var wt=function(t){I(n,t);var e=xt(n);function n(){var t;return o(this,n),(t=e.call(this)).positions=[],t}return l(n,[{key:"clear",value:function(){this.positions.length=0}},{key:"length",get:function(){return this.positions.length}},{key:"hasPositions",get:function(){return 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=gt(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;n.push(yt.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:"fetchLatest",value:function(){var t=new n;return t.fetchLatest().then((function(){return t.length?t:null}))}},{key:"fetch",value:function(t){return L.get("utils/getpositions.php",t)}}]),n}(at);function kt(t,e){var n=void 0!==p()&&m()(t)||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return St(t,e);var r=c()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return h()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return St(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}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}function Et(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var At=function(t){I(n,t);var e=Et(n);function n(t,r,i){var a;if(o(this,n),a=e.call(this),!N()(t)||t<=0||!r||!(i instanceof Ot))throw new Error("Invalid argument for track constructor");return a.id=t,a.name=r,a.user=i,a.plotData=[],a.maxId=0,a.maxSpeed=0,a.maxAltitude=null,a.minAltitude=null,a.totalMeters=0,a.totalSeconds=0,a.listItem(t,r),a}return l(n,[{key:"setName",value:function(t){this.name=t,this.listText=t}},{key:"clear",value:function(){ut(R(n.prototype),"clear",this).call(this),this.clearTrackCounters()}},{key:"clearTrackCounters",value:function(){this.maxId=0,this.maxSpeed=0,this.maxAltitude=null,this.minAltitude=null,this.plotData.length=0,this.totalMeters=0,this.totalSeconds=0}},{key:"isEqualTo",value:function(t){return!!t&&t.id===this.id}},{key:"hasPlotData",get:function(){return this.plotData.length>0}},{key:"hasAltitudes",get:function(){return null!==this.maxAltitude}},{key:"hasSpeeds",get:function(){return this.maxSpeed>0}},{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=kt(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=yt.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),wt.fetch(e).then((function(n){t.fromJson(n,e.afterid>0)}))}},{key:"export",value:function(t){if(this.hasPositions){var e,n,i=r()(e=r()(n="utils/export.php?type=".concat(t,"&userid=")).call(n,this.user.id,"&trackid=")).call(e,this.id);mt.openUrl(i)}}},{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=kt(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,t.hasAltitude()&&(this.plotData.push({x:t.totalMeters,y:t.altitude}),(null===this.maxAltitude||t.altitude>this.maxAltitude)&&(this.maxAltitude=t.altitude),(null===this.minAltitude||t.altitude<this.minAltitude)&&(this.minAltitude=t.altitude)),t.id>this.maxId&&(this.maxId=t.id),t.hasSpeed()&&t.speed>this.maxSpeed&&(this.maxSpeed=t.speed)}}],[{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 L.get("utils/gettracks.php",{userid:t.id}).then((function(e){var r,i=[],o=kt(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 L.post("utils/import.php",t).then((function(t){var r,i=[],o=kt(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:"getMeta",value:function(t){return n.update({action:"getmeta",trackid:t})}},{key:"update",value:function(t){return L.post("utils/handletrack.php",t)}}]),n}(wt);function Lt(t,e){var n=void 0!==p()&&m()(t)||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return Tt(t,e);var r=c()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return h()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Tt(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||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var Ot=function(t){I(n,t);var e=Mt(n);function n(t,r){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(o(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=a,i.listItem(t,r),i}return l(n,[{key:"isEqualTo",value:function(t){return!!t&&t.id===this.id}},{key:"fetchLastPosition",value:function(){return At.fetchLatest(this)}},{key:"delete",value:function(){return n.update({action:"delete",login:this.login})}},{key:"setPassword",value:function(t,e){return L.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 L.get("utils/getusers.php").then((function(t){var e,r=[],i=Lt(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 L.post("utils/handleuser.php",t)}}]),n}(at),Pt=function(){function t(){o(this,t),this._isAdmin=!1,this._isAuthenticated=!1,this._user=null}return l(t,[{key:"user",get:function(){return this._user},set:function(t){t?(this._user=t,this._isAuthenticated=!0):(this._user=null,this._isAuthenticated=!1,this._isAdmin=!1)}},{key:"isAdmin",get:function(){return this._isAdmin},set:function(t){if(!this._user)throw new Error("No authenticated user");this._isAdmin=t}},{key:"isAuthenticated",get:function(){return this._isAuthenticated}},{key:"load",value:function(t){t&&t.isAuthenticated&&(this.user=new Ot(t.userId,t.userLogin),this.isAdmin=t.isAdmin)}}]),t}(),_t=i(6824),It=i.n(_t),Ct=i(9533),jt=i(8889);var Rt=i(6460),Ut=i(4061);function Nt(){if("undefined"==typeof Reflect||!Rt)return!1;if(Rt.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Rt(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Dt(t,e,n){return(Dt=Nt()?Rt:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Ut(Function).apply(t,r));return n&&_(i,n.prototype),i}).apply(null,arguments)}function zt(t){var e="function"==typeof Ct?new Ct:void 0;return(zt=function(t){if(null===t||(n=t,-1===jt(r=Function.toString.call(n)).call(r,"[native code]")))return t;var n,r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return Dt(t,arguments,R(this).constructor)}return i.prototype=O(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),_(i,t)})(t)}var Bt=i(509),Vt=i.n(Bt);function Ft(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var Ht=function(t){I(n,t);var e=Ft(n);function n(t,r,i,a){var s;return o(this,n),(s=e.call(this)).id=t,s.name=r,s.url=i,s.priority=a,s.listItem(t,r),s}return l(n,[{key:"setName",value:function(t){this.name=t,this.listItem(this.id,this.name)}},{key:"setUrl",value:function(t){this.url=t}}]),n}(at);function qt(t,e){var n=void 0!==p()&&m()(t)||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return Gt(t,e);var r=c()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return h()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Gt(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 Xt(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var Yt=function(t){I(n,t);var e=Xt(n);function n(){return o(this,n),e.apply(this,arguments)}return l(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 Ht(t,e,n,r))}},{key:"delete",value:function(t){var e=ft()(this).call(this,(function(t){return t.id})).indexOf(t);Vt()(this).call(this,e,1)}},{key:"get",value:function(t){return G()(this).call(this,(function(e){return e.id===t}))}},{key:"getMaxId",value:function(){var t;return Math.max.apply(Math,r()(t=H(ft()(this).call(this,(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}(zt(Array)),Wt=function(){function t(){o(this,t),this.initialize()}return l(t,[{key:"initialize",value:function(){this.interval=10,this.units="metric",this.lang="en",this.mapApi="openlayers",this.googleKey="",this.olLayers=new Yt,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.uploadMaxSize=0,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",this.unitAltitude="unitamsl"}},{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=this;return this.load(t),t=It()(e=vt()(this)).call(e,(function(t){return"function"!=typeof n[t]})).reduce((function(t,e){return t[e]=n[e],t}),{}),L.post("utils/saveconfig.php",t)}},{key:"reinitialize",value:function(){nt.unobserveAll(this),this.initialize()}},{key:"onChanged",value:function(t,e){nt.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}(),Zt=i(222),Jt=i.n(Zt),$t=i(589),Kt=i.n($t),Qt=function(){function t(){o(this,t),this.strings={},this.config=null}return l(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),i=1;i<e;i++)n[i-1]=arguments[i];var o;return n.length?mt.sprintf.apply(mt,r()(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){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Math.round(t*this.config.factorSpeed*100)/100,r=n.toLocaleString(this.config.lang);return e&&(r+=" ".concat(this.unit("unitSpeed"))),r}},{key:"getLocaleDistanceMajor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Math.round(t*this.config.factorDistanceMajor/10)/100,r=n.toLocaleString(this.config.lang);return e&&(r+=" ".concat(this.unit("unitDistanceMajor"))),r}},{key:"getLocaleDistance",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Math.round(t*this.config.factorDistance*100)/100,r=n.toLocaleString(this.config.lang);return e&&(r+=" ".concat(this.unit("unitDistance"))),r}},{key:"getLocaleAltitude",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getLocaleDistance(t,e);return e&&(n+=" ".concat(this.unit("unitAltitude"))),n.replace("-","")}},{key:"getLocaleAccuracy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getLocaleDistance(t,e)}},{key:"getLocaleDuration",value:function(t){var e,n,i,o,a=Math.floor(t/86400),s=Math.floor(t%86400/3600),l=Math.floor(t%86400%3600/60);return t=t%86400%3600%60,(a>0?r()(e="".concat(a," ")).call(e,this.unit("unitDay")," "):"")+c()(n="00".concat(s)).call(n,-2)+":"+c()(i="00".concat(l)).call(i,-2)+":"+c()(o="00".concat(t)).call(o,-2)}},{key:"getLocaleCoordinates",value:function(t){var e;return r()(e="".concat(this.coordStr(t.longitude,!0)," ")).call(e,this.coordStr(t.latitude,!1))}},{key:"coordStr",value:function(t,e){var n,i,o,a=Jt()(t),s=Math.round(100*(Math.abs(60*(t-a))+Kt()))/100;return o=e?t<0?"W":"E":t<0?"S":"N",r()(n=r()(i="".concat(Math.abs(a).toLocaleString(this.config.lang),"°")).call(i,s.toLocaleString(this.config.lang,{maximumFractionDigits:2}),"'")).call(n,o)}},{key:"getLocalePassRules",value:function(){var t="";return this.config.passLenMin>0&&(t=mt.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}(),te=function(){function t(){o(this,t),this.auth=new Pt,this.config=new Wt,this.lang=new Qt}return l(t,[{key:"initialize",value:function(){var t=this;return L.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(e())((function(t){"complete"===document.readyState||"interactive"===document.readyState?setTimeout(t,1):document.addEventListener("DOMContentLoaded",t)}))}}]),t}(),ee=new te,ne=ee.config,re=ee.lang,ie=ee.auth,oe=i(274),ae=i.n(oe),se=function(){function t(e){o(this,t),this._model=e,this.root=document}return l(t,[{key:"model",get:function(){return this._model}},{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)this._model.hasOwnProperty(e)&&this.bind(e)}},{key:"bind",value:function(t){var e=this,n="bind";this.root.querySelectorAll("[data-".concat(n,"]")).forEach((function(n){n.dataset.bind===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]})),nt.observe(this.model,e,(function(e){e=i(e),t[r]!==e&&(t[r]=e)}))}},{key:"viewUpdateBind",value:function(t,e){nt.observe(this.model,e,(function(e){t.innerHTML!==e&&(t.innerHTML=e)}))}},{key:"onChanged",value:function(t,e){nt.observe(this.model,t,e)}},{key:"unsubscribe",value:function(t,e){nt.unobserve(this.model,t,e)}},{key:"getBoundElement",value:function(t){return this.root.querySelector("[data-bind='".concat(t,"']"))}}]),t}(),le=i(5826),ue=i.n(le);function ce(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var fe=1e3,he=function(t){I(n,t);var e=ce(n);function n(t){var r;return o(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 l(n,[{key:"init",value:function(){return this.chartSetup(),this.setObservers(),this.bindAll(),this}},{key:"chartSetup",value:function(){var t,e,n=this;mt.addCss("css/dist/chartist.css","chartist_css"),this.chart=new(ae().Line)(this.chartElement,{series:[this.data]},{lineSmooth:!0,showArea:!0,axisX:{type:ae().AutoScaleAxis,onlyInteger:!0,showLabel:!1},plugins:[ue()({axisY:{axisTitle:r()(t=r()(e="".concat(re._("altitude")," (")).call(e,re.unit("unitDistance")," ")).call(t,re.unit("unitAltitude"),")"),axisClass:"ct-axis-title",offset:{x:0,y:11},textAnchor:"middle",flipTitle:!0}})]}),this.chart.on("created",(function(){return n.onCreated()}))}},{key:"onCreated",value:function(){var t=this;if(this.data.length&&this.data.length<=fe){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&&nt.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){t?this.buttonElement.classList.remove("menu-hidden"):this.buttonElement.classList.add("menu-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 i;r()(i="Chart".concat(e?" forced":""," update (")).call(i,n.length,")"),this.data=n;var o={lineSmooth:n.length<=fe};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){this.model.chartVisible&&this.chartPoints&&this.chartPoints.forEach((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}(se);function de(t,e){return function(t){if(D(t))return t}(t)||function(t,e){var n=null==t?null:void 0!==y&&v(t)||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||F(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var pe=i(9989),ve=i.n(pe),me=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(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=mt.nodeFromHtml(i),r.id&&(this.box.id=r.id),r.class&&this.box.classList.add(r.class),this.hasButton){var a=document.createElement("button");a.setAttribute("type","button"),a.textContent="×",a.onclick=function(){return n.destroy()},this.box.appendChild(a)}this.closeHandle=null}return l(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),setTimeout((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"),setTimeout((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=setTimeout((function(){return r.destroy()}),r.autoClose)),r}},{key:"error",value:function(t,e){var n,i;e instanceof Error&&console.error(r()(n=r()(i="".concat(e.name,": ")).call(i,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 ye(t,e){var n=void 0!==p()&&m()(t)||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return ge(t,e);var r=c()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return h()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ge(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ge(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 be=function(){function t(e){o(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 a=document.createElement("img");a.setAttribute("src","images/close.svg"),a.setAttribute("alt",re._("close")),i.append(a),r.append(i);var s=document.createElement("div");if(s.setAttribute("id","modal-body"),"string"==typeof e)s.innerHTML=e;else if(e instanceof NodeList||e instanceof Array){var l,u=ye(e);try{for(u.s();!(l=u.n()).done;){var c=l.value;s.append(c)}}catch(t){u.e(t)}finally{u.f()}}else s.append(e);s.prepend(r),n.append(s),this.element=n,this.visible=!1}return l(t,[{key:"show",value:function(){this.visible||(document.body.append(this.element),this.visible=!0,this.autofocus())}},{key:"autofocus",value:function(){var t=this.element.querySelector("[autofocus]");t&&t.focus()}},{key:"destroy",value:function(){document.body.removeChild(this.element),this.visible=!1}}],[{key:"isConfirmed",value:function(t){return confirm(t)}}]),t}();function xe(t,e){var n=void 0!==p()&&m()(t)||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return we(t,e);var r=c()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return h()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return we(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function we(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 ke(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var Se=function(t){I(n,t);var e=ke(n);function n(){var t,i;return o(this,n),(i=e.call(this,{colorExtra:ne.colorExtra,colorHilite:ne.colorHilite,colorNormal:ne.colorNormal,colorStart:ne.colorStart,colorStop:ne.colorStop,googleKey:ne.googleKey,initLatitude:ne.initLatitude,initLongitude:ne.initLongitude,interval:ne.interval,lang:ne.lang,layerId:0,layerName:null,layers:Dt(Yt,r()(t=[new Ht(0,"OpenStreetMap","",0)]).call(t,H(ne.olLayers))),layerUrl:null,mapApi:ne.mapApi,passLenMin:ne.passLenMin,passStrength:ne.passStrength,publicTracks:ne.publicTracks,requireAuth:ne.requireAuth,strokeColor:ne.strokeColor,strokeOpacity:ne.strokeOpacity,strokeWeight:ne.strokeWeight,units:ne.units,uploadMaxSize:ne.uploadMaxSize,uploadMaxSizeMB:ne.uploadMaxSize/1024/1024})).model.onCancel=function(){return i.onCancel()},i.model.onSave=function(){return i.onSave()},i.model.onLayerUpdate=function(){return i.onLayerUpdate()},i.model.onLayerCancel=function(){return i.onLayerCancel()},i.model.onLayerEdit=function(){return i.onLayerEdit()},i.model.onLayerDelete=function(){return i.onLayerDelete()},i.model.onLayerAdd=function(){return i.onLayerAdd()},i}return l(n,[{key:"init",value:function(){var t=this,e=this.getHtml();this.dialog=new be(e),this.dialog.show(),this.bindAll(this.dialog.element),this.toggleEditEl=this.getBoundElement("onLayerEdit").parentNode,this.layerEditEl=this.getBoundElement("layerName").parentNode,this.layerSelect=new ot(this.getBoundElement("layerId")),this.setPublicTracksActivity(this.model.requireAuth),this.toggleEditVisible(),this.onChanged("layerId",(function(e){var n=t.model.layers.get(parseInt(e));t.model.layerName=n?n.name:"",t.model.layerUrl=n?n.url:"",t.toggleEditVisible()})),this.model.layerId=ne.olLayers.getPriorityLayer().toString(),this.onChanged("uploadMaxSizeMB",(function(e){t.model.uploadMaxSize=1024*e*1024})),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(parseInt(this.model.layerId)),ne.save(this.model).then((function(){return t.dialog.destroy()})).catch((function(t){var e;me.error(r()(e="".concat(re._("actionfailure"),"\n")).call(e,t.message),t)})))}},{key:"validate",value:function(){return this.dialog.element.querySelector("form").checkValidity()}},{key:"toggleEditVisible",value:function(){parseInt(this.model.layerId)>0?this.toggleEditEl.style.visibility="visible":(this.toggleEditEl.style.visibility="hidden",this.hideEditElement())}},{key:"onLayerDelete",value:function(){this.model.layers.delete(parseInt(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(parseInt(this.model.layerId))}},{key:"getHtml",value:function(){for(var t,e,n,i,o,a,s,l,u,c,f,h,d,p,v,m,y,g,b,x,w,k,S,E,A,L,T,M,O,P,_,I,C,j,R,U,N,D,z,B,V,F,H,q,G,X,Y,W,Z,J,$,K,Q,tt,et,nt,rt="",it=0,ot=ve()(re.getLangList());it<ot.length;it++){var at,st,lt=de(ot[it],2),ut=lt[0],ct=lt[1];rt+=r()(at=r()(st='<option value="'.concat(ut,'"')).call(st,this.model.lang===ut?" selected":"",">")).call(at,ct,"</option>")}for(var ft="",ht=0,dt=["metric","imperial","nautical"];ht<dt.length;ht++){var pt,vt,mt=dt[ht];ft+=r()(pt=r()(vt='<option value="'.concat(mt,'"')).call(vt,this.model.units===mt?" selected":"",">")).call(pt,re._(mt),"</option>")}var yt,gt="",bt=xe(this.model.layers);try{for(bt.s();!(yt=bt.n()).done;){var xt,wt,kt=yt.value;gt+=r()(xt=r()(wt='<option value="'.concat(kt.id,'"')).call(wt,kt.priority>0?" selected":"",">")).call(xt,kt.name,"</option>")}}catch(t){bt.e(t)}finally{bt.f()}return r()(t=r()(e=r()(n=r()(i=r()(o=r()(a=r()(s=r()(l=r()(u=r()(c=r()(f=r()(h=r()(d=r()(p=r()(v=r()(m=r()(y=r()(g=r()(b=r()(x=r()(w=r()(k=r()(S=r()(E=r()(A=r()(L=r()(T=r()(M=r()(O=r()(P=r()(_=r()(I=r()(C=r()(j=r()(R=r()(U=r()(N=r()(D=r()(z=r()(B=r()(V=r()(F=r()(H=r()(q=r()(G=r()(X=r()(Y=r()(W=r()(Z=r()(J=r()($=r()(K=r()(Q=r()(tt=r()(et=r()(nt='<div><img style="vertical-align: bottom; margin-right: 10px;" src="images/settings.svg" alt="'.concat(re._("settings"),'"> <b>')).call(nt,re._("editingconfig"),'</b></div>\n <div style="clear: both; padding-bottom: 1em;"></div>\n <form id="configForm">\n <label><b>')).call(et,re._("language"),'</b>\n <select data-bind="lang">\n ')).call(tt,rt,"\n </select></label>\n <label><b>")).call(Q,re._("units"),'</b>\n <select data-bind="units">\n ')).call(K,ft,"\n </select></label>\n <label><b>")).call($,re._("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(Z,"gmaps"===this.model.mapApi?" selected":"",">Google Maps</option>\n </select></label>\n <label><b>")).call(W,re._("ollayers"),'</b>\n <select data-bind="layerId">\n ')).call(Y,gt,'\n </select>\n <a data-bind="onLayerAdd"><img src="images/add.svg" alt="')).call(X,re._("add"),'"></a> \n <span style="visibility: hidden;">\n <a data-bind="onLayerEdit"><img src="images/edit.svg" alt="')).call(G,re._("edit"),'"></a> \n <a data-bind="onLayerDelete"><img src="images/delete.svg" alt="')).call(q,re._("delete"),'"></a>\n </span></label>\n <div style="display: none; text-align: center;">\n <input type="text" maxlength="50" placeholder="')).call(H,re._("layername"),'" data-bind="layerName">\n <input type="text" maxlength="255" placeholder="')).call(F,re._("layerurl"),'" data-bind="layerUrl">\n <button class="button-resolve" data-bind="onLayerUpdate" type="submit">')).call(V,re._("submit"),'</button>\n <button class="button-reject" data-bind="onLayerCancel" type="button">')).call(B,re._("cancel"),"</button>\n </div>\n <label><b>")).call(z,re._("interval"),'</b>\n <input type="number" data-bind="interval" min="1" value="')).call(D,this.model.interval,'" required></label>\n <label><b>')).call(N,re._("longitude"),'</b>\n <input type="number" data-bind="initLongitude" min="-180" max="180" step="0.01" value="')).call(U,this.model.initLongitude,'" required></label>\n <label><b>')).call(R,re._("latitude"),'</b>\n <input type="number" data-bind="initLatitude" min="-90" max="90" step="0.01" value="')).call(j,this.model.initLatitude,'" required></label>\n <label><b>')).call(C,re._("googlekey"),'</b>\n <input type="text" data-bind="googleKey" value="')).call(I,this.model.googleKey,'"></label>\n <label><b>')).call(_,re._("passlength"),'</b>\n <input type="number" data-bind="passLenMin" min="1" value="')).call(P,this.model.passLenMin,'" required></label>\n <label><b>')).call(O,re._("passstrength"),'</b>\n <select data-bind="passStrength">\n <option value="0"')).call(M,0===this.model.passStrength?" selected":"",'>password</option>\n <option value="1"')).call(T,1===this.model.passStrength?" selected":"",'>paSsword</option>\n <option value="2"')).call(L,2===this.model.passStrength?" selected":"",'>paSsword1</option>\n <option value="3"')).call(A,3===this.model.passStrength?" selected":"",">paSsword1#</option>\n </select></label>\n <label><b>")).call(E,re._("uploadmaxsize"),'</b>\n <input type="number" data-bind="uploadMaxSizeMB" min="1" value="')).call(S,this.model.uploadMaxSizeMB,'" required></label>\n <label><b>')).call(k,re._("requireauth"),'</b>\n <input type="checkbox" data-bind="requireAuth"')).call(w,this.model.requireAuth?" checked":"","></label>\n <label><b>")).call(x,re._("publictracks"),'</b>\n <input type="checkbox" data-bind="publicTracks"')).call(b,this.model.publicTracks?" checked":"","></label>\n <label><b>")).call(g,re._("strokeweight"),'</b>\n <input type="number" data-bind="strokeWeight" min="1" value="')).call(y,this.model.strokeWeight,'" required></label>\n <label><b>')).call(m,re._("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,re._("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,re._("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(c,re._("colorstart"),'</b>\n <input type="color" data-bind="colorStart" pattern="#[0-9a-f]{6}" maxlength="7" value="')).call(u,this.model.colorStart,'" required></label>\n <label><b>')).call(l,re._("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,re._("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(i,re._("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,re._("cancel"),'</button>\n <button class="button-resolve" data-bind="onSave" type="submit">')).call(t,re._("submit"),"</button>\n </div>\n </form>")}}]),n}(se);function Ee(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var Ae=function(t){I(n,t);var e=Ee(n);function n(t){var r;return o(this,n),(r=e.call(this,ne)).state=t,r.model.onSetInterval=function(){return r.setAutoReloadInterval()},r.model.onConfigEdit=function(){return r.showConfigDialog()},r}return l(n,[{key:"init",value:function(){return this.setObservers(),this.bindAll(),this}},{key:"setObservers",value:function(){this.onChanged("mapApi",(function(t){mt.setCookie("api",t)})),this.onChanged("lang",(function(t){mt.setCookie("lang",t),n.reload()})),this.onChanged("units",(function(t){mt.setCookie("units",t),n.reload()})),this.onChanged("interval",(function(t){mt.setCookie("interval",t)}))}},{key:"setAutoReloadInterval",value:function(){var t=parseInt(prompt(re._("newinterval")));isNaN(t)||t===this.model.interval||(this.model.interval=t)}},{key:"showConfigDialog",value:function(){new Se(this).init()}}],[{key:"reload",value:function(){window.location.reload()}}]),n}(se);function Le(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var Te,Me="menu-hidden",Oe=function(t){I(n,t);var e=Le(n);function n(t){var r;return o(this,n),(r=e.call(this,{onMenuToggle:null,onShowUserMenu:null,onLogin:null,onLogout:null})).state=t,r.model.onMenuToggle=function(){return r.toggleSideMenu()},r.model.onShowUserMenu=function(){return r.toggleUserMenu()},r.model.onLogin=function(){return n.login()},r.model.onLogout=function(){return n.logout()},r.hideUserMenuCallback=function(t){return r.hideUserMenu(t)},r.menuEl=document.querySelector("#menu"),r.userMenuEl=document.querySelector("#user-menu"),r}return l(n,[{key:"init",value:function(){return this.bindAll(),this}},{key:"toggleSideMenu",value:function(){this.menuEl.classList.contains(Me)?this.menuEl.classList.remove(Me):this.menuEl.classList.add(Me)}},{key:"toggleUserMenu",value:function(){this.userMenuEl.classList.contains(Me)?(this.userMenuEl.classList.remove(Me),window.addEventListener("click",this.hideUserMenuCallback,!0)):this.userMenuEl.classList.add(Me)}},{key:"hideUserMenu",value:function(t){var e=t.target;this.userMenuEl.classList.add(Me),window.removeEventListener("click",this.hideUserMenuCallback,!0),"user-menu"!==e.parentElement.id&&t.stopPropagation()}}],[{key:"login",value:function(){mt.openUrl("login.php".concat(window.location.hash))}},{key:"logout",value:function(){var t="utils/logout.php";ne.requireAuth||(t+="?hash=".concat(window.location.hash.replace("#",""))),mt.openUrl(t)}}]),n}(se),Pe=function(){function t(e){o(this,t),this.map=null,this.viewModel=e,this.polies=[],this.markers=[],this.popup=null,this.timeoutHandle=0}return l(t,[{key:"init",value:function(){var n=this,r="?".concat(ne.googleKey?"key=".concat(ne.googleKey,"&"):"","callback=gm_loaded");return e().all([t.onScriptLoaded(),mt.loadScript("https://maps.googleapis.com/maps/api/js".concat(r),"mapapi_gmaps",t.loadTimeoutMs)]).then((function(){return n.initMap()}))}},{key:"initMap",value:function(){var t=this,e={center:new google.maps.LatLng(ne.initLatitude,ne.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()})),this.saveState=function(){t.viewModel.state.mapParams=t.getState()}}},{key:"cleanup",value:function(){this.polies.length=0,this.markers.length=0,this.popup=null,ft()(this)&&ft()(this).getDiv()&&(ft()(this).getDiv().innerHTML=""),this.map=null}},{key:"displayTrack",value:function(t,n){var r=this;if(!t||!t.hasPositions)return e().resolve();google.maps.event.clearListeners(ft()(this),"idle");var i,o=new(e())((function(t){google.maps.event.addListenerOnce(ft()(r),"tilesloaded",(function(){ft()(r)&&(r.saveState(),ft()(r).addListener("idle",r.saveState)),t()}))})),a={strokeColor:ne.strokeColor,strokeOpacity:ne.strokeOpacity,strokeWeight:ne.strokeWeight},s=new google.maps.LatLngBounds;if(this.polies.length){i=this.polies[0];for(var l=0;l<this.markers.length;l++)s.extend(this.markers[l].getPosition())}else(i=new google.maps.Polyline(a)).setMap(ft()(this)),this.polies.push(i);var u=i.getPath(),c=this.markers.length;c>0&&this.removePoint(--c);for(var f=c;f<t.length;f++){this.setMarker(f,t);var h=t.positions[f],d=new google.maps.LatLng(h.latitude,h.longitude);t instanceof At&&u.push(d),s.extend(d)}if(n&&(ft()(this).fitBounds(s),1===t.length)){var p=google.maps.event.addListenerOnce(ft()(this),"bounds_changed",(function(){this.getZoom()&&this.setZoom(15)}));setTimeout((function(){google.maps.event.removeListener(p)}),2e3)}return o}},{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:ft()(this)}),s=o.hasComment()||o.hasImage();r=n.isLastPosition(e)?t.getMarkerIcon(ne.colorStop,!0,s):n.isFirstPosition(e)?t.getMarkerIcon(ne.colorStart,!0,s):t.getMarkerIcon(s?ne.colorExtra:ne.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),Vt()(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(ft()(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(ne.colorHilite,!1,!1)),this.markers[e].setAnimation(google.maps.Animation.BOUNCE),this.timeoutHandle=setTimeout((function(){n.markers[e].setIcon(r),n.markers[e].setAnimation(null)}),2e3)}},{key:"getBounds",value:function(){var t=ft()(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());ft()(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);ft()(this).fitBounds(r)}},{key:"isPositionVisible",value:function(t){return!(t>=this.markers.length)&&ft()(this).getBounds().contains(this.markers[t].getPosition())}},{key:"centerToPosition",value:function(t){t<this.markers.length&&ft()(this).setCenter(this.markers[t].getPosition())}},{key:"updateSize",value:function(){}},{key:"setTrackDefaultStyle",value:function(){}},{key:"setTrackGradientStyle",value:function(t,e,n){}},{key:"updateState",value:function(t){ft()(this).setCenter({lat:t.center[0],lng:t.center[1]}),ft()(this).setZoom(t.zoom)}},{key:"getState",value:function(){if(ft()(this)){var t=ft()(this).getCenter();return{center:[t.lat(),t.lng()],zoom:ft()(this).getZoom(),rotation:0}}return null}},{key:"saveState",value:function(){}}],[{key:"onScriptLoaded",value:function(){var n=mt.timeoutPromise(t.loadTimeoutMs),r=new(e())((function(e,n){window.gm_loaded=function(){t.gmInitialized=!0,e()},window.gm_authFailure=function(){t.authError=!0;var e=re._("apifailure","Google Maps");e+="<br><br>"+re._("gmauthfailure"),e+="<br><br>"+re._("gmapilink"),t.gmInitialized&&me.error(e),n(new Error(e))},t.authError&&window.gm_authFailure(),t.gmInitialized&&window.gm_loaded()}));return e().race([r,n])}},{key:"getMarkerIcon",value:function(t,e,n){return{anchor:new google.maps.Point(15,35),url:De.getSvgSrc(t,e,n)}}},{key:"loadTimeoutMs",get:function(){return 1e4}}]),t}();function _e(t,e){var n=void 0!==p()&&m()(t)||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){var n;if(!t)return;if("string"==typeof t)return Ie(t,e);var r=c()(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return h()(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ie(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ie(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}Pe.authError=!1,Pe.gmInitialized=!1;var Ce=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;o(this,t),this.map=null,this.viewModel=e,this.layerTrack=null,this.layerMarkers=null,this.selectedLayer=null,this.markerStyles=null,this.popup=null,n&&(Te=n)}return l(t,[{key:"init",value:function(){var t=this;return mt.addCss("css/dist/ol.css","ol_css"),(Te?e().resolve():i.e(521).then(i.bind(i,3260)).then((function(t){Te=t}))).then((function(){t.initMap(),t.initLayers(),t.initStyles(),t.initPopups()}))}},{key:"initMap",value:function(){var t=this,e=[new Te.control.Zoom,new Te.control.Rotate,new Te.control.ScaleLine],n=new Te.View({center:Te.proj.fromLonLat([ne.initLongitude,ne.initLatitude]),zoom:8});this.map=new Te.Map({target:this.viewModel.mapElement,controls:e,view:n}),ft()(this).on("pointermove",(function(e){var n=ft()(t).forEachFeatureAtPixel(e.pixel,(function(t,e){return"Markers"===e.get("name")?t:null}));if(n){ft()(t).getTargetElement().style.cursor="pointer";var r=n.getId();r!==t.viewModel.model.markerOver&&(t.viewModel.model.markerOver=r)}else ft()(t).getTargetElement().style.cursor="",t.viewModel.model.markerOver=null})),this.saveState=function(){t.viewModel.state.mapParams=t.getState()}}},{key:"initLayers",value:function(){var t=new Te.layer.TileLayer({name:"OpenStreetMap",visible:!0,source:new Te.source.OSM});ft()(this).addLayer(t),this.selectedLayer=t;var e,n=_e(ne.olLayers);try{for(n.s();!(e=n.n()).done;){var r=e.value,i=new Te.layer.TileLayer({name:r.name,visible:!1,source:new Te.source.XYZ({url:r.url})});ft()(this).addLayer(i),r.priority&&(this.selectedLayer.setVisible(!1),this.selectedLayer=i,this.selectedLayer.setVisible(!0))}}catch(t){n.e(t)}finally{n.f()}this.layerTrack=new Te.layer.VectorLayer({name:"Track",type:"data",source:new Te.source.Vector}),this.layerMarkers=new Te.layer.VectorLayer({name:"Markers",type:"data",source:new Te.source.Vector}),ft()(this).addLayer(this.layerTrack),ft()(this).addLayer(this.layerMarkers),this.initLayerSwitcher()}},{key:"initStyles",value:function(){var t=[.5,1];this.markerStyles={start:new Te.style.Style({image:new Te.style.Icon({anchor:t,src:De.getSvgSrc(ne.colorStart,!0)})}),stop:new Te.style.Style({image:new Te.style.Icon({anchor:t,src:De.getSvgSrc(ne.colorStop,!0)})}),normal:new Te.style.Style({image:new Te.style.Icon({anchor:t,opacity:.7,src:De.getSvgSrc(ne.colorNormal,!1)})}),extra:new Te.style.Style({image:new Te.style.Icon({anchor:t,src:De.getSvgSrc(ne.colorExtra,!1,!0)})}),startExtra:new Te.style.Style({image:new Te.style.Icon({anchor:t,src:De.getSvgSrc(ne.colorStart,!0,!0)})}),stopExtra:new Te.style.Style({image:new Te.style.Icon({anchor:t,src:De.getSvgSrc(ne.colorStop,!0,!0)})}),hilite:new Te.style.Style({image:new Te.style.Icon({anchor:t,src:De.getSvgSrc(ne.colorHilite,!1)})})}}},{key:"setTrackDefaultStyle",value:function(){var t=new Te.style.Style({stroke:new Te.style.Stroke({color:mt.hexToRGBA(ne.strokeColor,ne.strokeOpacity),width:ne.strokeWeight})});this.layerTrack.setStyle(t)}},{key:"getGradientStyle",value:function(t,e,n){var r=ft()(this).getPixelFromCoordinate(e[0]),i=ft()(this).getPixelFromCoordinate(e[1]),o=window.devicePixelRatio,a=r[0]*o,s=r[1]*o,l=i[0]*o,u=i[1]*o,c=t.createLinearGradient(a,s,l,u);return c.addColorStop(0,n[0]),c.addColorStop(1,n[1]),new Te.style.Style({geometry:new Te.geom.LineString(e),stroke:new Te.style.Stroke({color:c,width:2*ne.strokeWeight})})}},{key:"setTrackGradientStyle",value:function(t,e,n){var r=this,i=n.minValue,o=n.maxValue,a=n.minColor,s=n.maxColor;if(t.length<2||o<i)this.setTrackDefaultStyle();else{var l=document.createElement("canvas",{alpha:!1,desynchronized:!0}).getContext("2d");this.layerTrack.setStyle((function(n){var u=[new Te.style.Style({stroke:new Te.style.Stroke({color:"grey",width:2*ne.strokeWeight+2})})],c=n.getGeometry();if(i===o)return u.push(new Te.style.Style({geometry:c,stroke:new Te.style.Stroke({color:mt.getScaleColor(a,s,.5),width:2*ne.strokeWeight})})),u;var f=t.positions[0],h=null!==f[e]?f[e]:0,d=mt.getScaleColor(a,s,(h-i)/(o-i)),p=1;return c.forEachSegment((function(n,c){var h;h=null!==(f=t.positions[p])[e]?mt.getScaleColor(a,s,(f[e]-i)/(o-i)):d,u.push(r.getGradientStyle(l,[n,c],[d,h])),d=h,p++})),u}))}}},{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 Te.Overlay({element:e,autoPan:!0,autoPanAnimation:{duration:250}}),ft()(this).addOverlay(this.popup),r.onclick=function(){return t.popupClose(),r.blur(),!1},ft()(this).on("click",(function(e){var n=e.coordinate,r=ft()(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=this;ft()(this).getLayers().forEach((function(n){n.get("name")===t&&("data"===n.get("type")?n.getVisible()?n.setVisible(!1):n.setVisible(!0):(e.selectedLayer.setVisible(!1),e.selectedLayer=n,n.setVisible(!0)))}))}},{key:"initLayerSwitcher",value:function(){var t=this,e=document.createElement("div");e.id="switcher",e.className="ol-control",document.body.appendChild(e);var n=document.createElement("div");n.id="switcher-content",n.className="ol-layerswitcher",e.appendChild(n);var r=document.createElement("a");r.className="ol-popup-closer",e.appendChild(r),ft()(this).getLayers().forEach((function(e){var r=document.createElement("label");r.innerHTML=e.get("name"),n.appendChild(r);var i=document.createElement("input");"data"===e.get("type")?(i.type="checkbox",r.className="ol-datalayer"):i.type="radio",i.name="layer",i.value=e.get("name"),i.onclick=function(e){var n=e.target;t.switchLayer(n.value)},e.getVisible()&&(i.checked=!0),r.insertBefore(i,r.childNodes[0])}));var i=document.createElement("button"),o=document.createElement("img");o.src="images/layers.svg",o.style.width="60%",i.appendChild(o);var a=function(){"block"===e.style.display?e.style.display="none":e.style.display="block"};r.addEventListener("click",a,!1),i.addEventListener("click",a,!1),i.addEventListener("touchstart",a,!1);var s=document.createElement("div");s.className="ol-switcher-button ol-unselectable ol-control",s.appendChild(i);var l=new Te.control.Control({element:s});ft()(this).addControl(l)}},{key:"cleanup",value:function(){this.layerTrack=null,this.layerMarkers=null,this.selectedLayer=null,this.markerStyles=null,mt.removeElementById("switcher"),ft()(this)&&ft()(this).getTargetElement()&&(ft()(this).getTargetElement().innerHTML=""),this.map=null}},{key:"displayTrack",value:function(t,n){var r=this;if(!t||!t.hasPositions)return e().resolve();ft()(this).un("moveend",this.saveState);var i=new(e())((function(t){ft()(r).once("rendercomplete",(function(){ft()(r)&&(r.saveState(),ft()(r).on("moveend",r.saveState)),t()}))})),o=this.layerMarkers?this.layerMarkers.getSource().getFeatures().length:0;o>0&&this.removePoint(--o);for(var a=o;a<t.length;a++)this.setMarker(a,t);if(t instanceof At){var s;if(this.layerTrack&&this.layerTrack.getSource().getFeatures().length)s=this.layerTrack.getSource().getFeatures()[0].getGeometry();else{s=new Te.geom.LineString([]);var l=new Te.Feature({geometry:s});this.layerTrack.getSource().addFeature(l)}for(var u=o;u<t.length;u++){var c=t.positions[u];s.appendCoordinate(Te.proj.fromLonLat([c.longitude,c.latitude]))}}var f=this.layerMarkers.getSource().getExtent();return n&&(f=this.fitToExtent(f)),this.setZoomToExtent(f),i}},{key:"setZoomToExtent",value:function(e){var n=this;ft()(this).getControls().forEach((function(t){t instanceof Te.control.ZoomToExtent&&ft()(n).removeControl(t)})),ft()(this).addControl(new Te.control.ZoomToExtent({extent:e,label:t.getExtentImg()}))}},{key:"fitToExtent",value:function(e){return ft()(this).getView().fit(e,{padding:t.TRACK_PADDING,maxZoom:t.ZOOM_MAX}),ft()(this).getView().calculateExtent()}},{key:"isPositionVisible",value:function(t){var e=ft()(this).getView().calculateExtent(),n=this.layerMarkers.getSource().getFeatureById(t).getGeometry();return!!n&&Te.extent.containsCoordinate(e,n.getCoordinates())}},{key:"centerToPosition",value:function(t){var e=this.layerMarkers.getSource().getFeatureById(t).getGeometry();e&&("Setting center to position ".concat(t),ft()(this).getView().setCenter(e.getCoordinates()))}},{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 Te.Feature({geometry:new Te.geom.Point(Te.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();Vt()(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),setTimeout((function(){return e.setStyle(n)}),2e3)}},{key:"getBounds",value:function(){var t=ft()(this).getView().calculateExtent(),e=Te.proj.toLonLat([t[0],t[1]]),n=Te.proj.toLonLat([t[2],t[3]]);return[e[0],e[1],n[0],n[1]]}},{key:"zoomToExtent",value:function(){this.fitToExtent(this.layerMarkers.getSource().getExtent())}},{key:"zoomToBounds",value:function(t){var e=Te.proj.fromLonLat([t[0],t[1]]),n=Te.proj.fromLonLat([t[2],t[3]]);ft()(this).getView().fit([e[0],e[1],n[0],n[1]])}},{key:"updateSize",value:function(){ft()(this).updateSize()}},{key:"updateState",value:function(t){ft()(this).getView().setCenter(t.center),ft()(this).getView().setZoom(t.zoom),ft()(this).getView().setRotation(t.rotation)}},{key:"getState",value:function(){var t=ft()(this)?ft()(this).getView():null;return t?{center:t.getCenter(),zoom:t.getZoom(),rotation:t.getRotation()}:null}},{key:"saveState",value:function(){}}],[{key:"getExtentImg",value:function(){var t=document.createElement("img");return t.src="images/extent.svg",t.style.width="60%",t}}]),t}();function je(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}Ce.ZOOM_MAX=20,Ce.TRACK_PADDING=[40,10,10,10];var Re="hidden",Ue=function(t){I(i,t);var n=je(i);function i(t,e){var r;return o(this,i),(r=n.call(this,{onPositionDelete:null,onPositionUpdate:null,onCancel:null,comment:null,image:null,onImageDelete:null})).state=t,r.positionIndex=e,r.position=r.state.currentTrack.positions[e],r.model.comment=r.position.hasComment()?r.position.comment:"",r.model.image=r.position.image,r.model.onPositionDelete=function(){return r.onPositionDelete()},r.model.onPositionUpdate=function(){return r.onPositionUpdate()},r.model.onCancel=function(){return r.onCancel()},r.model.onImageDelete=function(){return r.onImageDelete()},r.onChanged("image",(function(t){t&&t!==r.position.image&&r.readImage()})),r}return l(i,[{key:"init",value:function(){var t=this.getHtml();this.dialog=new be(t),this.dialog.show(),this.bindAll(this.dialog.element),this.previewEl=this.getBoundElement("imagePreview"),this.fileEl=this.getBoundElement("image"),this.imageDeleteEl=this.getBoundElement("onImageDelete"),this.initReader()}},{key:"initReader",value:function(){var t=this;this.reader=new FileReader,this.reader.addEventListener("load",(function(){t.showThumbnail()}),!1),this.reader.addEventListener("error",(function(){t.model.image=t.position.image}),!1)}},{key:"readImage",value:function(){var t=this.fileEl.files[0];if(t){if(t.size>ne.uploadMaxSize)return me.error(re._("isizefailure",ne.uploadMaxSize)),void(this.model.image=this.position.image);this.reader.readAsDataURL(t)}}},{key:"showThumbnail",value:function(){var t=this;this.previewEl.onload=function(){return t.toggleImage()},this.previewEl.onerror=function(){me.error(re._("iuploadfailure")),t.model.image=t.position.image},this.previewEl.src=this.reader.result}},{key:"toggleImage",value:function(){this.previewEl.classList.contains(Re)?(this.previewEl.classList.remove(Re),this.imageDeleteEl.classList.remove(Re),this.fileEl.classList.add(Re)):(this.previewEl.classList.add(Re),this.imageDeleteEl.classList.add(Re),this.fileEl.classList.remove(Re))}},{key:"onImageDelete",value:function(){this.model.image=null,this.toggleImage()}},{key:"getHtml",value:function(){var t,e,n,i,o,a,s,l,u,c,f;return r()(t=r()(e=r()(n=r()(i=r()(o=r()(a=r()(s=r()(l=r()(u=r()(c=r()(f='<div class="red-button button-resolve"><b><a data-bind="onPositionDelete">'.concat(re._("delposition"),"</a></b></div>\n <div>")).call(f,re._("editingposition",this.positionIndex+1,"<b>".concat(mt.htmlEncode(this.position.trackname),"</b>")),'</div>\n <div style="clear: both; padding-bottom: 1em;"></div>\n <form id="positionForm">\n <label><b>')).call(c,re._("comment"),'</b></label><br>\n <textarea style="width:100%;" maxlength="255" rows="5" placeholder="')).call(u,re._("comment"),'" name="comment" \n data-bind="comment" autofocus>')).call(l,mt.htmlEncode(this.model.comment),"</textarea>\n <br><br>\n <label><b>")).call(s,re._("image"),'</b></label><br>\n <input type="file" name="image" data-bind="image" accept="image/png, image/jpeg, image/gif, image/bmp"')).call(a,this.position.hasImage()?' class="hidden"':"",'>\n <img style="max-width:50px; max-height:50px" data-bind="imagePreview" ')).call(o,this.position.hasImage()?'src="'.concat(this.position.getImagePath(),'"'):'class="hidden"','>\n <a data-bind="onImageDelete" ')).call(i,this.position.hasImage()?"":' class="hidden"',">")).call(n,re._("delimage"),'</a>\n <div class="buttons">\n <button class="button-reject" data-bind="onCancel" type="button">')).call(e,re._("cancel"),'</button>\n <button class="button-resolve" data-bind="onPositionUpdate" type="submit">')).call(t,re._("submit"),"</button>\n </div>\n </form>")}},{key:"onPositionDelete",value:function(){var t=this;be.isConfirmed(re._("positiondelwarn",this.positionIndex+1,mt.htmlEncode(this.position.trackname)))&&this.position.delete().then((function(){var e,n=t.state.currentTrack;t.state.currentTrack=null,Vt()(e=n.positions).call(e,t.positionIndex,1),n.recalculatePositions(),t.state.currentTrack=n,t.dialog.destroy()})).catch((function(t){var e;me.error(r()(e="".concat(re._("actionfailure"),"\n")).call(e,t.message),t)}))}},{key:"updateImage",value:function(){var t=e().resolve();return this.model.image!==this.position.image&&(t=null===this.model.image?this.position.imageDelete():this.position.imageAdd(this.fileEl.files[0])),t}},{key:"onPositionUpdate",value:function(){var t,e=this;dt()(t=this.model.comment).call(t),this.validate()&&(this.position.comment=this.model.comment,this.updateImage().then((function(){return e.position.save()})).then((function(){nt.forceUpdate(e.state,"currentTrack"),e.dialog.destroy()})).catch((function(t){var e;me.error(r()(e="".concat(re._("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&&this.model.image===this.position.image)}}]),i}(se);function Ne(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var De=function(t){I(n,t);var e=Ne(n);function n(t){var r;return o(this,n),(r=e.call(this,{markerOver:null,markerSelect:null,onMenuToggle:null,speedVisible:!1,altitudeVisible:!1})).state=t,r.mapElement=document.querySelector("#map-canvas"),r.speedEl=r.getBoundElement("speedVisible"),r.altitudeEl=r.getBoundElement("altitudeVisible"),r.styleEl=r.getBoundElement("trackColor"),r.savedBounds=null,r.api=null,r}return l(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=re._("apifailure",t);e&&e.message&&(n+=" (".concat(e.message,")")),me.error(n,e),ne.mapApi="gmaps"===t?"openlayers":"gmaps"}))}},{key:"getApi",value:function(t){return"gmaps"===t?new Pe(this):new Ce(this)}},{key:"onReady",value:function(){if(this.state.currentTrack){var t=!0;this.savedBounds&&(this.api.zoomToBounds(this.savedBounds),t=!1),this.displayTrack(this.state.currentTrack,t)}}},{key:"setObservers",value:function(){var t=this;ne.onChanged("mapApi",(function(e){t.loadMapAPI(e),t.toggleStyleOptions(),t.toggleStyleMenu()})),this.state.onChanged("currentTrack",(function(e){t.api&&(t.api.clearMap(),e&&(nt.observe(e,"positions",(function(){t.displayTrack(e,!1),e instanceof At&&!t.api.isPositionVisible(e.length-1)&&t.api.centerToPosition(e.length-1),t.toggleStyleOptions()})),t.displayTrack(e,!0)),t.toggleStyleOptions())})),this.state.onChanged("history",(function(){var e=t.state.history;t.api&&e&&!e.trackId&&(e.mapApi?ne.mapApi=e.mapApi:(e.mapParams?t.api.updateState(e.mapParams):t.api.zoomToExtent(),t.state.history=null))})),this.model.onMenuToggle=function(){return t.onMapResize()},this.onChanged("speedVisible",(function(e){e&&(t.model.altitudeVisible=!1),t.setTrackStyle()})),this.onChanged("altitudeVisible",(function(e){e&&(t.model.speedVisible=!1),t.setTrackStyle()}))}},{key:"displayTrack",value:function(t,e){var n=this;this.state.jobStart(),e&&this.state.history&&this.state.history.mapParams&&(this.api.updateState(this.state.history.mapParams),e=!1),this.state.history=null,this.setTrackStyle(),this.api.displayTrack(t,e).finally((function(){return n.state.jobStop()}))}},{key:"onMapResize",value:function(){this.api&&this.api.updateSize()}},{key:"toggleStyleOptions",value:function(){var t=this.state.currentTrack;this.speedEl.disabled=!t||!t.hasSpeeds||t.length<=1,this.altitudeEl.disabled=!t||!t.hasAltitudes||t.length<=1}},{key:"toggleStyleMenu",value:function(){"openlayers"===ne.mapApi?this.styleEl.style.display="block":this.styleEl.style.display="none"}},{key:"setTrackStyle",value:function(){var t=this.state.currentTrack;this.api&&t&&(this.model.speedVisible&&t.hasSpeeds?this.setSpeedStyle():this.model.altitudeVisible&&t.hasAltitudes?this.setAltitudeStyle():this.api.setTrackDefaultStyle())}},{key:"setSpeedStyle",value:function(){var t=this.state.currentTrack,e={minValue:0,maxValue:t.maxSpeed,minColor:[0,255,0],maxColor:[255,0,0]};this.api.setTrackGradientStyle(t,"speed",e)}},{key:"setAltitudeStyle",value:function(){var t=this.state.currentTrack,e={minValue:t.minAltitude,maxValue:t.maxAltitude,minColor:[0,255,0],maxColor:[255,0,0]};this.api.setTrackGradientStyle(t,"altitude",e)}},{key:"getPopupElement",value:function(t){var e,n,i,o,a,s,l,u,c,f,h,d,p,v,m,y,g,b,x,w,k,S,E,A,L,T,M,O,P,_,I,C,j,R=this,U=this.state.currentTrack.positions[t],N=this.state.currentTrack.length,D=this.state.currentTrack.user,z=ie.user&&(ie.isAdmin||ie.user.id===D.id),B="",V="";if(U.timestamp>0){var F,H=mt.getTimeString(new Date(1e3*U.timestamp));B=H.date,V=r()(F="".concat(H.time,'<span class="smaller">')).call(F,H.zone,"</span>")}var q,G="";if("gps"===U.provider)G=r()(q=' <img class="icon" alt="'.concat(re._("gps"),'" title="')).call(q,re._("gps"),'" src="images/gps_dark.svg">');else if("network"===U.provider){var X;G=r()(X=' <img class="icon" alt="'.concat(re._("network"),'" title="')).call(X,re._("network"),'" src="images/network_dark.svg">')}var Y="";z&&(Y='<a id="editposition" class="menu-link" data-bind="onUserAdd">'.concat(re._("editposition"),"</a>"));var W,Z,J,$,K,Q,tt,et,nt,rt="";this.state.showLatest||(rt=r()(W=r()(Z=r()(J=r()($=r()(K=r()(Q=r()(tt=r()(et=r()(nt='<div id="pright">\n <img class="icon" alt="'.concat(re._("track"),'" src="images/stats_blue.svg" style="margin-left: 3em;"><br>\n <img class="icon" alt="')).call(nt,re._("ttime"),'" title="')).call(et,re._("ttime"),'" src="images/time_blue.svg"> ')).call(tt,re.getLocaleDuration(U.totalSeconds),'<br>\n <img class="icon" alt="')).call(Q,re._("aspeed"),'" title="')).call(K,re._("aspeed"),'" src="images/speed_blue.svg"> ')).call($,re.getLocaleSpeed(U.totalSpeed,!0),'<br>\n <img class="icon" alt="')).call(J,re._("tdistance"),'" title="')).call(Z,re._("tdistance"),'" src="images/distance_blue.svg"> ')).call(W,re.getLocaleDistanceMajor(U.totalMeters,!0),"<br>\n </div>"));var it=r()(e=r()(n=r()(i=r()(o=r()(a=r()(s=r()(l=r()(u=r()(c=r()(f=r()(h=r()(d=r()(p=r()(v=r()(m=r()(y=r()(g=r()(b=r()(x=r()(w=r()(k=r()(S=r()(E='<div id="pheader">\n <div><img alt="'.concat(re._("user"),'" title="')).call(E,re._("user"),'" src="images/user_dark.svg"> ')).call(S,mt.htmlEncode(U.username),'</div>\n <div><img alt="')).call(k,re._("track"),'" title="')).call(w,re._("track"),'" src="images/route_dark.svg"> ')).call(x,mt.htmlEncode(U.trackname),'</div>\n </div>\n <div id="pbody">\n ')).call(b,U.hasComment()?'<div id="pcomments">'.concat(mt.htmlEncode(U.comment).replace(/\n/,"<br>"),"</div>"):"","\n ")).call(g,U.hasImage()?'<div id="pimage"><img src="uploads/'.concat(U.image,'" alt="image"></div>'):"",'\n <div id="pleft">\n <img class="icon" alt="')).call(y,re._("time"),'" title="')).call(m,re._("time"),'" src="images/calendar_dark.svg"> ')).call(v,B,'<br>\n <img class="icon" alt="')).call(p,re._("time"),'" title="')).call(d,re._("time"),'" src="images/clock_dark.svg"> ')).call(h,V,"<br>\n ")).call(f,null!==U.speed?r()(A=r()(L='<img class="icon" alt="'.concat(re._("speed"),'" title="')).call(L,re._("speed"),'" src="images/speed_dark.svg">')).call(A,re.getLocaleSpeed(U.speed,!0),"<br>"):"","\n ")).call(c,null!==U.altitude?r()(T=r()(M='<img class="icon" alt="'.concat(re._("altitude"),'" title="')).call(M,re._("altitude"),'" src="images/altitude_dark.svg">')).call(T,re.getLocaleAltitude(U.altitude,!0),"<br>"):"","\n ")).call(u,null!==U.accuracy?r()(O=r()(P=r()(_='<img class="icon" alt="'.concat(re._("accuracy"),'" title="')).call(_,re._("accuracy"),'" src="images/accuracy_dark.svg">')).call(P,re.getLocaleAccuracy(U.accuracy,!0))).call(O,G,"<br>"):"","\n ")).call(l,null!==U.bearing?r()(I=r()(C=r()(j='<img class="icon" alt="'.concat(re._("bearing"),'" title="')).call(j,re._("bearing"),'" src="images/bearing.svg" style="transform: rotate(')).call(C,U.bearing,'deg) scale(1.2);">')).call(I,U.bearing,"°<br>"):"",'\n <img class="icon" alt="')).call(s,re._("position"),'" title="')).call(a,re._("position"),'" src="images/position.svg">')).call(o,re.getLocaleCoordinates(U),"<br>\n </div>")).call(i,rt,'</div>\n <div id="pfooter"><div>')).call(n,re._("pointof",t+1,N),"</div><div>")).call(e,Y,"</div></div>"),ot=document.createElement("div");(ot.setAttribute("id","popup"),ot.innerHTML=it,U.hasImage())&&(ot.querySelector("#pimage img").onclick=function(){var t=new be('<img src="'.concat(U.getImagePath(),'" alt="image">'));t.element.querySelector("#modal-close").onclick=function(){return t.destroy()},t.element.classList.add("image"),t.show()});z&&(ot.querySelector("#editposition").onclick=function(){new Ue(R.state,t).init()});return ot}}],[{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",i=t?"M28.232,10.942":"M25.486,18.141";return r()(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,i,'c-0.5-4.028-3.642-7.083-7.724-7.542"/>')}},{key:"getSvgSrc",value:function(t,e,i){var o,a,s=r()(o=r()(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,i?n.getMarkerExtra(e):"","</g></svg>");return"data:image/svg+xml,".concat(encodeURIComponent(s))}}]),n}(se);function ze(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var Be=function(t){I(n,t);var e=ze(n);function n(t){var r;return o(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 l(n,[{key:"init",value:function(){var t=this.getHtml();this.dialog=new be(t),this.dialog.show(),this.bindAll(this.dialog.element)}},{key:"getHtml",value:function(){var t,e,n,i,o,a;return r()(t=r()(e=r()(n=r()(i=r()(o=r()(a='<div class="red-button button-resolve"><b><a data-bind="onTrackDelete">'.concat(re._("deltrack"),"</a></b></div>\n <div>")).call(a,re._("editingtrack","<b>".concat(mt.htmlEncode(this.track.name),"</b>")),'</div>\n <div style="clear: both; padding-bottom: 1em;"></div>\n <form id="trackForm">\n <label><b>')).call(o,re._("trackname"),'</b></label>\n <input type="text" placeholder="')).call(i,re._("trackname"),'" name="trackname" data-bind="trackname" value="')).call(n,mt.htmlEncode(this.track.name),'" required autofocus>\n <div class="buttons">\n <button class="button-reject" data-bind="onCancel" type="button">')).call(e,re._("cancel"),'</button>\n <button class="button-resolve" data-bind="onTrackUpdate" type="submit">')).call(t,re._("submit"),"</button>\n </div>\n </form>")}},{key:"onTrackDelete",value:function(){var t=this;be.isConfirmed(re._("trackdelwarn",mt.htmlEncode(this.track.name)))&&this.track.delete().then((function(){t.trackVM.onTrackDeleted(),t.dialog.destroy()})).catch((function(t){var e;me.error(r()(e="".concat(re._("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;me.error(r()(e="".concat(re._("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||(me.error(re._("allrequired")),!1))}}]),n}(se);function Ve(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var Fe=function(t){I(n,t);var e=Ve(n);function n(t){var r;o(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 ot(i),r.state=t,r.timerId=0,r}return l(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(),ie.user&&(ie.isAdmin||ie.user.id===e.id)&&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&&nt.observe(e,"positions",(function(){t.renderSummary()}))})),this.state.onChanged("showAllUsers",(function(e){e&&t.loadAllUsersPosition()})),ne.onChanged("interval",(function(){t.timerId&&(t.stopAutoReload(),t.startAutoReload())})),this.state.onChanged("history",(function(e){e&&!e.userId&&e.trackId&&(t.model.currentTrackId=e.trackId.toString())}))}},{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 At?this.onTrackUpdate(t):this.state.currentTrack instanceof wt?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?me.error(re._("isizefailure",n)):ie.isAuthenticated?(this.state.jobStart(),At.import(e,ie.user).then((function(e){e.length&&(e.length>1&&me.toast(re._("imultiple",e.length)),t.model.trackList=r()(e).call(e,t.model.trackList),t.model.currentTrackId=e[0].listValue)})).catch((function(t){var e;return me.error(r()(e="".concat(re._("actionfailure"),"\n")).call(e,t.message),t)})).finally((function(){t.model.inputFile="",t.state.jobStop()}))):me.error(re._("notauthorized"))}},{key:"onTrackSelect",value:function(t){var e,n=this,i=G()(e=this.model.trackList).call(e,(function(e){return e.listValue===t}));i?i.isEqualTo(this.state.currentTrack)||(this.state.jobStart(),i.fetchPositions().then((function(){var t;r()(t="currentTrack id: ".concat(i.id,", loaded ")).call(t,i.length," positions"),n.state.currentTrack=i,n.model.showLatest&&(n.model.showLatest=!1)})).catch((function(t){var e;me.error(r()(e="".concat(re._("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;me.error(r()(e="".concat(re._("actionfailure"),"\n")).call(e,t.message),t)}))}},{key:"onUserLastPosition",value:function(){var t=this;this.state.currentUser.fetchLastPosition().then((function(e){var n;e&&(G()(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;me.error(r()(e="".concat(re._("actionfailure"),"\n")).call(e,t.message),t)}))}},{key:"loadAllUsersPosition",value:function(){var t=this;this.state.jobStart(),wt.fetchLatest().then((function(e){e&&(t.model.trackList=[],t.model.currentTrackId="",t.state.currentTrack=e)})).catch((function(t){var e;me.error(r()(e="".concat(re._("actionfailure"),"\n")).call(e,t.message),t)})).finally((function(){return t.state.jobStop()}))}},{key:"loadTrackList",value:function(){var t=this;this.state.jobStart(),At.fetchList(this.state.currentUser).then((function(e){t.model.trackList=e,e.length?t.state.showLatest?t.onUserLastPosition():t.state.history?t.model.currentTrackId=t.state.history.trackId.toString():t.model.currentTrackId=e[0].listValue:t.model.currentTrackId=""})).catch((function(t){var e;me.error(r()(e="".concat(re._("actionfailure"),"\n")).call(e,t.message),t)})).finally((function(){return t.state.jobStop()}))}},{key:"showDialog",value:function(){new Be(this).init()}},{key:"onTrackDeleted",value:function(){var t,e=this.model.trackList.indexOf(this.state.currentTrack);(this.state.currentTrack=null,-1!==e)&&(Vt()(t=this.model.trackList).call(t,e,1),this.model.trackList.length?(e>=this.model.trackList.length&&(e=this.model.trackList.length-1),this.model.currentTrackId=this.model.trackList[e].listValue):this.model.currentTrackId="")}},{key:"autoReload",value:function(t){t?this.startAutoReload():this.stopAutoReload()}},{key:"startAutoReload",value:function(){var t=this;this.timerId=setInterval((function(){return t.onReload()}),1e3*ne.interval)}},{key:"stopAutoReload",value:function(){clearInterval(this.timerId),this.timerId=0}},{key:"renderSummary",value:function(){var t=this.state.currentTrack;if(t&&t.hasPositions){var e=t.positions[t.length-1];if(this.state.showLatest){var n,i,o,a=new Date,s=new Date(1e3*e.timestamp),l=mt.getTimeString(s),u=s.toDateString()!==a.toDateString()?"".concat(l.date,"<br>"):"",c=r()(n="".concat(l.time,'<span style="font-weight:normal">')).call(n,l.zone,"</span>");this.model.summary=r()(i=r()(o='\n <div class="menu-title">'.concat(re._("latest"),":</div>\n ")).call(o,u,"\n ")).call(i,c)}else{var f,h,d,p,v,m,y,g,b,x,w=r()(f=r()(h=r()(d=r()(p=r()(v=r()(m='\n <div class="menu-title">'.concat(re._("summary"),'</div>\n <div><img class="icon" alt="')).call(m,re._("tdistance"),'" title="')).call(v,re._("tdistance"),'" src="images/distance.svg"> ')).call(p,re.getLocaleDistanceMajor(e.totalMeters,!0),'</div>\n <div><img class="icon" alt="')).call(d,re._("ttime"),'" title="')).call(h,re._("ttime"),'" src="images/time.svg"> ')).call(f,re.getLocaleDuration(e.totalSeconds),"</div>");if(e.totalSeconds>0)w+=r()(y=r()(g='\n <div><img class="icon" alt="'.concat(re._("aspeed"),'" title="')).call(g,re._("aspeed"),'" src="images/speed.svg"><b>&#10547;</b> ')).call(y,re.getLocaleSpeed(e.totalMeters/e.totalSeconds,!0),"</div>");if(t.hasSpeeds)w+=r()(b=r()(x='<div><img class="icon" alt="'.concat(re._("speed"),'" title="')).call(x,re._("speed"),'" src="images/speed.svg"><b>&#10138;</b> ')).call(b,re.getLocaleSpeed(t.maxSpeed,!0),"</div>");if(t.hasAltitudes){var k,S,E,A="".concat(re.getLocaleAltitude(t.maxAltitude,!0));if(t.minAltitude!==t.maxAltitude)A=r()(E="".concat(re.getLocaleAltitude(t.minAltitude),"&ndash;")).call(E,A);w+=r()(k=r()(S='<div><img class="icon" alt="'.concat(re._("altitude"),'" title="')).call(S,re._("altitude"),'" src="images/altitude.svg"> ')).call(k,A,"</div>")}this.model.summary=w}}else this.model.summary=""}}],[{key:"setMenuVisible",value:function(t,e){t&&(e?t.classList.remove("menu-hidden"):t.classList.add("menu-hidden"))}}]),n}(se),He=i(1060),qe=i.n(He);function Ge(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var Xe=function(t){I(n,t);var e=Ge(n);function n(t,r){var i;return o(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 l(n,[{key:"init",value:function(){var t=this.getHtml();this.dialog=new be(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;be.isConfirmed(re._("userdelwarn",mt.htmlEncode(this.user.login)))&&this.user.delete().then((function(){t.userVM.onUserDeleted(),t.dialog.destroy()})).catch((function(t){var e;me.error(r()(e="".concat(re._("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;me.error(r()(e="".concat(re._("actionfailure"),"\n")).call(e,t.message),t)}))}}},{key:"onPassChange",value:function(){var t=this;this.model.passVisibility=!0,this.validate()&&ie.user.setPassword(this.model.password,this.model.oldPassword).then((function(){return t.dialog.destroy()})).catch((function(t){var e;me.error(r()(e="".concat(re._("actionfailure"),"\n")).call(e,t.message),t)}))}},{key:"onUserAdd",value:function(){var t=this;this.model.passVisibility=!0,this.validate()&&Ot.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;me.error(r()(e="".concat(re._("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 me.error(re._("allrequired")),!1}else if("pass"===this.type&&!this.model.oldPassword)return me.error(re._("allrequired")),!1;if(this.model.passVisibility){if(!this.model.password||!this.model.password2)return me.error(re._("allrequired")),!1;if(this.model.password!==this.model.password2)return me.error(re._("passnotmatch")),!1;if(!ne.validPassStrength(this.model.password))return me.error(re.getLocalePassRules()),!1}return!0}},{key:"getHtml",value:function(){var t,e,n,i,o,a,s,l,u,c,f,h,d,p,v,m,y,g,b,x,w,k,S,E,A="",L="";switch(this.type){case"add":S="onUserAdd",L=r()(t="<label><b>".concat(re._("username"),'</b></label>\n <input type="text" placeholder="')).call(t,re._("usernameenter"),'" name="login" data-bind="login" required autofocus>'),E=r()(e=r()(n=r()(i=r()(o="<label><b>".concat(re._("password"),'</b></label>\n <input type="password" placeholder="')).call(o,re._("passwordenter"),'" name="password" data-bind="password" required>\n <label><b>')).call(i,re._("passwordrepeat"),'</b></label>\n <input type="password" placeholder="')).call(n,re._("passwordenter"),'" name="password2" data-bind="password2" required>\n <label><b>')).call(e,re._("admin"),'</b></label>\n <input type="checkbox" name="admin" data-bind="admin">');break;case"edit":S="onUserUpdate",A=r()(a='<div class="red-button button-resolve"><b><a data-bind="onUserDelete">'.concat(re._("deluser"),"</a></b></div>\n <div>")).call(a,re._("editinguser","<b>".concat(mt.htmlEncode(this.user.login),"</b>")),'</div>\n <div style="clear: both; padding-bottom: 1em;"></div>'),E=r()(s=r()(l=r()(u=r()(c=r()(f=r()(h="<label><b>".concat(re._("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,re._("password"),'</b></label>\n <input type="password" placeholder="')).call(f,re._("passwordenter"),'" name="password" data-bind="password" required autofocus>\n <label><b>')).call(c,re._("passwordrepeat"),'</b></label>\n <input type="password" placeholder="')).call(u,re._("passwordenter"),'" name="password2" data-bind="password2" required>\n </div>\n <label><b>')).call(l,re._("admin"),'</b></label>\n <input type="checkbox" name="admin" data-bind="admin" ')).call(s,this.user.isAdmin?"checked":"",">");break;case"pass":S="onPassChange",E=r()(d=r()(p=r()(v=r()(m=r()(y="<label><b>".concat(re._("oldpassword"),'</b></label>\n <input type="password" placeholder="')).call(y,re._("passwordenter"),'" name="old-password" data-bind="oldPassword" required autofocus>\n <label><b>')).call(m,re._("newpassword"),'</b></label>\n <input type="password" placeholder="')).call(v,re._("passwordenter"),'" name="password" data-bind="password" required>\n <label><b>')).call(p,re._("newpasswordrepeat"),'</b></label>\n <input type="password" placeholder="')).call(d,re._("passwordenter"),'" name="password2" data-bind="password2" required>');break;default:throw new Error("Unknown dialog type: ".concat(this.type))}return r()(g=r()(b=r()(x=r()(w=r()(k="".concat(A,'\n <form id="userForm">\n ')).call(k,L,"\n ")).call(w,E,'\n <div class="buttons">\n <button class="button-reject" type="button" data-bind="onCancel">')).call(x,re._("cancel"),'</button>\n <button class="button-resolve" type="submit" data-bind="')).call(b,S,'">')).call(g,re._("submit"),"</button>\n </div>\n </form>")}}]),n}(se);function Ye(t){var e=function(){if("undefined"==typeof Reflect||!M())return!1;if(M().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(M()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R(t);if(e){var i=R(this).constructor;n=M()(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}var We=function(t){I(n,t);var e=Ye(n);function n(t){var r;o(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 ot(i,re._("suser"),"- ".concat(re._("allusers")," -")),r.state=t,r}return l(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(),Ot.fetchList().then((function(e){if(t.model.userList=e,e.length){var n=e[0].listValue;if(t.state.history)n=t.state.history.userId.toString();else if(ie.isAuthenticated){var r,i=G()(r=t.model.userList).call(r,(function(t){return t.listValue===ie.user.listValue}));i&&(n=i.listValue)}t.model.currentUserId=n}})).catch((function(t){var e;me.error(r()(e="".concat(re._("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===ot.allValue,e.state.currentUser=G()(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(ie.user))})),t.onChanged("showLatest",(function(t){t?e.select.showAllOption():e.select.hideAllOption()})),t.onChanged("history",(function(t){t&&t.userId&&(e.model.currentUserId=t.userId.toString())}))}},{key:"showDialog",value:function(t){new Xe(this,t).init()}},{key:"onUserAdded",value:function(t){var e;this.model.userList.push(t),qe()(e=this.model.userList).call(e,(function(t,e){return t.login>e.login?1:-1}))}},{key:"onUserDeleted",value:function(){var t,e=this.model.userList.indexOf(this.state.currentUser);(this.state.currentUser=null,-1!==e)&&(Vt()(t=this.model.userList).call(t,e,1),this.model.userList.length?(e>=this.model.userList.length&&(e=this.model.userList.length-1),this.model.currentUserId=this.model.userList[e].listValue):this.model.currentUserId="0")}}],[{key:"setMenuVisible",value:function(t,e){t&&(e?t.classList.remove("menu-hidden"):t.classList.add("menu-hidden"))}}]),n}(se),Ze=function(){function t(e){o(this,t),this.state=e,this.skipPush=!1}return l(t,[{key:"init",value:function(){var t=this;return this.state.onChanged("mapParams",(function(){return t.pushState()})),window.addEventListener("popstate",(function(e){if(null!==e.state){var n=t.state.currentTrack,r=t.state.currentUser,i={title:e.state.title,userId:r&&r.id===e.state.userId?null:e.state.userId,trackId:n&&n.id===e.state.trackId?null:e.state.trackId,mapApi:ne.mapApi===e.state.mapApi?null:e.state.mapApi,mapParams:e.state.mapParams};t.onPop(i),t.skipPush=!0}})),this}},{key:"onPop",value:function(t){var e,n,i;(t&&r()(e=r()(n="".concat(t.trackId,"/")).call(n,t.mapApi,"/")).call(e,t.mapParams),this.state.history=t,t)&&(document.title=r()(i="".concat(re._("title")," ")).call(i,t.title))}},{key:"pushState",value:function(){if(this.skipPush)this.skipPush=!1;else if(null!==this.state.currentUser&&null!==this.state.currentTrack){var e=this.getState(),n=window.history.state;if(!n||!mt.isDeepEqual(n,e)){var i,o,a=t.getHash(e);r()(i="pushState: ".concat(a," => ")).call(i,e),window.history.pushState(e,e.title,a),document.title=r()(o="".concat(re._("title")," ")).call(o,e.title)}}}},{key:"getState",value:function(){return{title:this.state.currentTrack.name,userId:this.state.currentUser.id,trackId:this.state.currentTrack.id,mapApi:ne.mapApi,mapParams:this.state.mapParams}}}],[{key:"parseHash",value:function(){return t.parse(window.location.hash)}},{key:"parse",value:function(t){var n=t.replace("#","").split("/");n.reverse();var i=parseInt(n.pop());if(!isNaN(i)){var o="openlayers";"g"===n.pop()&&(o="gmaps");var a=null;return n.length>=4&&((a={}).center=[parseFloat(n.pop()),parseFloat(n.pop())],a.zoom=parseFloat(n.pop()),a.rotation=parseFloat(n.pop())),At.getMeta(i).then((function(t){var e=t.userId;return{title:t.name,userId:e,trackId:i,mapApi:o,mapParams:a}})).catch((function(t){var e;return r()(e="Ignoring unknown track ".concat(i," ")).call(e,t),null}))}return e().resolve(null)}},{key:"getHash",value:function(t){var e,n,i,o=r()(e="#".concat(t.trackId,"/")).call(e,t.mapApi.charAt(0));t.mapParams&&(o+=r()(n="/".concat(t.mapParams.center[0],"/")).call(n,t.mapParams.center[1]),o+=r()(i="/".concat(t.mapParams.zoom,"/")).call(i,t.mapParams.rotation));return o}}]),t}(),Je=function(){function t(e){o(this,t),this.spinner=null,this.state=e}return l(t,[{key:"init",value:function(){var t=this;this.state.onChanged("activeJobs",(function(e){e>0?t.spinner||(t.spinner=me.spinner()):t.spinner&&(t.spinner.destroy(),t.spinner=null)}))}}]),t}(),$e=function(){function t(){o(this,t),this.currentTrack=null,this.currentUser=null,this.showLatest=!1,this.showAllUsers=!1,this.activeJobs=0,this.mapParams=null,this.history=null}return l(t,[{key:"jobStart",value:function(){this.activeJobs++}},{key:"jobStop",value:function(){this.activeJobs--}},{key:"onChanged",value:function(t,e){nt.observe(this,t,e)}}]),t}(),Ke=te.waitForDom(),Qe=ee.initialize(),tn=Ze.parseHash();e().all([Ke,Qe,tn]).then((function(t){var e,n,r,i,o,a,s,l,u,c;e=t[2],n=new $e,r=new Ze(n),i=new Je(n),o=new Oe(n),a=new We(n),s=new Fe(n),l=new De(n),u=new he(n),c=new Ae(n),r.init().onPop(e),i.init(),o.init(),a.init(),s.init(),l.init().loadMapAPI(ne.mapApi),u.init(),c.init(),l.onChanged("markerOver",(function(t){null!==t?u.onPointOver(t):u.onPointOut()})),l.onChanged("markerSelect",(function(t){null!==t?u.onPointSelect(t):u.onPointUnselect()})),u.onChanged("pointSelected",(function(t){null!==t&&l.api.animateMarker(t)}))})).catch((function(t){var e;return me.error(r()(e="".concat(re._("actionfailure"),"\n")).call(e,t))}))}()}();
//# sourceMappingURL=bundle.js.map