-
Notifications
You must be signed in to change notification settings - Fork 6
/
meteoJS.min.js
3 lines (3 loc) · 328 KB
/
meteoJS.min.js
1
2
3
/*! For license information please see meteoJS.min.js.LICENSE.txt */
var meteoJS,SVG=SVG||{},jQuery=jQuery||{},ol=ol||{layer:{},source:{},format:{},style:{}},Popper=Popper||{},bootstrap=bootstrap||{};(()=>{var e={588:(e,t,n)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var i=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,o){var i=t&&t.prototype instanceof b?t:b,r=Object.create(i.prototype),a=new E(o||[]);return r._invoke=function(e,t,n){var o=d;return function(i,r){if(o===h)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw r;return N()}for(n.method=i,n.arg=r;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,t,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}(e,n,a),r}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",p="suspendedYield",h="executing",v="completed",y={};function b(){}function m(){}function g(){}var w={};u(w,a,(function(){return this}));var O=Object.getPrototypeOf,_=O&&O(O(R([])));_&&_!==n&&i.call(_,a)&&(w=_);var P=g.prototype=b.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(r,a,s,l){var u=f(e[r],e,a);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"===o(d)&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,l)}))}l(u.arg)}var r;this._invoke=function(e,o){function i(){return new t((function(t,i){n(e,o,t,i)}))}return r=r?r.then(i,i):i()}}function T(e,n){var o=e.iterator[n.method];if(o===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;var r=i.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function R(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function n(){for(;++o<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}return{next:N}}function N(){return{value:t,done:!0}}return m.prototype=g,u(P,"constructor",g),u(g,"constructor",m),m.displayName=u(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(P),e},e.awrap=function(e){return{__await:e}},S(j.prototype),u(j.prototype,s,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,o,i,r){void 0===r&&(r=Promise);var a=new j(c(t,n,o,i),r);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(P),u(P,l,"Generator"),u(P,a,(function(){return this})),u(P,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var o=t.pop();if(o in e)return n.value=o,n.done=!1,n}return n.done=!0,n}},e.values=R,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(x),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(o,i){return s.type="throw",s.arg=e,n.next=o,i&&(n.method="next",n.arg=t),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("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 o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,o){return this.delegate={iterator:R(e),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),y}},e}("object"===o(e=n.nmd(e))?e.exports:{});try{regeneratorRuntime=i}catch(e){"object"===("undefined"==typeof globalThis?"undefined":o(globalThis))?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={id:o,loaded:!1,exports:{}};return e[o](r,r.exports,n),r.loaded=!0,r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var o={};(()=>{"use strict";n.r(o),n.d(o,{Modelviewer:()=>Fo,RepetitiveRequests:()=>F,Sounding:()=>cr,Synview:()=>Lt,ThermodynamicDiagram:()=>sc,ThermodynamicDiagramPluggable:()=>as,Timeline:()=>q,Tooltip:()=>ro,calc:()=>e,events:()=>Sc,modelviewer:()=>xc,sounding:()=>Ec,synview:()=>Tc,thermodynamicDiagram:()=>Rc,timeline:()=>jc,tooltip:()=>kc});var e={};function t(e){if(void 0!==e&&!isNaN(e))return 44330.769*(1-Math.pow(e/1013.25,.19029496))}function i(e){if(void 0!==e&&!isNaN(e))return 1013.25*Math.pow(1-e/44330.769,5.255)}function r(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return e*Math.pow(1e3/t,.286)}function a(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return e*Math.pow(t/1e3,.286)}function s(e,t){if(void 0!==t&&!isNaN(t)){for(var n=void 0,o=Math.pow(1e3/t,.286),i=273,r=20,a=0;Math.abs(r)>.1&&a<100;)a++,n=d(i,t),(i*o*Math.exp(2.5*n/i)-e)*r>0&&(r*=-.5),i+=r;return i}}function l(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t)){var n=.4343*Math.log(e*t/(622+e));return Math.pow(10,.0498646455*n+2.4082965)-7.07475+38.9114*Math.pow(Math.pow(10,.0915*n)-1.2035,2)}}function u(e,t,n){if(!(void 0===e||isNaN(e)||void 0===t||isNaN(t)||void 0===n||isNaN(n))){for(var o=t-273.15,i=1,r=10,a=1,s=6.112*Math.exp(17.67*o/(o+243.5));Math.abs(i)>.05&&0!=(i=s-(6.112*Math.exp(17.67*o/(o+243.5))-n*(e-273.15-o)*66e-5*(1+.00115*o)))&&(i<0?-1!=a&&(a=-1,r/=10):1!=a&&(a=1,r/=10),!(Math.abs(i)<=.05));)o+=r*a;return o+273.15}}function c(e,t,n){var o=r(e,n);if(!(void 0===o||void 0===t||isNaN(t)||void 0===e||isNaN(e)||void 0===n||isNaN(n)))return o*Math.exp(2.4819*d(t,n)/v(e,t))}function f(e){if(void 0!==e&&!isNaN(e)){var t=new Array(6.1104546,.4442351,.014302099,.00026454708,30357098e-13,2.0972268e-8,60487594e-18,-1469687e-19),n=new Array(.06485546857696639,.03783195122560735,.02224449342887902,.013182892842468312,.007874020771412448,.004739730494884733,.0028751203550435793,.001757430376758103,.0010824173951885098,.0006717089391856059,.0004199647026320394,.0002645243638634699,.00016784796373681322,.00010728539763162038,6907426344961356e-20,4479404897680843e-20,2925704195639373e-20,19245291263499416e-21,12749137241074795e-21,8505070102755051e-21,5713400253349711e-21,3864650296738762e-21,2632109719650053e-21,18049107293057043e-22,12460785055581605e-22,8.660705713468708e-7,6.059822176688955e-7,4.2682119794324277e-7,3.026165085143795e-7,2.15963854234914e-7,1.5512895457833687e-7),o=0;if((e-=273.15)>-50)o=t[0]+e*(t[1]+e*(t[2]+e*(t[3]+e*(t[4]+e*(t[5]+e*(t[6]+e*t[7]))))));else{var i=(-e-50)/5;o=0<n.length-1?n[0]+i%1*(n[1]-n[0]):1e-7}return o}}function d(e,t){var n=f(e);if(void 0!==n&&void 0!==t&&!isNaN(t))return 621.97*n/(t-n)}function p(e,t){if(void 0!==t&&!isNaN(t)){for(var n=1013,o=100;n-o>10;){var i=o+(n-o)/2,r=d(a(e,i),i);if(void 0===r)return;r<t?o=i:n=i}return o+(n-o)/2}}function h(e,t){if(void 0!==e&&!isNaN(e)){for(var n=323,o=223;n-o>.1;){var i=o+(n-o)/2,r=p(i,t);if(void 0===r)return;r>e?o=i:n=i}return o+(n-o)/2}}function v(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return t-(.001296*t-.15772)*(e-t)}function y(e){return void 0===e||isNaN(e)?void 0:e+273.15}function b(e){return void 0===e||isNaN(e)?void 0:e-273.15}function m(e){return void 0===e||isNaN(e)?void 0:3.6*e}function g(e){return void 0===e||isNaN(e)?void 0:e/3.6}function w(e){return void 0===e||isNaN(e)?void 0:900*e/463}function O(e){return void 0===e||isNaN(e)?void 0:463*e/900}function _(e){return void 0===e||isNaN(e)?void 0:Math.min(12,Math.pow(e/.836,2/3))}function P(e){return void 0===e||isNaN(e)?void 0:.836*Math.pow(e,1.5)}function S(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return 153*b(e)+.9985*t-304.26}function j(e,t,n,o){if(!(void 0===e||isNaN(e)||void 0===t||isNaN(t)||void 0===n||isNaN(n))){if(0==t)return e;var i=.02896;if(void 0===o&&(o=n),n==o)return e*Math.exp(9.807*-i/8.314/n*t);var r=(n-o)/t;return e*Math.exp(9.807*i/8.314/r*Math.log(1-r*t/n))}}function T(e,t,n){if(!(void 0===e||isNaN(e)||void 0===t||isNaN(t)||void 0===n||isNaN(n))){var o=f(t)*n;return 100*(e-o)/287.058/t+100*o/461.495/t}}function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function x(e,t,n){"listeners"in this&&void 0!==this.listeners||(this.listeners={}),e in this.listeners||(this.listeners[e]={});var o=Math.random().toString(36).substr(2,9);return this.listeners[e][o]={callback:t,thisArg:n},o}function E(e,t){"listeners"in this&&void 0!==this.listeners&&e in this.listeners&&t in this.listeners[e]&&delete this.listeners[e][t]}function R(e,t,n){"once_listeners"in this&&void 0!==this.once_listeners||(this.once_listeners={}),e in this.once_listeners&&"push"in this.once_listeners[e]||(this.once_listeners[e]=[]),this.once_listeners[e].push({callback:t,thisArg:n})}function N(e){return"listeners"in this&&void 0!==this.listeners&&e in this.listeners&&Object.keys(this.listeners[e]).length||"once_listeners"in this&&e in this.once_listeners&&Object.keys(this.once_listeners[e]).length}function C(e){var t=this,n=Array.prototype.slice.call(arguments);if(n.shift(),"listeners"in this&&void 0!==this.listeners&&e in this.listeners&&"object"==k(this.listeners[e])&&Object.keys(this.listeners[e]).forEach((function(o){t.listeners[e][o].callback.apply(void 0===t.listeners[e][o].thisArg?t:t.listeners[e][o].thisArg,n)})),"once_listeners"in this&&void 0!==this.once_listeners&&e in this.once_listeners&&"forEach"in this.once_listeners[e]){var o=this.once_listeners[e];this.once_listeners[e]=[],o.forEach((function(e){e.callback.apply(void 0===e.thisArg?t:e.thisArg,n)}))}}n.r(e),n.d(e,{altitudeISAByPres:()=>t,densityHumidAirByPressureAndTempAndRelHumidity:()=>T,dewpointByHMRAndPres:()=>l,equiPotentialTempByTempAndDewpointAndPres:()=>c,lclByPotentialTempAndHMR:()=>p,lclTemperatureByTempAndDewpoint:()=>v,potentialTempByLCLAndHMR:()=>h,potentialTempByTempAndPres:()=>r,pressureByBarometricFormula:()=>j,pressureISAByAltitude:()=>i,saturationHMRByTempAndPres:()=>d,saturationPressureByTemp:()=>f,snowlineByTemp850hPaAndAltidude:()=>S,tempByEquiPotTempAndPres:()=>s,tempByPotentialTempAndPres:()=>a,tempCelsiusToKelvin:()=>y,tempKelvinToCelsius:()=>b,wetbulbTempByTempAndDewpointAndPres:()=>u,windspeedBFToMS:()=>P,windspeedKMHToMS:()=>g,windspeedKNToMS:()=>O,windspeedMSToBF:()=>_,windspeedMSToKMH:()=>m,windspeedMSToKN:()=>w}),n(588);const B=function(e){e.on=x,e.un=E,e.once=R,e.hasListener=N,e.trigger=C};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(){D=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",r=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var i=t&&t.prototype instanceof f?t:f,r=Object.create(i.prototype),a=new P(o||[]);return r._invoke=function(e,t,n){var o="suspendedStart";return function(i,r){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===i)throw r;return{value:void 0,done:!0}}for(n.method=i,n.arg=r;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=u(e,t,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),r}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function f(){}function d(){}function p(){}var h={};s(h,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==t&&n.call(y,i)&&(h=y);var b=p.prototype=f.prototype=Object.create(h);function m(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function o(i,r,a,s){var l=u(e[i],e,r);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==I(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return o("throw",e,a,s)}))}s(l.arg)}var i;this._invoke=function(e,n){function r(){return new t((function(t,i){o(e,n,t,i)}))}return i=i?i.then(r,r):r()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,c;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function S(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function t(){for(;++o<e.length;)if(n.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:j}}function j(){return{value:void 0,done:!0}}return d.prototype=p,s(b,"constructor",p),s(p,"constructor",d),d.displayName=s(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,a,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},m(g.prototype),s(g.prototype,r,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,o,i,r){void 0===r&&(r=Promise);var a=new g(l(t,n,o,i),r);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(b),s(b,a,"Generator"),s(b,i,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var o=t.pop();if(o in e)return n.value=o,n.done=!1,n}return n.done=!0,n}},e.values=S,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function o(n,o){return a.type="throw",a.arg=e,t.next=n,o&&(t.method="next",t.arg=void 0),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i],a=r.completion;if("root"===r.tryLoc)return o("end");if(r.tryLoc<=this.prev){var s=n.call(r,"catchLoc"),l=n.call(r,"finallyLoc");if(s&&l){if(this.prev<r.catchLoc)return o(r.catchLoc,!0);if(this.prev<r.finallyLoc)return o(r.finallyLoc)}else if(s){if(this.prev<r.catchLoc)return o(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return o(r.finallyLoc)}}}},abrupt:function(e,t){for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function A(e,t,n,o,i,r,a){try{var s=e[r](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(o,i)}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var G=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,o=void 0===n?void 0:n,i=t.user,r=void 0===i?"":i,a=t.password,s=void 0===a?"":a,l=t.start,u=void 0===l||l,c=t.defaultTimeout,f=void 0===c?void 0:c,d=t.timeoutOnError,p=void 0===d?void 0:d,h=t.pauseOnHiddenDocument,v=void 0!==h&&h,y=t.responseType,b=void 0===y?"":y;M(this,e),this._url=o,this._user=r,this._password=s,this._isStarted=u,this._defaultTimeout=f,this._timeoutOnError=p,this._pauseOnHiddenDocument=v,this._initPauseOnHiddenDocument(),this._isSuppressedByHiddenDocument=!1,this._responseType=b,this._timeoutID=void 0,this._loading=!1,this._isStarted&&this.start()}var t,n,o,i;return t=e,n=[{key:"url",get:function(){return this._url},set:function(e){this._url=e}},{key:"user",get:function(){return this._user},set:function(e){this._user=e}},{key:"password",get:function(){return this._password},set:function(e){this._password=e}},{key:"responseType",get:function(){return this._responseType},set:function(e){this._responseType=e}},{key:"start",value:function(){this._isStarted=!0,this._startRequest()}},{key:"stop",value:function(){this._isStarted=!1,void 0!==this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=void 0)}},{key:"_planRequest",value:function(e){var t=this,n=e.delay;void 0===this._timeoutID&&(this._timeoutID=setTimeout((function(){t._pauseOnHiddenDocument&&"hidden"in document&&document.hidden?t._isSuppressedByHiddenDocument=!0:t._startRequest()}),n))}},{key:"_startRequest",value:function(){var e=this;void 0!==this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=void 0),this._makeRequest().then((function(t){var n=t.request;if(e._isStarted){var o=e._defaultTimeout,i=n.getResponseHeader("Cache-Control");if(null!==i){var r=/(^|,\s*)max-age=([0-9]+)($|\s*,)/.exec(i);null!==r&&r[2]>0&&(o=Math.round(1e3*r[2]))}e.trigger("success:request",{request:n}),void 0!==o&&e._planRequest({delay:o})}}),(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.request;e._isStarted&&void 0!==n&&(e.trigger("error:request",{request:n}),void 0!==e._timeoutOnError&&e._planRequest({delay:e._timeoutOnError}))}),(function(t){var n=t.request,o=void 0===n?void 0:n;void 0!==o&&e.trigger("error:request",{request:o})}))}},{key:"_makeRequest",value:(o=D().mark((function e(){var t=this;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.trigger("before:request"),e.abrupt("return",new Promise((function(e,n){if(void 0!==t._url)if(t._loading)n();else{t._loading=!0;var o=new XMLHttpRequest;void 0!==t.responseType&&(o.responseType=t.responseType),o.addEventListener("load",(function(){t._loading=!1,200==o.status?e({request:o}):n({request:o})})),o.addEventListener("error",(function(){t._loading=!1,n({request:o})})),o.open("GET",t._url,!0,t._user,t._password),o.send()}else n()})));case 2:case"end":return e.stop()}}),e,this)})),i=function(){var e=this,t=arguments;return new Promise((function(n,i){var r=o.apply(e,t);function a(e){A(r,n,i,a,s,"next",e)}function s(e){A(r,n,i,a,s,"throw",e)}a(void 0)}))},function(){return i.apply(this,arguments)})},{key:"_initPauseOnHiddenDocument",value:function(){var e=this;this._pauseOnHiddenDocument&&document.addEventListener("visibilitychange",(function(){"hidden"in document&&!document.hidden&&e._isSuppressedByHiddenDocument&&e._isStarted&&(e._isSuppressedByHiddenDocument=!1,e.start())}))}}],n&&V(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(G.prototype);const F=G;function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var H=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxTimeGap,o=void 0===n?void 0:n,i=t.keyboardNavigation,r=void 0===i?{}:i;z(this,e),this.maxTimeGap=o,this.selectedTime=new Date("invalid"),this.times=[],this.enabledTimes=[],this.allEnabledTimes=[],this.timesByKey={},this._keyboardNavigation={},this._initKeyboardNavigation(r)}var t,n;return t=e,n=[{key:"getSelectedTime",value:function(){return this.selectedTime}},{key:"setSelectedTime",value:function(e){return this._setSelectedTime(K(e,this.times)>-1?e:new Date("invalid")),this}},{key:"getTimes",value:function(){return this.times}},{key:"getEnabledTimes",value:function(){return this.enabledTimes}},{key:"getAllEnabledTimes",value:function(){return this.allEnabledTimes}},{key:"setTimesBySetID",value:function(e,t){return this.timesByKey[e]={times:t,enabled:t},this._updateTimes(),this._updateEnabledTimes(),this}},{key:"setEnabledTimesBySetID",value:function(e,t){return e in this.timesByKey&&(this.timesByKey[e].enabled=t,this._updateEnabledTimes()),this}},{key:"getSetIDs",value:function(){return Object.keys(this.timesByKey)}},{key:"deleteSetID",value:function(e){return e in this.timesByKey&&(delete this.timesByKey[e],this._updateTimes(),this._updateEnabledTimes()),this}},{key:"first",value:function(){return this._setSelectedTime(this.getFirstEnabledTime()),this}},{key:"last",value:function(){return this._setSelectedTime(this.getLastEnabledTime()),this}},{key:"next",value:function(){return this._setSelectedTime(this.getNextEnabledTime()),this}},{key:"prev",value:function(){return this._setSelectedTime(this.getPrevEnabledTime()),this}},{key:"nextAllEnabledTime",value:function(){return this._setSelectedTime(this.getNextAllEnabledTime()),this}},{key:"prevAllEnabledTime",value:function(){return this._setSelectedTime(this.getPrevAllEnabledTime()),this}},{key:"add",value:function(e,t){var n=this.getSelectedTime(),o=0;switch(t){case"hours":case"h":o=3600*e*1e3;break;case"minutes":case"m":o=60*e*1e3;break;case"seconds":case"s":o=1e3*e;break;case"milliseconds":case"ms":o=e}switch(0!=o&&(n=new Date(n.valueOf()+o)),t){case"years":case"y":n.setUTCFullYear(n.getUTCFullYear()+e);break;case"months":case"M":n.setUTCMonth(n.getUTCMonth()+e);break;case"days":case"d":n.setUTCDate(n.getUTCDate()+e)}return K(n,this.times)>-1&&this._setSelectedTime(n),this}},{key:"sub",value:function(e,t){var n=this.getSelectedTime(),o=0;switch(t){case"hours":case"h":o=3600*e*1e3;break;case"minutes":case"m":o=60*e*1e3;break;case"seconds":case"s":o=1e3*e;break;case"milliseconds":case"ms":o=e}switch(0!=o&&(n=new Date(n.valueOf()-o)),t){case"years":case"y":n.setUTCFullYear(n.getUTCFullYear()-e);break;case"months":case"M":n.setUTCMonth(n.getUTCMonth()-e);break;case"days":case"d":n.setUTCDate(n.getUTCDate()-e)}return K(n,this.times)>-1&&this._setSelectedTime(n),this}},{key:"getFirstEnabledTime",value:function(){return this.enabledTimes.length>0?this.enabledTimes[0]:new Date("invalid")}},{key:"getLastEnabledTime",value:function(){return this.enabledTimes.length>0?this.enabledTimes[this.enabledTimes.length-1]:new Date("invalid")}},{key:"getNextEnabledTime",value:function(){if(this.enabledTimes.length<1)return new Date("invalid");var e=K(this.getSelectedTime(),this.enabledTimes);if(e>-1)return++e<this.enabledTimes.length?this.enabledTimes[e]:this.enabledTimes[this.enabledTimes.length-1];if(isNaN(this.getSelectedTime()))return this.enabledTimes[0];for(var t=new Date("invalid"),n=0;n<this.enabledTimes.length;n++)if(this.getSelectedTime().valueOf()<this.enabledTimes[n].valueOf()){t=this.enabledTimes[n];break}return t}},{key:"getPrevEnabledTime",value:function(){if(this.enabledTimes.length<1)return new Date("invalid");var e=K(this.getSelectedTime(),this.enabledTimes);if(e>-1)return-1<--e?this.enabledTimes[e]:this.enabledTimes[0];if(isNaN(this.getSelectedTime()))return this.enabledTimes[0];for(var t=new Date("invalid"),n=this.enabledTimes.length-1;n>=0;n--)if(this.getSelectedTime().valueOf()>this.enabledTimes[n].valueOf()){t=this.enabledTimes[n];break}return t}},{key:"getFirstAllEnabledTime",value:function(){return this.allEnabledTimes.length>0?this.allEnabledTimes[0]:new Date("invalid")}},{key:"getLastAllEnabledTime",value:function(){return this.allEnabledTimes.length>0?this.allEnabledTimes[this.allEnabledTimes.length-1]:new Date("invalid")}},{key:"getNextAllEnabledTime",value:function(){if(this.allEnabledTimes.length<1)return new Date("invalid");var e=K(this.getSelectedTime(),this.allEnabledTimes);if(e>-1)return++e<this.allEnabledTimes.length?this.allEnabledTimes[e]:this.allEnabledTimes[this.allEnabledTimes.length-1];if(isNaN(this.getSelectedTime()))return this.allEnabledTimes[0];for(var t=new Date("invalid"),n=0;n<this.allEnabledTimes.length;n++)if(this.getSelectedTime().valueOf()<this.allEnabledTimes[n].valueOf()){t=this.allEnabledTimes[n];break}return t}},{key:"getPrevAllEnabledTime",value:function(){if(this.allEnabledTimes.length<1)return new Date("invalid");var e=K(this.getSelectedTime(),this.allEnabledTimes);if(e>-1)return-1<--e?this.allEnabledTimes[e]:this.allEnabledTimes[0];if(isNaN(this.getSelectedTime()))return this.allEnabledTimes[0];for(var t=new Date("invalid"),n=this.allEnabledTimes.length-1;n>=0;n--)if(this.getSelectedTime().valueOf()>this.allEnabledTimes[n].valueOf()){t=this.allEnabledTimes[n];break}return t}},{key:"isTimeEnabled",value:function(e){return this.enabledTimes.reduce((function(t,n){return n.valueOf()==e.valueOf()||t}),!1)}},{key:"isTimeAllEnabled",value:function(e){return this.allEnabledTimes.reduce((function(t,n){return n.valueOf()==e.valueOf()||t}),!1)}},{key:"isFirstEnabledTime",value:function(){return this.getFirstEnabledTime().valueOf()==this.getSelectedTime().valueOf()}},{key:"isLastEnabledTime",value:function(){return this.getLastEnabledTime().valueOf()==this.getSelectedTime().valueOf()}},{key:"_setSelectedTime",value:function(e){var t=this.selectedTime;return this.selectedTime=e,this.trigger("change:time",t),this.selectedTime}},{key:"_updateTimes",value:function(){this.times=[];var e=[],t={};for(var n in this.timesByKey)this.timesByKey[n].times.forEach((function(n){n.valueOf()in t||(e.push(n),t[n.valueOf()]=n)}));U(e),e.forEach((function(e){if(this.times.length<1)this.times.push(e);else{var t=this.times[this.times.length-1];if(void 0!==this.maxTimeGap&&e.valueOf()-t.valueOf()>1e3*this.maxTimeGap){var n=t;do{n=new Date(n.getTime()+1e3*this.maxTimeGap),this.times.push(n)}while(e.valueOf()-n.valueOf()>1e3*this.maxTimeGap)}this.times.push(e)}}),this),U(this.times),this.trigger("change:times")}},{key:"_updateEnabledTimes",value:function(){this.enabledTimes=[],this.allEnabledTimes=[];var e={},t={};for(var n in this.timesByKey)this.timesByKey[n].enabled.forEach((function(n){n.valueOf()in e||(this.enabledTimes.push(n),e[n.valueOf()]=n),n.valueOf()in t?t[n.valueOf()]++:t[n.valueOf()]=1}),this);for(var o in U(this.enabledTimes),t)t[o]==Object.keys(this.timesByKey).length&&this.allEnabledTimes.push(e[o]);U(this.allEnabledTimes),this.trigger("change:enabledTimes")}},{key:"_initKeyboardNavigation",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.enabled,o=void 0!==n&&n,i=t.first,r=void 0===i?36:i,a=t.last,s=void 0===a?35:a,l=t.prev,u=void 0===l?37:l,c=t.next,f=void 0===c?39:c,d=t.prevAllEnabledTime,p=void 0===d?[37,"ctrl"]:d,h=t.nextAllEnabledTime,v=void 0===h?[39,"ctrl"]:h,y=t.add,b=void 0===y?void 0:y,m=t.sub,g=void 0===m?void 0:m;void 0===b&&(b={"3h":[39,"ctrl","shift"],"6h":[39,"shift"],"12h":[39,"alt","shift"],"24h":[39,"alt"]}),void 0===g&&(g={"3h":[37,"ctrl","shift"],"6h":[37,"shift"],"12h":[37,"alt","shift"],"24h":[37,"alt"]}),this._keyboardNavigation={enabled:o,first:r,last:s,prev:u,next:f,prevAllEnabledTime:p,nextAllEnabledTime:v,add:b,sub:g},document&&this._keyboardNavigation.enabled&&document.addEventListener("keydown",(function(t){Object.keys(e._keyboardNavigation).forEach((function(n){"enabled"!=n&&(/^(add|sub)$/.test(n)?Object.keys(e._keyboardNavigation[n]).forEach((function(o){var i=o.match(/^([0-9]+)\s*([a-zA-Z]+)$/);null!==i&&$(t,e._keyboardNavigation[n][o])&&(e[n](+i[1],i[2]),t.preventDefault(),t.stopPropagation())})):n in e&&$(t,e._keyboardNavigation[n])&&(e[n](),t.preventDefault(),t.stopPropagation()))}))}))}}],n&&X(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(H.prototype);const q=H;var K=function(e,t){return t.findIndex((function(t){return t.valueOf()==e.valueOf()}))};function U(e){e.sort((function(e,t){return e.valueOf()-t.valueOf()}))}function $(e,t){if("object"==Y(t)&&"forEach"in t||(t=[t]),0==t.length)return!1;var n=[["ctrl","ctrlKey"],["alt","altKey"],["shift","shiftKey"],["meta","metaKey"]].reduce((function(n,o){return n&&(t.indexOf(o[0])>-1?e[o[1]]:!e[o[1]])}),!0);return t.forEach((function(t){switch(t){case"ctrl":case"alt":case"shift":case"meta":break;default:t!=e.keyCode&&(n=!1)}})),n}const Z=jQuery;var W=n.n(Z);function J(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var ee=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.timeline,i=n.restartPause,r=void 0===i?1.8:i,a=n.imagePeriod,s=void 0===a?.2:a,l=n.imageFrequency,u=void 0===l?void 0:l,c=n.enabledStepsOnly,f=void 0===c||c,d=n.allEnabledStepsOnly,p=void 0!==d&&d;J(this,e),this.options={timeline:o,restartPause:r,imagePeriod:s,imageFrequency:u,enabledStepsOnly:f,allEnabledStepsOnly:p},void 0===this.options.timeline&&(this.options.timeline=new q),void 0!==this.options.imageFrequency&&0!=this.options.imageFrequency&&(this.options.imagePeriod=1/this.options.imageFrequency),this.animationIntervalID=void 0,this.animationTimeoutID=void 0,this.animationStep=0,this.timesHash={},this.times=[];var h=function(){t.times=t.options.timeline[t._getTimelineTimesMethod()](),t.timesHash={},t.times.forEach((function(e,n){return t.timesHash[e.valueOf()]=n}))};this.options.timeline.on(this._getTimelineChangeTimesEvent(),h),h()}var t,n;return t=e,(n=[{key:"getImagePeriod",value:function(){return this.options.imagePeriod}},{key:"setImagePeriod",value:function(e){return this.options.imagePeriod=e,this.isStarted()&&this._updateAnimation(),this.trigger("change:imageFrequency"),this}},{key:"getImageFrequency",value:function(){return 1/this.options.imagePeriod}},{key:"setImageFrequency",value:function(e){return 0!=e&&this.setImagePeriod(1/e),this}},{key:"getRestartPause",value:function(){return this.options.restartPause}},{key:"setRestartPause",value:function(e){return this.options.restartPause=Number(e),this.trigger("change:restartPause"),this}},{key:"isStarted",value:function(){return void 0!==this.animationIntervalID||void 0!==this.animationTimeoutID}},{key:"start",value:function(){this.options.timeline.getSelectedTime().valueOf()in this.timesHash&&this._setStep(this.timesHash[this.options.timeline.getSelectedTime().valueOf()]),this.isStarted()||this._updateAnimation(),this.trigger("start:animation")}},{key:"stop",value:function(){this._clearAnimation(),this.trigger("stop:animation")}},{key:"toggle",value:function(){this.isStarted()?this.stop():this.start()}},{key:"_setStep",value:function(e){0<=e&&e<this._getCount()&&(this.animationStep=e)}},{key:"_getTimelineChangeTimesEvent",value:function(){return this.options.enabledStepsOnly||this.options.allEnabledStepsOnly?"change:enabledTimes":"change:times"}},{key:"_getTimelineTimesMethod",value:function(){return this.options.allEnabledStepsOnly?"getAllEnabledTimes":this.options.enabledStepsOnly?"getEnabledTimes":"getTimes"}},{key:"_getCount",value:function(){return this.options.timeline[this._getTimelineTimesMethod()]().length}},{key:"_updateAnimation",value:function(){this._clearAnimation(),this.animationStep<this._getCount()-1?this._initAnimation():this._initRestartPause()}},{key:"_initAnimation",value:function(){var e=this;void 0===this.animationIntervalID&&(this.animationIntervalID=window.setInterval((function(){e.animationStep++,e.animationStep<e.times.length&&e.options.timeline.setSelectedTime(e.times[e.animationStep]),e.animationStep>=e._getCount()-1&&(e.trigger("end:animation"),e._clearAnimation(),e._initRestartPause())}),1e3*this.options.imagePeriod))}},{key:"_initRestartPause",value:function(){var e=this;void 0===this.animationTimeoutID&&(this.animationTimeoutID=window.setTimeout((function(){e.animationStep=0,e.trigger("restart:animation"),e.animationStep<e.times.length&&e.options.timeline.setSelectedTime(e.times[e.animationStep]),e._clearAnimation(),e._initAnimation()}),1e3*(this.options.imagePeriod+this.options.restartPause)))}},{key:"_clearAnimation",value:function(){void 0!==this.animationIntervalID&&(window.clearInterval(this.animationIntervalID),this.animationIntervalID=void 0),void 0!==this.animationTimeoutID&&(window.clearTimeout(this.animationTimeoutID),this.animationTimeoutID=void 0)}}])&&Q(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(ee.prototype);const te=ee;function ne(e,t){var n=t.animation,o=t.suffix,i=void 0===o?"fps":o,r=W()("<input>").addClass("form-control").attr("type","number").attr("min",1).attr("step",1),a=W()("<div>").addClass("input-group").append(r).append(W()("<span>").addClass("input-group-text").text(i));r.on("change",(function(){return n.setImageFrequency(r.val())}));var s=function(){return r.val(n.getImageFrequency())};return n.on("change:imageFrequency",s),s(),e.append(a),a}function oe(e,t){var n=t.animation,o=t.frequencies;o=o||[1];var i=W()("<input>").addClass("form-range").attr("type","range").attr("min",0).attr("max",o.length-1);i.on("change input",(function(){var e=i.val();e<o.length&&n.setImageFrequency(o[e])}));var r=function(){var e=o.indexOf(n.getImageFrequency());e>-1&&i.val(e)};return n.on("change:imageFrequency",r),r(),e.append(i),i}function ie(e,t){var n=t.animation,o=t.suffix,i=void 0===o?"s":o,r=W()("<input>").addClass("form-control").attr("type","number").attr("min",0).attr("step",.1),a=W()("<div>").addClass("input-group").append(r).append(W()("<span>").addClass("input-group-text").text(i));r.on("change",(function(){return n.setRestartPause(r.val())}));var s=function(){return r.val(n.getRestartPause())};return n.on("change:restartPause",s),s(),e.append(a),a}const re='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">\n <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"/>\n</svg>',ae='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">\n <path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"/>\n</svg>';function se(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function le(e,t,n){return t&&se(e.prototype,t),n&&se(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}const ce=le((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ue(this,e);var o=n.animation,i=void 0===o?void 0:o,r=n.node,a=void 0===r?void 0:r,s=n.startedContent,l=void 0===s?void 0:s,u=n.startedClass,c=void 0===u?void 0:u,f=n.stoppedContent,d=void 0===f?void 0:f,p=n.stoppedClass,h=void 0===p?void 0:p,v=n.classButton,y=void 0===v?void 0:v,b=n.classDropdownToggle,m=void 0===b?void 0:b,g=n.menu,w=void 0===g||g,O=n.menuImageFrequency,_=void 0===O||O,P=n.imageFrequencyCaption,S=void 0===P?"Frequency":P,j=n.menuFrequencies,T=void 0===j?void 0:j,k=n.menuRestartPause,x=void 0===k||k,E=n.restartPauseCaption,R=void 0===E?"Restart pause":E;"startedContent"in n||(l=W()(ae)),"stoppedContent"in n||(d=W()(re)),this.options={animation:i,node:a,startedContent:l,startedClass:c,stoppedContent:d,stoppedClass:h,classButton:y,classDropdownToggle:m,menu:w,menuImageFrequency:_,imageFrequencyCaption:S,menuFrequencies:T,menuRestartPause:x,restartPauseCaption:R},this.options.node=W()(this.options.node);var N=this.options.node;this.options.node.is("button")||(N=W()("<button>").addClass("btn"),this.options.node.append(N)),N.addClass(this.options.classButton);var C=function(){N.removeClass(t.options.stoppedClass),N.addClass(t.options.startedClass),N.empty(),"string"==typeof t.options.startedContent||t.options.startedContent instanceof String?N.text(t.options.startedContent):N.append(t.options.startedContent)},B=function(){N.removeClass(t.options.startedClass),N.addClass(t.options.stoppedClass),N.empty(),"string"==typeof t.options.stoppedContent||t.options.stoppedContent instanceof String?N.text(t.options.stoppedContent):N.append(t.options.stoppedContent)};if(this.options.animation.on("start:animation",C),this.options.animation.on("stop:animation",B),N.click((function(){return t.options.animation.toggle()})),this.options.animation.isStarted()?C():B(),!this.options.node.is("button")&&this.options.menu){this.options.node.addClass("btn-group");var I=W()("<button>").attr("type","button").addClass("btn dropdown-toggle dropdown-toggle-split").addClass(this.options.classDropdownToggle).attr("data-bs-toggle","dropdown").attr("aria-expanded",!1);I.append(W()("<span>").addClass("visually-hidden").text("Toggle Dropdown")),this.options.node.append(I);var D=W()("<div>").addClass("dropdown-menu");this.options.node.append(D);var L=W()("<form>").addClass("px-4 py-3");if((this.options.menuImageFrequency||this.options.menuRestartPause)&&D.append(L),this.options.menuImageFrequency){var A=W()("<label>").addClass("form-label").text(this.options.imageFrequencyCaption),M=W()("<div>").append(A);this.options.menuRestartPause&&M.addClass("mb-3"),L.append(M),ne(M,{animation:this.options.animation}),void 0!==this.options.menuFrequencies&&oe(M,{animation:this.options.animation,frequencies:this.options.menuFrequencies})}if(this.options.menuRestartPause){var V=W()("<label>").addClass("form-label").text(this.options.restartPauseCaption),G=W()("<div>").append(V);L.append(G),ie(G,{animation:this.options.animation})}}}));function fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function de(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var pe=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.timeline,o=void 0===n?void 0:n,i=t.node,r=void 0===i?void 0:i,a=t.animation,s=void 0===a?void 0:a,l=t.enabledStepsOnly,u=void 0===l||l,c=t.allEnabledStepsOnly,f=void 0!==c&&c,d=t.textInvalid,p=void 0===d?"-":d,h=t.getTimeText,v=void 0===h?void 0:h,y=t.outputTimezone,b=void 0===y?void 0:y;fe(this,e),this.options={timeline:o,node:r,animation:s,enabledStepsOnly:u,allEnabledStepsOnly:f,textInvalid:p,getTimeText:v,outputTimezone:b},void 0===this.options.timeline&&(this.options.timeline=new q),this.listeners=[],this.inputListener=void 0}var t,n;return t=e,(n=[{key:"setNode",value:function(e){if(void 0!==this.options.node&&this.emptyNode(),void 0===e)this.detachEventListeners(),this.options.node=e;else{this.options.node=e;var t=this.listeners.length>0;t||(this.attachEventListener(this.options.timeline,"change:time",(function(){this.onChangeTime()}),this),this.attachEventListener(this.options.timeline,"change:times",(function(){this.onChangeTimes()}),this),this.attachEventListener(this.options.timeline,"change:enabledTimes",(function(){this.onChangeTimes()}),this)),this.onInitNode(t),this.onChangeTimes(),this.onChangeTime()}return void 0===this.inputListener&&(this.inputListener=this.on("input",(function(){void 0!==this.options.animation&&this.options.animation.stop()}),this)),this}},{key:"getOutputTimezone",value:function(){return this.options.outputTimezone}},{key:"setOutputTimezone",value:function(e){var t=this.options.outputTimezone!=e;return this.options.outputTimezone=e,t&&void 0!==this.options.node&&(this.onChangeTimes(),this.onChangeTime()),this}},{key:"onChangeTime",value:function(){}},{key:"onChangeTimes",value:function(){}},{key:"emptyNode",value:function(){}},{key:"onInitNode",value:function(){}},{key:"getTimelineTimes",value:function(){var e=this.options.allEnabledStepsOnly?"getAllEnabledTimes":this.options.enabledStepsOnly?"getEnabledTimes":"getTimes";return this.options.timeline[e]()}},{key:"timeToText",value:function(e,t){return isNaN(e)?this.options.textInvalid:void 0!==this.options.getTimeText?this.options.getTimeText.call(this,e,t):e.toISOString()}},{key:"attachEventListener",value:function(e,t,n,o){this.listeners.push([e,t]),e.on(t,n,o)}},{key:"detachEventListeners",value:function(){this.listeners.forEach((function(e){"un"in e[0]?e[0].un(e[1]):"off"in e[0]&&e[0].off(e[1])})),this.listeners=[]}}])&&de(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(pe.prototype);const he=pe;function ve(e){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ve(e)}var ye=["format"];function be(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function we(e,t){return we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},we(e,t)}function Oe(e,t){if(t&&("object"===ve(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _e(e){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_e(e)}const Pe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&we(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_e(o);if(i){var n=_e(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Oe(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.format,o=void 0===n?void 0:n,i=be(t,ye);return me(this,a),(e=r.call(this,i)).options.format=o,e.setNode(e.options.node),e}return t=a,(n=[{key:"onChangeTime",value:function(){this.options.node.text(this.timeToText(this.options.timeline.getSelectedTime(),this.options.format))}},{key:"emptyNode",value:function(){this.options.node.text("")}}])&&ge(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(he);function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function je(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Te(e,t){return Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Te(e,t)}function ke(e,t){if(t&&("object"===Se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function xe(e){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xe(e)}const Ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Te(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=xe(o);if(i){var n=xe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ke(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this,e)).times=[],t.timesIndexes={},t.setNode(t.options.node),t}return t=a,(n=[{key:"onChangeTime",value:function(){var e=this.options.timeline.getSelectedTime();e.valueOf()in this.timesIndexes?this.options.node.val(this.timesIndexes[e.valueOf()]+1):this.options.node.val(1)}},{key:"onChangeTimes",value:function(){this.times=this.getTimelineTimes(),this.timesIndexes={},this.times.forEach((function(e,t){this.timesIndexes[e.valueOf()]=t}),this),this.options.node.prop("max",this.times.length)}},{key:"onInitNode",value:function(e){if(this.options.node.prop("min",1),this.options.node.prop("step",1),!e){var t=this;this.attachEventListener(this.options.node,"change input",(function(){var e=+W()(this).val();0<e&&e<=t.times.length&&t.options.timeline.setSelectedTime(t.times[e-1]),t.trigger("input")}))}}}])&&je(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(he);function Re(e){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Re(e)}var Ne=["format","grouping","groupingFormat","classMain","classButtonGroup","classButtonGroupMargin","classLabel","classLabelSpan","classButton","classButtonActive","classButtonNotEnabled","classButtonEnabled","classButtonAllEnabled"];function Ce(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function De(e,t){return De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},De(e,t)}function Le(e,t){if(t&&("object"===Re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ae(e){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ae(e)}const Me=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&De(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ae(o);if(i){var n=Ae(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Le(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.format,o=void 0===n?"HH":n,i=t.grouping,s=void 0===i?"daily":i,l=t.groupingFormat,u=void 0===l?"ddd, DD. MMM":l,c=t.classMain,f=void 0===c?"btn-toolbar":c,d=t.classButtonGroup,p=void 0===d?"btn-group":d,h=t.classButtonGroupMargin,v=void 0===h?"me-2":h,y=t.classLabel,b=void 0===y?void 0:y,m=t.classLabelSpan,g=void 0===m?"d-block w-100":m,w=t.classButton,O=void 0===w?"btn":w,_=t.classButtonActive,P=void 0===_?"active":_,S=t.classButtonNotEnabled,j=void 0===S?"btn-light":S,T=t.classButtonEnabled,k=void 0===T?"btn-secondary":T,x=t.classButtonAllEnabled,E=void 0===x?"btn-primary":x,R=Ce(t,Ne);return Be(this,a),(e=r.call(this,R)).options.format=o,e.options.grouping=s,e.options.groupingFormat=u,e.options.classMain=f,e.options.classButtonGroup=p,e.options.classButtonGroupMargin=v,e.options.classLabel=b,e.options.classLabelSpan=g,e.options.classButton=O,e.options.classButtonActive=P,e.options.classButtonNotEnabled=j,e.options.classButtonEnabled=k,e.options.classButtonAllEnabled=E,e.toolbarNode=void 0,e.setNode(e.options.node),e}return t=a,(n=[{key:"onChangeTime",value:function(){if(void 0!==this.toolbarNode){var e=this.options.timeline.getSelectedTime(),t=this;this.toolbarNode.find("button").each((function(){var n=new Date(+W()(this).data("time"));W()(this).removeClass(t.options.classButtonActive),e.valueOf()==n.valueOf()&&W()(this).addClass(t.options.classButtonActive)}))}}},{key:"onChangeTimes",value:function(){void 0===this.toolbarNode&&(this.toolbarNode=W()("<div>")),this.toolbarNode.empty();var e="daily"==this.options.grouping?"YYYY-MM-DD":"hourly"==this.options.grouping?"YYYY-MM-DD HH":this.options.grouping,t=void 0;this.getTimelineTimes().forEach((function(n){if(void 0===t||t.data("date")!=this.timeToText(n,e)){var o=W()("<div>").addClass(this.options.classButtonGroup).addClass(this.options.classButtonGroupMargin).attr("role","group").attr("aria-label",this.timeToText(n,e));if(void 0===this.options.groupingFormat)t=o;else{var i=W()("<span>").addClass(this.options.classLabelSpan).text(this.timeToText(n,this.options.groupingFormat));t=W()("<label>").addClass(this.options.classLabel).append(i),o.attr("aria-label",i.text()),t.append(o)}t.data("date",this.timeToText(n,e)),this.toolbarNode.append(t)}var r=W()("<button>").addClass(this.options.classButton).attr("type","button").data("time",n.valueOf());"function"==typeof this.options.format?r.text(this.timeToText(n,this.options.format.call(this,n))):r.text(this.timeToText(n,this.options.format)),this.options.timeline.isTimeAllEnabled(n)?r.addClass(this.options.classButtonAllEnabled):this.options.timeline.isTimeEnabled(n)?r.addClass(this.options.classButtonEnabled):r.addClass(this.options.classButtonNotEnabled);var a=this.options.timeline.getSelectedTime();n.valueOf()==a.valueOf()&&r.addClass(this.options.classButtonActive);var s=this;r.click((function(){s.options.timeline.setSelectedTime(new Date(+W()(this).data("time"))),s.trigger("input")})),t.hasClass(this.options.classButtonGroup)?t.append(r):t.children("div").append(r)}),this),this.toolbarNode.find("div."+this.options.classButtonGroup).last().removeClass(this.options.classButtonGroupMargin)}},{key:"emptyNode",value:function(){this.toolbarNode=void 0,this.options.node.empty()}},{key:"onInitNode",value:function(){this.toolbarNode=W()("<div>").addClass(this.options.classMain).attr("role","toolbar").attr("aria-label","Timeline toolbar"),this.options.node.append(this.toolbarNode)}}])&&Ie(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(he);function Ve(e){return Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(e)}var Ge=["format","buttonFormat","grouping","groupingDivider","groupingFormat","classMain","classDropdownMenu","classDropdownItem","classItemActive","classItemNotEnabled","classItemEnabled","classItemAllEnabled","classDropdownHeader","classDropdownDivider","classDropdownButton","classButtonNotEnabled","classButtonEnabled","classButtonAllEnabled"];function Fe(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ze(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Xe(){return Xe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=He(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Xe.apply(this,arguments)}function He(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ue(e)););return e}function qe(e,t){return qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qe(e,t)}function Ke(e,t){if(t&&("object"===Ve(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ue(e){return Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ue(e)}const $e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qe(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ue(o);if(i){var n=Ue(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ke(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.format,o=void 0===n?"HH:mm":n,i=t.buttonFormat,s=void 0===i?"DD. MMMM YYYY HH:mm":i,l=t.grouping,u=void 0===l?"daily":l,c=t.groupingDivider,f=void 0===c||c,d=t.groupingFormat,p=void 0===d?"ddd, DD. MMMM YYYY":d,h=t.classMain,v=void 0===h?"dropdown":h,y=t.classDropdownMenu,b=void 0===y?"dropdown-menu":y,m=t.classDropdownItem,g=void 0===m?"dropdown-item":m,w=t.classItemActive,O=void 0===w?"active":w,_=t.classItemNotEnabled,P=void 0===_?"disabled":_,S=t.classItemEnabled,j=void 0===S?void 0:S,T=t.classItemAllEnabled,k=void 0===T?void 0:T,x=t.classDropdownHeader,E=void 0===x?"dropdown-header":x,R=t.classDropdownDivider,N=void 0===R?"dropdown-divider":R,C=t.classDropdownButton,B=void 0===C?"btn dropdown-toggle":C,I=t.classButtonNotEnabled,D=void 0===I?void 0:I,L=t.classButtonEnabled,A=void 0===L?void 0:L,M=t.classButtonAllEnabled,V=void 0===M?void 0:M,G=Fe(t,Ge);return Ye(this,a),(e=r.call(this,G)).options.format=o,e.options.buttonFormat=s,e.options.grouping=u,e.options.groupingDivider=f,e.options.groupingFormat=p,e.options.classMain=v,e.options.classDropdownMenu=b,e.options.classDropdownItem=g,e.options.classItemActive=O,e.options.classItemNotEnabled=P,e.options.classItemEnabled=j,e.options.classItemAllEnabled=k,e.options.classDropdownHeader=E,e.options.classDropdownDivider=N,e.options.classDropdownButton=B,e.options.classButtonNotEnabled=D,e.options.classButtonEnabled=A,e.options.classButtonAllEnabled=V,e.visualisationButtonText=new Pe({timeline:e.options.timeline,format:e.options.buttonFormat,textInvalid:e.options.textInvalid,outputTimezone:e.options.outputTimezone,getTimeText:e.options.getTimeText}),e.dropdownNode=void 0,e.setNode(e.options.node),e}return t=a,(n=[{key:"setOutputTimezone",value:function(e){return Xe(Ue(a.prototype),"setOutputTimezone",this).call(this,e),this.visualisationButtonText.setOutputTimezone(e),this}},{key:"onChangeTime",value:function(){if(void 0!==this.dropdownNode){var e=this.options.timeline.getSelectedTime();this.options.node.children("li").children("button").removeClass(this.options.classButtonActive).removeClass(this.options.classButtonNotEnabled).removeClass(this.options.classButtonEnabled).removeClass(this.options.classButtonAllEnabled),this.options.timeline.isTimeAllEnabled(e)?this.options.node.children("button").addClass(this.options.classButtonAllEnabled):this.options.timeline.isTimeEnabled(e)?this.options.node.children("button").addClass(this.options.classButtonEnabled):this.options.node.children("button").addClass(this.options.classButtonNotEnabled);var t=this;this.dropdownNode.children("li").children("button."+this.options.classDropdownItem).each((function(){var n=new Date(+W()(this).data("time"));W()(this).removeClass(t.options.classItemActive).removeClass(t.options.classItemNotEnabled).removeClass(t.options.classItemEnabled).removeClass(t.options.classItemAllEnabled),e.valueOf()==n.valueOf()?W()(this).addClass(t.options.classItemActive):t.options.timeline.isTimeAllEnabled(n)?W()(this).addClass(t.options.classItemAllEnabled):t.options.timeline.isTimeEnabled(n)?W()(this).addClass(t.options.classItemEnabled):W()(this).addClass(t.options.classItemNotEnabled)}))}}},{key:"onChangeTimes",value:function(){void 0===this.dropdownNode&&(this.dropdownNode=W()("<div>")),this.dropdownNode.empty();var e="daily"==this.options.grouping?"YYYY-MM-DD":"hourly"==this.options.grouping?"YYYY-MM-DD HH":this.options.grouping,t=void 0;this.getTimelineTimes().forEach((function(n){void 0!==t&&t==this.timeToText(n,e)||(void 0!==t&&this.options.groupingDivider&&this.dropdownNode.append(W()("<div>").addClass(this.options.classDropdownDivider)),void 0!==this.options.groupingFormat&&this.dropdownNode.append(W()("<h6>").addClass(this.options.classDropdownHeader).text(this.timeToText(n,this.options.groupingFormat))),t=this.timeToText(n,e));var o=W()("<button>").addClass(this.options.classDropdownItem).attr("type","button").text(this.timeToText(n,this.options.format)).data("time",n.valueOf()),i=this;o.click((function(){i.options.timeline.setSelectedTime(new Date(+W()(this).data("time"))),i.trigger("input")})),this.dropdownNode.append(W()("<li>").append(o))}),this)}},{key:"emptyNode",value:function(){void 0!==this.visualisationButtonText&&this.visualisationButtonText.setNode(void 0),this.dropdownNode=void 0,this.options.node.empty()}},{key:"onInitNode",value:function(){for(var e="dropdownMenuButton",t=0;null!=document.getElementById(e);)e="dropdownMenuButton"+ ++t;var n=W()("<button>").addClass(this.options.classDropdownButton).attr("type","button").attr("id",e).attr("data-bs-toggle","dropdown").attr("aria-haspopup",!0).attr("aria-expanded",!1);this.visualisationButtonText.setNode(n),this.dropdownNode=W()("<ul>").addClass(this.options.classDropdownMenu).attr("aria-labelledby",e),this.options.node.addClass(this.options.classMain).append(n).append(this.dropdownNode)}}])&&ze(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(he);function Ze(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var We=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=W().extend(!0,{map:void 0,layerGroup:void 0},t)}var t,n;return t=e,(n=[{key:"getMap",value:function(){return this.options.map}},{key:"getViewCenter",value:function(){}},{key:"setViewCenter",value:function(){return this}},{key:"getViewZoom",value:function(){}},{key:"setViewZoom",value:function(){return this}},{key:"makeLayerGroup",value:function(){}},{key:"getExtendedEventByTypeCollection",value:function(e){return e.synviewType=void 0,e.layer=void 0,e.feature=void 0,e.color=void 0,e}},{key:"findLayerInType",value:function(){return-1}}])&&Ze(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(We.prototype);const Je=We;function Qe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var et=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.itemIds=[],this.items={}}var t,n;return t=e,(n=[{key:"getCount",value:function(){return this.itemIds.length}},{key:"getItems",value:function(){return this.itemIds.map((function(e){return this.items[e]}),this)}},{key:"getItemIds",value:function(){return this.itemIds}},{key:"getItemById",value:function(e){return e in this.items?this.items[e]:void 0}},{key:"containsId",value:function(e){return-1!==this.getIndexById(e)}},{key:"getIndexById",value:function(e){var t=-1;return this.itemIds.forEach((function(n,o){n==e&&(t=o)})),t}},{key:"append",value:function(e){var t=e.getId();return this.containsId(t)?(this.trigger("replace:item",e,this.getItemById(t)),this.items[t]=e):(this.itemIds.push(t),this.items[t]=e,this.trigger("add:item",e)),this}},{key:"remove",value:function(e){var t=this.getItemById(e);if(void 0!==t){var n=this.getIndexById(e);delete this.items[e],this.itemIds.splice(n,1),this.trigger("remove:item",t)}return this}}])&&Qe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(et.prototype);const tt=et,nt=ol.layer.Group;var ot=n.n(nt);const it=ol.layer.Vector;var rt=n.n(it);const at=ol.Observable;function st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var ut=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,o=void 0===n?void 0:n,i=t.datetime,r=void 0===i?void 0:i,a=t.mimetype,s=void 0===a?void 0:a,l=t.reloadTime,u=void 0===l?void 0:l,c=t.className,f=void 0===c?void 0:c,d=t.imageSmoothingEnabled,p=void 0===d?void 0:d,h=t.ol,v=void 0===h?{}:h;st(this,e),this.options={url:o,datetime:r,mimetype:s,reloadTime:u,className:f,ol:v},this._normalizeOLOptions(this.options.ol),this.layer=void 0,this.layerGroup=void 0,this.reloadTimerId=void 0,this.visible=!1,this.zIndex=void 0,this.opacity=1,this._imageSmoothing=p}var t,n;return t=e,n=[{key:"getId",value:function(){return this.getUrl()}},{key:"getUrl",value:function(){return this.options.url}},{key:"getDatetime",value:function(){return this.options.datetime}},{key:"getMIMEType",value:function(){return void 0===this.options.mimetype?"application/octet-stream":this.options.mimetype}},{key:"getReloadTime",value:function(){return this.options.reloadTime}},{key:"setReloadTime",value:function(e){return this.options.reloadTime=e,this._reload(),this}},{key:"getVisible",value:function(){return this.visible}},{key:"setVisible",value:function(e){return this.visible=e,void 0!==this.layer&&("setVisible"in this.layer?this.layer.setVisible(e):this.visible?this.layer.addTo(this.layerGroup):this.layerGroup.removeLayer(this.layer)),this}},{key:"getZIndex",value:function(){return this.zIndex}},{key:"setZIndex",value:function(e){return this.zIndex=e,void 0!==this.layer&&this.layer.setZIndex(e),this}},{key:"getOpacity",value:function(){return this.opacity}},{key:"setOpacity",value:function(e){return this.opacity=e,void 0!==this.layer&&this.layer.setOpacity(e),this}},{key:"className",get:function(){return this.options.className},set:function(e){this.options.className=e}},{key:"imageSmoothingEnabled",get:function(){return this._imageSmoothing},set:function(e){this._imageSmoothing=e}},{key:"getLayerGroup",value:function(){return this.layerGroup}},{key:"setLayerGroup",value:function(e){if(void 0!==this.layerGroup&&void 0!==this.layer&&("remove"in this.layerGroup.getLayers()?this.layerGroup.getLayers().remove(this.layer):this.layerGroup.removeLayer(this.layer)),void 0===e&&(this.layer=void 0),this.layerGroup=e,void 0!==this.layerGroup)if("addLayer"in this.layerGroup){var t=this.getLLLayer();this.getVisible()&&this.layerGroup.addLayer(t)}else this.layerGroup.getLayers().push(this.getOLLayer());return this.setReloadTime(this.getReloadTime()),this}},{key:"getOLLayer",value:function(){return void 0!==this.layer||(this.layer=this._makeOLLayer()),this.layer}},{key:"makeOLLayer",value:function(){return new(rt())({className:this.className})}},{key:"_makeOLLayer",value:function(){var e=this,t=this.makeOLLayer();if(t.setVisible(this.visible),t.setZIndex(this.zIndex),t.setOpacity(this.opacity),"events"in this.options.ol&&void 0!==this.options.ol.events&&["prerender","postrender"].forEach((function(n){n in e.options.ol.events&&void 0!==e.options.ol.events[n]&&t.on(n,(function(o){e.options.ol.events[n].call(e,o,t)}))})),!this._imageSmoothing){var n=t.getSource();null!==n&&"contextOptions_"in n&&(n.contextOptions_={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1})}return t}},{key:"getLLLayer",value:function(){return void 0!==this.layer||(this.layer=this._makeLLLayer()),this.layer}},{key:"makeLLLayer",value:function(){return L.Layer()}},{key:"preload",value:function(){}},{key:"_makeLLLayer",value:function(){return this.makeLLLayer()}},{key:"_reload",value:function(){if(void 0!==this.reloadTimerId&&(clearTimeout(this.reloadTimerId),this.reloadTimerId=void 0),void 0!==this.options.reloadTime&&void 0!==this.layerGroup){var e=function(){if(this.reloadTimerId=void 0,void 0!==this.layerGroup){var t=this._makeOLLayer();if("getUrl"in t.getSource()){var n=this.layerGroup,o=t.getSource().on("change",function(){"ready"!=t.getSource().getState()&&"error"!=t.getSource().getState()||((0,at.unByKey)(o),"ready"==t.getSource().getState()&&void 0!==this.layerGroup?(t.setVisible(this.layer.getVisible()),t.setOpacity(this.layer.getOpacity()),t.setZIndex(this.layer.getZIndex()),this.layerGroup.getLayers().remove(this.layer),this.layer=t):void 0!==this.layerGroup?this.layerGroup.getLayers().remove(t):n.getLayers().remove(t),void 0===this.reloadTimerId&&void 0!==this.options.reloadTime&&void 0!==this.layerGroup&&(this.reloadTimerId=setTimeout(e,1e3*this.options.reloadTime)))}.bind(this));this.layerGroup.getLayers().push(t),t.setVisible(!0)}else this.layerGroup.getLayers().push(t),t.setVisible(!0),setTimeout(function(){this.layer=t,void 0===this.reloadTimerId&&void 0!==this.options.reloadTime&&(this.reloadTimerId=setTimeout(e,1e3*this.options.reloadTime))}.bind(this),1e3)}}.bind(this);return this.reloadTimerId=setTimeout(e,1e3*this.options.reloadTime),this}}},{key:"_normalizeOLOptions",value:function(e){var t=e.source,n=void 0===t?{}:t,o=e.events,i=void 0===o?void 0:o,r=e.style,a=void 0===r?void 0:r;this.options.ol={source:n,events:i,style:a}}}],n&<(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(ut.prototype);const ct=ut;function ft(e){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(e)}function dt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function pt(){return pt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=ht(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},pt.apply(this,arguments)}function ht(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=bt(e)););return e}function vt(e,t){return vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vt(e,t)}function yt(e,t){if(t&&("object"===ft(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function bt(e){return bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bt(e)}const mt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vt(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=bt(o);if(i){var n=bt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return yt(this,e)});function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=r.call(this)).times=[],e}return t=a,(n=[{key:"getResources",value:function(){return this.times.map((function(e){return this.items[e.valueOf()]}),this)}},{key:"getTimes",value:function(){return this.times}},{key:"getItemById",value:function(e){var t=pt(bt(a.prototype),"getItemById",this).call(this,e);return void 0===t?new ct:t}},{key:"getResourceByTime",value:function(e){return this.getItemById(isNaN(e)?"":e.valueOf())}},{key:"containsTime",value:function(e){return this.getIndexById(isNaN(e)?"":e.valueOf())>-1}},{key:"getIndexByTime",value:function(e){var t=-1;return isNaN(e)||this.times.forEach((function(n,o){n.valueOf()==e.valueOf()&&(t=o)})),t}},{key:"getNewestResource",value:function(){return this.times.length<1?new ct:this.getResourceByTime(this.times[this.times.length-1])}},{key:"append",value:function(e){return this._append(e),this._sortTimes(),this}},{key:"remove",value:function(e){return this._remove(isNaN(e)?"":e.valueOf()),this._sortTimes(),this}},{key:"setResources",value:function(e){return e.forEach((function(e){this._append(e)}),this),this._filterTimesByResources(e),this._sortTimes(),this}},{key:"_append",value:function(e){var t=e.getDatetime(),n=void 0===t?"":t.valueOf();this.containsId(n)?(this.trigger("replace:item",e,this.getItemById(n)),this.items[n]=e):(this.itemIds.push(n),this.items[n]=e,void 0===t||isNaN(t)||this.times.push(t),this.trigger("add:item",e))}},{key:"_remove",value:function(e){var t=this.getIndexById(e);if(t>-1){var n=this.items[e];if(delete this.items[e],this.itemIds.splice(t,1),void 0!==e&&""!==e&&!isNaN(e)){var o=this.times.findIndex((function(t){return t.valueOf()==e}));o>-1&&this.times.splice(o,1)}this.trigger("remove:item",n)}}},{key:"_filterTimesByResources",value:function(e){var t=!1;this.times=this.times.filter((function(n){var o=!1;return e.findIndex((function(e){var o=!1,i=e.getDatetime();return void 0!==i&&n.valueOf()==i.valueOf()?o=!0:void 0===i&&(t=!0),o}),this)<0&&(this.remove(n.valueOf()),o=!0),!o}),this),t&&this.remove("")}},{key:"_sortTimes",value:function(){this.times.sort((function(e,t){return e.valueOf()-t.valueOf()}))}}])&&dt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(tt);function gt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var Ot=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,o=void 0===n?void 0:n,i=t.visible,r=void 0===i||i,a=t.zIndex,s=void 0===a?void 0:a,l=t.displayMethod,u=void 0===l?"floor":l,c=t.displayMaxResourceAge,f=void 0===c?10800:c,d=t.displayFadeStart,p=void 0===d?900:d,h=t.displayFadeStartOpacity,v=void 0===h?.95:h,y=t.resources,b=void 0===y?void 0:y,m=t.className,g=void 0===m?void 0:m,w=t.imageSmoothingEnabled,O=void 0===w?void 0:w,_=t.tooltip,P=void 0===_?void 0:_,S=t.preload,j=void 0===S?{}:S;gt(this,e),this.options={id:o,visible:r,zIndex:s,displayMethod:u,displayMaxResourceAge:f,displayFadeStart:p,displayFadeStartOpacity:v,resources:b,className:g,imageSmoothingEnabled:O,tooltip:P},this.layerGroup=void 0,this.collection=new mt,this.displayedResourceTime=new Date("invalid"),this.collection.on("add:item",(function(e){e.className=this.className,this._addOLLayer(e),this._preload.enabled&&e.preload()}),this),this.collection.on("remove:item",(function(e){this._removeOLLayer(e)}),this),this.collection.on("replace:item",(function(e,t){e!==t&&(e.className=this.className,this._replaceOLLayer(e,t),this._preload.enabled&&e.preload())}),this),this._preload=j,void 0!==this.options.resources&&this.collection.setResources(this.options.resources),delete this.options.resources}var t,n;return t=e,n=[{key:"getId",value:function(){return this.options.id}},{key:"setId",value:function(e){return this.options.id=e,this}},{key:"getVisible",value:function(){return this.options.visible}},{key:"setVisible",value:function(e){return(this.options.visible?!e:e)&&(this.options.visible=!!e,void 0!==this.layerGroup&&this.layerGroup.setVisible(this.options.visible),this.getResourceCollection().getItems().forEach((function(e){isNaN(e.getDatetime())&&e.setVisible(this.options.visible),e.setLayerGroup(this.options.visible?this.layerGroup:void 0)}),this),this.trigger("change:visible")),this}},{key:"getZIndex",value:function(){return this.options.zIndex}},{key:"setZIndex",value:function(e){return this.options.zIndex=e,void 0!==this.layerGroup&&this.layerGroup.setZIndex(e),this.getResourceCollection().getItems().forEach((function(t){t.setZIndex(e)})),this}},{key:"className",get:function(){return this.options.className},set:function(e){this.options.className=e}},{key:"getLayerGroup",value:function(){return void 0===this.layerGroup?new(ot()):this.layerGroup}},{key:"setLayerGroup",value:function(e){return this.layerGroup=e,void 0!==this.layerGroup&&("setVisible"in this.layerGroup&&this.layerGroup.setVisible(this.options.visible),this.layerGroup.setZIndex(this.options.zIndex)),this.getResourceCollection().getItems().forEach((function(t){t.setLayerGroup(this.options.visible?e:void 0)}),this),this}},{key:"getResourceCollection",value:function(){return this.collection}},{key:"appendResource",value:function(e){return this.collection.append(e),this.setDisplayTime(this.displayedResourceTime),this.trigger("change:resources"),this}},{key:"removeResource",value:function(e){return this._hideVisibleResource(),this.collection.remove(e.getDatetime()),this.setDisplayTime(this.displayedResourceTime),this.trigger("change:resources"),this}},{key:"setResources",value:function(e){return this._hideVisibleResource(),this.collection.setResources(e),this.setDisplayTime(this.displayedResourceTime),this.trigger("change:resources"),this}},{key:"getDisplayedResource",value:function(){return this.getVisible()&&void 0!==this.layerGroup?isNaN(this.displayedResourceTime)&&this.collection.getTimes().length>0?new ct:this.collection.getResourceByTime(this.displayedResourceTime):new ct}},{key:"setDisplayTime",value:function(e){if(!this.getVisible())return this;var t=this._getResourceTimeByDisplayTime(e);if((void 0===t||void 0!==t&&!isNaN(this.displayedResourceTime)&&this.displayedResourceTime.valueOf()!=t.valueOf())&&this._hideVisibleResource(),void 0!==t){this.displayedResourceTime=t;var n=this.getResourceCollection().getItemById(t.valueOf());if(n.getId()){n.setVisible(!0);var o=1;Math.abs(e.valueOf()-t.valueOf())>1e3*this.options.displayMaxResourceAge?o=0:Math.abs(e.valueOf()-t.valueOf())>1e3*this.options.displayFadeStart&&(o=this.options.displayFadeStartOpacity*(Math.abs(e.valueOf()-t.valueOf())-1e3*this.options.displayMaxResourceAge)/(1e3*(this.options.displayFadeStart-this.options.displayMaxResourceAge))),n.setOpacity(o)}}else this.displayedResourceTime=new Date("invalid");return this}},{key:"getTooltip",value:function(){return this.options.tooltip}},{key:"setTooltip",value:function(e){return this.options.tooltip=e,this}},{key:"setResourcesOLStyle",value:function(){var e=arguments;return this.getResourceCollection().getItems().forEach((function(t){"setOLStyle"in t&&t.setOLStyle.apply(t,e)})),this}},{key:"_hideVisibleResource",value:function(){isNaN(this.displayedResourceTime)||this.getResourceCollection().getItemById(this.displayedResourceTime.valueOf()).setVisible(!1)}},{key:"_addOLLayer",value:function(e){isNaN(e.getDatetime())&&e.setVisible(this.getVisible()),void 0!==this.options.imageSmoothingEnabled&&void 0===e.imageSmoothingEnabled&&(e.imageSmoothingEnabled=this.options.imageSmoothingEnabled),e.setLayerGroup(this.getLayerGroup()),e.setZIndex(this.options.zIndex)}},{key:"_removeOLLayer",value:function(e){e.setLayerGroup(void 0)}},{key:"_replaceOLLayer",value:function(e,t){this._removeOLLayer(t),this._addOLLayer(e)}},{key:"_getResourceTimeByDisplayTime",value:function(e){if(!isNaN(e)){var t=void 0;return this.collection.getTimes().forEach((function(n){switch(this.options.displayMethod){case"exact":e.valueOf()==n.valueOf()&&(t=n);break;case"nearest":(void 0===t||Math.abs(e.valueOf()-n.valueOf())<Math.abs(e.valueOf()-t.valueOf()))&&(t=n);break;default:(void 0===t||n.valueOf()<=e.valueOf()&&e.valueOf()-n.valueOf()<e.valueOf()-t.valueOf())&&(t=n)}}),this),t}}}],n&&wt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(Ot.prototype);const _t=Ot;function Pt(e){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt(e)}function St(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function jt(){return jt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=Tt(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},jt.apply(this,arguments)}function Tt(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Et(e)););return e}function kt(e,t){return kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kt(e,t)}function xt(e,t){if(t&&("object"===Pt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Et(e){return Et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Et(e)}const Rt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kt(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Et(o);if(i){var n=Et(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return xt(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this)).options=W().extend(!0,{exclusiveVisibility:!1,syncVisibility:!1},e),t}return t=a,(n=[{key:"getItemById",value:function(e){return void 0===jt(Et(a.prototype),"getItemById",this).call(this,e)?new _t:this.items[e]}},{key:"append",value:function(e){var t=this;return this.options.exclusiveVisibility&&e.getVisible()&&this.isVisible()?e.setVisible(!1):t.options.syncVisibility&&(e.getVisible()?this.isVisible()||this.getItems().forEach((function(e){e.setVisible(!0)}),this):this.isVisible()&&e.setVisible(!0)),e.on("change:visible",(function(){t.options.exclusiveVisibility?this.getVisible()&&t.getItems().forEach((function(e){e.getId()!=this.getId()&&e.setVisible(!1)}),this):t.options.syncVisibility&&t.getItems().forEach((function(e){e.getId()!=this.getId()&&e.setVisible(this.getVisible())}),this)})),jt(Et(a.prototype),"append",this).call(this,e)}},{key:"getVisibleTypes",value:function(){return this.getItems().filter((function(e){return e.getVisible()}))}},{key:"isVisible",value:function(){return this.getVisibleTypes().length>0}},{key:"setExclusiveVisibility",value:function(e){if(this.options.exclusiveVisibility!=e&&e){var t=!1;this.getItems().forEach((function(e){t?e.setVisible(!1):t=e.getVisible()}),this)}return this.options.exclusiveVisibility=e,this}},{key:"setSyncVisibility",value:function(e){return this.options.syncVisibility!=e&&e&&this.isVisible()&&this.getItems().forEach((function(e){e.setVisible(!0)}),this),this.options.syncVisibility=e,this}}])&&St(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(tt);function Nt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ct(e,t,n){return t&&Nt(e.prototype,t),n&&Nt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Bt=Ct((function e(t){var n=this,o=t.map,i=t.typeCollection,r=t.tooltip;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tooltipFeature=void 0,this.tooltipPixelColor=void 0,this.map=o,this.typeCollection=i,this.tooltip=r,Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.tooltip),"tooltipNode")&&void 0===this.tooltip.tooltipNode&&(this.tooltip.tooltipNode=W()("<div>").css("position","absolute").prependTo(this.map.getMap().getTargetElement())),this.tooltip.on("hide:tooltip",(function(){n.tooltipFeature=void 0,n.tooltipPixelColor=void 0})),this.map.on("move:pointer",(function(e){if(!e.dragging)if((e=n.map.getExtendedEventByTypeCollection(e,n.typeCollection)).feature||e.color){if(e.feature===n.tooltipFeature&&(void 0===e.color&&void 0===n.tooltipPixelColor||void 0!==e.color&&void 0!==n.tooltipPixelColor&&e.color.join(",")===n.tooltipPixelColor.join(",")))return void n.tooltip.show({posX:e.pixel[0],posY:e.pixel[1]});n.tooltipFeature=void 0,n.tooltipPixelColor=void 0;var t=e.synviewType.getTooltip().call(void 0,e);void 0!==t?(n.tooltipFeature=e.feature,n.tooltipPixelColor=e.color,n.tooltip.content=t,n.tooltip.hide().show({posX:e.pixel[0],posY:e.pixel[1]})):n.tooltip.hide()}else n.tooltip.hide()}))}));const It=Bt;function Dt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var Lt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=W().extend(!0,{map:void 0,timeline:void 0,tooltip:void 0},t),void 0===this.options.map&&(this.options.map=new Je),void 0===this.options.timeline&&(this.options.timeline=new q),this.typeCollection=new Rt,this.tooltip=void 0,this.options.timeline.on("change:time",(function(){this.getTypeCollection().getItems().map((function(e){e.setDisplayTime(this.options.timeline.getSelectedTime())}),this)}),this);var n=this.options.timeline,o=function(){var e=n.isLastEnabledTime();this.getVisible()?n.setTimesBySetID(this.getId(),this.getResourceCollection().getTimes()):n.setTimesBySetID(this.getId(),[]),e?n.last():isNaN(n.getSelectedTime())&&n.first()},i=function(e){e.setLayerGroup(this.options.map.makeLayerGroup()),o.call(e),e.setDisplayTime(this.getTimeline().getSelectedTime()),e.on("change:resources",o),e.on("change:visible",o),void 0!==e.getTooltip()&&void 0===this.tooltip&&(this.tooltip=new It({map:this.options.map,typeCollection:this.typeCollection,tooltip:this.options.tooltip}))},r=function(e){this.getTimeline().deleteSetID(e.getId())};this.typeCollection.on("add:item",i,this),this.typeCollection.on("remove:item",r,this),this.typeCollection.on("replace:item",(function(e,t){i.call(this,e),r.call(this,t)}),this)}var t,n;return t=e,(n=[{key:"getTimeline",value:function(){return this.options.timeline}},{key:"getMap",value:function(){return this.options.map}},{key:"getTypeCollection",value:function(){return this.typeCollection}},{key:"appendType",value:function(e){if(void 0===e.getId()){var t,n=0;do{t="synview-type-"+n++}while(this.getTypeCollection().containsId(t));e.setId(t)}return this.getTypeCollection().append(e),this}},{key:"getTooltip",value:function(){return this.options.tooltip}}])&&Dt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();const At=ol.proj;function Mt(e){return Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mt(e)}function Vt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Gt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Ft(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Yt(){return Yt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=zt(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Yt.apply(this,arguments)}function zt(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Kt(e)););return e}function Xt(e,t){return Xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xt(e,t)}function Ht(e,t){if(t&&("object"===Mt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return qt(e)}function qt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kt(e){return Kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kt(e)}var Ut="EPSG:4326";const $t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xt(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Kt(o);if(i){var n=Kt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ht(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),void 0===(t=r.call(this,e)).options.layerGroup&&(t.options.layerGroup=new(ot()),t.options.map.addLayer(t.options.layerGroup)),t.options.map.getView().on("change:center",function(){this.trigger("change:view",this)}.bind(qt(t))),t.options.map.getView().on("change:resolution",function(){this.trigger("change:view",this)}.bind(qt(t))),t.options.map.on("pointermove",function(e){this.trigger("move:pointer",e)}.bind(qt(t))),t.options.map.on("click",function(e){this.trigger("click:pointer",e)}.bind(qt(t))),t.options.map.on("singleclick",function(e){this.trigger("singleclick:pointer",e)}.bind(qt(t))),t.options.map.on("dblclick",function(e){this.trigger("dblclick:pointer",e)}.bind(qt(t))),t.options.map.on("pointerdrag",function(e){this.trigger("drag:pointer",e)}.bind(qt(t))),t}return t=a,(n=[{key:"getViewCenter",value:function(){return(0,At.transform)(this.options.map.getView().getCenter(),this.options.map.getView().getProjection(),Ut)}},{key:"setViewCenter",value:function(e){var t=!0;return e=e.map((function(e){return isNaN(e)?void(t=!1):1*e})),t&&this.options.map.getView().setCenter((0,At.fromLonLat)(e)),this}},{key:"getViewZoom",value:function(){return this.options.map.getView().getZoom()}},{key:"setViewZoom",value:function(e){return isNaN(e)||this.options.map.getView().setZoom(1*e),this}},{key:"makeLayerGroup",value:function(){var e=new(ot());return this.options.layerGroup.getLayers().push(e),e}},{key:"getExtendedEventByTypeCollection",value:function(e,t){e=Yt(Kt(a.prototype),"getExtendedEventByTypeCollection",this).call(this,e,t);var n=new Map;t.getVisibleTypes().filter((function(e){return void 0!==e.getTooltip()})).map((function(e){return n.set(e,[])}));var o,i=new Set,r=new Set,s=Vt(n.keys());try{var l=function(){var e=o.value;e.getLayerGroup().getLayers().getArray().filter((function(e){return e.getVisible()})).forEach((function(t){n.get(e).push(t),i.add(t),r.add(t.getClassName())}))};for(s.s();!(o=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}return this.options.map.forEachFeatureAtPixel(e.pixel,(function(t,o){var i,r=Vt(n.keys());try{var a=function(){var r=i.value;if(n.get(r).forEach((function(n){void 0===e.synviewType&&n===o&&(e.feature=t,e.layer=o,e.synviewType=r)})),void 0!==e.synviewType)return"break"};for(r.s();!(i=r.n()).done&&"break"!==a(););}catch(e){r.e(e)}finally{r.f()}return void 0!==e.synviewType}),{hitTolerance:5,layerFilter:function(e){return i.has(e)}}),void 0===e.feature&&this.options.map.forEachLayerAtPixel(e.pixel,(function(t,o){if(null==o||o.length<1)return!1;var i,r=Vt(n.keys());try{var a=function(){var r=i.value;if(n.get(r).forEach((function(n){void 0===e.synviewType&&n.getClassName()==t.getClassName()&&(e.color=o,e.layer=t,e.synviewType=r)})),void 0!==e.synviewType)return"break"};for(r.s();!(i=r.n()).done&&"break"!==a(););}catch(e){r.e(e)}finally{r.f()}return void 0!==e.synviewType}),{hitTolerance:5,layerFilter:function(e){return r.has(e.getClassName())}}),e}},{key:"findLayerInType",value:function(e,t){return t.getLayerGroup().getLayers().getArray().findIndex((function(t){return t==e}))>-1}}])&&Ft(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Je);function Zt(e){return Zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zt(e)}function Wt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Jt(e,t){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jt(e,t)}function Qt(e,t){if(t&&("object"===Zt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function en(e){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},en(e)}const tn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jt(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=en(o);if(i){var n=en(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Qt(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),void 0===(t=r.call(this,e)).options.layerGroup&&(t.options.layerGroup=L.layerGroup().addTo(t.options.map)),t}return t=a,(n=[{key:"makeLayerGroup",value:function(){return L.layerGroup().addTo(this.options.layerGroup)}}])&&Wt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Je),nn=ol.format.GeoJSON;var on=n.n(nn);const rn=ol.source.Vector;var an=n.n(rn);function sn(e){return sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sn(e)}function ln(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function un(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function cn(e,t){return cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cn(e,t)}function fn(e,t){if(t&&("object"===sn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function dn(e){return dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dn(e)}const pn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cn(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=dn(o);if(i){var n=dn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return fn(this,e)});function a(){return ln(this,a),r.apply(this,arguments)}return t=a,n=[{key:"getId",value:function(){var e=this.getDatetime();return isNaN(e)?"":e.toISOString()}},{key:"makeOLLayer",value:function(){var e={source:this.options.ol.source,events:this.options.ol.events,style:this.options.ol.style};if(this.options.ol,!("refresh"in e.source)){var t=e.source;void 0!==this.options.url&&"format"in t&&void 0!==t.format&&(t.url=this.options.url),"projection"in t&&void 0!==t.projection||(t.projection=Ut),e.source=new(an())(t)}return"function"==typeof e.style&&(e.style=e.style.bind(this)),this.className&&(e.className=this.className),new(rt())(e)}},{key:"setOLStyle",value:function(e){return void 0===this.layer&&this.getOLLayer(),void 0!==this.layer&&"setStyle"in this.layer?(0==arguments.length?this.layer.setStyle(this.layer.getStyle()):this.layer.setStyle(e),this):this}}],n&&un(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(ct);function hn(e){return hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hn(e)}function vn(e,t){return vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vn(e,t)}function yn(e,t){if(t&&("object"===hn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function bn(e){return bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bn(e)}const mn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vn(e,t)}(r,e);var t,n,o,i=(n=r,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=bn(n);if(o){var i=bn(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return yn(this,e)});function r(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(t=i.call(this,e)).options.ol.source.url=t.options.url,t.options.ol.source.format=new(on()),t}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(pn),gn=ol.source.VectorTile;var wn=n.n(gn);const On=ol.layer.VectorTile;var _n=n.n(On);function Pn(e){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(e)}function Sn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Tn(e,t){return Tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tn(e,t)}function kn(e,t){if(t&&("object"===Pn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function xn(e){return xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xn(e)}const En=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tn(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=xn(o);if(i){var n=xn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return kn(this,e)});function a(){return Sn(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"makeOLLayer",value:function(){var e={source:this.options.ol.source,events:this.options.ol.events,style:this.options.ol.style};if(!("refresh"in e.source)){var t=e.source;!("tileUrlFunction"in t)&&void 0!==this.options.url&&"format"in t&&void 0!==t.format&&(t.url=this.options.url),"projection"in t&&void 0!==t.projection||(t.projection=Ut),e.source=new(wn())(t)}return"function"==typeof e.style&&(e.style=e.style.bind(this)),this.className&&(e.className=this.className),new(_n())(e)}}])&&jn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(pn);function Rn(e){return Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rn(e)}function Nn(e,t){return Nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nn(e,t)}function Cn(e,t){if(t&&("object"===Rn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Bn(e){return Bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bn(e)}const In=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nn(e,t)}(r,e);var t,n,o,i=(n=r,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Bn(n);if(o){var i=Bn(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return Cn(this,e)});function r(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(t=i.call(this,e)).options.ol.source.format=new(on()),t}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(En),Dn=ol.source.ImageStatic;var Ln=n.n(Dn);const An=ol.layer.Image;var Mn=n.n(An);function Vn(e){return Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vn(e)}function Gn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Yn(e,t){return Yn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yn(e,t)}function zn(e,t){if(t&&("object"===Vn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xn(e){return Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xn(e)}var Hn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yn(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Xn(o);if(i){var n=Xn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return zn(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,o=void 0===n?void 0:n,i=t.datetime,s=void 0===i?void 0:i,l=t.mimetype,u=void 0===l?void 0:l,c=t.reloadTime,f=void 0===c?void 0:c,d=t.className,p=void 0===d?void 0:d,h=t.extent,v=t.ol,y=void 0===v?{}:v;return Gn(this,a),(e=r.call(this,{url:o,datetime:s,mimetype:u,reloadTime:f,className:p,ol:y})).options.extent=h,e}return t=a,(n=[{key:"makeOLLayer",value:function(){var e=this.options.ol.source;return e.url=this.options.url,e.imageExtent=(0,At.transformExtent)(this.options.extent,Ut,"EPSG:3857"),new(Mn())({source:new(Ln())(e),className:this.className})}},{key:"makeLLLayer",value:function(){return L.imageOverlay(this.options.url,[[this.options.extent[1],this.options.extent[0]],[this.options.extent[3],this.options.extent[2]]])}},{key:"preload",value:function(){this.getOLLayer().getSource().image_.load()}}])&&Fn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(ct);const qn=Hn,Kn=ol.source.OSM;var Un=n.n(Kn);const $n=ol.layer.Tile;var Zn=n.n($n);function Wn(e){return Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wn(e)}function Jn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function eo(e,t){return eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},eo(e,t)}function to(e,t){if(t&&("object"===Wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},no(e)}const oo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eo(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=no(o);if(i){var n=no(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return to(this,e)});function a(){return Jn(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"makeOLLayer",value:function(){var e=this.options.ol.source;return e.url=this.options.url,new(Zn())({source:new(Un())(e)})}}])&&Qn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(ct);function io(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var ro=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isShown=!1,this._content=void 0}var t,n;return t=e,(n=[{key:"isShown",get:function(){return this._isShown}},{key:"content",get:function(){return this._content},set:function(e){var t=this._content;this._content=e,t!==this._content&&this.onContentChange()}},{key:"show",value:function(){var e=!this.isShown;return this._isShown=!0,e&&this.trigger("show:tooltip"),this}},{key:"hide",value:function(){var e=this.isShown;return this._isShown=!1,e&&this.trigger("hide:tooltip"),this}},{key:"update",value:function(){return this}},{key:"onContentChange",value:function(){}}])&&io(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(ro.prototype);const ao=bootstrap;function so(e){return so="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},so(e)}function lo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function co(){return co="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=fo(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},co.apply(this,arguments)}function fo(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=vo(e)););return e}function po(e,t){return po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},po(e,t)}function ho(e,t){if(t&&("object"===so(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function vo(e){return vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vo(e)}var yo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&po(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=vo(o);if(i){var n=vo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ho(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.tooltipNode,o=void 0===n?void 0:n,i=t.bootstrapOptions,s=void 0===i?void 0:i,l=t.closeOnMouseMove,u=void 0===l||l,c=t.closeOnMouseEnter,f=void 0!==c&&c;return lo(this,a),(e=r.call(this)).bootstrapOptions=s||{},e._initBootstrapOptions(s),e.closeOnMouseMove=u,e.closeOnMouseEnter=f,e._tooltipNode=void 0,e.tooltipNode=o,e._bsTooltip=void 0,e}return t=a,n=[{key:"tooltipNode",get:function(){return this._tooltipNode},set:function(e){if(void 0===e)return this._tooltipNode=e,void(this._bsTooltip=void 0);this._tooltipNode=W()(e),this._initTooltipNode()}},{key:"show",value:function(e){var t=e.posX,n=e.posY;return void 0===this._tooltipNode||void 0===this._bsTooltip||(this.tooltipNode.css({left:"".concat(t,"px"),top:"".concat(n,"px")}),this.isShown?this._bsTooltip.update():this._bsTooltip.show()),co(vo(a.prototype),"show",this).call(this)}},{key:"hide",value:function(){return void 0===this._tooltipNode||void 0===this._bsTooltip||this.isShown&&this._bsTooltip.hide(),co(vo(a.prototype),"hide",this).call(this)}},{key:"update",value:function(){return void 0!==this._bsTooltip&&this._bsTooltip.update(),co(vo(a.prototype),"update",this).call(this)}},{key:"onContentChange",value:function(){this._updateNonStringContent(),this.update()}},{key:"_initBootstrapOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.trigger,n=void 0===t?"manual":t,o=e.title,i=void 0===o?"-":o;this.bootstrapOptions.trigger=n,this.bootstrapOptions.title=i,this.bootstrapOptions.animation=!1}},{key:"_initTooltipNode",value:function(){var e=this;void 0!==this._bsTooltip&&this._bsTooltip.dispose(),this._bsTooltip=new ao.Tooltip(this._tooltipNode[0],this.bootstrapOptions),this.tooltipNode[0].addEventListener("inserted.bs.tooltip",(function(){var t=e._updateNonStringContent();t.length&&(e.closeOnMouseMove&&t.children(".tooltip-inner").mousemove((function(){return e.hide()})),e.closeOnMouseEnter&&t.children(".tooltip-inner").mouseenter((function(){return e.hide()})))}))}},{key:"_updateNonStringContent",value:function(){return void 0!==this.content&&void 0!==this._bsTooltip&&W()(this._bsTooltip.tip).children(".tooltip-inner").empty().append(this.content),W()(this._bsTooltip.tip)}}],n&&uo(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(ro);const bo=yo;function mo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function go(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const wo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id;mo(this,e),this._id=n}var t,n;return t=e,(n=[{key:"id",get:function(){return this._id},set:function(e){this._id=e,this.setId(e)}},{key:"setId",value:function(){}}])&&go(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Oo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(r.push(o.value),!t||r.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Po(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function So(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var jo=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.fireReplace,o=void 0===n||n,i=e.fireAddRemoveOnReplace,r=void 0!==i&&i,a=e.appendOnReplace,s=void 0===a||a,l=e.sortFunction,u=e.emptyObjectMaker;Po(this,t),this.options={fireReplace:o,fireAddRemoveOnReplace:r,appendOnReplace:s,sortFunction:l,emptyObjectMaker:u},this._itemIds=[],this._items={}}var n,o;return n=t,o=[{key:"count",get:function(){return this._itemIds.length}},{key:Symbol.iterator,value:function(){var e=this,t=0;return{next:function(){return t<e._itemIds.length?{value:e._items[e._itemIds[t++]]}:{done:!0}}}}},{key:"items",get:function(){var e=this;return this._itemIds.map((function(t){return e._items[t]}))}},{key:"itemIds",get:function(){return this._itemIds}},{key:"sortFunction",get:function(){return this.options.sortFunction}},{key:"sortFunction",set:function(e){this.options.sortFunction=e,this._sort()}},{key:"getItemById",value:function(e){return e in this._items?this._items[e]:void 0===this.options.emptyObjectMaker?new wo:this.options.emptyObjectMaker.call(this)}},{key:"contains",value:function(e){var t=this.containsId(e.id);return t&&(t=e===this.getItemById(e.id)),t}},{key:"containsId",value:function(e){return e in this._items}},{key:"append",value:function(){for(var e=this,t=[],n=[],o=[],i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return r.forEach((function(i){var r=i.id;if(e.containsId(r)){var a=e.getItemById(r);e.options.appendOnReplace&&(e._itemIds.splice(e._itemIds.indexOf(r),1),e._itemIds.push(r)),a!==i&&(e._items[r]=i,e.options.fireReplace&&o.push([i,a]),e.options.fireAddRemoveOnReplace&&(n.push(a),t.push(i)))}else e._itemIds.push(r),e._items[r]=i,t.push(i)})),this._sort(),t.forEach((function(t){return e.trigger("add:item",t)})),n.forEach((function(t){return e.trigger("remove:item",t)})),o.forEach((function(t){var n=Oo(t,2),o=n[0],i=n[1];return e.trigger("replace:item",o,i)})),this}},{key:"remove",value:function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return n.forEach((function(t){var n=e._itemIds.indexOf(t.id);if(n>-1){var o=e._items[t.id];delete e._items[t.id],e._itemIds.splice(n,1),e.trigger("remove:item",o)}})),this}},{key:"removeById",value:function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return n.forEach((function(t){var n=e._itemIds.indexOf(t);if(n>-1){var o=e._items[t];delete e._items[t],e._itemIds.splice(n,1),e.trigger("remove:item",o)}})),this}},{key:"_sort",value:function(){var e=this;void 0!==this.options.sortFunction&&this._itemIds.sort((function(t,n){return e.options.sortFunction(e._items[t],e._items[n])}))}}],o&&So(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),t}();B(jo.prototype);const To=jo;function ko(e){return function(e){if(Array.isArray(e))return Ro(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Eo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Eo(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Eo(e,t){if(e){if("string"==typeof e)return Ro(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ro(e,t):void 0}}function Ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function No(e){return No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},No(e)}function Co(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Io(){return Io="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=Do(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Io.apply(this,arguments)}function Do(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vo(e)););return e}function Lo(e,t){return Lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lo(e,t)}function Ao(e,t){if(t&&("object"===No(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Mo(e)}function Mo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vo(e){return Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vo(e)}var Go=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lo(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Vo(o);if(i){var n=Vo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ao(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.resources,o=t.containersNode,i=t.timeline,s=void 0===i?void 0:i,l=t.makeContainerNode,u=void 0===l?void 0:l,c=t.firstTimeOnInit,f=void 0===c||c,d=t.lastTimeOnInit,p=void 0!==d&&d;Co(this,a),(e=r.call(this,{fireReplace:!1,fireAddRemoveOnReplace:!0}))._resources=n,e._containersNode="object"==No(o)&&o.jquery?o[0]:o,e._timeline=void 0===s?new q:s,e._makeContainerNode=u;var h=new Map;return e.on("add:item",(function(t){t.modelviewer=Mo(e),t.containerNode=e._getContainerNode(t),isNaN(e.timeline.getSelectedTime().valueOf())&&(f||p)&&h.set(t,t.on("change:selectedVariables",(function(){if(isNaN(e._timeline.getSelectedTime().valueOf())&&(f?e._timeline.first():p&&e._timeline.last(),!isNaN(e._timeline.getSelectedTime().valueOf()))){var t,n=xo(h.keys());try{for(n.s();!(t=n.n()).done;){var o=t.value;o.un("change:selectedVariables",h.get(o)),h.delete(o)}}catch(e){n.e(e)}finally{n.f()}}})))})),e.on("remove:item",(function(t){void 0!==t.containerNode&&null!=t.containerNode.parentNode&&t.containerNode.parentNode.removeChild(t.containerNode),t.modelviewer=void 0,t.containerNode=void 0,h.has(t)&&(t.un("change:selectedVariables",h.get(t)),h.delete(t)),e.timeline.deleteSetID(t.id)})),e}return t=a,n=[{key:"resources",get:function(){return this._resources}},{key:"containersNode",get:function(){return this._containersNode}},{key:"timeline",get:function(){return this._timeline}},{key:"append",value:function(){for(var e,t=ko(this.itemIds),n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.filter((function(e){return void 0!==e.id})).forEach((function(e){return t.push(e.id)})),o.filter((function(e){return void 0===e.id})).forEach((function(e){for(var n=1,o="container".concat(n);t.indexOf(o)>-1;)n++,o="container".concat(n);e.id=o,t.push(o)})),(e=Io(Vo(a.prototype),"append",this)).call.apply(e,[this].concat(o)),this}},{key:"_getContainerNode",value:function(e){if(void 0!==this._makeContainerNode){var t=this._makeContainerNode.call(this,this.containersNode,e);return"object"==No(t)&&t.jquery?t[0]:t}var n=void 0!==e.containerNode?e.containerNode:document.createElement("div");return void 0!==this.containersNode&&this.containersNode.appendChild(n),n}}],n&&Bo(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(To);const Fo=Go;function Yo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const Xo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.name,o=void 0===n?void 0:n,i=t.names,r=void 0===i?{}:i,a=t.langSortation,s=void 0===a?[]:a;Yo(this,e),this._name=o,this._names=r,this._langSortation=s}var t,n;return t=e,n=[{key:"name",get:function(){return this.getDefaultName()},set:function(e){this._name=e}},{key:"getNameByLangNoFallback",value:function(e){return e in this._names?this._names[e]:""}},{key:"setNameByLang",value:function(e,t){this._names[e]=t,void 0===t&&delete this._names[e]}},{key:"langSortation",get:function(){return this._langSortation},set:function(e){this._langSortation=e}},{key:"getDefaultName",value:function(){return void 0!==this._name?this._name:this.getNameByLang()}},{key:"getNameByLang",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.langSortation,o=void 0===n?void 0:n,i=void 0===o?this._langSortation:o,r=Object.keys(this._names);return r.length<1?void 0===this._name?"":this._name:this._names[r.sort((function(t,n){if(t==e)return-1;if(n==e)return 1;var o=i.indexOf(t),r=i.indexOf(n);return r<0?0:o<0?1:o<r?-1:o==r?0:1}))[0]]}}],n&&zo(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ho(e){return Ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ho(e)}function qo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ko(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Uo(e,t){return Uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uo(e,t)}function $o(e,t){if(t&&("object"===Ho(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Zo(e)}function Zo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wo(e){return Wo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wo(e)}const Jo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uo(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Wo(o);if(i){var n=Wo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return $o(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,o=t.name,i=void 0===o?void 0:o,s=t.names,l=void 0===s?{}:s,u=t.langSortation,c=void 0===u?[]:u;return qo(this,a),e=r.call(this,{name:i,names:l,langSortation:c}),Object.defineProperty(Zo(e),"id",Object.getOwnPropertyDescriptor(wo.prototype,"id")),e._id=n,e}return t=a,(n=[{key:"setId",value:function(e){wo.prototype.setId.call(this,e)}},{key:"getDefaultName",value:function(){return void 0!==this._name?this._name:Object.keys(this._names).length>0?this.getNameByLang():void 0===this._id?"":this._id}}])&&Ko(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Xo);function Qo(e){return Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qo(e)}function ei(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ti(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ni(e,t){return ni=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ni(e,t)}function oi(e,t){if(t&&("object"===Qo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ii(e){return ii=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ii(e)}const ri=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ni(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ii(o);if(i){var n=ii(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return oi(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,o=t.name,i=void 0===o?void 0:o,s=t.names,l=void 0===s?{}:s,u=t.langSortation,c=void 0===u?[]:u,f=t.variableCollection;return ei(this,a),(e=r.call(this,{id:n,name:i,names:l,langSortation:c}))._variableCollection=f,e}return t=a,(n=[{key:"variableCollection",get:function(){return this._variableCollection},set:function(e){this._variableCollection=e}}])&&ti(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Jo);function ai(e){return ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ai(e)}function si(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function li(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ui(e,t){return ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ui(e,t)}function ci(e,t){if(t&&("object"===ai(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function fi(e){return fi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fi(e)}const di=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ui(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=fi(o);if(i){var n=fi(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ci(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,o=t.name,i=void 0===o?void 0:o,s=t.names,l=void 0===s?{}:s,u=t.langSortation,c=void 0===u?[]:u,f=t.datetime,d=void 0===f?void 0:f;return si(this,a),(e=r.call(this,{id:n,name:i,names:l,langSortation:c}))._datetime=void 0===e.id?void 0:new Date(e.id),void 0!==d&&(e.datetime=d),e}return t=a,(n=[{key:"setId",value:function(e){this._datetime=void 0===e?void 0:new Date(e)}},{key:"datetime",get:function(){return this._datetime},set:function(e){this._datetime=e,this._id=void 0!==e?e.valueOf():void 0}}])&&li(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(ri);function pi(e){return pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pi(e)}function hi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vi(e,t){return vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vi(e,t)}function yi(e,t){if(t&&("object"===pi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bi(e)}function bi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mi(e){return mi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mi(e)}function gi(e){return gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gi(e)}function wi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oi(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _i(e,t){return _i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_i(e,t)}function Pi(e,t){if(t&&("object"===gi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Si(e)}function Si(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ji(e){return ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ji(e)}const Ti=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_i(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ji(o);if(i){var n=ji(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Pi(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,o=t.fireReplace,i=void 0===o||o,s=t.fireAddRemoveOnReplace,l=void 0!==s&&s,u=t.appendOnReplace,c=void 0===u||u,f=t.sortFunction,d=t.names,p=t.langSortation;return wi(this,a),e=r.call(this,{emptyObjectMaker:function(){return new ri},fireReplace:i,fireAddRemoveOnReplace:l,appendOnReplace:c,sortFunction:f,names:d,langSortation:p}),Object.defineProperty(Si(e),"id",Object.getOwnPropertyDescriptor(wo.prototype,"id")),e._id=n,Object.defineProperty(Si(e),"getDefaultName",Object.getOwnPropertyDescriptor(Jo.prototype,"getDefaultName")),e._node=void 0,e.on("add:item",(function(t){void 0!==t.variableCollection&&t.variableCollection.remove(t),t.variableCollection=Si(e),e.trigger("add:variable",t)})),e.on("remove:item",(function(t){return e.trigger("remove:variable",t)})),e}return t=a,(n=[{key:"setId",value:function(e){wo.prototype.setId.call(this,e)}},{key:"variables",get:function(){return this.items}},{key:"getVariableById",value:function(e){return this.getItemById(e)}},{key:"node",get:function(){return this._node},set:function(e){this._node=e}}])&&Oi(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vi(e,t)}(r,e);var t,n,o,i=(n=r,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=mi(n);if(o){var i=mi(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return yi(this,e)});function r(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.fireReplace,o=void 0===n||n,a=t.fireAddRemoveOnReplace,s=void 0!==a&&a,l=t.appendOnReplace,u=void 0===l||l,c=t.sortFunction,f=t.emptyObjectMaker,d=t.name,p=void 0===d?void 0:d,h=t.names,v=void 0===h?{}:h,y=t.langSortation,b=void 0===y?[]:y;return hi(this,r),e=i.call(this,{fireReplace:o,fireAddRemoveOnReplace:s,appendOnReplace:u,sortFunction:c,emptyObjectMaker:f}),Object.defineProperty(bi(e),"name",Object.getOwnPropertyDescriptor(Xo.prototype,"name")),Object.getPrototypeOf(bi(e)).getDefaultName=Xo.prototype.getDefaultName,Object.getPrototypeOf(bi(e)).getNameByLang=Xo.prototype.getNameByLang,Object.getPrototypeOf(bi(e)).setNameByLang=Xo.prototype.setNameByLang,Object.getPrototypeOf(bi(e)).getNameByLangNoFallback=Xo.prototype.getNameByLangNoFallback,e._name=p,e._names=v,e._langSortation=b,e}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(To));function ki(e,t){if(e){if("string"==typeof e)return xi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xi(e,t):void 0}}function xi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Ei(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const Ri=function(){function e(t){var n=t.node;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._node=n,this._children=new Map,this._parent=void 0}var t,n;return t=e,n=[{key:"node",get:function(){return this._node}},{key:"variableCollection",get:function(){return this._node.variableCollection}},{key:"children",get:function(){return function(e){if(Array.isArray(e))return xi(e)}(e=this._children.values())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ki(e)||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 e}},{key:"parent",get:function(){return this._parent},set:function(e){this._parent=e}},{key:"getChildByVariable",value:function(e){return this._children.get(e)}},{key:"buildChildrenTreeForResource",value:function(t){var n=t.resource,o=t.aimedNode;if(this.node===o)return this;var i=n.getVariableByVariableCollection(this.variableCollection);if(void 0!==i.id){var r=this._children.get(i);return void 0!==r?r.buildChildrenTreeForResource({resource:n,aimedNode:o}):(this.node.children.forEach((function(t){void 0!==n.getVariableByVariableCollection(t.variableCollection).id&&(r=new e({node:t}))})),void 0!==r?(this._children.set(i,r),r.parent=this,r.buildChildrenTreeForResource({resource:n,aimedNode:o})):void 0)}}},{key:"removeChild",value:function(e){var t,n,o,i=e.child,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ki(e))){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(this._children.entries());try{for(r.s();!(t=r.n()).done;){var a=(n=t.value,o=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(r.push(o.value),!t||r.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return r}}(n,o)||ki(n,o)||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.")}()),s=a[0];a[1]===i&&this._children.delete(s)}}catch(e){r.e(e)}finally{r.f()}this._children.size<1&&void 0!==this.parent&&this.parent.removeChild({child:this})}},{key:"findNodeByVariables",value:function(){for(var e=this,t=void 0,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];if(o.forEach((function(n){n.variableCollection===e.variableCollection&&(t=n)})),void 0!==t){var r=this._children.get(t);if(void 0!==r){var a=r.findNodeByVariables.apply(r,o);return void 0===a?this:a}return this}}}],n&&Ei(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ni(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(r.push(o.value),!t||r.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return r}}(e,t)||Di(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ci(e){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ci(e)}function Bi(e){return function(e){if(Array.isArray(e))return Li(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Di(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ii(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Di(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Di(e,t){if(e){if("string"==typeof e)return Li(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Li(e,t):void 0}}function Li(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Ai(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var Mi=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._variableCollection=t,t.node=this,this._parents=[],this._children=[],this._resourcesTopNode=void 0,this._resources=new Map}var t,n;return t=e,n=[{key:"variableCollection",get:function(){return this._variableCollection}},{key:"parents",get:function(){return this._parents}},{key:"children",get:function(){return this._children}},{key:"appendChild",value:function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return n.forEach((function(t){e._children.push(t),t._addParent(e),e.trigger("append:child",t)})),this}},{key:"_addParent",value:function(e){this._parents.push(e)}},{key:"resources",get:function(){var e,t=[],n=Ii(this._resources.values());try{for(n.s();!(e=n.n()).done;)Bi(e.value.values()).forEach((function(e){return t.push.apply(t,Bi(e))}))}catch(e){n.e(e)}finally{n.f()}return t}},{key:"append",value:function(){var e=this;void 0===this._resourcesTopNode&&this._makeResourcesTopNode();for(var t=0,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.forEach((function(n){if(!(n.variables.filter((function(t){return t.variableCollection===e.variableCollection})).length<1)){var o=e._resourcesTopNode.buildChildrenTreeForResource({resource:n,aimedNode:e});if(void 0!==o){var i=n.getVariableByVariableCollection(o.variableCollection);if(void 0!==i){var r=e._resources.get(o);void 0===r&&(r=new Map,e._resources.set(o,r));var a=r.get(i);void 0===a&&(a=new Set,r.set(i,a)),a.has(n)||(a.add(n),t++)}}}})),t}},{key:"remove",value:function(){for(var e=this,t=0,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.forEach((function(n){var o,i=(o=e._resourcesTopNode).findNodeByVariables.apply(o,Bi(n.variables));if(void 0!==i){var r=n.getVariableByVariableCollection(i.variableCollection),a=e._resources.get(i);if(void 0!==a){var s=a.get(r);if(void 0!==s&&(s.delete(n),t++,s.size<1&&(a.delete(r),a.size<1))){e._resources.delete(i);var l=i.parent;void 0!==l&&l.removeChild({child:i})}}}})),t}},{key:"getResourcesByVariables",value:function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];if(void 0===this._resourcesTopNode)return[];var i=!1;if(n.length&&"boolean"==typeof n[0]&&(i=n.shift()),i&&0==n.length)return[];if(i){var r,a=new Set(n),s=(r=this._resourcesTopNode).findNodeByVariables.apply(r,n),l=this._resources.get(s);if(void 0!==l){var u,c=Ii(l);try{var f=function(){var e=Ni(u.value,2),t=e[0],o=e[1];if(!a.has(t))return"continue";if(void 0===o||o.size<1)return{v:[]};var i=Bi(o)[0],r=!0;return n.forEach((function(e){i.getVariableByVariableCollection(e.variableCollection)!==e&&(r=!1)})),{v:r?Bi(o):[]}};for(c.s();!(u=c.n()).done;){var d=f();if("continue"!==d&&"object"===Ci(d))return d.v}}catch(e){c.e(e)}finally{c.f()}}return[]}var p=function e(t){var o=new Set;if(t.children.length<1)return o.add(t),o;var i=void 0;if(n.forEach((function(e){e.variableCollection===t.variableCollection&&(i=e)})),void 0===i)t.children.forEach((function(t){o=new Set([].concat(Bi(o),Bi(e(t))))}));else{var r=t.getChildByVariable(i);void 0!==r&&(o=new Set([].concat(Bi(o),Bi(e(r)))))}return o},h=p(this._resourcesTopNode),v=[];return Bi(h).forEach((function(t){var o=e._resources.get(t);if(void 0!==o){var i,r=Ii(o);try{var a=function(){var e=Ni(i.value,2),o=e[0],r=e[1];if(o.variableCollection!==t.variableCollection)return"continue";if(void 0===r||r.size<1)return{v:void 0};var a=Bi(r)[0],s=!0;n.forEach((function(e){a.getVariableByVariableCollection(e.variableCollection)!==e&&(s=!1)})),s&&v.push.apply(v,Bi(r))};for(r.s();!(i=r.n()).done;){var s=a();if("continue"!==s&&"object"===Ci(s))return s.v}}catch(e){r.e(e)}finally{r.f()}}})),v}},{key:"hasResourcesByVariables",value:function(){return this.getResourcesByVariables.apply(this,arguments).length>0}},{key:"_makeResourcesTopNode",value:function(){var e=new Set;this._resourcesTopNode=new Ri({node:function t(n){var o=n.parents;if(o.length<1)return n;var i=void 0;return o.forEach((function(n){if(!e.has(n)){e.add(n);var o=t(n);void 0!==o&&(i=o)}})),i}(this)})}}],n&&Ai(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(Mi.prototype);const Vi=Mi;function Gi(e){return function(e){if(Array.isArray(e))return Fi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Fi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fi(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Yi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zi(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var Xi=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.variables,i=void 0===o?[]:o,r=n.datetime,a=void 0===r?void 0:r,s=n.run,l=void 0===s?void 0:s,u=n.offset,c=void 0===u?void 0:u;Yi(this,e),this._variables=new Map,i.forEach((function(e){return t._variables.set(e.variableCollection,e)})),this._datetime=a,this._run=l,this._offset=c,this._updateDatetime()}var t,n;return t=e,n=[{key:"variables",get:function(){return Gi(this._variables.values())}},{key:"datetime",get:function(){return this._datetime},set:function(e){this._datetime=e}},{key:"run",get:function(){return this._run},set:function(e){this._run=e,this._updateDatetime()}},{key:"offset",get:function(){return this._offset},set:function(e){this._offset=e,this._updateDatetime()}},{key:"getVariableByVariableCollection",value:function(e){var t=this._variables.get(e);return void 0===t?new ri:t}},{key:"isDefinedBy",value:function(){for(var e=!1,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];n.length&&"boolean"==typeof n[0]&&(e=n.shift());var i=new Set(Gi(this._variables.values()));if(!e)return 0==n.filter((function(e){return!i.has(e)})).length;if(0!=n.filter((function(e){return!i.has(e)})).length)return!1;var r=new Set(n);return 0==Gi(i).filter((function(e){return!r.has(e)})).length}},{key:"isDefinedByVariableOf",value:function(e){return void 0!==this._variables.get(e)}},{key:"_updateDatetime",value:function(){void 0!==this._run&&void 0!==this._offset&&(this.datetime=new Date(this._run.valueOf()+1e3*this._offset))}}],n&&zi(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();const Hi=Xi;function qi(e){return qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qi(e)}function Ki(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ui(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function $i(e,t){return $i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$i(e,t)}function Zi(e,t){if(t&&("object"===qi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Wi(e){return Wi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wi(e)}var Ji=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$i(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Wi(o);if(i){var n=Wi(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Zi(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.variables,o=void 0===n?[]:n,i=t.datetime,s=void 0===i?void 0:i,l=t.run,u=void 0===l?void 0:l,c=t.offset,f=void 0===c?void 0:c,d=t.url,p=void 0===d?void 0:d;return Ki(this,a),(e=r.call(this,{variables:o,datetime:s,run:u,offset:f}))._url=p,e}return t=a,(n=[{key:"url",get:function(){return this._url}}])&&Ui(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Hi);const Qi=Ji;function er(e){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},er(e)}function tr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nr(e,t){return nr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nr(e,t)}function or(e,t){if(t&&("object"===er(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ir(e){return ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ir(e)}const rr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nr(e,t)}(r,e);var t,n,o,i=(n=r,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ir(n);if(o){var i=ir(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return or(this,e)});function r(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,o=void 0===n?void 0:n,a=t.pres,s=void 0===a?void 0:a,l=t.tmpc,u=void 0===l?void 0:l,c=t.dwpc,f=void 0===c?void 0:c,d=t.ptrace,p=void 0===d?void 0:d,h=t.ttrace,v=void 0===h?void 0:h,y=t.blayer,b=void 0===y?void 0:y,m=t.tlayer,g=void 0===m?void 0:m,w=t.lclpres,O=void 0===w?void 0:w,_=t.lclhght,P=void 0===_?void 0:_,S=t.lfcpres,j=void 0===S?void 0:S,T=t.lfchght,k=void 0===T?void 0:T,x=t.elpres,E=void 0===x?void 0:x,R=t.elhght,N=void 0===R?void 0:R,C=t.mplpres,B=void 0===C?void 0:C,I=t.mplhght,D=void 0===I?void 0:I,L=t.bplus,A=void 0===L?void 0:L,M=t.bminus,V=void 0===M?void 0:M,G=t.bfzl,F=void 0===G?void 0:G,Y=t.b3km,z=void 0===Y?void 0:Y,X=t.b6km,H=void 0===X?void 0:X,q=t.p0c,K=void 0===q?void 0:q,U=t.pm10c,$=void 0===U?void 0:U,Z=t.pm20c,W=void 0===Z?void 0:Z,J=t.pm30c,Q=void 0===J?void 0:J,ee=t.hght0c,te=void 0===ee?void 0:ee,ne=t.hghtm10c,oe=void 0===ne?void 0:ne,ie=t.hghtm20c,re=void 0===ie?void 0:ie,ae=t.hghtm30c,se=void 0===ae?void 0:ae,le=t.wm10c,ue=void 0===le?void 0:le,ce=t.wm20c,fe=void 0===ce?void 0:ce,de=t.wm30c,pe=void 0===de?void 0:de,he=t.li5,ve=void 0===he?void 0:he,ye=t.li3,be=void 0===ye?void 0:ye,me=t.brnshear,ge=void 0===me?void 0:me,we=t.brnu,Oe=void 0===we?void 0:we,_e=t.brnv,Pe=void 0===_e?void 0:_e,Se=t.limax,je=void 0===Se?void 0:Se,Te=t.limaxpres,ke=void 0===Te?void 0:Te,xe=t.cap,Ee=void 0===xe?void 0:xe,Re=t.cappres,Ne=void 0===Re?void 0:Re,Ce=t.bmin,Be=void 0===Ce?void 0:Ce,Ie=t.bminpres,De=void 0===Ie?void 0:Ie;return tr(this,r),(e=i.call(this,{id:o})).pres=s,e.tmpc=u,e.dwpc=f,e.ptrace=p,e.ttrace=v,e.blayer=b,e.tlayer=g,e.lclpres=O,e.lclhght=P,e.lfcpres=j,e.lfchght=k,e.elpres=E,e.elhght=N,e.mplpres=B,e.mplhght=D,e.bplus=A,e.bminus=V,e.bfzl=F,e.b3km=z,e.b6km=H,e.p0c=K,e.pm10c=$,e.pm20c=W,e.pm30c=Q,e.hght0c=te,e.hghtm10c=oe,e.hghtm20c=re,e.hghtm30c=se,e.wm10c=ue,e.wm20c=fe,e.wm30c=pe,e.li5=ve,e.li3=be,e.brnshear=ge,e.brnu=Oe,e.brnv=Pe,e.limax=je,e.limaxpres=ke,e.cap=Ee,e.cappres=Ne,e.bmin=Be,e.bminpres=De,e}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(wo);function ar(e){return function(e){if(Array.isArray(e))return sr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return sr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function lr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ur(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}const cr=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.calcMissing,i=void 0!==o&&o,r=n.parcels,a=void 0===r?[]:r;lr(this,e),this.options={calcMissing:i},this.levels={},this._parcelCollection=new To({fireAddRemoveOnReplace:!0,fireReplace:!1,emptyObjectMaker:function(){return new rr}}),(t=this._parcelCollection).append.apply(t,ar(a))}var n,o;return n=e,o=[{key:"parcelCollection",get:function(){return this._parcelCollection}},{key:"addLevels",value:function(e,t){return e.forEach((function(e){this.addLevel(e,t)}),this),this}},{key:"addLevel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.calcMissing;return n=n||this.options.calcMissing,"pres"in e&&void 0!==e.pres&&(n&&(e=this.calculateMissingData(e)),this.levels[e.pres]=e),this}},{key:"calculateMissingData",value:function(e){var n={pres:e.pres,hght:e.hght,u:e.u,v:e.v,wdir:e.wdir,wspd:e.wspd,tmpk:e.tmpk,dwpk:e.dwpk,relh:e.relh,mixr:e.mixr,theta:e.theta,thetae:e.thetae,wetbulb:e.wetbulb,vtmp:e.vtmp};return void 0===n.hght&&(n.hght=t(n.pres)),void 0===n.u&&void 0===n.v&&void 0!==n.wdir&&void 0!==n.wspd?(n.u=-n.wspd*Math.sin(n.wdir/180*Math.PI),n.v=-n.wspd*Math.cos(n.wdir/180*Math.PI)):void 0!==n.u&&void 0!==n.v&&void 0===n.wdir&&void 0===n.wspd&&(n.wspd=Math.sqrt(Math.pow(n.u,2)+Math.pow(n.v,2)),n.wdir=270-Math.atan2(n.v,n.u)/Math.PI*180),void 0!==n.tmpk&&void 0!==n.dwpk?(void 0===n.theta&&(n.theta=r(n.tmpk,n.pres)),void 0===n.thetae&&(n.thetae=c(n.tmpk,n.dwpk,n.pres))):void 0!==n.mixr&&void 0===n.dwpk&&(n.dwpk=l(n.mixr,n.pres)),n}},{key:"removeLevel",value:function(e){return e in this.levels&&delete this.levels[e],this}},{key:"getData",value:function(e){return e in this.levels?this.levels[e]:{pres:void 0,hght:void 0,tmpk:void 0,dwpk:void 0,wdir:void 0,wspd:void 0,u:void 0,v:void 0,relh:void 0,mixr:void 0,theta:void 0,thetae:void 0,wetbulb:void 0,vtmp:void 0}}},{key:"getLevels",value:function(){return Object.keys(this.levels).map((function(e){return+e})).sort((function(e,t){return e-t}))}},{key:"getNearestLevel",value:function(e){if(!(Object.keys(this.levels).length<1))return Object.keys(this.levels).sort((function(t,n){return Math.abs(t-e)-Math.abs(n-e)})).shift()}}],o&&ur(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();function fr(e){return fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(e)}function dr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function hr(e,t){return hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hr(e,t)}function vr(e,t){if(t&&("object"===fr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function yr(e){return yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yr(e)}var br=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hr(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=yr(o);if(i){var n=yr(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return vr(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.variables,o=void 0===n?[]:n,i=t.datetime,s=void 0===i?void 0:i,l=t.run,u=void 0===l?void 0:l,c=t.offset,f=void 0===c?void 0:c,d=t.sounding,p=void 0===d?void 0:d;return dr(this,a),(e=r.call(this,{variables:o,datetime:s,run:u,offset:f}))._sounding=p,e}return t=a,n=[{key:"sounding",get:function(){return void 0===this._sounding?new cr:this._sounding},set:function(e){this._sounding=e}}],n&&pr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Hi);const mr=br;function gr(e){return function(e){if(Array.isArray(e))return _r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Or(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Or(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Or(e,t){if(e){if("string"==typeof e)return _r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_r(e,t):void 0}}function _r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Pr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var jr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.topNode,o=t.timesVariableCollections,i=void 0===o?[]:o;Pr(this,e),this._topNode=n,this._availableVariablesMap=new Map,this._timesVariableCollections=i}var t,n;return t=e,n=[{key:"topNode",get:function(){return this._topNode}},{key:"variableCollections",get:function(){var e;e=function(n){n.children.forEach((function(n){t.push(n.variableCollection),e(n)}))};var t=[this.topNode.variableCollection];return e(this.topNode),t}},{key:"availableVariablesMap",get:function(){return this._availableVariablesMap}},{key:"append",value:function(){for(var e,t=this,n=[],o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return i.forEach((function(e){var o=t._getTopNodeOfResourceDefinition(e,t.topNode);if(void 0!==o){var i=t._getTopMostChildWithAllVariables(new Set(e.variables),o,!0);void 0!==i&&i.append(e)>0&&(n.push(e),t._addAvailableVariablesMapByResource(e))}})),n.length>0&&(kr.timeoutId&&clearTimeout(kr.timeoutId),(e=kr.addedResources).push.apply(e,n),kr.timeoutId=setTimeout((function(){t.trigger("change:resources",{addedResources:kr.addedResources}),kr.addedResources=[]}),100)),this}},{key:"_addAvailableVariablesMapByResource",value:function(e){var t=this;e.variables.forEach((function(e){void 0!==e.variableCollection.node&&(t._availableVariablesMap.has(e.variableCollection.node)||t._availableVariablesMap.set(e.variableCollection.node,new Set),t._availableVariablesMap.get(e.variableCollection.node).add(e))}))}},{key:"remove",value:function(){for(var e=this,t=[],n=new Map,o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return i.forEach((function(o){var i=e._getTopNodeOfResourceDefinition(o,e.topNode);if(void 0!==i){var r=e._getTopMostChildWithAllVariables(new Set(o.variables),i,!0);void 0!==r&&r.remove(o)>0&&(t.push(o),n.has(r)||n.set(r,new Set),n.get(r).add(o))}})),n.size>0&&this._removeAvailableVariablesMapByResources(n),t.length>0&&this.trigger("change:resources",{removedResources:t}),this}},{key:"_removeAvailableVariablesMapByResources",value:function(e){var t,n=new Set,o=wr(e.entries());try{var i=function(){var e,o,i,r=(o=t.value,i=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(r.push(o.value),!t||r.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return r}}(o,i)||Or(o,i)||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.")}()),a=r[0],s=r[1],l=new Set,u=wr(s);try{for(u.s();!(e=u.n()).done;)e.value.variables.forEach((function(e){return l.add(e)}))}catch(e){u.e(e)}finally{u.f()}var c,f=wr(l);try{for(f.s();!(c=f.n()).done;){var d=c.value;a.hasResourcesByVariables(d)||n.add(d)}}catch(e){f.e(e)}finally{f.f()}};for(o.s();!(t=o.n()).done;)i()}catch(e){o.e(e)}finally{o.f()}var r,a=wr(n);try{for(a.s();!(r=a.n()).done;){var s=r.value,l=this.getNodeByVariableCollection(s.variableCollection);this._hasResourcesOfNodeChildren(l,[s])||this._availableVariablesMap.has(l)&&this._availableVariablesMap.get(l).delete(s)}}catch(e){a.e(e)}finally{a.f()}}},{key:"getTopMostNodeWithAllVariables",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=this._getTopMostChildWithAllVariables(new Set(t),this.topNode,!0);return void 0===o?new Vi(new Ti):o}},{key:"_getTopNodeOfResourceDefinition",value:function(e,t){var n=this;if(e.isDefinedByVariableOf(t.variableCollection))return t;var o=void 0;return t.children.forEach((function(t){void 0!==o&&(o=n._getTopNodeOfResourceDefinition(e,t))})),o}},{key:"_getTopMostChildWithAllVariables",value:function(e,t,n){var o=this,i=!1;if(t.variableCollection.variables.forEach((function(t){e.has(t)&&(i=!0,e.delete(t))})),0==e.size)return t;if(0!=t.children.length&&(i||n)){var r=void 0;return t.children.forEach((function(t){void 0===r&&(r=o._getTopMostChildWithAllVariables(e,t,n))})),r}}},{key:"getNodeByVariableCollection",value:function(e){return void 0===e.node?new Vi(new Ti):e.node}},{key:"getNodeByVariableCollectionId",value:function(e){var t=this._getNodeByVariableCollection((function(t){return e==t.id}));return void 0===t?new Vi(new Ti):t}},{key:"_getNodeByVariableCollection",value:function(e){return e(this.topNode.variableCollection)?this.topNode:this._findChildNodeByVariableCollection(e,this.topNode)}},{key:"_findChildNodeByVariableCollection",value:function(e,t){var n,o=this;return t.children.forEach((function(t){void 0===n&&e(t.variableCollection)?n=t:void 0===n&&t.children.length>0&&(n=o._findChildNodeByVariableCollection(e,t))})),n}},{key:"appendImage",value:function(e){var t=e.variables,n=e.datetime,o=e.run,i=e.offset,r=e.url;return this.append(new Qi({variables:t,datetime:n,run:o,offset:i,url:r})),this}},{key:"getAvailableVariables",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.variables,o=void 0===n?[]:n,i=new Set,r=function e(t,n){if(n.resources.length>0){var r,a=wr(n.resources);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(s.isDefinedBy.apply(s,[!1,t].concat(gr(o))))return i.add(t),!0}}catch(e){a.e(e)}finally{a.f()}return!1}var l,u=wr(n.children);try{for(u.s();!(l=u.n()).done;)if(e(t,l.value))return!0}catch(e){u.e(e)}finally{u.f()}return!1};return Array.from(e).forEach((function(t){r(t,e.node)})),i}},{key:"_hasResourcesOfNodeChildren",value:function(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set,i=wr(e.children);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(!o.has(r)){if(o.add(r),r.hasResourcesByVariables.apply(r,gr(t)))return!0;if(this._hasResourcesOfNodeChildren(r,t,o))return!0}}}catch(e){i.e(e)}finally{i.f()}}},{key:"getTimesByVariables",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.variables,n=void 0===t?[]:t,o=e.exact,i=void 0!==o&&o,r=this._getTopMostChildWithAllVariables(new Set(n),this.topNode,!0);if(void 0===r)return[];var a=new Set,s=function e(t){t.getResourcesByVariables.apply(t,[i].concat(gr(n))).forEach((function(e){void 0!==e.datetime&&a.add(e.datetime.valueOf())})),t.children.forEach((function(t){return e(t)}))};return s(r),gr(a).sort().map((function(e){return new Date(e)}))}}],n&&Sr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(jr.prototype);const Tr=jr;var kr={timeoutId:void 0,addedResources:[]};function xr(e){return xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xr(e)}function Er(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Rr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Nr(e,t){return Nr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nr(e,t)}function Cr(e,t){if(t&&("object"===xr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Br(e){return Br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Br(e)}const Ir=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nr(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Br(o);if(i){var n=Br(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Cr(this,e)});function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var e=new Set;["models","runs","regions","fields","levels","accumulations","thresholds"].forEach((function(t){return e.add(new Ti({id:t}))}));var t,n={},o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Er(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Er(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(e);try{for(o.s();!(t=o.n()).done;){var i=t.value;n[i.id]=new Vi(i)}}catch(e){o.e(e)}finally{o.f()}return n.models.appendChild(n.runs),n.runs.appendChild(n.regions),n.regions.appendChild(n.fields),n.fields.appendChild(n.levels,n.accumulations),n.accumulations.appendChild(n.thresholds),r.call(this,{topNode:n.models,timesVariableCollections:new Set([n.models.variableCollection,n.runs.variableCollection])})}return t=a,n=[{key:"addVariable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.id,o=t.name,i=void 0===o?void 0:o,r=t.names,a=void 0===r?{}:r,s=t.langSortation,l=void 0===s?[]:s,u=t.datetime,c=void 0===u?void 0:u,f=void 0===c?new ri({id:n,name:i,names:a,langSortation:l}):new di({id:n,name:i,names:a,langSortation:l,datetime:c});return e.append(f),this}},{key:"models",get:function(){return this.getNodeByVariableCollectionId("models").variableCollection}},{key:"runs",get:function(){return this.getNodeByVariableCollectionId("runs").variableCollection}},{key:"regions",get:function(){return this.getNodeByVariableCollectionId("regions").variableCollection}},{key:"fields",get:function(){return this.getNodeByVariableCollectionId("fields").variableCollection}},{key:"levels",get:function(){return this.getNodeByVariableCollectionId("levels").variableCollection}},{key:"accumulations",get:function(){return this.getNodeByVariableCollectionId("accumulations").variableCollection}},{key:"thresholds",get:function(){return this.getNodeByVariableCollectionId("thresholds").variableCollection}}],n&&Rr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Tr);function Dr(e){return function(e){if(Array.isArray(e))return Ar(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Lr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lr(e,t){if(e){if("string"==typeof e)return Ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ar(e,t):void 0}}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Mr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var Gr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.alwaysAvailableCollections,o=void 0===n?[]:n;Mr(this,e),this._alwaysAvailableCollections=new Set(o),this._modelviewer=void 0,this._container=void 0,this._parentNode=void 0,this._resourceNode=void 0,this._resourceOutput={image:void 0,thermodynamicDiagram:void 0}}var t,n;return t=e,n=[{key:"modelviewer",get:function(){return this._modelviewer},set:function(e){var t=this;this._modelviewer=e,void 0!==this._modelviewer&&this._modelviewer.resources.variableCollections.forEach((function(e){e.on("add:variable",(function(e){t.trigger("add:variable",{variable:e})}))}))}},{key:"container",get:function(){return this._container},set:function(e){var t=this;this._container=e,void 0!==this._container&&this._container.on("change:visibleResource",(function(){t._onChangeVisibleResource()}))}},{key:"parentNode",get:function(){return this._parentNode},set:function(e){this._parentNode=e,this.onInit()}},{key:"resourceNode",get:function(){return this._resourceNode},set:function(e){this._resourceNode=e,this._onChangeVisibleResource()}},{key:"render",value:function(){this.onInit(),this.onChangeVisibleResource()}},{key:"onInit",value:function(){var e=this;void 0!==this.parentNode&&(W()(this.parentNode).empty(),this.trigger("init:display"),void 0!==this._modelviewer&&this._modelviewer.resources.variableCollections.forEach((function(t){e.trigger("add:variableCollection",{variableCollection:t});var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Lr(e))){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;e.trigger("add:variable",{variable:i})}}catch(e){o.e(e)}finally{o.f()}})))}},{key:"getAvailableVariables",value:function(e){var t=e.variableCollection,n=this._getParentsVariables(t.node);return this._modelviewer.resources.getAvailableVariables(t,{variables:n})}},{key:"_getParentsVariables",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,o=new Set;return e.parents.forEach((function(e){if(!n.has(e)){n.add(e),Array.from(e.variableCollection).forEach((function(e){t._container.selectedVariables.has(e)&&o.add(e)}));var i=t._getParentsVariables(e,n);i.size>0&&(o=new Set([].concat(Dr(o),Dr(i))))}})),o}},{key:"_onChangeVisibleResource",value:function(){if(void 0!==this._resourceNode){if(void 0!==this._container){var e=this._container.visibleResource;if("url"in e)void 0!==this.thermodynamicDiagram&&(this.thermodynamicDiagram=void 0,W()(this._resourceNode).empty()),void 0===this._resourceOutput.image&&(W()(this._resourceNode).empty(),this._resourceOutput.image=W()("<img>").css({"max-width":"100%"}),W()(this._resourceNode).append(this._resourceOutput.image)),this._resourceOutput.image.attr("src",e.url);else if("sounding"in e){void 0!==this._resourceOutput.image&&(this._resourceOutput.image=void 0,W()(this._resourceNode).empty());var t=!1;this._resourceOutput.thermodynamicDiagram.soundings.forEach((function(n){n.getSounding()===e.sounding?(t=!0,n.visible(!0)):n.visible(!1)})),t||this._resourceOutput.thermodynamicDiagram.addSounding(e.sounding)}else void 0!==this._resourceOutput.image&&(this._resourceOutput.image=void 0,W()(this._resourceNode).empty()),void 0!==this._resourceOutput.thermodynamicDiagram&&this._resourceOutput.thermodynamicDiagram.soundings.forEach((function(e){return e.visible(!1)}))}}else this.trigger("change:visibleResource")}}],n&&Vr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(Gr.prototype);const Fr=Gr;function Yr(e){return Yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yr(e)}function zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(r.push(o.value),!t||r.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return r}}(e,t)||qr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xr(e){return function(e){if(Array.isArray(e))return Kr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||qr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=qr(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function qr(e,t){if(e){if("string"==typeof e)return Kr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kr(e,t):void 0}}function Kr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Zr(e,t){return Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zr(e,t)}function Wr(e,t){if(t&&("object"===Yr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Jr(e)}function Jr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qr(e){return Qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qr(e)}var ea=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zr(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Qr(o);if(i){var n=Qr(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Wr(this,e)});function a(){var e,t,n,o,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=i.id,l=i.display,u=void 0===l?void 0:l,c=i.adaptSuitableResource,f=void 0===c?{}:c;return Ur(this,a),(e=r.call(this,{id:s}))._display=void 0===u?new Fr:u,e._display.modelviewer=e.modelviewer,e._display.container=Jr(e),e._display.parentNode=e._containerNode,e._adaptSuitableResource={},e._initAdaptSuitableResource(f),e._modelviewer=void 0,e._visibleResource,e._displayVariables=new Set,e._selectedVariables=new Map,e._selectedNode=void 0,e._enabledResources=new Map,e._containerNode=void 0,e._debouncedChangeSelectedVariables=(n=new Set,o=new Set,function(i){var r,a=i.addedVariables,s=i.removedVariables,l=Hr(a);try{for(l.s();!(r=l.n()).done;){var u=r.value;o.has(u)&&o.delete(u)}}catch(e){l.e(e)}finally{l.f()}var c,f=Hr(s);try{for(f.s();!(c=f.n()).done;){var d=c.value;n.has(d)&&n.delete(d)}}catch(e){f.e(e)}finally{f.f()}n=new Set([].concat(Xr(n),Xr(a))),o=new Set([].concat(Xr(o),Xr(s))),clearTimeout(t),t=setTimeout((function(){e.trigger("change:selectedVariables",{addedVariables:n,removedVariables:o}),n.clear(),o.clear()}),300)}),e._listeners={mirror:[],timeline:{timeline:void 0,listenerKey:void 0},resources:{resources:void 0,listenerKey:void 0}},e}return t=a,n=[{key:"display",get:function(){return this._display}},{key:"modelviewer",get:function(){return this._modelviewer},set:function(e){var t=this;if(this._modelviewer=e,void 0===this._modelviewer)return void 0!==this._listeners.timeline.listenerKey&&this._listeners.timeline.timeline.un("change:time",this._listeners.timeline.listenerKey),void(void 0!==this._listeners.resources.listenerKey&&this._listeners.resources.resources.un("change:resources",this._listeners.resources.listenerKey));this._display.modelviewer=e,this._listeners.timeline.timeline=this._modelviewer.timeline,this._listeners.timeline.listenerKey=this._modelviewer.timeline.on("change:time",(function(){return t._setVisibleResource()})),this._listeners.resources.resources=this._modelviewer.resources,this._listeners.resources.listenerKey=this._modelviewer.resources.on("change:resources",(function(){t._setTimes(),t._setEnabledResources(),t._updateSelectedVariables()})),this._setTimes()}},{key:"containerNode",get:function(){return this._containerNode},set:function(e){this._containerNode=e,void 0!==this._containerNode&&(this._display.parentNode=this._containerNode)}},{key:"visibleResource",get:function(){return void 0===this._visibleResource?new Hi:this._visibleResource}},{key:"displayVariables",get:function(){return this._displayVariables},set:function(e){var t,n=new Set,o=Hr(e=new Set(e));try{for(o.s();!(t=o.n()).done;){var i=t.value;this._displayVariables.has(i)||n.add(i)}}catch(e){o.e(e)}finally{o.f()}var r,a=new Set,s=Hr(this.displayVariables);try{for(s.s();!(r=s.n()).done;){var l=r.value;e.has(l)||a.add(l)}}catch(e){s.e(e)}finally{s.f()}(n.size>0||a.size>0)&&(this._displayVariables=e,this._updateSelectedVariables({addedVariables:n,removedVariables:a}),this.trigger("change:displayVariables",{addedVariables:n,removedVariables:a}))}},{key:"selectedVariables",get:function(){return new Set(Xr(this._selectedVariables.values()))}},{key:"getSelectedVariable",value:function(e){var t=this._selectedVariables.get(e);return void 0===t?new ri({id:void 0}):t}},{key:"enabledTimes",get:function(){return Xr(this._enabledResources.keys()).filter((function(e){return!isNaN(e)})).map((function(e){return new Date(e)}))}},{key:"exchangeDisplayVariable",value:function(e){var t,n=new Set(this.displayVariables),o=Hr(e);try{for(o.s();!(t=o.n()).done;){var i,r=t.value,a=Hr(this.displayVariables);try{for(a.s();!(i=a.n()).done;){var s=i.value;s.variableCollection===r.variableCollection&&(n.delete(s),n.add(r))}}catch(e){a.e(e)}finally{a.f()}}}catch(e){o.e(e)}finally{o.f()}var l,u=Hr(e);try{for(u.s();!(l=u.n()).done;){var c=l.value;n.has(c)||n.add(c)}}catch(e){u.e(e)}finally{u.f()}return this.displayVariables=n,this}},{key:"mirrorsFrom",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(this._listeners.mirror=this._listeners.mirror.filter((function(e){return e.container!==t&&void 0!==t||(e.container.un("change:displayVariables",e.listenerKey),!1)})),void 0!==t&&!(void 0!==n&&n.length<1)){void 0===n&&(n=this.modelviewer.resources.variableCollections);var o=function(){var o,i=new Set,r=Hr(t.displayVariables);try{var a=function(){var e=o.value;n.forEach((function(t){e.variableCollection===t&&i.add(e)}))};for(r.s();!(o=r.n()).done;)a()}catch(e){r.e(e)}finally{r.f()}e.exchangeDisplayVariable(i)},i=t.on("change:displayVariables",o),r={container:t,listenerKey:i,variableCollections:n};this._listeners.mirror.forEach((function(t){var o=[];t.variableCollections.forEach((function(e){var t=!1;n.forEach((function(n){n===e&&(t=!0)})),t||o.push(e)})),o.length<t.variableCollections.length&&e.mirrorsFrom(t.container,o)})),this._listeners.mirror.push(r),o()}}},{key:"getMirrorsFrom",value:function(){var e=new Map;return this._listeners.mirror.forEach((function(t){e.set(t.container,t.variableCollections)})),e}},{key:"_setTimes",value:function(){var e=this,t=this._getSelectedVariablesWithResources([this.modelviewer.resources.topNode],new Set,void 0,(function(t){var n=!0;return e.modelviewer.resources._timesVariableCollections.forEach((function(e){var o,i=!1,r=Hr(t);try{for(r.s();!(o=r.n()).done;){var a=o.value;e.contains(a)&&(i=!0)}}catch(e){r.e(e)}finally{r.f()}i||(n=!1)})),n})),n=zr(t,1)[0];void 0===n&&(n=new Set);var o=0==n.size?[]:this.modelviewer.resources.getTimesByVariables({variables:n});this.modelviewer.timeline.setTimesBySetID(this.id,o)}},{key:"_updateSelectedVariables",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.addedVariables,o=void 0===n?void 0:n,i=t.removedVariables,r=void 0===i?void 0:i;if(!this._adaptSuitableResource.enabled){var a=void 0,s=function t(n){if(n.hasResourcesByVariables.apply(n,[!0].concat(Xr(e.displayVariables))))a=n;else{var o,i=Hr(n.children);try{for(i.s();!(o=i.n()).done;)t(o.value)}catch(e){i.e(e)}finally{i.f()}}};return s(this.modelviewer.resources.topNode),void this._setSelectedVariables(this.displayVariables,a)}var l=[],u=new Set,c=void 0;if(void 0===o||void 0===r)l.push(this.modelviewer.resources.topNode);else{var f=function t(n){for(var i=!1,a=0,s=[].concat(Xr(o),Xr(r));a<s.length;a++){var f=s[a];if(void 0!==f.variableCollection&&f.variableCollection.node===n){l.push(n),i=!0;break}}if(!i){var d=e.getSelectedVariable(n.variableCollection);if(void 0!==d.id){c=d,u.add(c);var p,h=Hr(n.children);try{for(h.s();!(p=h.n()).done;)t(p.value)}catch(e){h.e(e)}finally{h.f()}}}};f(this.modelviewer.resources.topNode),(l=l.filter((function(e,t,n){return t===n.indexOf(e)}))).length<1&&l.push(this.modelviewer.resources.topNode)}var d,p=this._getSelectedVariablesWithResources(l,u,c),h=zr(p,2),v=h[0],y=h[1];void 0===v?(v=u,d=void 0!==c?c.variableCollection.node:new Vi({variableCollection:new Ti})):d=y.variableCollection.node,this._setSelectedVariables(v,d)}},{key:"_getSelectedVariablesWithResources",value:function(e,t,n){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._adaptSuitableResource.isResourceSelected;if(i.call(this,t,n))return[t,n];var r,a=[void 0,void 0],s=function(e){var n=new Set(t);n.add(e);var r=zr(o._getSelectedVariablesWithResources(e.variableCollection.node.children,n,e,i),2),s=r[0],l=r[1];if(void 0!==s)return a[0]=s,void(a[1]=l);var u,c=!0,f=Hr(n);try{var d=function(){var e=u.value,t=!1;o.modelviewer.resources._timesVariableCollections.forEach((function(n){n.contains(e)&&(t=!0)})),t||(c=!1)};for(f.s();!(u=f.n()).done;)d()}catch(e){f.e(e)}finally{f.f()}c&&n.size==o.modelviewer.resources._timesVariableCollections.size&&(a[0]=n,a[1]=e)},l=[],u=Hr(e);try{for(u.s();!(r=u.n()).done;){var c=r.value;if(this.modelviewer.resources.availableVariablesMap.has(c)&&this.modelviewer.resources.availableVariablesMap.get(c).size){var f,d=Hr(c.variableCollection);try{for(d.s();!(f=d.n()).done;){var p=f.value;if(this.modelviewer.resources.availableVariablesMap.get(c).has(p)&&(this.displayVariables.has(p)?s(p):this._adaptSuitableResource.enabled&&l.push(p),void 0!==a[0]))break}}catch(e){d.e(e)}finally{d.f()}}if(void 0!==a[0])break}}catch(e){u.e(e)}finally{u.f()}if(void 0!==a[0])return a;var h,v=this._adaptSuitableResource.getPossibleVariables.call(this,l,t),y=Hr(v);try{for(y.s();!(h=y.n()).done;){var b=h.value;if(s(b),void 0!==a[0])break}}catch(e){y.e(e)}finally{y.f()}return a}},{key:"_setSelectedVariables",value:function(e,t){var n,o=new Set,i=Hr(e=new Set(e));try{for(i.s();!(n=i.n()).done;){var r=n.value;this.selectedVariables.has(r)||o.add(r)}}catch(e){i.e(e)}finally{i.f()}var a,s=new Set,l=Hr(this.selectedVariables);try{for(l.s();!(a=l.n()).done;){var u=a.value;e.has(u)||s.add(u)}}catch(e){l.e(e)}finally{l.f()}if(o.size>0||s.size>0||this._selectedNode!==t){this._selectedVariables.clear();var c,f=Hr(e);try{for(f.s();!(c=f.n()).done;){var d=c.value;this._selectedVariables.set(d.variableCollection,d)}}catch(e){f.e(e)}finally{f.f()}this._selectedNode=t,this._setTimes(),this._setEnabledResources(),this._debouncedChangeSelectedVariables({addedVariables:o,removedVariables:s})}}},{key:"_setEnabledResources",value:function(){var e,t=this;this._enabledResources.clear(),void 0!==this._selectedNode&&(0!=this.selectedVariables.size&&(e=this._selectedNode).getResourcesByVariables.apply(e,[!0].concat(Xr(this.selectedVariables))).filter((function(e){return e.datetime&&!isNaN(e.datetime.valueOf())})).forEach((function(e){return t._enabledResources.set(e.datetime.valueOf(),e)})),this.modelviewer.timeline.setEnabledTimesBySetID(this.id,this.enabledTimes),this.trigger("change:enabledResources",this._enabledResources),this._setVisibleResource())}},{key:"_setVisibleResource",value:function(){var e=this._visibleResource,t=this.modelviewer.timeline.getSelectedTime().valueOf();this._enabledResources.has(t)?this._visibleResource=this._enabledResources.get(t):this._visibleResource=void 0,this._visibleResource!==e&&this.trigger("change:visibleResource")}},{key:"_initAdaptSuitableResource",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.enabled,n=void 0===t||t,o=e.getPossibleVariables,i=void 0===o?void 0:o,r=e.isResourceSelected,a=void 0===r?void 0:r;this._adaptSuitableResource={enabled:n,getPossibleVariables:i,isResourceSelected:a},void 0===this._adaptSuitableResource.getPossibleVariables&&(this._adaptSuitableResource.getPossibleVariables=function(e){return e}),void 0===this._adaptSuitableResource.isResourceSelected&&(this._adaptSuitableResource.isResourceSelected=function(e,t){var n;return void 0!==t&&(n=t.variableCollection.node).getResourcesByVariables.apply(n,[!0].concat(Xr(e))).length>0})}}],n&&$r(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(wo);B(ea.prototype);const ta=ea,na=SVG;var oa=["color","width"],ia=["size","color","anchor"],ra=["visible","style"],aa=["visible","font"];function sa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function la(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ua(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ca(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.color,n=void 0===t?void 0:t,o=e.width,i=void 0===o?void 0:o,r=ua(e,oa),a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.color=va(n,a.color,"black"),r.width=va(i,a.width,1),Object.keys(a).forEach((function(e){"color"!=e&&"width"!=e&&void 0===r[e]&&(r[e]=a[e])})),r}function fa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size,n=void 0===t?void 0:t,o=e.color,i=void 0===o?void 0:o,r=e.anchor,a=void 0===r?void 0:r,s=ua(e,ia),l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.size=va(n,l.size,12),s.color=va(i,l.color,"black"),void 0!==(a=va(a,l.anchor))&&(s.anchor=a),Object.keys(l).forEach((function(e){"color"!=e&&"size"!=e&&"anchor"!=e&&void 0===s[e]&&(s[e]=l[e])})),s}function da(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t?void 0:t,o=e.style,i=void 0===o?{}:o,r=ua(e,ra),a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.visible=va(n,a.visible,!0),r.style=ca(i,a.style),Object.keys(a).forEach((function(e){"visible"!=e&&"style"!=e&&void 0===r[e]&&(r[e]=a[e])})),r}function pa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t||t,o=e.font,i=void 0===o?{}:o,r=ua(e,aa),a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.visible=va(n,a.visible,!0),r.font=fa(i,a.font),Object.keys(a).forEach((function(e){"visible"!=e&&"font"!=e&&void 0===r[e]&&(r[e]=a[e])})),r}function ha(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"visible"in t&&(e.visible=t.visible),"style"in t&&["color","width","opacity","linecap","linejoin","dasharray"].forEach((function(n){n in t.style&&(e.style[n]=t.style[n])})),e}function va(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return void 0!==e?e:t}))}function ya(e){var t=e.node,n=e.text,o=e.x,i=e.y,r=e.horizontalMargin,a=void 0===r?0:r,s=e.verticalMargin,l=void 0===s?0:s,u=e.font,c=void 0===u?{}:u,f=e.fill,d=void 0===f?void 0:f,p=t.group(),h=void 0;void 0!==d&&("color"in d||(d.color="white"),h=p.rect().fill(d));var v=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sa(Object(n),!0).forEach((function(t){la(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},c),y=void 0;"color"in v&&(y=v.color,delete v.color);var b=p.text(n).attr({x:o,y:i}).font(c);return void 0!==y&&b.fill(y),"bottom"==c["alignment-baseline"]&&b.dy(-b.bbox().height-5),b.dx(a*("end"==b.attr("text-anchor")?-1:1)).dy(l*("bottom"==c["alignment-baseline"]?-1:1)),void 0!==h&&h.attr({x:b.bbox().x,y:b.bbox().y,width:b.bbox().width,height:b.bbox().height}),p}function ba(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.node,n=e.x,o=void 0===n?0:n,i=e.y,r=void 0===i?0:i,a=e.wspd,s=void 0===a?0:a,l=e.wdir,u=void 0===l?270:l,c=e.length,f=void 0===c?50:c,d=e.strokeStyle,p=void 0===d?void 0:d,h=e.fillTriangle,v=void 0===h||h,y=e.triangleRatio,b=void 0===y?.2:y,m=e.barbDistanceRatio,g=void 0===m?.1:m,O=e.barbHeightRatio,_=void 0===O?3/8:O,P=e.circleOnLowWindspeed,S=void 0===P||P,j=e.circleRadiusRatio,T=void 0===j?.1:j;p=ca(p);var k=w(s),x=t.group(),E=k>=5?x.group():void 0,R=f*b,N=f*g,C=f*_,B=r-f,I=k;if(k<5&&S)x.circle(f*T).cx(o).cy(r).stroke(p).fill("none");else{for(x.line(o,B,o,r).stroke(p);I>=50;)E.polyline([[o,B],[o+C,B+R/2],[o,B+R]]).fill(v?p:"none").stroke(p),B+=R+((I-=50)>=50?N/2:N);for(;I>=10;)E.line(o,B,o+C,B-R/2).stroke(p),B+=N,I-=10;k<10&&(B+=N),I>=5&&E.line(o,B,o+C/2,B-R/4).stroke(p);var D=B-(r-f);D>.9*f&&E.scale(1,.9*f/D,o,r-f),0!=u&&x.rotate(u,o,r)}}function ma(e){return ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ma(e)}var ga=["parcel","visible","temp","dewp"];function wa(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Oa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Pa(e,t){return Pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pa(e,t)}function Sa(e,t){if(t&&("object"===ma(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ja(e){return ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ja(e)}var Ta=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pa(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ja(o);if(i){var n=ja(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Sa(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.parcel,o=void 0===n?void 0:n,i=t.visible,s=void 0===i||i,l=t.temp,u=void 0===l?{}:l,c=t.dewp,f=void 0===c?{}:c,d=wa(t,ga);return Oa(this,a),(e=r.call(this,d))._parcel=o,void 0===e.id&&void 0!==o&&(e.id=o.id),e._options={visible:s,temp:da(u,{style:{color:"rgb(255, 153, 0)",width:3,linecap:"round"}}),dewp:da(f,{style:{color:"rgb(255, 153, 0)",width:3,linecap:"round"}})},e}return t=a,n=[{key:"parcel",get:function(){return this._parcel}},{key:"visible",get:function(){return this._options.visible},set:function(e){var t=this._options.visible;this._options.visible=!!e,t!=this._options.visible&&this.trigger("change:visible")}},{key:"options",get:function(){return this._options}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t?void 0:t,o=e.temp,i=void 0===o?void 0:o,r=e.dewp,a=void 0===r?void 0:r,s=!1;void 0===i?i={}:s=!0,void 0===a?a={}:s=!0,this._options.temp=ha(this._options.temp,i),this._options.dewp=ha(this._options.dewp,a),s&&this.trigger("change:options"),void 0!==n&&(this.visible=n)}}],n&&_a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(wo);B(Ta.prototype);const ka=Ta;function xa(e){return xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xa(e)}var Ea=["minPressure","maxPressure","segments"],Ra=["minPressure","maxPressure"],Na=["minPressure","maxPressure"];function Ca(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ba(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ia(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ia(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Ia(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Da(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function La(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Aa(e,t){return Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Aa(e,t)}function Ma(e,t){if(t&&("object"===xa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Va(e){return Va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Va(e)}var Ga=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Aa(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Va(o);if(i){var n=Va(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ma(this,e)});function a(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.visible,i=void 0===o||o,s=n.diagram,l=void 0===s?{}:s,u=n.windprofile,c=void 0===u?{}:u,f=n.hodograph,d=void 0===f?{}:f,p=n.parcels,h=void 0===p?{}:p;if(Da(this,a),(t=r.call(this))._sounding=e,t._diagramParcelCollection=new To({fireReplace:!1,fireAddRemoveOnReplace:!0,emptyObjectMaker:function(){return new ka}}),t._visible=i,t._options={diagram:Ya(l),windprofile:Xa(c),hodograph:qa(d),parcels:Ua(h)},void 0!==t._sounding){t._sounding.parcelCollection.on("add:item",(function(e){return t.addParcel(e)})),t._sounding.parcelCollection.on("remove:item",(function(e){var n,o=Ba(t._diagramParcelCollection);try{for(o.s();!(n=o.n()).done;){var i=n.value;i.parcel===e&&t._diagramParcelCollection.remove(i)}}catch(e){o.e(e)}finally{o.f()}}));var v,y=Ba(t._sounding.parcelCollection);try{for(y.s();!(v=y.n()).done;){var b=v.value;t.addParcel(b)}}catch(e){y.e(e)}finally{y.f()}}return t}return t=a,n=[{key:"sounding",get:function(){return this._sounding}},{key:"visible",get:function(){return this._visible},set:function(e){var t=this._visible;this._visible=!!e,t!=this._visible&&this.trigger("change:visible")}},{key:"options",get:function(){return this._options}},{key:"diagramParcelCollection",get:function(){return this._diagramParcelCollection}},{key:"addParcel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;(t=void 0===t?this.getParcelOptions(e):t).parcel=e;var n=new ka(t);return this._diagramParcelCollection.append(n),n}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t?void 0:t,o=e.diagram,i=void 0===o?void 0:o,r=e.windprofile,a=void 0===r?void 0:r,s=e.hodograph,l=void 0===s?void 0:s,u=e.parcels,c=void 0===u?void 0:u,f=!1;void 0===i?i={}:f=!0,void 0===a?a={}:f=!0,void 0===l?l={}:f=!0,this._options.diagram=za(this._options.diagram,i),this._options.windprofile=Ha(this._options.windprofile,a),this._options.hodograph=Ka(this._options.hodograph,l),f&&this.trigger("change:options"),void 0===c&&(c={}),this._options.parcels=$a(this._options.parcels,c);var d,p=Ba(this.diagramParcelCollection);try{for(p.s();!(d=p.n()).done;){var h=d.value;h.id in c&&h.update(c[h.id])}}catch(e){p.e(e)}finally{p.f()}void 0!==n&&(this.visible=n)}},{key:"getParcelOptions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n={visible:this.options.parcels.default.visible,temp:{visible:this.options.parcels.default.temp.visible,style:{}},dewp:{visible:this.options.parcels.default.dewp.visible,style:{}}};return["temp","dewp"].forEach((function(t){Object.keys(e.options.parcels.default[t].style).forEach((function(o){n[t].style[o]=e.options.parcels.default[t].style[o]}))})),void 0!==t&&t.id in this.options.parcels&&(n=Za(n,this.options.parcels[t.id],["temp","dewp"])),n}}],n&&La(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(wo);B(Ga.prototype);const Fa=Ga;function Ya(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t||t,o=e.temp,i=void 0===o?{}:o,r=e.dewp,a=void 0===r?{}:r,s=e.wetbulb,l=void 0===s?{}:s;return{visible:n,temp:da(i,{style:{color:"red",width:3,linecap:"round"}}),dewp:da(a,{style:{color:"blue",width:3,linecap:"round"}}),wetbulb:da(l,{style:{color:"green",width:2,linecap:"round"}})}}function za(e,t){return Za(e,t,["temp","dewp","wetbulb"])}function Xa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t||t,o=e.windbarbs,i=void 0===o?{}:o,r=e.windspeed,a=void 0===r?{}:r;return{visible:n,windbarbs:da(i),windspeed:da(a)}}function Ha(e,t){return Za(e,t,["windbarbs","windspeed"])}function qa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.minPressure,n=void 0===t?void 0:t,o=e.maxPressure,i=void 0===o?void 0:o,r=e.segments,a=void 0===r?[]:r,s=Ca(e,Ea);return(s=da(s,{style:{color:"green",width:2}})).minPressure=n,s.maxPressure=i,s.segments=a.map((function(e){var t=e.minPressure,n=void 0===t?void 0:t,o=e.maxPressure,i=void 0===o?void 0:o,r=Ca(e,Ra);return(r=da(r)).minPressure=n,r.maxPressure=i,r})),s}function Ka(e,t){return e=ha(e,t),["minPressure","maxPressure"].forEach((function(n){n in t&&(e[n]=t[n])})),"segments"in t&&(e.segments=t.segments.map((function(e){var t=e.minPressure,n=void 0===t?void 0:t,o=e.maxPressure,i=void 0===o?void 0:o,r=Ca(e,Na);return(r=da(r)).minPressure=n,r.maxPressure=i,r}))),e}function Ua(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0===e.visible&&(e.visible=!0),void 0===e.default&&(e.default={}),void 0===e.default.visible&&(e.default.visible=!1),void 0===e.default.temp&&(e.default.temp={}),void 0===e.default.temp.visible&&(e.default.temp.visible=!0),void 0===e.default.temp.style&&(e.default.temp.style={}),void 0===e.default.temp.style.color&&(e.default.temp.style.color="rgb(255, 153, 0)"),void 0===e.default.temp.style.width&&(e.default.temp.style.width=3),void 0===e.default.temp.style.linecap&&(e.default.temp.style.linecap="round"),void 0===e.default.dewp&&(e.default.dewp={}),void 0===e.default.dewp.visible&&(e.default.dewp.visible=!0),void 0===e.default.dewp.style&&(e.default.dewp.style={}),void 0===e.default.dewp.style.color&&(e.default.dewp.style.color="rgb(255, 194, 102)"),void 0===e.default.dewp.style.width&&(e.default.dewp.style.width=3),void 0===e.default.dewp.style.linecap&&(e.default.dewp.style.linecap="round"),e}function $a(e,t){return"visible"in t&&(e.visible=t.visible),"default"in t&&(e.default=Za(e.default,t.default,["temp","dewp"])),Object.keys(t).filter((function(e){return"visible"!=e&&"default"!=e})).forEach((function(n){return e[n]=za(n in e?e[n]:{},t[n])})),e}function Za(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return"visible"in t&&(e.visible=t.visible),n.forEach((function(n){n in t&&(e[n]=ha(e[n]?e[n]:{style:{}},t[n]))})),e}function Wa(e){return Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wa(e)}function Ja(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Qa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qa(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Qa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function es(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ts(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ns(e,t){return ns=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ns(e,t)}function os(e,t){if(t&&("object"===Wa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function is(e){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},is(e)}var rs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ns(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=is(o);if(i){var n=is(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return os(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.renderTo,o=void 0===n?void 0:n,i=t.width,s=void 0===i?void 0:i,l=t.height,u=void 0===l?void 0:l;if(es(this,a),(e=r.call(this,{fireReplace:!1,fireAddRemoveOnReplace:!0,emptyObjectMaker:function(){return new Fa}}))._svgNode=void 0===o||"node"in o||"instance"in o?(0,na.SVG)(o):(0,na.SVG)().addTo(o),void 0!==s||void 0!==u)e._svgNode.size(s,u);else if(void 0===s&&void 0===u&&void 0!==o&&"getBoundingClientRect"in o){var c=o.getBoundingClientRect(),f=window.getComputedStyle(o);e._svgNode.size(c.width-parseFloat(f.getPropertyValue("padding-left"))-parseFloat(f.getPropertyValue("padding-right")),c.height-parseFloat(f.getPropertyValue("padding-top"))-parseFloat(f.getPropertyValue("padding-bottom")))}return e._plotAreas=new Set,e._svgNode.on("mousemove",(function(t){var n,o=Ja(e._plotAreas);try{for(o.s();!(n=o.n()).done;){var i=n.value;"isHoverLabelsRemote"in i&&i.svgNode.dispatchEvent(t)}}catch(e){o.e(e)}finally{o.f()}})),e._svgNode.on("mouseout",(function(t){if(e._svgNode.node===t.target){var n,o=Ja(e._plotAreas);try{for(o.s();!(n=o.n()).done;){var i=n.value;"_hoverLabelsGroup"in i&&i._hoverLabelsGroup.clear()}}catch(e){o.e(e)}finally{o.f()}}})),e.on("add:item",(function(t){var n,o=Ja(e._plotAreas);try{for(o.s();!(n=o.n()).done;){var i=n.value;"addSounding"in i&&i.addSounding(t)}}catch(e){o.e(e)}finally{o.f()}})),e.on("remove:item",(function(t){var n,o=Ja(e._plotAreas);try{for(o.s();!(n=o.n()).done;){var i=n.value;"removeSounding"in i&&i.removeSounding(t)}}catch(e){o.e(e)}finally{o.f()}})),e}return t=a,n=[{key:"svgNode",get:function(){return this._svgNode}},{key:"appendPlotArea",value:function(e){if(!this._plotAreas.has(e)){this._plotAreas.add(e),e.addTo(this.svgNode),e.onCoordinateSystemChange();var t,n=Ja(this);try{for(n.s();!(t=n.n()).done;){var o=t.value;"addSounding"in e&&e.addSounding(o)}}catch(e){n.e(e)}finally{n.f()}return this}}},{key:"removePlotArea",value:function(e){if(this._plotAreas.has(e)){var t,n=Ja(this);try{for(n.s();!(t=n.n()).done;){var o=t.value;e.removeSounding(o)}}catch(e){n.e(e)}finally{n.f()}return this._plotAreas.delete(e),this}}},{key:"exchangeCoordinateSystem",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=Ja(this._plotAreas);try{for(o.s();!(t=o.n()).done;){var i=t.value;void 0!==n&&i.coordinateSystem!==n||(i.coordinateSystem=e)}}catch(e){o.e(e)}finally{o.f()}}},{key:"addSounding",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new Fa(e,t),o=1,i="sounding-".concat(o);this.containsId(i);)o++,i="sounding-".concat(o);return n.id=i,this.append(n),n}}],n&&ts(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(To);const as=rs;function ss(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ls(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var us=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width,o=void 0===n?100:n,i=t.height,r=void 0===i?100:i,a=t.pressure,s=void 0===a?{}:a,l=t.temperature,u=void 0===l?{}:l;ss(this,e),this._width=o,this._height=r,this.temperatureBottomLeft,this.temperatureBottomRight,this.inclinationTan,this.options={pressure:{},temperature:{}},this._initPressureOptions(s),this._initTemperatureOptions(u)}var t,n;return t=e,n=[{key:"width",get:function(){return this._width},set:function(e){var t=this._width;this._width=e,t!=this._width&&this.trigger("change:options")}},{key:"height",get:function(){return this._height},set:function(e){var t=this._height;this._height=e,t!=this._height&&this.trigger("change:options")}},{key:"isIsobarsStraightLine",value:function(){return!0}},{key:"isDryAdiabatStraightLine",value:function(){return!1}},{key:"isIsothermsVertical",value:function(){return void 0!==this.options.temperature.inclinationAngle&&0==this.options.temperature.inclinationAngle}},{key:"getPByXY",value:function(e,t){return Math.pow(this.options.pressure.min,t/this.height)*Math.pow(this.options.pressure.max,(this.height-t)/this.height)}},{key:"getTByXY",value:function(e,t){var n=e-t*this.inclinationTan;return this.temperatureBottomLeft+n*(this.temperatureBottomRight-this.temperatureBottomLeft)/this.width}},{key:"getYByXP",value:function(e,t){return this.height*Math.log(this.options.pressure.max/t)/Math.log(this.options.pressure.max/this.options.pressure.min)}},{key:"getTByXP",value:function(e,t){return this.getTByXY(e,this.getYByXP(e,t))}},{key:"getXByYT",value:function(e,t){return(t-this.temperatureBottomLeft)*this.width/(this.temperatureBottomRight-this.temperatureBottomLeft)+e*this.inclinationTan}},{key:"getYByXT",value:function(e,t){return 0!=this.inclinationTan?(e-this.getXByYT(0,t))/this.inclinationTan:void 0}},{key:"getXByPT",value:function(e,t){return this.getXByYT(this.getYByXP(0,e),t)}},{key:"getYByPT",value:function(e){return this.getYByXP(0,e)}},{key:"getXByYPotentialTemperature",value:function(e,t){return t=a(t,this.getPByXY(0,e)),this.getXByYT(e,t)}},{key:"getYByXPotentialTemperature",value:function(e,t){var n=this.getPByXY(e,0),o=this.getPByXY(e,this.height);if(!(r(this.getTByXP(e,o),o)<t||t<r(this.getTByXP(e,n),n))){for(;n-o>10;){var i=o+(n-o)/2,a=r(this.getTByXP(e,i),i);if(void 0===a)return;a<t?n=i:o=i}return this.getYByXP(e,o+(n-o)/2)}}},{key:"getXByPPotentialTemperatur",value:function(e,t){return t=a(t,e),this.getXByPT(e,t)}},{key:"getYByPPotentialTemperatur",value:function(e,t){var n=this.getXByPPotentialTemperatur(e,t);return this.getYByXPotentialTemperature(n,t)}},{key:"getXByYHMR",value:function(e,t){var n=this.getPByXY(0,e);return this.getXByYT(e,l(t,n))}},{key:"getYByXHMR",value:function(e,t){for(var n=this.getPByXY(e,0),o=this.getPByXY(e,this.height);n-o>10;){var i=o+(n-o)/2,r=d(this.getTByXP(e,i),i);if(void 0===r)return;r<t?o=i:n=i}return this.getYByXP(e,o+(n-o)/2)}},{key:"getXByPHMR",value:function(e,t){var n=l(t,e);return this.getXByPT(e,n)}},{key:"getYByPHMR",value:function(e,t){var n=l(t,e);return this.getYByPT(e,n)}},{key:"getXByYEquiPotTemp",value:function(e,t){var n=s(t,this.getPByXY(0,e));return this.getXByYT(e,n)}},{key:"getYByXEquiPotTemp",value:function(e,t){for(var n=0,o=this.height,i=void 0;o-n>10;){i=n+(o-n)/2;var r=this.getYByXT(e,s(t,this.getPByXY(e,i)));if(void 0===r)return;r<t?o=i:n=i}return i}},{key:"getXByPEquiPotTemp",value:function(e,t){var n=s(t,e);return this.getXByPT(e,n)}},{key:"getYByPEquiPotTemp",value:function(e,t){var n=s(t,e);return this.getYByPT(e,n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.pressure,n=void 0===t?{}:t,o=e.temperature,i=void 0===o?{}:o;"min"in n&&(this.options.pressure.min=void 0===n.min?100:n.min),"max"in n&&(this.options.pressure.max=void 0===n.max?1e3:n.max),"min"in i&&(this.options.temperature.min=void 0===i.min?y(-40):i.min),"max"in i&&(this.options.temperature.max=void 0===i.max?y(-45):i.max),"reference"in i&&(this.options.temperature.reference=void 0===i.reference?"base":i.reference),"inclinationAngle"in i&&(this.options.temperature.inclinationAngle=void 0===i.inclinationAngle?45:i.inclinationAngle),this._normalizeTemperatureRange(),this.trigger("change:options")}},{key:"_initPressureOptions",value:function(e){var t=e.min,n=void 0===t?100:t,o=e.max,i=void 0===o?1050:o;this.options.pressure={min:n,max:i}}},{key:"_initTemperatureOptions",value:function(e){var t=e.min,n=void 0===t?y(-40):t,o=e.max,i=void 0===o?y(45):o,r=e.reference,a=void 0===r?"base":r,s=e.inclinationAngle,l=void 0===s?45:s;this.options.temperature={min:n,max:i,reference:a,inclinationAngle:l},this._normalizeTemperatureRange()}},{key:"_normalizeTemperatureRange",value:function(){if(this.temperatureBottomLeft=this.options.temperature.min,this.temperatureBottomRight=this.options.temperature.max,this.inclinationTan=45==this.options.temperature.inclinationAngle?1:0==this.options.temperature.inclinationAngle?0:Math.tan(this.options.temperature.inclinationAngle*Math.PI/180),/^[0-9]+$/.test(this.options.temperature.reference)){var e=this.getYByXP(0,this.options.temperature.reference),t=this.inclinationTan*e,n=(this.temperatureBottomRight-this.temperatureBottomLeft)/this.width;this.temperatureBottomLeft+=n*t,this.temperatureBottomRight+=n*t}}}],n&&ls(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(us.prototype);const cs=us;function fs(e){return fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fs(e)}function ds(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ps(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function hs(e,t){return hs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hs(e,t)}function vs(e,t){if(t&&("object"===fs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ys(e)}var bs=.2857;const ms=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hs(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ys(o);if(i){var n=ys(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return vs(this,e)});function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=void 0===t?100:t,o=e.height,i=void 0===o?100:o,s=e.pressure,l=void 0===s?{}:s,u=e.temperature,c=void 0===u?{}:u;return ds(this,a),c.inclinationAngle=0,r.call(this,{width:n,height:i,pressure:l,temperature:c})}return t=a,(n=[{key:"isDryAdiabatStraightLine",value:function(){return!0}},{key:"getPByXY",value:function(e,t){return Math.pow(Math.pow(this.options.pressure.max,bs)-t*(Math.pow(this.options.pressure.max,bs)-Math.pow(this.options.pressure.min,bs))/this.height,1/bs)}},{key:"getYByXP",value:function(e,t){return this.height*(Math.pow(this.options.pressure.max,bs)-Math.pow(t,bs))/(Math.pow(this.options.pressure.max,bs)-Math.pow(this.options.pressure.min,bs))}},{key:"getYByXT",value:function(){}}])&&ps(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(cs);function gs(e){return gs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gs(e)}function ws(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Os(e,t){return Os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Os(e,t)}function _s(e,t){if(t&&("object"===gs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ps(e){return Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ps(e)}const Ss=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Os(e,t)}(r,e);var t,n,o,i=(n=r,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ps(n);if(o){var i=Ps(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return _s(this,e)});function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=void 0===t?100:t,o=e.height,a=void 0===o?100:o,s=e.pressure,l=void 0===s?{}:s,u=e.temperature,c=void 0===u?{}:u;return ws(this,r),c.inclinationAngle=0,i.call(this,{width:n,height:a,pressure:l,temperature:c})}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(cs);function js(e){return js="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},js(e)}function Ts(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ks(e,t){return ks=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ks(e,t)}function xs(e,t){if(t&&("object"===js(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Es(e){return Es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Es(e)}const Rs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ks(e,t)}(r,e);var t,n,o,i=(n=r,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Es(n);if(o){var i=Es(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return xs(this,e)});function r(){return Ts(this,r),i.apply(this,arguments)}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(cs);function Ns(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cs(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var Bs=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.svgNode,i=void 0===o?void 0:o,r=n.coordinateSystem,a=void 0===r?void 0:r,s=n.x,l=void 0===s?0:s,u=n.y,c=void 0===u?0:u,f=n.width,d=void 0===f?100:f,p=n.height,h=void 0===p?100:p,v=n.style,y=void 0===v?{}:v,b=n.visible,m=void 0===b||b,g=n.events,w=void 0===g?{}:g;Ns(this,e),this._svgNode=(0,na.SVG)().attr({x:l,y:c,width:d,height:h}).css(this._getNormalizedStyle(y)).css("display",m?"inline":"none"),void 0!==i&&this.addTo(i),this._svgNodeBackground=this._svgNode.group(),this._visible=m,this._coordinateSystem=a,this._coordinateSystemListenerKey=void 0!==this._coordinateSystem?this._coordinateSystem.on("change:options",(function(){return t.onCoordinateSystemChange()})):void 0,this.on("change:extent",(function(){return t.onCoordinateSystemChange()})),this._initEvents(w)}var t,n;return t=e,n=[{key:"svgNode",get:function(){return this._svgNode}},{key:"visible",get:function(){return this._visible},set:function(e){var t=this._visible;this._visible=e,t!=this._visible&&(this._svgNode.style("display",this._visible?"inline":"none"),this.trigger("change:visible"))}},{key:"x",get:function(){return this._svgNode.attr("x")},set:function(e){this._svgNode.attr({x:e}),this.trigger("change:position")}},{key:"y",get:function(){return this._svgNode.attr("y")},set:function(e){this._svgNode.attr({y:e}),this.trigger("change:position")}},{key:"width",get:function(){return this._svgNode.attr("width")},set:function(e){this._svgNode.attr({width:e}),this.trigger("change:extent")}},{key:"height",get:function(){return this._svgNode.attr("height")},set:function(e){this._svgNode.attr({height:e}),this.trigger("change:extent")}},{key:"style",get:function(){return this._svgNode.css()},set:function(e){this._svgNode.css(e)}},{key:"coordinateSystem",get:function(){return this._coordinateSystem},set:function(e){var t=this;void 0!==this._coordinateSystemListenerKey&&this._coordinateSystem.un("change:options",this._coordinateSystemListenerKey),this._coordinateSystem=e,this._coordinateSystemListenerKey=this._coordinateSystem.on("change:options",(function(){return t.onCoordinateSystemChange()})),this.onCoordinateSystemChange()}},{key:"minExtentLength",get:function(){return Math.min(this.width,this.height)}},{key:"maxExtentLength",get:function(){return Math.max(this.width,this.height)}},{key:"addTo",value:function(e){this._svgNode.addTo(e)}},{key:"init",value:function(){this.onCoordinateSystemChange()}},{key:"onCoordinateSystemChange",value:function(){void 0!==this._coordinateSystem&&this.drawBackground(this._svgNodeBackground)}},{key:"drawBackground",value:function(e){e.clear(),this.trigger("prebuild:background",{node:e}),this._drawBackground(e),this.trigger("postbuild:background",{node:e})}},{key:"_drawBackground",value:function(){}},{key:"_getNormalizedStyle",value:function(e){var t=e.overflow;return{overflow:void 0===t?"hidden":t}}},{key:"_initEvents",value:function(e){var t=this,n=e.click,o=void 0===n?void 0:n,i=e.dblclick,r=void 0===i?void 0:i,a=e.mousedown,s=void 0===a?void 0:a,l=e.mouseup,u=void 0===l?void 0:l,c=e.mouseover,f=void 0===c?void 0:c,d=e.mouseout,p=void 0===d?void 0:d,h=e.mousemove,v=void 0===h?void 0:h,y=e.touchstart,b=void 0===y?void 0:y,m=e.touchmove,g=void 0===m?void 0:m,w=e.touchleave,O=void 0===w?void 0:w,_=e.touchend,P=void 0===_?void 0:_,S=e.touchcancel,j={click:o,dblclick:r,mousedown:s,mouseup:u,mouseover:f,mouseout:p,mousemove:v,touchstart:b,touchmove:g,touchleave:O,touchend:P,touchcancel:void 0===S?void 0:S};Object.keys(j).forEach((function(e){t._svgNode.on(e,(function(n){var o=t.getExtendedEvent(n,t._svgNode.point(n.pageX-window.pageXOffset,n.pageY-window.pageYOffset));void 0!==j[e]&&j[e].call(t,o),t.trigger(e,o)}))}))}},{key:"getExtendedEvent",value:function(e,t){return e.elementX=t.x,e.elementY=t.y,e}}],n&&Cs(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();B(Bs.prototype);const Is=Bs;function Ds(e){return Ds="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ds(e)}function Ls(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function As(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ms(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Vs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vs(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Vs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Gs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fs(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ys(){return Ys="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=zs(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ys.apply(this,arguments)}function zs(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=qs(e)););return e}function Xs(e,t){return Xs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xs(e,t)}function Hs(e,t){if(t&&("object"===Ds(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function qs(e){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qs(e)}var Ks=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xs(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=qs(o);if(i){var n=qs(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Hs(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.svgNode,o=void 0===n?void 0:n,i=t.coordinateSystem,s=void 0===i?void 0:i,l=t.x,u=void 0===l?0:l,c=t.y,f=void 0===c?0:c,d=t.width,p=void 0===d?100:d,h=t.height,v=void 0===h?100:h,y=t.style,b=void 0===y?{}:y,m=t.visible,g=void 0===m||m,w=t.events,O=void 0===w?{}:w,_=t.hoverLabels,P=void 0===_?{}:_,S=t.getSoundingVisibility,j=void 0===S?function(e){return e.visible}:S,T=t.dataGroupIds,k=void 0===T?[]:T,x=t.getCoordinatesByLevelData,E=void 0===x?function(){return{x:void 0,y:void 0}}:x,R=t.insertDataGroupInto,N=void 0===R?function(){}:R,C=t.filterDataPoint,B=void 0===C?void 0:C,I=t.minDataPointsDistance,D=void 0===I?0:I;return Gs(this,a),(e=r.call(this,{svgNode:o,coordinateSystem:s,x:u,y:f,width:p,height:v,style:b,visible:g,events:O}))._getSoundingVisibility=j,e._dataGroupIds=k,e._getCoordinatesByLevelData=E,e._insertDataGroupInto=N,e._filterDataPoint=B,e._minDataPointsDistance=D,e._svgNodeData=e.svgNode.group(),e._soundings=new Map,e._hoverLabelsGroup=e.svgNode.group(),e._getHoverSounding,e._initHoverLabels(P),e}return t=a,n=[{key:"dataGroupIds",get:function(){return this._dataGroupIds}},{key:"getCoordinatesByLevelData",get:function(){return this._getCoordinatesByLevelData}},{key:"minDataPointsDistance",get:function(){return this._minDataPointsDistance},set:function(e){var t=this._minDataPointsDistance;this._minDataPointsDistance=e,t!=this._minDataPointsDistance&&this.drawSoundings()}},{key:"hoverLabelsSounding",get:function(){var e,t=[],n=Ms(this._soundings.keys());try{for(n.s();!(e=n.n()).done;){var o=e.value;this._getSoundingVisibility(o)&&t.push(o)}}catch(e){n.e(e)}finally{n.f()}if(t.length>0)return this._getHoverSounding(t)}},{key:"addSounding",value:function(e){var t=this,n=this._svgNodeData.group(),o=e.on("change:visible",(function(){return t.onChangeSoundingVisibility(e,n)})),i=e.on("change:options",(function(){void 0!==t.coordinateSystem&&t.drawSounding(e,n),t.onChangeSoundingVisibility(e,n)}));this._soundings.set(e,{group:n,listenerKeyVisible:o,listenerKeyOptions:i}),this.trigger("add:sounding",e),void 0!==this.coordinateSystem&&this.drawSounding(e,n),this.setDisplayOfSounding(e,n)}},{key:"removeSounding",value:function(e){this._soundings.has(e)&&(this._soundings.get(e).group.remove(),e.un(this._soundings.get(e).listenerKeyVisible),e.un(this._soundings.get(e).listenerKeyOptions),this._soundings.delete(e)),this.trigger("remove:sounding",e)}},{key:"onCoordinateSystemChange",value:function(){Ys(qs(a.prototype),"onCoordinateSystemChange",this).call(this),this.drawSoundings()}},{key:"onChangeSoundingVisibility",value:function(e,t){this.setDisplayOfSounding(e,t),this._hoverLabelsGroup.clear()}},{key:"setDisplayOfSounding",value:function(e,t){t.css("display",this._getSoundingVisibility(e)?"inline":"none")}},{key:"drawSoundings",value:function(){if(void 0!==this.coordinateSystem){var e,t=Ms(this._soundings.keys());try{for(t.s();!(e=t.n()).done;){var n=e.value;this.drawSounding(n,this._soundings.get(n).group)}}catch(e){t.e(e)}finally{t.f()}}}},{key:"drawSounding",value:function(e,t){var n=this;t.clear(),this.trigger("preinsert:sounding",{sounding:e,node:t});var o=t.group(),i={},r=this._getFilterDataPointFunction(),a={};e.sounding.getLevels().reverse().forEach((function(t){var o=e.sounding.getData(t);n._dataGroupIds.forEach((function(t){t in i||(i[t]=[]);var s={levelData:o,x:void 0,y:void 0},l=n._getCoordinatesByLevelData(t,e,s.levelData,n),u=l.x,c=l.y;s.x=u,s.y=c,void 0===u||void 0===c||void 0!==r&&r(s,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ls(Object(n),!0).forEach((function(t){As(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ls(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a))||(a=s,i[t].push(s))}))})),Object.keys(i).forEach((function(t){i[t].length>0&&n._insertDataGroupInto(o,t,e,i[t],n)})),this.trigger("postinsert:sounding",{sounding:e,node:t}),this._getSoundingVisibility(e)&&this._hoverLabelsGroup.clear()}},{key:"_getFilterDataPointFunction",value:function(){return void 0===this._filterDataPoint?0===(e=this._minDataPointsDistance)?void 0:function(t,n){var o=t.x,i=t.y;if(void 0===n.x||void 0===n.y)return n.x=o,n.y=i,!1;var r=Math.sqrt(Math.pow(o-n.x,2)+Math.pow(i-n.y,2))<e;return r||(n.x=o,n.y=i),r}:this._filterDataPoint;var e}},{key:"_initHoverLabels",value:function(e){var t=this,n=e.visible,o=void 0===n||n,i=e.type,r=void 0===i?"mousemove":i,a=e.maxDistance,s=void 0===a?void 0:a,l=e.insertLabelsFunc,u=void 0===l?void 0:l,c=e.getLevelData,f=void 0===c?function(){}:c,d=e.getHoverSounding,p=void 0===d?function(e){return e.shift()}:d;this._getHoverSounding=p,o&&void 0!==u&&(this.on("change:extent",(function(){return t._hoverLabelsGroup.clear()})),this.on(r,(function(e){var n=t.hoverLabelsSounding;void 0!==n&&u(n,f({hoverLabelsSounding:n,e,maxDistance:s}),t._hoverLabelsGroup)})))}}],n&&Fs(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Is);const Us=Ks;function $s(e){return $s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$s(e)}function Zs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ws(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Js(){return Js="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=Qs(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Js.apply(this,arguments)}function Qs(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=nl(e)););return e}function el(e,t){return el=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},el(e,t)}function tl(e,t){if(t&&("object"===$s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nl(e)}var il=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&el(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=nl(o);if(i){var n=nl(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return tl(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.svgNode,o=void 0===n?void 0:n,i=t.coordinateSystem,s=void 0===i?void 0:i,l=t.x,u=void 0===l?0:l,c=t.y,f=void 0===c?0:c,d=t.width,p=void 0===d?100:d,h=t.height,v=void 0===h?100:h,y=t.style,b=void 0===y?{}:y,m=t.visible,g=void 0===m||m,w=t.events,O=void 0===w?{}:w,_=t.hoverLabels,P=void 0===_?{}:_,S=t.getSoundingVisibility,j=void 0===S?function(e){return e.visible}:S,T=t.dataGroupIds,k=void 0===T?void 0:T,x=t.getCoordinatesByLevelData,E=void 0===x?void 0:x,R=t.insertDataGroupInto,N=void 0===R?void 0:R,C=t.filterDataPoint,B=void 0===C?void 0:C,I=t.minDataPointsDistance,D=void 0===I?0:I;return Zs(this,a),(e=r.call(this,{svgNode:o,coordinateSystem:s,x:u,y:f,width:p,height:v,style:b,visible:g,events:O,hoverLabels:P,getSoundingVisibility:j,dataGroupIds:k,getCoordinatesByLevelData:E,insertDataGroupInto:N,filterDataPoint:B,minDataPointsDistance:D}))._isHoverLabelsRemote,e}return t=a,n=[{key:"getExtendedEvent",value:function(e,t){return(e=Js(nl(a.prototype),"getExtendedEvent",this).call(this,e,t)).diagramPres=void 0,void 0!==this.coordinateSystem&&(e.diagramPres=this.coordinateSystem.getPByXY(0,this.coordinateSystem.height-e.elementY)),e}},{key:"isHoverLabelsRemote",get:function(){return this._isHoverLabelsRemote}},{key:"_initHoverLabels",value:function(e){var t=e.visible,n=void 0===t||t,o=e.type,i=void 0===o?"mousemove":o,r=e.maxDistance,s=void 0===r?void 0:r,l=e.remote,u=void 0===l||l,c=e.insertLabelsFunc,f=void 0===c?void 0:c,d=e.getLevelData,p=void 0===d?function(e){var t=e.hoverLabelsSounding,n=e.e;if(!n.diagramPres)return{};var o=t.sounding;return o.getData(o.getNearestLevel(n.diagramPres))}:d,h=e.getHoverSounding,v=void 0===h?void 0:h;this._isHoverLabelsRemote=u,Js(nl(a.prototype),"_initHoverLabels",this).call(this,{visible:n,type:i,maxDistance:s,insertLabelsFunc:f,getLevelData:p,getHoverSounding:v})}}],n&&Ws(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Us);const rl=il;function al(e){return al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},al(e)}function sl(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ll(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ll(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function ll(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function ul(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cl(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function fl(){return fl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=dl(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},fl.apply(this,arguments)}function dl(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=vl(e)););return e}function pl(e,t){return pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pl(e,t)}function hl(e,t){if(t&&("object"===al(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function vl(e){return vl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vl(e)}var yl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pl(e,t)}(l,e);var n,o,i,a,s=(i=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=vl(i);if(a){var n=vl(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return hl(this,e)});function l(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.svgNode,o=void 0===n?void 0:n,i=t.coordinateSystem,r=void 0===i?void 0:i,a=t.x,c=void 0===a?0:a,f=t.y,d=void 0===f?0:f,p=t.width,h=void 0===p?100:p,v=t.height,m=void 0===v?100:v,g=t.style,w=void 0===g?{}:g,O=t.visible,_=void 0===O||O,P=t.events,S=void 0===P?{}:P,j=t.dataGroupIds,T=void 0===j?["temp","dewp","wetbulb"]:j,k=t.getCoordinatesByLevelData,x=void 0===k?function(e,t,n,o){if(void 0===n.pres)return{};var i=void 0;switch(e){case"temp":i=n.tmpk;break;case"dewp":i=n.dwpk;break;case"wetbulb":i=u(n.tmpk,n.dwpk,n.pres)}return void 0===i?{}:{x:o.coordinateSystem.getXByPT(n.pres,i),y:o.coordinateSystem.height-o.coordinateSystem.getYByPT(n.pres,i),value:Math.round(10*b(i))/10,unit:"℃"}}:k,E=t.insertDataGroupInto,R=void 0===E?function(e,t,n,o){if(!(t in n.options.diagram)||n.options.diagram[t].visible){var i=t in n.options.diagram?n.options.diagram[t].style:{};e.group().polyline(o.map((function(e){return[e.x,e.y]}))).fill("none").stroke(i)}}:E,N=t.filterDataPoint,C=void 0===N?void 0:N,B=t.minDataPointsDistance,I=void 0===B?0:B,D=t.isobars,L=void 0===D?{}:D,A=t.isotherms,M=void 0===A?{}:A,V=t.dryadiabats,G=void 0===V?{}:V,F=t.pseudoadiabats,Y=void 0===F?{}:F,z=t.mixingratio,X=void 0===z?{}:z,H=t.hoverLabels,q=void 0===H?{}:H,K=t.parcels,U=void 0===K?{}:K;return ul(this,l),e=s.call(this,{svgNode:o,coordinateSystem:r,x:c,y:d,width:h,height:m,style:w,visible:_,events:S,hoverLabels:q,getSoundingVisibility:function(e){return e.visible&&e.options.diagram.visible},dataGroupIds:T,getCoordinatesByLevelData:x,insertDataGroupInto:R,filterDataPoint:C,minDataPointsDistance:I}),e.options={isobars:ml(L),isotherms:ml(M,{highlightedLines:[y(0)]}),dryadiabats:ml(G),pseudoadiabats:ml(Y,{style:{color:"rgb(102, 51, 0)",dasharray:6}}),mixingratio:ml(X,{minPressure:500,style:{color:"rgb(102, 51, 0)",dasharray:2}})},e.svgGroups={border:e._svgNodeBackground.group(),isobars:e._svgNodeBackground.group(),isotherms:e._svgNodeBackground.group(),dryadiabats:e._svgNodeBackground.group(),mixingratio:e._svgNodeBackground.group(),pseudoadiabats:e._svgNodeBackground.group()},e._parcelsOptions=U,"visible"in e._parcelsOptions||(e._parcelsOptions.visible=!0),e._parcels=new Map,e.on("add:sounding",(function(t){var n={parcelsGroup:void 0,parcelsGroups:new Map,addItemListenerKey:void 0,removeItemListenerKey:void 0,changeVisibleListeners:[],changeOptionsListeners:[]},o=function(o){n.changeVisibleListeners.push({diagramParcel:o,listenerKey:o.on("change:visible",(function(){if(n.parcelsGroups.has(o)){var e=n.parcelsGroups.get(o);o.visible?e.show():e.hide()}}))}),n.changeOptionsListeners.push({diagramParcel:o,listenerKey:o.on("change:options",(function(){var n=e._parcels.get(t);if(void 0!==n){var i=n.parcelsGroups.get(o);void 0!==i&&(n.parcelsGroups.delete(o),i.remove())}e.drawParcel(t,o)}))})};n.addItemListenerKey=t.diagramParcelCollection.on("add:item",(function(n){o(n),e.drawParcel(t,n)})),n.removeItemListenerKey=t.diagramParcelCollection.on("remove:item",(function(e){var t=n.parcelsGroups.get(e);void 0!==t&&(n.parcelsGroups.delete(e),t.remove())}));var i,r=sl(t.diagramParcelCollection);try{for(r.s();!(i=r.n()).done;){var a=i.value;o(a)}}catch(e){r.e(e)}finally{r.f()}e._parcels.set(t,n)})),e.on("remove:sounding",(function(t){if(e._parcels.has(t)){var n=e._parcels.get(t);t.diagramParcelCollection.un("add:item",n.addItemListenerKey),t.diagramParcelCollection.un("remove:item",n.removeItemListenerKey),n.changeVisibleListeners.forEach((function(e){return e.diagramParcel.un("change:visible",e.listenerKey)})),n.changeOptionsListeners.forEach((function(e){return e.diagramParcel.un("change:options",e.listenerKey)}))}e._parcels.delete(t)})),e.init(),e}return n=l,o=[{key:"getIsobarsVisible",value:function(){return this.options.isobars.visible}},{key:"setIsobarsVisible",value:function(e){return this.options.isobars.visible=!!e,this.plotIsobars(),this}},{key:"getIsothermsVisible",value:function(){return this.options.isotherms.visible}},{key:"setIsothermsVisible",value:function(e){return this.options.isotherms.visible=!!e,this.plotIsotherms(),this}},{key:"getDryadiabatsVisible",value:function(){return this.options.dryadiabats.visible}},{key:"setDryadiabatsVisible",value:function(e){return this.options.dryadiabats.visible=!!e,this.plotDryadiabats(),this}},{key:"getPseudoadiabatsVisible",value:function(){return this.options.pseudoadiabats.visible}},{key:"setPseudoadiabatsVisible",value:function(e){return this.options.pseudoadiabats.visible=!!e,this.plotPseudoadiabats(),this}},{key:"getMixingratioVisible",value:function(){return this.options.mixingratio.visible}},{key:"setMixingratioVisible",value:function(e){return this.options.mixingratio.visible=!!e,this.plotMixingratio(),this}},{key:"drawSounding",value:function(e,t){if(fl(vl(l.prototype),"drawSounding",this).call(this,e,t),this._parcels.has(e)){var n=this._parcels.get(e);n.parcelsGroup=t.group(),e.options.parcels.visible||n.parcelsGroup.hide(),this._parcels.set(e,n)}this.drawParcels(e)}},{key:"drawParcels",value:function(e){if(this._parcelsOptions.visible&&this._parcels.has(e)){var t=this._parcels.get(e);t.parcelsGroup.clear(),t.parcelsGroups.clear();var n,o=sl(e.diagramParcelCollection);try{for(o.s();!(n=o.n()).done;){var i=n.value;this.drawParcel(e,i)}}catch(e){o.e(e)}finally{o.f()}}}},{key:"drawParcel",value:function(e,t){var n=this,o=t.parcel;if(void 0!==o.pres&&void 0!==o.tmpc&&void 0!==o.dwpc&&this._parcels.has(e)){var i=this._parcels.get(e),a=i.parcelsGroup.group();i.parcelsGroups.set(t,a),this._parcels.set(e,i);var s=r(y(o.tmpc),o.pres),l=d(y(o.dwpc),o.pres),u=p(s,l),f=v(y(o.tmpc),y(o.dwpc)),h=c(f,f,u),b=t.options;b.visible||a.hide();var m=a.group();b.temp.visible||m.hide();var g=a.group();b.dewp.visible||g.hide();var w=10,O=this.coordinateSystem.getYByPT(o.pres,y(o.tmpc)),_=this.coordinateSystem.getXByYPotentialTemperature(O,s),P=this.coordinateSystem.getYByPPotentialTemperatur(u,s),S=this.coordinateSystem.getXByYPotentialTemperature(P,s),j=[[_,O]];if(!this.coordinateSystem.isDryAdiabatStraightLine())for(var T=O+w;T<P;T+=w)j.push([this.coordinateSystem.getXByYPotentialTemperature(T,s),T]);j.push([S,P]);for(var k=this.coordinateSystem.height,x=this.coordinateSystem.getXByYEquiPotTemp(k,h),E=P+w;E<k;E+=w)j.push([this.coordinateSystem.getXByYEquiPotTemp(E,h),E]);j.push([x,k]),m.polyline(j.map((function(e){return e[1]=n.coordinateSystem.height-e[1],e}))).fill("none").stroke(b.temp.style);for(var R=this.coordinateSystem.getXByYHMR(O,l),N=this.coordinateSystem.getXByYHMR(P,l),C=[[R,O]],B=O+w;B<P;B+=w)C.push([this.coordinateSystem.getXByYHMR(B,l),B]);C.push([N,P]),g.polyline(C.map((function(e){return e[1]=n.coordinateSystem.height-e[1],e}))).fill("none").stroke(b.dewp.style)}}},{key:"_drawBackground",value:function(e){fl(vl(l.prototype),"_drawBackground",this).call(this,e),this.svgGroups={border:e.group(),isobars:e.group(),isotherms:e.group(),dryadiabats:e.group(),mixingratio:e.group(),pseudoadiabats:e.group()},this.svgGroups.border.clear(),this.svgGroups.border.rect(this.coordinateSystem.width,this.coordinateSystem.height).attr({stroke:"black","stroke-width":1,"fill-opacity":0}),this.plotIsobars(!0),this.plotIsotherms(!0),this.plotDryadiabats(!0),this.plotPseudoadiabats(!0),this.plotMixingratio(!0)}},{key:"plotIsobars",value:function(e){var t=this,n=this.coordinateSystem.getPByXY(0,this.coordinateSystem.height),o=this.coordinateSystem.getPByXY(0,0),i=o-n;this._plotLines(this.svgGroups.isobars,this.options.isobars,{min:n,max:o,interval:i>500?100:i>50?10:1},(function(e){var n=t.coordinateSystem.getYByXP(0,e);return[[0,n],[t.coordinateSystem.width,n]]}),e)}},{key:"plotIsotherms",value:function(e){var t=this,n=b(this.coordinateSystem.getTByXY(0,this.coordinateSystem.height)),o=b(this.coordinateSystem.getTByXY(this.coordinateSystem.width,0)),i=o-n;this._plotLines(this.svgGroups.isotherms,this.options.isotherms,{min:n,max:o,interval:i>50?10:5},(function(e){e=y(e);var n=[[void 0,void 0],[void 0,void 0]];return t.coordinateSystem.isIsothermsVertical()?(n[0][1]=0,n[1][1]=t.coordinateSystem.height,n[0][0]=n[1][0]=t.coordinateSystem.getXByYT(n[0][1],e)):(n[0][1]=0,n[0][0]=t.coordinateSystem.getXByYT(n[0][1],e),n[0][0]<0&&(n[0][1]=t.coordinateSystem.getYByXT(n[0][0]=0,e)),n[1][0]=t.coordinateSystem.width,n[1][1]=t.coordinateSystem.getYByXT(n[1][0],e),void 0===n[1][1]?(n[1][0]=n[0][0],n[1][1]=t.coordinateSystem.height):n[1][1]>t.coordinateSystem.height&&(n[1][1]=t.coordinateSystem.height,n[1][0]=t.coordinateSystem.getXByYT(n[1][1],e))),n}),e)}},{key:"plotDryadiabats",value:function(e){var t=this;this._plotLines(this.svgGroups.dryadiabats,this.options.dryadiabats,{min:b(r(this.coordinateSystem.getTByXY(0,0),this.coordinateSystem.getPByXY(0,0))),max:b(r(this.coordinateSystem.getTByXY(this.coordinateSystem.width,this.coordinateSystem.height),this.coordinateSystem.getPByXY(this.coordinateSystem.width,this.coordinateSystem.height))),interval:10},(function(e){var n=y(e),o=0,i=t.coordinateSystem.getXByYPotentialTemperature(o,n);(void 0===i||i>t.coordinateSystem.width)&&(i=t.coordinateSystem.width,o=t.coordinateSystem.getYByXPotentialTemperature(i,n));var r=0,a=t.coordinateSystem.getYByXPotentialTemperature(r,n);if((void 0===a||a>t.coordinateSystem.height)&&(a=t.coordinateSystem.height,r=t.coordinateSystem.getXByYPotentialTemperature(a,n)),void 0!==i&&void 0!==o&&void 0!==r&&void 0!==a){if(t.coordinateSystem.isDryAdiabatStraightLine())return[[i,o],[r,a]];for(var s=[[i,o]],l=o+10;l<a;l+=10)s.push([t.coordinateSystem.getXByYPotentialTemperature(l,n),l]);return s.push([r,a]),s}}),e)}},{key:"plotPseudoadiabats",value:function(e){var t=this;this._plotLines(this.svgGroups.pseudoadiabats,this.options.pseudoadiabats,{lines:[-18,-5,10,30,60,110,180]},(function(e){for(var n=y(e),o=Math.max(0,void 0===t.options.pseudoadiabats.maxPressure?0:t.coordinateSystem.getYByPEquiPotTemp(t.options.pseudoadiabats.maxPressure,n)),i=t.coordinateSystem.getXByYEquiPotTemp(o,n),r=Math.min(t.coordinateSystem.height,void 0===t.options.pseudoadiabats.minPressure?t.coordinateSystem.height:t.coordinateSystem.getYByPEquiPotTemp(t.options.pseudoadiabats.minPressure,n)),a=t.coordinateSystem.getXByYEquiPotTemp(r,n),s=[[i,o]],l=o+10;l<r;l+=10)s.push([t.coordinateSystem.getXByYEquiPotTemp(l,n),l]);return s.push([a,r]),s}),e)}},{key:"plotMixingratio",value:function(e){var t=this;this._plotLines(this.svgGroups.mixingratio,this.options.mixingratio,{lines:[.01,.1,1,2,4,7,10,16,21,32,40]},(function(e){for(var n=Math.max(0,void 0===t.options.mixingratio.maxPressure?0:t.coordinateSystem.getYByPHMR(t.options.mixingratio.maxPressure,e)),o=t.coordinateSystem.getXByYHMR(n,e),i=Math.min(t.coordinateSystem.height,void 0===t.options.mixingratio.minPressure?t.coordinateSystem.height:t.coordinateSystem.getYByPHMR(t.options.mixingratio.minPressure,e)),r=t.coordinateSystem.getXByYHMR(i,e),a=[[o,n]],s=n+10;s<i;s+=10)a.push([t.coordinateSystem.getXByYHMR(s,e),s]);return a.push([r,i]),a}),e)}},{key:"_plotLines",value:function(e,t,n,o,i){if(t.visible?e.show():e.hide(),i){e.clear();var r=[];if(void 0!==t.lines)r=t.lines;else if(void 0===t.min&&void 0===t.max&&void 0===t.interval&&void 0!==n.lines)r=n.lines;else{void 0!==t.min&&(n.min=t.min),void 0!==t.max&&(n.max=t.max);var a=t.interval;void 0===a&&(a=n.interval);for(var s=Math.ceil(n.min/a)*a,l=Math.floor(n.max/a)*a,u=s;u<=l;u+=a)r.push(u)}var c=3;void 0!==t.style.width&&(c=t.style.width+2),r.forEach((function(n){var i=o.call(this,n),r=2==i.length?e.line(i[0][0],this.coordinateSystem.height-i[0][1],i[1][0],this.coordinateSystem.height-i[1][1]).stroke(t.style):e.polyline(i.map((function(e){return e[1]=this.coordinateSystem.height-e[1],e}),this)).fill("none").stroke(t.style);void 0!==t.highlightedLines&&t.highlightedLines.forEach((function(e){n==b(e)&&r.stroke({width:c})}))}),this)}}},{key:"getExtendedEvent",value:function(e,t){return(e=fl(vl(l.prototype),"getExtendedEvent",this).call(this,e,t)).diagramTmpk=this.coordinateSystem.getTByXY(e.elementX,this.coordinateSystem.height-e.elementY),e}},{key:"_initHoverLabels",value:function(e){var t=e.visible,n=void 0===t||t,o=e.type,i=void 0===o?"mousemove":o,r=e.maxDistance,a=void 0===r?void 0:r,s=e.remote,u=void 0===s||s,c=e.insertLabelsFunc,f=void 0===c?void 0:c,d=e.getHoverSounding,p=void 0===d?void 0:d,h=e.pres,v=void 0===h?{}:h,y=e.temp,b=void 0===y?{}:y,m=e.dewp,g=void 0===m?{}:m,w=e.wetbulb,O=void 0===w?{}:w;v.length="length"in v?v.length:60,v.align="align"in v?v.align:"left","visible"in v||(v.visible=!0),"style"in v||(v.style={}),v.font=fa(v.font,{anchor:"right"==v.align?"end":"start"}),"fill"in v||(v.fill={}),void 0===v.fill.opacity&&(v.fill.opacity=.7),void 0===v.horizontalMargin&&(v.horizontalMargin=5),"visible"in b||(b.visible=!0),"style"in b||(b.style={}),b.font=fa(b.font,{anchor:"start","alignment-baseline":"bottom"}),"fill"in b||(b.fill={}),void 0===b.fill.opacity&&(b.fill.opacity=.7),b.radius="radius"in b?b.radius:void 0,b.radiusPlus="radiusPlus"in b?b.radiusPlus:2,void 0===b.horizontalMargin&&(b.horizontalMargin=10),"visible"in g||(g.visible=!0),"style"in g||(g.style={}),g.font=fa(g.font,{anchor:"end","alignment-baseline":"bottom"}),"fill"in g||(g.fill={}),void 0===g.fill.opacity&&(g.fill.opacity=.7),g.radius="radius"in g?g.radius:void 0,g.radiusPlus="radiusPlus"in g?g.radiusPlus:2,void 0===g.horizontalMargin&&(g.horizontalMargin=10),"visible"in O||(O.visible=!0),"style"in O||(O.style={}),O.font=fa(O.font,{anchor:"middle"}),"fill"in O||(O.fill={}),void 0===O.fill.opacity&&(O.fill.opacity=.7),O.radius="radius"in O?O.radius:void 0,O.radiusPlus="radiusPlus"in O?O.radiusPlus:2,void 0===O.verticalMargin&&(O.verticalMargin=10),void 0===f&&(f=this._makeInsertLabelsFunc(v,b,g,O)),fl(vl(l.prototype),"_initHoverLabels",this).call(this,{visible:n,type:i,maxDistance:a,remote:u,insertLabelsFunc:f,getHoverSounding:p})}},{key:"_makeInsertLabelsFunc",value:function(e,n,o,i){var r=this;return function(a,s,l){l.clear(),void 0!==s.pres&&(e.visible&&function(e,n,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i.length,a=void 0===r?60:r,s=i.align,l=void 0===s?"left":s,u=i.horizontalMargin,c=void 0===u?void 0:u,f=i.verticalMargin,d=void 0===f?void 0:f,p=i.style,h=void 0===p?{}:p,v=i.font,y=void 0===v?{}:v,b=i.fill,m=void 0===b?{}:b,g=0,w=a,O=/^([0-9]+)%$/.exec(w);O&&(w=O[1]/100*o.width),"right"==l&&(g=o.width,w=o.width-w);var _=o.height-o.getYByXP(0,n.pres);h=ca(h),e.line([[Math.min(g,w),_],[Math.max(g,w),_]]).stroke(h),(y=fa(y))["alignment-baseline"]="bottom",ya({node:e,text:"".concat(Math.round(n.pres)," hPa"),x:g,y:_,horizontalMargin:c,verticalMargin:d,font:y,fill:m}),y["alignment-baseline"]="top";var P=void 0===n.hght?"~".concat(Math.round(t(n.pres))," m"):"".concat(Math.round(n.hght)," m");ya({node:e,text:P,x:g,y:_,horizontalMargin:c,verticalMargin:d,font:y,fill:m})}(l,s,r.coordinateSystem,e),r.dataGroupIds.reverse().forEach((function(e){var t={visible:!1};switch(e){case"temp":t=n;break;case"dewp":t=o;break;case"wetbulb":t=i}if(t.visible){var u=r._getCoordinatesByLevelData(e,a,s,r),c=u.x,f=u.y,d=u.value,p=u.unit;if(void 0!==c&&void 0!==f){var h=e in r.hoverLabelsSounding.options.diagram?r.hoverLabelsSounding.options.diagram[e].style.width:3,v=void 0===t.radius?h+t.radiusPlus:t.radius,y=t.style;!("color"in y)&&e in r.hoverLabelsSounding.options.diagram&&(y.color=a.options.diagram[e].style.color),l.circle(2*v).attr({cx:c,cy:f}).fill(y),ya({node:l,text:"".concat(d," ").concat(p),x:c,y:f,horizontalMargin:t.horizontalMargin,verticalMargin:t.verticalMargin,font:t.font,fill:t.fill})}}})))}}}],o&&cl(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),l}(rl);const bl=yl;function ml(e){var t=e.highlightedLines,n=void 0===t?void 0:t,o=e.interval,i=void 0===o?void 0:o,r=e.lines,a=void 0===r?void 0:r,s=e.max,l=void 0===s?void 0:s,u=e.min,c=void 0===u?void 0:u,f=e.maxPressure,d=void 0===f?void 0:f,p=e.minPressure,h=void 0===p?void 0:p,v=e.style,y=void 0===v?void 0:v,b=e.visible,m=void 0===b?void 0:b,g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{highlightedLines:va(n,g.highlightedLines),interval:va(i,g.interval),lines:va(a,g.lines),max:va(l,g.max),min:va(c,g.min),maxPressure:va(d,g.maxPressure),minPressure:va(h,g.minPressure),style:ca(y,g.style),visible:va(m,g.visible,!0)}}function gl(e){return gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gl(e)}function wl(e,t){return wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wl(e,t)}function Ol(e,t){if(t&&("object"===gl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _l(e){return _l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_l(e)}var Pl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wl(e,t)}(r,e);var t,n,o,i=(n=r,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_l(n);if(o){var i=_l(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return Ol(this,e)});function r(e){var t,n=e.svgNode,o=void 0===n?void 0:n,a=e.coordinateSystem,s=void 0===a?void 0:a,l=e.x,u=void 0===l?void 0:l,c=e.y,f=void 0===c?void 0:c,d=e.width,p=void 0===d?void 0:d,h=e.height,v=void 0===h?void 0:h,y=e.style,b=void 0===y?{}:y,m=e.visible,g=void 0===m||m,w=e.events,O=void 0===w?{}:w,_=e.hoverLabels,P=void 0===_?{}:_,S=e.windbarbLength,j=void 0===S?void 0:S,T=e.dataGroupIds,k=void 0===T?["windbarbs"]:T,x=e.getCoordinatesByLevelData,E=void 0===x?function(e,t,n,o){return void 0===n.pres||void 0===n.wspd||void 0===n.wdir?{}:{x:o.width/2,y:o.coordinateSystem.height-o.coordinateSystem.getYByXP(0,n.pres)}}:x,R=e.insertDataGroupInto,N=void 0===R?function(e,t,n,o,i){o.forEach((function(t){ba({node:e,x:i.width/2,y:t.y,wspd:t.levelData.wspd,wdir:t.levelData.wdir,length:i._windbarbLength,strokeStyle:n.options.windprofile.windbarbs.style})}))}:R,C=e.filterDataPoint,B=void 0===C?void 0:C,I=e.minDataPointsDistance,D=void 0===I?void 0:I;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),t=i.call(this,{svgNode:o,coordinateSystem:s,x:u,y:f,width:p,height:v,style:b,visible:g,events:O,hoverLabels:P,getSoundingVisibility:function(e){return e.visible&&e.options.windprofile.windbarbs.visible},dataGroupIds:k,getCoordinatesByLevelData:E,insertDataGroupInto:N,filterDataPoint:B,minDataPointsDistance:void 0===D?0:D}),t._windbarbLength=j,void 0===t._windbarbLength&&(t._windbarbLength=2*t.width/5),void 0===D&&(t.minDataPointsDistance=t._windbarbLength/2),t.init(),t}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(rl);const Sl=Pl;function jl(e){return jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jl(e)}var Tl=["min","max","interval"];function kl(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function xl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function El(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xl(Object(n),!0).forEach((function(t){Rl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Rl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cl(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Bl(){return Bl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=Il(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Bl.apply(this,arguments)}function Il(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Al(e)););return e}function Dl(e,t){return Dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dl(e,t)}function Ll(e,t){if(t&&("object"===jl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Al(e){return Al=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Al(e)}var Ml=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dl(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Al(o);if(i){var n=Al(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ll(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.svgNode,o=void 0===n?void 0:n,i=t.coordinateSystem,s=void 0===i?void 0:i,l=t.x,u=void 0===l?void 0:l,c=t.y,f=void 0===c?void 0:c,d=t.width,p=void 0===d?void 0:d,h=t.height,v=void 0===h?void 0:h,y=t.style,b=void 0===y?{}:y,m=t.visible,g=void 0===m||m,w=t.events,_=void 0===w?{}:w,P=t.hoverLabels,S=void 0===P?{}:P,j=t.dataGroupIds,T=void 0===j?["windspeed"]:j,k=t.getCoordinatesByLevelData,x=void 0===k?function(e,t,n,o){return void 0===n.pres||void 0===n.wspd?{}:{x:o.width*n.wspd/o.windspeedMax,y:o.coordinateSystem.height-o.coordinateSystem.getYByXP(0,n.pres)}}:k,E=t.insertDataGroupInto,R=void 0===E?function(e,t,n,o){e.polyline(o.map((function(e){return[e.x,e.y]}))).fill("none").stroke(n.options.windprofile.windspeed.style)}:E,N=t.windspeedMax,C=void 0===N?O(150):N,B=t.grid,I=void 0===B?{}:B,D=t.filterDataPoint,L=void 0===D?void 0:D,A=t.minDataPointsDistance,M=void 0===A?0:A;return Nl(this,a),e=r.call(this,{svgNode:o,coordinateSystem:s,x:u,y:f,width:p,height:v,style:b,visible:g,events:_,hoverLabels:S,getSoundingVisibility:function(e){return e.visible&&e.options.windprofile.windspeed.visible},dataGroupIds:T,getCoordinatesByLevelData:x,insertDataGroupInto:R,filterDataPoint:L,minDataPointsDistance:M}),e._windspeedMax=C,e._gridOptions=e.getNormalizedGridOptions(I),e.init(),e}return t=a,n=[{key:"windspeedMax",get:function(){return this._windspeedMax},set:function(e){var t=this._windspeedMax;this._windspeedMax=e,this._windspeedMax!=t&&this.trigger("change:windspeedMax")}},{key:"_drawBackground",value:function(e){if(Bl(Al(a.prototype),"_drawBackground",this).call(this,e),this._gridOptions.isobars.visible)for(var t=e.group(),n=this._gridOptions.isobars.min;n<=this._gridOptions.isobars.max;n+=this._gridOptions.isobars.interval){var o=this.coordinateSystem.height-this.coordinateSystem.getYByXP(0,n);t.line(0,o,this.width,o).stroke(this._gridOptions.isobars.style)}if(this._gridOptions.isotachs.visible)for(var i=e.group(),r=this._gridOptions.isotachs.min;r<=this._gridOptions.isotachs.max;r+=this._gridOptions.isotachs.interval){var s=this.width*r/this.windspeedMax;i.line(s,0,s,this.height).stroke(this._gridOptions.isotachs.style)}}},{key:"_initHoverLabels",value:function(e){var t=e.visible,n=void 0===t||t,o=e.type,i=void 0===o?"mousemove":o,r=e.maxDistance,s=void 0===r?void 0:r,l=e.remote,u=void 0===l||l,c=e.insertLabelsFunc,f=void 0===c?void 0:c,d=e.getHoverSounding,p=void 0===d?void 0:d,h=e.windspeed,v=void 0===h?{}:h;"visible"in v||(v.visible=!0),"style"in v||(v.style={}),v.font=fa(v.font,{anchor:"end","alignment-baseline":"bottom"}),"fill"in v||(v.fill={}),void 0===v.fill.opacity&&(v.fill.opacity=.7),v.radius="radius"in v?v.radius:void 0,v.radiusPlus="radiusPlus"in v?v.radiusPlus:2,void 0===v.horizontalMargin&&(v.horizontalMargin=10),void 0===f&&(f=this._makeInsertLabelsFunc(v)),Bl(Al(a.prototype),"_initHoverLabels",this).call(this,{visible:n,type:i,maxDistance:s,remote:u,insertLabelsFunc:f,getHoverSounding:p})}},{key:"_makeInsertLabelsFunc",value:function(e){var t=this,n=e.visible,o=void 0===n||n,i=e.style,r=void 0===i?{}:i,a=e.font,s=void 0===a?{}:a,l=e.fill,u=void 0===l?{}:l,c=e.horizontalMargin,f=void 0===c?10:c,d=e.verticalMargin,p=void 0===d?0:d,h=e.radius,v=void 0===h?void 0:h,y=e.radiusPlus,b=void 0===y?2:y,g=e.windspeed,O=void 0===g?{}:g;return O=function(e){var t=e.visible,n=void 0===t||t,o=e.unit,i=void 0===o?"kn":o,r=e.decimalPlaces,a=void 0===r?0:r,s=e.prefix;return{visible:n,unit:i,decimalPlaces:a,prefix:void 0===s?" kn":s}}(O),function(e,n,i){if(i.clear(),void 0!==n&&void 0!==n.pres&&O.visible&&o&&void 0!==n.wspd){var a=t._getCoordinatesByLevelData("windspeed",e,n,t),l=a.x,c=a.y;if(void 0!==l&&void 0!==c){var d=void 0===v?e.options.windprofile.windspeed.style.width/2+b:v,h=El({},r);"color"in h||(h.color=e.options.windprofile.windspeed.style.color),i.circle(2*d).attr({cx:l,cy:c}).fill(h);var y=El({},s);"start"==y.anchor&&t.width-l<45&&(y.anchor="end"),"end"==y.anchor&&l<45&&(y.anchor="start"),"bottom"==y["alignment-baseline"]&&c<5*y.size/4&&(y["alignment-baseline"]="top"),"top"==y["alignment-baseline"]&&t.height-c<5*y.size/4&&(y["alignment-baseline"]="bottom");var g="";switch(O.unit){case"m/s":g=Number.parseFloat(n.wspd).toFixed(O.decimalPlaces);break;case"kn":g=w(n.wspd).toFixed(O.decimalPlaces);break;default:g=m(n.wspd).toFixed(O.decimalPlaces)}ya({node:i,text:g="".concat(g).concat(O.prefix),x:l,y:c,horizontalMargin:f,verticalMargin:p,font:y,fill:u})}}}}},{key:"getNormalizedGridOptions",value:function(e){var t=e.isotachs,n=void 0===t?{}:t,o=e.isobars,i=void 0===o?{}:o,r=100;return{isotachs:n=Gl(n,{min:0,max:this._windspeedMax,interval:O(50),style:{color:"grey",dasharray:"2 2"}}),isobars:i=Gl(i,{min:void 0===this.coordinateSystem?100:Math.ceil(this.coordinateSystem.getPByXY(0,this.height)/r)*r,max:void 0===this.coordinateSystem?1050:Math.floor(this.coordinateSystem.getPByXY(0,0)/r)*r,interval:r,style:{color:"grey",dasharray:"1 3"}})}}}],n&&Cl(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(rl);const Vl=Ml;function Gl(e){var t=e.min,n=void 0===t?void 0:t,o=e.max,i=void 0===o?void 0:o,r=e.interval,a=void 0===r?void 0:r,s=kl(e,Tl),l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=da(El({},s),l);return u.min=void 0===n?l.min:n,u.max=void 0===i?l.max:i,u.interval=void 0===a?l.interval:a,u}function Fl(e){return Fl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fl(e)}function Yl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function zl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yl(Object(n),!0).forEach((function(t){Xl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hl(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ql(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ql(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function ql(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Kl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ul(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function $l(){return $l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=Zl(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},$l.apply(this,arguments)}function Zl(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ql(e)););return e}function Wl(e,t){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wl(e,t)}function Jl(e,t){if(t&&("object"===Fl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ql(e){return Ql=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ql(e)}var eu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wl(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ql(o);if(i){var n=Ql(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Jl(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.svgNode,o=void 0===n?void 0:n,i=t.coordinateSystem,s=void 0===i?new cs:i,l=t.x,u=t.y,c=t.width,f=t.height,d=t.style,p=void 0===d?{}:d,h=t.visible,v=void 0===h||h,y=t.events,b=void 0===y?{}:y,m=t.hoverLabels,g=void 0===m?{}:m,w=t.dataGroupIds,_=void 0===w?["windbarbs"]:w,P=t.getCoordinatesByLevelData,S=void 0===P?function(e,t,n,o){var i=void 0,r=void 0;return void 0!==n.wspd&&void 0!==n.wdir?(i=n.wspd*-Math.sin(n.wdir/180*Math.PI),r=n.wspd*Math.cos(n.wdir/180*Math.PI)):void 0!==n.u&&void 0!==n.v&&(i=n.u,r=-n.v),void 0===i||void 0===r?{}:{x:o.center[0]+i*o.pixelPerSpeed,y:o.center[1]+r*o.pixelPerSpeed}}:P,j=t.insertDataGroupInto,T=void 0===j?function(e,t,n,o){var i=[o.filter((function(e){return!(void 0!==n.options.hodograph.minPressure&&void 0!==e.levelData.pres&&e.levelData.pres<n.options.hodograph.minPressure||void 0!==n.options.hodograph.maxPressure&&void 0!==e.levelData.pres&&e.levelData.pres>n.options.hodograph.maxPressure)}))];i[0].sort((function(e,t){return t.levelData.pres-e.levelData.pres}));var r,a=[],s=Hl(n.options.hodograph.segments);try{var l=function(){var e=r.value,t={levels:[],visible:e.visible,style:e.style};i.map((function(n,o){var r=void 0,a=void 0;if(n.map((function(n){(void 0!==e.minPressure&&e.minPressure<=n.levelData.pres&&void 0!==e.maxPressure&&e.maxPressure>=n.levelData.pres||void 0===e.minPressure&&void 0!==e.maxPressure&&e.maxPressure>=n.levelData.pres||void 0!==e.minPressure&&e.minPressure<=n.levelData.pres&&void 0===e.maxPressure)&&(t.levels.push(n),void 0===a&&(a=n),r=n)})),void 0!==a&&void 0!==r&&a!==r){var s=n.findIndex((function(e){return e.levelData.pres===r.levelData.pres})),l=n.findIndex((function(e){return e.levelData.pres===a.levelData.pres})),u=n.slice(s);i[o]=n.slice(0,l+1),i.push(u)}})),t.levels.length>0&&a.push(t)};for(s.s();!(r=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}i.map((function(t){t.length<2||e.polyline(t.map((function(e){return[e.x,e.y]}))).fill("none").stroke(n.options.hodograph.style)})),a.map((function(t){e.polyline(t.levels.map((function(e){return[e.x,e.y]}))).fill("none").stroke(t.style)}))}:j,k=t.grid,x=void 0===k?{}:k,E=t.windspeedMax,R=void 0===E?O(150):E,N=t.origin,C=void 0===N?void 0:N,B=t.filterDataPoint,I=void 0===B?void 0:B,D=t.minDataPointsDistance,L=void 0===D?0:D;return Kl(this,a),e=r.call(this,{svgNode:o,coordinateSystem:s,x:l,y:u,width:c,height:f,style:p,visible:v,events:b,hoverLabels:g,dataGroupIds:_,getCoordinatesByLevelData:S,insertDataGroupInto:T,getSoundingVisibility:function(e){return e.visible&&e.options.hodograph.visible},filterDataPoint:I,minDataPointsDistance:L}),e._origin=C,e._windspeedMax=R,e._gridOptions=e.getNormalizedGridOptions(x),void 0===e._gridOptions.max&&(e._gridOptions.max=R),e.init(),e}return t=a,n=[{key:"origin",get:function(){return this._origin},set:function(e){var t=this._origin;this._origin=e,this._hoverLabelsGroup.clear(),(void 0===t&&void 0!==this._origin||void 0!==t&&void 0===this._origin||void 0!==t&&void 0!==this._origin&&(t[0]!=this._origin[0]||t[1]!=this._origin[1]))&&this.onCoordinateSystemChange()}},{key:"center",get:function(){var e=[this.width/2,this.height/2];return void 0!==this._origin&&(e[0]+=this._origin[0]*this.minExtentLength/2,e[1]-=this._origin[1]*this.minExtentLength/2),e}},{key:"pixelPerSpeed",get:function(){var e=this.center;return Math.min(Math.max(this.width-e[0],e[0]),Math.max(this.height-e[1],e[1]))/this._windspeedMax}},{key:"_drawBackground",value:function(e){$l(Ql(a.prototype),"_drawBackground",this).call(this,e);var t=this.center,n=this.pixelPerSpeed;this._gridOptions.axes.visible&&(e.line(0,t[1],this.width,t[1]).stroke(this._gridOptions.axes.style),e.line(t[0],0,t[0],this.height).stroke(this._gridOptions.axes.style));for(var o=this._gridOptions.circles.interval;o<=this._gridOptions.max;o+=this._gridOptions.circles.interval){var i=o*n;if(e.circle(2*i).attr({cx:t[0],cy:t[1]}).fill("none").stroke(this._gridOptions.circles.style),this._gridOptions.labels.visible){var r=i*Math.cos((this._gridOptions.labels.angle-90)/180*Math.PI),s=i*Math.sin((this._gridOptions.labels.angle-90)/180*Math.PI),l="";switch(this._gridOptions.labels.unit){case"m/s":l=Number.parseFloat(o).toFixed(this._gridOptions.labels.decimalPlaces);break;case"kn":l=w(o).toFixed(this._gridOptions.labels.decimalPlaces);break;default:l=m(o).toFixed(this._gridOptions.labels.decimalPlaces)}l+=this._gridOptions.labels.prefix;var u=void 0,c=zl({},this._gridOptions.labels.font);"color"in c&&(u=c.color,delete c.color);var f=e.plain(l).font(this._gridOptions.labels.font).center(t[0]+r,t[1]+s);if(void 0!==u&&f.fill(u),"end"==c["text-anchor"]?f.dx(-f.bbox().width/2-3):"start"==c["text-anchor"]&&f.dx(+f.bbox().width/2+3),90!=this._gridOptions.labels.angle&&270!=this._gridOptions.labels.angle||f.dy(f.bbox().height/2+3),this._gridOptions.labels.backdrop.visible){var d=f.bbox();f.before(e.rect(d.width,d.height).move(d.x,d.y).fill({color:this._gridOptions.labels.backdrop.color}))}}}}},{key:"getNormalizedGridOptions",value:function(e){var t=e.axes,n=void 0===t?{}:t,o=e.circles,i=void 0===o?{}:o,r=e.labels,a=void 0===r?{}:r,s=e.max,l=void 0===s?void 0:s;return n=da(n),"interval"in(i=da(i))&&void 0!==i.interval||(i.interval=g(50)),"angle"in(a=pa(a))&&void 0!==a.angle||(a.angle=225),"unit"in a&&void 0!==a.unit||(a.unit="km/h"),"prefix"in a&&void 0!==a.prefix||(a.prefix=""),"decimalPlaces"in a&&void 0!==a.decimalPlaces||(a.decimalPlaces=0),"backdrop"in a&&void 0!==a.backdrop||(a.backdrop={}),"color"in a.backdrop||(a.backdrop.color="white"),"visible"in a.backdrop||(a.backdrop.visible=!0),void 0===a.font.size&&(a.font.size=10),{axes:n,circles:i,labels:a,max:l}}},{key:"_initHoverLabels",value:function(e){var t=this,n=e.visible,o=void 0===n||n,i=e.type,r=void 0===i?"mousemove":i,s=e.maxDistance,l=void 0===s?20:s,u=e.insertLabelsFunc,c=void 0===u?void 0:u,f=e.getLevelData,d=void 0===f?function(e){var n=e.hoverLabelsSounding,o=e.e,i=e.maxDistance,r=n.sounding,a=void 0,s=void 0;return r.getLevels().filter((function(e){return(void 0===n.options.hodograph.minPressure||n.options.hodograph.minPressure<=e)&&(void 0===n.options.hodograph.maxPressure||e<=n.options.hodograph.maxPressure)})).map((function(e){var n=r.getData(e);if(void 0!==n.wspd&&void 0!==n.wdir){var i=t._getCoordinatesByLevelData("windbarbs",r,n,t),l=i.x,u=i.y,c=Math.pow(o.elementX-l,2)+Math.pow(o.elementY-u,2);(void 0===s||c<a)&&(a=c,s=n)}})),void 0!==i&&Math.pow(i,2)<a&&(s={}),s}:f,p=e.getHoverSounding,h=void 0===p?void 0:p,v=e.hodograph,y=void 0===v?{}:v;"visible"in y||(y.visible=!0),"style"in y||(y.style={}),y.font=fa(y.font,{anchor:"end","alignment-baseline":"bottom"}),"fill"in y||(y.fill={}),void 0===y.fill.opacity&&(y.fill.opacity=.7),void 0===y.fill.color&&(y.fill.color="white"),void 0===c&&(c=this._makeInsertLabelsFunc(y)),$l(Ql(a.prototype),"_initHoverLabels",this).call(this,{visible:o,type:r,maxDistance:l,insertLabelsFunc:c,getLevelData:d,getHoverSounding:h})}},{key:"_makeInsertLabelsFunc",value:function(e){var t=this,n=e.visible,o=void 0===n||n,i=e.style,r=void 0===i?{}:i,a=e.font,s=void 0===a?{}:a,l=e.fill,u=void 0===l?{}:l,c=e.horizontalMargin,f=void 0===c?10:c,d=e.verticalMargin,p=void 0===d?0:d,h=e.radius,v=void 0===h?void 0:h,y=e.radiusPlus,b=void 0===y?2:y,g=e.pressure,O=void 0===g?{}:g,_=e.windspeed,P=void 0===_?{}:_,S=e.winddir,j=void 0===S?{}:S;return O=function(e){var t=e.visible,n=void 0===t||t,o=e.decimalPlaces,i=void 0===o?0:o,r=e.prefix;return{visible:n,decimalPlaces:i,prefix:void 0===r?" hPa":r}}(O),P=function(e){var t=e.visible,n=void 0===t||t,o=e.unit,i=void 0===o?"kn":o,r=e.decimalPlaces,a=void 0===r?0:r,s=e.prefix;return{visible:n,unit:i,decimalPlaces:a,prefix:void 0===s?" kn":s}}(P),j=function(e){var t=e.visible,n=void 0===t||t,o=e.decimalPlaces,i=void 0===o?0:o,r=e.prefix;return{visible:n,decimalPlaces:i,prefix:void 0===r?"°":r}}(j),function(e,n,i){if(i.clear(),void 0!==n&&o){var a=t._getCoordinatesByLevelData("windbarbs",e,n,t),l=a.x,c=a.y;if(void 0!==l&&void 0!==c){var d=e.options.hodograph.style;void 0!==n.pres&&e.options.hodograph.segments.map((function(e){(void 0===e.minPressure||e.minPressure<=n.pres)&&(void 0===e.maxPressure||e.maxPressure>=n.pres)&&(d=e.style)}));var h=void 0===v?d.width/2+b:v,y=zl({},r);"color"in y||(y.color=d.color),i.circle(2*h).attr({cx:l,cy:c}).fill(y);var g=i.rect().fill(u),_=zl({},s);_.anchor="start","start"==_.anchor&&t.width-l<45&&(_.anchor="end"),"end"==_.anchor&&l<45&&(_.anchor="start");var S=0,T=[],k=[];if(O.visible){var x=Number.parseFloat(n.pres).toFixed(O.decimalPlaces);k.push("".concat(x).concat(O.prefix))}if(P.visible){var E="";switch(P.unit){case"m/s":E=Number.parseFloat(n.wspd).toFixed(P.decimalPlaces);break;case"kn":E=w(n.wspd).toFixed(P.decimalPlaces);break;default:E=m(n.wspd).toFixed(P.decimalPlaces)}k.push("".concat(E).concat(P.prefix))}if(j.visible){var R=Number.parseFloat(n.wdir).toFixed(j.decimalPlaces);k.push("".concat(R).concat(j.prefix))}k.map((function(e){S+=5*_.size/4,T.push(ya({node:i,text:e,x:l,y:c+S,horizontalMargin:f,verticalMargin:p,font:_}))})),c+S>t.height&&T.map((function(e){return e.dy(-S)}));var N={x:void 0,y:void 0,x2:void 0,y2:void 0};T.map((function(e){e.children().map((function(e){if("text"==e.type){var t=e.bbox();(void 0===N.x||t.x<N.x)&&(N.x=t.x),(void 0===N.y||t.y<N.y)&&(N.y=t.y),(void 0===N.x2||N.x2<t.x2)&&(N.x2=t.x2),(void 0===N.y2||N.y2<t.y2)&&(N.y2=t.y2)}}))})),g.attr({x:N.x,y:N.y,width:N.x2-N.x,height:N.y2-N.y})}}}}}],n&&Ul(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Us);const tu=eu;function nu(e){return nu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nu(e)}var ou=["interval","unit","prefix","decimalPlaces"],iu=["text"];function ru(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function au(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ru(Object(n),!0).forEach((function(t){su(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ru(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function su(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lu(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uu(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function cu(){return cu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=fu(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},cu.apply(this,arguments)}function fu(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=hu(e)););return e}function du(e,t){return du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},du(e,t)}function pu(e,t){if(t&&("object"===nu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function hu(e){return hu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hu(e)}var vu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&du(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=hu(o);if(i){var n=hu(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return pu(this,e)});function a(e){var t,n,o,i,s,l=e.svgNode,u=void 0===l?void 0:l,c=e.coordinateSystem,f=e.x,d=e.y,p=e.width,h=e.height,v=e.style,y=void 0===v?{}:v,b=e.visible,m=void 0===b||b,g=e.events,w=void 0===g?{}:g,O=e.labels,_=void 0===O?{}:O,P=e.title,S=void 0===P?{}:P,j=e.isHorizontal,T=void 0===j||j;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),void 0===y.overflow&&(y.overflow="visible"),(t=r.call(this,{svgNode:u,coordinateSystem:c,x:f,y:d,width:p,height:h,style:y,visible:m,events:w}))._labelsOptions=t.getNormalizedLabelsOptions(_),t._titleOptions=(i=void 0===(o=(n=S).text)?"":o,(s=pa(au({},lu(n,iu)),{font:{anchor:"middle"}})).text=i,s),t._isHorizontal=T,t.init(),t}return t=a,(n=[{key:"getNormalizedLabelsOptions",value:function(e){var t=e.interval,n=void 0===t?void 0:t,o=e.unit,i=void 0===o?"":o,r=e.prefix,a=void 0===r?"":r,s=e.decimalPlaces,l=void 0===s?0:s,u=pa(au({},lu(e,ou)),{font:{size:11,anchor:"middle"}});return u.interval=n,u.unit=i,u.prefix=a,u.decimalPlaces=l,u}},{key:"drawLabels",value:function(e){for(var t=this,n=e.svgNode,o=e.min,i=e.max,r=e.getTextByInterval,a=void 0===r?function(e){return Number.parseFloat(e).toFixed(t._labelsOptions.decimalPlaces)}:r,s=e.getPositionByInterval,l=o;l<=i;l+=this._labelsOptions.interval){var u=a(l);u+=this._labelsOptions.prefix;var c=void 0,f=au({},this._labelsOptions.font);"color"in f&&(c=f.color,delete f.color),this._isHorizontal||(f.anchor="end");var d=n.plain(u).font(f);this._isHorizontal?(d.center(s(l),f.size),"end"==f.anchor?d.dx(-d.bbox().width/2):"start"==f.anchor&&d.dx(+d.bbox().width/2)):d.x(this.width).cy(s(l)).dx(-d.bbox().width),void 0!==c&&d.fill(c)}}},{key:"_drawTitle",value:function(e){var t=e.svgNode,n=e.svgLabelsNode,o=0;this._isHorizontal||(o=-90);var i=0;void 0!==n&&(i=-90==o?n.bbox().width:n.bbox().height);var r=void 0,a=au({},this._titleOptions.font);"color"in a&&(r=a.color,delete a.color);var s=this.width/2,l=a.size+i;-90==o&&(s=this.width-a.size-i,l=this.height/2);var u=t.plain(this._titleOptions.text).font(a).center(s,l).rotate(o);void 0!==r&&u.fill(r),-90==o?"end"==a.anchor?u.dy(-u.bbox().height/2):"start"==a.anchor&&u.dy(+u.bbox().height/2):"end"==a.anchor?u.dx(-u.bbox().width/2):"start"==a.anchor&&u.dx(+u.bbox().width/2)}},{key:"_drawBackground",value:function(e){cu(hu(a.prototype),"_drawBackground",this).call(this,e);var t=void 0;this._labelsOptions.visible&&(t=e.group(),this.drawLabels({svgNode:t})),this._titleOptions.visible&&this._drawTitle({svgNode:e.group(),svgLabelsNode:t})}}])&&uu(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Is);const yu=vu;function bu(e){return bu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bu(e)}var mu=["interval","unit"];function gu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function wu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ou(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Pu(){return Pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=Su(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Pu.apply(this,arguments)}function Su(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ku(e)););return e}function ju(e,t){return ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ju(e,t)}function Tu(e,t){if(t&&("object"===bu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ku(e){return ku=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ku(e)}var xu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ju(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ku(o);if(i){var n=ku(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Tu(this,e)});function a(){return Ou(this,a),r.apply(this,arguments)}return t=a,n=[{key:"getNormalizedLabelsOptions",value:function(e){var t=e.interval,n=void 0===t?10:t,o=e.unit,i=void 0===o?"°C":o,r=function(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,mu);return Pu(ku(a.prototype),"getNormalizedLabelsOptions",this).call(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gu(Object(n),!0).forEach((function(t){wu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({interval:n,unit:i},r))}},{key:"drawLabels",value:function(e){var t=this,n=e.svgNode,o=e.getTextByInterval,i=void 0===o?function(e){return Number.parseFloat(e).toFixed(t._labelsOptions.decimalPlaces)}:o,r=e.getPositionByInterval,s=void 0===r?function(e){return"°C"==t._labelsOptions.unit&&(e=y(e)),t.coordinateSystem.getXByYT(0,e)}:r,l="°C"==this._labelsOptions.unit?Math.ceil(b(this.coordinateSystem.getTByXY(0,0))/this._labelsOptions.interval)*this._labelsOptions.interval:Math.ceil(this.coordinateSystem.getTByXY(0,0)/this._labelsOptions.interval)*this._labelsOptions.interval,u="°C"==this._labelsOptions.unit?Math.floor(b(this.coordinateSystem.getTByXY(this.width,0))/this._labelsOptions.interval)*this._labelsOptions.interval:Math.floor(this.coordinateSystem.getTByXY(this.width,0)/this._labelsOptions.interval)*this._labelsOptions.interval;Pu(ku(a.prototype),"drawLabels",this).call(this,{svgNode:n,min:l,max:u,getTextByInterval:i,getPositionByInterval:s})}}],n&&_u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(yu);const Eu=xu;function Ru(e){return Ru="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ru(e)}var Nu=["interval","unit"];function Cu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Bu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iu(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Du(){return Du="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=Lu(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Du.apply(this,arguments)}function Lu(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vu(e)););return e}function Au(e,t){return Au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Au(e,t)}function Mu(e,t){if(t&&("object"===Ru(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vu(e){return Vu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vu(e)}var Gu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Au(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Vu(o);if(i){var n=Vu(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Mu(this,e)});function a(e){var t=e.svgNode,n=void 0===t?void 0:t,o=e.coordinateSystem,i=e.x,s=e.y,l=e.width,u=e.height,c=e.style,f=void 0===c?{}:c,d=e.visible,p=void 0===d||d,h=e.events,v=void 0===h?{}:h,y=e.labels,b=void 0===y?{}:y,m=e.title,g=void 0===m?{}:m;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,{svgNode:n,coordinateSystem:o,x:i,y:s,width:l,height:u,style:f,visible:p,events:v,labels:b,title:g,isHorizontal:!1})}return t=a,n=[{key:"getNormalizedLabelsOptions",value:function(e){var t=e.interval,n=void 0===t?50:t,o=e.unit,i=void 0===o?"hPa":o,r=function(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Nu);return Du(Vu(a.prototype),"getNormalizedLabelsOptions",this).call(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cu(Object(n),!0).forEach((function(t){Bu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({interval:n,unit:i},r))}},{key:"drawLabels",value:function(e){var t=this,n=e.svgNode,o=e.min,i=void 0===o?Math.ceil(this.coordinateSystem.getPByXY(0,this.height)/this._labelsOptions.interval)*this._labelsOptions.interval:o,r=e.max,s=void 0===r?Math.floor(this.coordinateSystem.getPByXY(0,0)/this._labelsOptions.interval)*this._labelsOptions.interval:r,l=e.getTextByInterval,u=void 0===l?function(e){return Number.parseFloat(e).toFixed(t._labelsOptions.decimalPlaces)}:l,c=e.getPositionByInterval,f=void 0===c?function(e){return t.height-t.coordinateSystem.getYByXP(0,e)}:c;Du(Vu(a.prototype),"drawLabels",this).call(this,{svgNode:n,min:i,max:s,getTextByInterval:u,getPositionByInterval:f})}}],n&&Iu(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(yu);const Fu=Gu;function Yu(e){return Yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yu(e)}var zu=["interval","unit","prefix"];function Xu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Hu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qu(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ku(){return Ku="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=Uu(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ku.apply(this,arguments)}function Uu(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Wu(e)););return e}function $u(e,t){return $u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$u(e,t)}function Zu(e,t){if(t&&("object"===Yu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Wu(e){return Wu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wu(e)}var Ju=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$u(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Wu(o);if(i){var n=Wu(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Zu(this,e)});function a(e){var t,n=e.svgNode,o=void 0===n?void 0:n,i=e.coordinateSystem,s=e.x,l=e.y,u=e.width,c=e.height,f=e.style,d=void 0===f?{}:f,p=e.visible,h=void 0===p||p,v=e.events,y=void 0===v?{}:v,b=e.labels,m=void 0===b?{}:b,g=e.title,w=void 0===g?{}:g,_=e.windspeedMax,P=void 0===_?O(150):_;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this,{svgNode:o,coordinateSystem:i,x:s,y:l,width:u,height:c,style:d,visible:h,events:y,labels:m,title:w}))._windspeedMax=P,t.init(),t}return t=a,n=[{key:"windspeedMax",get:function(){return this._windspeedMax},set:function(e){var t=this._windspeedMax;this._windspeedMax=e,this._windspeedMax!=t&&this.onCoordinateSystemChange()}},{key:"getNormalizedLabelsOptions",value:function(e){var t=e.interval,n=void 0===t?O(50):t,o=e.unit,i=void 0===o?"kn":o,r=e.prefix,s=void 0===r?" kn":r,l=function(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,zu);return Ku(Wu(a.prototype),"getNormalizedLabelsOptions",this).call(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xu(Object(n),!0).forEach((function(t){Hu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({interval:n,unit:i,prefix:s},l))}},{key:"drawLabels",value:function(e){var t=this,n=e.svgNode,o=e.min,i=void 0===o?0:o,r=e.max,s=void 0===r?this._windspeedMax:r,l=e.getTextByInterval,u=void 0===l?function(e){switch(t._labelsOptions.unit){case"m/s":return Number.parseFloat(e).toFixed(t._labelsOptions.decimalPlaces);case"kn":return w(e).toFixed(t._labelsOptions.decimalPlaces);default:return m(e).toFixed(t._labelsOptions.decimalPlaces)}}:l,c=e.getPositionByInterval,f=void 0===c?function(e){return t.width*e/t._windspeedMax}:c;Ku(Wu(a.prototype),"drawLabels",this).call(this,{svgNode:n,min:i,max:s,getTextByInterval:u,getPositionByInterval:f})}}],n&&qu(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(yu);const Qu=Ju;function ec(e){return ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ec(e)}var tc=["svgNode","coordinateSystem","x","y","width","height","style","visible","events","hoverLabels"];function nc(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function oc(e,t){return oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oc(e,t)}function ic(e,t){if(t&&("object"===ec(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function rc(e){return rc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rc(e)}var ac=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oc(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=rc(o);if(i){var n=rc(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ic(this,e)});function a(e){var t,n=e.renderTo,o=void 0===n?void 0:n,i=e.width,s=void 0===i?void 0:i,l=e.height,u=void 0===l?void 0:l,c=e.coordinateSystem,f=void 0===c?{}:c,d=e.diagram,p=void 0===d?{}:d,h=e.windbarbsProfile,v=void 0===h?{}:h,y=e.windspeedProfile,b=void 0===y?{}:y,m=e.windspeedProfileAxis,g=void 0===m?{}:m,w=e.hodograph,O=void 0===w?{}:w,_=e.xAxis,P=void 0===_?{}:_,S=e.yAxis,j=void 0===S?{}:S;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=r.call(this,{renderTo:o,width:s,height:u}),p=lc(p),v=lc(v),b=lc(b),g=lc(g),O=lc(O),P=lc(P),j=lc(j);var T=.05*t.svgNode.width();return void 0===P.width&&void 0===p.width&&void 0===v.width&&void 0===b.width?(j.width=.1*(t.svgNode.width()-2*T),p.width=.7*(t.svgNode.width()-2*T),v.width=.2*(t.svgNode.width()-2*T)*1/3,b.width=.2*(t.svgNode.width()-2*T)*2/3):void 0===p.width?p.width=t.svgNode.width()-2*T-v.width-b.width:void 0===v.width&&void 0===b.width&&(v.width=1*(t.svgNode.width()-2*T-p.width)/3,b.width=2*(t.svgNode.width()-2*T-p.width)/3),void 0===j.x&&void 0===p.x&&void 0===v.x&&void 0===b.x?(j.x=T,p.x=j.x+j.width,v.x=p.x+p.width,b.x=v.x+v.width):void 0===p.x?p.x=v.x-v.width:void 0===v.x&&void 0===b.x&&(v.x=p.x+p.width,b.x=v.x+v.width),void 0===P.height&&(P.height=.06*t.svgNode.height()),void 0===p.height&&(p.height=t.svgNode.height()-P.height-2*T),void 0===j.height&&(j.height=p.height),void 0===v.height&&(v.height=p.height),void 0===b.height&&(b.height=p.height),void 0===p.y&&(p.y=T),void 0===j.y&&(j.y=p.y),void 0===v.y&&(v.y=p.y),void 0===b.y&&(b.y=p.y),void 0===P.width&&(P.width=p.width),void 0===P.x&&(P.x=p.x),void 0===P.y&&(P.y=p.y+p.height),void 0===P.height&&(P.height=T),void 0===g.width&&(g.width=b.width),void 0===g.height&&(g.height=T),void 0===g.x&&(g.x=b.x),void 0===g.y&&(g.y=b.y+b.height),void 0===O.x&&(O.x=p.x),void 0===O.y&&(O.y=p.y),void 0===O.width&&(O.width=.4*Math.min(p.width,p.height)),void 0===O.height&&(O.height=O.width),t.diagram=new bl(p),t.appendPlotArea(t.diagram),t.yAxis=new Gu(j),t.appendPlotArea(t.yAxis),t.xAxis=new xu(P),t.appendPlotArea(t.xAxis),t.windbarbsProfile=new Sl(v),t.appendPlotArea(t.windbarbsProfile),t.windspeedProfile=new Vl(b),t.windspeedProfile.on("prebuild:background",(function(e){e.node.rect(t.windspeedProfile.width,t.windspeedProfile.height).fill({color:"white"}).stroke({color:"black",width:1})})),t.appendPlotArea(t.windspeedProfile),t.windspeedProfileAxis=new Ju(g),t.appendPlotArea(t.windspeedProfileAxis),t.hodograph=new tu(O),t.hodograph.on("prebuild:background",(function(e){e.node.rect(t.hodograph.width-2,t.hodograph.height-2).move(1,1).fill({color:"white"}).stroke({color:"black",width:1})})),t.appendPlotArea(t.hodograph),void 0===f.type&&(f.type="skewTlogP"),f.width=p.width,f.height=p.height,t._coordinateSystem,t.coordinateSystem="stueve"==f.type?new ms(f):"emagram"==f.type?new Ss(f):new Rs(f),t}return t=a,(n=[{key:"coordinateSystem",get:function(){return this._coordinateSystem},set:function(e){this._coordinateSystem=e,this.exchangeCoordinateSystem(this._coordinateSystem)}},{key:"getDiagramPlotArea",value:function(){return this.diagram}}])&&nc(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(as);const sc=ac;function lc(e){var t=e.svgNode,n=void 0===t?void 0:t,o=e.coordinateSystem,i=void 0===o?void 0:o,r=e.x,a=void 0===r?void 0:r,s=e.y,l=void 0===s?void 0:s,u=e.width,c=void 0===u?void 0:u,f=e.height,d=void 0===f?void 0:f,p=e.style,h=void 0===p?{}:p,v=e.visible,y=void 0===v||v,b=e.events,m=void 0===b?{}:b,g=e.hoverLabels,w=void 0===g?{}:g,O=function(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,tc);return O.svgNode=n,O.coordinateSystem=i,O.x=a,O.y=l,O.width=c,O.height=d,O.style=h,O.visible=y,O.events=m,O.hoverLabels=w,O}function uc(e){return uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uc(e)}function cc(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function fc(e,t){return fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fc(e,t)}function dc(e,t){if(t&&("object"===uc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function pc(e){return pc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pc(e)}var hc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fc(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=pc(o);if(i){var n=pc(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return dc(this,e)});function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=r.call(this)).imgNode=void 0,e.thermodynamicDiagram=void 0,e.resourceNode=void 0,e}return t=a,n=[{key:"onInit",value:function(){void 0!==this.parentNode&&(this.resourceNode=W()(this.parentNode),this.resourceNode.empty())}},{key:"onChangeVisibleResource",value:function(){if(void 0!==this.resourceNode){var e=this.container.visibleResource;if("url"in e)void 0!==this.thermodynamicDiagram&&(this.thermodynamicDiagram=void 0,this.resourceNode.empty()),void 0===this.imgNode&&(this.resourceNode.empty(),this.imgNode=W()("<img>"),this.resourceNode.append(this.imgNode)),this.imgNode.attr("src",e.url),this.imgNode.css({"max-width":"100%"});else if("sounding"in e){void 0!==this.imgNode&&(this.imgNode=void 0,this.resourceNode.empty()),void 0===this.thermodynamicDiagram&&(this.thermodynamicDiagram=new sc({renderTo:this.resourceNode}));var t=!1;this.thermodynamicDiagram.soundings.forEach((function(n){n.getSounding()===e.sounding?(t=!0,n.visible(!0)):n.visible(!1)})),t||this.thermodynamicDiagram.addSounding(e.sounding)}else this.imgNode=void 0,this.resourceNode.empty()}}}],n&&cc(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Fr);function vc(e){return vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vc(e)}function yc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function bc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mc(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function gc(){return gc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=wc(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},gc.apply(this,arguments)}function wc(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Pc(e)););return e}function Oc(e,t){return Oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oc(e,t)}function _c(e,t){if(t&&("object"===vc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Pc(e){return Pc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pc(e)}var Sc={addEventFunctions:B},jc={Animation:te,Visualisation:he,makeTimeTextCallbackFunction:function(e){return function(t,n){var o=e.utc(t);return void 0!==this.options.outputTimezone&&("local"==this.options.outputTimezone?o.local():o.tz(this.options.outputTimezone)),o.format(n)}},animation:{ToggleButton:ce,insertFrequencyInput:ne,insertFrequencyRange:oe,insertFrequencyButtonGroup:function(e,t){var n=t.animation,o=t.frequencies,i=t.btnGroupClass,r=void 0===i?"btn-group":i,a=t.btnClass,s=void 0===a?"btn btn-primary":a,l=t.suffix,u=void 0===l?"fps":l,c=W()("<div>").addClass(r);(o=o||[]).forEach((function(e){c.append(W()("<button>").addClass(s).data("frequency",e).text(e+" "+u).click((function(){return n.setImageFrequency(e)})))}));var f=function(){c.children("button").removeClass("active").each((function(){W()(this).data("frequency")==n.getImageFrequency()&&W()(this).addClass("active")}))};return n.on("change:imageFrequency",f),f(),e.append(c),c},insertRestartPauseInput:ie,insertRestartPauseRange:function(e,t){var n=t.animation,o=t.pauses;o=(o=o||[1]).map((function(e){return Math.round(1e3*e)}));var i=W()("<input>").addClass("form-range").attr("type","range").attr("min",0).attr("max",o.length-1);i.on("change input",(function(){var e=i.val();e<o.length&&n.setRestartPause(o[e]/1e3)}));var r=function(){var e=o.indexOf(Math.round(1e3*n.getRestartPause()));e>-1&&i.val(e)};return n.on("change:imageFrequency",r),r(),e.append(i),i},insertRestartPauseButtonGroup:function(e,t){var n=t.animation,o=t.pauses,i=t.btnGroupClass,r=void 0===i?"btn-group":i,a=t.btnClass,s=void 0===a?"btn btn-primary":a,l=t.suffix,u=void 0===l?"s":l,c=W()("<div>").addClass(r);(o=o||[]).forEach((function(e){c.append(W()("<button>").addClass(s).data("pause",e).text(e+" "+u).click((function(){return n.setRestartPause(e)})))}));var f=function(){c.children("button").removeClass("active").each((function(){W()(this).data("pause")==n.getRestartPause()&&W()(this).addClass("active")}))};return n.on("change:restartPause",f),f(),e.append(c),c}},visualisation:{Text:Pe,Slider:Ee,bsButtons:Me,bsDropdown:$e}},Tc={Collection:tt,Map:Je,map:{MapOL:$t,MapLL:tn},Resource:ct,resource:{GeoJSON:mn,GeoJSONTile:In,Image:qn,OSM:oo,Vector:pn,VectorTile:En},ResourceCollection:mt,Tooltip:It,Type:_t,TypeCollection:Rt},kc={BootstrapTooltip:bo},xc={Variable:ri,TimeVariable:di,VariableCollection:Ti,Node:Vi,Resource:Hi,resource:{Image:Qi,Sounding:mr},Resources:Tr,NWPResources:Ir,Container:ta,Display:Fr,display:{Simple:hc,SelectNavigation:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oc(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Pc(o);if(i){var n=Pc(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _c(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.ignoreVariableCollections,o=void 0===n?[]:n,i=t.selectCaption,s=void 0!==i&&i,l=t.navigationClass,u=void 0===l?void 0:l,c=t.selectDivClass,f=void 0===c?void 0:c,d=t.selectClass,p=void 0===d?void 0:d;return bc(this,a),(e=r.call(this)).options={ignoreVariableCollections:new Set(o),selectCaption:s,navigationClass:u,selectDivClass:f,selectClass:p},e.navigationNode=void 0,e.selectNodes=new Map,e}return t=a,n=[{key:"onInit",value:function(){var e=this;void 0!==this.parentNode&&(this.navigationNode=W()("<div>").addClass(this.options.navigationClass),this.resourceNode=W()("<div>"),W()(this.parentNode).empty().append(this.navigationNode,this.resourceNode),void 0!==this.modelviewer&&this.modelviewer.resources.variableCollections.filter((function(t){return!e.options.ignoreVariableCollections.has(t)&&t.count>0})).forEach((function(t){return e._appendSelectNode(t)})),this._changeSelected())}},{key:"onChangeVisibleResource",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.variable;gc(Pc(a.prototype),"onChangeVisibleResource",this).call(this,{variable:t}),this._changeSelected()}},{key:"onAppendVariable",value:function(e){this.selectNodes.has(e.variableCollection)?this._appendOptionNode(this.selectNodes.get(e.variableCollection),e):this._appendSelectNode(e.variableCollection),this._changeSelected()}},{key:"_appendSelectNode",value:function(e){var t=this,n=W()("<select>").addClass(this.options.selectClass);if(n.on("change",(function(){var o=e.getItemById(n.val());t.container.exchangeDisplayVariable=[o]})),this.options.selectCaption){var o=W()("<option>").text(e.name).attr("disabled","disabled").prop("selected","selected");n.append(o)}e.variables.forEach((function(e){t._appendOptionNode(n,e)})),this.navigationNode.append(W()("<div>").addClass(this.options.selectDivClass).append(n)),this.selectNodes.set(e,n)}},{key:"_appendOptionNode",value:function(e,t){var n=W()("<option>").attr("value",t.id).text(t.name).addClass(this.options.optionsClass);e.append(n)}},{key:"_changeSelected",value:function(){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return yc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(this.selectNodes.keys());try{for(t.s();!(e=t.n()).done;){var n=e.value;if(this.selectNodes.has(n)){var o=this.container.visibleResource.getVariableByVariableCollection(n);this.selectNodes.get(n).val(o.id)}}}catch(e){t.e(e)}finally{t.f()}}}],n&&mc(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(hc)}},Ec={Parcel:rr},Rc={CoordinateSystem:cs,coordinateSystem:{StueveDiagram:ms,Emagram:Ss,SkewTlogPDiagram:Rs},DiagramSounding:Fa,PlotAltitudeDataArea:rl,Hodograph:tu,TDDiagram:bl,functions:{drawWindbarbInto:ba},WindbarbsProfile:Sl,WindspeedProfile:Vl,axes:{xAxis:Eu,yAxis:Fu,WindspeedProfileAxis:Qu}}})(),meteoJS=o})();
//# sourceMappingURL=meteoJS.min.js.map