@drayman/elements 1.4.25 → 1.4.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/datepicker/main.js +1 -1
- package/dist/grid/main.js +1 -1
- package/dist/nebula/3rdpartylicenses.txt +0 -41
- package/dist/nebula/main.js +1 -1
- package/dist/number-field/main.js +1 -1
- package/dist/picasso/3rdpartylicenses.txt +465 -0
- package/dist/picasso/favicon.ico +0 -0
- package/dist/picasso/main.js +1 -0
- package/dist/picasso/polyfills.js +1 -0
- package/dist/picasso/styles.css +0 -0
- package/dist/types/grid/src/app/models/grid-options.d.ts +9 -2
- package/dist/types/picasso/src/app/models/picasso-options.d.ts +3 -0
- package/package.json +3 -3
- package/types/index.d.ts +1 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,(function(e){return t[e]}).bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}({0:function(t,e,n){t.exports=n("zUnb")},"4Xgz":function(t,e,n){"use strict";var i,r,s;"undefined"!=typeof window&&window,r=[n("MXs6")],void 0===(s="function"==typeof(i=function(t){var e=function(){var e,n={},i=[];function r(t){t||(t=document.documentElement);var e=window.getComputedStyle(t,null).fontSize;return parseFloat(e)||16}function s(t,e){var n=e.split(/\d/),i=n[n.length-1];switch(e=parseFloat(e),i){case"px":return e;case"em":return e*r(t);case"rem":return e*r();case"vw":return e*document.documentElement.clientWidth/100;case"vh":return e*document.documentElement.clientHeight/100;case"vmin":case"vmax":var s=document.documentElement.clientWidth/100,o=document.documentElement.clientHeight/100;return e*(0,Math["vmin"===i?"min":"max"])(s,o);default:return e}}function o(t,e){var i,r,o,a,l,c,u,h;this.element=t;var d=["min-width","min-height","max-width","max-height"];this.call=function(){for(i in o=function(t){if(!t.getBoundingClientRect)return{width:t.offsetWidth,height:t.offsetHeight};var e=t.getBoundingClientRect();return{width:Math.round(e.width),height:Math.round(e.height)}}(this.element),c={},n[e])n[e].hasOwnProperty(i)&&(a=s(this.element,(r=n[e][i]).value),l="width"===r.property?o.width:o.height,u="","min"===r.mode&&l>=a&&(u+=r.value),"max"===r.mode&&l<=a&&(u+=r.value),c[h=r.mode+"-"+r.property]||(c[h]=""),u&&-1===(" "+c[h]+" ").indexOf(" "+u+" ")&&(c[h]+=" "+u));for(var t in d)d.hasOwnProperty(t)&&(c[d[t]]?this.element.setAttribute(d[t],c[d[t]].substr(1)):this.element.removeAttribute(d[t]))}}function a(e,n){e.elementQueriesSetupInformation||(e.elementQueriesSetupInformation=new o(e,n)),e.elementQueriesSensor||(e.elementQueriesSensor=new t(e,(function(){e.elementQueriesSetupInformation.call()})))}function l(t,r,s,o){if(void 0===n[t]){n[t]=[];var a=i.length;e.innerHTML+="\n"+t+" {animation: 0.1s element-queries;}",e.innerHTML+="\n"+t+" > .resize-sensor {min-width: "+a+"px;}",i.push(t)}n[t].push({mode:r,property:s,value:o})}function c(t){var e;if(document.querySelectorAll&&(e=t?t.querySelectorAll.bind(t):document.querySelectorAll.bind(document)),e||"undefined"==typeof $$||(e=$$),e||"undefined"==typeof jQuery||(e=jQuery),!e)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return e}function u(e){var n=[],i=[],r=[],s=0,o=-1,a=[];for(var l in e.children)if(e.children.hasOwnProperty(l)&&e.children[l].tagName&&"img"===e.children[l].tagName.toLowerCase()){n.push(e.children[l]);var c=e.children[l].getAttribute("min-width")||e.children[l].getAttribute("data-min-width"),u=e.children[l].getAttribute("data-src")||e.children[l].getAttribute("url");r.push(u),i.push({minWidth:c}),c?e.children[l].style.display="none":(s=n.length-1,e.children[l].style.display="block")}function h(){var t,l=!1;for(t in n)n.hasOwnProperty(t)&&i[t].minWidth&&e.offsetWidth>i[t].minWidth&&(l=t);if(l||(l=s),o!==l)if(a[l])n[o].style.display="none",n[l].style.display="block",o=l;else{var c=new Image;c.onload=function(){n[l].src=r[l],n[o].style.display="none",n[l].style.display="block",a[l]=!0,o=l},c.src=r[l]}else n[l].src=r[l]}o=s,e.resizeSensorInstance=new t(e,h),h()}var h=/,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:min|max)-(?:width|height)[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/gim,d=/\[[\s\t]*?(min|max)-(width|height)[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/gim;function f(t){var e,n,i,r;for(t=t.replace(/'/g,'"');null!==(e=h.exec(t));)for(n=e[1]+e[3],i=e[2];null!==(r=d.exec(i));)l(n,r[1],r[2],r[3])}function p(t){var e="";if(t)if("string"==typeof t)-1===(t=t.toLowerCase()).indexOf("min-width")&&-1===t.indexOf("max-width")||f(t);else for(var n=0,i=t.length;n<i;n++)1===t[n].type?-1!==(e=t[n].selectorText||t[n].cssText).indexOf("min-height")||-1!==e.indexOf("max-height")?f(e):-1===e.indexOf("min-width")&&-1===e.indexOf("max-width")||f(e):4===t[n].type?p(t[n].cssRules||t[n].rules):3===t[n].type&&t[n].styleSheet.hasOwnProperty("cssRules")&&p(t[n].styleSheet.cssRules)}var y=!1;this.init=function(){var n="animationstart";void 0!==document.documentElement.style.webkitAnimationName?n="webkitAnimationStart":void 0!==document.documentElement.style.MozAnimationName?n="mozanimationstart":void 0!==document.documentElement.style.OAnimationName&&(n="oanimationstart"),document.body.addEventListener(n,(function(e){var n=e.target,r=n&&window.getComputedStyle(n,null),s=r&&r.getPropertyValue("animation-name");if(s&&-1!==s.indexOf("element-queries")){n.elementQueriesSensor=new t(n,(function(){n.elementQueriesSetupInformation&&n.elementQueriesSetupInformation.call()}));var o=window.getComputedStyle(n.resizeSensor,null).getPropertyValue("min-width");o=parseInt(o.replace("px","")),a(e.target,i[o])}})),y||((e=document.createElement("style")).type="text/css",e.innerHTML="[responsive-image] > img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img {width: 100%;}",e.innerHTML+="\n@keyframes element-queries { 0% { visibility: inherit; } }",document.getElementsByTagName("head")[0].appendChild(e),y=!0);for(var r=0,s=document.styleSheets.length;r<s;r++)try{document.styleSheets[r].href&&0===document.styleSheets[r].href.indexOf("file://")&&console.warn("CssElementQueries: unable to parse local css files, "+document.styleSheets[r].href),p(document.styleSheets[r].cssRules||document.styleSheets[r].rules||document.styleSheets[r].cssText)}catch(o){}!function(){for(var t=c()("[data-responsive-image],[responsive-image]"),e=0,n=t.length;e<n;e++)u(t[e])}()},this.findElementQueriesElements=function(t){!function(t){var e=c(t);for(var i in n)if(n.hasOwnProperty(i))for(var r=e(i,t),s=0,o=r.length;s<o;s++)a(r[s],i)}(t)},this.update=function(){this.init()}};return e.update=function(){e.instance.update()},e.detach=function(t){t.elementQueriesSetupInformation?(t.elementQueriesSensor.detach(),delete t.elementQueriesSetupInformation,delete t.elementQueriesSensor):t.resizeSensorInstance&&(t.resizeSensorInstance.detach(),delete t.resizeSensorInstance)},e.init=function(){e.instance||(e.instance=new e),e.instance.init()},e.findElementQueriesElements=function(t){e.instance.findElementQueriesElements(t)},e.listen=function(){!function(t){if(document.addEventListener)document.addEventListener("DOMContentLoaded",t,!1);else if(/KHTML|WebKit|iCab/i.test(navigator.userAgent))var e=setInterval((function(){/loaded|complete/i.test(document.readyState)&&(t(),clearInterval(e))}),10);else window.onload=t}(e.init)},e})?i.apply(e,r):i)||(t.exports=s)},"5vqC":function(t,e,n){t.exports={ResizeSensor:n("MXs6"),ElementQueries:n("4Xgz")}},"9HG0":function(t,e,n){var i;!function(r,s,o,a){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],u=s.createElement("div"),h=Math.round,d=Math.abs,f=Date.now;function p(t,e,n){return setTimeout(_(t,n),e)}function y(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}function g(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function m(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=r.console&&(r.console.warn||r.console.log);return s&&s.call(r.console,i,n),t.apply(this,arguments)}}l="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var v=m((function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===a)&&(t[i[r]]=e[i[r]]),r++;return t}),"extend","Use `assign`."),x=m((function(t,e){return v(t,e,!0)}),"merge","Use `assign`.");function b(t,e,n){var i,r=e.prototype;(i=t.prototype=Object.create(r)).constructor=t,i._super=r,n&&l(i,n)}function _(t,e){return function(){return t.apply(e,arguments)}}function w(t,e){return"function"==typeof t?t.apply(e&&e[0]||a,e):t}function k(t,e){return t===a?e:t}function S(t,e,n){g(T(e),(function(e){t.addEventListener(e,n,!1)}))}function M(t,e,n){g(T(e),(function(e){t.removeEventListener(e,n,!1)}))}function E(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function C(t,e){return t.indexOf(e)>-1}function T(t){return t.trim().split(/\s+/g)}function A(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function R(t){return Array.prototype.slice.call(t,0)}function N(t,e,n){for(var i=[],r=[],s=0;s<t.length;){var o=e?t[s][e]:t[s];A(r,o)<0&&i.push(t[s]),r[s]=o,s++}return n&&(i=e?i.sort((function(t,n){return t[e]>n[e]})):i.sort()),i}function O(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),s=0;s<c.length;){if((i=(n=c[s])?n+r:e)in t)return i;s++}return a}var I=1;function P(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}var D="ontouchstart"in r,j=O(r,"PointerEvent")!==a,z=D&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),F="touch",q="mouse",L=["x","y"],V=["clientX","clientY"];function H(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){w(t.options.enable,[t])&&n.handler(e)},this.init()}function B(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,s=1&e&&i-r==0,o=12&e&&i-r==0;n.isFirst=!!s,n.isFinal=!!o,s&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=W(e)),r>1&&!n.firstMultiple?n.firstMultiple=W(e):1===r&&(n.firstMultiple=!1);var s=n.firstInput,o=n.firstMultiple,l=o?o.center:s.center,c=e.center=$(i);e.timeStamp=f(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=K(l,c),e.distance=Q(l,c),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},s=t.prevInput||{};1!==e.eventType&&4!==s.eventType||(r=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}(n,e),e.offsetDirection=Y(e.deltaX,e.deltaY);var u,h,p=U(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=d(p.x)>d(p.y)?p.x:p.y,e.scale=o?(u=o.pointers,Q((h=i)[0],h[1],V)/Q(u[0],u[1],V)):1,e.rotation=o?function(t,e){return K(e[1],e[0],V)+K(t[1],t[0],V)}(o.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,s,o=t.lastInterval||e,l=e.timeStamp-o.timeStamp;if(8!=e.eventType&&(l>25||o.velocity===a)){var c=e.deltaX-o.deltaX,u=e.deltaY-o.deltaY,h=U(l,c,u);i=h.x,r=h.y,n=d(h.x)>d(h.y)?h.x:h.y,s=Y(c,u),t.lastInterval=e}else n=o.velocity,i=o.velocityX,r=o.velocityY,s=o.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=s}(n,e);var y=t.element;E(e.srcEvent.target,y)&&(y=e.srcEvent.target),e.target=y}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function W(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:h(t.pointers[n].clientX),clientY:h(t.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:e,center:$(e),deltaX:t.deltaX,deltaY:t.deltaY}}function $(t){var e=t.length;if(1===e)return{x:h(t[0].clientX),y:h(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:h(n/e),y:h(i/e)}}function U(t,e,n){return{x:e/t||0,y:n/t||0}}function Y(t,e){return t===e?1:d(t)>=d(e)?t<0?2:4:e<0?8:16}function Q(t,e,n){n||(n=L);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function K(t,e,n){return n||(n=L),180*Math.atan2(e[n[1]]-t[n[1]],e[n[0]]-t[n[0]])/Math.PI}H.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(P(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&M(this.element,this.evEl,this.domHandler),this.evTarget&&M(this.target,this.evTarget,this.domHandler),this.evWin&&M(P(this.element),this.evWin,this.domHandler)}};var X={mousedown:1,mousemove:2,mouseup:4},Z="mousedown",G="mousemove mouseup";function J(){this.evEl=Z,this.evWin=G,this.pressed=!1,H.apply(this,arguments)}b(J,H,{handler:function(t){var e=X[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:q,srcEvent:t}))}});var tt={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},et={2:F,3:"pen",4:q,5:"kinect"},nt="pointerdown",it="pointermove pointerup pointercancel";function rt(){this.evEl=nt,this.evWin=it,H.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(nt="MSPointerDown",it="MSPointerMove MSPointerUp MSPointerCancel"),b(rt,H,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=tt[i],s=et[t.pointerType]||t.pointerType,o=s==F,a=A(e,t.pointerId,"pointerId");1&r&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):12&r&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),n&&e.splice(a,1))}});var st={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ot="touchstart",at="touchstart touchmove touchend touchcancel";function lt(){this.evTarget=ot,this.evWin=at,this.started=!1,H.apply(this,arguments)}function ct(t,e){var n=R(t.touches),i=R(t.changedTouches);return 12&e&&(n=N(n.concat(i),"identifier",!0)),[n,i]}b(lt,H,{handler:function(t){var e=st[t.type];if(1===e&&(this.started=!0),this.started){var n=ct.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:F,srcEvent:t})}}});var ut={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ht="touchstart touchmove touchend touchcancel";function dt(){this.evTarget=ht,this.targetIds={},H.apply(this,arguments)}function ft(t,e){var n=R(t.touches),i=this.targetIds;if(3&e&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,s,o=R(t.changedTouches),a=[],l=this.target;if(s=n.filter((function(t){return E(t.target,l)})),1===e)for(r=0;r<s.length;)i[s[r].identifier]=!0,r++;for(r=0;r<o.length;)i[o[r].identifier]&&a.push(o[r]),12&e&&delete i[o[r].identifier],r++;return a.length?[N(s.concat(a),"identifier",!0),a]:void 0}function pt(){H.apply(this,arguments);var t=_(this.handler,this);this.touch=new dt(this.manager,t),this.mouse=new J(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function yt(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,gt.call(this,e)):12&t&>.call(this,e)}function gt(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout((function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)}),2500)}}function mt(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],s=Math.abs(e-r.x),o=Math.abs(n-r.y);if(s<=25&&o<=25)return!0}return!1}b(dt,H,{handler:function(t){var e=ut[t.type],n=ft.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:F,srcEvent:t})}}),b(pt,H,{handler:function(t,e,n){var i=n.pointerType==q;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(n.pointerType==F)yt.call(this,e,n);else if(i&&mt.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var vt=O(u.style,"touchAction"),xt=vt!==a,bt="compute",_t="auto",wt="manipulation",kt="none",St="pan-x",Mt="pan-y",Et=function(){if(!xt)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){t[n]=!e||r.CSS.supports("touch-action",n)})),t}();function Ct(t,e){this.manager=t,this.set(e)}Ct.prototype={set:function(t){t==bt&&(t=this.compute()),xt&&this.manager.element.style&&Et[t]&&(this.manager.element.style[vt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return g(this.manager.recognizers,(function(e){w(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(C(t,kt))return kt;var e=C(t,St),n=C(t,Mt);return e&&n?kt:e||n?e?St:Mt:C(t,wt)?wt:_t}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=C(i,kt)&&!Et.none,s=C(i,Mt)&&!Et["pan-y"],o=C(i,St)&&!Et["pan-x"];if(r&&1===t.pointers.length&&t.distance<2&&t.deltaTime<250)return;if(!o||!s)return r||s&&6&n||o&&24&n?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var Tt=32;function At(t){this.options=l({},this.defaults,t||{}),this.id=I++,this.manager=null,this.options.enable=k(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Rt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function Nt(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function Ot(t,e){var n=e.manager;return n?n.get(t):t}function It(){At.apply(this,arguments)}function Pt(){It.apply(this,arguments),this.pX=null,this.pY=null}function Dt(){It.apply(this,arguments)}function jt(){At.apply(this,arguments),this._timer=null,this._input=null}function zt(){It.apply(this,arguments)}function Ft(){It.apply(this,arguments)}function qt(){At.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Lt(t,e){return(e=e||{}).recognizers=k(e.recognizers,Lt.defaults.preset),new Vt(t,e)}function Vt(t,e){this.options=l({},Lt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new(this.options.inputClass||(j?rt:z?dt:D?pt:J))(this,B),this.touchAction=new Ct(this,this.options.touchAction),Ht(this,!0),g(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function Ht(t,e){var n,i=t.element;i.style&&(g(t.options.cssProps,(function(r,s){n=O(i.style,s),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}At.prototype={defaults:{},set:function(t){return l(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(y(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Ot(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return y(t,"dropRecognizeWith",this)||(t=Ot(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(y(t,"requireFailure",this))return this;var e=this.requireFail;return-1===A(e,t=Ot(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(y(t,"dropRequireFailure",this))return this;t=Ot(t,this);var e=A(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n<8&&i(e.options.event+Rt(n)),i(e.options.event),t.additionalEvent&&i(t.additionalEvent),n>=8&&i(e.options.event+Rt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Tt},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=l({},t);if(!w(this.options.enable,[this,e]))return this.reset(),void(this.state=Tt);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},b(It,At,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=6&e,r=this.attrTest(t);return i&&(8&n||!r)?16|e:i||r?4&n?8|e:2&e?4|e:2:Tt}}),b(Pt,It,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push(Mt),24&t&&e.push(St),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,s=t.deltaX,o=t.deltaY;return r&e.direction||(6&e.direction?(r=0===s?1:s<0?2:4,n=s!=this.pX,i=Math.abs(t.deltaX)):(r=0===o?1:o<0?8:16,n=o!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return It.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Nt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),b(Dt,It,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[kt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){1!==t.scale&&(t.additionalEvent=this.options.event+(t.scale<1?"in":"out")),this._super.emit.call(this,t)}}),b(jt,At,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[_t]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=p((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return Tt},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),b(zt,It,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[kt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),b(Ft,It,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Pt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:24&n&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&d(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=Nt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),b(qt,At,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[wt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(i&&r&&n){if(4!=t.eventType)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<e.interval,o=!this.pCenter||Q(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,o&&s?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=p((function(){this.state=8,this.tryEmit()}),e.interval,this),2):8}return Tt},failTimeout:function(){return this._timer=p((function(){this.state=Tt}),this.options.interval,this),Tt},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Lt.VERSION="2.0.7",Lt.defaults={domEvents:!1,touchAction:bt,enable:!0,inputTarget:null,inputClass:null,preset:[[zt,{enable:!1}],[Dt,{enable:!1},["rotate"]],[Ft,{direction:6}],[Pt,{direction:6},["swipe"]],[qt],[qt,{event:"doubletap",taps:2},["tap"]],[jt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Vt.prototype={set:function(t){return l(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var s=0;s<i.length;)n=i[s],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),s++}},get:function(t){if(t instanceof At)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(y(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(y(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=A(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return g(T(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(t!==a){var n=this.handlers;return g(T(t),(function(t){e?n[t]&&n[t].splice(A(n[t],e),1):delete n[t]})),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=s.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&Ht(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(Lt,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Tt,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Vt,Input:H,TouchAction:Ct,TouchInput:dt,MouseInput:J,PointerEventInput:rt,TouchMouseInput:pt,SingleTouchInput:lt,Recognizer:At,AttrRecognizer:It,Tap:qt,Pan:Pt,Swipe:Ft,Pinch:Dt,Rotate:zt,Press:jt,on:S,off:M,each:g,merge:x,extend:v,assign:l,inherit:b,bindFn:_,prefixed:O}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=Lt,(i=(function(){return Lt}).call(e,n,e,t))===a||(t.exports=i)}(window,document)},MXs6:function(t,e,n){"use strict";var i,r;"undefined"!=typeof window&&window,void 0===(r="function"==typeof(i=function(){if("undefined"==typeof window)return null;var t="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||function(e){return t.setTimeout(e,20)},n=t.cancelAnimationFrame||t.mozCancelAnimationFrame||t.webkitCancelAnimationFrame||function(e){t.clearTimeout(e)};function i(t,e){var n=Object.prototype.toString.call(t),i="[object Array]"===n||"[object NodeList]"===n||"[object HTMLCollection]"===n||"[object Object]"===n||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements,r=0,s=t.length;if(i)for(;r<s;r++)e(t[r]);else e(t)}function r(t){if(!t.getBoundingClientRect)return{width:t.offsetWidth,height:t.offsetHeight};var e=t.getBoundingClientRect();return{width:Math.round(e.width),height:Math.round(e.height)}}function s(t,e){Object.keys(e).forEach((function(n){t.style[n]=e[n]}))}var o=function(t,a){var l=0;function c(){var t,e,n=[];this.add=function(t){n.push(t)},this.call=function(i){for(t=0,e=n.length;t<e;t++)n[t].call(this,i)},this.remove=function(i){var r=[];for(t=0,e=n.length;t<e;t++)n[t]!==i&&r.push(n[t]);n=r},this.length=function(){return n.length}}i(t,(function(t){!function(t,n){if(t)if(t.resizedAttached)t.resizedAttached.add(n);else{t.resizedAttached=new c,t.resizedAttached.add(n),t.resizeSensor=document.createElement("div"),t.resizeSensor.dir="ltr",t.resizeSensor.className="resize-sensor";var i={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},o={position:"absolute",left:"0px",top:"0px",transition:"0s"};s(t.resizeSensor,i);var a=document.createElement("div");a.className="resize-sensor-expand",s(a,i);var u=document.createElement("div");s(u,o),a.appendChild(u);var h=document.createElement("div");h.className="resize-sensor-shrink",s(h,i);var d=document.createElement("div");s(d,o),s(d,{width:"200%",height:"200%"}),h.appendChild(d),t.resizeSensor.appendChild(a),t.resizeSensor.appendChild(h),t.appendChild(t.resizeSensor);var f=window.getComputedStyle(t),p=f?f.getPropertyValue("position"):null;"absolute"!==p&&"relative"!==p&&"fixed"!==p&&"sticky"!==p&&(t.style.position="relative");var y=!1,g=0,m=r(t),v=0,x=0,b=!0;l=0;var _=function(){if(b){if(0===t.offsetWidth&&0===t.offsetHeight)return void(l||(l=e((function(){l=0,_()}))));b=!1}var n,i;i=t.offsetHeight,u.style.width=(n=t.offsetWidth)+10+"px",u.style.height=i+10+"px",a.scrollLeft=n+10,a.scrollTop=i+10,h.scrollLeft=n+10,h.scrollTop=i+10};t.resizeSensor.resetSensor=_;var w=function(){g=0,y&&(v=m.width,x=m.height,t.resizedAttached&&t.resizedAttached.call(m))},k=function(){m=r(t),(y=m.width!==v||m.height!==x)&&!g&&(g=e(w)),_()},S=function(t,e,n){t.attachEvent?t.attachEvent("on"+e,n):t.addEventListener(e,n)};S(a,"scroll",k),S(h,"scroll",k),l=e((function(){l=0,_()}))}}(t,a)})),this.detach=function(e){l||(n(l),l=0),o.detach(t,e)},this.reset=function(){t.resizeSensor.resetSensor()}};if(o.reset=function(t){i(t,(function(t){t.resizeSensor.resetSensor()}))},o.detach=function(t,e){i(t,(function(t){t&&(t.resizedAttached&&"function"==typeof e&&(t.resizedAttached.remove(e),t.resizedAttached.length())||t.resizeSensor&&(t.contains(t.resizeSensor)&&t.removeChild(t.resizeSensor),delete t.resizeSensor,delete t.resizedAttached))}))},"undefined"!=typeof MutationObserver){var a=new MutationObserver((function(t){for(var e in t)if(t.hasOwnProperty(e))for(var n=t[e].addedNodes,i=0;i<n.length;i++)n[i].resizeSensor&&o.reset(n[i])}));document.addEventListener("DOMContentLoaded",(function(t){a.observe(document.body,{childList:!0,subtree:!0})}))}return o})?i.call(e,n,e,t):i)||(t.exports=r)},oEtN:function(t,e){function n(t){return t&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function i(t){return t}function r(t,e){const r=(e=e||{}).delimiter||".",s=e.maxDepth,o=e.transformKey||i,a={};return function t(i,l,c){c=c||1,Object.keys(i).forEach((function(u){const h=i[u],d=e.safe&&Array.isArray(h),f=Object.prototype.toString.call(h),p=n(h),y="[object Object]"===f||"[object Array]"===f,g=l?l+r+o(u):o(u);if(!d&&!p&&y&&Object.keys(h).length&&(!e.maxDepth||c<s))return t(h,g,c+1);a[g]=h}))}(t),a}t.exports=r,r.flatten=r,r.unflatten=function t(e,s){const o=(s=s||{}).delimiter||".",a=s.overwrite||!1,l=s.transformKey||i,c={};if(n(e)||"[object Object]"!==Object.prototype.toString.call(e))return e;function u(t){const e=Number(t);return isNaN(e)||-1!==t.indexOf(".")||s.object?t:e}return e=Object.keys(e).reduce((function(t,n){const i=Object.prototype.toString.call(e[n]);return"[object Object]"!==i&&"[object Array]"!==i||function(t){const e=Object.prototype.toString.call(t);return!t||("[object Array]"===e?!t.length:"[object Object]"===e?!Object.keys(t).length:void 0)}(e[n])?(t[n]=e[n],t):function(t,e,n){return Object.keys(n).reduce((function(e,i){return e[t+o+i]=n[i],e}),e)}(n,t,r(e[n],s))}),{}),Object.keys(e).forEach((function(n){const i=n.split(o).map(l);let r=u(i.shift()),h=u(i[0]),d=c;for(;void 0!==h;){if("__proto__"===r)return;const t=Object.prototype.toString.call(d[r]),e="[object Object]"===t||"[object Array]"===t;if(!a&&!e&&void 0!==d[r])return;(a&&!e||!a&&null==d[r])&&(d[r]="number"!=typeof h||s.object?{}:[]),d=d[r],i.length>0&&(r=u(i.shift()),h=u(i[0]))}d[r]=t(e[n],s)})),c}},zUnb:function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.r(e);let r=!1;const s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else r&&console.log("RxJS: Back to a better error behavior. Thank you. <3");r=t},get useDeprecatedSynchronousErrorHandling(){return r}};function o(t){setTimeout(()=>{throw t},0)}const a={closed:!0,next(t){},error(t){if(s.useDeprecatedSynchronousErrorHandling)throw t;o(t)},complete(){}},l=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))();function c(t){return null!==t&&"object"==typeof t}const u=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let h=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:r,_unsubscribe:s,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;t<n.length;++t)n[t].remove(this);if(i(s)){r&&(this._unsubscribe=void 0);try{s.call(this)}catch(a){e=a instanceof u?d(a.errors):[a]}}if(l(o)){let t=-1,n=o.length;for(;++t<n;){const n=o[t];if(c(n))try{n.unsubscribe()}catch(a){e=e||[],a instanceof u?e=e.concat(d(a.errors)):e.push(a)}}}if(e)throw new u(e)}add(e){let n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){const e=n;n=new t,n._subscriptions=[e]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}let{_parentOrParents:i}=n;if(null===i)n._parentOrParents=this;else if(i instanceof t){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}const r=this._subscriptions;return null===r?this._subscriptions=[n]:r.push(n),n}remove(t){const e=this._subscriptions;if(e){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}}}return t.EMPTY=function(t){return t.closed=!0,t}(new t),t})();function d(t){return t.reduce((t,e)=>t.concat(e instanceof u?e.errors:e),[])}const f=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())();class p extends h{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a;break;case 1:if(!t){this.destination=a;break}if("object"==typeof t){t instanceof p?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new y(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new y(this,t,e,n)}}[f](){return this}static create(t,e,n){const i=new p(t,e,n);return i.syncErrorThrowable=!1,i}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class y extends p{constructor(t,e,n,r){let s;super(),this._parentSubscriber=t;let o=this;i(e)?s=e:e&&(s=e.next,n=e.error,r=e.complete,e!==a&&(o=Object.create(e),i(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=s,this._error=n,this._complete=r}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;s.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=s;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):o(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;o(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw n;o(n)}}__tryOrSetError(t,e,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(i){return s.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):(o(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const g=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")();function m(t){return t}let v=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:i}=this,r=function(t,e,n){if(t){if(t instanceof p)return t;if(t[f])return t[f]()}return t||e||n?new p(t,e,n):new p(a)}(t,e,n);if(r.add(i?i.call(r,this.source):this.source||s.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),s.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r}_trySubscribe(t){try{return this._subscribe(t)}catch(e){s.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:i}=t;if(e||i)return!1;t=n&&n instanceof p?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=x(e))((e,n)=>{let i;i=this.subscribe(e=>{try{t(e)}catch(r){n(r),i&&i.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[g](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?m:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=x(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function x(t){if(t||(t=s.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const b=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class _ extends h{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class w extends p{constructor(t){super(t),this.destination=t}}let k=(()=>{class t extends v{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[f](){return new w(this)}lift(t){const e=new S(this,this);return e.operator=t,e}next(t){if(this.closed)throw new b;if(!this.isStopped){const{observers:e}=this,n=e.length,i=e.slice();for(let r=0;r<n;r++)i[r].next(t)}}error(t){if(this.closed)throw new b;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,n=e.length,i=e.slice();for(let r=0;r<n;r++)i[r].error(t);this.observers.length=0}complete(){if(this.closed)throw new b;this.isStopped=!0;const{observers:t}=this,e=t.length,n=t.slice();for(let i=0;i<e;i++)n[i].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new b;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new b;return this.hasError?(t.error(this.thrownError),h.EMPTY):this.isStopped?(t.complete(),h.EMPTY):(this.observers.push(t),new _(this,t))}asObservable(){const t=new v;return t.source=this,t}}return t.create=(t,e)=>new S(t,e),t})();class S extends k{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):h.EMPTY}}function M(t){return t&&"function"==typeof t.schedule}function E(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new C(t,e))}}class C{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new T(t,this.project,this.thisArg))}}class T extends p{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}const A=t=>e=>{for(let n=0,i=t.length;n<i&&!e.closed;n++)e.next(t[n]);e.complete()};function R(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}const N=R(),O=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function I(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const P=t=>{if(t&&"function"==typeof t[g])return i=t,t=>{const e=i[g]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(O(t))return A(t);if(I(t))return n=t,t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,o),t);if(t&&"function"==typeof t[N])return e=t,t=>{const n=e[N]();for(;;){let e;try{e=n.next()}catch(i){return t.error(i),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t};{const e=c(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,n,i};function D(t,e){return new v(n=>{const i=new h;let r=0;return i.add(e.schedule((function(){r!==t.length?(n.next(t[r++]),n.closed||i.add(this.schedule())):n.complete()}))),i})}function j(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[g]}(t))return function(t,e){return new v(n=>{const i=new h;return i.add(e.schedule(()=>{const r=t[g]();i.add(r.subscribe({next(t){i.add(e.schedule(()=>n.next(t)))},error(t){i.add(e.schedule(()=>n.error(t)))},complete(){i.add(e.schedule(()=>n.complete()))}}))})),i})}(t,e);if(I(t))return function(t,e){return new v(n=>{const i=new h;return i.add(e.schedule(()=>t.then(t=>{i.add(e.schedule(()=>{n.next(t),i.add(e.schedule(()=>n.complete()))}))},t=>{i.add(e.schedule(()=>n.error(t)))}))),i})}(t,e);if(O(t))return D(t,e);if(function(t){return t&&"function"==typeof t[N]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new v(n=>{const i=new h;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(e.schedule(()=>{r=t[N](),i.add(e.schedule((function(){if(n.closed)return;let t,e;try{const n=r.next();t=n.value,e=n.done}catch(i){return void n.error(i)}e?n.complete():(n.next(t),this.schedule())})))})),i})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof v?t:new v(P(t))}class z extends p{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class F extends p{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function q(t,e){if(!e.closed)return t instanceof v?t.subscribe(e):P(t)(e)}class L{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new V(t,this.project,this.concurrent))}}class V extends F{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this.active++,this._innerSub(e)}_innerSub(t){const e=new z(this),n=this.destination;n.add(e);const i=q(t,e);i!==e&&n.add(i)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t){this.destination.next(t)}notifyComplete(){const t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function H(t,e){return e?D(t,e):new v(A(t))}function B(...t){let e=Number.POSITIVE_INFINITY,n=null,i=t[t.length-1];return M(i)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof i&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof v?t[0]:function(t=Number.POSITIVE_INFINITY){return function t(e,n,i=Number.POSITIVE_INFINITY){return"function"==typeof n?r=>r.pipe(t((t,i)=>j(e(t,i)).pipe(E((e,r)=>n(t,e,i,r))),i)):("number"==typeof n&&(i=n),t=>t.lift(new L(e,i)))}(m,t)}(e)(H(t,n))}function W(){return function(t){return t.lift(new $(t))}}class ${constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const i=new U(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r}}class U extends p{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}class Y extends v{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new h,t.add(this.source.subscribe(new K(this.getSubject(),this))),t.closed&&(this._connection=null,t=h.EMPTY)),t}refCount(){return W()(this)}}const Q=(()=>{const t=Y.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class K extends w{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function X(){return new k}function Z(t){return{toString:t}.toString()}const G="__parameters__";function J(t,e,n){return Z(()=>{const i=function(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}(e);function r(...t){if(this instanceof r)return i.apply(this,t),this;const e=new r(...t);return n.annotation=e,n;function n(t,n,i){const r=t.hasOwnProperty(G)?t[G]:Object.defineProperty(t,G,{value:[]})[G];for(;r.length<=i;)r.push(null);return(r[i]=r[i]||[]).push(e),t}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}const tt=J("Inject",t=>({token:t})),et=J("Optional"),nt=J("Self"),it=J("SkipSelf");var rt=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});function st(t){for(let e in t)if(t[e]===st)return e;throw Error("Could not find renamed property on target object.")}function ot(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function at(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function lt(t){return ct(t,t[ht])||ct(t,t[pt])}function ct(t,e){return e&&e.token===t?e:null}function ut(t){return t&&(t.hasOwnProperty(dt)||t.hasOwnProperty(yt))?t[dt]:null}const ht=st({"\u0275prov":st}),dt=st({"\u0275inj":st}),ft=st({"\u0275provFallback":st}),pt=st({ngInjectableDef:st}),yt=st({ngInjectorDef:st});function gt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(gt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function mt(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const vt=st({__forward_ref__:st});function xt(t){return t.__forward_ref__=xt,t.toString=function(){return gt(this())},t}function bt(t){return"function"==typeof(e=t)&&e.hasOwnProperty(vt)&&e.__forward_ref__===xt?t():t;var e}const _t="undefined"!=typeof globalThis&&globalThis,wt="undefined"!=typeof window&&window,kt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,St="undefined"!=typeof global&&global,Mt=_t||St||wt||kt,Et=st({"\u0275cmp":st}),Ct=st({"\u0275dir":st}),Tt=st({"\u0275pipe":st}),At=st({"\u0275mod":st}),Rt=st({"\u0275loc":st}),Nt=st({"\u0275fac":st}),Ot=st({__NG_ELEMENT_ID__:st});class It{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ot({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return"InjectionToken "+this._desc}}const Pt=new It("INJECTOR",-1),Dt={},jt=/\n/gm,zt="__source",Ft=st({provide:String,useValue:st});let qt,Lt=void 0;function Vt(t){const e=Lt;return Lt=t,e}function Ht(t){const e=qt;return qt=t,e}function Bt(t,e=rt.Default){if(void 0===Lt)throw new Error("inject() must be called from an injection context");return null===Lt?$t(t,void 0,e):Lt.get(t,e&rt.Optional?null:void 0,e)}function Wt(t,e=rt.Default){return(qt||Bt)(bt(t),e)}function $t(t,e,n){const i=lt(t);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&rt.Optional)return null;if(void 0!==e)return e;throw new Error(`Injector: NOT_FOUND [${gt(t)}]`)}function Ut(t){const e=[];for(let n=0;n<t.length;n++){const i=bt(t[n]);if(Array.isArray(i)){if(0===i.length)throw new Error("Arguments array must have arguments.");let t=void 0,n=rt.Default;for(let e=0;e<i.length;e++){const r=i[e];r instanceof et||"Optional"===r.ngMetadataName||r===et?n|=rt.Optional:r instanceof it||"SkipSelf"===r.ngMetadataName||r===it?n|=rt.SkipSelf:r instanceof nt||"Self"===r.ngMetadataName||r===nt?n|=rt.Self:t=r instanceof tt||r===tt?r.token:r}e.push(Wt(t,n))}else e.push(Wt(i))}return e}class Yt{get(t,e=Dt){if(e===Dt){const e=new Error(`NullInjectorError: No provider for ${gt(t)}!`);throw e.name="NullInjectorError",e}return e}}class Qt{}function Kt(t,e){t.forEach(t=>Array.isArray(t)?Kt(t,e):e(t))}function Xt(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function Zt(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Gt(t,e,n){let i=te(t,e);return i>=0?t[1|i]=n:(i=~i,function(t,e,n,i){let r=t.length;if(r==e)t.push(n,i);else if(1===r)t.push(i,t[0]),t[0]=n;else{for(r--,t.push(t[r-1],t[r]);r>e;)t[r]=t[r-2],r--;t[e]=n,t[e+1]=i}}(t,i,e,n)),i}function Jt(t,e){const n=te(t,e);if(n>=0)return t[1|n]}function te(t,e){return function(t,e,n){let i=0,r=t.length>>1;for(;r!==i;){const n=i+(r-i>>1),s=t[n<<1];if(e===s)return n<<1;s>e?r=n:i=n+1}return~(r<<1)}(t,e)}var ee=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),ne=function(t){return t[t.Emulated=0]="Emulated",t[t.Native=1]="Native",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({});const ie={},re=[];let se=0;function oe(t){return Z(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===ee.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||re,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||ne.Emulated,id:"c",styles:t.styles||re,_:null,setInput:null,schemas:t.schemas||null,tView:null},i=t.directives,r=t.features,s=t.pipes;return n.id+=se++,n.inputs=he(t.inputs,e),n.outputs=he(t.outputs),r&&r.forEach(t=>t(n)),n.directiveDefs=i?()=>("function"==typeof i?i():i).map(ae):null,n.pipeDefs=s?()=>("function"==typeof s?s():s).map(le):null,n})}function ae(t){return fe(t)||function(t){return t[Ct]||null}(t)}function le(t){return function(t){return t[Tt]||null}(t)}const ce={};function ue(t){const e={type:t.type,bootstrap:t.bootstrap||re,declarations:t.declarations||re,imports:t.imports||re,exports:t.exports||re,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&Z(()=>{ce[t.id]=t.type}),e}function he(t,e){if(null==t)return ie;const n={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),n[r]=i,e&&(e[r]=s)}return n}const de=oe;function fe(t){return t[Et]||null}function pe(t,e){return t.hasOwnProperty(Nt)?t[Nt]:null}function ye(t,e){const n=t[At]||null;if(!n&&!0===e)throw new Error(`Type ${gt(t)} does not have '\u0275mod' property.`);return n}const ge=20,me=10;function ve(t){return Array.isArray(t)&&"object"==typeof t[1]}function xe(t){return Array.isArray(t)&&!0===t[1]}function be(t){return 0!=(8&t.flags)}function _e(t){return 2==(2&t.flags)}function we(t){return 1==(1&t.flags)}function ke(t){return null!==t.template}function Se(t){return 0!=(512&t[2])}class Me{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function Ee(){return Ce}function Ce(t){return t.type.prototype.ngOnChanges&&(t.setInput=Ae),Te}function Te(){const t=Re(this),e=null==t?void 0:t.current;if(e){const n=t.previous;if(n===ie)t.previous=e;else for(let t in e)n[t]=e[t];t.current=null,this.ngOnChanges(e)}}function Ae(t,e,n,i){const r=Re(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:ie,current:null}),s=r.current||(r.current={}),o=r.previous,a=this.declaredInputs[n],l=o[a];s[a]=new Me(l&&l.currentValue,e,o===ie),t[i]=e}function Re(t){return t.__ngSimpleChanges__||null}Ee.ngInherit=!0;let Ne=void 0;function Oe(t){return!!t.listen}const Ie={createRenderer:(t,e)=>void 0!==Ne?Ne:"undefined"!=typeof document?document:void 0};function Pe(t){for(;Array.isArray(t);)t=t[0];return t}function De(t,e){return Pe(e[t.index])}function je(t,e){return t.data[e+ge]}function ze(t,e){const n=e[t];return ve(n)?n:n[0]}function Fe(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function qe(t){return 4==(4&t[2])}function Le(t){return 128==(128&t[2])}function Ve(t,e){return null===t||null==e?null:t[e]}function He(t){t[18]=0}function Be(t,e){t[5]+=e;let n=t,i=t[3];for(;null!==i&&(1===e&&1===n[5]||-1===e&&0===n[5]);)i[5]+=e,n=i,i=i[3]}const We={lFrame:an(null),bindingsEnabled:!0,checkNoChangesMode:!1};function $e(){return We.bindingsEnabled}function Ue(){return We.lFrame.lView}function Ye(){return We.lFrame.tView}function Qe(){return We.lFrame.previousOrParentTNode}function Ke(t,e){We.lFrame.previousOrParentTNode=t,We.lFrame.isParent=e}function Xe(){return We.lFrame.isParent}function Ze(){return We.checkNoChangesMode}function Ge(t){We.checkNoChangesMode=t}function Je(t,e){const n=We.lFrame;n.bindingIndex=n.bindingRootIndex=t,tn(e)}function tn(t){We.lFrame.currentDirectiveIndex=t}function en(){return We.lFrame.currentQueryIndex}function nn(t){We.lFrame.currentQueryIndex=t}function rn(t,e){const n=on();We.lFrame=n,n.previousOrParentTNode=e,n.lView=t}function sn(t,e){const n=on(),i=t[1];We.lFrame=n,n.previousOrParentTNode=e,n.lView=t,n.tView=i,n.contextLView=t,n.bindingIndex=i.bindingStartIndex}function on(){const t=We.lFrame,e=null===t?null:t.child;return null===e?an(t):e}function an(t){const e={previousOrParentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null};return null!==t&&(t.child=e),e}function ln(){const t=We.lFrame;return We.lFrame=t.parent,t.previousOrParentTNode=null,t.lView=null,t}const cn=ln;function un(){const t=ln();t.isParent=!0,t.tView=null,t.selectedIndex=0,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function hn(){return We.lFrame.selectedIndex}function dn(t){We.lFrame.selectedIndex=t}function fn(t,e){for(let n=e.directiveStart,i=e.directiveEnd;n<i;n++){const e=t.data[n].type.prototype,{ngAfterContentInit:i,ngAfterContentChecked:r,ngAfterViewInit:s,ngAfterViewChecked:o,ngOnDestroy:a}=e;i&&(t.contentHooks||(t.contentHooks=[])).push(-n,i),r&&((t.contentHooks||(t.contentHooks=[])).push(n,r),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(n,r)),s&&(t.viewHooks||(t.viewHooks=[])).push(-n,s),o&&((t.viewHooks||(t.viewHooks=[])).push(n,o),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(n,o)),null!=a&&(t.destroyHooks||(t.destroyHooks=[])).push(n,a)}}function pn(t,e,n){mn(t,e,3,n)}function yn(t,e,n,i){(3&t[2])===n&&mn(t,e,n,i)}function gn(t,e){let n=t[2];(3&n)===e&&(n&=2047,n+=1,t[2]=n)}function mn(t,e,n,i){const r=null!=i?i:-1;let s=0;for(let o=void 0!==i?65535&t[18]:0;o<e.length;o++)if("number"==typeof e[o+1]){if(s=e[o],null!=i&&s>=i)break}else e[o]<0&&(t[18]+=65536),(s<r||-1==r)&&(vn(t,n,e,o),t[18]=(4294901760&t[18])+o+2),o++}function vn(t,e,n,i){const r=n[i]<0,s=n[i+1],o=t[r?-n[i]:n[i]];r?t[2]>>11<t[18]>>16&&(3&t[2])===e&&(t[2]+=2048,s.call(o)):s.call(o)}class xn{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function bn(t,e,n){const i=Oe(t);let r=0;for(;r<n.length;){const s=n[r];if("number"==typeof s){if(0!==s)break;r++;const o=n[r++],a=n[r++],l=n[r++];i?t.setAttribute(e,a,l,o):e.setAttributeNS(o,a,l)}else{const o=s,a=n[++r];_n(o)?i&&t.setProperty(e,o,a):i?t.setAttribute(e,o,a):e.setAttribute(o,a),r++}}return r}function _n(t){return 64===t.charCodeAt(0)}function wn(t,e){if(null===e||0===e.length);else if(null===t||0===t.length)t=e.slice();else{let n=-1;for(let i=0;i<e.length;i++){const r=e[i];"number"==typeof r?n=r:0===n||kn(t,n,r,null,-1===n||2===n?e[++i]:null)}}return t}function kn(t,e,n,i,r){let s=0,o=t.length;if(-1===e)o=-1;else for(;s<t.length;){const n=t[s++];if("number"==typeof n){if(n===e){o=-1;break}if(n>e){o=s-1;break}}}for(;s<t.length;){const e=t[s];if("number"==typeof e)break;if(e===n){if(null===i)return void(null!==r&&(t[s+1]=r));if(i===t[s+1])return void(t[s+2]=r)}s++,null!==i&&s++,null!==r&&s++}-1!==o&&(t.splice(o,0,e),s=o+1),t.splice(s++,0,n),null!==i&&t.splice(s++,0,i),null!==r&&t.splice(s++,0,r)}function Sn(t){return-1!==t}function Mn(t){return 32767&t}function En(t){return t>>16}function Cn(t,e){let n=En(t),i=e;for(;n>0;)i=i[15],n--;return i}function Tn(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():function(t){return"string"==typeof t?t:null==t?"":""+t}(t)}const An=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Mt))();function Rn(t){return{name:"document",target:t.ownerDocument}}function Nn(t){return t instanceof Function?t():t}let On=!0;function In(t){const e=On;return On=t,e}let Pn=0;function Dn(t,e){const n=zn(t,e);if(-1!==n)return n;const i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,jn(i.data,t),jn(e,null),jn(i.blueprint,null));const r=Fn(t,e),s=t.injectorIndex;if(Sn(r)){const t=Mn(r),n=Cn(r,e),i=n[1].data;for(let r=0;r<8;r++)e[s+r]=n[t+r]|i[t+r]}return e[s+8]=r,s}function jn(t,e){t.push(0,0,0,0,0,0,0,0,e)}function zn(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null==e[t.injectorIndex+8]?-1:t.injectorIndex}function Fn(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=e[6],i=1;for(;n&&-1===n.injectorIndex;)n=(e=e[15])?e[6]:null,i++;return n?n.injectorIndex|i<<16:-1}function qn(t,e,n){!function(t,e,n){let i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(Ot)&&(i=n[Ot]),null==i&&(i=n[Ot]=Pn++);const r=255&i,s=1<<r,o=64&r,a=32&r,l=e.data;128&r?o?a?l[t+7]|=s:l[t+6]|=s:a?l[t+5]|=s:l[t+4]|=s:o?a?l[t+3]|=s:l[t+2]|=s:a?l[t+1]|=s:l[t]|=s}(t,e,n)}function Ln(t,e,n,i=rt.Default,r){if(null!==t){const r=function(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(Ot)?t[Ot]:void 0;return"number"==typeof e&&e>0?255&e:e}(n);if("function"==typeof r){rn(e,t);try{const t=r();if(null!=t||i&rt.Optional)return t;throw new Error(`No provider for ${Tn(n)}!`)}finally{cn()}}else if("number"==typeof r){if(-1===r)return new Yn(t,e);let s=null,o=zn(t,e),a=-1,l=i&rt.Host?e[16][6]:null;for((-1===o||i&rt.SkipSelf)&&(a=-1===o?Fn(t,e):e[o+8],Un(i,!1)?(s=e[1],o=Mn(a),e=Cn(a,e)):o=-1);-1!==o;){a=e[o+8];const t=e[1];if($n(r,o,t.data)){const t=Hn(o,e,n,s,i,l);if(t!==Vn)return t}Un(i,e[1].data[o+8]===l)&&$n(r,o,e)?(s=t,o=Mn(a),e=Cn(a,e)):o=-1}}}if(i&rt.Optional&&void 0===r&&(r=null),0==(i&(rt.Self|rt.Host))){const t=e[9],s=Ht(void 0);try{return t?t.get(n,r,i&rt.Optional):$t(n,r,i&rt.Optional)}finally{Ht(s)}}if(i&rt.Optional)return r;throw new Error(`NodeInjector: NOT_FOUND [${Tn(n)}]`)}const Vn={};function Hn(t,e,n,i,r,s){const o=e[1],a=o.data[t+8],l=Bn(a,o,n,null==i?_e(a)&&On:i!=o&&3===a.type,r&rt.Host&&s===a);return null!==l?Wn(e,o,l,a):Vn}function Bn(t,e,n,i,r){const s=t.providerIndexes,o=e.data,a=1048575&s,l=t.directiveStart,c=s>>20,u=r?a+c:t.directiveEnd;for(let h=i?a:a+c;h<u;h++){const t=o[h];if(h<l&&n===t||h>=l&&t.type===n)return h}if(r){const t=o[l];if(t&&ke(t)&&t.type===n)return l}return null}function Wn(t,e,n,i){let r=t[n];const s=e.data;if(r instanceof xn){const o=r;if(o.resolving)throw new Error("Circular dep for "+Tn(s[n]));const a=In(o.canSeeViewProviders);let l;o.resolving=!0,o.injectImpl&&(l=Ht(o.injectImpl)),rn(t,i);try{r=t[n]=o.factory(void 0,s,t,i),e.firstCreatePass&&n>=i.directiveStart&&function(t,e,n){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=e.type.prototype;if(i){const i=Ce(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,i)}r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,r),s&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,s))}(n,s[n],e)}finally{o.injectImpl&&Ht(l),In(a),o.resolving=!1,cn()}}return r}function $n(t,e,n){const i=64&t,r=32&t;let s;return s=128&t?i?r?n[e+7]:n[e+6]:r?n[e+5]:n[e+4]:i?r?n[e+3]:n[e+2]:r?n[e+1]:n[e],!!(s&1<<t)}function Un(t,e){return!(t&rt.Self||t&rt.Host&&e)}class Yn{constructor(t,e){this._tNode=t,this._lView=e}get(t,e){return Ln(this._tNode,this._lView,t,void 0,e)}}function Qn(t){return t.ngDebugContext}function Kn(t){return t.ngOriginalError}function Xn(t,...e){t.error(...e)}class Zn{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),i=function(t){return t.ngErrorLogger||Xn}(t);i(this._console,"ERROR",t),e&&i(this._console,"ORIGINAL ERROR",e),n&&i(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?Qn(t)?Qn(t):this._findContext(Kn(t)):null}_findOriginalError(t){let e=Kn(t);for(;e&&Kn(e);)e=Kn(e);return e}}function Gn(t){return t instanceof class{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"}}?t.changingThisBreaksApplicationSecurity:t}let Jn=!0,ti=!1;function ei(){return ti=!0,Jn}function ni(t,e){t.__ngContext__=e}function ii(t){throw new Error("Multiple components match node with tagname "+t.tagName)}function ri(){throw new Error("Cannot mix multi providers and regular providers")}function si(t,e,n){let i=t.length;for(;;){const r=t.indexOf(e,n);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){const n=e.length;if(r+n===i||t.charCodeAt(r+n)<=32)return r}n=r+1}}const oi="ng-template";function ai(t,e,n){let i=0;for(;i<t.length;){let r=t[i++];if(n&&"class"===r){if(r=t[i],-1!==si(r.toLowerCase(),e,0))return!0}else if(1===r){for(;i<t.length&&"string"==typeof(r=t[i++]);)if(r.toLowerCase()===e)return!0;return!1}}return!1}function li(t){return 0===t.type&&t.tagName!==oi}function ci(t,e,n){return e===(0!==t.type||n?t.tagName:oi)}function ui(t,e,n){let i=4;const r=t.attrs||[],s=function(t){for(let n=0;n<t.length;n++)if(3===(e=t[n])||4===e||6===e)return n;var e;return t.length}(r);let o=!1;for(let a=0;a<e.length;a++){const l=e[a];if("number"!=typeof l){if(!o)if(4&i){if(i=2|1&i,""!==l&&!ci(t,l,n)||""===l&&1===e.length){if(hi(i))return!1;o=!0}}else{const c=8&i?l:e[++a];if(8&i&&null!==t.attrs){if(!ai(t.attrs,c,n)){if(hi(i))return!1;o=!0}continue}const u=di(8&i?"class":l,r,li(t),n);if(-1===u){if(hi(i))return!1;o=!0;continue}if(""!==c){let t;t=u>s?"":r[u+1].toLowerCase();const e=8&i?t:null;if(e&&-1!==si(e,c,0)||2&i&&c!==t){if(hi(i))return!1;o=!0}}}}else{if(!o&&!hi(i)&&!hi(l))return!1;if(o&&hi(l))continue;o=!1,i=l|1&i}}return hi(i)||o}function hi(t){return 0==(1&t)}function di(t,e,n,i){if(null===e)return-1;let r=0;if(i||!n){let n=!1;for(;r<e.length;){const i=e[r];if(i===t)return r;if(3===i||6===i)n=!0;else{if(1===i||2===i){let t=e[++r];for(;"string"==typeof t;)t=e[++r];continue}if(4===i)break;if(0===i){r+=4;continue}}r+=n?1:2}return-1}return function(t,e){let n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){const i=t[n];if("number"==typeof i)return-1;if(i===e)return n;n++}return-1}(e,t)}function fi(t,e,n=!1){for(let i=0;i<e.length;i++)if(ui(t,e[i],n))return!0;return!1}function pi(t,e){return t?":not("+e.trim()+")":e}function yi(t){let e=t[0],n=1,i=2,r="",s=!1;for(;n<t.length;){let o=t[n];if("string"==typeof o)if(2&i){const e=t[++n];r+="["+o+(e.length>0?'="'+e+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""===r||hi(o)||(e+=pi(s,r),r=""),i=o,s=s||!hi(i);n++}return""!==r&&(e+=pi(s,r)),e}const gi={};function mi(t){const e=t[3];return xe(e)?e[3]:e}function vi(t){return bi(t[13])}function xi(t){return bi(t[4])}function bi(t){for(;null!==t&&!xe(t);)t=t[4];return t}function _i(t){wi(Ye(),Ue(),hn()+t,Ze())}function wi(t,e,n,i){if(!i)if(3==(3&e[2])){const i=t.preOrderCheckHooks;null!==i&&pn(e,i,n)}else{const i=t.preOrderHooks;null!==i&&yn(e,i,0,n)}dn(n)}function ki(t,e){return t<<17|e<<2}function Si(t){return t>>17&32767}function Mi(t){return 2|t}function Ei(t){return(131068&t)>>2}function Ci(t,e){return-131069&t|e<<2}function Ti(t){return 1|t}function Ai(t,e){const n=t.contentQueries;if(null!==n)for(let i=0;i<n.length;i+=2){const r=n[i],s=n[i+1];if(-1!==s){const n=t.data[s];nn(r),n.contentQueries(2,e[s],s)}}}function Ri(t,e,n){return Oe(e)?e.createElement(t,n):null===n?e.createElement(t):e.createElementNS(n,t)}function Ni(t,e,n,i,r,s,o,a,l,c){const u=e.blueprint.slice();return u[0]=r,u[2]=140|i,He(u),u[3]=u[15]=t,u[8]=n,u[10]=o||t&&t[10],u[11]=a||t&&t[11],u[12]=l||t&&t[12]||null,u[9]=c||t&&t[9]||null,u[6]=s,u[16]=2==e.type?t[16]:u,u}function Oi(t,e,n,i,r,s){const o=n+ge,a=t.data[o]||function(t,e,n,i,r,s){const o=Qe(),a=Xe(),l=a?o:o&&o.parent,c=t.data[n]=Hi(0,l&&l!==e?l:null,i,n,r,s);return null===t.firstChild&&(t.firstChild=c),o&&(!a||null!=o.child||null===c.parent&&2!==o.type?a||(o.next=c):o.child=c),c}(t,e,o,i,r,s);return Ke(a,!0),a}function Ii(t,e,n){sn(e,e[6]);try{const i=t.viewQuery;null!==i&&cr(1,i,n);const r=t.template;null!==r&&ji(t,e,r,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&Ai(t,e),t.staticViewQueries&&cr(2,t.viewQuery,n);const s=t.components;null!==s&&function(t,e){for(let n=0;n<e.length;n++)rr(t,e[n])}(e,s)}catch(i){throw t.firstCreatePass&&(t.incompleteFirstPass=!0),i}finally{e[2]&=-5,un()}}function Pi(t,e,n,i){const r=e[2];if(256==(256&r))return;sn(e,e[6]);const s=Ze();try{He(e),We.lFrame.bindingIndex=t.bindingStartIndex,null!==n&&ji(t,e,n,2,i);const o=3==(3&r);if(!s)if(o){const n=t.preOrderCheckHooks;null!==n&&pn(e,n,null)}else{const n=t.preOrderHooks;null!==n&&yn(e,n,0,null),gn(e,0)}if(function(t){for(let e=vi(t);null!==e;e=xi(e)){if(!e[2])continue;const t=e[9];for(let e=0;e<t.length;e++){const n=t[e],i=n[3];0==(1024&n[2])&&Be(i,1),n[2]|=1024}}}(e),function(t){for(let e=vi(t);null!==e;e=xi(e))for(let t=me;t<e.length;t++){const n=e[t],i=n[1];Le(n)&&Pi(i,n,i.template,n[8])}}(e),null!==t.contentQueries&&Ai(t,e),!s)if(o){const n=t.contentCheckHooks;null!==n&&pn(e,n)}else{const n=t.contentHooks;null!==n&&yn(e,n,1),gn(e,1)}!function(t,e){try{const n=t.expandoInstructions;if(null!==n){let i=t.expandoStartIndex,r=-1,s=-1;for(let t=0;t<n.length;t++){const o=n[t];"number"==typeof o?o<=0?(s=0-o,dn(s),i+=9+n[++t],r=i):i+=o:(null!==o&&(Je(i,r),o(2,e[r])),r++)}}}finally{dn(-1)}}(t,e);const a=t.components;null!==a&&function(t,e){for(let n=0;n<e.length;n++)ir(t,e[n])}(e,a);const l=t.viewQuery;if(null!==l&&cr(2,l,i),!s)if(o){const n=t.viewCheckHooks;null!==n&&pn(e,n)}else{const n=t.viewHooks;null!==n&&yn(e,n,2),gn(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),s||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,Be(e[3],-1))}finally{un()}}function Di(t,e,n,i){const r=e[10],s=!Ze(),o=qe(e);try{s&&!o&&r.begin&&r.begin(),o&&Ii(t,e,i),Pi(t,e,n,i)}finally{s&&!o&&r.end&&r.end()}}function ji(t,e,n,i,r){const s=hn();try{dn(-1),2&i&&e.length>ge&&wi(t,e,0,Ze()),n(i,r)}finally{dn(s)}}function zi(t,e,n){$e()&&(function(t,e,n,i){const r=n.directiveStart,s=n.directiveEnd;t.firstCreatePass||Dn(n,e),ni(i,e);const o=n.initialInputs;for(let a=r;a<s;a++){const i=t.data[a],s=ke(i);s&&Ji(e,n,i);const l=Wn(e,t,a,n);ni(l,e),null!==o&&tr(0,a-r,l,i,0,o),s&&(ze(n.index,e)[8]=l)}}(t,e,n,De(n,e)),128==(128&n.flags)&&function(t,e,n){const i=n.directiveStart,r=n.directiveEnd,s=t.expandoInstructions,o=t.firstCreatePass,a=n.index-ge,l=We.lFrame.currentDirectiveIndex;try{dn(a);for(let n=i;n<r;n++){const i=t.data[n],r=e[n];tn(n),null!==i.hostBindings||0!==i.hostVars||null!==i.hostAttrs?Yi(i,r):o&&s.push(null)}}finally{dn(-1),tn(l)}}(t,e,n))}function Fi(t,e,n=De){const i=e.localNames;if(null!==i){let r=e.index+1;for(let s=0;s<i.length;s+=2){const o=i[s+1],a=-1===o?n(e,t):t[o];t[r++]=a}}}function qi(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=Li(1,-1,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function Li(t,e,n,i,r,s,o,a,l,c){const u=ge+i,h=u+r,d=function(t,e){const n=[];for(let i=0;i<e;i++)n.push(i<t?null:gi);return n}(u,h),f="function"==typeof c?c():c;return d[1]={type:t,id:e,blueprint:d,template:n,queries:null,viewQuery:a,node:null,data:d.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:h,expandoInstructions:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof s?s():s,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:l,consts:f,incompleteFirstPass:!1}}function Vi(t,e,n,i){const r=hr(e);r.push(n),t.firstCreatePass&&function(t){return t.cleanup||(t.cleanup=[])}(t).push(i,r.length-1)}function Hi(t,e,n,i,r,s){return{type:n,index:i,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,tagName:r,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Bi(t,e,n){for(let i in t)if(t.hasOwnProperty(i)){const r=t[i];(n=null===n?{}:n).hasOwnProperty(i)?n[i].push(e,r):n[i]=[e,r]}return n}function Wi(t,e,n,i){let r=!1;if($e()){const s=function(t,e,n){const i=t.directiveRegistry;let r=null;if(i)for(let s=0;s<i.length;s++){const o=i[s];fi(n,o.selectors,!1)&&(r||(r=[]),qn(Dn(n,e),t,o.type),ke(o)?(2&n.flags&&ii(n),Ki(t,n),r.unshift(o)):r.push(o))}return r}(t,e,n),o=null===i?null:{"":-1};if(null!==s){let i=0;r=!0,Zi(n,t.data.length,s.length);for(let t=0;t<s.length;t++){const e=s[t];e.providersResolver&&e.providersResolver(e)}Qi(t,n,s.length);let a=!1,l=!1;for(let r=0;r<s.length;r++){const c=s[r];n.mergedAttrs=wn(n.mergedAttrs,c.hostAttrs),Gi(t,e,c),Xi(t.data.length-1,c,o),null!==c.contentQueries&&(n.flags|=8),null===c.hostBindings&&null===c.hostAttrs&&0===c.hostVars||(n.flags|=128);const u=c.type.prototype;!a&&(u.ngOnChanges||u.ngOnInit||u.ngDoCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n.index-ge),a=!0),l||!u.ngOnChanges&&!u.ngDoCheck||((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n.index-ge),l=!0),$i(t,c),i+=c.hostVars}!function(t,e){const n=e.directiveEnd,i=t.data,r=e.attrs,s=[];let o=null,a=null;for(let l=e.directiveStart;l<n;l++){const t=i[l],n=t.inputs,c=null===r||li(e)?null:er(n,r);s.push(c),o=Bi(n,l,o),a=Bi(t.outputs,l,a)}null!==o&&(o.hasOwnProperty("class")&&(e.flags|=16),o.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=s,e.inputs=o,e.outputs=a}(t,n),Ui(t,e,i)}o&&function(t,e,n){if(e){const i=t.localNames=[];for(let t=0;t<e.length;t+=2){const r=n[e[t+1]];if(null==r)throw new Error(`Export of name '${e[t+1]}' not found!`);i.push(e[t],r)}}}(n,i,o)}return n.mergedAttrs=wn(n.mergedAttrs,n.attrs),r}function $i(t,e){const n=t.expandoInstructions;n.push(e.hostBindings),0!==e.hostVars&&n.push(e.hostVars)}function Ui(t,e,n){for(let i=0;i<n;i++)e.push(gi),t.blueprint.push(gi),t.data.push(null)}function Yi(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function Qi(t,e,n){const i=ge-e.index,r=t.data.length-(1048575&e.providerIndexes);(t.expandoInstructions||(t.expandoInstructions=[])).push(i,r,n)}function Ki(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function Xi(t,e,n){if(n){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)n[e.exportAs[i]]=t;ke(e)&&(n[""]=t)}}function Zi(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}function Gi(t,e,n){t.data.push(n);const i=n.factory||(n.factory=pe(n.type)),r=new xn(i,ke(n),null);t.blueprint.push(r),e.push(r)}function Ji(t,e,n){const i=De(e,t),r=qi(n),s=t[10],o=sr(t,Ni(t,r,null,n.onPush?64:16,i,e,s,s.createRenderer(i,n)));t[e.index]=o}function tr(t,e,n,i,r,s){const o=s[e];if(null!==o){const t=i.setInput;for(let e=0;e<o.length;){const r=o[e++],s=o[e++],a=o[e++];null!==t?i.setInput(n,a,r,s):n[s]=a}}}function er(t,e){let n=null,i=0;for(;i<e.length;){const r=e[i];if(0!==r)if(5!==r){if("number"==typeof r)break;t.hasOwnProperty(r)&&(null===n&&(n=[]),n.push(r,t[r],e[i+1])),i+=2}else i+=2;else i+=4}return n}function nr(t,e,n,i){return new Array(t,!0,!1,e,null,0,i,n,null,null)}function ir(t,e){const n=ze(e,t);if(Le(n)){const t=n[1];80&n[2]?Pi(t,n,t.template,n[8]):n[5]>0&&function t(e){for(let i=vi(e);null!==i;i=xi(i))for(let e=me;e<i.length;e++){const n=i[e];if(1024&n[2]){const t=n[1];Pi(t,n,t.template,n[8])}else n[5]>0&&t(n)}const n=e[1].components;if(null!==n)for(let i=0;i<n.length;i++){const r=ze(n[i],e);Le(r)&&r[5]>0&&t(r)}}(n)}}function rr(t,e){const n=ze(e,t),i=n[1];!function(t,e){for(let n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])}(i,n),Ii(i,n,n[8])}function sr(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function or(t){for(;t;){t[2]|=64;const e=mi(t);if(Se(t)&&!e)return t;t=e}return null}function ar(t,e,n){const i=e[10];i.begin&&i.begin();try{Pi(t,e,t.template,n)}catch(r){throw dr(e,r),r}finally{i.end&&i.end()}}function lr(t){!function(t){for(let e=0;e<t.components.length;e++){const n=t.components[e],i=Fe(n),r=i[1];Di(r,i,r.template,n)}}(t[8])}function cr(t,e,n){nn(0),e(t,n)}const ur=(()=>Promise.resolve(null))();function hr(t){return t[7]||(t[7]=[])}function dr(t,e){const n=t[9],i=n?n.get(Zn,null):null;i&&i.handleError(e)}function fr(t,e,n,i,r){for(let s=0;s<n.length;){const o=n[s++],a=n[s++],l=e[o],c=t.data[o];null!==c.setInput?c.setInput(l,r,i,a):l[a]=r}}function pr(t,e){const n=e[3];return-1===t.index?xe(n)?n:null:n}function yr(t,e){const n=pr(t,e);return n?Er(e[11],n[7]):null}function gr(t,e,n,i,r){if(null!=i){let s,o=!1;xe(i)?s=i:ve(i)&&(o=!0,i=i[0]);const a=Pe(i);0===t&&null!==n?null==r?Sr(e,n,a):kr(e,n,a,r||null):1===t&&null!==n?kr(e,n,a,r||null):2===t?function(t,e,n){const i=Er(t,e);i&&function(t,e,n,i){Oe(t)?t.removeChild(e,n,i):e.removeChild(n)}(t,i,e,n)}(e,a,o):3===t&&e.destroyNode(a),null!=s&&function(t,e,n,i,r){const s=n[7];s!==Pe(n)&&gr(e,t,i,s,r);for(let o=me;o<n.length;o++){const r=n[o];Rr(r[1],r,t,e,i,s)}}(e,t,s,n,r)}}function mr(t,e,n,i){const r=yr(t.node,e);r&&Rr(t,e,e[11],n?1:2,r,i)}function vr(t,e){const n=t[9],i=n.indexOf(e);1024&e[2]&&Be(e[3],-1),n.splice(i,1)}function xr(t,e){if(t.length<=me)return;const n=me+e,i=t[n];if(i){const r=i[17];null!==r&&r!==t&&vr(r,i),e>0&&(t[n-1][4]=i[4]);const s=Zt(t,me+e);mr(i[1],i,!1,null);const o=s[19];null!==o&&o.detachView(s[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}function br(t,e){if(!(256&e[2])){const n=e[11];Oe(n)&&n.destroyNode&&Rr(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return wr(t[1],t);for(;e;){let n=null;if(ve(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)ve(e)&&wr(e[1],e),e=_r(e,t);null===e&&(e=t),ve(e)&&wr(e[1],e),n=e&&e[4]}e=n}}(e)}}function _r(t,e){let n;return ve(t)&&(n=t[6])&&2===n.type?pr(n,t):t[3]===e?null:t[3]}function wr(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let i=0;i<n.length;i+=2){const t=e[n[i]];if(!(t instanceof xn)){const e=n[i+1];if(Array.isArray(e))for(let n=0;n<e.length;n+=2)e[n+1].call(t[e[n]]);else e.call(t)}}}(t,e),function(t,e){const n=t.cleanup;if(null!==n){const t=e[7];for(let i=0;i<n.length-1;i+=2)if("string"==typeof n[i]){const r=n[i+1],s="function"==typeof r?r(e):Pe(e[r]),o=t[n[i+2]],a=n[i+3];"boolean"==typeof a?s.removeEventListener(n[i],o,a):a>=0?t[a]():t[-a].unsubscribe(),i+=2}else n[i].call(t[n[i+1]]);e[7]=null}}(t,e);const n=e[6];n&&3===n.type&&Oe(e[11])&&e[11].destroy();const i=e[17];if(null!==i&&xe(e[3])){i!==e[3]&&vr(i,e);const n=e[19];null!==n&&n.detachView(t)}}}function kr(t,e,n,i){Oe(t)?t.insertBefore(e,n,i):e.insertBefore(n,i,!0)}function Sr(t,e,n){Oe(t)?t.appendChild(e,n):e.appendChild(n)}function Mr(t,e,n,i){null!==i?kr(t,e,n,i):Sr(t,e,n)}function Er(t,e){return Oe(t)?t.parentNode(e):e.parentNode}function Cr(t,e,n,i){const r=function(t,e,n){let i=e.parent;for(;null!=i&&(4===i.type||5===i.type);)i=(e=i).parent;if(null==i){const t=n[6];return 2===t.type?yr(t,n):n[0]}if(e&&5===e.type&&4&e.flags)return De(e,n).parentNode;if(2&i.flags){const e=t.data,n=e[e[i.index].directiveStart].encapsulation;if(n!==ne.ShadowDom&&n!==ne.Native)return null}return De(i,n)}(t,i,e);if(null!=r){const t=e[11],s=function(t,e){if(2===t.type){const n=pr(t,e);return null===n?null:Tr(n.indexOf(e,me)-me,n)}return 4===t.type||5===t.type?De(t,e):null}(i.parent||e[6],e);if(Array.isArray(n))for(let e=0;e<n.length;e++)Mr(t,r,n[e],s);else Mr(t,r,n,s)}}function Tr(t,e){const n=me+t+1;if(n<e.length){const t=e[n],i=t[1].firstChild;if(null!==i)return function t(e,n){if(null!==n){const i=n.type;if(3===i)return De(n,e);if(0===i)return Tr(-1,e[n.index]);if(4===i||5===i){const i=n.child;if(null!==i)return t(e,i);{const t=e[n.index];return xe(t)?Tr(-1,t):Pe(t)}}{const i=e[16],r=i[6],s=mi(i),o=r.projection[n.projection];return null!=o?t(s,o):t(e,n.next)}}return null}(t,i)}return e[7]}function Ar(t,e,n,i,r,s,o){for(;null!=n;){const a=i[n.index],l=n.type;o&&0===e&&(a&&ni(Pe(a),i),n.flags|=4),64!=(64&n.flags)&&(4===l||5===l?(Ar(t,e,n.child,i,r,s,!1),gr(e,t,r,a,s)):1===l?Nr(t,e,i,n,r,s):gr(e,t,r,a,s)),n=o?n.projectionNext:n.next}}function Rr(t,e,n,i,r,s){Ar(n,i,t.node.child,e,r,s,!1)}function Nr(t,e,n,i,r,s){const o=n[16],a=o[6].projection[i.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++)gr(e,t,r,a[l],s);else Ar(t,e,a,o[3],r,s,!0)}function Or(t,e,n){Oe(t)?t.setAttribute(e,"style",n):e.style.cssText=n}function Ir(t,e,n){Oe(t)?""===n?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n):e.className=n}class Pr{constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._viewContainerRef=null}get rootNodes(){const t=this._lView;return null==t[0]?function t(e,n,i,r,s=!1){for(;null!==i;){const o=n[i.index];if(null!==o&&r.push(Pe(o)),xe(o))for(let e=me;e<o.length;e++){const n=o[e],i=n[1].firstChild;null!==i&&t(n[1],n,i,r)}const a=i.type;if(4===a||5===a)t(e,n,i.child,r);else if(1===a){const e=n[16],s=e[6].projection[i.projection];if(Array.isArray(s))r.push(...s);else{const n=mi(e);t(n[1],n,s,r,!0)}}i=s?i.projectionNext:i.next}return r}(t[1],t,t[6].child,[]):[]}get context(){return this._lView[8]}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){const t=this._viewContainerRef.indexOf(this);t>-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}br(this._lView[1],this._lView)}onDestroy(t){Vi(this._lView[1],this._lView,null,t)}markForCheck(){or(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){ar(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,n){Ge(!0);try{ar(t,e,n)}finally{Ge(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}detachFromAppRef(){var t;this._appRef=null,Rr(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class Dr extends Pr{constructor(t){super(t),this._view=t}detectChanges(){lr(this._view)}checkNoChanges(){!function(t){Ge(!0);try{lr(t)}finally{Ge(!1)}}(this._view)}get context(){return null}}let jr,zr,Fr;function qr(t,e,n){return jr||(jr=class extends t{}),new jr(De(e,n))}function Lr(t,e,n,i){return zr||(zr=class extends t{constructor(t,e,n){super(),this._declarationView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t){const e=this._declarationTContainer.tViews,n=Ni(this._declarationView,e,t,16,null,e.node);n[17]=this._declarationView[this._declarationTContainer.index];const i=this._declarationView[19];return null!==i&&(n[19]=i.createEmbeddedView(e)),Ii(e,n,t),new Pr(n)}}),0===n.type?new zr(i,n,qr(e,n,i)):null}function Vr(t,e,n,i){let r;Fr||(Fr=class extends t{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostView=n}get element(){return qr(e,this._hostTNode,this._hostView)}get injector(){return new Yn(this._hostTNode,this._hostView)}get parentInjector(){const t=Fn(this._hostTNode,this._hostView),e=Cn(t,this._hostView),n=function(t,e,n){if(n.parent&&-1!==n.parent.injectorIndex){const t=n.parent.injectorIndex;let e=n.parent;for(;null!=e.parent&&t==e.parent.injectorIndex;)e=e.parent;return e}let i=En(t),r=e,s=e[6];for(;i>1;)r=r[15],s=r[6],i--;return s}(t,this._hostView,this._hostTNode);return Sn(t)&&null!=n?new Yn(n,e):new Yn(null,this._hostView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){return null!==this._lContainer[8]&&this._lContainer[8][t]||null}get length(){return this._lContainer.length-me}createEmbeddedView(t,e,n){const i=t.createEmbeddedView(e||{});return this.insert(i,n),i}createComponent(t,e,n,i,r){const s=n||this.parentInjector;if(!r&&null==t.ngModule&&s){const t=s.get(Qt,null);t&&(r=t)}const o=t.create(s,i,void 0,r);return this.insert(o.hostView,e),o}insert(t,e){const n=t._lView,i=n[1];if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),xe(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],i=new Fr(e,e[6],e[3]);i.detach(i.indexOf(t))}}const r=this._adjustIndex(e);return function(t,e,n,i){const r=me+i,s=n.length;i>0&&(n[r-1][4]=e),i<s-me?(e[4]=n[r],Xt(n,me+i,e)):(n.push(e),e[4]=null),e[3]=n;const o=e[17];null!==o&&n!==o&&function(t,e){const n=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===n?t[9]=[e]:n.push(e)}(o,e);const a=e[19];null!==a&&a.insertView(t),e[2]|=128}(i,n,this._lContainer,r),mr(i,n,!0,Tr(r,this._lContainer)),t.attachToViewContainerRef(this),Xt(this._lContainer[8],r,t),t}move(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");return this.insert(t,e)}indexOf(t){const e=this._lContainer[8];return null!==e?e.indexOf(t):-1}remove(t){this.allocateContainerIfNeeded();const e=this._adjustIndex(t,-1),n=xr(this._lContainer,e);n&&(Zt(this._lContainer[8],e),br(n[1],n))}detach(t){this.allocateContainerIfNeeded();const e=this._adjustIndex(t,-1),n=xr(this._lContainer,e);return n&&null!=Zt(this._lContainer[8],e)?new Pr(n):null}_adjustIndex(t,e=0){return null==t?this.length+e:t}allocateContainerIfNeeded(){null===this._lContainer[8]&&(this._lContainer[8]=[])}});const s=i[n.index];if(xe(s))r=s;else{let t;if(4===n.type)t=Pe(s);else if(t=i[11].createComment(""),Se(i)){const e=i[11],r=De(n,i);kr(e,Er(e,r),t,function(t,e){return Oe(t)?t.nextSibling(e):e.nextSibling}(e,r))}else Cr(i[1],i,t,n);i[n.index]=r=nr(s,i,t,n),sr(i,r)}return new Fr(r,n,i)}let Hr=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>Br(),t})();const Br=function(t=!1){return function(t,e,n){if(!n&&_e(t)){const n=ze(t.index,e);return new Pr(n,n)}return 3===t.type||0===t.type||4===t.type||5===t.type?new Pr(e[16],e):null}(Qe(),Ue(),t)},Wr=new It("Set Injector scope."),$r={},Ur={},Yr=[];let Qr=void 0;function Kr(){return void 0===Qr&&(Qr=new Yt),Qr}function Xr(t,e=null,n=null,i){return new Zr(t,n,e||Kr(),i)}class Zr{constructor(t,e,n,i=null){this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const r=[];e&&Kt(e,n=>this.processProvider(n,t,e)),Kt([t],t=>this.processInjectorType(t,[],r)),this.records.set(Pt,Jr(void 0,this));const s=this.records.get(Wr);this.scope=null!=s?s.value:null,this.source=i||("object"==typeof t?null:gt(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=Dt,n=rt.Default){this.assertNotDestroyed();const i=Vt(this);try{if(!(n&rt.SkipSelf)){let e=this.records.get(t);if(void 0===e){const n=("function"==typeof(r=t)||"object"==typeof r&&r instanceof It)&<(t);e=n&&this.injectableDefInScope(n)?Jr(Gr(t),$r):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(n&rt.Self?Kr():this.parent).get(t,e=n&rt.Optional&&e===Dt?null:e)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(gt(t)),i)throw s;return function(t,e,n,i){const r=t.ngTempTokenPath;throw e[zt]&&r.unshift(e[zt]),t.message=function(t,e,n,i=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let r=gt(e);if(Array.isArray(e))r=e.map(gt).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t.push(n+":"+("string"==typeof i?JSON.stringify(i):gt(i)))}r=`{${t.join(", ")}}`}return`${n}${i?"("+i+")":""}[${r}]: ${t.replace(jt,"\n ")}`}("\n"+t.message,r,n,i),t.ngTokenPath=r,t.ngTempTokenPath=null,t}(s,t,"R3InjectorError",this.source)}throw s}finally{Vt(i)}var r}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,n)=>t.push(gt(n))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,n){if(!(t=bt(t)))return!1;let i=ut(t);const r=null==i&&t.ngModule||void 0,s=void 0===r?t:r,o=-1!==n.indexOf(s);if(void 0!==r&&(i=ut(r)),null==i)return!1;if(null!=i.imports&&!o){let t;n.push(s);try{Kt(i.imports,i=>{this.processInjectorType(i,e,n)&&(void 0===t&&(t=[]),t.push(i))})}finally{}if(void 0!==t)for(let e=0;e<t.length;e++){const{ngModule:n,providers:i}=t[e];Kt(i,t=>this.processProvider(t,n,i||Yr))}}this.injectorDefTypes.add(s),this.records.set(s,Jr(i.factory,$r));const a=i.providers;if(null!=a&&!o){const e=t;Kt(a,t=>this.processProvider(t,e,a))}return void 0!==r&&void 0!==t.providers}processProvider(t,e,n){let i=es(t=bt(t))?t:bt(t&&t.provide);const r=function(t,e,n){return ts(t)?Jr(void 0,t.useValue):Jr(function(t,e,n){let i=void 0;if(es(t)){const e=bt(t);return pe(e)||Gr(e)}if(ts(t))i=()=>bt(t.useValue);else if((r=t)&&r.useFactory)i=()=>t.useFactory(...Ut(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))i=()=>Wt(bt(t.useExisting));else{const r=bt(t&&(t.useClass||t.provide));if(r||function(t,e,n){let i="";throw t&&e&&(i=` - only instances of Provider and Type are allowed, got: [${e.map(t=>t==n?"?"+n+"?":"...").join(", ")}]`),new Error(`Invalid provider for the NgModule '${gt(t)}'`+i)}(e,n,t),!function(t){return!!t.deps}(t))return pe(r)||Gr(r);i=()=>new r(...Ut(t.deps))}var r;return i}(t,e,n),$r)}(t,e,n);if(es(t)||!0!==t.multi){const t=this.records.get(i);t&&void 0!==t.multi&&ri()}else{let e=this.records.get(i);e?void 0===e.multi&&ri():(e=Jr(void 0,$r,!0),e.factory=()=>Ut(e.multi),this.records.set(i,e)),i=t,e.multi.push(t)}this.records.set(i,r)}hydrate(t,e){var n;return e.value===Ur?function(t){throw new Error("Cannot instantiate cyclic dependency! "+t)}(gt(t)):e.value===$r&&(e.value=Ur,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function Gr(t){const e=lt(t),n=null!==e?e.factory:pe(t);if(null!==n)return n;const i=ut(t);if(null!==i)return i.factory;if(t instanceof It)throw new Error(`Token ${gt(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const n=function(t,e){const n=[];for(let i=0;i<t;i++)n.push("?");return n}(e);throw new Error(`Can't resolve all parameters for ${gt(t)}: (${n.join(", ")}).`)}const n=function(t){const e=t&&(t[ht]||t[pt]||t[ft]&&t[ft]());if(e){const n=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${n}" class.`),e}return null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new Error("unreachable")}function Jr(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function ts(t){return null!==t&&"object"==typeof t&&Ft in t}function es(t){return"function"==typeof t}const ns=function(t,e,n){return function(t,e=null,n=null,i){const r=Xr(t,e,n,i);return r._resolveInjectorDefTypes(),r}({name:n},e,t,n)};let is=(()=>{class t{static create(t,e){return Array.isArray(t)?ns(t,e,""):ns(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=Dt,t.NULL=new Yt,t.\u0275prov=ot({token:t,providedIn:"any",factory:()=>Wt(Pt)}),t.__NG_ELEMENT_ID__=-1,t})();function rs(t,e,n){let i=n?t.styles:null,r=n?t.classes:null,s=0;if(null!==e)for(let o=0;o<e.length;o++){const t=e[o];"number"==typeof t?s=t:1==s?r=mt(r,t):2==s&&(i=mt(i,t+": "+e[++o]+";"))}n?t.styles=i:t.stylesWithoutHost=i,n?t.classes=r:t.classesWithoutHost=r}let ss=null;function os(){if(!ss){const t=Mt.Symbol;if(t&&t.iterator)ss=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){const n=t[e];"entries"!==n&&"size"!==n&&Map.prototype[n]===Map.prototype.entries&&(ss=n)}}}return ss}function as(t){return!!ls(t)&&(Array.isArray(t)||!(t instanceof Map)&&os()in t)}function ls(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function cs(t,e,n){return!Object.is(t[e],n)&&(t[e]=n,!0)}function us(t,e=rt.Default){const n=Ue();return null==n?Wt(t,e):Ln(Qe(),n,bt(t),e)}function hs(t,e,n){const i=Ue();return cs(i,We.lFrame.bindingIndex++,e)&&function(t,e,n,i,r,s,o,a){const l=De(e,n);let c,u=e.inputs;var h;null!=u&&(c=u[i])?(fr(t,n,c,i,r),_e(e)&&function(t,e){const n=ze(e,t);16&n[2]||(n[2]|=64)}(n,e.index)):3===e.type&&(i="class"===(h=i)?"className":"for"===h?"htmlFor":"formaction"===h?"formAction":"innerHtml"===h?"innerHTML":"readonly"===h?"readOnly":"tabindex"===h?"tabIndex":h,r=null!=o?o(r,e.tagName||"",i):r,Oe(s)?s.setProperty(l,i,r):_n(i)||(l.setProperty?l.setProperty(i,r):l[i]=r))}(Ye(),function(){const t=We.lFrame;return je(t.tView,t.selectedIndex)}(),i,t,e,i[11],n),hs}function ds(t,e,n,i,r){const s=r?"class":"style";fr(t,n,e.inputs[s],s,i)}function fs(t,e,n,i){const r=Ue(),s=Ye(),o=ge+t,a=r[11],l=r[o]=Ri(e,a,We.lFrame.currentNamespace),c=s.firstCreatePass?function(t,e,n,i,r,s,o){const a=e.consts,l=Ve(a,s),c=Oi(e,n[6],t,3,r,l);return Wi(e,n,c,Ve(a,o)),null!==c.attrs&&rs(c,c.attrs,!1),null!==c.mergedAttrs&&rs(c,c.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,c),c}(t,s,r,0,e,n,i):s.data[o];Ke(c,!0);const u=c.mergedAttrs;null!==u&&bn(a,l,u);const h=c.classes;null!==h&&Ir(a,l,h);const d=c.styles;null!==d&&Or(a,l,d),Cr(s,r,l,c),0===We.lFrame.elementDepthCount&&ni(l,r),We.lFrame.elementDepthCount++,we(c)&&(zi(s,r,c),function(t,e,n){if(be(e)){const i=e.directiveEnd;for(let r=e.directiveStart;r<i;r++){const e=t.data[r];e.contentQueries&&e.contentQueries(1,n[r],r)}}}(s,c,r)),null!==i&&Fi(r,c)}function ps(){let t=Qe();Xe()?We.lFrame.isParent=!1:(t=t.parent,Ke(t,!1));const e=t;We.lFrame.elementDepthCount--;const n=Ye();n.firstCreatePass&&(fn(n,t),be(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&ds(n,e,Ue(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&ds(n,e,Ue(),e.stylesWithoutHost,!1)}function ys(t,e,n,i){fs(t,e,n,i),ps()}function gs(t){return!!t&&"function"==typeof t.then}function ms(t,e,n=!1,i){const r=Ue(),s=Ye(),o=Qe();return function(t,e,n,i,r,s,o=!1,a){const l=we(i),c=t.firstCreatePass&&(t.cleanup||(t.cleanup=[])),u=hr(e);let h=!0;if(3===i.type){const d=De(i,e),f=a?a(d):ie,p=f.target||d,y=u.length,g=a?t=>a(Pe(t[i.index])).target:i.index;if(Oe(n)){let o=null;if(!a&&l&&(o=function(t,e,n,i){const r=t.cleanup;if(null!=r)for(let s=0;s<r.length-1;s+=2){const t=r[s];if(t===n&&r[s+1]===i){const t=e[7],n=r[s+2];return t.length>n?t[n]:null}"string"==typeof t&&(s+=2)}return null}(t,e,r,i.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=s,o.__ngLastListenerFn__=s,h=!1;else{s=xs(i,e,s,!1);const t=n.listen(f.name||p,r,s);u.push(s,t),c&&c.push(r,g,y,y+1)}}else s=xs(i,e,s,!0),p.addEventListener(r,s,o),u.push(s),c&&c.push(r,g,y,o)}const d=i.outputs;let f;if(h&&null!==d&&(f=d[r])){const t=f.length;if(t)for(let n=0;n<t;n+=2){const t=e[f[n]][f[n+1]].subscribe(s),o=u.length;u.push(s,t),c&&c.push(r,i.index,o,-(o+1))}}}(s,r,r[11],o,t,e,n,i),ms}function vs(t,e,n){try{return!1!==e(n)}catch(i){return dr(t,i),!1}}function xs(t,e,n,i){return function r(s){if(s===Function)return n;const o=2&t.flags?ze(t.index,e):e;0==(32&e[2])&&or(o);let a=vs(e,n,s),l=r.__ngNextListenerFn__;for(;l;)a=vs(e,l,s)&&a,l=l.__ngNextListenerFn__;return i&&!1===a&&(s.preventDefault(),s.returnValue=!1),a}}function bs(t=1){return function(t){return(We.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,We.lFrame.contextLView))[8]}(t)}const _s=[];function ws(t,e,n,i,r){const s=t[n+1],o=null===e;let a=i?Si(s):Ei(s),l=!1;for(;0!==a&&(!1===l||o);){const n=t[a+1];ks(t[a],e)&&(l=!0,t[a+1]=i?Ti(n):Mi(n)),a=i?Si(n):Ei(n)}l&&(t[n+1]=i?Mi(s):Ti(s))}function ks(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&te(t,e)>=0}const Ss={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Ms(t){return t.substring(Ss.key,Ss.keyEnd)}function Es(t){return t.substring(Ss.value,Ss.valueEnd)}function Cs(t,e){const n=Ss.textEnd;let i=Ss.key=Ts(t,e,n);return n===i?-1:(i=Ss.keyEnd=function(t,e,n){let i;for(;e<n&&(45===(i=t.charCodeAt(e))||95===i||(-33&i)>=65&&(-33&i)<=90||i>=48&&i<=57);)e++;return e}(t,i,n),i=As(t,i,n),i=Ss.value=Ts(t,i,n),i=Ss.valueEnd=function(t,e,n){let i=-1,r=-1,s=-1,o=e,a=o;for(;o<n;){const l=t.charCodeAt(o++);if(59===l)return a;34===l||39===l?a=o=Rs(t,l,o,n):e===o-4&&85===s&&82===r&&76===i&&40===l?a=o=Rs(t,41,o,n):l>32&&(a=o),s=r,r=i,i=-33&l}return a}(t,i,n),As(t,i,n))}function Ts(t,e,n){for(;e<n&&t.charCodeAt(e)<=32;)e++;return e}function As(t,e,n,i){return(e=Ts(t,e,n))<n&&e++,e}function Rs(t,e,n,i){let r=-1,s=n;for(;s<i;){const n=t.charCodeAt(s++);if(n==e&&92!==r)return s;r=92==n&&92===r?0:n}throw new Error}function Ns(t){!function(t,e,n,i){const r=Ye(),s=function(t){const e=We.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+2,n}();r.firstUpdatePass&&function(t,e,n,i){const r=t.data;if(null===r[n+1]){const s=r[hn()+ge],o=Is(t,n);Ls(s,i)&&null===e&&!o&&(e=!1),e=function(t,e,n,i){const r=function(t){const e=We.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}(t);let s=e.residualStyles;if(null===r)0===e.styleBindings&&(n=Ds(n=Ps(null,t,e,n,i),e.attrs,i),s=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==r)if(n=Ps(r,t,e,n,i),null===s){let n=function(t,e,n){const i=e.styleBindings;if(0!==Ei(i))return t[Si(i)]}(t,e);void 0!==n&&Array.isArray(n)&&(n=Ps(null,t,e,n[1],i),n=Ds(n,e.attrs,i),function(t,e,n,i){t[Si(e.styleBindings)]=i}(t,e,0,n))}else s=function(t,e,n){let i=void 0;const r=e.directiveEnd;for(let s=1+e.directiveStylingLast;s<r;s++)i=Ds(i,t[s].hostAttrs,false);return Ds(i,e.attrs,false)}(t,e)}return void 0!==s&&(e.residualStyles=s),n}(r,s,e,i),function(t,e,n,i,r,s){let o=e.styleBindings,a=Si(o),l=Ei(o);t[i]=n;let c,u=!1;if(Array.isArray(n)){const t=n;c=t[1],(null===c||te(t,c)>0)&&(u=!0)}else c=n;if(r)if(0!==l){const e=Si(t[a+1]);t[i+1]=ki(e,a),0!==e&&(t[e+1]=Ci(t[e+1],i)),t[a+1]=131071&t[a+1]|i<<17}else t[i+1]=ki(a,0),0!==a&&(t[a+1]=Ci(t[a+1],i)),a=i;else t[i+1]=ki(l,0),0===a?a=i:t[l+1]=Ci(t[l+1],i),l=i;u&&(t[i+1]=Mi(t[i+1])),ws(t,c,i,!0),ws(t,c,i,!1),function(t,e,n,i,r){const s=t.residualStyles;null!=s&&"string"==typeof e&&te(s,e)>=0&&(n[i+1]=Ti(n[i+1]))}(e,c,t,i),o=ki(a,l),e.styleBindings=o}(r,s,e,n,o)}}(r,null,s,i);const o=Ue();if(n!==gi&&cs(o,s,n)){const a=r.data[hn()+ge];if(Ls(a,i)&&!Is(r,s)){let t=a.stylesWithoutHost;null!==t&&(n=mt(t,n||"")),ds(r,a,o,n,i)}else!function(t,e,n,i,r,s,o,a){r===gi&&(r=_s);let l=0,c=0,u=0<r.length?r[0]:null,h=0<s.length?s[0]:null;for(;null!==u||null!==h;){const o=l<r.length?r[l+1]:void 0,d=c<s.length?s[c+1]:void 0;let f=null,p=void 0;u===h?(l+=2,c+=2,o!==d&&(f=h,p=d)):null===h||null!==u&&u<h?(l+=2,f=u):(c+=2,f=h,p=d),null!==f&&zs(t,e,n,i,f,p,false,a),u=l<r.length?r[l]:null,h=c<s.length?s[c]:null}}(r,a,o,o[11],o[s+1],o[s+1]=function(t,e,n){if(null==n||""===n)return _s;const i=[],r=Gn(n);if(Array.isArray(r))for(let s=0;s<r.length;s++)t(i,r[s],!0);else if("object"==typeof r)for(const s in r)r.hasOwnProperty(s)&&t(i,s,r[s]);else"string"==typeof r&&e(i,r);return i}(t,e,n),0,s)}}(js,Os,t,!1)}function Os(t,e){for(let n=function(t){return function(t){Ss.key=0,Ss.keyEnd=0,Ss.value=0,Ss.valueEnd=0,Ss.textEnd=t.length}(t),Cs(t,Ts(t,0,Ss.textEnd))}(e);n>=0;n=Cs(e,n))js(t,Ms(e),Es(e))}function Is(t,e){return e>=t.expandoStartIndex}function Ps(t,e,n,i,r){let s=null;const o=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a<o&&(s=e[a],i=Ds(i,s.hostAttrs,r),s!==t);)a++;return null!==t&&(n.directiveStylingLast=a),i}function Ds(t,e,n){const i=n?1:2;let r=-1;if(null!==e)for(let s=0;s<e.length;s++){const o=e[s];"number"==typeof o?r=o:r===i&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),Gt(t,o,!!n||e[++s]))}return void 0===t?null:t}function js(t,e,n){Gt(t,e,Gn(n))}function zs(t,e,n,i,r,s,o,a){if(3!==e.type)return;const l=t.data,c=l[a+1];qs(1==(1&c)?Fs(l,e,n,r,Ei(c),o):void 0)||(qs(s)||2==(2&c)&&(s=Fs(l,null,n,r,a,o)),function(t,e,n,i,r){const s=Oe(t);if(e)r?s?t.addClass(n,i):n.classList.add(i):s?t.removeClass(n,i):n.classList.remove(i);else{const e=-1==i.indexOf("-")?void 0:2;null==r?s?t.removeStyle(n,i,e):n.style.removeProperty(i):s?t.setStyle(n,i,r,e):n.style.setProperty(i,r)}}(i,o,function(t,e){return Pe(e[t+ge])}(hn(),n),r,s))}function Fs(t,e,n,i,r,s){const o=null===e;let a=void 0;for(;r>0;){const e=t[r],s=Array.isArray(e),l=s?e[1]:e,c=null===l;let u=n[r+1];u===gi&&(u=c?_s:void 0);let h=c?Jt(u,i):l===i?u:void 0;if(s&&!qs(h)&&(h=Jt(e,i)),qs(h)&&(a=h,o))return a;const d=t[r+1];r=o?Si(d):Ei(d)}if(null!==e){let t=s?e.residualClasses:e.residualStyles;null!=t&&(a=Jt(t,i))}return a}function qs(t){return void 0!==t}function Ls(t,e){return 0!=(t.flags&(e?16:32))}function Vs(t,e){const n=Fe(t)[1],i=n.data.length-1;fn(n,{directiveStart:i,directiveEnd:i+1})}class Hs{}class Bs{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${gt(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let Ws=(()=>{class t{}return t.NULL=new Bs,t})(),$s=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=()=>Us(t),t})();const Us=function(t){return qr(t,Qe(),Ue())};class Ys{}var Qs=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({});let Ks=(()=>{class t{}return t.\u0275prov=ot({token:t,providedIn:"root",factory:()=>null}),t})();class Xs{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const Zs=new Xs("10.1.0");class Gs{constructor(){}supports(t){return as(t)}create(t){return new to(t)}}const Js=(t,e)=>e;class to{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||Js}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,i=0,r=null;for(;e||n;){const s=!n||e&&e.currentIndex<ro(n,i,r)?e:n,o=ro(s,i,r),a=s.currentIndex;if(s===n)i--,n=n._nextRemoved;else if(e=e._next,null==s.previousIndex)i++;else{r||(r=[]);const t=o-i,e=a-i;if(t!=e){for(let n=0;n<t;n++){const i=n<r.length?r[n]:r[n]=0,s=i+n;e<=s&&s<t&&(r[n]=i+1)}r[s.previousIndex]=e-t}}o!==a&&t(s,o,a)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!as(t))throw new Error(`Error trying to diff '${gt(t)}'. Only arrays and iterables are allowed`);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e,n,i,r=this._itHead,s=!1;if(Array.isArray(t)){this.length=t.length;for(let e=0;e<this.length;e++)n=t[e],i=this._trackByFn(e,n),null!==r&&Object.is(r.trackById,i)?(s&&(r=this._verifyReinsertion(r,n,i,e)),Object.is(r.item,n)||this._addIdentityChange(r,n)):(r=this._mismatch(r,n,i,e),s=!0),r=r._next}else e=0,function(t,e){if(Array.isArray(t))for(let n=0;n<t.length;n++)e(t[n]);else{const n=t[os()]();let i;for(;!(i=n.next()).done;)e(i.value)}}(t,t=>{i=this._trackByFn(e,t),null!==r&&Object.is(r.trackById,i)?(s&&(r=this._verifyReinsertion(r,t,i,e)),Object.is(r.item,t)||this._addIdentityChange(r,t)):(r=this._mismatch(r,t,i,e),s=!0),r=r._next,e++}),this.length=e;return this._truncate(r),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t,e;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=e)t.previousIndex=t.currentIndex,e=t._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,i){let r;return null===t?r=this._itTail:(r=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,r,i)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,r,i)):t=this._addAfter(new eo(e,n),r,i),t}_verifyReinsertion(t,e,n,i){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==r?t=this._reinsertAfter(r,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const i=t._prevRemoved,r=t._nextRemoved;return null===i?this._removalsHead=r:i._nextRemoved=r,null===r?this._removalsTail=i:r._prevRemoved=i,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const i=null===e?this._itHead:e._next;return t._next=i,t._prev=e,null===i?this._itTail=t:i._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new io),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new io),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class eo{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class no{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Object.is(n.trackById,t))return n;return null}remove(t){const e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class io{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new no,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function ro(t,e,n){const i=t.previousIndex;if(null===i)return i;let r=0;return n&&i<n.length&&(r=n[i]),i+e+r}class so{constructor(){}supports(t){return t instanceof Map||ls(t)}create(){return new oo}}class oo{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||ls(t)))throw new Error(`Error trying to diff '${gt(t)}'. Only maps and objects are allowed`)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(t,n)=>{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const i=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,i)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const i=n._prev,r=n._next;return i&&(i._next=r),r&&(r._prev=i),n._next=null,n._prev=null,n}const n=new ao(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}class ao{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let lo=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(null!=n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new it,new et]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${n=t,n.name||typeof n}'`);var n}}return t.\u0275prov=ot({token:t,providedIn:"root",factory:()=>new t([new Gs])}),t})(),co=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new it,new et]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=ot({token:t,providedIn:"root",factory:()=>new t([new so])}),t})();const uo=[new so],ho=new lo([new Gs]),fo=new co(uo);let po=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>yo(t,$s),t})();const yo=function(t,e){return Lr(t,e,Qe(),Ue())};let go=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>mo(t,$s),t})();const mo=function(t,e){return Vr(t,e,Qe(),Ue())},vo={};class xo extends Ws{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=fe(t);return new wo(e,this.ngModule)}}function bo(t){const e=[];for(let n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}const _o=new It("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>An});class wo extends Hs{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(yi).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return bo(this.componentDef.inputs)}get outputs(){return bo(this.componentDef.outputs)}create(t,e,n,i){const r=(i=i||this.ngModule)?function(t,e){return{get:(n,i,r)=>{const s=t.get(n,vo,r);return s!==vo||i===vo?s:e.get(n,i,r)}}}(t,i.injector):t,s=r.get(Ys,Ie),o=r.get(Ks,null),a=s.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=n?function(t,e,n){if(Oe(t))return t.selectRootElement(e,n===ne.ShadowDom);let i="string"==typeof e?t.querySelector(e):e;return i.textContent="",i}(a,n,this.componentDef.encapsulation):Ri(l,s.createRenderer(null,this.componentDef),function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),u=this.componentDef.onPush?576:528,h={components:[],scheduler:An,clean:ur,playerHandler:null,flags:0},d=Li(0,-1,null,1,0,null,null,null,null,null),f=Ni(null,d,h,u,null,null,s,a,o,r);let p,y;sn(f,null);try{const t=function(t,e,n,i,r,s){const o=n[1];n[20]=t;const a=Oi(o,null,0,3,null,null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(rs(a,l,!0),null!==t&&(bn(r,t,l),null!==a.classes&&Ir(r,t,a.classes),null!==a.styles&&Or(r,t,a.styles)));const c=i.createRenderer(t,e),u=Ni(n,qi(e),null,e.onPush?64:16,n[20],a,i,c,void 0);return o.firstCreatePass&&(qn(Dn(a,n),o,e.type),Ki(o,a),Zi(a,n.length,1)),sr(n,u),n[20]=u}(c,this.componentDef,f,s,a);if(c)if(n)bn(a,c,["ng-version",Zs.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let i=1,r=2;for(;i<t.length;){let s=t[i];if("string"==typeof s)2===r?""!==s&&e.push(s,t[++i]):8===r&&n.push(s);else{if(!hi(r))break;r=s}i++}return{attrs:e,classes:n}}(this.componentDef.selectors[0]);t&&bn(a,c,t),e&&e.length>0&&Ir(a,c,e.join(" "))}if(y=je(d,0),void 0!==e){const t=y.projection=[];for(let n=0;n<this.ngContentSelectors.length;n++){const i=e[n];t.push(null!=i?Array.from(i):null)}}p=function(t,e,n,i,r){const s=n[1],o=function(t,e,n){const i=Qe();t.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),Qi(t,i,1),Gi(t,e,n));const r=Wn(e,t,e.length-1,i);ni(r,e);const s=De(i,e);return s&&ni(s,e),r}(s,n,e);i.components.push(o),t[8]=o,r&&r.forEach(t=>t(o,e)),e.contentQueries&&e.contentQueries(1,o,n.length-1);const a=Qe();if(s.firstCreatePass&&(null!==e.hostBindings||null!==e.hostAttrs)){dn(a.index-ge);const t=n[1];$i(t,e),Ui(t,n,e.hostVars),Yi(e,o)}return o}(t,this.componentDef,f,h,[Vs]),Ii(d,f,null)}finally{un()}const g=new ko(this.componentType,p,qr($s,y,f),f,y);return d.node.child=y,g}}class ko extends class{}{constructor(t,e,n,i,r){super(),this.location=n,this._rootLView=i,this._tNode=r,this.destroyCbs=[],this.instance=e,this.hostView=this.changeDetectorRef=new Dr(i),function(t,e,n,i){let r=t.node;null==r&&(t.node=r=Hi(0,null,2,-1,null,null)),i[6]=r}(i[1],0,0,i),this.componentType=t}get injector(){return new Yn(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(t=>t()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(t){this.destroyCbs&&this.destroyCbs.push(t)}}const So=void 0;var Mo=["en",[["a","p"],["AM","PM"],So],[["AM","PM"],So,So],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],So,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],So,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",So,"{1} 'at' {0}",So],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];let Eo={};function Co(t){return t in Eo||(Eo[t]=Mt.ng&&Mt.ng.common&&Mt.ng.common.locales&&Mt.ng.common.locales[t]),Eo[t]}var To=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});const Ao="en-US";let Ro=Ao;function No(t){var e,n;n="Expected localeId to be defined",null==(e=t)&&function(t,e,n,i){throw new Error("ASSERTION ERROR: "+t+` [Expected=> null != ${e} <=Actual]`)}(n,e),"string"==typeof t&&(Ro=t.toLowerCase().replace(/_/g,"-"))}const Oo=new Map;class Io extends Qt{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new xo(this);const n=ye(t),i=t[Rt]||null;i&&No(i),this._bootstrapComponents=Nn(n.bootstrap),this._r3Injector=Xr(t,e,[{provide:Qt,useValue:this},{provide:Ws,useValue:this.componentFactoryResolver}],gt(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=is.THROW_IF_NOT_FOUND,n=rt.Default){return t===is||t===Qt||t===Pt?this:this._r3Injector.get(t,e,n)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Po extends class{}{constructor(t){super(),this.moduleType=t,null!==ye(t)&&function t(e){if(null!==e.\u0275mod.id){const t=e.\u0275mod.id;(function(t,e,n){if(e&&e!==n)throw new Error(`Duplicate module registered for ${t} - ${gt(e)} vs ${gt(e.name)}`)})(t,Oo.get(t),e),Oo.set(t,e)}let n=e.\u0275mod.imports;n instanceof Function&&(n=n()),n&&n.forEach(e=>t(e))}(t)}create(t){return new Io(this.moduleType,t)}}const Do=class extends k{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){let i,r=t=>null,s=()=>null;t&&"object"==typeof t?(i=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(r=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(s=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(i=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(r=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),n&&(s=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const o=super.subscribe(i,r,s);return t instanceof h&&t.add(o),o}};function jo(){return this._results[os()]()}class zo{constructor(){this.dirty=!0,this._results=[],this.changes=new Do,this.length=0;const t=os(),e=zo.prototype;e[t]||(e[t]=jo)}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t){this._results=function t(e,n){void 0===n&&(n=e);for(let i=0;i<e.length;i++){let r=e[i];Array.isArray(r)?(n===e&&(n=e.slice(0,i)),t(r,n)):n!==e&&n.push(r)}return n}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class Fo{constructor(t){this.queryList=t,this.matches=null}clone(){return new Fo(this.queryList)}setDirty(){this.queryList.setDirty()}}class qo{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const n=null!==t.contentQueries?t.contentQueries[0]:e.length,i=[];for(let t=0;t<n;t++){const n=e.getByIndex(t);i.push(this.queries[n.indexInDeclarationView].clone())}return new qo(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)null!==Ko(t,e).matches&&this.queries[e].setDirty()}}class Lo{constructor(t,e,n,i=null){this.predicate=t,this.descendants=e,this.isStatic=n,this.read=i}}class Vo{constructor(t=[]){this.queries=t}elementStart(t,e){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let n=0;n<this.length;n++){const i=null!==e?e.length:0,r=this.getByIndex(n).embeddedTView(t,i);r&&(r.indexInDeclarationView=n,null!==e?e.push(r):e=[r])}return null!==e?new Vo(e):null}template(t,e){for(let n=0;n<this.queries.length;n++)this.queries[n].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}}class Ho{constructor(t,e=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new Ho(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&!1===this.metadata.descendants){const e=this._declarationNodeIndex;let n=t.parent;for(;null!==n&&4===n.type&&n.index!==e;)n=n.parent;return e===(null!==n?n.index:-1)}return this._appliesToNextNode}matchTNode(t,e){const n=this.metadata.predicate;if(Array.isArray(n))for(let i=0;i<n.length;i++){const r=n[i];this.matchTNodeWithReadOption(t,e,Bo(e,r)),this.matchTNodeWithReadOption(t,e,Bn(e,t,r,!1,!1))}else n===po?0===e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,Bn(e,t,n,!1,!1))}matchTNodeWithReadOption(t,e,n){if(null!==n){const i=this.metadata.read;if(null!==i)if(i===$s||i===go||i===po&&0===e.type)this.addMatch(e.index,-2);else{const n=Bn(e,t,i,!1,!1);null!==n&&this.addMatch(e.index,n)}else this.addMatch(e.index,n)}}addMatch(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}}function Bo(t,e){const n=t.localNames;if(null!==n)for(let i=0;i<n.length;i+=2)if(n[i]===e)return n[i+1];return null}function Wo(t,e,n,i){return-1===n?function(t,e){return 3===t.type||4===t.type?qr($s,t,e):0===t.type?Lr(po,$s,t,e):null}(e,t):-2===n?function(t,e,n){return n===$s?qr($s,e,t):n===po?Lr(po,$s,e,t):n===go?Vr(go,$s,e,t):void 0}(t,e,i):Wn(t,t[1],n,e)}function $o(t,e,n,i){const r=e[19].queries[i];if(null===r.matches){const i=t.data,s=n.matches,o=[];for(let t=0;t<s.length;t+=2){const r=s[t];o.push(r<0?null:Wo(e,i[r],s[t+1],n.metadata.read))}r.matches=o}return r.matches}function Uo(t){const e=Ue(),n=Ye(),i=en();nn(i+1);const r=Ko(n,i);if(t.dirty&&qe(e)===r.metadata.isStatic){if(null===r.matches)t.reset([]);else{const s=r.crossesNgTemplate?function t(e,n,i,r){const s=e.queries.getByIndex(i),o=s.matches;if(null!==o){const a=$o(e,n,s,i);for(let e=0;e<o.length;e+=2){const i=o[e];if(i>0)r.push(a[e/2]);else{const s=o[e+1],a=n[-i];for(let e=me;e<a.length;e++){const n=a[e];n[17]===n[3]&&t(n[1],n,s,r)}if(null!==a[9]){const e=a[9];for(let n=0;n<e.length;n++){const i=e[n];t(i[1],i,s,r)}}}}}return r}(n,e,i,[]):$o(n,e,r,i);t.reset(s),t.notifyOnChanges()}return!0}return!1}function Yo(t,e,n){!function(t,e,n,i,r,s){t.firstCreatePass&&function(t,e,n){null===t.queries&&(t.queries=new Vo),t.queries.track(new Ho(e,-1))}(t,new Lo(n,i,false,r)),function(t,e){const n=new zo;Vi(t,e,n,n.destroy),null===e[19]&&(e[19]=new qo),e[19].queries.push(new Fo(n))}(t,e)}(Ye(),Ue(),t,e,n)}function Qo(){return t=Ue(),e=en(),t[19].queries[e].queryList;var t,e}function Ko(t,e){return t.queries.getByIndex(e)}const Xo=new It("Application Initializer");let Zo=(()=>{class t{constructor(t){this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n<this.appInits.length;n++){const e=this.appInits[n]();gs(e)&&t.push(e)}Promise.all(t).then(()=>{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Wt(Xo,8))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const Go=new It("AppId"),Jo={provide:Go,useFactory:function(){return`${ta()}${ta()}${ta()}`},deps:[]};function ta(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const ea=new It("Platform Initializer"),na=new It("Platform ID"),ia=new It("appBootstrapListener");let ra=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const sa=new It("LocaleId"),oa=new It("DefaultCurrencyCode");class aa{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const la=function(t){return new Po(t)},ca=la,ua=function(t){return Promise.resolve(la(t))},ha=function(t){const e=la(t),n=Nn(ye(t).declarations).reduce((t,e)=>{const n=fe(e);return n&&t.push(new wo(n)),t},[]);return new aa(e,n)},da=ha,fa=function(t){return Promise.resolve(ha(t))};let pa=(()=>{class t{constructor(){this.compileModuleSync=ca,this.compileModuleAsync=ua,this.compileModuleAndAllComponentsSync=da,this.compileModuleAndAllComponentsAsync=fa}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const ya=(()=>Promise.resolve(0))();function ga(t){"undefined"==typeof Zone?ya.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class ma{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Do(!1),this.onMicrotaskEmpty=new Do(!1),this.onStable=new Do(!1),this.onError=new Do(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const n=this;n._nesting=0,n._outer=n._inner=Zone.current,Zone.wtfZoneSpec&&(n._inner=n._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(n._inner=n._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(n._inner=n._inner.fork(Zone.longStackTraceZoneSpec)),n.shouldCoalesceEventChangeDetection=e,n.lastRequestAnimationFrameId=-1,n.nativeRequestAnimationFrame=function(){let t=Mt.requestAnimationFrame,e=Mt.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=!!t.shouldCoalesceEventChangeDetection&&t.nativeRequestAnimationFrame&&(()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Mt,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,_a(t),ba(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),_a(t))}(t)});t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:e},onInvokeTask:(n,i,r,s,o,a)=>{try{return wa(t),n.invokeTask(r,s,o,a)}finally{e&&"eventTask"===s.type&&e(),ka(t)}},onInvoke:(e,n,i,r,s,o,a)=>{try{return wa(t),e.invoke(i,r,s,o,a)}finally{ka(t)}},onHasTask:(e,n,i,r)=>{e.hasTask(i,r),n===i&&("microTask"==r.change?(t._hasPendingMicrotasks=r.microTask,_a(t),ba(t)):"macroTask"==r.change&&(t.hasPendingMacrotasks=r.macroTask))},onHandleError:(e,n,i,r)=>(e.handleError(i,r),t.runOutsideAngular(()=>t.onError.emit(r)),!1)})}(n)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ma.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(ma.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,i){const r=this._inner,s=r.scheduleEventTask("NgZoneEvent: "+i,t,xa,va,va);try{return r.runTask(s,e,n)}finally{r.cancelTask(s)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}function va(){}const xa={};function ba(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function _a(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||t.shouldCoalesceEventChangeDetection&&-1!==t.lastRequestAnimationFrameId)}function wa(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function ka(t){t._nesting--,ba(t)}class Sa{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Do,this.onMicrotaskEmpty=new Do,this.onStable=new Do,this.onError=new Do}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,i){return t.apply(e,n)}}let Ma=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{ma.assertNotInAngularZone(),ga(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())ga(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,n){let i=-1;e&&e>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==i),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:n})}whenStable(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(Wt(ma))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})(),Ea=(()=>{class t{constructor(){this._applications=new Map,Aa.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return Aa.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();class Ca{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}let Ta,Aa=new Ca;const Ra=new It("AllowMultipleToken");function Na(t,e,n=[]){const i="Platform: "+e,r=new It(i);return(e=[])=>{let s=Oa();if(!s||s.injector.get(Ra,!1))if(t)t(n.concat(e).concat({provide:r,useValue:!0}));else{const t=n.concat(e).concat({provide:r,useValue:!0},{provide:Wr,useValue:"platform"});!function(t){if(Ta&&!Ta.destroyed&&!Ta.injector.get(Ra,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Ta=t.get(Ia);const e=t.get(ea,null);e&&e.forEach(t=>t())}(is.create({providers:t,name:i}))}return function(t){const e=Oa();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(r)}}function Oa(){return Ta&&!Ta.destroyed?Ta:null}let Ia=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new Sa:("zone.js"===t?void 0:t)||new ma({enableLongStackTrace:ei(),shouldCoalesceEventChangeDetection:e}),n}(e?e.ngZone:void 0,e&&e.ngZoneEventCoalescing||!1),i=[{provide:ma,useValue:n}];return n.run(()=>{const e=is.create({providers:i,parent:this.injector,name:t.moduleType.name}),r=t.create(e),s=r.injector.get(Zn,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return r.onDestroy(()=>ja(this._modules,r)),n.runOutsideAngular(()=>n.onError.subscribe({next:t=>{s.handleError(t)}})),function(t,e,n){try{const i=n();return gs(i)?i.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):i}catch(i){throw e.runOutsideAngular(()=>t.handleError(i)),i}}(s,n,()=>{const t=r.injector.get(Zo);return t.runInitializers(),t.donePromise.then(()=>(No(r.injector.get(sa,Ao)||Ao),this._moduleDoBootstrap(r),r))})})}bootstrapModule(t,e=[]){const n=Pa({},e);return function(t,e,n){const i=new Po(n);return Promise.resolve(i)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(Da);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${gt(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Wt(is))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();function Pa(t,e){return Array.isArray(e)?e.reduce(Pa,t):Object.assign(Object.assign({},t),e)}let Da=(()=>{class t{constructor(t,e,n,i,r,s){this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=r,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=ei(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new v(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),a=new v(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{ma.assertNotInAngularZone(),ga(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{ma.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=B(o,a.pipe(t=>{return W()((e=X,function(t){let n;n="function"==typeof e?e:function(){return e};const i=Object.create(t,Q);return i.source=t,i.subjectFactory=n,i})(t));var e}))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=t instanceof Hs?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const i=n.isBoundToModule?void 0:this._injector.get(Qt),r=n.create(is.NULL,[],e||n.selector,i);r.onDestroy(()=>{this._unloadComponent(r)});const s=r.injector.get(Ma,null);return s&&r.injector.get(Ea).registerApplication(r.location.nativeElement,s),this._loadComponent(r),ei()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),r}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges();if(this._enforceNoNewChanges)for(let t of this._views)t.checkNoChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;ja(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(ia,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),ja(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(Wt(ma),Wt(ra),Wt(is),Wt(Zn),Wt(Ws),Wt(Zo))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();function ja(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const za=Na(null,"core",[{provide:na,useValue:"unknown"},{provide:Ia,deps:[is]},{provide:Ea,deps:[]},{provide:ra,deps:[]}]),Fa=[{provide:Da,useClass:Da,deps:[ma,ra,is,Zn,Ws,Zo]},{provide:_o,deps:[ma],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Zo,useClass:Zo,deps:[[new et,Xo]]},{provide:pa,useClass:pa,deps:[]},Jo,{provide:lo,useFactory:function(){return ho},deps:[]},{provide:co,useFactory:function(){return fo},deps:[]},{provide:sa,useFactory:function(t){return No(t=t||"undefined"!=typeof $localize&&$localize.locale||Ao),t},deps:[[new tt(sa),new et,new it]]},{provide:oa,useValue:"USD"}];let qa=(()=>{class t{constructor(t){}}return t.\u0275mod=ue({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)(Wt(Da))},providers:Fa}),t})();n("9HG0");class La extends h{constructor(t,e){super()}schedule(t,e=0){return this}}class Va extends La{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n=!1,i=void 0;try{this.work(t)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}let Ha=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class Ba extends Ha{constructor(t,e=Ha.now){super(t,()=>Ba.delegate&&Ba.delegate!==this?Ba.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return Ba.delegate&&Ba.delegate!==this?Ba.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}const Wa=new Ba(Va);class $a{constructor(t){this.project=t}call(t,e){return e.subscribe(new Ua(t,this.project))}}class Ua extends F{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const n=new z(this),i=this.destination;i.add(n),this.innerSubscription=q(t,n),this.innerSubscription!==n&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}class Ya extends Va{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(t,e,n):t.flush(this)}}class Qa extends Ba{}const Ka=new Qa(Ya),Xa=new v(t=>t.complete());let Za=(()=>{class t{constructor(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}accept(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}toObservable(){switch(this.kind){case"N":return function(...t){let e=t[t.length-1];return M(e)?(t.pop(),D(t,e)):H(t)}(this.value);case"E":return t=this.error,new v(e=>e.error(t));case"C":return Xa}var t;throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})();class Ga extends p{constructor(t,e,n=0){super(t),this.scheduler=e,this.delay=n}static dispatch(t){const{notification:e,destination:n}=t;e.observe(n),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(Ga.dispatch,this.delay,new Ja(t,this.destination)))}_next(t){this.scheduleMessage(Za.createNext(t))}_error(t){this.scheduleMessage(Za.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(Za.createComplete()),this.unsubscribe()}}class Ja{constructor(t,e){this.notification=t,this.destination=e}}class tl extends k{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n){super(),this.scheduler=n,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift(),super.next(t)}nextTimeWindow(t){this._events.push(new el(this._getNow(),t)),this._trimBufferThenGetEvents(),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,n=e?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,r=n.length;let s;if(this.closed)throw new b;if(this.isStopped||this.hasError?s=h.EMPTY:(this.observers.push(t),s=new _(this,t)),i&&t.add(t=new Ga(t,i)),e)for(let o=0;o<r&&!t.closed;o++)t.next(n[o]);else for(let o=0;o<r&&!t.closed;o++)t.next(n[o].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),s}_getNow(){return(this.scheduler||Ka).now()}_trimBufferThenGetEvents(){const t=this._getNow(),e=this._bufferSize,n=this._windowTime,i=this._events,r=i.length;let s=0;for(;s<r&&!(t-i[s].time<n);)s++;return r>e&&(s=Math.max(s,r-e)),s>0&&i.splice(0,s),i}}class el{constructor(t,e){this.time=t,this.value=e}}let nl=null;function il(){return nl}const rl=new It("DocumentToken");var sl=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({});class ol{}let al=(()=>{class t extends ol{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(function(t){return function(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=Co(e);if(n)return n;const i=e.split("-")[0];if(n=Co(i),n)return n;if("en"===i)return Mo;throw new Error(`Missing locale data for the locale "${t}".`)}(t)[To.PluralCase]}(e||this.locale)(t)){case sl.Zero:return"zero";case sl.One:return"one";case sl.Two:return"two";case sl.Few:return"few";case sl.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(Wt(sa))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})(),ll=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new cl,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){ul("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){ul("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(us(go),us(po))},t.\u0275dir=de({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class cl{constructor(){this.$implicit=null,this.ngIf=null}}function ul(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${gt(e)}'.`)}let hl,dl=(()=>{class t{}return t.\u0275mod=ue({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},providers:[{provide:ol,useClass:al}]}),t})();function fl(t){return"browser"===t}try{hl="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(cA){hl=!1}let pl=(()=>{class t{constructor(t){this._platformId=t,this.isBrowser=this._platformId?fl(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!hl)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return t.\u0275fac=function(e){return new(e||t)(Wt(na))},t.\u0275prov=ot({factory:function(){return new t(Wt(na))},token:t,providedIn:"root"}),t})(),yl=(()=>{class t{}return t.\u0275mod=ue({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)}}),t})();const gl=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine);let ml=(()=>{class t{constructor(t,e){this._platform=e,this._document=t}ngOnDestroy(){const t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t=this._platform?this._platform.isBrowser:"undefined"!=typeof window,e="cdk-overlay-container";if(t||gl){const t=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let e=0;e<t.length;e++)t[e].parentNode.removeChild(t[e])}const n=this._document.createElement("div");n.classList.add(e),gl?n.setAttribute("platform","test"):t||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._containerElement=n}}return t.\u0275fac=function(e){return new(e||t)(Wt(rl),Wt(pl))},t.\u0275prov=ot({factory:function(){return new t(Wt(rl),Wt(pl))},token:t,providedIn:"root"}),t})();const vl=(()=>{const t=Element.prototype;return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector})(),xl={schedule(t,e){const n=setTimeout(t,e);return()=>clearTimeout(n)},scheduleBeforeRender(t){if("undefined"==typeof window)return xl.schedule(t,0);if(void 0===window.requestAnimationFrame)return xl.schedule(t,16);const e=window.requestAnimationFrame(t);return()=>window.cancelAnimationFrame(e)}};function bl(t,e,n){let i=n;return function(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}(t)&&e.some((e,n)=>!("*"===e||!function(t,e){return vl.call(t,e)}(t,e)||(i=n,0))),i}class _l{constructor(t,e){this.componentFactory=e.get(Ws).resolveComponentFactory(t)}create(t){return new wl(this.componentFactory,t)}}class wl{constructor(t,e){this.componentFactory=t,this.injector=e,this.eventEmitters=new tl(1),this.events=this.eventEmitters.pipe(function t(e,n){return"function"==typeof n?i=>i.pipe(t((t,i)=>j(e(t,i)).pipe(E((e,r)=>n(t,e,i,r))))):t=>t.lift(new $a(e))}(t=>B(...t))),this.componentRef=null,this.inputChanges=null,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set,this.ngZone=this.injector.get(ma),this.elementZone="undefined"==typeof Zone?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{null!==this.componentRef&&null===this.scheduledDestroyFn&&(this.scheduledDestroyFn=xl.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null)},10))})}getInputValue(t){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){this.runInZone(()=>{var n,i;null!==this.componentRef?((n=e)!==(i=this.getInputValue(t))&&(n==n||i==i)||void 0===e&&this.unchangedInputs.has(t))&&(this.recordInputChange(t,e),this.componentRef.instance[t]=e,this.scheduleDetectChanges()):this.initialInputValues.set(t,e)})}initializeComponent(t){const e=is.create({providers:[],parent:this.injector}),n=function(t,e){const n=t.childNodes,i=e.map(()=>[]);let r=-1;e.some((t,e)=>"*"===t&&(r=e,!0));for(let s=0,o=n.length;s<o;++s){const t=n[s],o=bl(t,e,r);-1!==o&&i[o].push(t)}return i}(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,n,t),this.implementsOnChanges="function"==typeof this.componentRef.instance.ngOnChanges,this.initializeInputs(),this.initializeOutputs(this.componentRef),this.detectChanges(),this.injector.get(Da).attachView(this.componentRef.hostView)}initializeInputs(){this.componentFactory.inputs.forEach(({propName:t})=>{this.implementsOnChanges&&this.unchangedInputs.add(t),this.initialInputValues.has(t)&&this.setInputValue(t,this.initialInputValues.get(t))}),this.initialInputValues.clear()}initializeOutputs(t){const e=this.componentFactory.outputs.map(({propName:e,templateName:n})=>t.instance[e].pipe(E(t=>({name:n,value:t}))));this.eventEmitters.next(e)}callNgOnChanges(t){if(!this.implementsOnChanges||null===this.inputChanges)return;const e=this.inputChanges;this.inputChanges=null,t.instance.ngOnChanges(e)}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=xl.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(t,e){if(null!==this.componentRef&&!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const n=this.inputChanges[t];if(n)return void(n.currentValue=e);const i=this.unchangedInputs.has(t);this.unchangedInputs.delete(t);const r=i?void 0:this.getInputValue(t);this.inputChanges[t]=new Me(r,e,i)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}}class kl extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}function Sl(t,e){t.forEach(({propName:t})=>{Object.defineProperty(e,t,{get(){return this.ngElementStrategy.getInputValue(t)},set(e){this.ngElementStrategy.setInputValue(t,e)},configurable:!0,enumerable:!0})})}class Ml extends class extends class{}{constructor(){super()}supportsDOMEvents(){return!0}}{static makeCurrent(){var t;t=new Ml,nl||(nl=t)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=Cl||(Cl=document.querySelector("base"),Cl)?Cl.getAttribute("href"):null;return null==e?null:(n=e,El||(El=document.createElement("a")),El.setAttribute("href",n),"/"===El.pathname.charAt(0)?El.pathname:"/"+El.pathname);var n}resetBaseElement(){Cl=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return function(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[i,r]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(i.trim()===e)return decodeURIComponent(r)}return null}(document.cookie,t)}}let El,Cl=null;const Tl=new It("TRANSITION_ID"),Al=[{provide:Xo,useFactory:function(t,e,n){return()=>{n.get(Zo).donePromise.then(()=>{const n=il();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>n.remove(t))})}},deps:[Tl,rl,is],multi:!0}];class Rl{static init(){var t;t=new Rl,Aa=t}addToWindow(t){Mt.getAngularTestability=(e,n=!0)=>{const i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i},Mt.getAllAngularTestabilities=()=>t.getAllTestabilities(),Mt.getAllAngularRootElements=()=>t.getAllRootElements(),Mt.frameworkStabilizers||(Mt.frameworkStabilizers=[]),Mt.frameworkStabilizers.push(t=>{const e=Mt.getAllAngularTestabilities();let n=e.length,i=!1;const r=function(e){i=i||e,n--,0==n&&t(i)};e.forEach((function(t){t.whenStable(r)}))})}findTestabilityInTree(t,e,n){if(null==e)return null;const i=t.getTestability(e);return null!=i?i:n?il().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}const Nl=new It("EventManagerPlugins");let Ol=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let i=0;i<n.length;i++){const e=n[i];if(e.supports(t))return this._eventNameToPlugin.set(t,e),e}throw new Error("No event manager plugin found for event "+t)}}return t.\u0275fac=function(e){return new(e||t)(Wt(Nl),Wt(ma))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();class Il{constructor(t){this._doc=t}addGlobalEventListener(t,e,n){const i=il().getGlobalEventTarget(this._doc,t);if(!i)throw new Error(`Unsupported event target ${i} for event ${e}`);return this.addEventListener(i,e,n)}}let Pl=(()=>{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})(),Dl=(()=>{class t extends Pl{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const n=this._doc.createElement("style");n.textContent=t,this._styleNodes.add(e.appendChild(n))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>il().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(Wt(rl))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const jl={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},zl=/%COMP%/g;function Fl(t,e,n){for(let i=0;i<e.length;i++){let r=e[i];Array.isArray(r)?Fl(t,r,n):(r=r.replace(zl,t),n.push(r))}return n}function ql(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let Ll=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new Vl(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case ne.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new Hl(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case ne.Native:case ne.ShadowDom:return new Bl(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=Fl(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(Wt(Ol),Wt(Dl),Wt(Go))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();class Vl{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(jl[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,i){if(i){e=i+":"+e;const r=jl[i];r?t.setAttributeNS(r,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const i=jl[n];i?t.removeAttributeNS(i,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,i){i&Qs.DashCase?t.style.setProperty(e,n,i&Qs.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Qs.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,ql(n)):this.eventManager.addEventListener(t,e,ql(n))}}class Hl extends Vl{constructor(t,e,n,i){super(t),this.component=n;const r=Fl(i+"-"+n.id,n.styles,[]);e.addStyles(r),this.contentAttr="_ngcontent-%COMP%".replace(zl,i+"-"+n.id),this.hostAttr="_nghost-%COMP%".replace(zl,i+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class Bl extends Vl{constructor(t,e,n,i){super(t),this.sharedStylesHost=e,this.hostEl=n,this.component=i,this.shadowRoot=i.encapsulation===ne.ShadowDom?n.attachShadow({mode:"open"}):n.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const r=Fl(i.id,i.styles,[]);for(let s=0;s<r.length;s++){const t=document.createElement("style");t.textContent=r[s],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}}let Wl=(()=>{class t extends Il{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(Wt(rl))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const $l=["alt","control","meta","shift"],Ul={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Yl={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},Ql={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let Kl=(()=>{class t extends Il{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,i){const r=t.parseEventName(n),s=t.eventCallback(r.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>il().onAndCancel(e,r.domEventName,s))}static parseEventName(e){const n=e.toLowerCase().split("."),i=n.shift();if(0===n.length||"keydown"!==i&&"keyup"!==i)return null;const r=t._normalizeKey(n.pop());let s="";if($l.forEach(t=>{const e=n.indexOf(t);e>-1&&(n.splice(e,1),s+=t+".")}),s+=r,0!=n.length||0===r.length)return null;const o={};return o.domEventName=i,o.fullKey=s,o}static getEventFullKey(t){let e="",n=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&Yl.hasOwnProperty(e)&&(e=Yl[e]))}return Ul[e]||e}(t);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),$l.forEach(i=>{i!=n&&(0,Ql[i])(t)&&(e+=i+".")}),e+=n,e}static eventCallback(e,n,i){return r=>{t.getEventFullKey(r)===e&&i.runGuarded(()=>n(r))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(Wt(rl))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const Xl=Na(za,"browser",[{provide:na,useValue:"browser"},{provide:ea,useValue:function(){Ml.makeCurrent(),Rl.init()},multi:!0},{provide:rl,useFactory:function(){return function(t){Ne=t}(document),document},deps:[]}]),Zl=[[],{provide:Wr,useValue:"root"},{provide:Zn,useFactory:function(){return new Zn},deps:[]},{provide:Nl,useClass:Wl,multi:!0,deps:[rl,ma,na]},{provide:Nl,useClass:Kl,multi:!0,deps:[rl]},[],{provide:Ll,useClass:Ll,deps:[Ol,Dl,Go]},{provide:Ys,useExisting:Ll},{provide:Pl,useExisting:Dl},{provide:Dl,useClass:Dl,deps:[rl]},{provide:Ma,useClass:Ma,deps:[ma]},{provide:Ol,useClass:Ol,deps:[Nl,ma]},[]];let Gl=(()=>{class t{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:Go,useValue:e.appId},{provide:Tl,useExisting:Go},Al]}}}return t.\u0275mod=ue({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)(Wt(t,12))},providers:Zl,imports:[dl,qa]}),t})();"undefined"!=typeof window&&window;class Jl{}const tc="*";function ec(t,e=null){return{type:2,steps:t,options:e}}function nc(t){return{type:6,styles:t,offset:null}}function ic(t){Promise.resolve(null).then(t)}class rc{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){ic(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){}getPosition(){return 0}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class sc{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,i=0;const r=this.players.length;0==r?ic(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==r&&this._onFinish()}),t.onDestroy(()=>{++n==r&&this._onDestroy()}),t.onStart(()=>{++i==r&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}getPosition(){let t=0;return this.players.forEach(e=>{const n=e.getPosition();t=Math.min(n,t)}),t}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}function oc(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function ac(t){switch(t.length){case 0:return new rc;case 1:return t[0];default:return new sc(t)}}function lc(t,e,n,i,r={},s={}){const o=[],a=[];let l=-1,c=null;if(i.forEach(t=>{const n=t.offset,i=n==l,u=i&&c||{};Object.keys(t).forEach(n=>{let i=n,a=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,o),a){case"!":a=r[n];break;case tc:a=s[n];break;default:a=e.normalizeStyleValue(n,i,a,o)}u[i]=a}),i||a.push(u),c=u,l=n}),o.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${o.join(t)}`)}return a}function cc(t,e,n,i){switch(e){case"start":t.onStart(()=>i(n&&uc(n,"start",t)));break;case"done":t.onDone(()=>i(n&&uc(n,"done",t)));break;case"destroy":t.onDestroy(()=>i(n&&uc(n,"destroy",t)))}}function uc(t,e,n){const i=n.totalTime,r=hc(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==i?t.totalTime:i,!!n.disabled),s=t._data;return null!=s&&(r._data=s),r}function hc(t,e,n,i,r="",s=0,o){return{element:t,triggerName:e,fromState:n,toState:i,phaseName:r,totalTime:s,disabled:!!o}}function dc(t,e,n){let i;return t instanceof Map?(i=t.get(e),i||t.set(e,i=n)):(i=t[e],i||(i=t[e]=n)),i}function fc(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let pc=(t,e)=>!1,yc=(t,e)=>!1,gc=(t,e,n)=>[];const mc=oc();(mc||"undefined"!=typeof Element)&&(pc=(t,e)=>t.contains(e),yc=(()=>{if(mc||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,n)=>e.apply(t,[n]):yc}})(),gc=(t,e,n)=>{let i=[];if(n)i.push(...t.querySelectorAll(e));else{const n=t.querySelector(e);n&&i.push(n)}return i});let vc=null,xc=!1;function bc(t){vc||(vc=("undefined"!=typeof document?document.body:null)||{},xc=!!vc.style&&"WebkitAppearance"in vc.style);let e=!0;return vc.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in vc.style,!e&&xc)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in vc.style),e}const _c=yc,wc=pc,kc=gc;function Sc(t){const e={};return Object.keys(t).forEach(n=>{const i=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=t[n]}),e}let Mc=(()=>{class t{validateStyleProperty(t){return bc(t)}matchesElement(t,e){return _c(t,e)}containsElement(t,e){return wc(t,e)}query(t,e,n){return kc(t,e,n)}computeStyle(t,e,n){return n||""}animate(t,e,n,i,r,s=[],o){return new rc(n,i)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})(),Ec=(()=>{class t{}return t.NOOP=new Mc,t})();const Cc="ng-enter",Tc="ng-leave",Ac="ng-trigger",Rc=".ng-trigger",Nc="ng-animating",Oc=".ng-animating";function Ic(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Pc(parseFloat(e[1]),e[2])}function Pc(t,e){switch(e){case"s":return 1e3*t;default:return t}}function Dc(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){let i,r=0,s="";if("string"==typeof t){const n=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};i=Pc(parseFloat(n[1]),n[2]);const o=n[3];null!=o&&(r=Pc(parseFloat(o),n[4]));const a=n[5];a&&(s=a)}else i=t;if(!n){let n=!1,s=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),n=!0),r<0&&(e.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&e.splice(s,0,`The provided timing value "${t}" is invalid.`)}return{duration:i,delay:r,easing:s}}(t,e,n)}function jc(t,e={}){return Object.keys(t).forEach(n=>{e[n]=t[n]}),e}function zc(t,e,n={}){if(e)for(let i in t)n[i]=t[i];else jc(t,n);return n}function Fc(t,e,n){return n?e+":"+n+";":""}function qc(t){let e="";for(let n=0;n<t.style.length;n++){const i=t.style.item(n);e+=Fc(0,i,t.style.getPropertyValue(i))}for(const n in t.style)t.style.hasOwnProperty(n)&&!n.startsWith("_")&&(e+=Fc(0,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[n]));t.setAttribute("style",e)}function Lc(t,e,n){t.style&&(Object.keys(e).forEach(i=>{const r=Qc(i);n&&!n.hasOwnProperty(i)&&(n[i]=t.style[r]),t.style[r]=e[i]}),oc()&&qc(t))}function Vc(t,e){t.style&&(Object.keys(e).forEach(e=>{const n=Qc(e);t.style[n]=""}),oc()&&qc(t))}function Hc(t){return Array.isArray(t)?1==t.length?t[0]:ec(t):t}const Bc=new RegExp("{{\\s*(.+?)\\s*}}","g");function Wc(t){let e=[];if("string"==typeof t){let n;for(;n=Bc.exec(t);)e.push(n[1]);Bc.lastIndex=0}return e}function $c(t,e,n){const i=t.toString(),r=i.replace(Bc,(t,i)=>{let r=e[i];return e.hasOwnProperty(i)||(n.push("Please provide a value for the animation param "+i),r=""),r.toString()});return r==i?t:r}function Uc(t){const e=[];let n=t.next();for(;!n.done;)e.push(n.value),n=t.next();return e}const Yc=/-+([a-z0-9])/g;function Qc(t){return t.replace(Yc,(...t)=>t[1].toUpperCase())}function Kc(t,e){return 0===t||0===e}function Xc(t,e,n){const i=Object.keys(n);if(i.length&&e.length){let s=e[0],o=[];if(i.forEach(t=>{s.hasOwnProperty(t)||o.push(t),s[t]=n[t]}),o.length)for(var r=1;r<e.length;r++){let n=e[r];o.forEach((function(e){n[e]=Gc(t,e)}))}}return e}function Zc(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error("Unable to resolve animation metadata node #"+e.type)}}function Gc(t,e){return window.getComputedStyle(t)[e]}const Jc="*";function tu(t,e){const n=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(t=>function(t,e,n){if(":"==t[0]){const i=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e)<parseFloat(t);default:return e.push(`The transition alias value "${t}" is not supported`),"* => *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}const i=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push(`The provided transition expression "${t}" is not supported`),e;const r=i[1],s=i[2],o=i[3];e.push(iu(r,o)),"<"!=s[0]||r==Jc&&o==Jc||e.push(iu(o,r))}(t,n,e)):n.push(t),n}const eu=new Set(["true","1"]),nu=new Set(["false","0"]);function iu(t,e){const n=eu.has(t)||nu.has(t),i=eu.has(e)||nu.has(e);return(r,s)=>{let o=t==Jc||t==r,a=e==Jc||e==s;return!o&&n&&"boolean"==typeof r&&(o=r?eu.has(t):nu.has(t)),!a&&i&&"boolean"==typeof s&&(a=s?eu.has(e):nu.has(e)),o&&a}}const ru=new RegExp("s*:selfs*,?","g");function su(t,e,n){return new ou(t).build(e,n)}class ou{constructor(t){this._driver=t}build(t,e){const n=new au(e);return this._resetContextStyleTimingState(n),Zc(this,Hc(t),n)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,i=e.depCount=0;const r=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const n=t,i=n.name;i.toString().split(/\s*,\s*/).forEach(t=>{n.name=t,r.push(this.visitState(n,e))}),n.name=i}else if(1==t.type){const r=this.visitTransition(t,e);n+=r.queryCount,i+=r.depCount,s.push(r)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:r,transitions:s,queryCount:n,depCount:i,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),i=t.options&&t.options.params||null;if(n.containsDynamicStyles){const r=new Set,s=i||{};if(n.styles.forEach(t=>{if(lu(t)){const e=t;Object.keys(e).forEach(t=>{Wc(e[t]).forEach(t=>{s.hasOwnProperty(t)||r.add(t)})})}}),r.size){const n=Uc(r.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:t.name,style:n,options:i?{params:i}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=Zc(this,Hc(t.animation),e);return{type:1,matchers:tu(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:cu(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>Zc(this,t,e)),options:cu(t.options)}}visitGroup(t,e){const n=e.currentTime;let i=0;const r=t.steps.map(t=>{e.currentTime=n;const r=Zc(this,t,e);return i=Math.max(i,e.currentTime),r});return e.currentTime=i,{type:3,steps:r,options:cu(t.options)}}visitAnimate(t,e){const n=function(t,e){let n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return uu(Dc(t,e).duration,0,"");const i=t;if(i.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=uu(0,0,"");return t.dynamic=!0,t.strValue=i,t}return n=n||Dc(i,e),uu(n.duration,n.delay,n.easing)}(t.timings,e.errors);let i;e.currentAnimateTimings=n;let r=t.styles?t.styles:nc({});if(5==r.type)i=this.visitKeyframes(r,e);else{let r=t.styles,s=!1;if(!r){s=!0;const t={};n.easing&&(t.easing=n.easing),r=nc(t)}e.currentTime+=n.duration+n.delay;const o=this.visitStyle(r,e);o.isEmptyStep=s,i=o}return e.currentAnimateTimings=null,{type:4,timings:n,style:i,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?t==tc?n.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):n.push(t)}):n.push(t.styles);let i=!1,r=null;return n.forEach(t=>{if(lu(t)){const e=t,n=e.easing;if(n&&(r=n,delete e.easing),!i)for(let t in e)if(e[t].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:r,offset:t.offset,containsDynamicStyles:i,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let i=e.currentTime,r=e.currentTime;n&&r>0&&(r-=n.duration+n.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void e.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const s=e.collectedStyles[e.currentQuerySelector],o=s[n];let a=!0;o&&(r!=i&&r>=o.startTime&&i<=o.endTime&&(e.errors.push(`The CSS property "${n}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${r}ms" and "${i}ms"`),a=!1),r=o.startTime),a&&(s[n]={startTime:r,endTime:i}),e.options&&function(t,e,n){const i=e.params||{},r=Wc(t);r.length&&r.forEach(t=>{i.hasOwnProperty(t)||n.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[n],e.options,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),n;let i=0;const r=[];let s=!1,o=!1,a=0;const l=t.steps.map(t=>{const n=this._makeStyleAst(t,e);let l=null!=n.offset?n.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(lu(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}});else if(lu(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}return e}(n.styles),c=0;return null!=l&&(i++,c=n.offset=l),o=o||c<0||c>1,s=s||c<a,a=c,r.push(c),n});o&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),s&&e.errors.push("Please ensure that all keyframe offsets are in order");const c=t.steps.length;let u=0;i>0&&i<c?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==i&&(u=1/(c-1));const h=c-1,d=e.currentTime,f=e.currentAnimateTimings,p=f.duration;return l.forEach((t,i)=>{const s=u>0?i==h?1:u*i:r[i],o=s*p;e.currentTime=d+f.delay+o,f.duration=o,this._validateStyleAst(t,e),t.offset=s,n.styles.push(t)}),n}visitReference(t,e){return{type:8,animation:Zc(this,Hc(t.animation),e),options:cu(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:cu(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:cu(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;const[r,s]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(ru,"")),[t=t.replace(/@\*/g,Rc).replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,Oc),e]}(t.selector);e.currentQuerySelector=n.length?n+" "+r:r,dc(e.collectedStyles,e.currentQuerySelector,{});const o=Zc(this,Hc(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:o,originalSelector:t.selector,options:cu(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:Dc(t.timings,e.errors,!0);return{type:12,animation:Zc(this,Hc(t.animation),e),timings:n,options:null}}}class au{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function lu(t){return!Array.isArray(t)&&"object"==typeof t}function cu(t){var e;return t?(t=jc(t)).params&&(t.params=(e=t.params)?jc(e):null):t={},t}function uu(t,e,n){return{duration:t,delay:e,easing:n}}function hu(t,e,n,i,r,s,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class du{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const fu=new RegExp(":enter","g"),pu=new RegExp(":leave","g");function yu(t,e,n,i,r,s={},o={},a,l,c=[]){return(new gu).buildKeyframes(t,e,n,i,r,s,o,a,l,c)}class gu{buildKeyframes(t,e,n,i,r,s,o,a,l,c=[]){l=l||new du;const u=new vu(t,e,l,i,r,c,[]);u.options=a,u.currentTimeline.setStyles([s],null,u.errors,a),Zc(this,n,u);const h=u.timelines.filter(t=>t.containsAnimation());if(h.length&&Object.keys(o).length){const t=h[h.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,u.errors,a)}return h.length?h.map(t=>t.buildKeyframes()):[hu(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const n=e.subInstructions.consume(e.element);if(n){const i=e.createSubContext(t.options),r=e.currentTimeline.currentTime,s=this._visitSubInstructions(n,i,i.options);r!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,n){let i=e.currentTimeline.currentTime;const r=null!=n.duration?Ic(n.duration):null,s=null!=n.delay?Ic(n.delay):null;return 0!==r&&t.forEach(t=>{const n=e.appendInstructionToTimeline(t,r,s);i=Math.max(i,n.duration+n.delay)}),i}visitReference(t,e){e.updateOptions(t.options,!0),Zc(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let i=e;const r=t.options;if(r&&(r.params||r.delay)&&(i=e.createSubContext(r),i.transformIntoNewTimeline(),null!=r.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=mu);const t=Ic(r.delay);i.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>Zc(this,t,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let i=e.currentTimeline.currentTime;const r=t.options&&t.options.delay?Ic(t.options.delay):0;t.steps.forEach(s=>{const o=e.createSubContext(t.options);r&&o.delayNextStep(r),Zc(this,s,o),i=Math.max(i,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(i),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return Dc(e.params?$c(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());const r=t.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();const r=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(r):n.setStyles(t.styles,r,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,i=e.currentTimeline.duration,r=n.duration,s=e.createSubContext().currentTimeline;s.easing=n.easing,t.styles.forEach(t=>{s.forwardTime((t.offset||0)*r),s.setStyles(t.styles,t.easing,e.errors,e.options),s.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(s),e.transformIntoNewTimeline(i+r),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,i=t.options||{},r=i.delay?Ic(i.delay):0;r&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=mu);let s=n;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=o.length;let a=null;o.forEach((n,i)=>{e.currentQueryIndex=i;const o=e.createSubContext(t.options,n);r&&o.delayNextStep(r),n===e.element&&(a=o.currentTimeline),Zc(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,i=e.currentTimeline,r=t.timings,s=Math.abs(r.duration),o=s*(e.currentQueryTotal-1);let a=s*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":a=o-a;break;case"full":a=n.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const c=l.currentTime;Zc(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-c+(i.startTime-n.currentTimeline.startTime)}}const mu={};class vu{constructor(t,e,n,i,r,s,o,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=r,this.errors=s,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=mu,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new xu(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let i=this.options;null!=n.duration&&(i.duration=Ic(n.duration)),null!=n.delay&&(i.delay=Ic(n.delay));const r=n.params;if(r){let t=i.params;t||(t=this.options.params={}),Object.keys(r).forEach(n=>{e&&t.hasOwnProperty(n)||(t[n]=$c(r[n],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(t=>{n[t]=e[t]})}}return t}createSubContext(t=null,e,n){const i=e||this.element,r=new vu(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(t),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(t){return this.previousNode=mu,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},r=new bu(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,i,r,s){let o=[];if(i&&o.push(this.element),t.length>0){t=(t=t.replace(fu,"."+this._enterClassName)).replace(pu,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=n);0!==n&&(e=n<0?e.slice(e.length+n,e.length):e.slice(0,n)),o.push(...e)}return r||0!=o.length||s.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class xu{constructor(t,e,n,i){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new xu(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||tc,this._currentKeyframe[t]=tc}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,i){e&&(this._previousKeyframe.easing=e);const r=i&&i.params||{},s=function(t,e){const n={};let i;return t.forEach(t=>{"*"===t?(i=i||Object.keys(e),i.forEach(t=>{n[t]=tc})):zc(t,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(s).forEach(t=>{const e=$c(s[t],r,n);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:tc),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const n=this._styleSummary[e],i=t._styleSummary[e];(!n||i.time>n.time)&&this._updateStyle(e,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let i=[];this._keyframes.forEach((r,s)=>{const o=zc(r,!0);Object.keys(o).forEach(n=>{const i=o[n];"!"==i?t.add(n):i==tc&&e.add(n)}),n||(o.offset=s/this.duration),i.push(o)});const r=t.size?Uc(t.values()):[],s=e.size?Uc(e.values()):[];if(n){const t=i[0],e=jc(t);t.offset=0,e.offset=1,i=[t,e]}return hu(this.element,i,r,s,this.duration,this.startTime,this.easing,!1)}}class bu extends xu{constructor(t,e,n,i,r,s,o=!1){super(t,e,s.delay),this.element=e,this.keyframes=n,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=o,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&e){const r=[],s=n+e,o=e/s,a=zc(t[0],!1);a.offset=0,r.push(a);const l=zc(t[0],!1);l.offset=_u(o),r.push(l);const c=t.length-1;for(let i=1;i<=c;i++){let o=zc(t[i],!1);o.offset=_u((e+o.offset*n)/s),r.push(o)}n=s,e=0,i="",t=r}return hu(this.element,t,this.preStyleProps,this.postStyleProps,n,e,i,!0)}}function _u(t,e=3){const n=Math.pow(10,e-1);return Math.round(t*n)/n}class wu{}class ku extends wu{normalizePropertyName(t,e){return Qc(t)}normalizeStyleValue(t,e,n,i){let r="";const s=n.toString().trim();if(Su[e]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&i.push(`Please provide a CSS unit value for ${t}:${n}`)}return s+r}}const Su=(()=>function(t){const e={};return t.forEach(t=>e[t]=!0),e}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function Mu(t,e,n,i,r,s,o,a,l,c,u,h,d){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:n,fromStyles:s,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:h,errors:d}}const Eu={};class Cu{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,i){return function(t,e,n,i,r){return t.some(t=>t(e,n,i,r))}(this.ast.matchers,t,e,n,i)}buildStyles(t,e,n){const i=this._stateStyles["*"],r=this._stateStyles[t],s=i?i.buildStyles(e,n):{};return r?r.buildStyles(e,n):s}build(t,e,n,i,r,s,o,a,l,c){const u=[],h=this.ast.options&&this.ast.options.params||Eu,d=this.buildStyles(n,o&&o.params||Eu,u),f=a&&a.params||Eu,p=this.buildStyles(i,f,u),y=new Set,g=new Map,m=new Map,v="void"===i,x={params:Object.assign(Object.assign({},h),f)},b=c?[]:yu(t,e,this.ast.animation,r,s,d,p,x,l,u);let _=0;if(b.forEach(t=>{_=Math.max(t.duration+t.delay,_)}),u.length)return Mu(e,this._triggerName,n,i,v,d,p,[],[],g,m,_,u);b.forEach(t=>{const n=t.element,i=dc(g,n,{});t.preStyleProps.forEach(t=>i[t]=!0);const r=dc(m,n,{});t.postStyleProps.forEach(t=>r[t]=!0),n!==e&&y.add(n)});const w=Uc(y.values());return Mu(e,this._triggerName,n,i,v,d,p,b,w,g,m,_)}}class Tu{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const n={},i=jc(this.defaultParams);return Object.keys(t).forEach(e=>{const n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const r=t;Object.keys(r).forEach(t=>{let s=r[t];s.length>1&&(s=$c(s,i,e)),n[t]=s})}}),n}}class Au{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new Tu(t.style,t.options&&t.options.params||{})}),Ru(this.states,"true","1"),Ru(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new Cu(t,e,this.states))}),this.fallbackTransition=new Cu(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,i){return this.transitionFactories.find(r=>r.match(t,e,n,i))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function Ru(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}const Nu=new du;class Ou{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(t,e){const n=[],i=su(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=i}_buildPlayer(t,e,n){const i=t.element,r=lc(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(i,r,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const i=[],r=this._animations[t];let s;const o=new Map;if(r?(s=yu(this._driver,e,r,Cc,Tc,{},{},n,Nu,i),s.forEach(t=>{const e=dc(o,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(i.push("The requested animation doesn't exist or has already been destroyed"),s=[]),i.length)throw new Error("Unable to create the animation due to the following errors: "+i.join("\n"));o.forEach((t,e)=>{Object.keys(t).forEach(n=>{t[n]=this._driver.computeStyle(e,n,tc)})});const a=ac(s.map(t=>{const e=o.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e}listen(t,e,n,i){const r=hc(e,"","","");return cc(this._getPlayer(t),n,r,i),()=>{}}command(t,e,n,i){if("register"==n)return void this.register(t,i[0]);if("create"==n)return void this.create(t,e,i[0]||{});const r=this._getPlayer(t);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}}const Iu="ng-animate-queued",Pu="ng-animate-disabled",Du=".ng-animate-disabled",ju=[],zu={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Fu={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class qu{constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=null!=(i=n?t.value:t)?i:null,n){const e=jc(t);delete e.value,this.options=e}else this.options={};var i;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(n=>{null==t[n]&&(t[n]=e[n])})}}}const Lu="void",Vu=new qu(Lu);class Hu{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Ku(e,this._hostClassName)}listen(t,e,n,i){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${e}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(r=n)&&"done"!=r)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${e}" is not supported!`);var r;const s=dc(this._elementListeners,t,[]),o={name:e,phase:n,callback:i};s.push(o);const a=dc(this._engine.statesByElement,t,{});return a.hasOwnProperty(e)||(Ku(t,Ac),Ku(t,"ng-trigger-"+e),a[e]=Vu),()=>{this._engine.afterFlush(()=>{const t=s.indexOf(o);t>=0&&s.splice(t,1),this._triggers[e]||delete a[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,n,i=!0){const r=this._getTrigger(e),s=new Wu(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(Ku(t,Ac),Ku(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let a=o[e];const l=new qu(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),o[e]=l,a||(a=Vu),l.value!==Lu&&a.value===l.value){if(!function(t,e){const n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(let r=0;r<n.length;r++){const i=n[r];if(!e.hasOwnProperty(i)||t[i]!==e[i])return!1}return!0}(a.params,l.params)){const e=[],n=r.matchStyles(a.value,a.params,e),i=r.matchStyles(l.value,l.params,e);e.length?this._engine.reportError(e):this._engine.afterFlush(()=>{Vc(t,n),Lc(t,i)})}return}const c=dc(this._engine.playersByElement,t,[]);c.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let u=r.matchTransition(a.value,l.value,t,l.params),h=!1;if(!u){if(!i)return;u=r.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:u,fromState:a,toState:l,player:s,isFallbackTransition:h}),h||(Ku(t,Iu),s.onStart(()=>{Xu(t,Iu)})),s.onDone(()=>{let e=this.players.indexOf(s);e>=0&&this.players.splice(e,1);const n=this._engine.playersByElement.get(t);if(n){let t=n.indexOf(s);t>=0&&n.splice(t,1)}}),this.players.push(s),c.push(s),s}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,n)=>{delete e[t]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const n=this._engine.driver.query(t,Rc,!0);n.forEach(t=>{if(t.__ng_removed)return;const n=this._engine.fetchNamespacesByElement(t);n.size?n.forEach(n=>n.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,n,i){const r=this._engine.statesByElement.get(t);if(r){const s=[];if(Object.keys(r).forEach(e=>{if(this._triggers[e]){const n=this.trigger(t,e,Lu,i);n&&s.push(n)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&ac(s).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t);if(e){const n=new Set;e.forEach(e=>{const i=e.name;if(n.has(i))return;n.add(i);const r=this._triggers[i].fallbackTransition,s=this._engine.statesByElement.get(t)[i]||Vu,o=new qu(Lu),a=new Wu(this.id,i,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:i,transition:r,fromState:s,toState:o,player:a,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let i=!1;if(n.totalAnimations){const e=n.players.length?n.playersByQueriedElement.get(t):[];if(e&&e.length)i=!0;else{let e=t;for(;e=e.parentNode;)if(n.statesByElement.get(e)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(t),i)n.markElementAsRemoved(this.id,t,!1,e);else{const i=t.__ng_removed;i&&i!==zu||(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Ku(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const i=n.player;if(i.destroyed)return;const r=n.element,s=this._elementListeners.get(r);s&&s.forEach(e=>{if(e.name==n.triggerName){const i=hc(r,n.triggerName,n.fromState.value,n.toState.value);i._data=t,cc(n.player,e.phase,i,e.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):e.push(n)}),this._queue=[],e.sort((t,e)=>{const n=t.transition.ast.depCount,i=e.transition.ast.depCount;return 0==n||0==i?n-i:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class Bu{constructor(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const n=new Hu(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList.length-1;if(n>=0){let i=!1;for(let r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,e)){this._namespaceList.splice(r+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(n);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n){const t=Object.keys(n);for(let i=0;i<t.length;i++){const r=n[t[i]].namespaceId;if(r){const t=this._fetchNamespace(r);t&&e.add(t)}}}return e}trigger(t,e,n,i){if($u(e)){const r=this._fetchNamespace(t);if(r)return r.trigger(e,n,i),!0}return!1}insertNode(t,e,n,i){if(!$u(e))return;const r=e.__ng_removed;if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;const t=this.collectedLeaveElements.indexOf(e);t>=0&&this.collectedLeaveElements.splice(t,1)}if(t){const i=this._fetchNamespace(t);i&&i.insertNode(e,n)}i&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Ku(t,Pu)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Xu(t,Pu))}removeNode(t,e,n,i){if($u(e)){const r=t?this._fetchNamespace(t):null;if(r?r.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i),n){const n=this.namespacesByHostElement.get(e);n&&n.id!==t&&n.removeNode(e,i)}}else this._onRemovalComplete(e,i)}markElementAsRemoved(t,e,n,i){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}listen(t,e,n,i,r){return $u(e)?this._fetchNamespace(t).listen(e,n,i,r):()=>{}}_buildInstruction(t,e,n,i,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,r)}destroyInnerAnimations(t){let e=this.driver.query(t,Rc,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,Oc,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return ac(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=zu,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,Du)&&this.markElementAsDisabled(t,!1),this.driver.query(t,Du,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++)Ku(this.collectedEnterElements[n],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const n=[];try{e=this._flushAnimations(n,t)}finally{for(let t=0;t<n.length;t++)n[t]()}}else for(let n=0;n<this.collectedLeaveElements.length;n++)this.processLeaveNode(this.collectedLeaveElements[n]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?ac(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+t.join("\n"))}_flushAnimations(t,e){const n=new du,i=[],r=new Map,s=[],o=new Map,a=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(t=>{c.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let n=0;n<e.length;n++)c.add(e[n])});const u=this.bodyNode,h=Array.from(this.statesByElement.keys()),d=Qu(h,this.collectedEnterElements),f=new Map;let p=0;d.forEach((t,e)=>{const n=Cc+p++;f.set(e,n),t.forEach(t=>Ku(t,n))});const y=[],g=new Set,m=new Set;for(let R=0;R<this.collectedLeaveElements.length;R++){const t=this.collectedLeaveElements[R],e=t.__ng_removed;e&&e.setForRemoval&&(y.push(t),g.add(t),e.hasAnimation?this.driver.query(t,".ng-star-inserted",!0).forEach(t=>g.add(t)):m.add(t))}const v=new Map,x=Qu(h,Array.from(g));x.forEach((t,e)=>{const n=Tc+p++;v.set(e,n),t.forEach(t=>Ku(t,n))}),t.push(()=>{d.forEach((t,e)=>{const n=f.get(e);t.forEach(t=>Xu(t,n))}),x.forEach((t,e)=>{const n=v.get(e);t.forEach(t=>Xu(t,n))}),y.forEach(t=>{this.processLeaveNode(t)})});const b=[],_=[];for(let R=this._namespaceList.length-1;R>=0;R--)this._namespaceList[R].drainQueuedTransitions(e).forEach(t=>{const e=t.player,r=t.element;if(b.push(e),this.collectedEnterElements.length){const t=r.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const c=!u||!this.driver.containsElement(u,r),h=v.get(r),d=f.get(r),p=this._buildInstruction(t,n,d,h,c);if(p.errors&&p.errors.length)_.push(p);else{if(c)return e.onStart(()=>Vc(r,p.fromStyles)),e.onDestroy(()=>Lc(r,p.toStyles)),void i.push(e);if(t.isFallbackTransition)return e.onStart(()=>Vc(r,p.fromStyles)),e.onDestroy(()=>Lc(r,p.toStyles)),void i.push(e);p.timelines.forEach(t=>t.stretchStartingKeyframe=!0),n.append(r,p.timelines),s.push({instruction:p,player:e,element:r}),p.queriedElements.forEach(t=>dc(o,t,[]).push(e)),p.preStyleProps.forEach((t,e)=>{const n=Object.keys(t);if(n.length){let t=a.get(e);t||a.set(e,t=new Set),n.forEach(e=>t.add(e))}}),p.postStyleProps.forEach((t,e)=>{const n=Object.keys(t);let i=l.get(e);i||l.set(e,i=new Set),n.forEach(t=>i.add(t))})}});if(_.length){const t=[];_.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),b.forEach(t=>t.destroy()),this.reportError(t)}const w=new Map,k=new Map;s.forEach(t=>{const e=t.element;n.has(e)&&(k.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,w))}),i.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{dc(w,e,[]).push(t),t.destroy()})});const S=y.filter(t=>Gu(t,a,l)),M=new Map;Yu(M,this.driver,m,l,tc).forEach(t=>{Gu(t,a,l)&&S.push(t)});const E=new Map;d.forEach((t,e)=>{Yu(E,this.driver,new Set(t),a,"!")}),S.forEach(t=>{const e=M.get(t),n=E.get(t);M.set(t,Object.assign(Object.assign({},e),n))});const C=[],T=[],A={};s.forEach(t=>{const{element:e,player:s,instruction:o}=t;if(n.has(e)){if(c.has(e))return s.onDestroy(()=>Lc(e,o.toStyles)),s.disabled=!0,s.overrideTotalTime(o.totalTime),void i.push(s);let t=A;if(k.size>1){let n=e;const i=[];for(;n=n.parentNode;){const e=k.get(n);if(e){t=e;break}i.push(n)}i.forEach(e=>k.set(e,t))}const n=this._buildAnimation(s.namespaceId,o,w,r,E,M);if(s.setRealPlayer(n),t===A)C.push(s);else{const e=this.playersByElement.get(t);e&&e.length&&(s.parentPlayer=ac(e)),i.push(s)}}else Vc(e,o.fromStyles),s.onDestroy(()=>Lc(e,o.toStyles)),T.push(s),c.has(e)&&i.push(s)}),T.forEach(t=>{const e=r.get(t.element);if(e&&e.length){const n=ac(e);t.setRealPlayer(n)}}),i.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let R=0;R<y.length;R++){const t=y[R],e=t.__ng_removed;if(Xu(t,Tc),e&&e.hasAnimation)continue;let n=[];if(o.size){let e=o.get(t);e&&e.length&&n.push(...e);let i=this.driver.query(t,Oc,!0);for(let t=0;t<i.length;t++){let e=o.get(i[t]);e&&e.length&&n.push(...e)}}const i=n.filter(t=>!t.destroyed);i.length?Zu(this,t,i):this.processLeaveNode(t)}return y.length=0,C.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),C}elementContainsData(t,e){let n=!1;const i=e.__ng_removed;return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,i,r){let s=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(s=e)}else{const e=this.playersByElement.get(t);if(e){const t=!r||r==Lu;e.forEach(e=>{e.queued||(t||e.triggerName==i)&&s.push(e)})}}return(n||i)&&(s=s.filter(t=>!(n&&n!=t.namespaceId||i&&i!=t.triggerName))),s}_beforeAnimationBuild(t,e,n){const i=e.element,r=e.isRemovalTransition?void 0:t,s=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,a=t!==i,l=dc(n,t,[]);this._getPreviousPlayers(t,a,r,s,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}Vc(i,e.fromStyles)}_buildAnimation(t,e,n,i,r,s){const o=e.triggerName,a=e.element,l=[],c=new Set,u=new Set,h=e.timelines.map(e=>{const h=e.element;c.add(h);const d=h.__ng_removed;if(d&&d.removedBeforeQueried)return new rc(e.duration,e.delay);const f=h!==a,p=function(t){const e=[];return function t(e,n){for(let i=0;i<e.length;i++){const r=e[i];r instanceof sc?t(r.players,n):n.push(r)}}(t,e),e}((n.get(h)||ju).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===h),y=r.get(h),g=s.get(h),m=lc(0,this._normalizer,0,e.keyframes,y,g),v=this._buildPlayer(e,m,p);if(e.subTimeline&&i&&u.add(h),f){const e=new Wu(t,o,h);e.setRealPlayer(v),l.push(e)}return v});l.forEach(t=>{dc(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,n){let i;if(t instanceof Map){if(i=t.get(e),i){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&t.delete(e)}}else if(i=t[e],i){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&delete t[e]}return i}(this.playersByQueriedElement,t.element,t))}),c.forEach(t=>Ku(t,Nc));const d=ac(h);return d.onDestroy(()=>{c.forEach(t=>Xu(t,Nc)),Lc(a,e.toStyles)}),u.forEach(t=>{dc(i,t,[]).push(d)}),d}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new rc(t.duration,t.delay)}}class Wu{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new rc,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>cc(t,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){dc(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function $u(t){return t&&1===t.nodeType}function Uu(t,e){const n=t.style.display;return t.style.display=null!=e?e:"none",n}function Yu(t,e,n,i,r){const s=[];n.forEach(t=>s.push(Uu(t)));const o=[];i.forEach((n,i)=>{const s={};n.forEach(t=>{const n=s[t]=e.computeStyle(i,t,r);n&&0!=n.length||(i.__ng_removed=Fu,o.push(i))}),t.set(i,s)});let a=0;return n.forEach(t=>Uu(t,s[a++])),o}function Qu(t,e){const n=new Map;if(t.forEach(t=>n.set(t,[])),0==e.length)return n;const i=new Set(e),r=new Map;return e.forEach(t=>{const e=function t(e){if(!e)return 1;let s=r.get(e);if(s)return s;const o=e.parentNode;return s=n.has(o)?o:i.has(o)?1:t(o),r.set(e,s),s}(t);1!==e&&n.get(e).push(t)}),n}function Ku(t,e){if(t.classList)t.classList.add(e);else{let n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function Xu(t,e){if(t.classList)t.classList.remove(e);else{let n=t.$$classes;n&&delete n[e]}}function Zu(t,e,n){ac(n).onDone(()=>t.processLeaveNode(e))}function Gu(t,e,n){const i=n.get(t);if(!i)return!1;let r=e.get(t);return r?i.forEach(t=>r.add(t)):e.set(t,i),n.delete(t),!0}class Ju{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new Bu(t,e,n),this._timelineEngine=new Ou(t,e,n),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,n,i,r){const s=t+"-"+i;let o=this._triggerCache[s];if(!o){const t=[],e=su(this._driver,r,t);if(t.length)throw new Error(`The animation trigger "${i}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new Au(t,e)}(i,e),this._triggerCache[s]=o}this._transitionEngine.registerTrigger(e,i,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,i){this._transitionEngine.insertNode(t,e,n,i)}onRemove(t,e,n,i){this._transitionEngine.removeNode(t,e,i||!1,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,i){if("@"==n.charAt(0)){const[t,r]=fc(n);this._timelineEngine.command(t,e,r,i)}else this._transitionEngine.trigger(t,e,n,i)}listen(t,e,n,i,r){if("@"==n.charAt(0)){const[t,i]=fc(n);return this._timelineEngine.listen(t,e,i,r)}return this._transitionEngine.listen(t,e,n,i,r)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function th(t,e){let n=null,i=null;return Array.isArray(e)&&e.length?(n=nh(e[0]),e.length>1&&(i=nh(e[e.length-1]))):e&&(n=nh(e)),n||i?new eh(t,n,i):null}let eh=(()=>{class t{constructor(e,n,i){this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;let r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r={}),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Lc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Lc(this._element,this._initialStyles),this._endStyles&&(Lc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Vc(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Vc(this._element,this._endStyles),this._endStyles=null),Lc(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function nh(t){let e=null;const n=Object.keys(t);for(let i=0;i<n.length;i++){const r=n[i];ih(r)&&(e=e||{},e[r]=t[r])}return e}function ih(t){return"display"===t||"position"===t}const rh="animation",sh="animationend";class oh{constructor(t,e,n,i,r,s,o){this._element=t,this._name=e,this._duration=n,this._delay=i,this._easing=r,this._fillMode=s,this._onDoneFn=o,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=t=>this._handleCallback(t)}apply(){!function(t,e){const n=dh(t,"").trim();n.length&&(function(t,e){let n=0;for(let i=0;i<t.length;i++)","===t.charAt(i)&&n++}(n),e=`${n}, ${e}`),hh(t,"",e)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),uh(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){ah(this._element,this._name,"paused")}resume(){ah(this._element,this._name,"running")}setPosition(t){const e=lh(this._element,this._name);this._position=t*this._duration,hh(this._element,"Delay",`-${this._position}ms`,e)}getPosition(){return this._position}_handleCallback(t){const e=t._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),uh(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const n=dh(t,"").split(","),i=ch(n,e);i>=0&&(n.splice(i,1),hh(t,"",n.join(",")))}(this._element,this._name))}}function ah(t,e,n){hh(t,"PlayState",n,lh(t,e))}function lh(t,e){const n=dh(t,"");return n.indexOf(",")>0?ch(n.split(","),e):ch([n],e)}function ch(t,e){for(let n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return n;return-1}function uh(t,e,n){n?t.removeEventListener(sh,e):t.addEventListener(sh,e)}function hh(t,e,n,i){const r=rh+e;if(null!=i){const e=t.style[r];if(e.length){const t=e.split(",");t[i]=n,n=t.join(",")}}t.style[r]=n}function dh(t,e){return t.style[rh+e]}class fh{constructor(t,e,n,i,r,s,o,a){this.element=t,this.keyframes=e,this.animationName=n,this._duration=i,this._delay=r,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=i+r,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new oh(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(t[n]=e?this._finalStyles[n]:Gc(this.element,n))})}this.currentSnapshot=t}}class ph extends rc{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=Sc(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class yh{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(t){return bc(t)}matchesElement(t,e){return _c(t,e)}containsElement(t,e){return wc(t,e)}query(t,e,n){return kc(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,n){n=n.map(t=>Sc(t));let i=`@keyframes ${e} {\n`,r="";n.forEach(t=>{r=" ";const e=parseFloat(t.offset);i+=`${r}${100*e}% {\n`,r+=" ",Object.keys(t).forEach(e=>{const n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+=`${r}animation-timing-function: ${n};\n`));default:return void(i+=`${r}${e}: ${n};\n`)}}),i+=r+"}\n"}),i+="}\n";const s=document.createElement("style");return s.innerHTML=i,s}animate(t,e,n,i,r,s=[],o){o&&this._notifyFaultyScrubber();const a=s.filter(t=>t instanceof fh),l={};Kc(n,i)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const c=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(n=>{"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=Xc(t,e,l));if(0==n)return new ph(t,c);const u="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(h);const d=th(t,e),f=new fh(t,e,u,n,i,r,c,d);return f.onDestroy(()=>{var t;(t=h).parentNode.removeChild(t)}),f}_notifyFaultyScrubber(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}class gh{constructor(t,e,n,i){this.element=t,this.keyframes=e,this.options=n,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,n){return t.animate(e,n)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:Gc(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class mh{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(vh().toString()),this._cssKeyframesDriver=new yh}validateStyleProperty(t){return bc(t)}matchesElement(t,e){return _c(t,e)}containsElement(t,e){return wc(t,e)}query(t,e,n){return kc(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,n,i,r,s=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,i,r,s);const a={duration:n,delay:i,fill:0==i?"both":"forwards"};r&&(a.easing=r);const l={},c=s.filter(t=>t instanceof gh);Kc(n,i)&&c.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const u=th(t,e=Xc(t,e=e.map(t=>zc(t,!1)),l));return new gh(t,e,a,u)}}function vh(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}let xh=(()=>{class t extends Jl{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:ne.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(t)?ec(t):t;return wh(this._renderer,null,e,"register",[n]),new bh(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(Wt(Ys),Wt(rl))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();class bh extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new _h(this._id,t,e||{},this._renderer)}}class _h{constructor(t,e,n,i){this.id=t,this.element=e,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return wh(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(t){this._command("setPosition",t)}getPosition(){return 0}}function wh(t,e,n,i,r){return t.setProperty(e,`@@${n}:${i}`,r)}const kh="@",Sh="@.disabled";let Mh=(()=>{class t{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const n=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(n);return t||(t=new Eh("",n,this.engine),this._rendererCache.set(n,t)),t}const i=e.id,r=e.id+"-"+this._currentId;this._currentId++,this.engine.register(r,t);const s=e=>{Array.isArray(e)?e.forEach(s):this.engine.registerTrigger(i,r,t,e.name,e)};return e.data.animation.forEach(s),new Ch(this,r,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){t>=0&&t<this._microtaskId?this._zone.run(()=>e(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,n]=t;e(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,n]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(Wt(Ys),Wt(Ju),Wt(ma))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();class Eh{constructor(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,!0)}removeChild(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,i){this.delegate.setStyle(t,e,n,i)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){e.charAt(0)==kh&&e==Sh?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class Ch extends Eh{constructor(t,e,n,i){super(e,n,i),this.factory=t,this.namespaceId=e}setProperty(t,e,n){e.charAt(0)==kh?"."==e.charAt(1)&&e==Sh?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}listen(t,e,n){if(e.charAt(0)==kh){const i=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let r=e.substr(1),s="";return r.charAt(0)!=kh&&([r,s]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(r)),this.engine.listen(this.namespaceId,i,r,s,t=>{this.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}let Th=(()=>{class t extends Ju{constructor(t,e,n){super(t.body,e,n)}}return t.\u0275fac=function(e){return new(e||t)(Wt(rl),Wt(Ec),Wt(wu))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();const Ah=[{provide:Ec,useFactory:function(){return"function"==typeof vh()?new mh:new yh}},{provide:new It("AnimationModuleType"),useValue:"BrowserAnimations"},{provide:Jl,useClass:xh},{provide:wu,useFactory:function(){return new ku}},{provide:Ju,useClass:Th},{provide:Ys,useFactory:function(t,e,n){return new Mh(t,e,n)},deps:[Ll,Ju,ma]}];let Rh=(()=>{class t{}return t.\u0275mod=ue({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},providers:Ah,imports:[Gl]}),t})(),Nh=(()=>{class t{constructor(t){this._document=t}ngOnDestroy(){const t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container",e=this._document.querySelectorAll("."+t);if(null==e?void 0:e.length)this._containerElement=e[0];else{const e=this._document.createElement("div");e.classList.add(t),this._document.body.appendChild(e),this._containerElement=e}}}return t.\u0275fac=function(e){return new(e||t)(Wt(rl))},t.\u0275prov=ot({token:t,factory:t.\u0275fac}),t})();class Oh{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new Ih(t,this.dueTime,this.scheduler))}}class Ih extends p{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Ph,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function Ph(t){t.debouncedNext()}const Dh={provide:ia,useFactory:function(t,e){return()=>{if(fl(e)){const e=Array.from(t.querySelectorAll(`[class*=${jh}]`)),n=/\bflex-layout-.+?\b/g;e.forEach(t=>{t.classList.contains(jh+"ssr")&&t.parentNode?t.parentNode.removeChild(t):t.className.replace(n,"")})}}},deps:[rl,na],multi:!0},jh="flex-layout-";let zh=(()=>{class t{}return t.\u0275mod=ue({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},providers:[Dh]}),t})();const Fh={addFlexToParent:!0,addOrientationBps:!1,disableDefaultBps:!1,disableVendorPrefixes:!1,serverLoaded:!1,useColumnBasisZero:!0,printWithBreakpoints:[],mediaTriggerAutoRestore:!0,ssrObserveBreakpoints:[]},qh=new It("Flex Layout token, config options for the library",{providedIn:"root",factory:()=>Fh}),Lh=new It("FlexLayoutServerLoaded",{providedIn:"root",factory:()=>!1}),Vh=new It("Flex Layout token, collect all breakpoints into one provider",{providedIn:"root",factory:()=>null});let Hh=(()=>{class t{}return t.\u0275mod=ue({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},imports:[[zh]]}),t})(),Bh=(()=>{class t{}return t.\u0275mod=ue({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},imports:[[zh,yl]]}),t})(),Wh=(()=>{class t{}return t.\u0275mod=ue({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},imports:[[zh]]}),t})(),$h=(()=>{class t{constructor(t,e){(function(t){return"server"===t})(e)&&!t&&console.warn("Warning: Flex Layout loaded on the server without FlexLayoutServerModule")}static withConfig(e,n=[]){return{ngModule:t,providers:e.serverLoaded?[{provide:qh,useValue:Object.assign(Object.assign({},Fh),e)},{provide:Vh,useValue:n,multi:!0},{provide:Lh,useValue:!0}]:[{provide:qh,useValue:Object.assign(Object.assign({},Fh),e)},{provide:Vh,useValue:n,multi:!0}]}}}return t.\u0275mod=ue({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)(Wt(Lh),Wt(na))},imports:[[Bh,Hh,Wh],Bh,Hh,Wh]}),t})();var Uh=n("5vqC");class Yh{constructor(t,e,n,i,r){this.element=t,this.newWidth=e,this.newHeight=n,this.oldWidth=i,this.oldHeight=r}}let Qh=(()=>{class t{constructor(t){this.element=t,this.resized=new Do}ngOnInit(){Uh.ResizeSensor&&(this.resizeSensor=new Uh.ResizeSensor(this.element.nativeElement,()=>this.onResized()))}ngOnDestroy(){this.resizeSensor&&this.resizeSensor.detach()}onResized(){const t=this.element.nativeElement.clientWidth,e=this.element.nativeElement.clientHeight;if(t===this.oldWidth&&e===this.oldHeight)return;const n=new Yh(this.element,t,e,this.oldWidth,this.oldHeight);this.oldWidth=this.element.nativeElement.clientWidth,this.oldHeight=this.element.nativeElement.clientHeight,this.resized.emit(n)}}return t.\u0275fac=function(e){return new(e||t)(us($s))},t.\u0275dir=de({type:t,selectors:[["","resized",""]],outputs:{resized:"resized"}}),t})(),Kh=(()=>{class t{}return t.\u0275mod=ue({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)},imports:[[]]}),t})();var Xh={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Zh=/([astvzqmhlc])([^astvzqmhlc]*)/gi,Gh=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,Jh=function(t){var e=[],n=String(t).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(Zh,(function(t,n,i){var r=n.toLowerCase(),s=function(t){var e=t.match(Gh);return e?e.map(Number):[]}(i),o=n;if("m"===r&&s.length>2&&(e.push([o].concat(s.splice(0,2))),r="l",o="m"===o?"l":"L"),s.length<Xh[r])return"";for(e.push([o].concat(s.splice(0,Xh[r])));s.length>=Xh[r]&&s.length&&Xh[r];)e.push([o].concat(s.splice(0,Xh[r])));return""})),e};function td(t){return function(t){if(Array.isArray(t))return ed(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ed(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ed(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ed(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function nd(t,e){var n=t.x*Math.cos(e)-t.y*Math.sin(e),i=t.y*Math.cos(e)+t.x*Math.sin(e);t.x=n,t.y=i}function id(t,e,n){t.x+=e,t.y+=n}function rd(t,e){t.x*=e,t.y*=e}"undefined"!=typeof window&&function(t){if(void 0!==t&&t.CanvasRenderingContext2D&&(!t.Path2D||!function(t){var e=t.document.createElement("canvas").getContext("2d"),n=new t.Path2D("M0 0 L1 1");return e.strokeStyle="red",e.lineWidth=1,e.stroke(n),255===e.getImageData(0,0,1,1).data[0]}(t))){var e=function(){function t(e){var n;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.segments=[],e&&e instanceof t?(n=this.segments).push.apply(n,td(e.segments)):e&&(this.segments=Jh(e))}var e;return(e=[{key:"addPath",value:function(e){var n;e&&e instanceof t&&(n=this.segments).push.apply(n,td(e.segments))}},{key:"moveTo",value:function(t,e){this.segments.push(["M",t,e])}},{key:"lineTo",value:function(t,e){this.segments.push(["L",t,e])}},{key:"arc",value:function(t,e,n,i,r,s){this.segments.push(["AC",t,e,n,i,r,!!s])}},{key:"arcTo",value:function(t,e,n,i,r){this.segments.push(["AT",t,e,n,i,r])}},{key:"ellipse",value:function(t,e,n,i,r,s,o,a){this.segments.push(["E",t,e,n,i,r,s,o,!!a])}},{key:"closePath",value:function(){this.segments.push(["Z"])}},{key:"bezierCurveTo",value:function(t,e,n,i,r,s){this.segments.push(["C",t,e,n,i,r,s])}},{key:"quadraticCurveTo",value:function(t,e,n,i){this.segments.push(["Q",t,e,n,i])}},{key:"rect",value:function(t,e,n,i){this.segments.push(["R",t,e,n,i])}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}(t.prototype,e),t}(),n=t.CanvasRenderingContext2D.prototype.fill,i=t.CanvasRenderingContext2D.prototype.stroke;t.CanvasRenderingContext2D.prototype.fill=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var r="nonzero";if(0===e.length||1===e.length&&"string"==typeof e[0])n.apply(this,e);else{2===arguments.length&&(r=e[1]);var o=e[0];s(this,o.segments),n.call(this,r)}},t.CanvasRenderingContext2D.prototype.stroke=function(t){t?(s(this,t.segments),i.call(this)):i.call(this)};var r=t.CanvasRenderingContext2D.prototype.isPointInPath;t.CanvasRenderingContext2D.prototype.isPointInPath=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("Path2D"===e[0].constructor.name){var i=e[1],o=e[2],a=e[3]||"nonzero",l=e[0];return s(this,l.segments),r.apply(this,[i,o,a])}return r.apply(this,e)},t.Path2D=e}function s(t,e){var n,i,r,s,o,a,l,c,u,h,d,f,p,y,g,m,v,x,b,_,w,k={x:0,y:0},S={x:0,y:0};t.beginPath();for(var M=0;M<e.length;++M){var E=e[M];switch("S"!==(g=E[0])&&"s"!==g&&"C"!==g&&"c"!==g&&(v=null,x=null),"T"!==g&&"t"!==g&&"Q"!==g&&"q"!==g&&(b=null,_=null),g){case"m":case"M":"m"===g?(d+=E[1],f+=E[2]):(d=E[1],f=E[2]),"M"!==g&&k||(k={x:d,y:f}),t.moveTo(d,f);break;case"l":t.lineTo(d+=E[1],f+=E[2]);break;case"L":t.lineTo(d=E[1],f=E[2]);break;case"H":t.lineTo(d=E[1],f);break;case"h":t.lineTo(d+=E[1],f);break;case"V":t.lineTo(d,f=E[1]);break;case"v":t.lineTo(d,f+=E[1]);break;case"a":case"A":"a"===g?(d+=E[6],f+=E[7]):(d=E[6],f=E[7]),p=E[1],y=E[2],l=E[3]*Math.PI/180,r=!!E[4],s=!!E[5],nd(a={x:(S.x-(o={x:d,y:f}).x)/2,y:(S.y-o.y)/2},-l),(c=a.x*a.x/(p*p)+a.y*a.y/(y*y))>1&&(p*=c=Math.sqrt(c),y*=c),u=p*p*y*y,h=p*p*a.y*a.y+y*y*a.x*a.x,rd(m={x:p*a.y/y,y:-y*a.x/p},s!==r?Math.sqrt((u-h)/h)||0:-Math.sqrt((u-h)/h)||0),i=Math.atan2((a.y-m.y)/y,(a.x-m.x)/p),n=Math.atan2(-(a.y+m.y)/y,-(a.x+m.x)/p),nd(m,l),id(m,(o.x+S.x)/2,(o.y+S.y)/2),t.save(),t.translate(m.x,m.y),t.rotate(l),t.scale(p,y),t.arc(0,0,1,i,n,!s),t.restore();break;case"C":t.bezierCurveTo(E[1],E[2],v=E[3],x=E[4],d=E[5],f=E[6]);break;case"c":t.bezierCurveTo(E[1]+d,E[2]+f,E[3]+d,E[4]+f,E[5]+d,E[6]+f),v=E[3]+d,x=E[4]+f,d+=E[5],f+=E[6];break;case"S":null!==v&&null!==v||(v=d,x=f),t.bezierCurveTo(2*d-v,2*f-x,E[1],E[2],E[3],E[4]),v=E[1],x=E[2],d=E[3],f=E[4];break;case"s":null!==v&&null!==v||(v=d,x=f),t.bezierCurveTo(2*d-v,2*f-x,E[1]+d,E[2]+f,E[3]+d,E[4]+f),v=E[1]+d,x=E[2]+f,d+=E[3],f+=E[4];break;case"Q":t.quadraticCurveTo(b=E[1],_=E[2],d=E[3],f=E[4]);break;case"q":t.quadraticCurveTo(b=E[1]+d,_=E[2]+f,d+=E[3],f+=E[4]);break;case"T":null!==b&&null!==b||(b=d,_=f),t.quadraticCurveTo(b=2*d-b,_=2*f-_,d=E[1],f=E[2]);break;case"t":null!==b&&null!==b||(b=d,_=f),t.quadraticCurveTo(b=2*d-b,_=2*f-_,d+=E[1],f+=E[2]);break;case"z":case"Z":d=k.x,f=k.y,k=void 0,t.closePath();break;case"AC":t.arc(d=E[1],f=E[2],E[3],i=E[4],n=E[5],w=E[6]);break;case"AT":t.arcTo(E[1],E[2],d=E[3],f=E[4],E[5]);break;case"E":d=E[1],f=E[2],p=E[3],y=E[4],l=E[5],i=E[6],n=E[7],w=E[8],t.save(),t.translate(d,f),t.rotate(l),t.scale(p,y),t.arc(0,0,1,i,n,w),t.restore();break;case"R":k={x:d=E[1],y:f=E[2]},t.rect(d,f,E[3],E[4])}S.x=d,S.y=f}}}(window);var sd=Jh,od=Object.prototype.hasOwnProperty,ad=Object.prototype.toString,ld=Object.defineProperty,cd=Object.getOwnPropertyDescriptor,ud=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===ad.call(t)},hd=function(t){if(!t||"[object Object]"!==ad.call(t))return!1;var e,n=od.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&od.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!i)return!1;for(e in t);return void 0===e||od.call(t,e)},dd=function(t,e){ld&&"__proto__"===e.name?ld(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},fd=function(t,e){if("__proto__"===e){if(!od.call(t,e))return;if(cd)return cd(t,e).value}return t[e]},pd=function t(){var e,n,i,r,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[1]||{},l=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});l<c;++l)if(null!=(e=arguments[l]))for(n in e)i=fd(a,n),a!==(r=fd(e,n))&&(u&&r&&(hd(r)||(s=ud(r)))?(s?(s=!1,o=i&&ud(i)?i:[]):o=i&&hd(i)?i:{},dd(a,{name:n,newValue:t(u,o,r)})):void 0!==r&&dd(a,{name:n,newValue:r}));return a},yd="1.3.0";function gd(t){return(gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function md(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vd(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function xd(t,e,n){return e&&vd(t.prototype,e),n&&vd(t,n),t}function bd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function wd(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_d(Object(n),!0).forEach((function(e){bd(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function kd(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Md(t,e)}function Sd(t){return(Sd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Md(t,e){return(Md=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ed(){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(t){return!1}}function Cd(t,e,n){return(Cd=Ed()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&Md(r,n.prototype),r}).apply(null,arguments)}function Td(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ad(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?Td(t):e}function Rd(t){var e=Ed();return function(){var n,i=Sd(t);if(e){var r=Sd(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Ad(this,n)}}function Nd(t,e,n){return(Nd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Sd(t)););return t}(t,e);if(i){var r=Object.getOwnPropertyDescriptor(i,e);return r.get?r.get.call(n):r.value}})(t,e,n||t)}function Od(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,s=void 0;try{for(var o,a=t[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(l){r=!0,s=l}finally{try{i||null==a.return||a.return()}finally{if(r)throw s}}return n}}(t,e)||Pd(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Id(t){return function(t){if(Array.isArray(t))return Dd(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Pd(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pd(t,e){if(t){if("string"==typeof t)return Dd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dd(t,e):void 0}}function Dd(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function jd(t){return!!t.changedTouches}function zd(t){return"number"==typeof t&&!isNaN(t)}function Fd(t){return"number"!=typeof t||isNaN(t)}function qd(t){for(var e=t.length,n=NaN,i=NaN,r=NaN,s=NaN,o=0;o<e;o++)n=isNaN(n)?t[o].x:Math.min(n,t[o].x),i=isNaN(i)?t[o].x:Math.max(i,t[o].x),r=isNaN(r)?t[o].y:Math.min(r,t[o].y),s=isNaN(s)?t[o].y:Math.max(s,t[o].y);return[n,r,i,s]}function Ld(t){return[{x:t.x1||0,y:t.y1||0},{x:t.x2||0,y:t.y2||0}]}function Vd(t){return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}]}function Hd(t){var e=Od(qd(t),4),n=e[0],i=e[1];return{x:n,y:i,width:e[2]-n,height:e[3]-i}}function Bd(t){return{x1:t[0].x,y1:t[0].y,x2:t[1].x,y2:t[1].y}}function Wd(t){var e=t||{},n=e.x,i=e.y,r=e.width,s=e.height,o=e.x1,a=e.x2,l=e.y1,c=e.y2,u=e.cy,h=e.r,d=e.vertices;return zd(e.cx)&&zd(u)&&zd(h)?"circle":zd(o)&&zd(a)&&zd(l)&&zd(c)?"line":zd(n)&&zd(i)&&zd(r)&&zd(s)?"rect":zd(n)&&zd(i)?"point":Array.isArray(d)?d.every((function(t){return Array.isArray(t)}))?"geopolygon":"polygon":null}function $d(t,e){return{x:e.x-t,y:e.y-t,width:e.width+t,height:e.height+t}}function Ud(t,e){var n=e.types,i=e.logger,r={},s=[];return Array.isArray(t)?s.push.apply(s,Id(t)):(i.warn('Deprecated: "data-source" configuration"'),s.push(t)),s.forEach((function(t,e){var s=n(t.type);if(s){var o=t.key;void 0===t.key&&(i.warn("Missing key for dataset. Using index '".concat(e,"' as key.")),o=e);var a=s({key:o,data:t.data,config:t.config});r[o]=a}})),function(t){return t?r[t]:r[Object.keys(r)[0]]}}var Yd=Math.PI,Qd=2*Yd,Kd=1e-6,Xd=Qd-Kd;function Zd(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Gd(){return new Zd}function Jd(t){return function(){return t}}Zd.prototype=Gd.prototype={constructor:Zd,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,s){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,e,n,i,r){var s=this._x1,o=this._y1,a=(n=+n)-(t=+t),l=(i=+i)-(e=+e),c=s-t,u=o-e,h=c*c+u*u;if((r=+r)<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>Kd)if(Math.abs(u*a-l*c)>Kd&&r){var d=n-s,f=i-o,p=a*a+l*l,y=d*d+f*f,g=Math.sqrt(p),m=Math.sqrt(h),v=r*Math.tan((Yd-Math.acos((p+h-y)/(2*g*m)))/2),x=v/m,b=v/g;Math.abs(x-1)>Kd&&(this._+="L"+(t+x*c)+","+(e+x*u)),this._+="A"+r+","+r+",0,0,"+ +(u*d>c*f)+","+(this._x1=t+b*a)+","+(this._y1=e+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,i,r,s){t=+t,e=+e,s=!!s;var o=(n=+n)*Math.cos(i),a=n*Math.sin(i),l=t+o,c=e+a,u=1^s,h=s?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Kd||Math.abs(this._y1-c)>Kd)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%Qd+Qd),h>Xd?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-a)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>Kd&&(this._+="A"+n+","+n+",0,"+ +(h>=Yd)+","+u+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var tf=Math.abs,ef=Math.atan2,nf=Math.cos,rf=Math.max,sf=Math.min,of=Math.sin,af=Math.sqrt,lf=1e-12,cf=Math.PI,uf=cf/2,hf=2*cf;function df(t){return t>1?0:t<-1?cf:Math.acos(t)}function ff(t){return t>=1?uf:t<=-1?-uf:Math.asin(t)}function pf(t){return t.innerRadius}function yf(t){return t.outerRadius}function gf(t){return t.startAngle}function mf(t){return t.endAngle}function vf(t){return t&&t.padAngle}function xf(t,e,n,i,r,s,o,a){var l=n-t,c=i-e,u=o-r,h=a-s,d=h*l-u*c;if(!(d*d<lf))return[t+(d=(u*(e-s)-h*(t-r))/d)*l,e+d*c]}function bf(t,e,n,i,r,s,o){var a=t-n,l=e-i,c=(o?s:-s)/af(a*a+l*l),u=c*l,h=-c*a,d=t+u,f=e+h,p=n+u,y=i+h,g=(d+p)/2,m=(f+y)/2,v=p-d,x=y-f,b=v*v+x*x,_=r-s,w=d*y-p*f,k=(x<0?-1:1)*af(rf(0,_*_*b-w*w)),S=(w*x-v*k)/b,M=(-w*v-x*k)/b,E=(w*x+v*k)/b,C=(-w*v+x*k)/b,T=S-g,A=M-m,R=E-g,N=C-m;return T*T+A*A>R*R+N*N&&(S=E,M=C),{cx:S,cy:M,x01:-u,y01:-h,x11:S*(r/_-1),y11:M*(r/_-1)}}function _f(t){this._context=t}function wf(t){return new _f(t)}function kf(t){return t[0]}function Sf(t){return t[1]}function Mf(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Ef(t){return t}_f.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Cf=Array.prototype.slice;function Tf(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Af(t){this._context=t}function Rf(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Nf(t,e){this._context=t,this._k=(1-e)/6}Af.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Tf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Tf(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Nf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Rf(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Rf(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Of=function t(e){function n(t){return new Nf(t,e)}return n.tension=function(e){return t(+e)},n}(0);function If(t,e){this._context=t,this._alpha=e}If.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(t,e,n){var i=t._x1,r=t._y1,s=t._x2,o=t._y2;if(t._l01_a>lf){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>lf){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,s,o,t._x2,t._y2)}(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Pf=function t(e){function n(t){return e?new If(t,e):new Nf(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Df(t){return t<0?-1:1}function jf(t,e,n){var i=t._x1-t._x0,r=e-t._x1,s=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0),a=(s*r+o*i)/(i+r);return(Df(s)+Df(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a))||0}function zf(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ff(t,e,n){var i=t._x0,r=t._x1,s=t._y1,o=(r-i)/3;t._context.bezierCurveTo(i+o,t._y0+o*e,r-o,s-o*n,r,s)}function qf(t){this._context=t}function Lf(t){this._context=new Vf(t)}function Vf(t){this._context=t}function Hf(t){this._context=t}function Bf(t){var e,n,i=t.length-1,r=new Array(i),s=new Array(i),o=new Array(i);for(r[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e<i-1;++e)r[e]=1,s[e]=4,o[e]=4*t[e]+2*t[e+1];for(r[i-1]=2,s[i-1]=7,o[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)s[e]-=n=r[e]/s[e-1],o[e]-=n*o[e-1];for(r[i-1]=o[i-1]/s[i-1],e=i-2;e>=0;--e)r[e]=(o[e]-r[e+1])/s[e];for(s[i-1]=(t[i]+r[i-1])/2,e=0;e<i-1;++e)s[e]=2*t[e+1]-r[e+1];return[r,s]}function Wf(t,e){this._context=t,this._t=e}function $f(t,e){if((r=t.length)>1)for(var n,i,r,s=1,o=t[e[0]],a=o.length;s<r;++s)for(i=o,o=t[e[s]],n=0;n<a;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Uf(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Yf(t,e){return t[e]}function Qf(t){for(var e,n=-1,i=0,r=t.length,s=-1/0;++n<r;)(e=+t[n][1])>s&&(s=e,i=n);return i}function Kf(t){for(var e,n=0,i=-1,r=t.length;++i<r;)(e=+t[i][1])&&(n+=e);return n}function Xf(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",i=arguments.length>2?arguments[2]:void 0,r={},s=t||{get:function(){},has:function(){return!1},default:function(){}};function o(t,e){if(!t||"string"!=typeof t)throw new TypeError("Invalid argument: key must be a non-empty string");return!(t in r)&&(r[t]=e,!0)}function a(t){return r[t]||s.get(t)}function l(t){return!!r[t]||s.has(t)}function c(t){var e=r[t];return delete r[t],e}function u(){return Object.keys(r)}function h(){return Object.keys(r).map((function(t){return r[t]}))}function d(t){return void 0!==t&&(e=t),e}function f(t,r){if(void 0!==r)return o(t,r);var s=a(t);return i&&void 0===s&&i.warn("".concat(t," does not exist in ").concat(n," registry")),s||a(e)}return e=s.default(),f.add=o,f.get=a,f.has=l,f.remove=c,f.getKeys=u,f.getValues=h,f.default=d,f.register=o,f}function Zf(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function Gf(t){return(t=Zf(Math.abs(t)))?t[1]:NaN}qf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ff(this,this._t0,zf(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ff(this,zf(this,n=jf(this,t,e)),n);break;default:Ff(this,this._t0,n=jf(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Lf.prototype=Object.create(qf.prototype)).point=function(t,e){qf.prototype.point.call(this,e,t)},Vf.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,s){this._context.bezierCurveTo(e,t,i,n,s,r)}},Hf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var i=Bf(t),r=Bf(e),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(i[0][s],r[0][s],i[1][s],r[1][s],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Wf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Jf,tp=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ep(t){if(!(e=tp.exec(t)))throw new Error("invalid format: "+t);var e;return new np({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function np(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ip(t,e){var n=Zf(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}ep.prototype=np.prototype,np.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var rp={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return ip(100*t,e)},r:ip,s:function(t,e){var n=Zf(t,e);if(!n)return t+"";var i=n[0],r=n[1],s=r-(Jf=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=i.length;return s===o?i:s>o?i+new Array(s-o+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+Zf(t,Math.max(0,e+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function sp(t){return t}var op,ap,lp,cp=Array.prototype.map,up=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function hp(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?sp:(e=cp.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,s=[],o=0,a=e[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),s.push(t.substring(r-=a,r+a)),!((l+=a+1)>i));)a=e[o=(o+1)%e.length];return s.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",s=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?sp:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(cp.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=ep(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,y=t.comma,g=t.precision,m=t.trim,v=t.type;"n"===v?(y=!0,v="g"):rp[v]||(void 0===g&&(g=12),m=!0,v="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var x="$"===d?r:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===d?s:/[%p]/.test(v)?l:"",_=rp[v],w=/[defgprs%]/.test(v);function k(t){var r,s,l,d=x,k=b;if("c"===v)k=_(t)+k,t="";else{var S=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:_(Math.abs(t),g),m&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i<n;++i)switch(t[i]){case".":r=e=i;break;case"0":0===r&&(r=i),e=i;break;default:if(!+t[i])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),d=(S?"("===h?h:c:"-"===h||"("===h?"":h)+d,k=("s"===v?up[8+Jf/3]:"")+k+(S&&"("===h?")":""),w)for(r=-1,s=t.length;++r<s;)if(48>(l=t.charCodeAt(r))||l>57){k=(46===l?o+t.slice(r+1):t.slice(r))+k,t=t.slice(0,r);break}}y&&!f&&(t=i(t,1/0));var M=d.length+t.length+k.length,E=M<p?new Array(p-M+1).join(e):"";switch(y&&f&&(t=i(E+t,E.length?p-k.length:1/0),E=""),n){case"<":t=d+t+k+E;break;case"=":t=d+E+t+k;break;case"^":t=E.slice(0,M=E.length>>1)+d+t+k+E.slice(M);break;default:t=E+d+t+k}return a(t)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=ep(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Gf(e)/3))),r=Math.pow(10,-i),s=up[8+i/3];return function(t){return n(r*t)+s}}}}op=hp({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),ap=op.format,lp=op.formatPrefix;var dp=new Date,fp=new Date;function pp(t,e,n,i){function r(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return r.floor=function(e){return t(e=new Date(+e)),e},r.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},r.round=function(t){var e=r(t),n=r.ceil(t);return t-e<n-t?e:n},r.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},r.range=function(n,i,s){var o,a=[];if(n=r.ceil(n),s=null==s?1:Math.floor(s),!(n<i&&s>0))return a;do{a.push(o=new Date(+n)),e(n,s),t(n)}while(o<n&&n<i);return a},r.filter=function(n){return pp((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,i){if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););}))},n&&(r.count=function(e,i){return dp.setTime(+e),fp.setTime(+i),t(dp),t(fp),Math.floor(n(dp,fp))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?function(e){return i(e)%t==0}:function(e){return r.count(0,e)%t==0}):r:null}),r}var yp=864e5,gp=6048e5,mp=pp((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/yp}),(function(t){return t.getDate()-1}));function vp(t){return pp((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/gp}))}var xp=vp(0),bp=vp(1);vp(2),vp(3);var _p=vp(4);vp(5),vp(6);var wp=pp((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));wp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?pp((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var kp=pp((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/yp}),(function(t){return t.getUTCDate()-1}));function Sp(t){return pp((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/gp}))}var Mp=Sp(0),Ep=Sp(1);Sp(2),Sp(3);var Cp=Sp(4);Sp(5),Sp(6);var Tp=pp((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));function Ap(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Rp(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Np(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Op(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,s=t.days,o=t.shortDays,a=t.months,l=t.shortMonths,c=qp(r),u=Lp(r),h=qp(s),d=Lp(s),f=qp(o),p=Lp(o),y=qp(a),g=Lp(a),m=qp(l),v=Lp(l),x={a:function(t){return o[t.getDay()]},A:function(t){return s[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:ay,e:ay,f:dy,g:ky,G:My,H:ly,I:cy,j:uy,L:hy,m:fy,M:py,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Qy,s:Ky,S:yy,u:gy,U:my,V:xy,w:by,W:_y,x:null,X:null,y:wy,Y:Sy,Z:Ey,"%":Yy},b={a:function(t){return o[t.getUTCDay()]},A:function(t){return s[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Cy,e:Cy,f:Oy,g:By,G:$y,H:Ty,I:Ay,j:Ry,L:Ny,m:Iy,M:Py,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Qy,s:Ky,S:Dy,u:jy,U:zy,V:qy,w:Ly,W:Vy,x:null,X:null,y:Hy,Y:Wy,Z:Uy,"%":Yy},_={a:function(t,e,n){var i=f.exec(e.slice(n));return i?(t.w=p[i[0].toLowerCase()],n+i[0].length):-1},A:function(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=d[i[0].toLowerCase()],n+i[0].length):-1},b:function(t,e,n){var i=m.exec(e.slice(n));return i?(t.m=v[i[0].toLowerCase()],n+i[0].length):-1},B:function(t,e,n){var i=y.exec(e.slice(n));return i?(t.m=g[i[0].toLowerCase()],n+i[0].length):-1},c:function(t,n,i){return S(t,e,n,i)},d:Zp,e:Zp,f:iy,g:Yp,G:Up,H:Jp,I:Jp,j:Gp,L:ny,m:Xp,M:ty,p:function(t,e,n){var i=c.exec(e.slice(n));return i?(t.p=u[i[0].toLowerCase()],n+i[0].length):-1},q:Kp,Q:sy,s:oy,S:ey,u:Hp,U:Bp,V:Wp,w:Vp,W:$p,x:function(t,e,i){return S(t,n,e,i)},X:function(t,e,n){return S(t,i,e,n)},y:Yp,Y:Up,Z:Qp,"%":ry};function w(t,e){return function(n){var i,r,s,o=[],a=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++a<c;)37===t.charCodeAt(a)&&(o.push(t.slice(l,a)),null!=(r=Ip[i=t.charAt(++a)])?i=t.charAt(++a):r="e"===i?" ":"0",(s=e[i])&&(i=s(n,r)),o.push(i),l=a+1);return o.push(t.slice(l,a)),o.join("")}}function k(t,e){return function(n){var i,r,s=Np(1900,void 0,1);if(S(s,t,n+="",0)!=n.length)return null;if("Q"in s)return new Date(s.Q);if("s"in s)return new Date(1e3*s.s+("L"in s?s.L:0));if(e&&!("Z"in s)&&(s.Z=0),"p"in s&&(s.H=s.H%12+12*s.p),void 0===s.m&&(s.m="q"in s?s.q:0),"V"in s){if(s.V<1||s.V>53)return null;"w"in s||(s.w=1),"Z"in s?(r=(i=Rp(Np(s.y,0,1))).getUTCDay(),i=r>4||0===r?Ep.ceil(i):Ep(i),i=kp.offset(i,7*(s.V-1)),s.y=i.getUTCFullYear(),s.m=i.getUTCMonth(),s.d=i.getUTCDate()+(s.w+6)%7):(r=(i=Ap(Np(s.y,0,1))).getDay(),i=r>4||0===r?bp.ceil(i):bp(i),i=mp.offset(i,7*(s.V-1)),s.y=i.getFullYear(),s.m=i.getMonth(),s.d=i.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),r="Z"in s?Rp(Np(s.y,0,1)).getUTCDay():Ap(Np(s.y,0,1)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+7*s.W-(r+5)%7:s.w+7*s.U-(r+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,Rp(s)):Ap(s)}}function S(t,e,n,i){for(var r,s,o=0,a=e.length,l=n.length;o<a;){if(i>=l)return-1;if(37===(r=e.charCodeAt(o++))){if(r=e.charAt(o++),!(s=_[r in Ip?e.charAt(o++):r])||(i=s(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return x.x=w(n,x),x.X=w(i,x),x.c=w(e,x),b.x=w(n,b),b.X=w(i,b),b.c=w(e,b),{format:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}Tp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?pp((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Ip={"-":"",_:" ",0:"0"},Pp=/^\s*\d+/,Dp=/^%/,jp=/[\\^$*+?|[\]().{}]/g;function zp(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",s=r.length;return i+(s<n?new Array(n-s+1).join(e)+r:r)}function Fp(t){return t.replace(jp,"\\$&")}function qp(t){return new RegExp("^(?:"+t.map(Fp).join("|")+")","i")}function Lp(t){for(var e={},n=-1,i=t.length;++n<i;)e[t[n].toLowerCase()]=n;return e}function Vp(t,e,n){var i=Pp.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Hp(t,e,n){var i=Pp.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function Bp(t,e,n){var i=Pp.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function Wp(t,e,n){var i=Pp.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function $p(t,e,n){var i=Pp.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function Up(t,e,n){var i=Pp.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Yp(t,e,n){var i=Pp.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Qp(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Kp(t,e,n){var i=Pp.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function Xp(t,e,n){var i=Pp.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function Zp(t,e,n){var i=Pp.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Gp(t,e,n){var i=Pp.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function Jp(t,e,n){var i=Pp.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function ty(t,e,n){var i=Pp.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function ey(t,e,n){var i=Pp.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function ny(t,e,n){var i=Pp.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function iy(t,e,n){var i=Pp.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function ry(t,e,n){var i=Dp.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function sy(t,e,n){var i=Pp.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function oy(t,e,n){var i=Pp.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function ay(t,e){return zp(t.getDate(),e,2)}function ly(t,e){return zp(t.getHours(),e,2)}function cy(t,e){return zp(t.getHours()%12||12,e,2)}function uy(t,e){return zp(1+mp.count(wp(t),t),e,3)}function hy(t,e){return zp(t.getMilliseconds(),e,3)}function dy(t,e){return hy(t,e)+"000"}function fy(t,e){return zp(t.getMonth()+1,e,2)}function py(t,e){return zp(t.getMinutes(),e,2)}function yy(t,e){return zp(t.getSeconds(),e,2)}function gy(t){var e=t.getDay();return 0===e?7:e}function my(t,e){return zp(xp.count(wp(t)-1,t),e,2)}function vy(t){var e=t.getDay();return e>=4||0===e?_p(t):_p.ceil(t)}function xy(t,e){return t=vy(t),zp(_p.count(wp(t),t)+(4===wp(t).getDay()),e,2)}function by(t){return t.getDay()}function _y(t,e){return zp(bp.count(wp(t)-1,t),e,2)}function wy(t,e){return zp(t.getFullYear()%100,e,2)}function ky(t,e){return zp((t=vy(t)).getFullYear()%100,e,2)}function Sy(t,e){return zp(t.getFullYear()%1e4,e,4)}function My(t,e){var n=t.getDay();return zp((t=n>=4||0===n?_p(t):_p.ceil(t)).getFullYear()%1e4,e,4)}function Ey(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+zp(e/60|0,"0",2)+zp(e%60,"0",2)}function Cy(t,e){return zp(t.getUTCDate(),e,2)}function Ty(t,e){return zp(t.getUTCHours(),e,2)}function Ay(t,e){return zp(t.getUTCHours()%12||12,e,2)}function Ry(t,e){return zp(1+kp.count(Tp(t),t),e,3)}function Ny(t,e){return zp(t.getUTCMilliseconds(),e,3)}function Oy(t,e){return Ny(t,e)+"000"}function Iy(t,e){return zp(t.getUTCMonth()+1,e,2)}function Py(t,e){return zp(t.getUTCMinutes(),e,2)}function Dy(t,e){return zp(t.getUTCSeconds(),e,2)}function jy(t){var e=t.getUTCDay();return 0===e?7:e}function zy(t,e){return zp(Mp.count(Tp(t)-1,t),e,2)}function Fy(t){var e=t.getUTCDay();return e>=4||0===e?Cp(t):Cp.ceil(t)}function qy(t,e){return t=Fy(t),zp(Cp.count(Tp(t),t)+(4===Tp(t).getUTCDay()),e,2)}function Ly(t){return t.getUTCDay()}function Vy(t,e){return zp(Ep.count(Tp(t)-1,t),e,2)}function Hy(t,e){return zp(t.getUTCFullYear()%100,e,2)}function By(t,e){return zp((t=Fy(t)).getUTCFullYear()%100,e,2)}function Wy(t,e){return zp(t.getUTCFullYear()%1e4,e,4)}function $y(t,e){var n=t.getUTCDay();return zp((t=n>=4||0===n?Cp(t):Cp.ceil(t)).getUTCFullYear()%1e4,e,4)}function Uy(){return"+0000"}function Yy(){return"%"}function Qy(t){return+t}function Ky(t){return Math.floor(+t/1e3)}var Xy=Xf();Xy("d3-number",(function(t,e,n){var i,r;function s(t){return r(t)}function o(){s.locale({decimal:n||".",thousands:e||",",grouping:[3],currency:["$",""]})}return s.locale=function(e){return i=hp(e),r=i.format(t),this},o(),s.format=function(t,r,s,a){return(s||a)&&(e=s,n=a,o()),i.format(t)(r)},s.pattern=function(e){return e&&(t=e,r=i.format(e)),t},s})),Xy("d3-time",(function(t){var e=Op({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=e.format(t);function i(t){return n(t)}return i.format=function(t,n){return e.format(t)(n)},i.locale=function(){return e=Op.apply(void 0,arguments),n=e.format(t),this},i.parse=function(t,n){return e.parse(t)(n)},i.parsePattern=function(t){return e.parse(t)},i}));var Zy={id:function(t){return"".concat(t.source,"/").concat(t.key||t.title)},key:function(t){return String(t.key||t.title)},tags:function(t){return t.tags},min:function(t){return t.min},max:function(t){return t.max},type:function(t){return t.type},title:function(t){return String(t.title)},values:function(t){return t.values},value:function(t){return t},label:function(t){return t},formatter:function(t){return function(t){if("function"==typeof t.formatter)return t.formatter();var e=t.formatter||{};return Xy(e.type||"d3-number")(e.format||"")}(t)}};function Gy(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.id,i=void 0===n?Zy.id:n,r=e.key,s=void 0===r?Zy.key:r,o=e.min,a=void 0===o?Zy.min:o,l=e.max,c=void 0===l?Zy.max:l,u=e.type,h=void 0===u?Zy.type:u,d=e.tags,f=void 0===d?Zy.tags:d,p=e.title,y=void 0===p?Zy.title:p,g=e.values,m=void 0===g?Zy.values:g,v=e.value,x=void 0===v?Zy.value:v,b=e.label,_=void 0===b?Zy.label:b,w=e.formatter,k=void 0===w?Zy.formatter:w,S={id:function(){return i(t)},key:function(){return s(t)},raw:function(){return t},tags:function(){return f(t)},type:function(){return h(t)},min:function(){return a(t)},max:function(){return c(t)},title:function(){return y(t)},items:function(){return m(t)},formatter:function(){return k(t)},value:x,label:_};return S}var Jy={diverging:function(t,e){if((a=t.length)>0)for(var n,i,r,s,o,a,l=0,c=t[e[0]].length;l<c;++l)for(s=o=0,n=0;n<a;++n)(r=(i=t[e[n]][l])[1]-i[0])>=0?(i[0]=s,i[1]=s+=r):r<0?(i[1]=o,i[0]=o+=r):i[0]=s},none:$f,silhouette:function(t,e){if((n=t.length)>0){for(var n,i=0,r=t[e[0]],s=r.length;i<s;++i){for(var o=0,a=0;o<n;++o)a+=t[o][i][1]||0;r[i][1]+=r[i][0]=-a/2}$f(t,e)}},expand:function(t,e){if((i=t.length)>0){for(var n,i,r,s=0,o=t[0].length;s<o;++s){for(r=n=0;n<i;++n)r+=t[n][s][1]||0;if(r)for(n=0;n<i;++n)t[n][s][1]/=r}$f(t,e)}},wiggle:function(t,e){if((r=t.length)>0&&(i=(n=t[e[0]]).length)>0){for(var n,i,r,s=0,o=1;o<i;++o){for(var a=0,l=0,c=0;a<r;++a){for(var u=t[e[a]],h=u[o][1]||0,d=(h-(u[o-1][1]||0))/2,f=0;f<a;++f){var p=t[e[f]];d+=(p[o][1]||0)-(p[o-1][1]||0)}l+=h,c+=d*h}n[o-1][1]+=n[o-1][0]=s,l&&(s-=c/l)}n[o-1][1]+=n[o-1][0]=s,$f(t,e)}}},tg={ascending:function(t){var e=t.map(Kf);return Uf(t).sort((function(t,n){return e[t]-e[n]}))},insideout:function(t){var e,n,i=t.length,r=t.map(Kf),s=function(t){var e=t.map(Qf);return Uf(t).sort((function(t,n){return e[t]-e[n]}))}(t),o=0,a=0,l=[],c=[];for(e=0;e<i;++e)n=s[e],o<a?(o+=r[n],l.push(n)):(a+=r[n],c.push(n));return c.reverse().concat(l)},none:Uf,reverse:function(t){return Uf(t).reverse()}};function eg(t,e,n){for(var i={},r=e.stackKey,s=e.value,o=e.startProp||"start",a=e.endProp||"end",l=e.offset||"none",c=e.order||"none",u=e.valueRef||"",h=0,d={},f=0;f<t.items.length;f++){var p=t.items[f],y=u?p[u]:null;if(y&&y.source){var g="".concat(y.source.key||"","/").concat(y.source.field);d[g]||(d[g]=y.source)}var m=r(p);i[m]=i[m]||{items:[]},i[m].items.push(p),h=Math.max(h,i[m].items.length)}for(var v=Array.apply(null,{length:h}).map(Number.call,Number),x=Object.keys(i).map((function(t){return i[t].items})),b=function(){var t=Jd([]),e=Uf,n=$f,i=Yf;function r(r){var s,o,a=t.apply(this,arguments),l=r.length,c=a.length,u=new Array(c);for(s=0;s<c;++s){for(var h,d=a[s],f=u[s]=new Array(l),p=0;p<l;++p)f[p]=h=[0,+i(r[p],d,p,r)],h.data=r[p];f.key=d}for(s=0,o=e(u);s<c;++s)u[o[s]].index=s;return n(u,o),u}return r.keys=function(e){return arguments.length?(t="function"==typeof e?e:Jd(Cf.call(e)),r):t},r.value=function(t){return arguments.length?(i="function"==typeof t?t:Jd(+t),r):i},r.order=function(t){return arguments.length?(e=null==t?Uf:"function"==typeof t?t:Jd(Cf.call(t)),r):e},r.offset=function(t){return arguments.length?(n=null==t?$f:t,r):n},r}().keys(v).value((function(t,e){return t[e]?s(t[e]):0})).order(tg[c]).offset(Jy[l])(x),_=[],w=0;w<b.length;w++)for(var k=b[w],S=0;S<k.length;S++){var M=k[S],E=k[S].data[k.key];E&&(E[o]={value:M[0]},E[a]={value:M[1]},_.push(M[0],M[1]))}var C=Object.keys(d).map((function(t){var e=n(d[t].key);return e?e.field(d[t].field):null})).filter((function(t){return!!t})),T=Gy({title:C.map((function(t){return t.title()})).join(", "),min:Math.min.apply(Math,_),max:Math.max.apply(Math,_),type:"measure",formatter:C[0]?C[0].formatter:void 0});t.fields.push(T)}function ng(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={},r=n.logger;if(Array.isArray(t))i.items=t.map((function(t){return{value:t,label:String(t)}}));else if(t){if("collection"in t)i=wd({},e.collection(t.collection));else{var s=e.dataset?e.dataset(t.source):null,o=t.value||function(t){return t},a=t.label||function(t){return t};if(t.groupBy||t.mapTo)r.warn('Deprecated "data" configuration',t),i.items=[];else if(t.hierarchy)i.root=s.hierarchy?s.hierarchy(t.hierarchy):null,i.fields=s.fields();else if(t.items)i.items=t.items.map((function(t){return{value:o(t),label:String(a(t))}}));else if(t.extract){var l=Array.isArray(t.extract)?t.extract:[t.extract];i.items=[];var c,u=[];l.forEach((function(t){var n,r=t.source?e.dataset(t.source):s;r&&((n=i.items).push.apply(n,Id(r.extract(t))),void 0!==t.field&&u.push(r.field(t.field)))})),u.length&&(i.fields=u),t.amend&&Array.isArray(t.amend)&&(c=i.items).push.apply(c,Id(t.amend))}else if(void 0!==t.field&&s){var h=s.field(t.field);h&&(i.fields||(i.fields=[]),i.fields.push(h),"value"in t||(a=h.label||function(t){return t},i.value=o=h.value||function(t){return t}),i.items=h.items().map((function(e){return{value:o(e),label:String(a(e)),source:{field:t.field}}})))}else t.fields&&t.fields.forEach((function(t){var n,r="object"===gd(t)&&t.source?e.dataset(t.source):s;r&&(n="object"===gd(t)&&void 0!==t.field?r.field(t.field):r.field(t))&&(i.fields||(i.fields=[]),i.fields.push(n))}));i.items&&t.map&&(i.items=i.items.map(t.map))}t&&t.stack&&eg(i,t.stack,e.dataset)}return t&&!Array.isArray(t)&&"function"==typeof t.filter&&i.items&&(i.items=i.items.filter(t.filter)),t&&!Array.isArray(t)&&"function"==typeof t.sort&&i.items&&(i.items=i.items.sort(t.sort)),i}function ig(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ng,r={};(t||[]).forEach((function(t){if(!t.key)throw new Error('Data collection is missing "key" property');if("object"===gd(t.data)&&"collection"in t.data)throw new Error("Data config for collections may not reference other collections");r[t.key]=function(){return i(t.data,e,n)}}));var s=function(t){var e,n;if("string"==typeof t?e=t:"object"===gd(t)&&(e=t.key,n=t),!(e in r))throw new Error("Unknown data collection: ".concat(e));"function"==typeof r[e]&&(r[e]=r[e]());var i=r[e];if(n&&n.fields&&n.fields.filter){var s=i.fields.filter(n.fields.filter);i.fields.length!==s.length&&(i=pd(i,{fields:s}))}return i};return s}function rg(t,e,n){var i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ng;if(t.data){var s=r(t.data,e,n);if(s&&s.fields&&s.fields[0])return s.fields[0].formatter()}if(i=t.formatter?"".concat(t.formatter,"-").concat(t.type||"number"):t.type||"d3-number",n.formatter.has(i)){var o=n.formatter.get(i)(t.format||"");return o}throw new Error("Formatter of type '".concat(i,"' was not found"))}function sg(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:rg,r={};return{get:function(s){var o;return"string"==typeof s&&t[s]?o=s:"object"===gd(s)&&"formatter"in s&&t[s.formatter]?o=s.formatter:"object"===gd(s)&&"type"in s&&t[s.type]&&(o=s.type),o?(r[o]=r[o]||i(t[o],e,n),r[o]):i(s||{},e,n)},all:function(){return Object.keys(t).forEach(this.get),r}}}function og(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var ag,lg=(1===(ag=og).length&&(ag=function(t){return function(e,n){return og(t(e),n)}}(ag)),{left:function(t,e,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n<i;){var r=n+i>>>1;ag(t[r],e)<0?n=r+1:i=r}return n},right:function(t,e,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n<i;){var r=n+i>>>1;ag(t[r],e)>0?i=r:n=r+1}return n}}).right;function cg(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((e-t)/n)),s=new Array(r);++i<r;)s[i]=t+i*n;return s}var ug=Math.sqrt(50),hg=Math.sqrt(10),dg=Math.sqrt(2);function fg(t,e,n){var i=(e-t)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),s=i/Math.pow(10,r);return r>=0?(s>=ug?10:s>=hg?5:s>=dg?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(s>=ug?10:s>=hg?5:s>=dg?2:1)}function pg(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var yg="$";function gg(){}function mg(t,e){var n=new gg;if(t instanceof gg)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var i,r=-1,s=t.length;if(null==e)for(;++r<s;)n.set(r,t[r]);else for(;++r<s;)n.set(e(i=t[r],r,t),i)}else if(t)for(var o in t)n.set(o,t[o]);return n}function vg(){}gg.prototype=mg.prototype={constructor:gg,has:function(t){return yg+t in this},get:function(t){return this[yg+t]},set:function(t,e){return this[yg+t]=e,this},remove:function(t){var e=yg+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===yg&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===yg&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===yg&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===yg&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===yg&&++t;return t},empty:function(){for(var t in this)if(t[0]===yg)return!1;return!0},each:function(t){for(var e in this)e[0]===yg&&t(this[e],e.slice(1),this)}};var xg=mg.prototype;vg.prototype={constructor:vg,has:xg.has,add:function(t){return this[yg+(t+="")]=t,this},remove:xg.remove,clear:xg.clear,values:xg.keys,size:xg.size,empty:xg.empty,each:xg.each};var bg=Array.prototype,_g=bg.map,wg=bg.slice,kg={name:"implicit"};function Sg(){var t=mg(),e=[],n=[],i=kg;function r(r){var s=r+"",o=t.get(s);if(!o){if(i!==kg)return i;t.set(s,o=e.push(r))}return n[(o-1)%n.length]}return r.domain=function(n){if(!arguments.length)return e.slice();e=[],t=mg();for(var i,s,o=-1,a=n.length;++o<a;)t.has(s=(i=n[o])+"")||t.set(s,e.push(i));return r},r.range=function(t){return arguments.length?(n=wg.call(t),r):n.slice()},r.unknown=function(t){return arguments.length?(i=t,r):i},r.copy=function(){return Sg(e,n).unknown(i)},pg.apply(r,arguments),r}function Mg(){var t,e,n=Sg().unknown(void 0),i=n.domain,r=n.range,s=[0,1],o=!1,a=0,l=0,c=.5;function u(){var n=i().length,u=s[1]<s[0],h=s[u-0],d=s[1-u];t=(d-h)/Math.max(1,n-a+2*l),o&&(t=Math.floor(t)),h+=(d-h-t*(n-a))*c,e=t*(1-a),o&&(h=Math.round(h),e=Math.round(e));var f=cg(n).map((function(e){return h+t*e}));return r(u?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),u()):i()},n.range=function(t){return arguments.length?(s=[+t[0],+t[1]],u()):s.slice()},n.rangeRound=function(t){return s=[+t[0],+t[1]],o=!0,u()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,u()):o},n.padding=function(t){return arguments.length?(a=Math.min(1,l=+t),u()):a},n.paddingInner=function(t){return arguments.length?(a=Math.min(1,t),u()):a},n.paddingOuter=function(t){return arguments.length?(l=+t,u()):l},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),u()):c},n.copy=function(){return Mg(i(),s).round(o).paddingInner(a).paddingOuter(l).align(c)},pg.apply(u(),arguments)}function Eg(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Cg(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Tg(){}var Ag=.7,Rg=1/Ag,Ng="\\s*([+-]?\\d+)\\s*",Og="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ig="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pg=/^#([0-9a-f]{3,8})$/,Dg=new RegExp("^rgb\\("+[Ng,Ng,Ng]+"\\)$"),jg=new RegExp("^rgb\\("+[Ig,Ig,Ig]+"\\)$"),zg=new RegExp("^rgba\\("+[Ng,Ng,Ng,Og]+"\\)$"),Fg=new RegExp("^rgba\\("+[Ig,Ig,Ig,Og]+"\\)$"),qg=new RegExp("^hsl\\("+[Og,Ig,Ig]+"\\)$"),Lg=new RegExp("^hsla\\("+[Og,Ig,Ig,Og]+"\\)$"),Vg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Hg(){return this.rgb().formatHex()}function Bg(){return this.rgb().formatRgb()}function Wg(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Pg.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?$g(e):3===n?new Kg(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Ug(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Ug(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Dg.exec(t))?new Kg(e[1],e[2],e[3],1):(e=jg.exec(t))?new Kg(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=zg.exec(t))?Ug(e[1],e[2],e[3],e[4]):(e=Fg.exec(t))?Ug(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=qg.exec(t))?Jg(e[1],e[2]/100,e[3]/100,1):(e=Lg.exec(t))?Jg(e[1],e[2]/100,e[3]/100,e[4]):Vg.hasOwnProperty(t)?$g(Vg[t]):"transparent"===t?new Kg(NaN,NaN,NaN,0):null}function $g(t){return new Kg(t>>16&255,t>>8&255,255&t,1)}function Ug(t,e,n,i){return i<=0&&(t=e=n=NaN),new Kg(t,e,n,i)}function Yg(t){return t instanceof Tg||(t=Wg(t)),t?new Kg((t=t.rgb()).r,t.g,t.b,t.opacity):new Kg}function Qg(t,e,n,i){return 1===arguments.length?Yg(t):new Kg(t,e,n,null==i?1:i)}function Kg(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Xg(){return"#"+Gg(this.r)+Gg(this.g)+Gg(this.b)}function Zg(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Gg(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Jg(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new em(t,e,n,i)}function tm(t){if(t instanceof em)return new em(t.h,t.s,t.l,t.opacity);if(t instanceof Tg||(t=Wg(t)),!t)return new em;if(t instanceof em)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),o=NaN,a=s-r,l=(s+r)/2;return a?(o=e===s?(n-i)/a+6*(n<i):n===s?(i-e)/a+2:(e-n)/a+4,a/=l<.5?s+r:2-s-r,o*=60):a=l>0&&l<1?0:o,new em(o,a,l,t.opacity)}function em(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function nm(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function im(t){return function(){return t}}function rm(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):im(isNaN(t)?e:t)}Eg(Tg,Wg,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Hg,formatHex:Hg,formatHsl:function(){return tm(this).formatHsl()},formatRgb:Bg,toString:Bg}),Eg(Kg,Qg,Cg(Tg,{brighter:function(t){return t=null==t?Rg:Math.pow(Rg,t),new Kg(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Ag:Math.pow(Ag,t),new Kg(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xg,formatHex:Xg,formatRgb:Zg,toString:Zg})),Eg(em,(function(t,e,n,i){return 1===arguments.length?tm(t):new em(t,e,n,null==i?1:i)}),Cg(Tg,{brighter:function(t){return t=null==t?Rg:Math.pow(Rg,t),new em(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Ag:Math.pow(Ag,t),new em(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Kg(nm(t>=240?t-240:t+120,r,i),nm(t,r,i),nm(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var sm=function t(e){var n=function(t){return 1==(t=+t)?rm:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):im(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=Qg(t)).r,(e=Qg(e)).r),r=n(t.g,e.g),s=n(t.b,e.b),o=rm(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=s(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function om(t,e){e||(e=[]);var n,i=t?Math.min(e.length,t.length):0,r=e.slice();return function(s){for(n=0;n<i;++n)r[n]=t[n]*(1-s)+e[n]*s;return r}}function am(t,e){var n,i=e?e.length:0,r=t?Math.min(i,t.length):0,s=new Array(r),o=new Array(i);for(n=0;n<r;++n)s[n]=pm(t[n],e[n]);for(;n<i;++n)o[n]=e[n];return function(t){for(n=0;n<r;++n)o[n]=s[n](t);return o}}function lm(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function cm(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function um(t,e){var n,i={},r={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=pm(t[n],e[n]):r[n]=e[n];return function(t){for(n in i)r[n]=i[n](t);return r}}var hm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dm=new RegExp(hm.source,"g");function fm(t,e){var n,i,r,s=hm.lastIndex=dm.lastIndex=0,o=-1,a=[],l=[];for(t+="",e+="";(n=hm.exec(t))&&(i=dm.exec(e));)(r=i.index)>s&&(r=e.slice(s,r),a[o]?a[o]+=r:a[++o]=r),(n=n[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:cm(n,i)})),s=dm.lastIndex;return s<e.length&&(r=e.slice(s),a[o]?a[o]+=r:a[++o]=r),a.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,i=0;i<e;++i)a[(n=l[i]).i]=n.x(t);return a.join("")})}function pm(t,e){var n,i,r=typeof e;return null==e||"boolean"===r?im(e):("number"===r?cm:"string"===r?(n=Wg(e))?(e=n,sm):fm:e instanceof Wg?sm:e instanceof Date?lm:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?am:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?um:cm:om))(t,e)}function ym(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function gm(t){return+t}var mm=[0,1];function vm(t){return t}function xm(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function bm(t){var e,n=t[0],i=t[t.length-1];return n>i&&(e=n,n=i,i=e),function(t){return Math.max(n,Math.min(i,t))}}function _m(t,e,n){var i=t[0],r=t[1],s=e[0],o=e[1];return r<i?(i=xm(r,i),s=n(o,s)):(i=xm(i,r),s=n(s,o)),function(t){return s(i(t))}}function wm(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),s=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<i;)r[o]=xm(t[o],t[o+1]),s[o]=n(e[o],e[o+1]);return function(e){var n=lg(t,e,1,i)-1;return s[n](r[n](e))}}function km(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Sm(t,e){return function(){var t,e,n,i,r,s,o=mm,a=mm,l=pm,c=vm;function u(){return i=Math.min(o.length,a.length)>2?wm:_m,r=s=null,h}function h(e){return isNaN(e=+e)?n:(r||(r=i(o.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((s||(s=i(a,o.map(t),cm)))(n)))},h.domain=function(t){return arguments.length?(o=_g.call(t,gm),c===vm||(c=bm(o)),u()):o.slice()},h.range=function(t){return arguments.length?(a=wg.call(t),u()):a.slice()},h.rangeRound=function(t){return a=wg.call(t),l=ym,u()},h.clamp=function(t){return arguments.length?(c=t?bm(o):vm,h):c!==vm},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,u()}}()(t,e)}function Mm(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var i,r,s,o,a=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((i=e<t)&&(r=t,t=e,e=r),0===(o=fg(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),s=new Array(r=Math.ceil(e-t+1));++a<r;)s[a]=(t+a)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),s=new Array(r=Math.ceil(t-e+1));++a<r;)s[a]=(t-a)/o;return i&&s.reverse(),s}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return function(t,e,n,i){var r,s=function(t,e,n){var i=Math.abs(e-t)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),s=i/r;return s>=ug?r*=10:s>=hg?r*=5:s>=dg&&(r*=2),e<t?-r:r}(t,e,n);switch((i=ep(null==i?",f":i)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Gf(e)/3)))-Gf(Math.abs(t)))}(s,o))||(i.precision=r),lp(i,o);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Gf(e)-Gf(t))+1}(s,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(t){return Math.max(0,-Gf(Math.abs(t)))}(s))||(i.precision=r-2*("%"===i.type))}return ap(i)}(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,r=e(),s=0,o=r.length-1,a=r[s],l=r[o];return l<a&&(i=a,a=l,l=i,i=s,s=o,o=i),(i=fg(a,l,n))>0?i=fg(a=Math.floor(a/i)*i,l=Math.ceil(l/i)*i,n):i<0&&(i=fg(a=Math.ceil(a*i)/i,l=Math.floor(l*i)/i,n)),i>0?(r[s]=Math.floor(a/i)*i,r[o]=Math.ceil(l/i)*i,e(r)):i<0&&(r[s]=Math.ceil(a*i)/i,r[o]=Math.floor(l*i)/i,e(r)),t},t}function Em(){var t=Sm(vm,vm);return t.copy=function(){return km(t,Em())},pg.apply(t,arguments),Mm(t)}function Cm(){var t,e=[.5],n=[0,1],i=1;function r(r){return r<=r?n[lg(e,r,0,i)]:t}return r.domain=function(t){return arguments.length?(e=wg.call(t),i=Math.min(e.length,n.length-1),r):e.slice()},r.range=function(t){return arguments.length?(n=wg.call(t),i=Math.min(e.length,n.length-1),r):n.slice()},r.invertExtent=function(t){var i=n.indexOf(t);return[e[i-1],e[i]]},r.unknown=function(e){return arguments.length?(t=e,r):t},r.copy=function(){return Cm().domain(e).range(n).unknown(t)},pg.apply(r,arguments)}function Tm(t){return void 0===t?function(t){return t}:function(e){return t(e)}}function Am(t){return Math.max(0,Math.min(1,t))}function Rm(t){return"object"===gd(t)}function Nm(t,e,n){for(var i=Math.abs(e-n)/(t+1),r=[],s=1;s<=t;s++){var o=s*i;r.push(e<n?e+o:e-o)}return r}function Om(t,e,n){if(1===t.length)return t;for(var i=t.concat([]),r=0;r<t.length;r++){var s=t[r],o=t[r+1];0===r&&s!==n.start()?(i.push.apply(i,Id(Nm(e,s,o))),i.push.apply(i,Id(Nm(e,s-=o-s,o=t[r])))):r===t.length-1&&o!==n.end()?i.push.apply(i,Id(Nm(e,s,o=s+(s-t[r-1])))):i.push.apply(i,Id(Nm(e,s,o)))}return i.filter((function(t){return t>=n.min()&&t<=n.max()}))}function Im(t){var e=t.distance,n=t.scale,i=t.minorCount,r=void 0===i?0:i,s=t.unitDivider,o=void 0===s?100:s,a=t.formatter,l=void 0===a?void 0:a,c=Fd(o)||Fd(e)?2:Math.max(e/o,2),u=Math.min(1e3,Math.round(c)),h=n.ticks(u);h.length<=1&&(h=n.ticks(u+1));var d=r>0?Om(h,r,n):h;d.sort((function(t,e){return t-e}));var f=d.map(Tm(l));return d.map((function(t,e){var i=n(t);return{position:i,start:i,end:i,label:f[e],value:t,isMinor:-1===h.indexOf(t)}}))}function Pm(t){var e=t.distance,n=t.scale,i=t.minorCount,r=void 0===i?0:i,s=t.unitDivider,o=void 0===s?100:s,a=t.formatter,l=void 0===a?void 0:a,c=Fd(o)||Fd(e)?2:Math.max(e/o,2),u=Math.min(1e3,Math.round(c));n.nice(u>10?10:u);var h=n.ticks(u),d=r>0?Om(h,r,n):h;d.sort((function(t,e){return t-e}));var f=d.map(Tm(l));return d.map((function(t,e){var i=n(t);return{position:i,start:i,end:i,label:f[e],value:t,isMinor:-1===h.indexOf(t)}}))}function Dm(t){var e,n=t.settings,i=t.scale,r=t.distance,s=t.formatter,o=void 0===s?function(t){return t}:s,a=n.minorTicks&&!Fd(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;return Array.isArray(n.ticks.values)?e=function(t){var e=t.scale,n=t.formatter,i=void 0===n?function(t){return t}:n;return t.values.sort((function(t,e){return(Rm(t)?t.value:t)-(Rm(e)?e.value:e)})).filter((function(t,n,i){var r=Rm(t)?t.value:t;return r<=e.max()&&r>=e.min()&&i.indexOf(t)===n})).map((function(t){var n=Rm(t),r=n?t.value:t,s=e(r);return{position:s,value:r,label:n&&void 0!==t.label?t.label:i(r),isMinor:!!n&&!!t.isMinor,start:n&&!isNaN(t.start)?Am(e(t.start)):s,end:n&&!isNaN(t.end)?Am(e(t.end)):s}}))}({values:n.ticks.values.filter((function(t){return"object"===gd(t)?!Fd(t.value):!Fd(t)})),scale:i.copy(),formatter:o}):Fd(n.ticks.count)?(e=(n.ticks.tight?Pm:Im)({distance:r,minorCount:a,unitDivider:n.ticks.distance,scale:i,formatter:o}),n.ticks.forceBounds&&function(t,e,n){var i=t.map((function(t){return t.position})),r=e.range();-1===i.indexOf(r[0])?t.splice(0,0,{position:r[0],start:r[0],end:r[0],label:n(e.start()),isMinor:!1,value:e.start()}):t[0]&&t[0].isMinor&&(t[0].isMinor=!1);var s=t[t.length-1];-1===i.indexOf(r[1])?t.push({position:r[1],start:r[1],end:r[1],label:n(e.end()),isMinor:!1,value:e.end()}):s&&s.isMinor&&(s.isMinor=!1)}(e,i,o)):e=function(t){var e=t.count,n=t.minorCount,i=t.scale,r=t.formatter;return i.ticks((e-1)*n+e).map((function(t,e){var s=i(t);return{position:s,start:s,end:s,label:r(t),isMinor:e%(n+1)!=0,value:t}}))}({count:Math.min(1e3,n.ticks.count),minorCount:a,scale:i.copy(),formatter:o}),e}function jm(t){var e=t.scale,n=e.domain(),i=e.data().items,r=e.labels?e.labels():n,s=e.bandwidth();return n.map((function(t,n){var o=e(t);return{position:o+s/2,label:"".concat(r[n]),data:i?i[n]:void 0,start:o,end:o+s}}))}function zm(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={};return Object.keys(e).forEach((function(r){var s=gd(t[r]);i[r]="function"===s?t[r](n):"undefined"===s?e[r]:t[r]})),i}var Fm={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},qm={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},Lm={count:NaN};function Vm(t,e){var n=+t.min,i=+t.max,r=0,s=1;if(e&&e[0]){var o=e.map((function(t){return t.min()})).filter((function(t){return!isNaN(t)})),a=e.map((function(t){return t.max()})).filter((function(t){return!isNaN(t)}));if(r=o.length?Math.min.apply(Math,Id(o)):Number.NaN,s=a.length?Math.max.apply(Math,Id(a)):Number.NaN,isNaN(r)||isNaN(s))r=-1,s=1;else if(r===s&&0===r)r=-1,s=1;else if(r===s&&r)r-=Math.abs(.1*r),s+=Math.abs(.1*s);else if(!isNaN(t.expand)){var l=s-r;r-=l*t.expand,s+=l*t.expand}if(Array.isArray(t.include)){var c=t.include.filter((function(t){return!isNaN(t)}));r=Math.min.apply(Math,Id(c).concat([r])),s=Math.max.apply(Math,Id(c).concat([s]))}}return{mini:isNaN(n)?r:n,maxi:isNaN(i)?s:i}}function Hm(t,e){t.instance||(t.instance=e.copy(),t.instance.domain([e.start(),e.end()]),t.instance.clamp(!0),t.instance.range(t.invert?[1,0]:[0,1]))}function Bm(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Em(),s={instance:null,invert:!1},o={data:n,resources:i},a=zm(e,Fm,o);function l(t){return Fd(t)?NaN:r(t)}a.ticks=zm(e.ticks,qm,o),a.minorTicks=zm(e.minorTicks,Lm,o),l.data=function(){return n},l.invert=function(t){return r.invert(t)},l.rangeRound=function(t){return r.rangeRound(t),l},l.clamp=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(t),l},l.cachedTicks=function(){return t},l.clearTicksCache=function(){return t=void 0,this},l.ticks=function(e){return null!==e&&"object"===gd(e)?(e.settings=e.settings||{},e.settings=pd(!0,{},a,e.settings),e.scale=l,t=Dm(e)):t=r.ticks(e)},l.nice=function(t){return r.nice(t),l},l.tickFormat=function(t,e){return r.tickFormat(t,e)},l.interpolate=function(t){return r.interpolate(t),l},l.domain=function(t){return arguments.length?(r.domain(t),s.instance&&s.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(t){return arguments.length?(r.range(t),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(t){for(var e=(l.start()-l.end())/t,n=[l.end()],i=[],r=e/2,s=0;s<t;s++){var o=n[n.length-1]||0,a=o+e,c=l(o+r);n.push.apply(n,[a,a]),i.push.apply(i,[c,c])}return n.pop(),l.domain(n),l.range(i),l},l.copy=function(){var t=Bm(e,n,i);return t.domain(l.domain()),t.range(l.range()),t.clamp(r.clamp()),t},l.norm=function(t){return Hm(s,l),s.instance(t)},l.normInvert=function(t){return Hm(s,l),s.instance.invert(t)};var c=Vm(a,n?n.fields:[]),u=c.mini,h=c.maxi;return l.domain([u,h]),l.range(a.invert?[1,0]:[0,1]),s.invert=a.invert,l}var Wm={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function $m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={data:e,resources:n},r=zm(t,Wm,i),s=e.items||[],o={},a=[],l=[];function c(t,n){t.data=function(){return e},t.datum=function(t){return s[o[t]]},t.start=function(){return t.domain()[0]},t.end=function(){return t.domain()[t.domain().length-1]},t.labels=function(){return l},t.ticks=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.scale=t,jm(e)}}var u=Mg();c(u),u.pxScale=function(t){var e=r.maxPxStep;if(isNaN(e))return u;var n=u.domain().length,i=Math.max(1,n-u.paddingInner()+2*u.paddingOuter());if(i*e>=t)return u;var s=u.copy();s.type=u.type,c(s);var o=i*e/t,a=(1-o)*u.align();return s.range(r.invert?[o+a,a]:[a,o+a]),s};for(var h="function"==typeof t.value?t.value:function(t){return t.datum.value},d="function"==typeof t.label?t.label:function(t){return t.datum.label},f=0;f<s.length;f++){var p=pd({datum:s[f]},i),y=h(p,f);-1===a.indexOf(y)&&(a.push(y),l.push(d(p,f)),o[y]=f)}return u.domain(a),u.range(r.invert?r.range.slice().reverse():r.range),u.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||u.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||u.paddingOuter(r.paddingOuter),u.align(isNaN(r.align)?.5:r.align),u}var Um={depth:0};function Ym(t,e,n){return t.ancestors().map((function(t){return e(pd({datum:t.data},n))})).reverse().slice(1).toString()}function Qm(t,e,n){var i=e.ticks.depth,r=e.value,s=e.label,o=[],a=[],l={},c=[],u=0;if(!t)return{values:o,labels:a,items:l,ticks:c};t.eachAfter((function(t){if(t.depth>0){var e=Ym(t,r,n),h=t.leaves()||[t],d=r(pd({datum:t.data},n)),f=s(pd({datum:t.data},n)),p=Array.isArray(t.children),y={key:e,count:h.length,value:d,label:f,leftEdge:Ym(h[0],r,n),rightEdge:Ym(h[Math.max(h.length-1,0)],r,n),node:t};p?(o.push("SPACER_".concat(u,"_SPACER")),u++):(o.push(e),a.push(f)),(i<=0&&!p||t.depth===i)&&c.push(y),l[e]=y}}));var h=t.height-1;return h>0&&o.splice(-h),{values:o,labels:a,items:l,ticks:c}}var Km=function(t){return t.min()},Xm=function(t){return t.max()};function Zm(t,e){var n=t&&!isNaN(t.min),i=t&&!isNaN(t.max),r=n?+t.min:0,s=i?+t.max:1;if(e&&e.length){if(!n){var o=e.map(Km).filter(zd);r=o.length?Math.min.apply(Math,Id(o)):r}if(!i){var a=e.map(Xm).filter(zd);s=a.length?Math.max.apply(Math,Id(a)):s}}return[r,s]}var Gm={domain:[],range:[],invert:!1,min:NaN,max:NaN};function Jm(t,e,n){var i=t.length;if(2===i)return[e,n];var r=[],s=(n-e)/(i-1);r.push(e);for(var o=1;o<i-1;o++)r.push(e+s*o);return r.push(n),r}function tv(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Bm(t,e,n).clamp(!0).interpolate(sm),r=zm(t,Gm,{data:e,resources:n}),s=Array.isArray(r.domain)&&r.domain.length,o=Array.isArray(r.range)&&r.range.length,a=i;pd(!0,a,i);var l=Zm(r,e?e.fields:[]),c=Od(l,2),u=c[0],h=c[1],d=s?r.domain.length:-1,f=n.theme?n.theme.palette("sequential",d>0?d:2):[],p=o?r.range:f;return a.range(r.invert?p.slice().reverse():p.slice()),a.domain(s?r.domain:Jm(a.range(),u,h)),a}var ev={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function nv(t,e,n){var i=t.length;if(2===i)return[e+(n-e)/2];for(var r=[],s=(n-e)/i,o=1;o<i;o++)r.push(e+s*o);return r}function iv(t,e,n,i){n=t[0],i=t&&t.length>=2?t[t.length-1]:i;var r=tv().domain([n,i]).range(e);return[n].concat(Id(function(t){for(var e=[],n=0;n<t.length-1;n++)e.push((t[n]+t[n+1])/2);return e}(t)),[i]).map((function(t){return r(t)}))}function rv(t,e,n){var i=2===t.length?10:Math.max(1,t.length),r=Em().domain([e,n]).nice(i).ticks(i);if(!t||!t.length)return r;for(var s=Math.max(0,t.length-1);r.length>s;)r[0]-e<=n-r[r.length-1]?r.shift():r.pop();return r}var sv={domain:[],range:[]};function ov(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Sg(),r={data:e,resources:n},s=zm(t,sv,r),o="function"==typeof t.value?t.value:function(t){return t.datum.value},a="function"==typeof t.label?t.label:function(t){return t.datum.label},l=e.items||[],c={},u=[],h=[],d=0;d<l.length;d++){var f=pd({datum:l[d]},r),p=o(f,d);-1===u.indexOf(p)&&(u.push(p),h.push(a(f,d)),c[p]=d)}return i.data=function(){return e},i.labels=function(){return h},i.label=function(t){return h[u.indexOf(t)]},i.datum=function(t){return l[c[t]]},i.range(s.range),Array.isArray(s.domain)&&s.domain.length?i.domain(s.domain):i.domain(u),i}var av={domain:[],range:[],unknown:void 0},lv={domain:[],range:[],override:!1},cv=Xf();function uv(t,e,n){var i=t.data;t.source&&(n.logger.warn("Deprecated: Scale data source configuration"),i={extract:[]},(Array.isArray(t.source)?t.source:[t.source]).forEach((function(t){i.extract.push({field:t})})));var r,s=ng(i,e,n),o=t.type||function(t){return t.root?"h-band":t.fields&&t.fields[0]?-1!==t.fields.map((function(t){return"dimension"===t.type()?"band":"linear"})).indexOf("linear")?"linear":"band":"linear"}(s);return"color"===o&&(o=s.fields&&s.fields[0]&&"dimension"===s.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(o)&&((r=(r=n.scale.get(o))(t,s,{theme:n.theme,logger:n.logger})).type=o),r}function hv(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:uv,r={};return{get:function(s){var o;return"string"==typeof s&&t[s]?o=s:"object"===gd(s)&&"scale"in s&&t[s.scale]&&(o=s.scale),o?(r[o]=r[o]||i(t[o],e,n),r[o]):i(s,e,n)},all:function(){return Object.keys(t).forEach(this.get),r}}}cv("linear",Bm),cv("band",$m),cv("h-band",(function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={data:n,resources:i},s=zm(e,Wm,r);s.ticks=zm(e.ticks,Um,r),s.value="function"==typeof e.value?e.value:function(t){return t.datum.value},s.label="function"==typeof e.label?e.label:function(t){return t.datum.value};var o=$m(s),a=Qm(n.root,s,r),l=a.values,c=a.labels,u=a.items,h=a.ticks,d=function(t){var e=String(t),n=u[e];return o(n?s.invert?n.rightEdge:n.leftEdge:e)};pd(!0,d,o),d.bandwidth=function(t){var e=u[String(t)],n=o.bandwidth();if(e&&!e.isLeaf){var i=d(e.leftEdge),r=d(e.rightEdge);return Math.abs(i-r)+n}return n},d.step=function(t){var e=u[String(t)],n=e?e.count:1;return o.step()*n},d.data=function(){return n},d.datum=function(t){var e=u[String(t)];return e?e.node.data:null},d.copy=function(){return t(e,n,i)},d.labels=function(){return c},d.ticks=function(){return h.map((function(t){var e=d(t.key),n=d.bandwidth(t.key);return{position:e+n/2,label:t.label,data:t.node.data,start:e,end:e+n}}))};var f=o.pxScale;return d.pxScale=function(t){return o=f(t),d},d.domain(l),d})),cv("sequential-color",tv),cv("threshold-color",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Cm(),r=zm(t,ev,{data:e,resources:n}),s=Array.isArray(r.domain)&&r.domain.length,o=Array.isArray(r.range)&&r.range.length;function a(t){return Fd(t)?NaN:i(t)}Object.keys(i).forEach((function(t){return a[t]=i[t]}));var l=e.fields,c=Zm(r,l),u=Od(c,2),h=u[0],d=u[1],f=s?r.domain.length:-1,p=n.theme?n.theme.palette("sequential",f>0?f:2):[],y=o?r.range:p,g=[];return g=s?r.domain:r.nice?rv(y,h,d):[h+(d-h)/2],y.length>g.length+1?g=nv(y,h,d):y.length<g.length+1&&(y=iv(g,y,h,d)),a.data=function(){return e},a.range(r.invert?y.slice().reverse():y),a.domain(g),a})),cv("categorical-color",(function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=ov(e,n,i),s=i.theme,o=zm(e,av,{data:n,resources:i});if(o.explicit=zm(e.explicit,lv,{data:n,resources:i}),t=Array.isArray(o.range)&&0!==o.range.length?o.range.slice():s?s.palette("categorical",r.domain().length).slice():[],o.unknown)r.unknown(o.unknown);else if(s&&s.palette("unknown")){var a=s.palette("unknown");r.unknown(a[0])}if(Array.isArray(o.explicit.domain)&&o.explicit.domain.length){for(var l=r.domain().slice(),c=o.explicit.domain,u=Array.isArray(o.explicit.range)?o.explicit.range:[],h=Math.floor(l.length/t.length),d=1;d<h+1;d*=2)t=t.concat(t);if(o.explicit.override)for(var f=0;f<c.length;f++){var p=l.indexOf(c[f]);p>-1&&(t[p]=u[f])}else{var y=c.map((function(t,e){return[l.indexOf(t),t,u[e]]})).sort((function(t,e){return t[0]-e[0]}));y.forEach((function(e){var n=l.indexOf(e[1]);-1!==n&&t.splice(n,0,e[2])}))}t.length=l.length}return r.range(t),r}));var dv={};function fv(){fv.init.call(this)}dv.isObject=function(t){return"object"==typeof t&&null!==t},dv.isNumber=function(t){return"number"==typeof t},dv.isUndefined=function(t){return void 0===t},dv.isFunction=function(t){return"function"==typeof t};var pv=fv;fv.EventEmitter=fv,fv.prototype._events=void 0,fv.prototype._maxListeners=void 0,fv.defaultMaxListeners=10,fv.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},fv.prototype.setMaxListeners=function(t){if(!dv.isNumber(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},fv.prototype.emit=function(t){var e,n,i,r,s,o;if(this._events||(this._events={}),"error"===t&&!this._events.error)throw(e=arguments[1])instanceof Error?e:Error('Uncaught, unspecified "error" event.');if(dv.isUndefined(n=this._events[t]))return!1;if(dv.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,r=new Array(i-1),s=1;s<i;s++)r[s-1]=arguments[s];n.apply(this,r)}else if(dv.isObject(n)){for(i=arguments.length,r=new Array(i-1),s=1;s<i;s++)r[s-1]=arguments[s];for(i=(o=n.slice()).length,s=0;s<i;s++)o[s].apply(this,r)}return!0},fv.prototype.on=fv.prototype.addListener=function(t,e){var n;if(!dv.isFunction(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,dv.isFunction(e.listener)?e.listener:e),this._events[t]?dv.isObject(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,dv.isObject(this._events[t])&&!this._events[t].warned&&(n=dv.isUndefined(this._maxListeners)?fv.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,dv.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),dv.isFunction(console.trace)&&console.trace()),this},fv.prototype.once=function(t,e){if(!dv.isFunction(e))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(t,i),n||(n=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},fv.prototype.removeListener=function(t,e){var n,i,r,s;if(!dv.isFunction(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=(n=this._events[t]).length,i=-1,n===e||dv.isFunction(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(dv.isObject(n)){for(s=r;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},fv.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(dv.isFunction(n=this._events[t]))this.removeListener(t,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},fv.prototype.listeners=function(t){return this._events&&this._events[t]?dv.isFunction(this._events[t])?[this._events[t]]:this._events[t].slice():[]},fv.listenerCount=function(t,e){return t._events&&t._events[e]?dv.isFunction(t._events[e])?1:t._events[e].length:0};var yv=function(t){return Object.keys(pv.prototype).forEach((function(e){t[e]=pv.prototype[e]})),pv.init(t),t};function gv(){var t=0,e=0,n=0,i=0;n=n||t;var r={move:function(t){this.moveTo(n+t)},moveTo:function(s){var o=Math.max(t,Math.min(e-i,s));n!==o&&(n=o,r.emit("update"))},update:function(s){var o=!1,a=s.min;t=void 0===a?t:a;var l=s.max;e=void 0===l?e:l,void 0!==s.viewSize&&s.viewSize!==i&&(i=s.viewSize,o=!0);var c=Math.max(t,Math.min(e-i,n));n!==c&&(n=c,o=!0),o&&r.emit("update")},getState:function(){return{min:t,max:e,start:n,viewSize:i}}};return yv(r),r}function mv(t,e){var n=t.min||0,i=t.max||0,r=t.viewSize||0,s=e||gv();return s.update({min:n,max:i,viewSize:r}),s}function vv(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=mv(t[i],e?e[i]:null));return n}function xv(t,e){return e[t]||(e[t]=gv()),e[t]}function bv(t,e){return t<=e}function _v(t,e){return t<e}function wv(t,e,n){for(var i=0;i<t.length&&e>t[i];)++i;return t[i]===e&&n&&++i,i}function kv(t,e,n,i){for(var r=t.length,s=1;s<r;s+=2)if(n(t[s-1],e)&&i(e,t[s]))return!0;return!1}function Sv(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=[];function r(){}return r.configure=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.includeMax,r=void 0===i||i,s=n.includeMin,o=void 0===s||s;t=r?bv:_v,e=o?bv:_v},r.add=function(t){var e,n=t.min,r=t.max,s=wv(i,n),o=wv(i,r,!0),a=[s,o-s];s%2==0&&a.push(n),o%2==0&&a.push(r);var l=i.join(",");return(e=i).splice.apply(e,a),l!==i.join(",")},r.remove=function(t){var e,n=t.min,r=t.max,s=wv(i,n),o=wv(i,r,!0),a=[s,o-s];s%2==1&&a.push(n),o%2==1&&a.push(r);var l=i.join(",");return(e=i).splice.apply(e,a),l!==i.join(",")},r.set=function(t){var e=i.join(",");return i=[],Array.isArray(t)?t.forEach(r.add):r.add(t),e!==i.join(",")},r.clear=function(){var t=i.length>0;return i=[],t},r.containsValue=function(n){return kv(i,n,e,t)},r.containsRange=function(t){var e=t.max,n=wv(i,t.min,!0),r=wv(i,e);return n===r&&r%2==1},r.toggle=function(t){return r.containsRange(t)?r.remove(t):r.add(t)},r.ranges=function(){for(var t=[],e=1;e<i.length;e+=2)t.push({min:i[e-1],max:i[e]});return t},r.configure(n),r}function Mv(){var t=[];function e(){}return e.add=function(e){return-1===t.indexOf(e)&&(t.push(e),!0)},e.remove=function(e){var n=t.indexOf(e);return-1!==n&&(t.splice(n,1),!0)},e.contains=function(e){return-1!==t.indexOf(e)},e.values=function(){return t.slice()},e.clear=function(){return t=[]},e.toString=function(){return t.join(";")},e}var Ev={key:void 0,includeMin:!0,includeMax:!0};function Cv(t){for(var e,n,i=t.items,r=t.collection,s=t.vc,o={},a=[],l=0,c=i.length;l<c;l++){r[e=i[l].key]||(r[e]=s()),n=i[l].values||[i[l].value];for(var u=0;u<n.length;u++)r[e].add(n[u])&&(o[e]=o[e]||[],o[e].push(n[u]))}for(var h=Object.keys(o),d=0,f=h.length;d<f;d++)a.push({id:e=h[d],values:o[e]});return a}function Tv(t){for(var e,n,i=t.items,r=t.collection,s={},o=[],a=0,l=i.length;a<l;a++)if(r[e=i[a].key]){n=i[a].values||[i[a].value];for(var c=0;c<n.length;c++)r[e].remove(n[c])&&(s[e]=s[e]||[],s[e].push(n[c]))}for(var u=Object.keys(s),h=0,d=u.length;h<d;h++)o.push({id:e=u[h],values:s[e]});return o}function Av(t){for(var e,n,i={},r=0,s=t.length;r<s;r++){n=t[r].values||[t[r].value],i[e=t[r].key]||(i[e]=[]);for(var o=0;o<n.length;o++)-1===i[e].indexOf(n[o])&&i[e].push(n[o])}return i}function Rv(t){var e=t.key,n=t.collection,i=t.obj,r=t.value;n[e]||(n[e]=(0,t.fn)()),i[e]=i[e]||[],i[e].push(r),n[e].add(r)}function Nv(t){for(var e,n,i,r=t.values,s=t.vc,o={},a={},l=[],c=[],u=Av(t.items),h=Object.keys(u),d=0,f=h.length;d<f;d++)for(var p=0,y=(i=u[e=h[d]]).length;p<y;p++)n=i[p],r[e]&&r[e].contains(n)?r[e]&&r[e].contains(n)&&(a[e]=a[e]||[],a[e].push(n),r[e].remove(n)):Rv({key:e,value:n,collection:r,obj:o,fn:s});for(var g=Object.keys(o),m=0,v=g.length;m<v;m++)l.push({id:e=g[m],values:o[e]});for(var x=Object.keys(a),b=0,_=x.length;b<_;b++)c.push({id:e=x[b],values:a[e]});return[l,c]}function Ov(t,e){for(var n,i,r=[],s=Object.keys(t),o=function(t){return-1===e[n].indexOf(t)},a=0,l=s.length;a<l;a++)e[n=s[a]]?(i=t[n].filter(o)).length&&r.push({id:n,values:i}):r.push({id:n,values:t[n]});return r}function Iv(t){for(var e,n,i=t.vCollection,r=t.vc,s={},o=Av(t.items),a={},l=Object.keys(i),c=0,u=l.length;c<u;c++)a[n=l[c]]=i[n].values().slice(),delete i[n];for(var h=function(t){i[n]&&i[n].contains(t)||Rv({key:n,value:t,collection:i,obj:s,fn:r})},d=Object.keys(o),f=0,p=d.length;f<p;f++)o[n=d[f]].forEach(h);return e=Ov(a,s),[Ov(s,a),e]}function Pv(t,e,n){var i=function(t,e){if(!Object.keys(e).length)return t;for(var n=t.length,i=Array(n),r=0;r<n;r++)i[r]=t[r].key in e?pd({},t[r],{key:e[t[r].key]}):t[r];return i}(e,n);return t&&t.length?t.reduce((function(t,e){return e(t)}),i):i}function Dv(t){return t.replace(/(-[a-z])/g,(function(t){return t.toUpperCase().replace("-","")}))}function jv(t){return t.replace(/([A-Z])/g,(function(t){return"-".concat(t.toLowerCase())}))}function zv(t,e,n){var i=n.ranges,r=n.rc,s=n.aliases,o=n.rangeConfig,a=Pv(n.interceptors["".concat(e,"Ranges")],t,s),l=!1;return a.forEach((function(t){var n=t.key;if(i[n]||(i[n]=r(o.sources[n]||o.default)),"set"===e)l=i[n][e](t.ranges||t.range)||l;else for(var s=t.ranges||[t.range],a=0;a<s.length;a++)l=i[n][e](s[a])||l})),l}function Fv(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.vc,n=void 0===e?Mv:e,i=t.rc,r=void 0===i?Sv:i,s=!1,o={},a={},l={},c={sources:{},default:pd({},Ev)},u={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},h=function(){var t={values:{},ranges:{}};return Object.keys(a).forEach((function(e){t.values[e]=a[e].values()})),Object.keys(o).forEach((function(e){t.ranges[e]=o[e].ranges()})),t},d={ls:[],clear:function(){this.ls.forEach((function(t){return t.clear()}))},start:function(){this.ls.forEach((function(t){return t.start()}))},end:function(){this.ls.forEach((function(t){return t.end()}))},update:function(){var t=h();this.ls.forEach((function(e){return e._state(t)}))},updateValues:function(){var t=h();this.ls.forEach((function(e){return e._state({values:t.values})}))},updateRanges:function(){var t=h();this.ls.forEach((function(e){return e._state({ranges:t.ranges})}))}},f={configure:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(t.ranges)&&t.ranges.length&&(c={sources:{},default:pd({},Ev)},t.ranges.forEach((function(t){var e={};Object.keys(Ev).filter((function(t){return"key"!==t})).forEach((function(n){e[n]=void 0!==t[n]?t[n]:Ev[n]})),void 0!==t.key?c.sources[t.key]=e:c.default=e})),Object.keys(o).forEach((function(t){return o[t].configure(c.sources[t]||c.default)})),f.emit("update",[],[]))},link:function(t){if(f===t)throw new Error("Can't link to self");d.ls.push(t),t._state(h())},_state:function(t){if(!t)return h();if(t.values){var e=[];Object.keys(t.values).forEach((function(n){a[n]&&t.values[n].join(";")===a[n].toString()||e.push({key:n,values:t.values[n]})})),Object.keys(a).forEach((function(n){t.values[n]||e.push({key:n,values:[]})})),e.length&&f.setValues(e)}if(t.ranges){var n=[];Object.keys(t.ranges).forEach((function(e){o[e]&&t.ranges[e].join(";")===o[e].toString()||n.push({key:e,ranges:t.ranges[e]})})),Object.keys(o).forEach((function(e){t.ranges[e]||n.push({key:e,ranges:[]})})),n.length&&f.setRanges(n)}},start:function(){if(!s){s=!0;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];f.emit.apply(f,["start"].concat(e)),d.start()}},end:function(){if(s){s=!1,o={},a={};for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];f.emit.apply(f,["end"].concat(e)),d.end()}},isActive:function(){return s},clear:function(){var t=f.brushes().filter((function(t){return"value"===t.type&&t.brush.values().length})).map((function(t){return{id:t.id,values:t.brush.values()}})),e=Object.keys(o).length>0||t.length;o={},a={},e&&(f.emit("update",[],t),d.clear())},brushes:function(){var t=[];return(t=t.concat(Object.keys(o).map((function(t){return{type:"range",id:t,brush:o[t]}})))).concat(Object.keys(a).map((function(t){return{type:"value",id:t,brush:a[t]}})))},addValue:function(t,e){f.addValues([{key:t,value:e}])},addValues:function(t){var e=Pv(u.addValues,t,l),i=Cv({vc:n,collection:a,items:e});f.emit("add-values",e),i.length&&(s||(s=!0,f.emit("start")),f.emit("update",i,[]),d.updateValues())},setValues:function(t){var e=Pv(u.setValues,t,l),i=Iv({items:e,vCollection:a,vc:n});f.emit("set-values",e),(i[0].length>0||i[1].length>0)&&(s||(s=!0,f.emit("start")),f.emit("update",i[0],i[1]),d.updateValues())},removeValue:function(t,e){f.removeValues([{key:t,value:e}])},removeValues:function(t){var e=Pv(u.removeValues,t,l),n=Tv({collection:a,items:e});f.emit("remove-values",e),n.length&&(f.emit("update",[],n),d.updateValues())},addAndRemoveValues:function(t,e){var i=Pv(u.addValues,t,l),r=Pv(u.removeValues,e,l),o=Cv({vc:n,collection:a,items:i}),c=Tv({collection:a,items:r});f.emit("add-values",i),f.emit("remove-values",r),(o.length||c.length)&&(s||(s=!0,f.emit("start")),f.emit("update",o,c),d.updateValues())},toggleValue:function(t,e){f.toggleValues([{key:t,value:e}])},toggleValues:function(t){var e=Pv(u.toggleValues,t,l),i=Nv({items:e,values:a,vc:n});f.emit("toggle-values",e),(i[0].length>0||i[1].length>0)&&(s||(s=!0,f.emit("start")),f.emit("update",i[0],i[1]),d.updateValues())},containsValue:function(t,e){var n=l[t]||t;return!!a[n]&&a[n].contains(e)},addRange:function(t,e){f.addRanges([{key:t,range:e}])},addRanges:function(t){zv(t,"add",{ranges:o,rc:r,interceptors:u,aliases:l,rangeConfig:c})&&(s||(s=!0,f.emit("start")),f.emit("update",[],[]),d.updateRanges())},removeRange:function(t,e){f.removeRanges([{key:t,range:e}])},removeRanges:function(t){zv(t,"remove",{ranges:o,rc:r,interceptors:u,aliases:l,rangeConfig:c})&&(s||(s=!0,f.emit("start")),f.emit("update",[],[]),d.updateRanges())},setRange:function(t,e){f.setRanges([{key:t,range:e}])},setRanges:function(t){zv(t,"set",{ranges:o,rc:r,interceptors:u,aliases:l,rangeConfig:c})&&(s||(s=!0,f.emit("start")),f.emit("update",[],[]),d.updateRanges())},toggleRange:function(t,e){f.toggleRanges([{key:t,range:e}])},toggleRanges:function(t){zv(t,"toggle",{ranges:o,rc:r,interceptors:u,aliases:l,rangeConfig:c})&&(s||(s=!0,f.emit("start")),f.emit("update",[],[]),d.updateRanges())},containsRangeValue:function(t,e){var n=l[t]||t;return!!o[n]&&o[n].containsValue(e)},containsRange:function(t,e){var n=l[t]||t;return!!o[n]&&o[n].containsRange(e)},containsMappedData:function(t,e,n){for(var i,r,s,c,u=[],h=Object.keys(t),d=0,f=h.length;d<f;d++){if("value"===(i=h[d]))r=t,u[d]={key:"",i:d,bool:!1};else{if("source"===i)continue;r=t[i],u[d]={key:i,i:d,bool:!1}}void 0!==(s=r.source&&r.source.field)&&(void 0!==r.source.key&&(s="".concat(r.source.key,"/").concat(s)),s in l&&(s=l[s]),c=r.value,o[s]?u[d].bool=Array.isArray(c)?o[s].containsRange({min:c[0],max:c[1]}):o[s].containsValue(c):a[s]&&a[s].contains(c)&&(u[d].bool=!0))}return e?(u=u.filter((function(t){return-1!==e.indexOf(t.key)})),"and"===n?!!u.length&&!u.some((function(t){return!1===t.bool})):"xor"===n?!!u.length&&u.some((function(t){return t.bool}))&&u.some((function(t){return!1===t.bool})):u.some((function(t){return t.bool}))):u.some((function(t){return t.bool}))},intercept:function(t,e){var n=Dv(t);u[n]&&u[n].push(e)},removeInterceptor:function(t,e){var n=Dv(t);if(u[n]){var i=u[n].indexOf(e);-1!==i&&u[n].splice(i,1)}},removeAllInterceptors:function(t){var e=[];if(t){var n=Dv(t);u[n]&&u[n].length&&e.push({name:t,handlers:u[n]})}else Object.keys(u).forEach((function(t){u[t].length&&e.push({name:jv(t),handlers:u[t]})}));e.forEach((function(t){t.handlers.slice().forEach((function(e){return f.removeInterceptor(t.name,e)}))}))},addKeyAlias:function(t,e){l[t]=e},removeKeyAlias:function(t){delete l[t]}};return yv(f),f}function qv(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Xf();var Lv=2*Math.PI,Vv=function t(e,n){var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Lv);function r(t){return 1-e*(r=t=+t,1.0009775171065494*(Math.pow(2,-10*r)-.0009765625))*Math.sin((t+i)/n);var r}return r.amplitude=function(e){return t(e,n*Lv)},r.period=function(n){return t(e,n)},r}(1,.3);function Hv(t,e){return t.data?t.data.value:"text"===t.type?t.text:e}function Bv(t,e,n){var i,r=t.old,s=t.current,o=e.renderer,a=[],l={nodes:[],ips:[]},c={nodes:[],ips:[]},u={nodes:[],ips:[]},h=[],d=n.trackBy||Hv,f={start:function(){var t={};r.forEach((function(e,n){var i=d(e,n);t[i]=e})),s.forEach((function(e,n){var i=d(e,n);t[i]?(u.ips.push(um(t[i],e)),u.nodes.push(e),a.push(t[i]),t[i]=!1):(l.nodes.push(e),l.ips.push(um({r:.001,opacity:0},e)))})),Object.keys(t).forEach((function(e){t[e]&&(c.nodes.push(t[e]),c.ips.push(um(t[e],pd({},t[e],{r:1e-4,opacity:0}))))})),c.ips.length&&h.push({easing:qv,duration:200,tweens:c.ips,nodes:[].concat(a)}),u.ips.length&&h.push({easing:qv,duration:400,tweens:u.ips,nodes:[]}),l.ips.length&&h.push({easing:Vv,duration:1200,tweens:l.ips,nodes:Id(u.nodes)}),h.length&&(h[0].started=Date.now(),"undefined"!=typeof window&&(i=window.requestAnimationFrame(f.tick)))},tick:function(){var t=h[0];t||f.stop(),t.started||(t.started=Date.now());var e=(Date.now()-t.started)/t.duration,n=[],r=t.tweens.map((function(n){return n(t.easing(Math.min(1,e)))}));n.push.apply(n,Id(r)),n.push.apply(n,Id(t.nodes)),o.render(n),e>=1&&(h.shift(),h.length||f.stop()),i&&(i=window.requestAnimationFrame(f.tick))},stop:function(){i&&(window.cancelAnimationFrame(i),i=!1)}};return f}var Wv={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},$v=/^\$/;function Uv(t){var e=gd(t);return"object"!==e&&"function"!==e&&"undefined"!==e}function Yv(t,e,n){var i=t[e];i&&i.scale&&i.scale.pxScale?i.scale=i.scale.pxScale(n):i&&i.pxScale&&(t[e]=i.pxScale(n))}function Qv(t,e){return t.pxScale?t.pxScale(e):t}var Kv={normalizeSettings:function(t,e,n){var i=pd({},t),r=pd({},e);return Object.keys(i).forEach((function(t){r[t]={};var s=i[t],o=gd(s);if("function"==typeof s)r[t].fn=s;else if(Uv(s)){var a=e[t];"string"==typeof a&&$v.test(a)&&(a=Wv[a]);var l=gd(a);r[t]="undefined"===l||l===o?s:a}else s&&"object"===gd(s)&&("function"==typeof s.fn&&(r[t].fn=s.fn),void 0!==s.scale&&(r[t].scale=n.scale(s.scale)),"string"==typeof s.ref&&(r[t].ref=s.ref))})),Object.keys(e).forEach((function(t){if(!(t in i)){var n=e[t],s=gd(n);r[t]="string"===s&&$v.test(n)?Wv[n]:n}})),r},resolveForItem:function(t,e,n){for(var i={},r=Object.keys(e),s=r.length,o=t.datum,a=t.datum,l=0;l<s;l++){var c=r[l],u=e[c],h="object"===gd(a)&&void 0!==u,d=h&&"string"==typeof u.ref,f=d?a[u.ref]:h&&c in a?a[c]:o;Uv(u)?i[c]=u:h&&u.fn?(u.scale&&(t.scale=u.scale),i[c]=u.fn.call(null,t,n)):h&&u.scale&&f?(i[c]=u.scale(f.value),u.scale.bandwidth&&(i[c]+=u.scale.bandwidth()/2)):i[c]=d&&f?f.value:u.fn?u.fn.call(null,t,n):u}return i},updateScaleSize:Yv};function Xv(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Kv,n={};function i(i){var r=i.data,s=i.defaults,o=i.scaled,a=n.norm=e.normalizeSettings(i.settings,void 0===s?{}:s,t.chart),l={scale:t.chart.scale,formatter:t.chart.formatter};o&&Object.keys(o).forEach((function(t){a[t]&&e.updateScaleSize(a,t,o[t])}));var c=[];if(!r||!Array.isArray(r.items)){var u=e.resolveForItem({data:r,resources:l},n.norm,-1);return{settings:n.norm,item:u}}for(var h=0,d=r.items.length;h<d;h++){var f=e.resolveForItem({datum:r.items[h],data:r,resources:l},n.norm,h);f.data=r.items[h],c.push(f)}return{settings:n.norm,items:c}}return{resolve:i}}function Zv(t,e){var n=e.data,i=e.style,r=e.filter,s=e.mode,o=t.chart.brush(e.context),a=n,l=i.active||{},c=i.inactive||{},u=[];Object.keys(l).forEach((function(t){u.push(t)})),Object.keys(c).forEach((function(t){-1===u.indexOf(t)&&u.push(t)}));var h=[],d=!1,f=function(){var e=function t(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,n){return Array.isArray(n.children)?(e.push.apply(e,Id(t(n.children))),e):(e.push(n),e)}),[])}(t.nodes);return"function"==typeof r&&(e=e.filter(r)),e},p=function(){for(var t,e=f(),n=e.length,i=!1,r="function"==typeof a?a({brush:o}):a,p=function(n){if(!(t=e[n].data))return"continue";e[n].__style||(e[n].__style={},u.forEach((function(t){e[n].__style[t]=e[n][t]})));var a=o.containsMappedData(t,r,s),f=h.indexOf(e[n]),p=!1;if(a&&-1===f?(h.push(e[n]),p=!0):a||-1===f||(h.splice(f,1),p=!0),p||d){var y=pd({},e[n],e[n].__style);u.forEach((function(t){e[n][t]=a&&t in l?"function"==typeof l[t]?l[t].call(null,y):l[t]:!a&&t in c?"function"==typeof c[t]?c[t].call(null,y):c[t]:e[n].__style[t]})),i=!0}},y=0;y<n;y++)p(y);return d=!1,i},y=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1},n=e.suppressRender,i=f(),r=i.length,s=function(t){if(!i[t].data)return"continue";i[t].__style=i[t].__style||{},u.forEach((function(e){i[t].__style[e]=i[t][e],e in c&&(i[t][e]="function"==typeof c[e]?c[e].call(null,i[t]):c[e])}))},o=0;o<r;o++)s(o);d=!0,h.length=0,n||t.renderer.render(t.nodes)},g=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1},n=e.suppressRender,i=f(),r=i.length,s=function(t){i[t].__style&&(Object.keys(i[t].__style).forEach((function(e){i[t][e]=i[t].__style[e]})),i[t].__style=void 0)},o=0;o<r;o++)s(o);h.length=0,n||t.renderer.render(t.nodes)},m=function(){p()&&t.renderer.render(t.nodes)};return o.on("start",y),o.on("end",g),o.on("update",m),{isActive:function(){return o.isActive()},update:function(){h.length=0,d=!0,p()},cleanUp:function(){o.removeListener("start",y),o.removeListener("end",g),o.removeListener("update",m)}}}function Gv(t){for(var e=t.nodes,n=t.action,i=t.chart,r=t.trigger,s=[],o=0;o<e.length;o++){var a=e[o].data;null!==a&&s.push(a)}!function(t){var e=t.dataPoints,n=t.action,i=t.chart,r=t.trigger;if(r){var s=r.data||[""],o={items:[],actionFn:"toggleRanges"},a={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(o.actionFn="".concat(n,"Ranges"),a.actionFn="".concat(n,"Values"));for(var l=function(t){var n=e[t];if(!n)return"continue";s.forEach((function(t){var e=n&&!t?n:n[t];if(e){var i={key:e.source.field};void 0!==e.source.key&&(i.key="".concat(e.source.key,"/").concat(e.source.field)),Array.isArray(e.value)?(i.range={min:e.value[0],max:e.value[1]},o.items.push(i)):(i.value=e.value,a.items.push(i))}}))},c=0;c<e.length;c++)l(c);r.contexts.forEach((function(t){o.items.length?i.brush(t)[o.actionFn](o.items):i.brush(t)[a.actionFn](a.items)}))}}({dataPoints:s,action:n,chart:i,trigger:r})}function Jv(t){var e=t.collisions,n=t.t,i=t.config,r=t.action,s=[],o=!1;return e.length>0&&(s=e,o=!0,"stop"===n.propagation&&(s=[e[e.length-1]])),Gv({nodes:s.map((function(t){return t.node})),action:r,chart:i.chart,data:i.data,trigger:n}),o}function tx(t,e,n){var i=n.element().getBoundingClientRect(),r=jd(t)?function(t,e){return 1!==t.changedTouches.length?null:{x:t.changedTouches[0].clientX-e.left,y:t.changedTouches[0].clientY-e.top}}(t,i):function(t,e){return{x:t.clientX-e.left,y:t.clientY-e.top}}(t,i);return null===r||r.x<0||r.y<0||r.x>i.width||r.y>i.height?[]:(e.touchRadius>0&&jd(t)?r={cx:r.x,cy:r.y,r:e.touchRadius}:e.mouseRadius>0&&!jd(t)&&(r={cx:r.x,cy:r.y,r:e.mouseRadius}),n.itemsAt(r))}function ex(t,e,n){return t?"function"==typeof t?t(e):t:n}function nx(t){var e=t.e,n=t.t,i=t.config;return Jv({collisions:tx(e,n,i.renderer),t:n,config:i,action:ex(n.action,e,"toggle")})}function ix(t){var e=t.e,n=t.t,i=t.config;return Jv({collisions:tx(e,n,i.renderer),t:n,config:i,action:ex(n.action,e,"set")})}var rx={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function sx(t,e){Object.keys(rx).forEach((function(n){var i=e[n];void 0!==i&&(t[rx[n]]=i)}))}function ox(t){for(var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",i=0;i<t.length;i++){var r=t[i];n+=0===i?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return e&&(n+="Z"),n}function ax(t,e,n,i){var r=n/2,s=t-i/2,o=e-i/2,a=t-r,l=e-r;return[{x:s,y:o},{x:s,y:l},{x:s+i,y:l},{x:s+i,y:o},{x:a+n,y:o},{x:a+n,y:o+i},{x:s+i,y:o+i},{x:s+i,y:l+n},{x:s,y:l+n},{x:s,y:o+i},{x:a,y:o+i},{x:a,y:o}]}function lx(t){return-t/180*Math.PI}function cx(t){return function(t){var e=(.5*(Math.floor(t/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(e-t))*Math.sqrt(2),i=n*Math.cos(t),r=n*Math.sin(t);return{x1:i<0?1:0,y1:r<0?1:0,x2:i>=0?i:i+1,y2:r>=0?r:r+1}}(lx(t))}function ux(t,e){return{x:t.x+e.x,y:t.y+e.y}}function hx(t,e){return{x:t.x-e.x,y:t.y-e.y}}function dx(t,e){return{x:t.x*e,y:t.y*e}}function fx(t,e){return t.x-e.x}function px(t,e){return t.y-e.y}function yx(t,e){return Math.pow(fx(t,e),2)+Math.pow(px(t,e),2)}function gx(t,e){return Math.sqrt(yx(t,e))}function mx(t,e){return t.x*e.x+t.y*e.y}function vx(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},i=Math.cos(e),r=Math.sin(e),s=hx(t,n),o={x:i*s.x-r*s.y,y:r*s.x+i*s.y};return ux(o,n)}var xx={up:0,down:180,left:90,right:-90};function bx(t){var e=t.size,n=e/2;return{type:"rect",x:t.x-n,y:t.y-n,width:e,height:e}}var _x=Xf();function wx(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(e).forEach((function(n){void 0!==rx[n]&&"transform"!==n&&(t[n]=e[n])}))}_x.add("circle",(function(t){return{type:"circle",fill:"black",cx:t.x,cy:t.y,r:t.size/2}})),_x.add("diamond",(function(t){var e=t.size,n=t.x-e/2,i=t.y-e/2;return{type:"path",fill:"black",d:ox([{x:n,y:i+e/2},{x:n+e/2,y:i},{x:n+e,y:i+e/2},{x:n+e/2,y:i+e},{x:n,y:i+e/2}])}})),_x.add("saltire",(function(t){var e=lx(45),n=t.size/2,i=isNaN(t.width)?n/2:t.width,r=Math.min(i,n),s=t.size,o=Math.sin(Math.asin(-e))*(r/2);s+=2*(n/Math.sin(-e)-n);var a={x:t.x,y:t.y};return{type:"path",fill:"black",d:ox(ax(t.x,t.y,s-=2*o,r).map((function(t){return vx(t,e,a)})))}})),_x.add("square",(function(t){var e=t.size;return{type:"rect",fill:"black",x:t.x-e/2,y:t.y-e/2,width:e,height:e}})),_x.add("triangle",(function(t){var e=t.size,n={x:t.x,y:t.y},i=e/2,r=t.x-i,s=t.y-i,o=[{x:r,y:s+e},{x:r+i,y:s},{x:r+e,y:s+e},{x:r,y:s+e}],a=lx(xx[t.direction]||0);return{type:"path",fill:"black",d:ox(o=o.map((function(t){return vx(t,a,n)})))}})),_x.add("line",(function(t){var e="vertical"===t.direction,n=t.size/2,i=t.x,r=t.y;return{type:"line",stroke:"black",strokeWidth:1,x1:i-(e?0:n),y1:r-(e?n:0),x2:i+(e?0:n),y2:r+(e?n:0),collider:bx(t)}})),_x.add("star",(function(t){for(var e=t.size,n=[],i=e/2,r=t.points||5,s=Math.min(t.innerRadius||e/2,e)/2,o=isNaN(t.startAngle)?90:t.startAngle,a=360/r,l=1;l<=r;l++){var c=a*l+o,u=lx(c),h=lx(c+a/2),d=Math.sin(u),f=Math.cos(u),p=Math.sin(h),y=Math.cos(h);n.push({x:t.x+f*i,y:t.y+d*i}),n.push({x:t.x+y*s,y:t.y+p*s})}return{type:"path",fill:"black",d:ox(n)}})),_x.add("n-polygon",(function(t){for(var e=[],n=t.size/2,i=Math.max(isNaN(t.sides)?6:t.sides,3),r=360/i,s=isNaN(t.startAngle)?0:t.startAngle,o=1;o<=i;o++){var a=lx(r*o+s),l=Math.sin(a),c=Math.cos(a);e.push({x:t.x+c*n,y:t.y+l*n})}return{type:"path",fill:"black",d:ox(e)}})),_x.add("cross",(function(t){var e=t.x,n=t.y,i=t.size/2,r=isNaN(t.width)?i/2:t.width,s=Math.min(r,i);return{type:"path",fill:"black",d:ox(ax(e,n,t.size,s))}})),_x.add("bar",(function(t){var e={x:t.x,y:t.y},n=t.size/2,i=n/2/2,r=[{x:e.x-n,y:e.y+i},{x:e.x-n,y:e.y-i},{x:e.x+n,y:e.y-i},{x:e.x+n,y:e.y+i}];if("vertical"===t.direction){var s=lx(90);r=r.map((function(t){return vx(t,s,e)}))}var o=Hd(r);return o.type="rect",o.fill="black",o}));var kx=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_x;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.get(e.type);if(n){var i=n(e);return wx(i,e),void 0!==e.data&&(i.data=e.data),i}return n}};function Sx(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.dock,i=void 0===n?"center":n,r=t.displayOrder,s=void 0===r?0:r,o=t.prioOrder,a=void 0===o?0:o,l=t.preferredSize,c=void 0===l?0:l,u=t.minimumLayoutMode,h=t.show,d=void 0===h||h;i=i||"center";var f={computePreferredSize:function(t){return"function"==typeof c?c({inner:t.inner,outer:t.outer,children:t.children,dock:this.dock()},e):c},dock:function(t){return void 0!==t?(i=t,this):"function"==typeof i?i(e):i},displayOrder:function(t){return void 0!==t?(s=t,this):"function"==typeof s?s(e):s},prioOrder:function(t){return void 0!==t?(a=t,this):"function"==typeof a?a(e):a},minimumLayoutMode:function(t){return void 0!==t?(u=t,this):"function"==typeof u?u(e):u},show:function(t){return void 0!==t?(d=t,this):"function"==typeof d?d(e):d}};return f}function Mx(t,e,n){var i=e.require,r=void 0===i?[]:i,s=e.mediator||{},o=n.settings,a=n.formatter,l=n.scale,c=n.data,u=n.renderer,h=n.chart,d=n.dockConfig,f=n.mediator,p=n.instance,y=n.rect,g=n.style,m=n.registries,v=n.resolver,x=n.update,b=n._DO_NOT_USE_getInfo,_=n.symbol,w=n.isVisible;t.emit=function(){},w&&(t.isVisible=w),Object.defineProperty(t,"settings",{get:o}),Object.defineProperty(t,"data",{get:c}),Object.defineProperty(t,"formatter",{get:a}),Object.defineProperty(t,"scale",{get:l}),Object.defineProperty(t,"mediator",{get:f}),Object.defineProperty(t,"style",{get:g}),Object.defineProperty(t,"registries",{get:m}),y&&Object.defineProperty(t,"rect",{get:y}),b&&(t._DO_NOT_USE_getInfo=b),Object.keys(e).forEach((function(n){var i;i=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((function(t){return t===i}))||(t[n]="function"==typeof e[n]?e[n].bind(t):e[n])})),r.forEach((function(e){"renderer"===e?Object.defineProperty(t,"renderer",{get:u}):"chart"===e?Object.defineProperty(t,"chart",{get:h}):"dockConfig"===e?Object.defineProperty(t,"dockConfig",{get:d}):"instance"===e?Object.defineProperty(t,"instance",{get:p}):"update"===e&&x?Object.defineProperty(t,"update",{get:x}):"resolver"===e?Object.defineProperty(t,"resolver",{get:v}):"symbol"===e&&Object.defineProperty(t,"symbol",{get:_})})),Object.keys(s).forEach((function(e){t.mediator.on(e,s[e].bind(t))}))}function Ex(t,e,n){var i=function(e){return t[e]?(n.warn("Deprecation Warning the ".concat(e," property should be moved into layout: {} property")),t[e]):t.layout?t.layout[e]:void 0},r={};return r.displayOrder=i("displayOrder"),r.dock=i("dock"),r.prioOrder=i("prioOrder"),r.minimumLayoutMode=i("minimumLayoutMode"),t.layout=t.layout||{},t.layout.displayOrder=void 0!==r.displayOrder?r.displayOrder:t.layout.displayOrder,t.layout.prioOrder=void 0!==r.prioOrder?r.prioOrder:t.layout.prioOrder,t.layout.dock=r.dock||t.layout.dock,t.layout.minimumLayoutMode=r.minimumLayoutMode||t.layout.minimumLayoutMode,r.show=t.show,r.preferredSize=e,r}function Cx(t,e,n){Object.keys(n.on||{}).forEach((function(i){t.eventListeners=t.eventListeners||[];var r=n.on[i].bind(t);t.eventListeners.push({event:i,listener:r}),e.on(i,r)})),t.emit=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return e.emit.apply(e,[t].concat(i))}}function Tx(t,e){t.eventListeners&&(t.eventListeners.forEach((function(t){e.removeListener(t.event,t.listener)})),t.eventListeners.length=0),t.emit=function(){}}function Ax(t,e,n){return gx(t,n)+gx(e,n)-gx(t,e)<1e-12}function Rx(t,e){return t.x>=e.x&&t.x+t.width<=e.x+e.width&&t.y>=e.y&&t.y+t.height<=e.y+e.height}function Nx(t){return t.x1===t.x2&&t.y1===t.y2}function Ox(t){return t.width<=0||t.height<=0}function Ix(t){return t.r<=0}function Px(t){return t.edges.length<=2}function Dx(t,e){for(var n=0,i=e.edges.length;n<i;n++)if(!0===Hx(t,Bd(e.edges[n])))return!0;return!1}function jx(t,e){for(var n=e.numPolygons,i=e.polygons,r=0;r<n;r++)if(!0===Zx(t,i[r]))return!0;return!1}function zx(t,e){return!Ix(t)&&yx({x:t.cx,y:t.cy},e)<=Math.pow(t.r,2)}function Fx(t,e){if(Ox(e)||Ix(t))return!1;var n=e.width/2,i=e.height/2,r=e.y+i,s=t.r,o=t.cy,a=Math.abs(t.cx-(e.x+n)),l=Math.abs(o-r);return!(a>n+s||l>i+s)&&(a<=n||l<=i||Math.pow(a-n,2)+Math.pow(l-i,2)<=Math.pow(s,2))}function qx(t,e){if(Ix(t)||Nx(e))return!1;var n=Od(Ld(e),2),i=n[0],r=n[1];if(zx(t,i)||zx(t,r))return!0;var s={x:t.cx,y:t.cy},o=function(t,e,n){return ux(function(t,e){var n=mx(t,e)/mx(e,e)||1;return{x:e.x*n,y:e.y*n}}(hx(n,t),hx(e,t)),t)}(i,r,s);return yx(o,s)<=Math.pow(t.r,2)&&Ax(i,r,o)}function Lx(t,e){if(Px(e)||Ix(t))return!1;if(Vx(e,{x:t.cx,y:t.cy}))return!0;for(var n=e.edges.length,i=0;i<n;i++)if(qx(t,Bd(e.edges[i])))return!0;return!1}function Vx(t,e){if(Px(t)||!Ux(t.boundingRect(),e))return!1;var n,i,r,s,o,a=e.x,l=e.y,c=t.vertices;for(n=!1,s=-1,r=(i=c.length)-1;++s<i;r=s){if(c[s].x===a&&c[s].y===l)return!0;if(c[s].y===c[r].y&&c[s].y===l&&(a-c[s].x)*(a-c[r].x)<=0)return!0;if(c[s].y<l&&l<=c[r].y||c[r].y<l&&l<=c[s].y){if(a===(o=(c[r].x-c[s].x)*(l-c[s].y)/(c[r].y-c[s].y)+c[s].x))return!0;a<o&&(n=!n)}}return n}function Hx(t,e){if(Px(t))return!1;for(var n=0,i=t.edges.length;n<i;n++)if(Qx(e,Bd(t.edges[n])))return!0;var r=Od(Ld(e),2),s=r[1];return Vx(t,r[0])||Vx(t,s)}function Bx(t,e){if(Px(t))return!1;for(var n=0,i=t.edges.length;n<i;n++)if(Yx(e,Bd(t.edges[n])))return!0;var r=Od(Vd(e),4),s=r[1],o=r[2],a=r[3];return Vx(t,r[0])||Vx(t,s)||Vx(t,o)||Vx(t,a)}function Wx(t,e){return!Ox(t)&&!Ox(e)&&t.x<=e.x+e.width&&e.x<=t.x+t.width&&t.y<=e.y+e.height&&e.y<=t.y+t.height}function $x(t,e){return!Ox(t)&&!Ox(e)&&[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}].every((function(e){return Ux(t,e)}))}function Ux(t,e){return!Ox(t)&&e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height}function Yx(t,e){if(Nx(e)||Ox(t))return!1;var n=Od(Ld(e),2),i=n[1];if(Ux(t,n[0])||Ux(t,i))return!0;for(var r=Vd(t),s=r.length,o=0;o<s;o++)if(Qx(Bd([r[o],r[3!==o?o+1:0]]),e))return!0;return!1}function Qx(t,e){var n,i,r=Od(Ld(t),2),s=r[0],o=r[1],a=Od(Ld(e),2),l=a[0],c=a[1],u=fx(o,s),h=px(o,s),d=fx(c,l),f=px(c,l),p=fx(s,l),y=px(s,l),g=f*u-d*h,m=d*y-f*p,v=u*y-h*p;if(0===u&&0===h)return!1;if(0===d&&0===f)return!1;if(0===g){if(0===m&&0===v){if(0===u){if(0===h)return s.x===o.x&&s.y===o.y;n=px(l,s)/h,i=px(c,s)/h}else n=(l.x-s.x)/u,i=(c.x-s.x)/u;return!(n<0&&i<0||n>1&&i>1)}return!1}var x=m/g;return g=v/g,x>=0&&x<=1&&g>=0&&g<=1}function Kx(t,e){if(Nx(t))return!1;var n=Od(Ld(t),2);return Ax(n[0],n[1],e)}function Xx(t,e){var n=t.boundingRect(),i=e.boundingRect();return!!Wx(n,i)&&($x(n,i)?Dx(t,e):Dx(e,t))}function Zx(t,e){var n=t.boundingRect(),i=e.boundingRect();return!!Wx(n,i)&&($x(i,n)?function(t,e){for(var n=t.numPolygons,i=t.polygons,r=0;r<n;r++)if(!0===Xx(e,i[r]))return!0;return!1}(t,e):function(t,e){for(var n=0,i=e.edges.length;n<i;n++)if(!0===tb(t,Bd(e.edges[n])))return!0;return!1}(t,e))}function Gx(t,e){if(Ix(t))return!1;if(Jx(e,{x:t.cx,y:t.cy}))return!0;for(var n=e.numPolygons,i=e.polygons,r=0;r<n;r++)for(var s=i[r],o=s.edges.length,a=0;a<o;a++)if(qx(t,Bd(s.edges[a])))return!0;return!1}function Jx(t,e){if(!Ux(t.boundingRect(),e))return!1;var n,i,r,s,o,a,l=e.x,c=e.y,u=t.numPolygons,h=!1;for(i=0;i<u;i++)for(o=-1,s=(r=(n=t.vertices[i]).length)-1;++o<r;s=o){if(n[o].x===l&&n[o].y===c)return!0;if(n[o].y===n[s].y&&n[o].y===c&&(l-n[o].x)*(l-n[s].x)<=0)return!0;if(n[o].y<c&&c<=n[s].y||n[s].y<c&&c<=n[o].y){if(l===(a=(n[s].x-n[o].x)*(c-n[o].y)/(n[s].y-n[o].y)+n[o].x))return!0;l<a&&(h=!h)}}return h}function tb(t,e){var n=Od(Ld(e),2),i=n[1];if(Jx(t,n[0])||Jx(t,i))return!0;for(var r=t.numPolygons,s=t.polygons,o=0;o<r;o++)for(var a=s[o],l=0,c=a.edges.length;l<c;l++)if(Qx(e,Bd(a.edges[l])))return!0;return!1}function eb(t,e){var n=Od(Vd(e),4),i=n[1],r=n[2],s=n[3];if(Jx(t,n[0])||Jx(t,i)||Jx(t,r)||Jx(t,s))return!0;for(var o=t.numPolygons,a=t.polygons,l=0;l<o;l++)for(var c=a[l],u=0,h=c.edges.length;u<h;u++)if(Yx(e,Bd(c.edges[u])))return!0;return!1}var nb=/^\$/,ib="@extend";function rb(t){throw new Error('Cyclical reference for "'.concat(t,'"'))}function sb(t,e){return function t(e,n,i){if("string"==typeof e){var r=n[e];return-1!==i.indexOf(e)&&rb(e),nb.test(r)?(i.push(e),t(r,n,i)):r}var s=e,o=pd(!0,{},n,e),a={};if(e[ib]){var l=e[ib];-1!==i.indexOf(l)&&rb(l);var c=i.slice();c.push(l),s=pd(!0,{},t(o[l],n,c),e)}return Object.keys(s).forEach((function(e){var n=i.slice();if(e!==ib&&!nb.test(e)){a[e]=s[e];var r=a[e];nb.test(r)&&r in o?(-1!==i.indexOf(r)&&rb(r),n.push(r),a[e]="object"===gd(r=o[r])||nb.test(r)&&r in o?t(r,o,n):r):"object"===gd(r)&&(a[e]=t(r,o,n))}})),a}(t,e,[])}function ob(t){t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height)}function ab(t,e){var n={x:0,y:0,width:0,height:0},i={x:0,y:0,width:0,height:0};return n.width=t.width||0,n.height=t.height||0,void 0!==e.size&&(n.width=isNaN(e.size.width)?n.width:e.size.width,n.height=isNaN(e.size.height)?n.height:e.size.height),void 0!==e.logicalSize?(i.width=isNaN(e.logicalSize.width)?n.width:e.logicalSize.width,i.height=isNaN(e.logicalSize.height)?n.height:e.logicalSize.height,i.align=isNaN(e.logicalSize.align)?.5:Math.min(Math.max(e.logicalSize.align,0),1),i.preserveAspectRatio=e.logicalSize.preserveAspectRatio):(i.width=n.width,i.height=n.height,i.preserveAspectRatio=!1),ob(i),ob(n),{logicalContainerRect:i,containerRect:n}}function lb(t){var e={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return pd(!0,e,t),e.center.minWidthRatio=Math.min(Math.max(e.center.minWidthRatio,0),1),e.center.minHeightRatio=Math.min(Math.max(e.center.minHeightRatio,0),1),e.center.minWidth=Math.max(e.center.minWidth,0),e.center.minHeight=Math.max(e.center.minHeight,0),e}function cb(t,e,n,i,r){return{x:isNaN(t)?0:t,y:isNaN(t)?0:e,width:isNaN(t)?0:n,height:isNaN(t)?0:i,margin:isNaN(r)?0:r}}function ub(t,e,n){if(void 0===t.cachedSize){var i,r=t.config.dock(),s=t.comp.preferredSize({inner:e,outer:n,dock:r});isNaN(s)?s&&!isNaN(s.size)&&(s.width=s.size,s.height=s.size):s={width:s,height:s},i="top"===r||"bottom"===r?s.height:"right"===r||"left"===r?s.width:Math.max(s.width,s.height),t.cachedSize=Math.ceil(i),t.edgeBleed=s.edgeBleed||0}return t.cachedSize}function hb(t,e){switch(e.config.dock()){case"top":t.y+=e.cachedSize,t.height-=e.cachedSize;break;case"bottom":t.height-=e.cachedSize;break;case"left":t.x+=e.cachedSize,t.width-=e.cachedSize;break;case"right":t.width-=e.cachedSize}}function db(t,e){var n=e.edgeBleed;n&&(t.left=Math.max(t.left,n.left||0),t.right=Math.max(t.right,n.right||0),t.top=Math.max(t.top,n.top||0),t.bottom=Math.max(t.bottom,n.bottom||0))}function fb(t,e,n){e.x<n.left&&(e.width-=n.left-e.x,e.x=n.left);var i=t.width-(e.x+e.width);i<n.right&&(e.width-=n.right-i),e.y<n.top&&(e.height-=n.top-e.y,e.y=n.top);var r=t.height-(e.y+e.height);r<n.bottom&&(e.height-=n.bottom-r)}function pb(t,e,n,i,r){var s=pd({},e),o=pd({},n);return hb(s,i),db(o,i),fb(t,s,o),!!function(t,e,n){var i=Math.min(n.center.minWidth,t.width)||Math.max(t.width*n.center.minWidthRatio,1),r=Math.min(n.center.minHeight,t.height)||Math.max(t.height*n.center.minHeightRatio,1);return e.width>=i&&e.height>=r}(t,s,r)&&(hb(e,i),db(n,i),!0)}function yb(t){var e=t.layoutRect,n=t.visible,i=t.hidden,r=t.settings,s=cb(e.x,e.y,e.width,e.height),o={left:0,right:0,top:0,bottom:0},a=n.slice();a.sort((function(t,e){return t.config.prioOrder()-e.config.prioOrder()}));for(var l=0;l<a.length;++l){var c=a[l];ub(c,s,e),pb(e,s,o,c,r)||(i.push(a.splice(l,1)[0]),--l)}!function(t,e){if(0!==e.length)for(var n=0;n<t.length;++n){var i=t[n];i.referencedDocks.length&&i.referencedDocks.every((function(t){return e.some((function(e){return e.key===t}))}))&&e.push(t.splice(n,1)[0])}}(n,i);var u=n.filter((function(t){return-1!==a.indexOf(t)}));return n.length=0,n.push.apply(n,Id(u)),fb(e,s,o),s}function gb(t){return{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y}}function mb(t){var e;return Hd((e=[]).concat.apply(e,Id(t.map(Vd))))}function vb(t){var e=t.visible,n=t.layoutRect,i=t.reducedRect,r=t.containerRect,s=t.translation,o=cb(i.x,i.y,i.width,i.height),a=cb(i.x,i.y,i.width,i.height),l={},c=e.slice(),u=c.slice().sort((function(t,e){return t.config.displayOrder()-e.config.displayOrder()}));return e.sort((function(t,e){if(e.referencedDocks.length>0)return-1;if(t.referencedDocks.length>0)return 1;var n=t.config.displayOrder()-e.config.displayOrder();return 0===n?c.indexOf(t)-c.indexOf(e):n})).forEach((function(t){var e={},c={};switch(t.config.dock()){case"top":e.height=c.height=t.cachedSize,e.width=n.width,c.width=o.width,e.x=n.x,c.x=o.x,e.y=c.y=o.y-t.cachedSize,o.y-=t.cachedSize,o.height+=t.cachedSize;break;case"bottom":e.x=n.x,c.x=o.x,e.y=c.y=o.y+o.height,e.width=n.width,c.width=o.width,e.height=c.height=t.cachedSize,o.height+=t.cachedSize;break;case"left":e.x=c.x=a.x-t.cachedSize,e.y=n.y,c.y=a.y,e.width=c.width=t.cachedSize,e.height=n.height,c.height=a.height,a.x-=t.cachedSize,a.width+=t.cachedSize;break;case"right":e.x=c.x=a.x+a.width,e.y=n.y,c.y=a.y,e.width=c.width=t.cachedSize,e.height=n.height,c.height=a.height,a.width+=t.cachedSize;break;case"center":e.x=c.x=i.x,e.y=c.y=i.y,e.width=c.width=i.width,e.height=c.height=i.height;break;default:if(t.referencedDocks.length>0){var u=t.referencedDocks.map((function(t){return l[t]})).filter((function(t){return!!t}));u.length>0&&(e=mb(u.map((function(t){return t.outerRect}))),c=mb(u.map((function(t){return t.r}))))}}t.key&&(l[t.key]={r:c,outerRect:e}),function(t,e,n,i){var r={x:i.width/n.width,y:i.height/n.height},s={left:0,top:0};if(n.preserveAspectRatio){var o=r.x<r.y,a=Math.min(r.x,r.y);r.x=a,r.y=a;var l=o?"height":"width",c=(i[l]-n[l]*r.x)*n.align;s.left=o?0:c,s.top=o?c:0}t.scaleRatio=r,t.margin=s,e.scaleRatio=r,e.margin=s,n.scaleRatio=r,n.margin=s}(c,e,n,r),c.edgeBleed=t.edgeBleed,c.computed=gb(c),e.edgeBleed=t.edgeBleed,e.computed=gb(e),c.x+=s.x,c.y+=s.y,e.x+=s.x,e.y+=s.y,t.comp.resize(c,e),t.cachedSize=void 0,t.edgeBleed=void 0})),u}function xb(t){if(!t.resize||"function"!=typeof t.resize)throw new Error("Component is missing resize function");if(!t.dockConfig&&!t.preferredSize)throw new Error("Component is missing preferredSize function")}function bb(t,e,n){for(var i,r,s,o,a,l=[],c=[],u=0;u<t.length;++u){var h=t[u];xb(h);var d=h.dockConfig,f=h.key,p=d.dock(),y=/@/.test(p)?p.split(",").map((function(t){return t.replace(/^\s*@/,"")})):[];r=n,a=void 0,s=e.layoutModes||{},o=(i=d).minimumLayoutMode(),(a=i.show())&&"object"===gd(o)?a=s[o.width]&&s[o.height]&&r.width>=s[o.width].width&&r.height>=s[o.height].height:a&&void 0!==o&&(a=s[o]&&r.width>=s[o].width&&r.height>=s[o].height),a?l.push({comp:h,key:f,config:d,referencedDocks:y}):c.push({comp:h,key:f,config:d,referencedDocks:y})}return[l,c]}var _b=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(i.hasKey&&i.key===e)return t[n]}return null},wb=function t(e){return null==e?void 0:e.map((function(e){var n=e.instance.dockConfig();return{preferredSize:function(i){return n.computePreferredSize(wd(wd({},i),{},{children:t(e.children)}))}}}))},kb=function(t,e){return{visible:[],hidden:e,ordered:[]}},Sb=function(t){return function(e,n){var i,r=n.map((function(t,e){var n=t.instance.dockConfig();return{index:e,key:t.key,dockConfig:n,resize:t.instance.resize,preferredSize:function(e){return n.computePreferredSize(wd(wd({},e),{},{children:wb(t.children)}))}}})),s=function(t){return n[t.index]},o=null!==(i=t(e,r))&&void 0!==i?i:{},a=o.visible,l=void 0===a?r:a,c=o.hidden,u=void 0===c?[]:c,h=o.ordered,d=void 0===h?l:h;return{visible:l.map(s),hidden:u.map(s),ordered:d.map(s)}}},Mb=function(t){return"function"==typeof t?Sb(t):(e=lb(t),n={layout:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t||isNaN(t.x)||isNaN(t.y)||isNaN(t.width)||isNaN(t.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};var i=ab(t,e),r=i.logicalContainerRect,s=i.containerRect,o=Od(bb(n,e,r),2),a=o[0],l=o[1],c=vb({visible:a,layoutRect:r,reducedRect:yb({layoutRect:r,visible:a,hidden:l,settings:e}),containerRect:s,translation:{x:t.x,y:t.y}});return l.forEach((function(t){t.comp.visible=!1;var e=cb();t.comp.resize(e,e)})),{visible:a.map((function(t){return t.comp})),hidden:l.map((function(t){return t.comp})),ordered:c.map((function(t){return t.comp}))}},settings:function(t){e=lb(t)}},Sb((function(t,e){return n.layout(t,e)})));var e,n};function Eb(t,e,n){var i=e.left-n.left,r=e.top-n.top,s=Wd(t),o=pd(!0,{},t);switch(s){case"circle":o.cx+=i,o.cy+=r;break;case"polygon":for(var a=0,l=o.vertices.length;a<l;a++){var c=o.vertices[a];c.x+=i,c.y+=r}break;case"geopolygon":for(var u=0;u<o.vertices.length;u++)for(var h=o.vertices[u],d=0,f=h.length;d<f;d++){var p=h[d];p.x+=i,p.y+=r}break;case"line":o.x1+=i,o.y1+=r,o.x2+=i,o.y2+=r;break;case"point":case"rect":o.x+=i,o.y+=r}return o}function Cb(t,e){var n=[],i=0;e.forEach((function(t){n.push(i),i++;var e=t.instance.def.additionalElements&&t.instance.def.additionalElements();e&&(i+=e.length)})),e.forEach((function(e,i){return function(t,e,n){var i=e.instance.renderer().element();if(!isNaN(n)&&i&&t&&t.children){var r=t.children[Math.max(0,n)];if(i!==r){var s=e.instance.def.additionalElements&&e.instance.def.additionalElements().filter(Boolean);t.insertBefore&&void 0!==r?(t.insertBefore(i,r),s&&s.forEach((function(e){t.insertBefore(e,i)}))):(s&&s.forEach((function(e){t.appendChild(e,i)})),t.appendChild(i))}}}(t,e,n[i])}))}function Tb(t,e){var n=t.element,i=t.data,r=void 0===i?[]:i,s=t.settings,o=void 0===s?{}:s,a=t.on,l=void 0===a?{}:a,c=e.registries,u=e.logger,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={},n=t,i=function(t){t.forEach((function(t){var n=Array.isArray(t.colors[0])?t.colors:[t.colors];e[t.key]={colors:n,sizes:n.map((function(t){return t?t.length:0}))}}))},r=function(t,n){var i=e[t];if(!i)return[];for(var r=i.sizes,s=0;s<r.length;s++)if(n<=r[s])return i.colors[s];return i.colors[r.length-1]},s={palette:function(t,e){return r(t,e)},setPalettes:i,style:function(t){return sb(t,n)},setStyle:function(e){n=pd({},t,e)}};return i(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),s}(e.style,e.palettes),d=[],f=pd({},t),p=function(){var t={};return yv(t),t}(),y=[],g=null,m=null,v=null,x=[],b=function(){},_=function(){},w={},k=!1,S=function(t){var e=t.createComponent,n={},i=[],r=[],s=function t(n){var r=e(n);return r&&(i.push(r),n.components&&(r.children=n.components.map((function(e){return t(e)})).filter((function(t){return!!t})))),r};return n.destroy=function(){i.forEach((function(t){return t.instance.destroy()})),i=[],r=[]},n.findComponentByKey=function(t){return _b(i,t)},n.forEach=function(t){i.forEach(t)},n.layout=function(t){var e=t.rect,n=[],i=[],s=[],o=Mb(t.layoutSettings);return function t(e){var n=e.hidden,i=e.ordered,r=e.visible,s=(0,e.layoutFn)(e.rect,e.components),o=s.visible,a=s.hidden,l=s.ordered;r.push.apply(r,Id(o)),n.push.apply(n,Id(a)),i.push.apply(i,Id(l)),o.forEach((function(e){if(e.children){var s,o,a=Mb(null!==(s=null===(o=e.settings)||void 0===o?void 0:o.strategy)&&void 0!==s?s:{});t({components:e.children,hidden:n,layoutFn:a,ordered:i,rect:e.instance.getRect(),visible:r})}})),a.forEach((function(e){e.children&&t({components:e.children,hidden:n,layoutFn:kb,ordered:i,rect:null,visible:r})}))}({components:r,hidden:i,layoutFn:o,ordered:s,rect:e,visible:n}),{visible:n,hidden:i,ordered:s}},n.set=function(t){r=t.components.map((function(t){return s(t)})).filter((function(t){return!!t}))},n.update=function(t){var e=t.components,n=t.data,o=t.excludeFromUpdate,a=t.formatters,l=t.scales;(function t(e,n){for(var r=function(r){var s,o=e[r],a=n.find((function(t){return o.hasKey&&o.key===t.key}));a?o.children&&a.components&&t(o.children,a.components):(e.splice(r,1),-1!==(s=i.indexOf(o))&&i.splice(s,1),o.children&&t(o.children,[]),o.instance.destroy())},s=e.length-1;s>=0;s--)r(s)})(r,e),r=function t(e){var n=e.compList,i=e.data,r=e.excludeFromUpdate,o=e.formatters,a=e.scales;return e.settingsList.map((function(e){var l=_b(n,e.key);return r.indexOf(e.key)>-1?l:l?e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(l.applyTransform=!0,l):(l.updateWith={formatters:o,scales:a,data:i,settings:e},e.components&&(l.children=t({compList:l.children||[],data:i,excludeFromUpdate:r,formatters:o,scales:a,settingsList:e.components})),l):s(e)})).filter((function(t){return!!t}))}({compList:r,data:n,excludeFromUpdate:o,formatters:a,scales:l,settingsList:e})},n}({createComponent:function(t){return c.component.has(t.type)?{instance:function(t){var e,n,i,r,s,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.defaultSettings,l=void 0===a?{}:a,c=t._DO_NOT_USE_getInfo,u=void 0===c?function(){return{}}:c,h=o.chart,d=o.container,f=o.mediator,p=o.registries,y=o.theme,g=o.renderer,m=yv({}),v=o.settings||{},x=pd(!0,{},l,v),b=[],_=Xv({chart:h}),w=!1,k={nodes:[],chart:h,config:x.brush||{},renderer:null},S={tap:[],over:[]},M=[],E={},C=pd({},v);function T(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var r,s,o,a=void 0!==t[e],l=void 0!==v[e],c=arguments.length,u=new Array(c),h=0;h<c;h++)u[h]=arguments[h];return a&&("function"==typeof t[e]?r=(s=t[e]).call.apply(s,[E].concat(u)):i&&(r=t[e])),l&&("function"==typeof v[e]?r=(o=v[e]).call.apply(o,[C].concat(u)):i&&(r=v[e])),a||l||(r=n.call.apply(n,[E].concat(u))),r}}var A=T("preferredSize",(function(){return 0}),!0),R=T("resize",(function(t){return t.inner})),N=T("created"),O=T("beforeMount"),I=T("mounted"),P=T("beforeUnmount"),D=T("beforeUpdate"),j=T("updated"),z=T("beforeRender"),F=T("beforeDestroy"),q=T("destroyed"),L=t.render,V=function(){x.brush&&(x.brush.consume||[]).forEach((function(t){t.context&&t.style&&M.push(Zv(k,t))}))},H=function(){x.brush&&(x.brush.trigger||[]).forEach((function(t){"over"===t.on?S.over.push(t):S.tap.push(t)}))};Object.defineProperty(k,"data",{get:function(){return b}});var B=x.renderer||t.renderer,W=B?g||p.renderer(B)():g||p.renderer()();"function"==typeof W.settings&&W.settings(x.rendererSettings),k.renderer=W;var $={resources:h.logger?{logger:h.logger()}:{}},U=Sx(Ex(x,A,h.logger()),$),Y=function(t){t.key=x.key,t.element=W.element()},Q=function(){};Q.dockConfig=function(){return U},Q.set=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.settings&&(v=t.settings,x=pd(!0,{},l,t.settings),U=Sx(Ex(x,A,h.logger()),$)),x.scale&&(e=h.scale(x.scale)),b=x.data?ng(x.data,{dataset:h.dataset,collection:h.dataCollection},{logger:h.logger()},h.dataCollection):e?e.data():[],"string"==typeof x.formatter||"object"===gd(x.formatter)?n=h.formatter(x.formatter):e&&e.data().fields&&(n=e.data().fields[0].formatter()),s=y.style(x.style||{})},Q.resize=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=R({inner:t,outer:e});r=W.size(n||t),C.rect=pd(!0,{computedPhysical:r.computedPhysical,computedOuter:e.computed||e,computedInner:t.computed||t},t),r=pd(!0,{computedOuter:e.computed||e,computedInner:t.computed||t},r)},Q.getRect=function(){return C.rect};var K,X,Z=function(){var t=W.renderArgs?W.renderArgs.slice(0):[];return t.push({data:b}),t};Q.beforeMount=O,Q.beforeRender=function(){z({size:r})},Q.render=function(){var t=k.nodes=L.call.apply(L,[E].concat(Id(Z())));W.render(t),K=t},Q.hide=function(){Q.unmount(),W.size({x:0,y:0,width:0,height:0}),W.clear()},Q.beforeUpdate=function(){D({settings:x,data:b})},Q.update=function(){if(X&&X.stop(),x.rendererSettings&&"function"==typeof x.rendererSettings.transform&&x.rendererSettings.transform())W.render();else{var t=k.nodes=L.call.apply(L,[E].concat(Id(Z())));M.forEach((function(t){return t.cleanUp()})),M.length=0,S.tap=[],S.over=[],x.brush&&(V(),H()),M.forEach((function(t){t.isActive()&&t.update()})),K&&x.animations&&x.animations.enabled?(X=Bv({old:K,current:t},{renderer:W},x.animations)).start():W.render(t),K=t,W.setKey&&"string"==typeof v.key&&W.setKey(v.key)}},Q.updated=j,Q.destroy=function(){Q.unmount(),F(i),W.destroy(),q(),i=null};var G=function(t){k.nodes=t,M.forEach((function(t){t.isActive()&&t.update()})),W.render(t)};return Mx(E,t,{settings:function(){return x},data:function(){return b},scale:function(){return e},formatter:function(){return n},renderer:function(){return W},chart:function(){return h},dockConfig:function(){return U},mediator:function(){return f},instance:function(){return C},rect:function(){return C.rect},style:function(){return s},update:function(){return G},registries:function(){return p},resolver:function(){return _},symbol:function(){return kx(p.symbol)}}),Mx(C,v,{settings:function(){return x},data:function(){return b},scale:function(){return e},formatter:function(){return n},renderer:function(){return W},chart:function(){return h},dockConfig:function(){return U},mediator:function(){return f},style:function(){return s},_DO_NOT_USE_getInfo:u.bind(E),isVisible:function(){return w}}),Q.getBrushedShapes=function(t,e,n){var i=[];if(x.brush&&x.brush.consume){var r=h.brush(t),s=W.findShapes("*");x.brush.consume.filter((function(e){return e.context===t})).forEach((function(t){for(var o=0;o<s.length;o++){var a=s[o];a.data&&r.containsMappedData(a.data,n||t.data,e)&&(Y(a),i.push(a),s.splice(o,1),o--)}}))}return i},Q.findShapes=function(t){for(var e=W.findShapes(t),n=0,i=e.length;n<i;n++)Y(e[n]);return e},Q.shapesAt=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=W.itemsAt(t);e=n&&"stop"===n.propagation&&i.length>0?[i.pop().node]:i.map((function(t){return t.node}));for(var r=0,s=e.length;r<s;r++)Y(e[r]);return e},Q.brushFromShapes=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.contexts=Array.isArray(e.contexts)?e.contexts:[],Gv({nodes:t,action:e.action||"toggle",trigger:e,chart:h,data:k.data})},Q.mount=function(){i=W.element&&W.element()?i:W.appendTo(d),W.setKey&&"string"==typeof v.key&&W.setKey(v.key),x.brush&&(V(),H()),Cx(C,m,v),Cx(E,m,t),w=!0},Q.mounted=function(){return I(i)},Q.unmount=function(){[C,E].forEach((function(t){Tx(t,m)})),S.tap=[],S.over=[],M.forEach((function(t){t.cleanUp()})),M.length=0,P(),w=!1},Q.onBrushTap=function(t){S.tap.forEach((function(e){nx({e:t,t:e,config:k})&&"stop"===e.globalPropagation&&h.toggleBrushing(!0)}))},Q.onBrushOver=function(t){S.over.forEach((function(e){ix({e:t,t:e,config:k})&&"stop"===e.globalPropagation&&h.toggleBrushing(!0)}))},Q.def=E,Q.ctx=C,Q.renderer=function(){return W},Q.set({settings:v}),N(),Q}(c.component(t.type),{settings:t,chart:f,mediator:p,registries:c,theme:h,container:n}),settings:pd(!0,{},t),key:t.key,hasKey:void 0!==t.key}:(u.warn("Unknown component: ".concat(t.type)),!1)}});function M(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return function(){for(var i,r="function"==typeof t[e],s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];return r?(i=t[e]).call.apply(i,[f].concat(o)):n.call.apply(n,[f].concat(o))}}var E=function(){var t;o.dockLayout?(u.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),t=o.dockLayout):t=o.strategy;var e=function(t){if("function"==typeof t.getBoundingClientRect){var e=t.getBoundingClientRect();return{x:0,y:0,width:e.width,height:e.height}}return{x:0,y:0,width:0,height:0}}(n);return S.layout({layoutSettings:t,rect:e})},C=M("created"),T=M("beforeMount"),A=M("mounted"),R=M("beforeUpdate"),N=M("updated"),O=M("beforeRender"),I=M("beforeDestroy"),P=M("destroyed"),D=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.partialData,r=e.formatters,s=void 0===r?{}:r,o=e.scales,a=void 0===o?{}:o,l=e.scroll,d=void 0===l?{}:l;b=Ud(t,{logger:u,types:c.data}),i||Object.keys(w).forEach((function(t){return w[t].clear()})),e.palettes&&h.setPalettes(e.palettes),e.style&&h.setStyle(e.style),_=ig(e.collections,{dataset:b},{logger:u});var f={theme:h,logger:u};g=hv(a,{dataset:b,collection:_},wd(wd({},f),{},{scale:c.scale})),m=sg(s,{dataset:b,collection:_},wd(wd({},f),{},{formatter:c.formatter})),v=vv(d,v)};function j(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e={},i=t.filter((function(t){return!!t.key})).map((function(t){return t.key}));x.forEach((function(t){t.key&&-1!==i.indexOf(t.key)?e[t.key]=t:t.destroy()})),x=t.map((function(t){var i=t.key&&e[t.key]?e[t.key]:c.interaction(t.type)(f,p,n);return i.set(t),i}))}var z=function(t){var e=n.getBoundingClientRect(),i={x:("clientX"in t?t.clientX:t.x)-e.left,y:("clientY"in t?t.clientY:t.y)-e.top},r=[];return y.forEach((function(t){var e=t.instance.getRect();Ux(e.computedPhysical?e.computedPhysical:{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y},i)&&r.push(t)})),r},F=function(){if(!d.length&&n){Object.keys(l).forEach((function(t){var e=l[t].bind(f);n.addEventListener(t,e),d.push({key:t,listener:e})}));var t,e={},i=function(t){t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=z(e)},r=function(t){var n=e.comps||z(t);if(!n.every((function(t){return t.instance.def.disableTriggers}))&&("touchend"===t.type&&t.preventDefault(),function(t,e){var n=jd(t),i=n?t.changedTouches[0]:t,r=Date.now()-e.time,s=isNaN(e.x)?0:Math.abs(i.clientX-e.x),o=isNaN(e.y)?0:Math.abs(i.clientY-e.y);return(0===t.button||n)&&!e.multiTouch&&s<=12&&o<=12&&r<=300}(t,e)))for(var i=n.length-1;i>=0;i--)if(n[i].instance.onBrushTap(t),k){k=!1;break}},s=[];s.push({key:"mousedown",listener:i}),s.push({key:"mouseup",listener:r}),("ontouchstart"in(t=n)&&"ontouchend"in t||navigator.maxTouchPoints>1)&&(s.push({key:"touchstart",listener:i}),s.push({key:"touchend",listener:r})),s.push({key:"mousemove",listener:function(t){for(var e=z(t),n=e.length-1;n>=0;n--)if(e[n].instance.onBrushOver(t),k){k=!1;break}}}),s.forEach((function(t){n.addEventListener(t.key,t.listener),d.push(t)}))}},q=function(){d.forEach((function(t){return n.removeEventListener(t.key,t.listener)})),d.length=0};return f.layoutComponents=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.excludeFromUpdate,n=void 0===e?[]:e;t.data&&(r=t.data),t.settings&&(o=t.settings,j(t.settings.interactions)),R(),D(r,o);var i=o,s=i.formatters,a=i.scales,l=i.components,c=void 0===l?[]:l;S.update({components:c,data:r,excludeFromUpdate:n,formatters:s,scales:a}),S.forEach((function(t){t.updateWith&&t.instance.set(t.updateWith)})),S.forEach((function(t){t.updateWith&&t.instance.beforeUpdate()})),E()},f.update=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.partialData,s=e.excludeFromUpdate,a=void 0===s?[]:s;e.data&&(r=e.data),e.settings&&(o=e.settings,j(e.settings.interactions)),R(),D(r,o,{partialData:i});var l=o,c=l.formatters,u=l.scales,h=l.components,d=void 0===h?[]:h;S.update({components:d,data:r,excludeFromUpdate:a,formatters:c,scales:u}),S.forEach((function(t){t.updateWith&&t.instance.set(t.updateWith)})),S.forEach((function(t){t.updateWith&&t.instance.beforeUpdate()}));var f,p=[],g=[];if(i)S.forEach((function(t){(t.updateWith||t.applyTransform)&&t.visible&&p.push(t)})),f=p;else{var m=E(),v=m.visible,x=m.hidden,b=m.ordered;y=v,f=v,t=b,v.forEach((function(t){t.updateWith&&t.visible?p.push(t):g.push(t)})),x.forEach((function(t){t.instance.hide(),t.visible=!1,delete t.updateWith,t.applyTransform=!1}))}g.forEach((function(t){return t.instance.beforeMount()})),g.forEach((function(t){return t.instance.mount()})),f.forEach((function(t){return t.instance.beforeRender()})),f.forEach((function(t){(t.updateWith||t.applyTransform)&&t.visible?t.instance.update():t.instance.render()})),i||Cb(n,t),g.forEach((function(t){return t.instance.mounted()})),p.forEach((function(t){return t.instance.updated()})),y.forEach((function(t){delete t.updateWith,t.visible=!0,t.applyTransform=!1})),N()},f.destroy=function(){I(),S.destroy(),q(),j(),delete f.update,delete f.destroy,P()},f.getAffectedShapes=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=[];return y.filter((function(t){return null==i||t.key===i})).forEach((function(i){r.push.apply(r,Id(i.instance.getBrushedShapes(t,e,n)))})),r},f.findShapes=function(t){var e=[];return y.forEach((function(n){e.push.apply(e,Id(n.instance.findShapes(t)))})),e},f.componentsFromPoint=function(t){return z(t).map((function(t){return t.instance.ctx}))},f.shapesAt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=[],r=n.getBoundingClientRect(),s=y;if(Array.isArray(e.components)&&e.components.length>0){var o=e.components.map((function(t){return t.key}));s=y.filter((function(t){return-1!==o.indexOf(t.key)})).map((function(t){return{instance:t.instance,opts:e.components[o.indexOf(t.key)]}}))}for(var a=s.length-1;a>=0;a--){var l=s[a],c=l.instance.renderer().element().getBoundingClientRect(),u=Eb(t,r,c),h=l.instance.shapesAt(u,l.opts),d=h.length>0&&"stop"===e.propagation;if(i.push.apply(i,Id(h)),i.length>0&&d)return i}return i},f.brushFromShapes=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]},n=function(n){var i=e.components[n].key;y.filter((function(t){return i===t.key})).forEach((function(i){var r=t.filter((function(t){return t.key===i.key}));i.instance.brushFromShapes(r,e.components[n])}))},i=0;i<e.components.length;i++)n(i)},f.scroll=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return xv(t,v)},f.dataset=function(t){return b(t)},f.dataCollection=function(t){return _(t)},f.scales=function(){return g.all()},f.formatters=function(){return m.all()},f.brush=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return w[t]||(w[t]=Fv()),w[t]},f.scale=function(t){return g.get(t)},f.formatter=function(t){return m.get(t)},f.toggleBrushing=function(t){k=void 0!==t?t:!k},f.component=function(t){var e=S.findComponentByKey(t);return null==e?void 0:e.instance.ctx},f.logger=function(){return u},f.theme=function(){return h},Object.defineProperty(f,"interactions",{get:function(){return{instances:x,on:function(){F(),x.forEach((function(t){return t.on()}))},off:function(){q(),x.forEach((function(t){return t.off()}))}}}}),C(),n&&(T(),n.innerHTML="",function(){var t=o.components,e=void 0===t?[]:t;O(),D(r,o),S.set({components:e});var i=E(),s=i.visible,a=i.ordered;y=s,i.hidden.forEach((function(t){t.instance.hide(),t.visible=!1})),s.forEach((function(t){return t.instance.beforeMount()})),s.forEach((function(t){return t.instance.mount()})),s.forEach((function(t){return t.instance.beforeRender()})),s.forEach((function(t){return t.instance.render()})),s.forEach((function(t){return t.instance.mounted()})),s.forEach((function(t){t.visible=!0})),Cb(n,a)}(),F(),j(o.interactions),A(n),f.element=n),f}var Ab=function(t){var e=Xf(t);return e.prio=function(t){return t?e.default(t[0]):[e.default()]},e.types=function(){return e.getKeys()},e},Rb=Xf();function Nb(t,e){var n=e.cache;if("number"==typeof t)return n.fields[t];for(var i=0;i<n.fields.length;i++)if(n.fields[i].key()===t)return n.fields[i];for(var r=0;r<n.fields.length;r++)if(n.fields[r].title()===t)return n.fields[r];return null}var Ob=function(t){return t.filter((function(t){return"number"==typeof t&&!isNaN(t)}))},Ib={first:function(t){return t[0]},last:function(t){return t[t.length-1]},min:function(t){var e=Ob(t);return e.length?Math.min.apply(null,e):NaN},max:function(t){var e=Ob(t);return e.length?Math.max.apply(null,e):NaN},sum:function(t){var e=Ob(t);return e.length?e.reduce((function(t,e){return t+e}),0):NaN},avg:function(t){var e=Ob(t),n=e.length;return n?function(t){return t.reduce((function(t,e){return t+e}),0)}(e)/n:NaN}};function Pb(t,e,n,i){var r={},s=i.field||(void 0!==t.field?e.field(t.field):null);return Object.keys(n).forEach((function(o){var a=n[o],l=r[o]={};-1!==["number","string","boolean"].indexOf(gd(a))?(l.type="primitive",l.value=a):"function"==typeof a?(l.type="function",l.value=a,l.label=a,l.field=s):"object"===gd(a)&&(a.fields?l.fields=a.fields.map((function(n){return Pb(t,e,{main:n},i).main})):void 0!==a.field?(l.type="field",l.field=e.field(a.field),l.value=l.field.value,l.label=l.field.label):s&&(l.value=s.value,l.label=s.label,l.field=s),"function"==typeof a.filter&&(l.filter=a.filter),void 0!==a.value&&(l.value=a.value),void 0!==a.label&&(l.label=a.label),"function"==typeof a.reduce?l.reduce=a.reduce:a.reduce?l.reduce=Ib[a.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?Ib[l.field.reduce]:l.field.reduce),"function"==typeof a.reduceLabel?l.reduceLabel=a.reduceLabel:a.reduceLabel?l.reduceLabel=Ib[a.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?Ib[l.field.reduceLabel]:l.field.reduceLabel))})),r}function Db(t,e){var n=Pb(t,e,{main:{value:t.value,label:t.label,reduce:t.reduce,filter:t.filter}},{}).main;return{props:Pb(t,e,t.props||{},n),main:n}}function jb(t,e,n,i){for(var r,s=Array(t.length),o=Array(t.length),a=0;a<t.length;a++)s[a]=(r=i?t[a][i]:t[a]).value,o[a]=r.label;var l=e.reduce,c=e.reduceLabel,u=l?l(s):s,h={value:u,label:c?c(o,u):n?n(u):String(u)};return i&&t[0][i].source?(h.source=t[0][i].source,h):!i&&t[0].source?(h.source=t[0].source,h):h}function zb(t,e){var n=e.main,i=e.propsArr,r=e.props,s=[],o=n.field.formatter(),a={};return i.forEach((function(t){a[t]=r[t].field?r[t].field.formatter():function(t){return t}})),s.push.apply(s,Id(t.map((function(t){var e=jb(t.items,n,o);return i.forEach((function(n){e[n]=jb(t.items,r[n],a[n],n)})),e})))),s}function Fb(t){var e=t.cfg,n=t.itemData,i=t.obj,r=t.target,s=t.tracker,o="function"===t.trackType?e.trackBy(n):n[e.trackBy],a=s[o];a||(a=s[o]={items:[],id:o},r.push(a)),a.items.push(i)}function qb(t,e,n){var i=n.key,r={value:"function"==typeof t.value?t.value(e):void 0!==t.value?t.value:e};return r.label="function"==typeof t.label?t.label(e):String(void 0!==t.label?t.label:r.value),t.field&&(r.source={key:i,field:t.field.key()}),r}function Lb(t,e){var n=Array.isArray(t)?t:[t],i=[];return n.forEach((function(t){void 0!==t.field&&function(){var n=e.field(t.field),r=e.key();if(!n)throw Error("Field '".concat(t.field,"' not found"));for(var s=Db(t,e),o=s.props,a=s.main,l=Object.keys(o),c=!!t.trackBy,u=gd(t.trackBy),h={},d=[],f=n.items(),p=[],y=function(e){var n=f[e];if(a.filter&&!a.filter(n))return"continue";var i=qb(a,n,{key:r});l.forEach((function(t){var s=o[t],a=s.field?s.field.items()[e]:n;i[t]=qb(s,a,{key:r})})),c&&Fb({cfg:t,itemData:n,obj:i,target:d,tracker:h,trackType:u}),p.push(i)},g=0;g<f.length;g++)y(g);i.push.apply(i,c?Id(zb(d,{main:a,propsArr:l,props:o})):p)}()})),i}var Vb=function(t){return t.filter((function(t){return"number"==typeof t&&!isNaN(t)}))},Hb=function(t){var e=t.key,n=t.data,i=t.cache,r=t.config;if(n){var s=n;"string"==typeof s&&(s=function(t){var e=t.config,n=t.data.split("\n"),i=n[0],r=n[1],s=",";if(e&&e.parse&&e.parse.delimiter)s=e.parse.delimiter;else if(i)for(var o=[/,/,/\t/,/;/],a=0;a<o.length;a++){var l=o[a];if(i&&r){if(l.test(i)&&l.test(r)&&i.split(l).length===r.split(l).length){s=l;break}}else l.test(i)&&(s=l)}return n.map((function(t){return t.split(s)}))}({data:n,config:r})),Array.isArray(s)&&function(t){var e,n=t.source,i=t.data,r=t.cache,s=t.config,o=i,a=s&&s.parse;Array.isArray(i[0])?a&&!1===a.headers?e=i[0].map((function(t,e){return e})):(e=i[0],o=i.slice(1)):e=Object.keys(i[0]);var l,c=!!a&&"function"==typeof a.row&&a.row,u=e;u=a&&"function"==typeof a.fields?a.fields(u.slice()):e.map((function(t){return{key:t,title:t}})),Array.isArray(i[0])?l=u.map((function(){return[]})):(l={},u.forEach((function(t){l[t.key]=[]})));for(var h=0;h<o.length;h++){var d=c?c(o[h],h,u):o[h];if(d)if(Array.isArray(d))for(var f=0;f<u.length;f++)l[f].push(d[f]);else for(var p=0;p<u.length;p++)l[u[p].key].push(d[u[p].key])}for(var y=Array.isArray(l)?function(t){return l[t]}:function(t){return l[u[t].key]},g=0;g<u.length;g++){var m=y(g),v=Vb(m),x=v.length>0,b=x?"measure":"dimension",_=x?Math.min.apply(Math,Id(v)):NaN,w=x?Math.max.apply(Math,Id(v)):NaN;r.fields.push(Gy(pd({source:n,key:g,title:u[g].title,values:m,min:_,max:w,type:b},u[g]),{value:u[g].value,label:u[g].label}))}}({data:s,cache:i,source:e,config:r})}};function Bb(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.key,n=t.data,i=t.config,r={fields:[]},s={key:function(){return e},raw:function(){return n},field:function(t){return Nb(t,{cache:r,matrix:n})},fields:function(){return r.fields.slice()},extract:function(t){return Lb(t,s)},hierarchy:function(){return null}};return Hb({key:e,data:n,config:i,cache:r}),s}Bb.util={normalizeConfig:Db,collect:zb,track:Fb};var Wb=Xf();Wb.default("matrix"),Wb("matrix",Bb),Wb("default",Bb);var $b=Xf();function Ub(t,e,n){return Math.max(t,Math.min(e,n))}function Yb(t){var e,n=t.item,i=t.value,r=t.rendWidth,s=t.rendHeight,o="x",a="y",l=r,c=s,u=i<.5?90:-90;return t.flipXY&&(o="y",a="x",l=s,c=r,u=i<.5?180:0),(0,t.symbol)(pd({},n.oob,(bd(e={},o,t.boxCenter*l),bd(e,a,Math.max(n.oob.size/2,Math.min(i*c,c-n.oob.size/2))),bd(e,"startAngle",u),e)))}function Qb(t){var e,n=t.item,i=t.to,r=t.boxCenter,s=t.rendWidth,o=t.rendHeight,a="x1",l="y1",c="x2",u="y2",h=s,d=o;return t.flipXY&&(a="y1",l="x1",c="y2",u="x2",h=o,d=s),pd({},n.line,(bd(e={type:"line"},u,Math.floor(t.from*d)),bd(e,a,r*h),bd(e,l,Math.floor(i*d)),bd(e,c,r*h),bd(e,"data",n.data||{}),bd(e,"collider",{type:null}),e))}function Kb(t){var e,n=t.item,i=t.position,r=t.width,s=t.boxCenter,o=t.rendWidth,a=t.rendHeight,l="x1",c="y1",u="x2",h="y2",d=o,f=a;t.flipXY&&(l="y1",c="x1",u="y2",h="x2",d=a,f=o);var p=r/2;return pd({type:"line"},n[t.key],(bd(e={},c,Math.floor(i*f)),bd(e,l,(s-p)*d),bd(e,h,Math.floor(i*f)),bd(e,u,(s+p)*d),bd(e,"r",p*d),bd(e,"cx",s*d),bd(e,"cy",i*f),bd(e,"width",r*d),bd(e,"data",n.data||{}),bd(e,"collider",{type:null}),e))}function Xb(t,e,n){var i=e.box,r=i.maxWidthPx,s=i.minWidthPx,o=t>=0?1:-1,a=Math.min(o*t*i.width,isNaN(r)?n:r/n);return(a=isNaN(s)?a:Math.max(s/n,a))*o}$b("native",(function(t,e,n){var i,r,s={chart:t,mediator:e,element:n},o=[],a=!0;function l(){"function"==typeof i.enable&&(i.enable=i.enable.bind(s)()),i.enable&&Object.keys(i.events).forEach((function(t){var e=i.events[t].bind(s);n.addEventListener(t,e),o.push({key:t,listener:e})}))}function c(){o.forEach((function(t){n.removeEventListener(t.key,t.listener)})),o=[]}return{get key(){return r},set:function(t){!function(t){r=t.key,(i=t).events=i.events||[],void 0===i.enable&&(i.enable=!0)}(t),c(),a&&l()},off:function(){a=!1,c()},on:function(){a=!0,0===o.length&&l()},destroy:function(){c(),s=null,i=null}}}));var Zb={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},Gb=Object.keys(Zb),Jb={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created:function(){this.state={}},render:function(t){var e=this,n=t.data,i=this.rect,r=i.width,s=i.height,o="horizontal"===this.settings.settings.orientation,a=this.style,l=this.resolver,c=this.symbol,u=Gb.filter((function(t){return!e.settings.settings[t]||!1!==e.settings.settings[t].show})),h={};u.forEach((function(t){return h[t]=Zb[t]}));var d=function(t){var e,n=t.keys,i=t.data,r=t.settings,s=t.width,o=t.height,a=t.resolver,l=pd(!0,{},t.defaultSettings||{},t.style||{}),c={major:"horizontal"===r.orientation?o:s,minor:"horizontal"===r.orientation?s:o},u=r.major;e="object"===gd(u)&&"object"===gd(u.ref)&&void 0!==u.ref.start&&void 0!==u.ref.end?a.resolve({data:i,defaults:{start:0,end:1},scaled:c,settings:pd(!0,{},{binStart:{scale:r.major.scale,ref:r.major.ref.start},binEnd:{scale:r.major.scale,ref:r.major.ref.end}})}):"object"===gd(u)&&void 0!==u.binStart&&void 0!==u.binEnd?a.resolve({data:i,defaults:{start:0,end:1},scaled:c,settings:pd(!0,{},{binStart:{scale:r.major.scale,ref:"binStart"},binEnd:{scale:r.major.scale,ref:"binEnd"}},r.major)}):a.resolve({data:i,scaled:c,defaults:{major:.5},settings:{major:r.major}});var h=r.minor||{},d={};["start","end","min","max","med"].forEach((function(t){(h[t]||i.items&&i.items.length&&i.items[0][t])&&(d[t]={scale:h.scale,ref:t})}));for(var f,p={major:e,minor:a.resolve({data:i,defaults:{start:0,end:1},scaled:c,settings:pd(!0,{},d,h)})},y=0,g=n.length;y<g;y++)r[f]&&!1===r[f].show||(p[f=n[y]]=a.resolve({data:i,defaults:l[f],settings:r[f],scaled:c}));return p}({keys:u,data:n,defaultSettings:h,style:a,settings:this.settings.settings,width:r,height:s,resolver:l});return function(t){var e=t.width,n=t.height,i=t.flipXY,r=t.resolved,s=t.keys,o=t.symbol,a=[],l=r.major.items;if(!l.length)return a;var c,u,h,d,f,p,y,g,m,v=e,x=n,b=i?n:e,_=r.major.settings,w=["start","end","min","max","med"].filter((function(t){return void 0!==r.minor.settings[t]})),k=w.length,S=s.filter((function(t){return"oob"!==t})),M=s?s.length:0,E=S?S.length:0,C={box:function(){h.box&&zd(h.start)&&zd(h.end)&&c.push(function(t){var e,n=t.item,i=t.boxWidth,r=t.boxPadding,s=t.rendWidth,o=t.rendHeight,a="x",l="y",c="width",u="height",h=s,d=o;t.flipXY&&(a="y",l="x",c="height",u="width",h=o,d=s);var f=function(t){var e=t.start,n=t.end,i=t.minPx,r=void 0===i?.1:i,s=t.maxPx,o=void 0===s?1:s,a=Math.max(e,n),l=Math.min(e,n),c=Ub(-.1,1.2,a),u=Ub(-.1,1.2,l),h=c*o-u*o,d=Math.max(r,h),f=(d-h)/2;return{actualDiff:d,startModifier:f,actualLow:u*o-f}}({start:n.start,end:n.end,minPx:n.box.minHeightPx,maxPx:d}),p=f.actualDiff,y=f.actualLow;return pd({},n.box,(bd(e={type:"rect"},a,(r+n.major)*h),bd(e,l,y),bd(e,u,p),bd(e,c,i*h),bd(e,"data",n.data||{}),bd(e,"collider",{type:null}),e))}({item:h,boxWidth:d,boxPadding:f,rendWidth:v,rendHeight:x,flipXY:i}))},line:function(){zd(h.min)&&zd(h.start)&&c.push(Qb({item:h,from:h.min,to:h.start,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:i})),zd(h.max)&&zd(h.end)&&c.push(Qb({item:h,from:h.max,to:h.end,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:i}))},median:function(){h.median&&zd(h.med)&&c.push(Kb({item:h,key:"median",position:h.med,width:d,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:i}))},whisker:function(){if(h.whisker){var t=d*h.whisker.width;zd(h.min)&&c.push(Kb({item:h,key:"whisker",position:h.min,width:t,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:i})),zd(h.max)&&c.push(Kb({item:h,key:"whisker",position:h.max,width:t,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:i}))}}};function T(){for(var t,e=-Number.MAX_VALUE,n=Number.MAX_VALUE,i=0;i<k;i++)zd(t=h[w[i]])&&(e<t&&(e=t),n>t&&(n=t));y=e<0&&e!==-Number.MAX_VALUE,g=n>1&&n!==Number.MAX_VALUE,m=y||g}for(var A=0,R=l.length;A<R;A++){c=[],u=null;var N=l[A],O=N.data,I=null,P=null;void 0!==_.binStart?(I=N.binStart,P=N.binEnd,u=_.binStart.scale):I=(u=_.major.scale)?N.major:0;var D=0;u?u.bandwidth?I-=(D=u.bandwidth())/2:D=P-I:D=1,h=pd({},{major:I,majorEnd:P},r.minor.items[A]);for(var j=0;j<M;j++)h[s[j]]=r[s[j]].items[A];if(d=Xb(D,h,b),p=(f=(D-d)/2)+h.major+d/2,T(),m)h.oob&&(y?c.push(Yb({item:h,value:0,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:i,symbol:o})):g&&c.push(Yb({item:h,value:1,boxCenter:p,rendWidth:v,rendHeight:x,flipXY:i,symbol:o})));else for(var z=0;z<E;z++)h[S[z]]&&!1===h[S[z]].show||C[S[z]]();a.push({type:"container",data:O,collider:{type:"bounds"},children:c})}return a}({items:d.items,settings:d.settings,width:r,height:s,flipXY:o,resolved:d,keys:u,symbol:c})}},t_={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},e_=/px$/,n_={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},i_={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function r_(t,e){return t&&"function"==typeof t.bandwidth?{isBandwidth:!0,value:Math.max(1,t.bandwidth()*e)}:{isBandwidth:!1,value:Math.max(1,e)}}var s_={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:function(t){return t.data.value}},style:{item:"$shape"}},render:function(t){var e=this.resolver.resolve({data:t.data,defaults:pd({},n_,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),n=this.rect,i=n.width,r=n.height,s=pd({},i_,this.settings.settings.sizeLimits),o=e.items,a=function(t,e,n,i,r){var s=r_(t?t.scale:void 0,n),o=r_(e?e.scale:void 0,i),a=Math.min(s.value*r[s.isBandwidth?"maxRelDiscrete":"maxRelExtent"],o.value*r[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(s.value*r[s.isBandwidth?"minRelDiscrete":"minRelExtent"],o.value*r[o.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(a)),maxGlobal:r.maxPx,minGlobal:r.minPx}}(e.settings.x,e.settings.y,i,r,s);return function(t,e,n,i){var r=e.width,s=e.height;return t.filter((function(t){return!1!==t.show&&!isNaN(t.x+t.y)})).map((function(t){var e=t,o=e_.test(t.size)?parseInt(t.size,10):n.min+e.size*(n.max-n.min);Fd(o)&&(o=n.min+(e=t_).size*(n.max-n.min));var a=Od(function(t){var e=n_.shape,n={};return"object"===gd(t.shape)&&"string"==typeof t.shape.type?(e=t.shape.type,n=t.shape):"string"==typeof t.shape&&(e=t.shape),[e="rect"===e?"square":e,n]}(e),2),l=a[0],c=wd(wd({},a[1]),{},{type:l,label:t.label,x:t.x*r,y:t.y*s,fill:e.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,o)),stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,opacity:e.opacity});e===t.errorShape&&(c.width=e.width);var u=i(c);return u.data=t.data,u}))}(o,this.rect,a,this.settings.shapeFn||this.symbol)}};Math;var o_={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function a_(t,e){return t.slice&&"arc"in t.slice?e.arc:e.data.value}var l_={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render:function(t){for(var e=[],n=[],i=this.settings.settings,r=this.resolver.resolve({data:t.data,defaults:pd({},o_,this.style.slice),settings:i.slice}).items,s=0,o=0,a=r.length;o<a;o++){var l=a_(i,r[o]);l>0&&r[o].outerRadius>=r[o].innerRadius&&(e.push(l),n.push(r[o]),s+=l)}var c=function(){var t=Ef,e=Mf,n=null,i=Jd(0),r=Jd(hf),s=Jd(0);function o(o){var a,l,c,u,h,d=o.length,f=0,p=new Array(d),y=new Array(d),g=+i.apply(this,arguments),m=Math.min(hf,Math.max(-hf,r.apply(this,arguments)-g)),v=Math.min(Math.abs(m)/d,s.apply(this,arguments)),x=v*(m<0?-1:1);for(a=0;a<d;++a)(h=y[p[a]=a]=+t(o[a],a,o))>0&&(f+=h);for(null!=e?p.sort((function(t,n){return e(y[t],y[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),a=0,c=f?(m-d*x)/f:0;a<d;++a,g=u)y[l=p[a]]={data:o[l],index:a,value:h=y[l],startAngle:g,endAngle:u=g+(h>0?h*c:0)+x,padAngle:v};return y}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Jd(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Jd(+t),o):i},o.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:Jd(+t),o):r},o.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:Jd(+t),o):s},o}().sortValues(null);return c.startAngle(i.startAngle),c.endAngle(i.endAngle),c.padAngle(i.padAngle),function(t,e,n,i){var r=e.x,s=e.y,o=e.width,a=e.height,l=function(){var t=pf,e=yf,n=Jd(0),i=null,r=gf,s=mf,o=vf,a=null;function l(){var l,c,u=+t.apply(this,arguments),h=+e.apply(this,arguments),d=r.apply(this,arguments)-uf,f=s.apply(this,arguments)-uf,p=tf(f-d),y=f>d;if(a||(a=l=Gd()),h<u&&(c=h,h=u,u=c),h>lf)if(p>hf-lf)a.moveTo(h*nf(d),h*of(d)),a.arc(0,0,h,d,f,!y),u>lf&&(a.moveTo(u*nf(f),u*of(f)),a.arc(0,0,u,f,d,y));else{var g,m,v=d,x=f,b=d,_=f,w=p,k=p,S=o.apply(this,arguments)/2,M=S>lf&&(i?+i.apply(this,arguments):af(u*u+h*h)),E=sf(tf(h-u)/2,+n.apply(this,arguments)),C=E,T=E;if(M>lf){var A=ff(M/u*of(S)),R=ff(M/h*of(S));(w-=2*A)>lf?(b+=A*=y?1:-1,_-=A):(w=0,b=_=(d+f)/2),(k-=2*R)>lf?(v+=R*=y?1:-1,x-=R):(k=0,v=x=(d+f)/2)}var N=h*nf(v),O=h*of(v),I=u*nf(_),P=u*of(_);if(E>lf){var D,j=h*nf(x),z=h*of(x),F=u*nf(b),q=u*of(b);if(p<cf&&(D=xf(N,O,F,q,j,z,I,P))){var L=N-D[0],V=O-D[1],H=j-D[0],B=z-D[1],W=1/of(df((L*H+V*B)/(af(L*L+V*V)*af(H*H+B*B)))/2),$=af(D[0]*D[0]+D[1]*D[1]);C=sf(E,(u-$)/(W-1)),T=sf(E,(h-$)/(W+1))}}k>lf?T>lf?(g=bf(F,q,N,O,h,T,y),m=bf(j,z,I,P,h,T,y),a.moveTo(g.cx+g.x01,g.cy+g.y01),T<E?a.arc(g.cx,g.cy,T,ef(g.y01,g.x01),ef(m.y01,m.x01),!y):(a.arc(g.cx,g.cy,T,ef(g.y01,g.x01),ef(g.y11,g.x11),!y),a.arc(0,0,h,ef(g.cy+g.y11,g.cx+g.x11),ef(m.cy+m.y11,m.cx+m.x11),!y),a.arc(m.cx,m.cy,T,ef(m.y11,m.x11),ef(m.y01,m.x01),!y))):(a.moveTo(N,O),a.arc(0,0,h,v,x,!y)):a.moveTo(N,O),u>lf&&w>lf?C>lf?(g=bf(I,P,j,z,u,-C,y),m=bf(N,O,F,q,u,-C,y),a.lineTo(g.cx+g.x01,g.cy+g.y01),C<E?a.arc(g.cx,g.cy,C,ef(g.y01,g.x01),ef(m.y01,m.x01),!y):(a.arc(g.cx,g.cy,C,ef(g.y01,g.x01),ef(g.y11,g.x11),!y),a.arc(0,0,u,ef(g.cy+g.y11,g.cx+g.x11),ef(m.cy+m.y11,m.cx+m.x11),y),a.arc(m.cx,m.cy,C,ef(m.y11,m.x11),ef(m.y01,m.x01),!y))):a.arc(0,0,u,_,b,y):a.lineTo(I,P)}else a.moveTo(0,0);if(a.closePath(),l)return a=null,l+""||null}return l.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +s.apply(this,arguments))/2-cf/2;return[nf(i)*n,of(i)*n]},l.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Jd(+e),l):t},l.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Jd(+t),l):e},l.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Jd(+t),l):n},l.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Jd(+t),l):i},l.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Jd(+t),l):r},l.endAngle=function(t){return arguments.length?(s="function"==typeof t?t:Jd(+t),l):s},l.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Jd(+t),l):o},l.context=function(t){return arguments.length?(a=null==t?null:t,l):a},l}(),c={x:r+o/2,y:s+a/2},u=Math.min(o,a)/2,h=Math.min(o,a)/2,d=h/100;return t.map((function(t,e){var r=n[e];r.type="path";var s=h*r.outerRadius,o=u*r.innerRadius;l.innerRadius(o),l.outerRadius(s),l.cornerRadius(d*r.cornerRadius),r.d=l(t);var a=l.centroid(t),f=r.offset?function(t,e,n,i){var r=Od(t,2),s=r[0],o=r[1],a=Math.sqrt(s*s+o*o),l=n-i;return{x:(s/=a)*e*l,y:(o/=a)*e*l}}(a,r.offset,s,o):{x:0,y:0};return r.transform="translate(".concat(f.x,", ").concat(f.y,") translate(").concat(c.x,", ").concat(c.y,")"),r.desc={share:t.value/i,slice:{start:t.startAngle,end:t.endAngle,innerRadius:o,outerRadius:s,offset:{x:c.x+f.x,y:c.y+f.y}}},r}))}(c(e),pd({},this.rect,{x:0,y:0}),n,s)}},c_=function(t){function e(e){if(t[e.type]&&t[e.type].condition(e)){var n=t[e.type],i=void 0===n.conditionAppend||n.conditionAppend(e);n.items.forEach((function(t){var n=Math.round(e[t.key]),r=e[t.key]-n;e[t.key]=n,i&&"append"===t.type&&(r>0?e[t.key]+=.5:e[t.key]-=.5)}))}}return void 0===t&&((t={}).line={append:["x1","x2","y1","y2"],round:[],condition:function(t){return t.x1===t.x2||t.y1===t.y2},conditionAppend:function(t){return t.strokeWidth%2!=0}},t.rect={append:["x","y"],round:["width","height"],condition:function(){return!0},conditionAppend:function(t){return t.strokeWidth%2!=0}}),Object.keys(t).forEach((function(e){var n=t[e];n.items=[],n.append.forEach((function(t){n.items.push({key:t,type:"append"})})),n.round.forEach((function(t){n.items.push({key:t,type:"round"})}))})),e.multiple=function(t){return t.forEach((function(t){return e(t)}))},e}(),u_=function(){function t(){md(this,t),this.reset(),this.push.apply(this,arguments)}return xd(t,[{key:"transposeCoordinate",value:function(t,e,n){if("number"==typeof e&&isFinite(e)){var i=t.substring(0,1);if("x"===i||"cx"===t)return e*this.width;if("width"===t)return e*this.width;if("r"===t)return e*(n?this.height:this.width);if("y"===i||"cy"===t)return e*this.height;if("height"===t)return e*this.height}return e}},{key:"push",value:function(){var t;return(t=this.storage).push.apply(t,arguments),this}},{key:"processItem",value:function(e){var n={},i=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){e=e.fn({width:i?this.height:this.width,height:i?this.width:this.height,flipXY:i});for(var s=Object.keys(e),o=0,a=s.length;o<a;o++){var l=s[o];n[t.evaluateKey(l,i)]=e[l]}}else for(var c=Object.keys(e),u=0,h=c.length;u<h;u++){var d=c[u],f=t.evaluateKey(d,i),p=this.transposeCoordinate(f,e[d],i);n[f]=p}return r&&c_(n),n}},{key:"output",value:function(){for(var t=[],e=0,n=this.storage.length;e<n;e++){var i=this.processItem(this.storage[e]);t.push(i)}return t}},{key:"reset",value:function(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}],[{key:"evaluateKey",value:function(t,e){if(e){var n=t.substring(0,1),i=t.substring(1);if("x"===n)return"y".concat(i);if("y"===n)return"x".concat(i);if("cx"===t)return"cy";if("cy"===t)return"cx";if("width"===t)return"height";if("height"===t)return"width"}return t}}]),t}();function h_(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(u_,e)}function d_(t,e){return t&&e?t.cachedTicks&&t.cachedTicks()||t.ticks({distance:e}):[]}var f_={created:function(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender:function(){this.blueprint=h_(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render:function(){var t=this;if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,Yv(this,"x",this.rect.width),Yv(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=pd({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=pd({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=d_(this.x,this.rect.width),this.lines.y=d_(this.y,this.rect.height),this.lines.y=this.lines.y.map((function(t){return pd(t,{flipXY:!0})}));var e=function(e){var n=e.dir,i=e.isMinor,r=t.lines[n].filter((function(t){return!!t.isMinor===i}));t.resolver.resolve({settings:i?t.settings.minorTicks:t.settings.ticks,data:{items:r,dir:n}}).items.forEach((function(e){var n=e.data;e.show&&t.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1})}))};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function p_(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===i||"right"===i){var r="right"===i;return"\n M ".concat(t," ").concat(e-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(r?0:1,", ").concat(t," ").concat(e+n,"\n L ").concat(r?t+n:t-n," ").concat(e," Z\n ")}var s="bottom"===i;return"\n M ".concat(t-n," ").concat(e,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(s?1:0,", ").concat(t+n," ").concat(e,"\n L ").concat(t," ").concat(s?e+n:e-n," Z\n ")}function y_(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===i||"right"===i){var r="right"===i;return"\n M ".concat(t+=r?1.5*n:-1.5*n," ").concat(e-n,"\n L ").concat(t," ").concat(e+n,"\n L ").concat(r?t+n:t-n," ").concat(e," Z\n ")}var s="bottom"===i;return e+=s?1.5*n:-1.5*n,"\n M ".concat(t-n," ").concat(e,"\n L ").concat(t+n," ").concat(e,"\n L ").concat(t," ").concat(s?e+n:e-n," Z\n ")}function g_(t){if(void 0===t)return 0;if("number"==typeof t&&isFinite(t))return t;if("string"==typeof t)switch(t){case"center":case"middle":return.5;case"bottom":case"right":return 1;case"top":case"left":default:return 0}return 0}function m_(t){var e={value:t.value};return t.label&&(e.label=t.label.text),e}function v_(t){return void 0!==("function"==typeof t.value?t.value():t.value)}function x_(t,e){var n=t.min();if(n===t.max()){var i=function(t){var e=t.range();return 2===(null==e?void 0:e.length)&&e[0]>e[1]}(t);if(e<n)return i?2:-1;if(e>n)return i?-1:2}return t(e)}var b_={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:function(){return 30},beforeRender:function(){this.blueprint=h_(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render:function(){var t=this,e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];var n={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(v_).map((function(e){if("function"==typeof e.value&&(e.value=e.value()),e.scale){var n=t.chart.scale(e.scale),i=x_(n,e.value);return pd(e,{scale:n,position:i})}return pd(e,{position:e.value})})),this.lines.y=this.lines.y.filter(v_).map((function(e){if("function"==typeof e.value&&(e.value=e.value()),e.scale){var n=t.chart.scale(e.scale),i=x_(n,e.value);return pd(e,{scale:n,position:i,flipXY:!0})}return pd(e,{position:e.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((function(t){return!(t.position<0||t.position>1)||(n["x".concat(t.position>1?1:0)].push(m_(t)),!1)})),this.lines.y=this.lines.y.filter((function(t){return!(t.position<0||t.position>1)||(n["y".concat(t.position>1?1:0)].push(m_(t)),!1)}));var i=[];return[].concat(Id(this.lines.x),Id(this.lines.y)).forEach((function(n){(!0===n.show||void 0===n.show)&&function(t){var e,n=t.chart,i=t.blueprint,r=t.renderer,s=t.p,o=t.settings,a=t.items,l=!0,c=!1,u=!1,h=!1,d=pd(!0,{},o.style.line,s.line||{});if(e=i.processItem({type:"line",x1:s.position,y1:0,x2:s.position,y2:1,stroke:d.stroke||"black",strokeWidth:d.strokeWidth||1,strokeDasharray:d.strokeDasharray,flipXY:s.flipXY||!1}),s.label){var f,p=pd(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},o.style.label||{},{fill:d.stroke},s.label),y={width:0,height:0},g="";if("string"==typeof s.formatter)f=n.formatter(s.formatter);else if("object"===gd(s.formatter))f=n.formatter(s.formatter);else if(void 0!==s.scale&&s.scale.data){var m=s.scale.data()&&s.scale.data().fields;f=m&&m[0]?m[0].formatter():null}!1!==s.label.showValue&&(f?g=" (".concat(f(s.value),")"):s.scale&&(g=" (".concat(s.value,")"))),g&&(y=r.measureText({text:g,fontFamily:p.fontFamily,fontSize:p.fontSize}));var v=r.measureText({text:p.text||"",fontFamily:p.fontFamily,fontSize:p.fontSize}),x={width:v.width+y.width,height:Math.max(v.height,y.height)},b=p.padding,_=g_(s.flipXY?p.vAlign:p.align),w=g_(s.flipXY?p.align:p.vAlign),k=Math.min(1+x.width+2*b,p.maxWidth*i.width,p.maxWidthPx),S=x.height+2*b,M=s.flipXY?S:k,E=s.flipXY?k:S;if((c=i.processItem({fn:function(t){var e=t.height,n=s.position*t.width-(s.flipXY?S:k)*(1-_);return{type:"rect",x:n=s.flipXY?n:Math.max(n,0),y:Math.max(Math.abs(w*e-E*w),0),width:s.flipXY?M:Math.min(M,i.width-n),height:E,stroke:p.background.stroke,strokeWidth:p.background.strokeWidth,fill:p.background.fill,opacity:p.background.opacity}},flipXY:s.flipXY||!1})).x<-1||c.x+c.width>i.width+1||c.y<-1||c.y+c.height>i.height+1)c=void 0;else{u={type:"text",text:p.text||"",fill:p.fill,opacity:p.opacity,fontFamily:p.fontFamily,fontSize:p.fontSize,x:c.x+b,y:c.y+c.height/2+x.height/3,maxWidth:c.width-2*b-y.width,anchor:"start"},g&&(h={type:"text",text:g||"",fill:p.fill,opacity:p.opacity,fontFamily:p.fontFamily,fontSize:p.fontSize,x:u.x+3+(c.width-(y.width+2*b)),y:u.y});for(var C=0,T=a.length;C<T;C++){var A=a[C];"rect"===A.type?Wx(c,A)&&(l=!1):"line"===A.type&&s.flipXY===A.flipXY&&Yx(c,A)&&(l=!1)}}}a.push(e),l&&c&&u&&(a.push(c,u),h&&a.push(h))}({chart:t.chart,blueprint:t.blueprint,renderer:t.renderer,p:n,settings:e,items:i})})),e.style.oob.show&&function(t){for(var e=t.blueprint,n=t.oob,i=t.settings,r=t.items,s=Object.keys(n),o=i.style.oob||{},a=function(t,i){var a=s[t],l=n[a];if(l.length>0){var c,u=a.charAt(1),h="y"===a.charAt(0),d=o.padding.x+o.width,f=o.padding.y+o.width;c=h?"1"===u?"bottom":"top":"1"===u?"right":"left";var p=e.processItem({fn:function(t){var e=u*t.width+("1"===u?-d:d),n=h?f:t.height-f;return"arc"===o.type?{type:"path",d:p_(h?n:e,h?e:n,o.width,c),x:e,y:n,stroke:o.stroke,fill:o.fill,strokeWidth:o.strokeWidth||0}:{type:"circle",cx:e,cy:n,r:o.width,stroke:o.stroke,fill:o.fill,strokeWidth:o.strokeWidth||0,opacity:o.opacity,data:l}},flipXY:h}),y=p.cx||p.x,g=p.cy||p.y,m={type:"text",text:l.length||"",x:y-.4*o.width,y:g+.4*o.width,fontFamily:o.text.fontFamily,fontSize:"".concat(1.3*o.width,"px"),stroke:o.text.stroke,fill:o.text.fill,strokeWidth:o.text.strokeWidth||0,opacity:o.text.opacity},v={type:"path",d:y_(y,g,o.width,c),x:y,y:g,stroke:o.triangle.stroke,fill:o.triangle.fill,strokeWidth:o.triangle.strokeWidth||0,opacity:o.triangle.opacity};r.push(p,m,v)}},l=0,c=s.length;l<c;l++)a(l)}({blueprint:this.blueprint,oob:n,settings:e,items:i}),i}};function __(t,e){var n=isNaN(t.style.align)?.5:Math.min(Math.max(t.style.align,0),1);return t.tilted?t.stepSize*n:Math.max(0,t.stepSize-(e?t.textRect.height:t.textRect.width))*n}function w_(t,e){var n,i={type:"text",text:(n=t.label,"string"==typeof n||"number"==typeof n?n:"-"),x:0,y:0,maxWidth:e.maxWidth,maxHeight:e.maxHeight};return"top"===e.align||"bottom"===e.align?(i.x=t.start*e.innerRect.width+(e.innerRect.x-e.outerRect.x)+__(e,!1),i.y="top"===e.align?e.innerRect.height:0,i.anchor=e.stepSize?"start":"middle",i.x+=isNaN(e.style.offset)?0:+e.style.offset):(i.y=t.start*e.innerRect.height+(e.innerRect.y-e.outerRect.y)+__(e,!0),i.x="left"===e.align?e.innerRect.width:0,i.anchor="left"===e.align?"end":"start",i.baseline=e.stepSize?"text-before-edge":"central",i.y+=isNaN(e.style.offset)?0:+e.style.offset),function(t,e){["fill","fontSize","fontFamily"].forEach((function(n){t[n]=e.style[n]}))}(i,e),function(t,e){if(!e.tilted&&!e.stepSize)if("top"===e.align||"bottom"===e.align){var n=e.outerRect.width,i=Math.min(e.maxWidth/2,e.textRect.width/2),r=t.x+i;t.x-i<0?(t.anchor="start",t.x=e.innerRect.x-e.outerRect.x):r>n&&(t.anchor="end",t.x=e.innerRect.width+e.innerRect.x)}else{var s=e.outerRect.height,o=e.maxHeight/2,a=t.y+o;t.y-o<0?(t.y=e.innerRect.y-e.outerRect.y,t.baseline="text-before-edge"):a>s&&(t.y=e.innerRect.height+(e.innerRect.y-e.outerRect.y),t.baseline="text-after-edge")}}(i,e),function(t,e){"top"===e.align?t.y-=e.padding:"bottom"===e.align?t.y+=e.padding+e.maxHeight:"left"===e.align?t.x-=e.padding:"right"===e.align&&(t.x+=e.padding)}(i,e),function(t,e){if(e.tilted){var n=-e.angle,i=n*(Math.PI/180);"bottom"===e.align?(t.x-=e.maxHeight*Math.sin(i)/2,t.y-=e.maxHeight,t.y+=e.maxHeight*Math.cos(i)/2):t.x-=e.maxHeight*Math.sin(i)/3,t.transform="rotate(".concat(n,", ").concat(t.x,", ").concat(t.y,")"),t.anchor="bottom"===e.align==e.angle<0?"start":"end";var r=Math.cos(i)*e.maxWidth;if("bottom"===e.align==e.angle<0){var s=e.outerRect.width-e.paddingEnd;t.x+r>s&&(t.maxWidth=(s-t.x-10)/Math.cos(i))}else{var o=e.paddingEnd;t.x-r<o&&(t.maxWidth=(t.x-o-10)/Math.cos(i))}}}(i,e),function(t,e){t.boundingRect=e.textBounds(t)}(i,e),function(t,e,n){n.layered||!n.stepSize?function(t,e){e.collider={type:"polygon",vertices:[{x:e.boundingRect.x,y:e.boundingRect.y},{x:e.boundingRect.x+e.boundingRect.width,y:e.boundingRect.y},{x:e.boundingRect.x+e.boundingRect.width,y:e.boundingRect.y+e.boundingRect.height},{x:e.boundingRect.x,y:e.boundingRect.y+e.boundingRect.height}]}}(0,e):n.tilted?function(t,e,n){var i=n.angle*(Math.PI/180),r=Math.max(n.stepSize/2,e.boundingRect.height/2),s="start"===e.anchor,o=e.boundingRect.y+("start"===e.anchor&&i>=0||"end"===e.anchor&&i<0?e.boundingRect.height:0),a=[{x:e.x-r,y:o},{x:e.x+r,y:o}].map((function(t){return vx(t,i,{x:e.x,y:e.y})})),l={x:s?e.boundingRect.x+e.boundingRect.width+10:e.boundingRect.x-10,y:e.boundingRect.y+e.boundingRect.height},c={x:s?e.boundingRect.x+e.boundingRect.width+10:e.boundingRect.x-10,y:e.boundingRect.y};a.push.apply(a,i>=0?[l,c]:[c,l]),e.collider={type:"polygon",vertices:a}}(0,e,n):function(t,e,n){if("bottom"===n.align||"top"===n.align){var i=t.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);e.collider={type:"rect",x:i,y:0,width:i<0?n.stepSize+i:n.stepSize,height:n.innerRect.height}}else{var r=t.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);e.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}var s=e.collider;s.x=Math.max(s.x,0),s.y=Math.max(s.y,0);var o=s.x+s.width-(n.outerRect.x+n.outerRect.width);s.width=o>0?s.width-o:s.width;var a=s.y+s.height-(n.outerRect.y+n.outerRect.height);s.height=a>0?s.height-a:s.height}(t,e,n)}(t,i,e),i}function k_(t){return!t.isMinor&&t.position>=0&&t.position<=1}function S_(t){var e=t.value,n=t.maxValue,i=t.minValue,r=t.range,s=t.modifier;return isNaN(r)||isNaN(s)||(e=r*s),e>n&&(e=n),e<i&&(e=i),e}var M_=function(t,e,n){return t.width*Math.abs(e.position-n.position)};function E_(t){var e=0;return e+=t.paddingStart,(e+=t.line.show?t.line.strokeWidth/2:0)+(t.ticks.show?t.ticks.margin:0)}function C_(t){var e=0;return(e+=t.ticks.show?t.ticks.tickSize:0)+(E_(t)+t.labels.margin)}function T_(t,e){return t.map((function(t){return function(t,e){var n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(n.x1=n.x2=t.position*e.innerRect.width+(e.innerRect.x-e.outerRect.x),n.y1="top"===e.align?e.innerRect.height:0,n.y2="top"===e.align?n.y1-e.tickSize:n.y1+e.tickSize):(n.y1=n.y2=t.position*e.innerRect.height+(e.innerRect.y-e.outerRect.y),n.x1="left"===e.align?e.innerRect.width:0,n.x2="left"===e.align?n.x1-e.tickSize:n.x1+e.tickSize),function(t,e){pd(t,e.style)}(n,e),function(t,e){"top"===e.align?(t.y1-=e.padding,t.y2-=e.padding):"bottom"===e.align?(t.y1+=e.padding,t.y2+=e.padding):"left"===e.align?(t.x1-=e.padding,t.x2-=e.padding):"right"===e.align&&(t.x1+=e.padding,t.x2+=e.padding)}(n,e),function(t,e){var n=t.strokeWidth/2;t.x1===e.innerRect.width?(t.x1-=n,t.x2-=n):0===t.x1?(t.x1+=n,t.x2+=n):t.y1===e.innerRect.height?(t.y1-=n,t.y2-=n):0===t.y1&&(t.y1+=n,t.y2+=n)}(n,e),n}(t,e)}))}function A_(t,e){return e?Math.abs(e.end-e.start):t.bandwidth()}function R_(t){var e=t.settings,n=t.innerRect,i=t.tilted,r=t.layered,s=t.textMetrics.height,o=A_(t.scale,t.tick),a={width:0,height:s};if("left"===e.align||"right"===e.align)a.width=n.width-C_(e)-e.paddingEnd;else if(r)a.width=o*n.width*2;else if(i){var l=Math.abs(e.labels.tiltAngle)*(Math.PI/180);a.width=(n.height-C_(e)-e.paddingEnd-s*Math.cos(l))/Math.sin(l)}else a.width=o*n.width;return a.width=S_({value:a.width,maxValue:e.labels.maxLengthPx,minValue:e.labels.minLengthPx}),a}function N_(t){var e=t.settings,n=t.innerRect,i=t.outerRect,r=t.tilted,s=t.layered,o=t.tick,a=t.index,l=t.major,c=t.textMetrics.height,u={width:0,height:c};if("left"===e.align||"right"===e.align)u.width=n.width-C_(e)-e.paddingEnd;else if(r){var h=Math.abs(e.labels.tiltAngle)*(Math.PI/180);u.width=(n.height-C_(e)-e.paddingEnd-c*Math.cos(h))/Math.sin(h)}else u.width=function(t){var e=t.major,n=t.innerRect,i=t.outerRect,r=t.tick,s=t.index,o=t.layered?2:1,a=e[s-o],l=e[s+o],c=a?M_(n,r,a)/2-2:1/0,u=l?M_(n,r,l)/2-2:1/0;return e.length<2?n.width:a?l?2*Math.min(c,u):function(t){var e=t.innerRect,n=t.outerRect,i=t.tick,r=t.prevWidth,s=2*Math.min(r,e.width-e.width*i.position+(n.width-e.width-(e.x-n.x)));return Math.max(r,s,1===i.position?e.width/2-2:0)}({innerRect:n,outerRect:i,tick:r,prevWidth:c}):function(t){var e=t.innerRect,n=t.tick,i=t.nextWidth,r=2*Math.min(i,e.width*n.position+(e.x-t.outerRect.x));return Math.max(i,r,0===n.position?e.width/2-2:0)}({innerRect:n,outerRect:i,tick:r,nextWidth:u})}({layered:s,major:l,innerRect:n,outerRect:i,tick:o,index:a});return u.width=S_({value:u.width,maxValue:e.labels.maxLengthPx,minValue:e.labels.minLengthPx}),u}var O_={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},I_={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"},P_={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created:function(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.defaultDock=this.state.isDiscrete?"bottom":"left",this.setState(this.settings)},setState:function(){var t,e,n;this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(t){var e=t.state,n=t.settings,i=pd(!0,{},e.isDiscrete?O_:I_,t.style),r=pd(!0,{},i,n.settings),s=n.layout.dock||e.defaultDock;r.dock=s,r.align=function(t,e){var n=["top","bottom"],i=["left","right"];return-1!==n.indexOf(t)&&-1===i.indexOf(e)||-1!==i.indexOf(t)&&-1===n.indexOf(e)?t:e}(n.settings.align,s),r.labels.tiltAngle=Math.max(-90,Math.min(r.labels.tiltAngle,90));var o=r.paddingStart,a=r.paddingEnd;return r.paddingStart="function"==typeof o?o.call(null):o,r.paddingEnd="function"==typeof a?a.call(null):a,r}(this),this.state.concreteNodeBuilder=function(t){var e;function n(){return e=N_,n}function i(){return e=R_,i}function r(t){var n,i=t.settings,r=t.scale,s=t.innerRect,o=t.outerRect,a=t.measureText,l=t.ticks,c=t.state,u=t.textBounds,h=[],d=function(t){return t.filter((function(t){return!t.isMinor}))}(l),f=function(t){return t.filter((function(t){return t.isMinor}))}(l),p={innerRect:s,align:i.align,outerRect:o},y="tilted"===c.labels.activeMode,g="layered"===c.labels.activeMode;if(i.line.show&&(p.style=i.line,p.padding=i.paddingStart,h.push(function(t){var e={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===t.align||"bottom"===t.align?(e.x1=t.innerRect.x-t.outerRect.x,e.x2=t.innerRect.width+t.innerRect.x,e.y1=e.y2="top"===t.align?t.innerRect.height-t.padding:t.padding):(e.x1=e.x2="left"===t.align?t.innerRect.width-t.padding:t.padding,e.y1=t.innerRect.y-t.outerRect.y,e.y2=t.innerRect.height+t.innerRect.y),function(t,e){pd(t,e.style)}(e,t),e}(p))),i.ticks.show&&(p.style=i.ticks,p.tickSize=i.ticks.tickSize,p.padding=E_(i),n=T_(d,p)),i.labels.show){var m=C_(i);p.style=i.labels,p.padding=m,p.tilted=y,p.layered=g,p.angle=i.labels.tiltAngle,p.paddingEnd=i.paddingEnd,p.textBounds=u;var v,x=function(t,n){var c,u;p.textRect=(0,(c={tick:t,measureText:a,style:p.style}).measureText)({text:c.tick.label,fontSize:(u=c.style).fontSize,fontFamily:u.fontFamily});var h=e({textMetrics:p.textRect,settings:i,innerRect:s,outerRect:o,scale:r,tilted:y,layered:g,tick:t,major:d,index:n});p.maxWidth=h.width,p.maxHeight=h.height,p.stepSize=function(t){var e=t.innerRect,n=t.settings;return("top"===n.align||"bottom"===n.align?e.width:e.height)*A_(t.scale,t.tick)}({innerRect:s,scale:r,ticks:l,settings:i,tick:t})};v=!g||"top"!==i.align&&"bottom"!==i.align?function(t,e,n){return t.map((function(t,i){n(t,i);var r=w_(t,e);return r.data=t.data,r}))}(d,p,x):function(t,e,n,i){var r=e.padding,s=C_(n);return t.map((function(t,o){i(t,o);var a=s+e.maxHeight+n.labels.margin;e.layer=o%2,e.padding=o%2==0?r:a;var l=w_(t,e);return l.data=t.data,l}))}(d,p,i,x),i.labels.filterOverlapping&&function(t,e,n){var i=function(e,n){return Wx($d(1,t[e].boundingRect),$d(1,t[n].boundingRect))};if(n&&n.tilted){var r=Math.abs(n.angle);i=function(e,n){var i=1/Math.abs(t[e].x-t[n].x),s=Math.sin(r*(Math.PI/180))/i;return t[e].boundingRect.height>s}}for(var s=0;s<=t.length-1;s++)for(var o=s+1;o<=Math.min(s+5,s+(t.length-1));o++)t[s]&&t[o]&&i(s,o)&&(o===t.length-1?(t.splice(s,1),e&&e.splice(s,1)):(t.splice(o,1),e&&e.splice(o,1)),o--,s--)}(v,n,p),h.push.apply(h,Id(v))}return i.minorTicks&&i.minorTicks.show&&f.length>0&&(p.style=i.minorTicks,p.tickSize=i.minorTicks.tickSize,p.padding=function(t){return t.line.strokeWidth+t.minorTicks.margin}(i),h.push.apply(h,Id(T_(f,p)))),n&&h.push.apply(h,Id(n)),h}return n.build=r,i.build=r,t?i():n()}(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=(t=this.state,n=(e=this.state.settings).labels.mode,this.state.isDiscrete&&t.isHorizontal?"auto"===n?t.labels.activeMode:-1!==["layered","tilted"].indexOf(e.labels.mode)&&-1!==["top","bottom"].indexOf(e.dock)?n:"horizontal":"horizontal")},preferredSize:function(t){var e=this.formatter,n=this.state;return this.state.pxScale=Qv(this.scale,this.state.isHorizontal?t.inner.width:t.inner.height),function(t){var e=t.settings,n=0,i=function(t){var e=t.isDiscrete,n=t.rect,i=t.measureText,r=t.settings,s=t.state,o=0,a={left:0,top:0,right:0,bottom:0},l=r.labels,c=l.maxLengthPx,u=l.minLengthPx;if(r.labels.show){var h,d,f=r.align,p="top"===f||"bottom"===f,y=t.scale.ticks({settings:r,distance:p?n.inner.width:n.inner.height,formatter:t.formatter}).filter(k_),g=function(t){var e=i({text:t,fontSize:r.labels.fontSize,fontFamily:r.labels.fontFamily});return e.width=S_({value:e.width,maxValue:c,minValue:u}),e};if(e&&p&&"auto"===r.labels.mode&&(s.labels.activeMode=function(t){var e=t.majorTicks,n=t.measure,i=t.rect,r=t.settings,s=r.labels.maxGlyphCount,o="layered"===t.state.labels.activeMode?2:1,a=r.labels.tiltThreshold?r.labels.tiltThreshold:.7,l=n("\u2026").width,c=i.width,u=0;if(isNaN(s))for(var h=0;h<e.length;h++){var d=e[h],f=d.label;if(n(f).width*(f.length>1?a:1)+l>(u=o*c*Math.abs(d.start-d.end)))return!0}else if(u=o*c*e.reduce((function(t,e){return Math.min(Math.abs(e.start-e.end),t)}),1/0),n("M").width*a*s+l>u)return!0;return!1}({majorTicks:y,measure:g,rect:n.inner,state:s,settings:r})?"tilted":"horizontal"),!r.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&function(t){var e=t.rect,n=t.state,i=t.majorTicks,r=t.measure;return t.horizontal?function(t){for(var e=t.majorTicks,n=t.measureText,i="layered"===t.state.labels.activeMode?2:1,r=t.rect.width,s=e.map((function(t){return t.label})).map((function(t){return"".concat(t.slice(0,1)).concat(t.length>1?"\u2026":"")})).map(n).map((function(t){return t.width})),o=0;o<e.length;++o){var a=e[o];if(i*r*Math.abs(a.start-a.end)<s[o])return!0}return!1}({majorTicks:i,measureText:r,rect:e,state:n}):function(t){var e=t.majorTicks,n=t.rect.height,i=(0,t.measureText)("M").height;return!(e.length<2)&&n*Math.abs(e[0].position-e[1].position)<i}({majorTicks:i,measureText:r,rect:e,state:n})}({rect:n.inner,state:s,majorTicks:y,measure:g,horizontal:p}))return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0};if("tilted"===s.labels.activeMode){var m=Math.abs(r.labels.tiltAngle)*(Math.PI/180);h=function(t){return S_({value:t.width,maxValue:c,minValue:u})*Math.sin(m)+t.height*Math.cos(m)}}else h=p?function(t){return t.height}:function(t){return S_({value:t.width,maxValue:c,minValue:u})};if(p&&"tilted"!==s.labels.activeMode)d=["M"];else if(isNaN(r.labels.maxGlyphCount))d=y.map((function(t){return t.label}));else{for(var v="",x=0;x<r.labels.maxGlyphCount;x++)v+="M";d=[v]}var b=d.map(g),_=b.map(h),w=Math.max.apply(Math,Id(_).concat([0]));if(o+=w,o+=r.labels.margin,"layered"===s.labels.activeMode&&(o*=2),"tilted"===s.labels.activeMode){var k="bottom"===r.align==r.labels.tiltAngle>=0,S=Math.abs(r.labels.tiltAngle)*(Math.PI/180),M=(w-i("M").height*Math.cos(S))/Math.sin(S),E=Math.min(r.labels.maxEdgeBleed,Math.max.apply(Math,Id(b.map((function(t){return Math.min(M,t.width)*Math.cos(S)+t.height})).map((function(t,e){var i=y[e]?y[e].position:0;return k?t-i*n.inner.width:t-(1-i)*n.inner.width}))).concat([0])))+r.paddingEnd;if(a[k?"left":"right"]=E,!r.labels.filterOverlapping&&function(t){var e=t.majorTicks,n=t.measureText,i=t.rect,r=t.bleedSize,s=t.angle;if(e.length<2)return!1;if(0===s)return!0;var o=Math.abs(s),a=1/(Math.min(i.outer.width-r,i.inner.width)*Math.abs(e[0].position-e[1].position));return n("M").height>Math.sin(o*(Math.PI/180))/a}({majorTicks:y,measureText:i,rect:n,bleedSize:E,angle:r.labels.tiltAngle}))return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}return{size:o,edgeBleed:a}}({isDiscrete:t.isDiscrete,rect:t.rect,formatter:t.formatter,measureText:t.measureText,scale:t.scale,settings:e,state:t.state}),r=i.edgeBleed;if(n+=i.size,i.isToLarge)return{size:n};if(e.ticks.show&&(n+=e.ticks.margin,n+=e.ticks.tickSize),e.minorTicks&&e.minorTicks.show){var s=e.minorTicks.margin+e.minorTicks.tickSize;s>n&&(n=s)}if(e.line.show){var o=e.line.strokeWidth/2;n+=o,r[function(t){switch(t){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return t}}(e.align)]=Math.ceil(o)}return n+=e.paddingStart,{size:n+=e.paddingEnd,edgeBleed:r}}({isDiscrete:this.state.isDiscrete,rect:{inner:t.inner,outer:t.outer},formatter:e,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n})},beforeUpdate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.settings;this.setState(e)},resize:function(t){var e=t.inner,n=t.outer,i=pd({},e,function(t){var e=t.align,n=t.inner;return"left"===e?{x:n.width+n.x}:"right"===e||"bottom"===e?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:e})),r=n||i;return pd(this.state.innerRect,i),pd(this.state.outerRect,r),n},beforeRender:function(){var t=this.formatter,e=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=Qv(this.scale,e),this.state.ticks=this.state.pxScale.ticks({distance:e,formatter:t}).filter((function(t){return t.position>=0&&t.position<=1}))},render:function(){var t=[];return t.push.apply(t,Id(this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:this.state}))),c_.multiple(t),t}},D_={render:function(){return[]}};function j_(t,e,n){var i="";return"function"==typeof t?i=t():"string"==typeof t?i=t:n&&(i=(n.data().fields||[]).map((function(t){return t.title()})).join(e)),i}function z_(t,e){var n="middle";return"left"===t?"top"===e?n="end":"bottom"===e&&(n="start"):"right"===t?"top"===e?n="start":"bottom"===e&&(n="end"):"left"===e?n="start":"right"===e&&(n="end"),n}var F_={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created:function(){this.definitionSettings=this.settings.settings,this.title=j_(this.settings.text,this.definitionSettings.join,this.scale)},preferredSize:function(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render:function(){var t=[];return t.push(function(t){var e=t.definitionSettings,n=t.dock,i=t.rect,r=t.measureText,s=t.style,o={type:"text",text:t.title,x:0,y:0,dx:0,dy:0,anchor:z_(n,e.anchor),baseline:"alphabetical"};pd(o,s.text);var a=r(o);if("top"===n||"bottom"===n){var l=i.width/2;"left"===e.anchor?l=e.paddingLeft||0:"right"===e.anchor&&(l=i.width-(e.paddingRight||0)),o.x=l,o.y="top"===n?i.height-e.paddingStart:e.paddingStart+a.height,o.dy="top"===n?-a.height/6:-a.height/3,o.maxWidth=.8*i.width}else{var c=i.height/2;"top"===e.anchor?c=e.paddingStart:"bottom"===e.anchor&&(c=i.height-e.paddingStart),o.y=c,o.x="left"===n?i.width-e.paddingStart:e.paddingStart,o.dx="left"===n?-a.height/3:a.height/3,o.transform="rotate(".concat("left"===n?270:90,", ").concat(o.x+o.dx,", ").concat(o.y+o.dy,")"),o.maxWidth=.8*i.height}return isNaN(e.maxLengthPx)||(o.maxWidth=Math.min(o.maxWidth,e.maxLengthPx)),o}({title:this.title,dock:this.settings.layout.dock,definitionSettings:this.definitionSettings,rect:this.rect,measureText:this.renderer.measureText,style:this.style})),t},beforeUpdate:function(t){t.settings&&(pd(this.settings,t.settings),this.definitionSettings=t.settings.settings),this.title=j_(this.settings.text,this.definitionSettings.join,this.scale)}};function q_(t,e){var n,i=t.settings.layout.dock,r=t.settings.settings.invert,s="top"===i||"bottom"===i,o=t.rect[s?"width":"height"],a=t.chart.scroll(t.settings.scroll),l=e[s?"x":"y"];r&&(l=o-l);var c=a.getState();n={startOffset:l,startScroll:c.start,swipe:!1};var u=l/o*(c.max-c.min)+c.min;return u<c.start?n.startScroll=u:u>c.start+c.viewSize&&(n.startScroll=u-c.viewSize),{update:function(t){var e=t[s?"x":"y"];if(r&&(e=o-e),!n.swipe){if(Math.abs(n.startOffset-e)<=1)return;n.swipe=!0}var i=a.getState();a.moveTo(n.startScroll+(e-n.startOffset)/o*(i.max-i.min))},end:function(t){var e=t[s?"x":"y"];r&&(e=o-e);var i=a.getState();a.moveTo(n.swipe?n.startScroll+(e-n.startOffset)/o*(i.max-i.min):e/o*(i.max-i.min)+i.min-i.viewSize/2)}}}function L_(t,e){var n=e.element().getBoundingClientRect();return{x:t.center.x-n.left,y:t.center.y-n.top}}var V_={require:["chart","renderer"],on:{panStart:function(t){var e=L_(t,this.renderer);this.currentMove=q_(this,{x:e.x-t.deltaX,y:e.y-t.deltaY}),this.currentMove.update(e)},panMove:function(t){if(this.currentMove){var e=L_(t,this.renderer);this.currentMove.update(e)}},panEnd:function(t){if(this.currentMove){var e=L_(t,this.renderer);this.currentMove.end(e),this.currentMove=null}},panCancel:function(){this.currentMove=null},tap:function(t){var e=L_(t,this.renderer);q_(this,e).end(e)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(t){var e=this.chart.scroll(this.settings.scroll).getState();return e.viewSize>=e.max-e.min?Math.max(t.width,t.height):this.settings.settings.width},render:function(t){var e,n=this.settings.layout.dock,i=this.settings.settings.invert,r="top"===n||"bottom"===n,s=r?"width":"height",o=this.rect[s],a=this.chart.scroll(this.settings.scroll).getState(),l=o*(a.start-a.min)/(a.max-a.min),c=o*a.viewSize/(a.max-a.min);return i&&(l=o-l-c),t("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(t("div",{class:"scroller",style:(e={position:"absolute"},bd(e,r?"left":"top","".concat(l,"px")),bd(e,r?"top":"left","25%"),bd(e,r?"height":"width","50%"),bd(e,s,"".concat(Math.max(1,c),"px")),bd(e,"background",this.settings.settings.thumbColor),e)})))},renderer:"dom"};function H_(t){var e=t.h,n=t.isVertical,i=t.value,r=t.pos,s=t.borderHit,o=t.state,a=t.idx,l="end"!==t.align,c=l?{left:"0",top:"0"}:{right:"0",bottom:"0"},u=0,h="100%",d="100%";return o.targetRect&&"start"===o.settings.bubbles.align?(h="".concat(o.targetRect.x+o.targetRect.width,"px"),d="".concat(o.targetRect.y+o.targetRect.height,"px")):o.targetRect&&"end"===o.settings.bubbles.align&&(h="".concat(o.rect.width-(u=n?o.targetRect.x:o.targetRect.y),"px"),d="".concat(o.rect.height-u,"px")),l||(r-=s),e("div",{onmouseover:function(t){t.srcElement.children[0].style.backgroundColor="#000",t.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout:function(t){t.srcElement.children[0].style.backgroundColor=o.style.line.stroke,t.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":i,"data-key":[o.key,"edge",a].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?u:r,"px"),top:"".concat(n?r:u,"px"),height:n?"".concat(s,"px"):d,width:n?h:"".concat(s,"px"),pointerEvents:"auto"}},[e("div",{style:pd({backgroundColor:o.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},c)})])}function B_(t){var e,n,i=t.h,r=t.isVertical,s=t.label,o=t.otherValue,a=t.rangeIdx,l=t.idx,c=t.pos,u=t.state,h=t.value,d="end"!==t.align,f="outside"===u.settings.bubbles.placement,p="none";r?(n=d?"left":"right",f&&(p=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(n=d?"top":"bottom",f&&(p=d?"translate(0px, -100%)":"translate(0px, 100%)"));var y=u.edit&&u.edit.rangeIdx===a&&u.edit.bubbleIdx===l,g={position:"relative",borderRadius:"".concat(u.style.bubble.borderRadius,"px"),border:"".concat(u.style.bubble.strokeWidth,"px solid ").concat(u.style.bubble.stroke),backgroundColor:u.style.bubble.fill,color:u.style.bubble.color,fontFamily:u.style.bubble.fontFamily,fontSize:u.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:r?"translate(0,-50%)":"translate(-50%,0)",cursor:r?"ns-resize":"ew-resize"},m=u.style.bubble.stroke,v=y?i("input",{type:"text",value:h,style:wd(wd({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup:function(t){if("Enter"===t.key){t.preventDefault(),t.stopPropagation();var e=parseFloat(t.target.value);isNaN(e)?(m="rgba(230, 78, 78, 0.6)",t.target.style.border="".concat(u.style.bubble.strokeWidth,"px solid ").concat(m)):u.onEditConfirmed(a,e,o)}else"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),u.onEditCanceled())}}):i("div",{"data-key":[u.key,"bubble",a].join("-"),"data-other-value":o,"data-idx":a,"data-bidx":l,style:g},[s]);return i("div",{style:(e={position:"absolute"},bd(e,n,"0"),bd(e,r?"top":"left","".concat(c,"px")),bd(e,"transform",p),e)},[v])}function W_(t){var e=t.isVertical,n=t.top,i=t.height,r=t.on;return(0,t.h)("div",pd({style:{backgroundColor:t.color,opacity:t.opacity,position:"absolute",left:e?0:"".concat(n,"px"),top:e?"".concat(n,"px"):0,height:e?"".concat(i,"px"):"100%",width:e?"100%":"".concat(i,"px"),pointerEvents:"auto"}},r),[])}function $_(t){var e=t.borderHit,n=t.els,i=t.isVertical,r=t.state,s=t.vStart,o=t.vEnd,a=t.idx,l=0;r.targetRect&&(l=i?r.targetRect.y:r.targetRect.x);var c=!!r.scale,u=c?r.scale.norm(s)*r.size:s,h=c?r.scale.norm(o)*r.size:o,d=Math.abs(u-h),f=Math.min(u,h)+l,p=f+d;if(r.targetRect){var y=r.targetFillRect||r.targetRect,g=i?y.height:y.width,m=c?r.scale.norm(s)*g:s,v=c?r.scale.norm(o)*g:o,x=Math.abs(m-v),b=Math.min(m,v),_={h:r.h,isVertical:i,top:b,height:x,color:r.style.target.fill,opacity:r.style.target.opacity};r.style.target.opacity<.8&&(_.on={onmouseover:function(t){t.srcElement.style.opacity=r.style.target.opacity+.1},onmouseout:function(t){t.srcElement.style.opacity=r.style.target.opacity}}),n.push(r.h("div",{style:{position:"absolute",left:"".concat(y.x,"px"),top:"".concat(y.y,"px"),height:"".concat(y.height,"px"),width:"".concat(y.width,"px")}},[W_(_)]))}var w=u<h?s:o,k=u<h?o:s,S=Od(c?r.scale.domain():[Math.min(s,o),Math.max(s,o)],2),M=S[0],E=S[1],C=w+1e-5>=M&&w-1e-5<=E,T=k-1e-5<=E&&k+1e-5>=M;C&&n.push(H_({h:r.h,isVertical:i,borderHit:e,value:w,pos:f,align:"start",state:r,idx:a})),T&&n.push(H_({h:r.h,isVertical:i,borderHit:e,value:k,pos:p,align:"end",state:r,idx:a}));var A=r.settings.bubbles;if(A&&A.show){var R={fontSize:A.fontSize,fontFamily:A.fontFamily,color:A.fill},N=[s,o];C&&n.push(B_({h:r.h,isVertical:i,align:A.align,style:R,rangeIdx:a,idx:0,otherValue:k,value:w,label:"".concat(r.format(w,N)),pos:f,state:r})),T&&n.push(B_({h:r.h,isVertical:i,align:A.align,style:R,rangeIdx:a,idx:1,otherValue:w,value:k,label:"".concat(r.format(k,N)),pos:p,state:r}))}}function U_(t){var e=t.active.limitHigh-t.active.end,n=t.current-t.start;return n<0?Math.max(n,t.active.limitLow-t.active.start):Math.min(n,e)}function Y_(t){var e=[],n=0===t.direction;if(Array.isArray(t.ranges)&&t.ranges.forEach((function(i,r){t.active&&r===t.active.idx||$_({borderHit:5,els:e,isVertical:n,state:t,vStart:Math.min(i.min,i.max),vEnd:Math.max(i.min,i.max),idx:r})})),t.active){var i=t.start,r=t.current;if(-1!==t.active.idx)if("foo"===t.active.mode)i=Math.min(t.active.start,t.active.end),r=Math.max(t.active.start,t.active.end);else if("modify"===t.active.mode)i=Math.min(t.start,t.current),r=Math.max(t.start,t.current);else{var s=U_(t);i=t.active.start+s,r=t.active.end+s}$_({borderHit:5,els:e,isVertical:n,state:t,vStart:i,vEnd:r,idx:t.active.idx})}return e}function Q_(t){return{min:t.scale.min(),max:t.scale.max()}}function K_(t){return{min:0,max:t.direction?t.rect.width:t.rect.height}}function X_(t,e,n){var i,r,s=t.ranges,o=-1;for(i=0;i<s.length;i++){if(s[i].min<=e&&e<=s[i].max){o=i,n.min=i?s[i-1].max:n.min,n.max=i+1<s.length?s[i+1].min:n.max;break}if(e<s[i].min){n.max=s[i].min,n.min=i?s[i-1].max:n.min;break}}-1===o&&s.length&&i>=s.length&&(n.min=s[s.length-1].max),-1!==o&&(r={idx:o,start:s[o].min,end:s[o].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),t.active=r}function Z_(t){t.renderer.render(Y_(t))}function G_(t,e){if(!e||!e.isActive())return[];var n=t.scale.data(),i=(n&&n.fields||[]).map((function(t){return t.id()})),r=e.brushes().filter((function(t){return"range"===t.type&&-1!==i.indexOf(t.id)}))[0];return r?r.brush.ranges():[]}function J_(t,e){for(var n,i=1/0,r=e.domain(),s=e.bandwidth()/2,o=0;o<r.length;++o){var a=Math.abs(t-s-e(r[o]));a<i&&(i=a,n=r[o])}return n}function tw(t,e){return Math.min.apply(Math,Id(t))<=Math.max.apply(Math,Id(e))&&Math.max.apply(Math,Id(t))>=Math.min.apply(Math,Id(e))}function ew(t){return Hd(t.reduce((function(t,e){return t.push.apply(t,Id(Vd(e.bounds))),t}),[]))}var nw={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart:function(t){this.start(t)},rangeMove:function(t){this.move(t)},rangeEnd:function(t){this.end(t)},rangeClear:function(t){this.clear(t)},bubbleStart:function(t){this.bubbleStart(t)}},created:function(){this.state={key:this.settings.key||"brush-range"}},beforeRender:function(t){this.state.rect=t.size.computedInner},renderRanges:function(){this.state.started||(this.state.ranges=G_(this.state,this.state.brushInstance),this.state.active=null,Z_(this.state))},render:function(t){var e=this,n=this.settings.settings;this.state.direction="vertical"===n.direction?0:1;var i=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"],s=Qv(this.chart.scale(n.scale),r),o=function(t){var e={targetRect:null,targetFillRect:null,scale:null,size:null},n=t.settings.settings,i=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((function(e){return t.chart.component(e)})).filter((function(t){return!!t&&!!t.rect})),r=n.target&&n.target.selector?t.chart.findShapes(n.target.selector):[],s=n.target&&n.target.fillSelector?t.chart.findShapes(n.target.fillSelector):[];if(r.length>0){var o=ew(r);if(e.size=o[0===t.state.direction?"height":"width"],e.scale=Qv(t.chart.scale(n.scale),e.size),e.targetRect=o,s.length>0){var a=ew(s);e.targetFillRect=a}}else if(i&&i.length>0){var l=i.slice(1).reduce((function(t,e){return{x0:Math.min(t.x0,e.rect.computedInner.x),y0:Math.min(t.y0,e.rect.computedInner.y),x1:Math.max(t.x1,e.rect.computedInner.x+e.rect.computedInner.width),y1:Math.max(t.y1,e.rect.computedInner.y+e.rect.computedInner.height)}}),{x0:i[0].rect.computedInner.x,y0:i[0].rect.computedInner.y,x1:i[0].rect.computedInner.x+i[0].rect.computedInner.width,y1:i[0].rect.computedInner.y+i[0].rect.computedInner.height});e.targetRect={x:l.x0-t.state.rect.x,y:l.y0-t.state.rect.y,width:l.x1-l.x0,height:l.y1-l.y0}}return e}(this);if(s=o.scale?o.scale:s,this.state.targetRect=o.targetRect,this.state.targetFillRect=o.targetFillRect,this.state.size=null===o.size?r:o.size,this.state.settings=n,this.state.style=this.style,this.state.offset=i,this.state.brush="object"===gd(n.brush)?n.brush.context:n.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!n.multiple,this.state.h=t,this.state.onEditConfirmed=function(t,n,i){e.state.edit=null,function(t,e,n,i){var r=t.ranges.map((function(t){return{min:t.min,max:t.max}})),s=t.scale.min(),o=t.scale.max();r[e]={min:Math.max(s,Math.min(n,i)),max:Math.min(o,Math.max(n,i))},t.ranges[e]=wd({},r[e]);var a=t.scale.data();a&&a.fields&&a.fields.forEach((function(e){t.fauxBrushInstance||t.brushInstance.setRange(e.id(),r)}))}(e.state,t,n,i),e.emit("bubbleEnd"),Z_(e.state)},this.state.onEditCanceled=function(){e.state.edit=null,Z_(e.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof n.bubbles.label&&function(t,i){return n.bubbles.label.call(void 0,{datum:t,data:i,scale:s,resources:{scale:e.chart.scale,formatter:e.chart.formatter}})},{}.hasOwnProperty.call(s,"norm")){this.state.editable=!0,this.state.observeBrush="object"===gd(n.brush)&&n.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=s;var a=this.state.scale.data();!this.state.format&&a&&a.fields&&a.fields[0]&&(this.state.format=a.fields[0].formatter())}else this.state.editable=!1,this.state.scale=Bm(),this.state.scale.data=s.data,this.state.format||(this.state.format=function(t,e){return tw(s.range(),e)?function(t,e){var n=e.ticks(),i=e.domain().indexOf(J_(t,e));return-1!==i?n[i].label:"-"}(t,s):"-"}),this.state.fauxBrushInstance=Fv(),this.state.findValues=function(t){return function(t,e){var n=e.domain(),i=e.range(),r=[];return t.forEach((function(t){if(tw(i,[t.min,t.max])){var s=n.indexOf(J_(t.min,e)),o=n.indexOf(J_(t.max,e));r.push.apply(r,n.slice(Math.min(s,o),Math.max(s,o)+1))}})),r}(t,s)};return this.state.ranges=G_(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[Y_(this.state)]:[]},mounted:function(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy:function(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start:function(t){!function(t){var e=t.state,n=t.e,i=t.renderer,r=t.ranges,s=t.targetSize;if(!e.started){e.edit=null;var o=n.center.x-n.deltaX,a=n.center.y-n.deltaY,l=document.elementFromPoint(o,a);i.element().contains(l)||(l=null);var c={started:!0};e.offset=pd({},i.element().getBoundingClientRect());var u=o-e.offset.left,h=a-e.offset.top;e.offset.left+=e.targetRect?e.targetRect.x:0,e.offset.top+=e.targetRect?e.targetRect.y:0,e.ranges=r(e,e.fauxBrushInstance||e.brushInstance);var d=n.center[e.cssCoord.coord]-n[e.cssCoord.pos]-e.offset[e.cssCoord.offset];c.current=e.scale.normInvert((n.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size),c.start=e.scale.normInvert(d/e.size);var f,p,y=e.ranges,g=Q_(e),m=-1;if(l&&l.hasAttribute("data-idx"))m=parseInt(l.getAttribute("data-idx"),10),g.min=m>0?y[m-1].max:g.min,g.max=m+1<y.length?y[m+1].min:g.max;else{for(f=0;f<y.length;f++){if(y[f].min<=c.start&&c.start<=y[f].max){m=f,g.min=f?y[f-1].max:g.min,g.max=f+1<y.length?y[f+1].min:g.max;break}if(c.start<y[f].min){g.max=y[f].min,g.min=f?y[f-1].max:g.min;break}}-1===m&&y.length&&f>=y.length&&(g.min=y[y.length-1].max)}if(-1!==m||e.multi||(c.ranges=[],g.min=e.scale.min(),g.max=e.scale.max()),-1!==m)if(p={idx:m,start:y[m].min,end:y[m].max,limitLow:g.min,limitHigh:g.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),p.mode="modify";else{var v=e.scale.norm(p.start)*e.size,x=e.scale.norm(p.end)*e.size;Math.abs(d-v)<=s?(c.start=p.end,p.mode="modify"):Math.abs(d-x)<=s&&(c.start=p.start,p.mode="modify")}else p={idx:-1,start:c.start,end:c.current,limitLow:g.min,limitHigh:g.max,mode:"current"};c.active=p,"modify"!==p.mode&&e.targetRect&&!Ux(e.targetRect,{x:u,y:h})||Object.keys(c).forEach((function(t){return e[t]=c[t]}))}}({e:t,state:this.state,renderer:this.renderer,ranges:G_,targetSize:5})},end:function(){this.state.started&&(function(t,e){t.started=!1,t.ranges=e(t,t.fauxBrushInstance||t.brushInstance);var n=Q_(t);X_(t,t.current,n)}(this.state,G_),Z_(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move:function(t){this.state.started&&(function(t,e){var n=t.scale.normInvert((e.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset])/t.size);t.current=Math.max(Math.min(n,t.active.limitHigh),t.active.limitLow)}(this.state,t),function(t){var e=t.ranges.map((function(t){return{min:t.min,max:t.max}}));if(-1!==t.active.idx)if("modify"===t.active.mode)e[t.active.idx].min=Math.min(t.start,t.current),e[t.active.idx].max=Math.max(t.start,t.current);else{var n=U_(t);e[t.active.idx].min+=n,e[t.active.idx].max+=n}else e.push({min:Math.min(t.start,t.current),max:Math.max(t.start,t.current)});var i=t.scale.data();i&&i.fields&&i.fields.forEach((function(n){if(t.fauxBrushInstance){var i=G_(t,t.fauxBrushInstance),r=t.findValues(i),s=t.findValues(e),o=s.filter((function(t){return-1===r.indexOf(t)})),a=r.filter((function(t){return-1===s.indexOf(t)})),l=o.map((function(t){return{key:n.id(),value:t}})),c=a.map((function(t){return{key:n.id(),value:t}}));t.brushInstance.addAndRemoveValues(l,c),t.fauxBrushInstance.setRange(n.id(),e)}else t.brushInstance.setRange(n.id(),e)}))}(this.state),Z_(this.state))},clear:function(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart:function(t){if(this.state.editable){var e=t.srcEvent||t,n=e.target,i={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(!isNaN(i.rangeIdx)&&JSON.stringify(i)!==JSON.stringify(this.state.edit)){this.state.edit=i,e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault();var r=n.parentNode;Z_(this.state);var s=r.querySelector("input");s.focus(),s.select()}}}};function iw(t){t.renderer.render(Y_(t))}function rw(t){return t.rc.ranges()}var sw={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart:function(t){this.start(t)},areaMove:function(t){this.move(t)},areaEnd:function(t){this.end(t)},areaClear:function(t){this.clear(t)}},created:function(){this.state={key:this.settings.key||"brush-area-dir"}},render:function(t){var e=this;this.state.rect=this.rect;var n=this.settings.settings,i="vertical"===n.direction?0:1,r=this.state.rect[0===i?"height":"width"],s=this.renderer.element().getBoundingClientRect(),o=(n.target?n.target.components||[n.target.component]:[]).map((function(t){return e.chart.component(t)})).filter((function(t){return!!t&&!!t.rect})),a=o[0]?o.slice(1).reduce((function(t,e){return{x0:Math.min(t.x0,e.rect.x),y0:Math.min(t.y0,e.rect.y),x1:Math.max(t.x1,e.rect.x+e.rect.width),y1:Math.max(t.y1,e.rect.y+e.rect.height)}}),{x0:o[0].rect.x,y0:o[0].rect.y,x1:o[0].rect.x+o[0].rect.width,y1:o[0].rect.y+o[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=i,this.state.settings=n,this.state.offset=s,this.state.rc=Sv(),this.state.renderer=this.renderer,this.state.multi=!!n.multiple,this.state.h=t,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(t,e){return function(t,e,n){var i=Math.min.apply(Math,Id(n)),r=Math.max.apply(Math,Id(n)),s=t.chart.shapesAt({x:t.direction?i+t.rect.x:t.rect.x,y:t.direction?t.rect.y:i+t.rect.y,width:t.direction?r-i:t.rect.width+t.rect.x,height:t.direction?t.rect.height+t.rect.y:r-i},t.settings.brush);if(0===s.length)return"-";var o=s.reduce((function(n,r){var s=n.bounds,o=r.bounds;return e===i?s[t.cssCoord.coord]<=o[t.cssCoord.coord]?n:r:s[t.cssCoord.coord]+s[t.cssCoord.area]>=o[t.cssCoord.coord]+o[t.cssCoord.area]?n:r})),a=t.settings.brush.components.reduce((function(t,e){return t.key===o.key?t:e}));return"function"==typeof t.settings.bubbles.label?t.settings.bubbles.label(o.data):Array.isArray(a.data)&&a.data.length?o.data[a.data[0]].label:o.data&&o.data.label?o.data.label:"-"}(this,t,e)},[]},start:function(t){!function(t){var e=t.state,n=t.e,i=t.renderer,r=t.ranges,s=t.targetSize;if(!e.started){var o=n.center.x-n.deltaX,a=n.center.y-n.deltaY,l=document.elementFromPoint(o,a);i.element().contains(l)||(l=null);var c={started:!0};e.offset=i.element().getBoundingClientRect(),e.ranges=r(e);var u=o-e.offset.left,h=a-e.offset.top,d=n.center[e.cssCoord.coord]-n[e.cssCoord.pos]-e.offset[e.cssCoord.offset],f=n.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset],p=f,y=d;c.start=d,c.current=f;var g,m,v=e.ranges,x=K_(e),b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),x.min=b>0?v[b-1].max:x.min,x.max=b+1<v.length?v[b+1].min:x.max;else{for(g=0;g<v.length;g++){if(v[g].min<=y&&y<=v[g].max){b=g,x.min=g?v[g-1].max:x.min,x.max=g+1<v.length?v[g+1].min:x.max;break}if(y<v[g].min){x.max=v[g].min,x.min=g?v[g-1].max:x.min;break}}-1===b&&v.length&&g>=v.length&&(x.min=v[v.length-1].max)}if(-1!==b||e.multi||(c.ranges=[],x.min=0,x.max=e.direction?e.rect.width:e.rect.height),-1!==b)if(m={idx:b,start:v[b].min,end:v[b].max,limitLow:x.min,limitHigh:x.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),m.mode="modify";else{var _=m.end;Math.abs(d-m.start)<=s?(c.start=m.end,m.mode="modify"):Math.abs(d-_)<=s&&(c.start=m.start,m.mode="modify")}else m={idx:-1,start:y,end:p,limitLow:x.min,limitHigh:x.max,mode:"current"};c.active=m,"modify"!==m.mode&&e.targetRect&&!Ux(e.targetRect,{x:u,y:h})||Object.keys(c).forEach((function(t){return e[t]=c[t]}))}}({e:t,state:this.state,renderer:this.renderer,ranges:rw,targetSize:5})},end:function(){this.state.started&&(function(t,e){t.started=!1,t.ranges=e(t);var n=K_(t);X_(t,t.current,n)}(this.state,rw),iw(this.state))},move:function(t){this.state.started&&(function(t,e){t.current=Math.max(Math.min(e.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset],t.active.limitHigh),t.active.limitLow)}(this.state,t),function(t){var e=t.ranges.map((function(t){return{min:t.min,max:t.max}}));if(-1!==t.active.idx)if("modify"===t.active.mode)e[t.active.idx].min=Math.min(t.start,t.current),e[t.active.idx].max=Math.max(t.start,t.current);else{var n=U_(t);e[t.active.idx].min=t.active.start+n,e[t.active.idx].max=t.active.end+n}else e.push({min:Math.min(t.start,t.current),max:Math.max(t.start,t.current)});t.rc.set(e);var i=[];e.forEach((function(e){i.push.apply(i,Id(function(t,e){return t.chart.shapesAt({x:t.direction?e.min+t.rect.x:t.rect.x,y:t.direction?t.rect.y:e.min+t.rect.y,width:t.direction?e.max-e.min:t.rect.width+t.rect.x,height:t.direction?t.rect.height+t.rect.y:e.max-e.min},t.settings.brush)}(t,e)))})),function(t,e){t.chart.brushFromShapes(e,t.settings.brush)}(t,i)}(this.state),iw(this.state))},clear:function(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function ow(t){var e="vertical"===t.direction,n=t.rect[e?"height":"width"],i=t.rect[e?"width":"height"];return function(t){var e=t.brush;if(!e||!e.isActive())return[];var n=t.scale.data(),i=(n&&n.fields||[]).map((function(t){return t.id()})),r=e.brushes().filter((function(t){return"range"===t.type&&-1!==i.indexOf(t.id)}))[0];return r?r.brush.ranges():[]}(t).map((function(r){var s=t.scale(r.min)*n,o=t.scale(r.max)*n,a=Math.min(s,o),l=Math.abs(s-o);return{type:"rect",fill:t.fill,opacity:t.opacity,x:e?0:a,width:e?i:l,y:e?a:0,height:e?l:i}}))}function aw(t){t.brush&&(t.brush.removeListener("start",t.start),t.brush.removeListener("update",t.update),t.brush.removeListener("end",t.end)),t.start=void 0,t.update=void 0,t.end=void 0,t.brush=void 0,t.scale=void 0,t.renderer=void 0}var lw={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:function(){return 50},created:function(){this.state={}},render:function(){var t=this.settings.settings,e=this.chart.brush(t.brush),n=t.direction||"horizontal",i="horizontal"===n?this.rect.width:this.rect.height,r=Qv(this.chart.scale(t.scale),i);return aw(this.state),function(t,e,n,i){function r(){!function(t){t.renderer.render(ow(t))}(t)}function s(){!function(t){t.renderer.render(ow(t))}(t)}function o(){!function(t){t.renderer.render(ow(t))}(t)}t.brush=e,e&&(e.on("start",r),e.on("update",s),e.on("end",o),t.start=r,t.update=s,t.end=o,t.brush=e,t.scale=n,t.renderer=i)}(this.state,e,r,this.renderer),this.state.rect=this.rect,this.state.fill=t.fill||"#ccc",this.state.opacity=void 0!==t.opacity?t.opacity:1,this.state.direction=n,ow(this.state)},beforeDestroy:function(){aw(this.state)}};function cw(t,e){return{x:e.center.x-t.left,y:e.center.y-t.top}}function uw(t,e,n){return yx(t,e.points[0])<Math.pow(n.settings.snapIndicator.threshold,2)}function hw(t,e){null==t.path.d?t.path.d="M".concat(e.x," ").concat(e.y," "):t.path.d+="L".concat(e.x," ").concat(e.y," "),t.points.push(e)}function dw(t){var e=t.state,n=t.start,i=void 0===n?null:n,r=t.end,s=void 0===r?null:r;null!==i&&(e.snapIndicator.x1=i.x,e.snapIndicator.y1=i.y),null!==s&&(e.snapIndicator.x2=s.x,e.snapIndicator.y2=s.y)}function fw(t,e){t.snapIndicator.visible=e}var pw={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart:function(t){this.start(t)},lassoEnd:function(t){this.end(t)},lassoMove:function(t){this.move(t)},lassoCancel:function(){this.cancel()}},created:function(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start:function(t){var e,n,i;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(e=this.settings.settings.lasso).fill,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,strokeDasharray:e.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(t){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:t.strokeDasharray,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(t){return{visible:!0,type:"circle",cx:0,cy:0,r:t.r,fill:t.fill,opacity:t.opacity,stroke:t.stroke,strokeWidth:t.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=(n=this.state.rendererBounds,i=this.chart.element.getBoundingClientRect(),{x:n.left-i.left,y:n.top-i.top}),this.state.brushConfig=this.settings.settings.brush.components.map((function(t){return{key:t.key,contexts:t.contexts||["lassoBrush"],data:t.data||[""],action:t.action||"add"}}));var r=cw(this.state.rendererBounds,t);hw(this.state,r),dw({state:this.state,start:r}),function(t,e){t.startPoint.cx=e.x,t.startPoint.cy=e.y}(this.state,r)},move:function(t){if(this.state.active){var e=cw(this.state.rendererBounds,t);uw(e,this.state,this.settings)?fw(this.state,!0):fw(this.state,!1),hw(this.state,e),dw({state:this.state,end:e}),function(t,e){var n=[t.startPoint,t.path,t.snapIndicator].filter((function(t){return t.visible}));e.render(n)}(this.state,this.renderer),function(t,e){if(t.active){var n=t.points[t.points.length-2],i=t.points[t.points.length-1];t.lineBrushShape.x1=n.x+t.componentDelta.x,t.lineBrushShape.y1=n.y+t.componentDelta.y,t.lineBrushShape.x2=i.x+t.componentDelta.x,t.lineBrushShape.y2=i.y+t.componentDelta.y;var r=e.shapesAt(t.lineBrushShape,{components:t.brushConfig});e.brushFromShapes(r,{components:t.brushConfig})}}(this.state,this.chart)}},end:function(t){this.state.active&&(fw(this.state,!1),uw(cw(this.state.rendererBounds,t),this.state,this.settings)&&function(t,e){if(t.active){var n=t.componentDelta.x,i=t.componentDelta.y,r=t.points.map((function(t){return{x:t.x+n,y:t.y+i}})),s=e.shapesAt({vertices:r},{components:t.brushConfig});e.brushFromShapes(s,{components:t.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},cancel:function(){var t;this.state.active&&(t=this.chart,this.state.brushConfig.forEach((function(e){e.contexts.forEach((function(e){t.brush(e).end()}))})),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render:function(){}};function yw(t,e,n,i,r){for(var s,o=0,a=e.length-1;o<a;){var l=Math.floor((o+a)/2);(s=r(e[l]))[n]+s[i]<t[n]?o=l+1:a=l}return o}function gw(t){var e=t.orientation,n=t.targetNodes,i=t.labels,r=t.container,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yw,o=[],a="v"===e?"x":"y",l="v"===e?"width":"height",c=function(t){return t.textBounds},u=function(t){return t.node.localBounds};return function(t,e){var h=i[e],d=h.textBounds,f=h.node;if(d[a]<r[a]||d[a]+d[l]>r[a]+r[l])return!1;for(var p=s(d,o,a,l,c);p<o.length;p++)if(Wx(d,o[p].textBounds))return!1;for(var y=s(d,n,a,l,u),g=d[a]+d[l],m=y;m<n.length;m++){var v=n[m].node;if(g<v.localBounds[a])break;if(Wx(d,v.localBounds)&&f!==v)return!1}return o.push(i[e]),!0}}function mw(t,e){return{node:t,data:t.data,scale:e.scale,formatter:e.formatter,dataset:e.dataset}}function vw(t){var e=gd(t);return("string"===e||"number"===e)&&""!==t}function xw(t){return wd({type:"rect",rx:2,ry:2,fill:t.backgroundColor},t.backgroundBounds)}function bw(t,e,n){return n?t.width>=e.height:t.width>=e.width}function _w(t,e,n){return n?t.height>=e.width:t.height>=e.height}function ww(t,e,n,i,r){var s,o;return"v"===t?(s=i||r||bw(e,n,!0),o=_w(e,n,!i)):(s=bw(e,n),o=r||_w(e,n,!1)),s&&o}function kw(t,e,n,i){return t+.5*e+(i-.5)*(e-n)-.5*n}function Sw(t,e,n){var i={type:"text",text:e,maxWidth:n.rotate?t.height:t.width,x:0,y:t.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},r=n.textMetrics;if(!n.overflow&&!function(t,e,n){return bw(t,e,n.rotate)&&_w(t,e,n.rotate)}(t,r,n))return!1;var s=.5*r.height;return n.rotate?(i.x=kw(t.x,t.width,r.height,n.align)+s,i.y=kw(t.y,t.height,r.width,n.justify),i.transform="rotate(-90, ".concat(i.x+i.dx,", ").concat(i.y+i.dy,")")):(i.x=kw(t.x,t.width,r.width,n.align),i.y=kw(t.y,t.height,r.height,n.justify)+s),i}function Mw(t){var e=t.bar,n=t.view,i=t.direction,r=t.position,s=t.padding,o=void 0===s?4:s,a={};if(pd(a,e),r&&"inside"!==r)if("up"===i||"down"===i){var l=Math.max(0,Math.min(e.y,n.height)),c=Math.max(0,Math.min(e.y+e.height,n.height));"outside"===r&&"up"===i||"opposite"===r&&"down"===i?(a.y=0,a.height=l):("outside"===r&&"down"===i||"opposite"===r&&"up"===i)&&(a.y=c,a.height=n.height-c)}else{var u=Math.max(0,Math.min(e.x,n.width)),h=Math.max(0,Math.min(e.x+e.width,n.width));"outside"===r&&"left"===i||"opposite"===r&&"right"===i?(a.x=0,a.width=u):("outside"===r&&"right"===i||"opposite"===r&&"left"===i)&&(a.x=h,a.width=n.width-h)}return function(t,e){var n=Math.max(0,Math.min(t.y,e.height)),i=Math.max(0,Math.min(t.y+t.height,e.height)),r=Math.max(0,Math.min(t.x,e.width)),s=Math.max(0,Math.min(t.x+t.width,e.width));t.x=r,t.width=s-r,t.y=n,t.height=i-n}(a,n),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.top,i=void 0===n?4:n,r=e.bottom,s=void 0===r?4:r,o=e.left,a=void 0===o?4:o,l=e.right,c=void 0===l?4:l;t.x+=a,t.width-=a+c,t.y+=i,t.height-=i+s}(a,o),a}function Ew(t){var e,n,i,r,s,o=t.direction,a=t.fitsHorizontally,l=t.measured,c=t.node,u=t.orientation,h=t.placementSettings,d=t.rect,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Mw,p=[],y="h"===u?"width":"height";for(s=0;s<h.length;s++)if(r=f({bar:c.localBounds,view:d,direction:o,position:(i=h[s]).position,padding:i.padding}),p.push(r),e=!s||r[y]>e[y]?r:e,ww(u,r,l,a,i.overflow)){n=r;break}return n||(s=p.indexOf(n=e)),{bounds:n,placement:i=h[s]}}function Cw(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=r.top,o=void 0===s?4:s,a=r.bottom,l=void 0===a?4:a,c=r.left,u=void 0===c?4:c,h=r.right,d=void 0===h?4:h,f=t.x+t.dx,p=t.y+t.dy,y=n?Math.min(e.width,i.height):Math.min(e.height,i.width),g=n?Math.min(e.height,i.height):Math.min(e.width,i.width),m=.5*e.height,v=1e-9,x=n?f-m:f,b=n?p:p-m,_={x:x-u-v,y:b-o-v,width:g+(u+d)-v,height:y+(o+l)-v};return _}function Tw(t){for(var e,n,i,r,s,o,a,l,c,u,h,d,f,p=t.chart,y=t.targetNodes,g=t.rect,m=t.fitsHorizontally,v=t.collectiveOrientation,x=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ew,b=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Sw,_=arguments.length>3&&void 0!==arguments[3]?arguments[3]:gw,w=[],k={container:g,targetNodes:y,labels:[],orientation:v},S=0,M=y.length;S<M;S++){o=null,d=mw(i=(n=y[S]).node,p),f="left"===(c=n.direction)||"right"===c?"h":"v";for(var E=0;E<n.texts.length;E++)if(vw(r=n.texts[E])){var C=x({direction:c,fitsHorizontally:m,lblStngs:u=n.labelSettings[E],measured:l=n.measurements[E],node:i,orientation:f,placements:u.placements,placementSettings:n.placementSettings[E],rect:g});if(h=C.placement,(o=C.bounds)&&h){s=h.justify;var T="function"==typeof u.linkData?u.linkData(d,S):void 0,A="function"==typeof h.overflow?h.overflow(d,S):h.overflow;"up"===c&&(s=1-s),"opposite"===h.position&&(s=1-s),"left"===c&&(s=1-s);var R=!("h"===v||m);if(e=b(o,r,{justify:"h"===f?h.align:s,align:"h"===f?s:h.align,fontSize:u.fontSize,fontFamily:u.fontFamily,textMetrics:l,rotate:R,overflow:!!A})){var N=Cw(e,l,R,o,h.padding);a="function"==typeof h.fill?h.fill(wd(wd({},d),{},{textBounds:N}),S):h.fill,e.fill=a,void 0!==T&&(e.data=T),"object"===gd(h.background)&&(e.backgroundColor="function"==typeof h.background.fill?h.background.fill(wd(wd({},d),{},{textBounds:N}),S):h.background.fill,void 0!==e.backgroundColor&&(e.backgroundBounds=Cw(e,l,R,o,h.background.padding))),w.push(e),k.labels.push({node:i,textBounds:N})}}}}var O=w.filter(_(k)),I=O.filter((function(t){return void 0!==t.backgroundBounds})).map(xw);return[].concat(Id(I),Id(O))}function Aw(t){for(var e,n,i,r,s,o,a,l=t.nodes,c=t.rect,u=t.chart,h=t.labelSettings,d=t.placementSettings,f=t.settings,p=t.renderer,y={},g=[],m=!0,v=!1,x=0;x<l.length;x++)if(Wx(r=(n=l[x]).localBounds,c)){var b=mw(n,u);e={node:n,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(var _=0;_<h.length;_++)vw(i="function"==typeof(o=h[_]).label?o.label(b,x):void 0)&&(a="function"==typeof f.direction?f.direction(b,x):f.direction||"up",v=v||"left"===a||"right"===a,y.fontFamily=o.fontFamily,y.fontSize="".concat(o.fontSize,"px"),y.text=i,s=p.measureText(y),e.measurements.push(s),e.texts.push(i),e.labelSettings.push(o),e.placementSettings.push(d[_]),e.direction=a,m=m&&s.width<=r.width-8);g.push(e)}return{targetNodes:g,fitsHorizontally:m,hasHorizontalDirection:v}}function Rw(t){var e=t.orientation,n=t.defaultOrientation,i=void 0===n?"h":n;switch((void 0===e?"auto":e).toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return i}}function Nw(t){var e=2*Math.PI;return(t%e+e)%e}function Ow(t,e){t.x+=e,t.width-=2*e,t.y+=e,t.height-=2*e}function Iw(t){return{x:t.x,y:t.y-t.height/2,width:t.width,height:t.height}}function Pw(t,e,n){var i=e.x,r=e.y;if(i*i+r*r>t*t)return null;var s=Math.sin(n),o=Math.cos(n),a=i*o-r*s,l=t*t-a*a;if(l<0)return null;var c=Math.sqrt(l);return{x:a*o+s*c,y:-a*s+o*c}}function Dw(t){var e,n,i=t.radius,r=t.size,s=t.angle,o=r.width,a=r.height,l={x:o/2,y:a/2};switch(Math.floor(s/(Math.PI/2))){case 0:if(!(e=Pw(i,l,s)))return null;e.y*=-1,n={x:-o,y:0};break;case 1:if(!(e=Pw(i,l,Math.PI-s)))return null;n={x:-o,y:-a};break;case 2:if(!(e=Pw(i,l,s-Math.PI)))return null;e.x*=-1,n={x:0,y:-a};break;case 3:if(!(e=Pw(i,l,2*Math.PI-s)))return null;e.x*=-1,e.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:e.x+n.x,y:e.y+n.y,width:o,height:a}}function jw(t){var e=t.slice,n=t.measured,i=t.padding,r=e.start,s=e.end,o=e.innerRadius,a=e.outerRadius,l=a-o-2*i,c=s-r;if(c<Math.PI){var u=(n.height/2+i)/Math.tan(c/2);u>o&&(l=a-u-2*i)}if(l<0||l<n.minReqWidth)return null;var h=Nw((r+s)/2),d=a-i,f={x:Math.sin(h)*d,y:-Math.cos(h)*d,width:l,height:n.height};return h<Math.PI?(f.angle=h-Math.PI/2,f.anchor="end"):(f.angle=h+Math.PI/2,f.anchor="start"),f}function zw(t){var e=t.context,n=t.bounds,i=t.node.desc.slice,r=Nw((i.start+i.end)/2);switch(Math.floor(r/(Math.PI/2))){case 0:e.q1maxY=n.y-2,void 0===e.q2minY&&(e.q2minY=n.y+n.height+2);break;case 1:e.q2minY=n.y+n.height+2;break;case 2:e.q3minY=n.y+n.height+2;break;case 3:e.q4maxY=n.y-2,void 0===e.q3minY&&(e.q3minY=n.y+n.height+2)}}function Fw(t,e){return{node:t,data:t.data,scale:e.scale,formatter:e.formatter,dataset:e.dataset}}function qw(t,e,n){var i={type:"text",text:e,maxWidth:t.width,x:t.x,y:t.y+("top"===t.baseline?t.height/2:0),fill:n.fill,anchor:t.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(t.angle)){var r=t.angle*(360/(2*Math.PI));i.transform="rotate(".concat(r,", ").concat(i.x,", ").concat(i.y,")")}return i}function Lw(t){var e,n,i=t.slice,r=t.direction,s=t.position,o=t.padding,a=t.measured,l=t.view,c=t.context,u=t.store,h=i.start,d=i.end,f=i.innerRadius,p=i.offset;switch(s){case"into":e="rotate"===r?jw({slice:i,measured:a,padding:o}):function(t){var e=t.slice,n=t.padding,i=t.measured,r=e.start,s=e.end,o=e.innerRadius,a=e.outerRadius,l=Nw((r+s)/2),c=Dw({radius:a,size:{width:i.width+2*n,height:i.height+2*n},angle:l});return c?(c.baseline="top",Yx(c,{x1:0,y1:0,x2:Math.sin(r)*a,y2:-Math.cos(r)*a})||Yx(c,{x1:0,y1:0,x2:Math.sin(s)*a,y2:-Math.cos(s)*a})||Fx({cx:0,cy:0,r:o},c)?null:(Ow(c,n),c)):null}({slice:i,measured:a,padding:o});break;case"inside":n={start:h,end:d,innerRadius:0,outerRadius:f},e="rotate"===r?jw({slice:n,measured:a,padding:o}):function(t){var e=t.slice,n=t.padding,i=t.measured,r=t.store,s=e.outerRadius,o=Nw((e.start+e.end)/2),a=Dw({radius:s,size:{width:i.width+2*n,height:i.height+2*n},angle:o});return a?(a.baseline="top",Ow(a,n),r.insideLabelBounds.some((function(t){return Wx(t,a)}))?null:(r.insideLabelBounds.push({x:a.x-4,y:a.y,width:a.width+8,height:a.height}),a)):null}({slice:n,measured:a,padding:o,store:u});break;case"outside":e="rotate"===r?function(t){var e=t.slice,n=t.measured,i=t.padding,r=t.view,s=e.start,o=e.end,a=e.outerRadius,l=e.offset,c=a+i,u=o-s;if(u<Math.PI&&(n.height/2+i)/Math.tan(u/2)>c)return null;var h=Nw((s+o)/2),d=Math.sin(h)*c,f=-Math.cos(h)*c,p=n.width,y=h%Math.PI;if(y>Math.PI/2&&(y=Math.PI-y),Math.cos(y)>.001){var g=Math.abs((f<0?r.y:r.y+r.height)-l.y)/Math.cos(y)-Math.tan(y)*(n.height/2)-2*i-a;g<p&&(p=g)}if(Math.sin(y)>.001){var m=Math.abs((d<0?r.x:r.x+r.width)-l.x)/Math.sin(y)-n.height/2/Math.tan(y)-2*i-a;m<p&&(p=m)}if(p<=0||p<n.minReqWidth)return null;var v={x:d,y:f,width:p,height:n.height};return h<Math.PI?(v.angle=h-Math.PI/2,v.anchor="start"):(v.angle=h+Math.PI/2,v.anchor="end"),v}({slice:i,measured:a,padding:o,view:l}):function(t){var e=t.slice,n=t.measured,i=t.padding,r=t.view,s=t.context,o=e.outerRadius,a=e.offset,l=Nw((e.start+e.end)/2);if(function(t,e,n){switch(e){case 0:return t.q1maxY<0;case 1:return t.q2minY>n.height;case 2:return t.q3minY>n.height;case 3:return t.q4maxY<0;default:return!0}}(s,Math.floor(l/(Math.PI/2)),r))return null;var c=o+i+n.height/2,u=Math.sin(l)*c,h=-Math.cos(l)*c,d=n.width;if(l<Math.PI){var f=Math.abs(r.x+r.width-(u+a.x));f<d&&(d=f)}else{var p=Math.abs(r.x-(u+a.x));p<d&&(d=p)}if(d<n.minReqWidth)return null;var y={x:u,y:h,width:d,height:n.height};return y.anchor=l<Math.PI?"start":"end",y}({slice:i,measured:a,padding:o,view:l,context:c});break;default:throw new Error("not implemented")}return e&&(e.x+=p.x,e.y+=p.y,"outside"===s&&"rotate"!==r&&function(t,e,n){var i=n.offset,r=n.outerRadius,s=Nw((n.start+n.end)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==e.q1maxY){var o=Math.min(t.y,e.q1maxY-t.height),a=t.y-o;if(t.y=o,a>1){var l=r+2;t.line={type:"line",x1:t.x-2,y1:t.y+2,x2:i.x+Math.sin(s)*l,y2:i.y-Math.cos(s)*l,strokeWidth:1}}}break;case 1:if(void 0!==e.q2minY){var c=Math.max(t.y,e.q2minY),u=c-t.y;if(t.y=c,u>1){var h=r+2;t.line={type:"line",x1:t.x-2,y1:t.y-2,x2:i.x+Math.sin(s)*h,y2:i.y-Math.cos(s)*h,strokeWidth:1}}}break;case 2:if(void 0!==e.q3minY){var d=Math.max(t.y,e.q3minY),f=d-t.y;if(t.y=d,f>1){var p=r+2;t.line={type:"line",x1:t.x+2,y1:t.y-2,x2:i.x+Math.sin(s)*p,y2:i.y-Math.cos(s)*p,strokeWidth:1}}}break;case 3:if(void 0!==e.q4maxY){var y=Math.min(t.y,e.q4maxY-t.height),g=t.y-y;if(t.y=y,g>1){var m=r+2;t.line={type:"line",x1:t.x+2,y1:t.y+2,x2:i.x+Math.sin(s)*m,y2:i.y-Math.cos(s)*m,strokeWidth:1}}}}}(e,c,i)),e}function Vw(t){for(var e=t.context,n=t.direction,i=t.measured,r=t.node,s=t.placementSettings,o=t.rect,a=t.store,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lw,c=0;c<s.length;c++){var u=s[c],h=l({context:e,slice:r.desc.slice,view:o,direction:n,position:u.position,measured:i,padding:u.padding,store:a});if(h)return{bounds:h,placement:u}}return{bounds:null,placement:null}}function Hw(t){for(var e=[],n=[],i=[],r=[],s=0;s<t.length;++s){var o=t[s].desc.slice,a=Nw((o.start+o.end)/2);switch(Math.floor(a/(Math.PI/2))){case 0:e.push(t[s]);break;case 1:n.push(t[s]);break;case 2:i.push(t[s]);break;case 3:r.push(t[s])}}var l=function(t,e){return Nw((t.desc.slice.start+t.desc.slice.end)/2)-Nw((e.desc.slice.start+e.desc.slice.end)/2)},c=function(t,e){return l(e,t)};return e.sort(c),n.sort(l),i.sort(c),r.sort(l),e.concat(n,r,i)}function Bw(t,e,n){var i=e.fontFamily,r="".concat(e.fontSize,"px"),s=n.measureText({text:t,fontFamily:i,fontSize:r});return s.minReqWidth=Math.min(s.width,n.measureText({text:"".concat(t[0],"\u2026"),fontFamily:i,fontSize:r}).width),s}var Ww=/\n+|\r+|\r\n/,$w=/\s/,Uw=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function Yw(t){return"string"==typeof t?-1!==t.search(Ww):-1!==String(t).search(Ww)}function Qw(t){return-1!==t.search($w)}function Kw(t){return-1!==t.search(Uw)}function Xw(t,e,n,i,r){return i.some((function(i){return i(t,e,n)}))?1:r.some((function(i){return i(t,e,n)}))?0:2}function Zw(t){""===t[0]&&t.shift(),""===t[t.length-1]&&t.pop()}function Gw(t,e,n){return Math.max(e,Math.min(n,t))}function Jw(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.string,n=t.separator,i=void 0===n?"":n,r=t.reverse,s=void 0!==r&&r,o=t.measureText,a=void 0===o?function(t){return{width:t.length,height:1}}:o,l=t.mandatoryBreakIdentifiers,c=void 0===l?[Yw]:l,u=t.noBreakAllowedIdentifiers,h=void 0===u?[]:u,d=t.suppressIdentifier,f=void 0===d?[Qw,Yw,function(t){return""===t}]:d,p=t.hyphenationIdentifiers,y=void 0===p?[Kw]:p,g=String(e).split(i);Zw(g);var m=g.length,v=s?function(t){return t>=0}:function(t){return t<m},x=s?m:-1;function b(t){var e=Gw(t,0,m-1),n=g[e],i=a(n),r=Xw(n,e,g,c,h);return{index:e,value:n,breakOpportunity:r,suppress:f.some((function(t){return t(n,e,g)})),hyphenation:y.some((function(t){return t(n,e,g)})),width:i.width,height:i.height,done:!1}}function _(t){return isNaN(t)?s?x--:x++:x=Gw(t,0,m-1),v(x)?b(x):{done:!0}}return{next:_,peek:b,length:m}}var tk="\u2026",ek=/^\s*\d+(\.\d+)?px\s*$/i;function nk(t){return"string"===gd(t)&&ek.test(t)}function ik(t){var e=t["font-size"]||t.fontSize;return nk(e)?parseFloat(e)*Math.max(isNaN(t.lineHeight)?1.2:t.lineHeight,0):19.2}function rk(t){var e=t.maxHeight,n=Math.max(t.maxLines,1)||1/0;if(isNaN(e))return n;var i=ik(t);return Math.max(1,Math.min(Math.floor(e/i),n))}function sk(t,e){return{lines:[],line:"",width:0,maxLines:rk(t),maxWidth:t.maxWidth,hyphens:{enabled:"auto"===t.hyphens,char:"\u2010",metrics:e("\u2010")}}}function ok(t){t.lines.push(t.line),t.line="",t.width=0}function ak(t,e){t.line+=e.value,t.width+=e.width}function lk(t,e,n){if(e.width>t.maxWidth)return e;for(var i=e.index,r=1;r<5;r++){var s=n.peek(e.index-1);if(!e.hyphenation||!s.hyphenation||0===e.index)return e;if(t.width+t.hyphens.metrics.width<=t.maxWidth)return t.line+=t.hyphens.char,e;if(1===t.line.length)return e;e=n.next(i-r),t.line=t.line.slice(0,-1),t.width-=e.width}return e}function ck(t,e,n){for(var i=Jw({string:e.value,measureText:n});t.lines.length<t.maxLines;){var r=i.next();if(r.done)break;t.width+r.width>t.maxWidth&&2===r.breakOpportunity&&t.line.length>0?(r=t.hyphens.enabled?lk(t,r,i):r,ok(t),ak(t,r)):ak(t,r)}}function uk(t,e){for(var n=Jw({string:t.text,separator:"",measureText:e,noBreakAllowedIdentifiers:[function(t,e){return 0===e}]}),i=sk(t,e),r=!0;i.lines.length<i.maxLines;){var s=n.next();if(s.done){ok(i),r=!1;break}1===s.breakOpportunity?ok(i):i.width+s.width>i.maxWidth&&2===s.breakOpportunity?s.suppress?i.width+=s.width:(s=i.hyphens.enabled?lk(i,s,n):s,ok(i),ak(i,s)):ak(i,s)}return{lines:i.lines,reduced:r}}function hk(t,e){for(var n=Jw({string:t.text,separator:/(\s|-|\u2010)/,measureText:e}),i=sk(t,e),r=!0;i.lines.length<i.maxLines;){var s=n.next();if(s.done){ok(i),r=!1;break}1===s.breakOpportunity?ok(i):i.width+s.width>i.maxWidth&&2===s.breakOpportunity?s.suppress?ok(i):s.width>i.maxWidth?ck(i,s,e):(ok(i),ak(i,s)):ak(i,s)}return{lines:i.lines,reduced:r}}function dk(t){return{"break-all":uk,"break-word":hk}[t.wordBreak]}function fk(t){return function(e){var n=e.node;if(function(t){return"text"===t.type&&!t._lineBreak}(n)){var i=dk(n);if(!i)return;var r=t(n);if(r.width>n.maxWidth||Yw(n.text)){var s=(ik(n)-r.height)/2,o=i(n,function(t,e){return function(n){return e({text:n,fontSize:t.fontSize,fontFamily:t.fontFamily})}}(n,t));e.node=function(t,e,n,i){var r={type:"container",children:[]};void 0!==e.id&&(r.id=e.id);var s=0;return t.lines.forEach((function(o,a){var l=pd({},e);l.text=o,l._lineBreak=!0,s+=n,t.reduced&&a===t.lines.length-1?l.text+=tk:delete l.maxWidth,l.dy=isNaN(l.dy)?s:l.dy+s,s+=i,s+=n,r.children.push(l)})),r}(o,n,s,r.height)}}}}function pk(t,e){var n=t.text,i=t["font-size"],r=t["font-family"],s=t.maxWidth;if(n="string"==typeof n?n:"".concat(n),void 0===s)return n;var o=e({text:n,fontSize:i,fontFamily:r}).width;if(o<=s)return n;for(var a=0,l=n.length-1;a<=l;){var c=Math.floor((a+l)/2);(o=e({text:n.substr(0,c)+tk,fontSize:i,fontFamily:r}).width)<=s?a=c+1:l=c-1}return n.substr(0,l)+tk}function yk(t){var e=t.baseline||t["dominant-baseline"],n=0,i=parseInt(t.fontSize||t["font-size"],10)||0;switch(e){case"hanging":n=.75*i;break;case"text-before-edge":n=.85*i;break;case"middle":n=.25*i;break;case"central":n=.35*i;break;case"mathemetical":n=i/2;break;case"text-after-edge":case"ideographic":n=.2*-i;break;default:n=0}return n}var gk,mk={},vk={},xk={fontSize:void 0,fontFamily:void 0};function bk(t,e,n){var i=t+e+n;return"number"!=typeof vk[i]&&(gk=gk||document.createElement("canvas").getContext("2d"),function(t,e){xk.fontSize===t&&xk.fontFamily===e||(gk.font=t+" "+e,xk.fontSize=t,xk.fontFamily=e)}(e,n),vk[i]=gk.measureText(t).width),vk[i]}function _k(t){return"number"!=typeof mk[t]&&(mk[t]=function(t){if(nk(t)){var e=parseFloat(t);return e+4*Math.ceil((e+1e-12)/24)}return 16}(t)),mk[t]}function wk(t){var e=t.fontSize;return{width:bk(t.text,e,t.fontFamily),height:_k(e)}}function kk(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wk,n=t["font-size"]||t.fontSize,i=t["font-family"]||t.fontFamily,r=e({text:t.text,fontFamily:i,fontSize:n}),s=Math.min(t.maxWidth||r.width,r.width),o=t.x||0,a=t.y||0,l=t.dx||0,c=(t.dy||0)+yk(t),u={x:0,y:a+c-.75*r.height,width:s,height:r.height},h=t["text-anchor"]||t.anchor;return u.x="middle"===h?o+l-s/2:"end"===h?o+l-s:o+l,u}function Sk(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wk,n=dk(t),i=t["font-size"]||t.fontSize,r=t["font-family"]||t.fontFamily,s=e({text:t.text,fontFamily:r,fontSize:i});if(n&&(s.width>t.maxWidth||Yw(t.text))){for(var o=n(t,(function(t){return e({text:t,fontFamily:r,fontSize:i})})),a=pd({},t),l=0,c="",u=0,h=o.lines.length;u<h;u++){var d=o.lines[u],f=e({text:d+=u===h-1&&o.reduced?tk:"",fontSize:i,fontFamily:r}).width;f>=l&&(l=f,c=d)}a.text=c;var p=kk(a,e);return p.height=ik(t)*o.lines.length,p}return kk(t,e)}var Mk=.9;function Ek(t,e){return{node:t,data:t.data,scale:e.scale,formatter:e.formatter,dataset:e.dataset}}function Ck(t,e,n){var i={type:"text",text:e,maxWidth:t.width,x:0,y:t.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},r=n.textMetrics;if(t.width<n.fontSize)return!1;var s=Math.max(0,t.width-r.width);return i.x=t.x+n.align*s,i.y=t.y+r.height/1.2,i}function Tk(t){return{type:"circle",bounds:{cx:t.cx,cy:t.cy,r:t.r}}}function Ak(t){return t.desc&&t.desc.slice?function(t){var e=t.innerRadius,n=t.outerRadius,i=t.offset;return Math.abs(t.start+2*Math.PI-t.end)>1e-12?{type:null,bounds:null}:Tk({cx:i.x,cy:i.y,r:0!==e?e:n})}(t.desc.slice):"circle"===t.type?Tk(t.attrs):"rect"===t.type?{type:"rect",bounds:t.bounds}:{type:null,bounds:null}}var Rk={bar:function(t){var e=t.settings,n=t.chart,i=t.nodes,r=t.rect,s=t.renderer,o=t.style,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tw,l=pd({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},o.label);l.fontSize=parseInt(l.fontSize,10);var c=e.labels.map((function(t){return pd({},l,e,t)})),u=e.labels.map((function(t){return t.placements.map((function(n){return pd({},l,e,t,n)}))})),h=Aw({nodes:i,chart:n,renderer:s,settings:e,rect:r,labelSettings:c,placementSettings:u}),d=h.fitsHorizontally,f=h.hasHorizontalDirection,p=h.targetNodes,y=Rw({orientation:e.orientation,defaultOrientation:f?"h":"v"}),g="h"===y?"y":"x",m="h"===y?"height":"width";return p.sort((function(t,e){return t.node.localBounds[g]+t.node.localBounds[m]-(e.node.localBounds[g]+e.node.localBounds[m])})),a({chart:n,targetNodes:p,stngs:e,rect:r,fitsHorizontally:d,collectiveOrientation:y})},slice:function(t){var e=t.settings,n=t.chart,i=t.nodes,r=t.rect,s=t.renderer,o=t.style,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vw,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:qw,c=pd({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},o.label);c.fontSize=parseInt(c.fontSize,10);for(var u=e.labels.map((function(t){return pd({},c,e,t)})),h=e.labels.map((function(t){return t.placements.map((function(n){return pd({},c,e,t,n)}))})),d=[],f={insideLabelBounds:[]},p={},y=0,g=(i=Hw(i)).length;y<g;y++)for(var m=i[y],v=Fw(m,n),x=0;x<u.length;x++){var b=u[x],_="function"==typeof b.label?b.label(v,y):"";if(_){var w="function"==typeof b.direction?b.direction(v,y):b.direction||"horizontal",k="function"==typeof b.linkData?b.linkData(v,y):void 0,S=Bw(_,b,s),M=a({context:p,direction:w,lblStngs:b,measured:S,node:m,placementSettings:h[x],rect:r,store:f}),E=M.bounds,C=M.placement;if(E&&C){if("outside"===C.position&&"rotate"!==w){zw({context:p,node:m,bounds:E});var T=Iw(E);if(!Rx(T,r))continue}var A="function"==typeof C.fill?C.fill(v,y):C.fill,R=l(E,_,{fill:A,fontSize:b.fontSize,fontFamily:b.fontFamily,textMetrics:S});R&&(void 0!==k&&(R.data=k),d.push(R),E.line&&(E.line.stroke=A,d.push(E.line)))}}}return d},rows:function(t){var e=t.settings,n=t.chart,i=t.nodes,r=t.renderer,s=t.style,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ck,a=pd({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},s.label);a.fontSize=parseInt(a.fontSize,10);for(var l=pd({},a,e),c=e.labels.map((function(t){return pd({},l,t)})),u={},h=[],d=0,f=i.length;d<f;d++){var p=i[d],y=Ek(p,n),g=Ak(p),m=g.type,v=g.bounds;if(v){var x=0,b=[],_=[],w="circle"===m?2*v.r*Mk:v.height;x+=l.padding;var k=void 0;for(k=0;k<c.length;k++){var S=c[k],M="function"==typeof S.label?S.label(y,d):"";u.fontFamily=S.fontFamily,u.fontSize="".concat(S.fontSize,"px"),u.text=M;var E=r.measureText(u);if((x+=E.height+S.padding)>w)break;_.push(M),b.push(E)}var C=k,T=Math.max(0,w-x),A=void 0;for(A="circle"===m?v.cy-v.r*Mk:v.y,A+=l.justify*T+l.padding,k=0;k<C;k++){var R=c[k],N=void 0;if("circle"===m){var O=Math.max(Math.abs(A-v.cy),Math.abs(A+b[k].height-v.cy)),I=Math.sqrt(v.r*v.r-O*O);N={x:v.cx-I+l.padding,y:A,width:2*I-2*l.padding,height:b[k].height}}else N={x:v.x+l.padding,y:A,width:v.width-2*l.padding,height:b[k].height};A+=b[k].height+l.padding;var P="function"==typeof R.fill?R.fill(y,d):R.fill,D="function"==typeof R.linkData?R.linkData(y,d):void 0,j=o(N,_[k],{fill:P,align:R.align,fontSize:R.fontSize,fontFamily:R.fontFamily,textMetrics:b[k]});if(j){if(j.text&&j.text!==tk){var z=pk(j,r.measureText);if(tk===z)continue;j.ellipsed=z}void 0!==D&&(j.data=D),h.push(j)}}}}return h}},Nk={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render:function(){var t=this,e=[];return(this.settings.settings.sources||[]).forEach((function(n){n.strategy&&Rk[n.strategy.type]&&n.component&&e.push.apply(e,Id(function(t,e){var n=t.chart,i=t.source,r=t.rect,s=t.renderer,o=t.style;if(!n.component(i.component))return[];var a=n.findShapes(i.selector).filter((function(t){return t.key===i.component}));return e({chart:n,settings:i.strategy.settings,nodes:a,rect:{x:0,y:0,width:r.width,height:r.height},renderer:s,style:o})}({chart:t.chart,rect:t.rect,renderer:t.renderer,source:n,style:t.style},Rk[n.strategy.type])))})),e}},Ok={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,justify:.5,align:.5,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25},navigation:{button:{class:void 0,content:void 0,tabIndex:void 0},disabled:!1}};function Ik(t){var e,n,i,r,s,o=t.x,a=void 0===o?0:o,l=t.y,c=t.item,u=t.globalMetrics,h=t.createSymbol,d=t.direction,f=c.label.displayObject,p=c.label.bounds,y=c.symbol.meta,g="rtl"===(void 0===d?"ltr":d),m={x:g?a+u.maxLabelBounds.width:a+u.maxSymbolSize+u.spacing,y:l,width:u.maxLabelBounds.width,height:Math.max(u.maxSymbolSize,u.maxLabelBounds.height)},v=(e={x:g?a+u.maxLabelBounds.width+u.spacing:a,y:l,width:u.maxSymbolSize,height:m.height},n=y.size,i={align:void 0===y.align?.5:y.align,justify:void 0===y.justify?.5:y.justify},r=Math.max(0,e.width-n),s=Math.max(0,e.height-n),{x:e.x+n/2+i.align*r,y:e.y+n/2+i.justify*s}),x=h(pd({},y,v));return delete x.collider,f.anchor=g?"end":"start",function(t,e,n){var i=n.textMetrics;if(t.height<i.height)return!1;var r=Math.max(0,t.width-i.width);e.baseline="text-before-edge";var s=Math.max(0,t.height-i.height);e.x=t.x+n.align*r,e.y=t.y+n.justify*s+.175*parseInt(e.fontSize,10)}(m,f,{textMetrics:p,fontSize:parseInt(f.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:c.label.displayObject.data,children:[x,f],collider:{type:"rect",x:a,y:l,width:u.maxItemBounds.width,height:u.maxItemBounds.height}},metrics:m}}function Pk(t,e){var n=Math.ceil(t.items.length/e),i="horizontal"===t.layout.orientation?"width":"height";return t.globalMetrics.maxItemBounds[i]*n+(n-1)*t.layout.margin["width"===i?"horizontal":"vertical"]}function Dk(t){return Object.keys(t).filter((function(e){return t[e]})).join(" ")}var jk={up:"\u25b2",right:"\u25b6",down:"\u25bc",left:"\u25c0"};function zk(t,e){var n=e.size,i=e.isActive,r=e.direction,s=e.nav,o={},a="",l=e.attrs;s&&s.button&&("function"==typeof s.button.class?o=s.button.class({direction:r}):s.button.class&&(o=s.button.class),"function"==typeof s.button.content&&(a=s.button.content(t,{direction:r})),void 0!==s.button.tabIndex&&(l.tabindex=s.button.tabIndex));var c={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(o).length||(c.border="0",c.background="none"),(!i||s&&s.disabled)&&(l.disabled="disabled"),t("button",pd({class:Dk(o),style:c},l),[a||t("span",{style:{pointerEvents:"none"}},[jk[r]])])}function Fk(t,e,n,i){var r,s,o,a=i.itemRenderer,l=i.navigationRenderer,c=i.titleRenderer,u=i.isPreliminary,h=void 0!==u&&u,d=0,f={x:e.spacing,y:e.spacing,width:t.width-2*e.spacing,height:t.height-2*e.spacing};if(r={x:f.x,y:f.y,width:f.width,height:c.spread()},"horizontal"===n){r={x:f.x,y:f.y,width:c.extent(),height:c.spread()};var p=f.width-r.width-(r.width?e.spacing:0),y=f.height;a.parallelize(p,h?void 0:y);var g=a.extent()>p?l.extent():0,m=a.spread(),v=g?l.spread():0;o={x:(s={x:r.x+r.width+(r.width?e.spacing:0),y:f.y+Math.max(0,(v-m)/2),width:f.width-g-r.width-(g?e.spacing:0)-(r.width?e.spacing:0),height:y}).x+s.width+(g?e.spacing:0),y:f.y,width:g,height:f.height},r.y=s.y,"rtl"===a.direction()&&(o.x=f.x,s.x=o.x+o.width+(o.width?e.spacing:0),r.x=s.x+s.width+(r.width?e.spacing:0)),d=Math.max(r.height,v,a.spread())}else{var x=f.height-r.height-(r.height?e.spacing:0);a.parallelize(x,h?void 0:f.width);var b=a.extent()>x?l.extent():0;s={x:f.x,y:r.y+r.height+(r.height?e.spacing:0),width:f.width,height:f.height-r.height-(r.height?e.spacing:0)-(o={x:f.x,y:f.y+f.height-b,width:f.width,height:b}).height-(o.height?e.spacing:0)},d=Math.max(c.extent(),b?l.spread():0,a.spread())}return s=pd({},t,{x:t.x+s.x,y:t.y+s.y,width:s.width,height:s.height}),o.x+=t.x,o.y+=t.y,r.x+=t.x,r.y+=t.y,{title:pd({},t,r),content:pd({},t,s),navigation:pd({},t,o),orientation:n,preferredSize:d}}function qk(t){t.state.resolved=function(t){var e=t.scale.domain(),n={items:[]},i=t.settings.layout.dock;if("threshold-color"===t.scale.type){var r=t.scale.data().fields[0],s=function(t){return String(t)};t.settings.formatter?s=t.chart.formatter(t.settings.formatter):r&&(s=r.formatter());for(var o=0;o<e.length-1;o++){var a={value:e[o],label:"".concat(s(e[o])," - < ").concat(s(e[o+1]))};r&&(a.source={field:r.id()}),n.items.push(a)}"vertical"==("top"===i||"bottom"===i?"horizontal":"vertical")&&n.items.reverse()}else{var l=t.scale.labels?t.scale.labels():null;n.items=e.map((function(e,n){var i=t.scale.datum?pd({},t.scale.datum(e)):{value:e};return i.value=e,t.scale.label?i.label=t.scale.label(e):l&&(i.label=l[n]),i}))}var c=t.resolver.resolve({data:{fields:t.scale.data().fields},defaults:pd(!0,{},Ok.title,t.style.title),settings:t.settings.settings.title}),u=t.resolver.resolve({data:{fields:t.scale.data().fields},defaults:Ok.layout,settings:t.settings.settings.layout}),h=t.resolver.resolve({data:n,defaults:pd(!0,{},Ok.item.label,t.style.item.label),settings:(t.settings.settings.item||{}).label}),d=pd(!0,{},(t.settings.settings.item||{}).shape);void 0===d.fill&&t.settings.scale&&(d.fill={scale:t.settings.scale});var f=t.resolver.resolve({data:n,defaults:pd(!0,{},Ok.item.shape,t.style.item.shape),settings:d}),p=t.resolver.resolve({data:n,defaults:pd(!0,{},{show:Ok.item.show}),settings:{show:(t.settings.settings.item||{}).show}});function y(t,n){t.data.value=[t.data.value,e[n+1]]}return"threshold-color"===t.scale.type&&("vertical"==("top"===i||"bottom"===i?"horizontal":"vertical")?(p.items.reverse().forEach(y),p.items.reverse()):p.items.forEach(y)),{title:c,labels:h,symbols:f,items:p,layout:u}}(t),t.titleRenderer.itemize({resolved:t.state.resolved,dock:t.settings.layout.dock||"center"}),t.itemRenderer.itemize({resolved:t.state.resolved,dock:t.settings.layout.dock||"center"}),t.navigationRenderer.itemize({resolved:t.state.resolved,dock:t.settings.layout.dock||"center",navigation:t.settings.settings.navigation}),t.state.display={spacing:8}}function Lk(t){var e=t.itemRenderer,n=t.navigationRenderer,i=t.titleRenderer,r=t.settings.layout.dock,s=Fk(t.rect,t.state.display,"top"===r||"bottom"===r?"horizontal":"vertical",{itemRenderer:e,navigationRenderer:n,titleRenderer:i});t.renderer.size(s.content);var o=e.getItemsToRender({viewRect:pd({},s.content,{x:0,y:0})});return n.render({rect:s.navigation,itemRenderer:e}),i.render({rect:s.title}),t.state.views={layout:s},o}var Vk={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted:function(t){t&&t.parentNode&&(this.navigationRenderer.renderer.appendTo(t.parentNode),this.titleRenderer.renderer.appendTo(t.parentNode),t.parentNode.insertBefore(this.navigationRenderer.renderer.element(),t),t.parentNode.insertBefore(this.titleRenderer.renderer.element(),t)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount:function(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart:function(){this.state.interaction.started||this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove:function(t){if(this.state.interaction.started){var e="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*t.deltaX:t.deltaY;this.itemRenderer.scroll(e-this.state.interaction.delta),this.state.interaction.delta=e}},panend:function(){this.state.interaction.started=!1},scroll:function(t){this.itemRenderer.scroll(-t)},next:function(){this.itemRenderer.next()},prev:function(){this.itemRenderer.prev()}},created:function(){var t,e,n,i,r,s,o,a,l,c,u=this;this.state={interaction:{}},this.onScroll=function(){var t=Lk(u);u.update(t)},this.itemRenderer=(t=this,o=void 0===(s=this.onScroll)?function(){}:s,a=null,l=0,c={itemize:function(n){e=function(t,e){for(var n,i,r=t.resolved,s=t.dock,o=[],a=r.items.items,l=r.symbols.items,c=r.labels.items,u=0,h=0,d=0,f=0;f<a.length;f++)if(!1!==a[f].show){var p=void 0!==c[f].text?c[f].text:c[f].data.label||"";n=pd({},c[f],{type:"text",fontSize:"".concat(parseInt(c[f].fontSize,10),"px"),text:p,title:p}),i={symbol:{meta:l[f]},label:{displayObject:n,bounds:e.textBounds(n)}},o.push(i),u=Math.max(l[f].size,u),h=Math.max(i.label.bounds.width,h),d=Math.max(i.label.bounds.height,d)}return{items:o,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,d),width:u+8+h},maxLabelBounds:{width:h,height:d}},layout:{margin:{vertical:void 0!==r.layout.item.vertical?r.layout.item.vertical:4,horizontal:void 0!==r.layout.item.horizontal?r.layout.item.horizontal:4},mode:r.layout.item.mode,size:r.layout.item.size,orientation:"top"===s||"bottom"===s?"horizontal":"vertical",direction:r.layout.item.direction,scrollOffset:r.layout.item.scrollOffset}}}(n,t.renderer),a=isNaN(e.layout.scrollOffset)?a:e.layout.scrollOffset},getItemsToRender:function(s){l=c.getContentOverflow(i=s.viewRect);var o=c.extent();a=Math.max(0,Math.min(a,l)),r=pd({},i);var u="horizontal"===c.orientation()?"x":"y";return r[u]-=a,r["x"===u?"width":"height"]=o,function(t,e,n){for(var i=t.viewRect,r=n.itemized,s=n.create,o=void 0===s?Ik:s,a=n.parallels,l=n.createSymbol,c=r.layout.direction,u=r.globalMetrics,h=r.items,d="horizontal"===r.layout.orientation,f=0,p=[],y=u.maxItemBounds.height,g=u.maxItemBounds.width,m=r.layout.margin.vertical+y,v=r.layout.margin.horizontal+g,x=e.x,b=e.y,_=i.x-e.x,w=0;w<h.length;w++){var k=o({y:b,x:"rtl"===c?i.x+_+i.width-g-(x-e.x):x,item:h[w],globalMetrics:u,direction:c,createSymbol:l});if((d&&x>=i.x-g||!d&&b>=i.y-y)&&p.push(k.item),++f>=a?(f=0,d?(x+=v,b=e.y):(b+=m,x=e.x)):d?b+=m:x+=v,!d&&b>i.y+i.height)break;if(d&&x>i.x+i.width)break}return p}(s,r,{itemized:e,parallels:n,createSymbol:t.symbol})},parallelize:function(t,i){return n=function(t,e,n){var i=n.items.length,r="horizontal"===n.layout.orientation?"width":"height",s=Math.ceil((n.globalMetrics.maxItemBounds[r]*i+(i-1)*n.layout.margin["width"===r?"horizontal":"vertical"])/t);if(null!=e){var o="horizontal"===n.layout.orientation?"height":"width",a=n.layout.margin["width"===o?"horizontal":"vertical"]||4,l=Math.floor((e+a)/(a+n.globalMetrics.maxItemBounds[o]));s=Math.min(s,l)}var c=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,c))}(t,i,e)},hasContentOverflow:function(){var t="horizontal"===e.layout.orientation?"width":"height";return Pk(e,n)>i[t]},getContentOverflow:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,r="horizontal"===e.layout.orientation?"width":"height";return Math.max(0,Pk(e,n)-t[r])},getNextSize:function(){var t="horizontal"===e.layout.orientation?"width":"height";return e.globalMetrics.maxItemBounds[t]+e.layout.margin["width"===t?"horizontal":"vertical"]},getPrevSize:function(){var t="horizontal"===e.layout.orientation?"width":"height";return e.globalMetrics.maxItemBounds[t]+e.layout.margin["width"===t?"horizontal":"vertical"]},hasNext:function(){return"horizontal"===c.orientation()?i.x+i.width<r.x+r.width:i.y+i.height<r.y+r.height},hasPrev:function(){return"horizontal"===c.orientation()?r.x<i.x:r.y<i.y},next:function(){c.scroll(-c.getNextSize())},prev:function(){c.scroll(c.getPrevSize())},scroll:function(t){var e=Math.max(0,Math.min(l,a-t));e!==a&&(a=e,o())},offset:function(){return a},orientation:function(){return e.layout.orientation},direction:function(){return e.layout.direction},extent:function(){return Pk(e,n)},spread:function(){return function(t,e){var n="horizontal"===t.layout.orientation?"height":"width";return t.globalMetrics.maxItemBounds[n]*e+(e-1)*t.layout.margin["width"===n?"horizontal":"vertical"]}(e,n)}}),this.navigationRenderer=function(t){var e,n={itemize:function(t){var n,i;e={layout:{orientation:"top"===(i=(n=t).dock)||"bottom"===i?"vertical":"horizontal"},navigation:n.navigation}},render:function(i){return function(t,e,n,i){var r=e.itemRenderer;if(t&&t.renderArgs){t.size(e.rect);var s=t.renderArgs[0],o="vertical"===n.layout.orientation,a="rtl"===r.direction(),l=r.hasNext(),c=r.hasPrev();if(c||l){var u=o?["right","left"]:["down","up"];a&&o&&u.reverse();var h=[s("div",{style:{position:"relative",display:"flex","flex-direction":o?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:a&&!o?"rtl":"ltr"},[zk(s,{size:32,isActive:l,direction:u[0],attrs:{"data-action":"next","data-component-key":i.settings.key},nav:n.navigation}),zk(s,{size:32,isActive:c,direction:u[1],attrs:{"data-action":"prev","data-component-key":i.settings.key},nav:n.navigation})])];t.render(h)}else t.render([])}}(n.renderer,i,e,t)},extent:function(){return 32},spread:function(){return 64}};return n}(this),this.titleRenderer=function(t){var e,n={itemize:function(n){e=function(t,e){var n=t.resolved;if(!1===n.title.item.show)return null;var i=pd({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(i.anchor&&"start"!==i.anchor?"end"===i.anchor&&(i.anchor="start"):i.anchor="end"),void 0===n.title.settings.text){var r=e.scale.data().fields;i.text=r&&r[0]?r[0].title():""}return{displayObject:i,bounds:e.renderer.textBounds(i)}}(n,t)},render:function(t){!function(t,e,n){var i=t.rect;if(e){var r=[];e.size(i),n&&r.push(pd({},n.displayObject,{x:{start:0,end:i.width,middle:i.width/2}[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text})),e.render(r)}}(t,n.renderer,e)},spread:function(){return e?e.bounds.height:0},extent:function(){return e?e.bounds.width:0}};return n}(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),qk(this)},preferredSize:function(t){return function(t,e){var n=0,i=t.settings.layout.dock||"center",r=t.state.display,s=Fk(e.inner,r,"top"===i||"bottom"===i?"horizontal":"vertical",{itemRenderer:t.itemRenderer,navigationRenderer:t.navigationRenderer,titleRenderer:t.titleRenderer,isPreliminary:!0});return n+=r.spacing,(n+=s.preferredSize)+r.spacing}(this,t)},beforeUpdate:function(){qk(this)},render:function(){return Lk(this)},beforeDestroy:function(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements:function(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo:function(){return{offset:this.itemRenderer.offset()}}};function Hk(t,e){var n=0,i=t.state.isVertical?"justify":"align",r=t.state.isVertical?"y":"x",s=t.state.isVertical?"requiredHeight":"requiredWidth";n=t.state.rect[t.state.isVertical?"height":"width"]-t.state.legend.length()-t.state.title[s](),n*=Math.min(1,Math.max(t.stgns[i],0)),e[r]+=n}function Bk(t,e,n){var i=n[t];return"object"===gd(i)?-1!==i.valid.indexOf(e)?e:i.default:n.default}function Wk(t){return Bk(t.layout.dock,t.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function $k(t,e){var n={x:0,y:0,width:0,height:0},i=t.stgns.padding;return n.x=i.left,n.y=i.top,n.width=e.width-i.left-i.right,n.height=e.height-i.top-i.bottom,n}function Uk(t){var e,n="top"!==t.settings.layout.dock&&"bottom"!==t.settings.layout.dock,i=t.stgns.title,r=t.chart.scale(t.stgns.fill),s=t.chart.scale(t.stgns.major),o=function(t,e){var n=e.domain(),i=n,r=t.stgns.tick.label;return!r&&t.formatter?r=t.formatter:!r&&e.data().fields&&(r=e.data().fields[0].formatter()),"function"==typeof r&&(i=n.map(r).map(String)),n.map((function(n,r){var s=i[r];return{value:n,label:s,pos:e.norm(parseFloat(n,10)),textMetrics:t.renderer.measureText({text:s,fontSize:t.stgns.tick.fontSize,fontFamily:t.stgns.tick.fontFamily})}}))}(t,s),a=Bk((e=t.settings).layout.dock,e.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});if(void 0===i.text){var l=s.data().fields;i.text=l&&l[0]?l[0].title():""}var c=t.renderer.measureText({text:i.text,fontSize:i.fontSize,fontFamily:i.fontFamily}),u=t.renderer.textBounds({text:i.text,fontSize:i.fontSize,fontFamily:i.fontFamily,maxLines:i.maxLines,maxWidth:i.maxLengthPx,wordBreak:i.wordBreak,hyphens:i.hyphens,lineHeight:i.lineHeight}),h={isVertical:n,nodes:[],title:{anchor:Wk(t.settings),textMetrics:c,textBounds:u,requiredWidth:function(){if(!i.show)return 0;var t=u.width,e=i.maxLengthPx;return n||(t+=i.padding,e+=i.padding),Math.min(t,e,h.rect.width)},requiredHeight:function(){if(!i.show)return 0;var t=u.height;return n&&(t+=i.padding),Math.min(t,h.rect.height)}},ticks:{values:o,anchor:a,length:Math.min(Math.max.apply(Math,Id(o.map((function(t){return t.textMetrics.width})))),t.stgns.tick.maxLengthPx),requiredHeight:function(){return"top"===a?Math.max.apply(Math,Id(h.ticks.values.map((function(t){return t.textMetrics.height}))))+t.stgns.tick.padding:0},height:Math.max.apply(Math,Id(o.map((function(t){return t.textMetrics.height}))))},legend:{fillScale:r,majorScale:s,length:function(){var e=n?"height":"width",i=n?"requiredHeight":"requiredWidth",r=Math.min(h.rect[e],h.rect[e]*t.stgns.length)-h.title[i]();return Math.max(0,Math.min(r,t.stgns.maxLengthPx))}}};return h}var Yk={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize:function(t){var e=this.state;e.rect=$k(this,t.inner);var n=this.stgns.size,i=e.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=i;var r=Math.max(t.inner.width,t.inner.height);if("left"===e.ticks.anchor||"right"===e.ticks.anchor){if(e.ticks.values.reduce((function(t,e){return t+e.textMetrics.height}),0)>this.state.legend.length())return r;n+=e.ticks.length}else{if(e.ticks.length>this.state.legend.length())return r;n+=Math.max.apply(Math,Id(e.ticks.values.map((function(t){return t.textMetrics.height}))))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===e.title.anchor||"right"===e.title.anchor?Math.max(e.title.textBounds.height+i,n):Math.max(n,e.title.requiredWidth()+i)),this.state.preferredSize=n,n},created:function(){this.stgns=this.settings.settings,this.state=Uk(this)},beforeUpdate:function(t){this.stgns=t.settings.settings,this.state=Uk(this)},beforeRender:function(t){if(this.state.nodes=[],this.state.rect=$k(this,t.size),this.stgns.title.show){var e=function(t){var e=t.state,n=t.stgns,i="left"===e.ticks.anchor,r="top"===e.ticks.anchor,s=e.rect.x,o=e.rect.y,a="start";"left"===e.title.anchor?(s+=e.title.requiredWidth()-n.title.padding,o+=e.title.textMetrics.height,o+=r?e.rect.height-e.title.textBounds.height:0,a="end"):"right"===e.title.anchor?(s+=e.legend.length(),s+=n.title.padding,o+=e.title.textMetrics.height,o+=r?e.rect.height-e.title.textBounds.height:0):"top"===e.title.anchor&&(s+=i?e.rect.width:0,o+=e.title.textMetrics.height,a=i?"end":"start");var l={tag:"legend-title",type:"text",x:s,y:Math.min(o,e.rect.y+e.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:a,title:n.title.text};return Hk(t,l),l}(this);this.state.nodes.push(e)}var n,i,r,s,o,a,l,c,u,h=function(t,e){var n=t.state,i=t.stgns,r=n.rect,s=r.x,o=r.y,a=n.isVertical?i.size:n.legend.length(),l=n.isVertical?n.legend.length():i.size;"left"===n.ticks.anchor?s+=n.rect.width-i.size:"top"===n.ticks.anchor&&(o+=n.rect.height-i.size),"top"===n.title.anchor?o+=n.title.requiredHeight():"left"===n.title.anchor&&(s+=n.title.requiredWidth());var c={type:"rect",x:s,y:o,width:a,height:l,fill:{type:"gradient",stops:e,degree:n.isVertical?90:180}};return Hk(t,c),c}(this,(i=this.state.legend.majorScale,(n=this.state.legend.fillScale).domain().map((function(t){return{type:"stop",color:n(t),offset:Math.min(1,Math.max(0,i.norm(t)))}})).sort((function(t,e){return t.offset-e.offset})))),d=(a=(r=this).stgns,l="start",c={type:"rect",x:(s=h).x,y:s.y,width:(o=r.state).isVertical?0:s.width,height:o.isVertical?s.height:0,fill:"transparent"},u=o.ticks.values.map((function(t){var e=0,n=0,i=0,u="alphabetical";return o.isVertical?(n=s.y+s.height*t.pos,u=0===t.pos?"text-before-edge":"text-after-edge"):e=s.x+s.width*t.pos,"right"===o.ticks.anchor?(e=s.x+a.size+a.tick.padding,c.x=s.x+s.width):"left"===o.ticks.anchor?(e=s.x-a.tick.padding,l="end"):"top"===o.ticks.anchor?(n=s.y-a.tick.padding,i-=.25*t.textMetrics.height,l=0===t.pos?"start":"end"):"bottom"===o.ticks.anchor&&(n=s.y+s.height+a.tick.padding,i=.8*t.textMetrics.height,l=0===t.pos?"start":"end",c.y=s.y+s.height),{type:"text",x:e,y:n,dx:0,dy:i,text:t.label,fontSize:a.tick.fontSize,fontFamily:a.tick.fontFamily,fill:a.tick.fill,maxWidth:o.isVertical?a.tick.maxLengthPx:Math.min(a.tick.maxLengthPx,o.legend.length()/2),anchor:l,textBoundsFn:r.renderer.textBounds,title:t.label,baseline:u}})),{type:"container",id:"legend-seq-ticks",children:[].concat(Id(u),[c])});this.state.nodes.push({id:"legend-seq-target",type:"container",children:[h,d]})},render:function(){return this.state.nodes}},Qk={step:function(t){return new Wf(t,.5)},stepAfter:function(t){return new Wf(t,1)},stepBefore:function(t){return new Wf(t,0)},linear:wf,basis:function(t){return new Af(t)},cardinal:Of.tension(0),catmullRom:Pf,monotonex:function(t){return new qf(t)},monotoney:function(t){return new Lf(t)},natural:function(t){return new Hf(t)}},Kk={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},connect:!1,orientation:"horizontal",layers:{curve:"linear",show:!0,sort:void 0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function Xk(t,e){var n=e.generator,i=e.item,r=e.data,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=n(t),a={type:"path",d:o,opacity:i.opacity,stroke:i.stroke,strokeWidth:i.strokeWidth,strokeLinejoin:i.strokeLinejoin,fill:s||i.fill,data:r};return i.strokeDasharray&&(a.strokeDasharray=i.strokeDasharray),a}var Zk={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created:function(){},render:function(t){var e=t.data,n=this.rect,i=n.width,r=n.height;this.stngs=this.settings.settings||{};var s=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,o=function(t){var e=function(t){for(var e=t.stngs,n=t.rect,i=t.resolver,r=t.style,s=t.domain,o=n.width,a=n.height,l=i.resolve({data:t.data,defaults:Kk.coordinates,settings:e.coordinates||{},scaled:{major:"vertical"===e.orientation?a:o,minor:"vertical"===e.orientation?o:a}}),c=!e.connect&&s.length>2&&("function"==typeof e.coordinates.layerId||"object"===gd(e.coordinates.layerId)),u={},h=0,d=0;d<l.items.length;d++){var f=l.items[d],p=f.layerId;if(c){var y=u[p]?u[p].items[u[p].items.length-1]:null,g=y?s.indexOf(y.data.major?y.data.major.value:y.data.value):null;y&&s.indexOf(f.data.major?f.data.major.value:f.data.value)-1!==g&&u[p].items.push({dummy:!0})}u[p]=u[p]||{order:h++,id:p,items:[],dataItems:[],consumableData:{}},u[p].dataItems.push(f.data),u[p].items.push(f)}var m=Object.keys(u).map((function(t){return u[t].consumableData=wd({points:u[t].dataItems},u[t].dataItems[0]),u[t]})),v={items:m.map((function(t){return t.consumableData}))},x=e.layers||{};return{coordinates:l,metaLayers:m,layers:i.resolve({data:v,defaults:{curve:Kk.layers.curve,show:Kk.layers.show},settings:{curve:x.curve,show:x.show}}),lines:i.resolve({data:v,defaults:pd({},Kk.layers.line,r.line),settings:x.line}),areas:i.resolve({data:v,defaults:pd({},Kk.layers.area,r.area),settings:x.area})}}(t),n=e.coordinates,i=e.layers,r=e.lines,s=e.areas,o=[];return e.metaLayers.forEach((function(e,a){var l=i.items[a];if(!1!==l.show){l.datum=l.data,l.data=[],l.id=e.id;for(var c,u,h=[],d=[],f=0;f<e.items.length;f++){if(u=(c=e.items[f]).data,!c.dummy){if(isNaN(c.major))continue;t.missingMinor0&&(c.minor0=n.settings.minor.scale?n.settings.minor.scale(u.minor0?u.minor0.value:0):0),isNaN(c.minor)||h.push(c.minor),l.data.push(c.data)}d.push(c)}var p=h.sort((function(t,e){return t-e}))[Math.floor((h.length-1)/2)];o.push({layerObj:l,lineObj:r.items[a],areaObj:s.items[a],median:p,points:d,consumableData:e.consumableData})}})),o}({data:e,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:s,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){var a=o.map((function(t){return{id:t.layerObj.id,data:t.layerObj.data}})).sort(this.stngs.layers.sort).map((function(t){return t.id}));o.sort((function(t,e){return a.indexOf(t.layerObj.id)-a.indexOf(e.layerObj.id)}))}else o.sort((function(t,e){return t.median-e.median}));return function(t,e){var n=e.width,i=e.height,r=e.missingMinor0,s=e.stngs,o=[],a=s.layers||{};return t.forEach((function(t){var e,l,c=t.lineObj,u=t.layerObj,h=t.areaObj,d=t.points,f=function(){var t=kf,e=null,n=Jd(0),i=Sf,r=Jd(!0),s=null,o=wf,a=null;function l(l){var c,u,h,d,f,p=l.length,y=!1,g=new Array(p),m=new Array(p);for(null==s&&(a=o(f=Gd())),c=0;c<=p;++c){if(!(c<p&&r(d=l[c],c,l))===y)if(y=!y)u=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),h=c-1;h>=u;--h)a.point(g[h],m[h]);a.lineEnd(),a.areaEnd()}y&&(g[c]=+t(d,c,l),m[c]=+n(d,c,l),a.point(e?+e(d,c,l):g[c],i?+i(d,c,l):m[c]))}if(f)return a=null,f+""||null}function c(){return function(){var t=kf,e=Sf,n=Jd(!0),i=null,r=wf,s=null;function o(o){var a,l,c,u=o.length,h=!1;for(null==i&&(s=r(c=Gd())),a=0;a<=u;++a)!(a<u&&n(l=o[a],a,o))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+t(l,a,o),+e(l,a,o));if(c)return s=null,c+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:Jd(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Jd(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Jd(!!t),o):n},o.curve=function(t){return arguments.length?(r=t,null!=i&&(s=r(i)),o):r},o.context=function(t){return arguments.length?(null==t?i=s=null:s=r(i=t),o):i},o}().defined(r).curve(o).context(s)}return l.x=function(n){return arguments.length?(t="function"==typeof n?n:Jd(+n),e=null,l):t},l.x0=function(e){return arguments.length?(t="function"==typeof e?e:Jd(+e),l):t},l.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Jd(+t),l):e},l.y=function(t){return arguments.length?(n="function"==typeof t?t:Jd(+t),i=null,l):n},l.y0=function(t){return arguments.length?(n="function"==typeof t?t:Jd(+t),l):n},l.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Jd(+t),l):i},l.lineX0=l.lineY0=function(){return c().x(t).y(n)},l.lineY1=function(){return c().x(t).y(i)},l.lineX1=function(){return c().x(e).y(n)},l.defined=function(t){return arguments.length?(r="function"==typeof t?t:Jd(!!t),l):r},l.curve=function(t){return arguments.length?(o=t,null!=s&&(a=o(s)),l):o},l.context=function(t){return arguments.length?(null==t?s=a=null:a=o(s=t),l):s},l}(),p=s.coordinates?s.coordinates.defined:null,y={size:i,p:"y"},g={size:n,p:"x"};if("vertical"===s.orientation){var m=pd(!0,{},g);g=pd(!0,{},y),y=pd(!0,{},m)}f[g.p]((function(t){return t.major*g.size}))["".concat(y.p,"1")]((function(t){return t.minor*y.size}))["".concat(y.p,"0")]((function(t){return t.minor0*y.size})).curve(Qk["monotone"===u.curve?"monotone".concat(g.p):u.curve]),f.defined(p?function(t){return!t.dummy&&"number"==typeof t.minor&&!isNaN(t.minor)&&t.defined}:function(t){return!t.dummy&&"number"==typeof t.minor&&!isNaN(t.minor)});var v=s.connect?d.filter(f.defined()):d;e=f["line".concat(y.p.toUpperCase(),"1")](),l=f["line".concat(y.p.toUpperCase(),"0")](),a.area&&!1!==h.show&&o.push(Xk(v,{data:t.consumableData,item:h,generator:f})),c&&!1!==c.show&&(o.push(Xk(v,{data:t.consumableData,item:c,generator:e},"none")),!r&&a.area&&!1!==h.show&&!1!==c.showMinor0&&o.push(Xk(v,{data:t.consumableData,item:c,generator:l},"none")))})),o}(o,{width:i,height:r,missingMinor0:s,stngs:this.stngs})}};function Gk(t,e){var n,i,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"===gd(e.center)?(n=e.center.x,i=e.center.y):(n=e.clientX,i=e.clientY);var s=n-t.state.boundingRect.left,o=i-t.state.boundingRect.top;return{x:r?Math.max(0,Math.min(s,t.rect.width)):s,y:r?Math.max(0,Math.min(o,t.rect.height)):o}}function Jk(t,e){return{x:e.x+t.rect.x,y:e.y+t.rect.y}}function tS(t,e){var n=Math.min(t.x,e.x),i=Math.min(t.y,e.y);return{x:n,y:i,width:Math.max(t.x,e.x)-n,height:Math.max(t.y,e.y)-i}}var eS={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart:function(t){this.start(t)},areaMove:function(t){this.move(t)},areaEnd:function(t){this.end(t)},areaCancel:function(){this.cancel()}},created:function(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:function(){return 0},render:function(){},start:function(t){this.state.boundingRect=this.renderer.element().getBoundingClientRect();var e=Gk(this,t,!1);Ux({x:0,y:0,width:this.rect.width,height:this.rect.height},e)&&(this.state.brushConfig=this.settings.settings.brush.components.map((function(t){return{key:t.key,contexts:t.contexts,data:t.data,action:t.action||"set"}})),this.state.start=Gk(this,t),this.state.active=!0)},move:function(t){var e;this.state.active&&(this.state.end=Gk(this,t),function(t){if(t.state.active){var e=Jk(t,t.state.start),n=Jk(t,t.state.end),i=t.chart.shapesAt(tS(e,n),{components:t.state.brushConfig});t.chart.brushFromShapes(i,{components:t.state.brushConfig})}}(this),(e=this).renderer.render([pd({type:"rect"},tS(e.state.start,e.state.end),e.style.area)]))},end:function(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel:function(){var t;this.state.active&&(t=this.chart,this.state.brushConfig.forEach((function(e){Array.isArray(e.contexts)&&e.contexts.forEach((function(e){t.brush(e).end()}))})),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function nS(t,e,n){var i=n.renderer,r=n.style,s=n.props,o=n.h,a=function(t,e){return{tooltip:"function"==typeof t.tooltipClass?t.tooltipClass({dock:e.dock}):t.tooltipClass,content:"function"==typeof t.contentClass?t.contentClass({dock:e.dock}):t.contentClass,arrow:"function"==typeof t.arrowClass?t.arrowClass({dock:e.dock}):t.arrowClass}}(s,e),l=function(t,e,n,i){return i.content({h:t,style:n,data:e})}(o,t,r,s),c=o("div",{dir:s.direction,class:Dk(pd({"pic-tooltip":!0},a.tooltip)),style:pd({position:"relative",display:"inline-block"},e.computedTooltipStyle)},o("div",{style:r.content,class:Dk(pd({"pic-tooltip-content":!0},a.content))},l),o("div",{class:Dk(pd({"pic-tooltip-arrow":!0},a.arrow)),style:pd({},r.arrow,r["arrow-".concat(e.dock)],e.computedArrowStyle)}));return i.render(c),i.element().children[0]}function iS(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-t,"px)"),right:"translate(".concat(t,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-t,"px)"),bottom:"translate(-50%, ".concat(t,"px)")}}function rS(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-t-n,y:-e/2},right:{x:n,y:-e/2},top:{x:-t/2,y:-e-n},bottom:{x:-t/2,y:n}}}function sS(t){return{left:{left:"100%",top:"calc(50% - ".concat(t,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-t,"px"),top:"calc(50% - ".concat(t,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% - ".concat(t,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% - ".concat(t,"px)"),top:"".concat(2*-t,"px"),borderWidth:"".concat(t,"px")}}}function oS(t,e,n,i,r,s){var o=e+s.x,a=n+s.y;return!(o<0||a<0||o+i>t.width||a+r>t.height)}function aS(t){var e=t.area,n=t.width,i=t.height,r=t.offset,s=t.vx+r.x,o=t.vy+r.y,a=s<0?-s:0,l=o<0?-o:0;return{x:a+=s+n>e.width?-(s+n-e.width):0,y:l+=o+i>e.height?-(o+i-e.height):0}}function lS(t){var e=t.options,n=t.width,i=t.height,r=t.dockOrder,s=t.x,o=t.y,a=t.pointer.targetBounds,l=iS(e.offset),c=l[e.dock];if(c)return{computedTooltipStyle:{left:"".concat(s,"px"),top:"".concat(o,"px"),transform:c},computedArrowStyle:sS(e.offset)[e.dock],dock:e.dock};for(var u={width:"target"===e.area?a.width:window.innerWidth,height:"target"===e.area?a.height:window.innerHeight},h=rS(n,i,e.offset),d=[],f="target"===e.area?s:a.left+s,p="target"===e.area?o:a.top+o,y=0;y<r.length;y+=1){var g=r[y],m=aS({area:u,vx:f,vy:p,width:n,height:i,offset:h[g]}),v={left:"".concat(s,"px"),top:"".concat(o,"px"),transform:l[g]},x=sS(e.offset)[g];0!==m.x&&(v.width="".concat(n-20-Math.abs(m.x),"px"),"top"!==g&&"bottom"!==g||(v.left="".concat(s+m.x,"px"),x.left="calc(50% ".concat(m.x>0?"-":"+"," ").concat(Math.abs(m.x),"px)")));var b={computedTooltipStyle:v,computedArrowStyle:x,dock:g,rect:{width:n,height:i}};if(0===m.x&&0===m.y)return b;b.offset=m,d.push(b)}return d.sort((function(t,e){return Math.abs(t.offset.x)-Math.abs(e.offset.x)})),d[0]}function cS(t,e,n){var i=t.key?n.component(t.key):n.componentsFromPoint({x:e.clientX,y:e.clientY})[0];if(!i)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};var r=i.rect;return pd({scaleRatio:r.scaleRatio},r.computedInner)}var uS,hS={bounds:function(t){var e=t.width,n=t.height,i=t.options,r=t.pointer.targetBounds,s=t.resources.getNodeBoundsRelativeToTarget(t.nodes[0]),o=s.x,a=s.y,l=s.width,c=s.height,u={left:{x:o,y:a+c/2},right:{x:o+l,y:a+c/2},top:{x:o+l/2,y:a},bottom:{x:o+l/2,y:a+c}},h=iS(i.offset),d=h[i.dock];if(d)return{computedTooltipStyle:{left:"".concat(u[i.dock].x,"px"),top:"".concat(u[i.dock].y,"px"),transform:d},computedArrowStyle:sS(i.offset)[i.dock],dock:i.dock};for(var f={width:"target"===i.area?r.width:window.innerWidth,height:"target"===i.area?r.height:window.innerHeight},p=rS(e,n,i.offset),y=["top","left","right","bottom"],g=0;g<y.length;g+=1){var m=y[g];if(oS(f,"target"===i.area?u[m].x:r.left+u[m].x,"target"===i.area?u[m].y:r.top+u[m].y,e,n,p[m]))return{computedTooltipStyle:{left:"".concat(u[m].x,"px"),top:"".concat(u[m].y,"px"),transform:h[m]},computedArrowStyle:sS(i.offset)[m],dock:m}}return{computedTooltipStyle:{left:"".concat(u.top.x,"px"),top:"".concat(u.top.y,"px"),transform:h.top},computedArrowStyle:sS(i.offset).top,dock:"top"}},pointer:function(t){var e=t.pointer;return lS({x:e.x,y:e.y,pointer:e,width:t.width,height:t.height,options:t.options,dockOrder:["top","left","right","bottom"]})},slice:function(t){var e=t.options,n=t.pointer,i=t.width,r=t.height,s=t.nodes[0],o=n.dx,a=n.dy,l=t.resources.getComponentBoundsFromNode(s),c=a+l.y+l.height/2,u=s.desc.slice,h=u.outerRadius,d=(u.start+u.end)/2-Math.PI/2,f=2*Math.PI,p=(d%f+f)%f,y=["top","left","right","bottom"];return"auto"===e.dock&&(y=p<=Math.PI/4||p>=7*Math.PI/4?["right","top","bottom","left"]:p<=3*Math.PI/4?["bottom","left","right","top"]:p<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),lS({x:o+l.x+l.width/2+h*l.scaleRatio.x*Math.cos(p),y:c+h*l.scaleRatio.y*Math.sin(p),pointer:n,width:i,height:r,options:e,dockOrder:y})}};function dS(){uS=null}function fS(t,e){var n=e.state,i=0,r=0;t.center?(i+=t.center.x,r+=t.center.y):(i+=t.clientX,r+=t.clientY);var s=e.chart.element.getBoundingClientRect(),o=n.targetElement.getBoundingClientRect(),a=i,l=r,c=i-s.left,u=r-s.top;return{x:i-=o.left,y:r-=o.top,dx:s.left-o.left,dy:s.top-o.top,cx:c,cy:u,clientX:a,clientY:l,targetBounds:o,chartBounds:s}}var pS={require:["chart","renderer"],defaultSettings:{settings:{duration:8e3,delay:500,filter:function(t){return t.filter((function(t){return t.data&&void 0!==t.data.value}))},extract:function(t){return t.node.data.value},content:function(t){var e=t.h;return t.data.map((function(t){return e("div",{},t)}))},isEqual:function(t,e){return t.length&&t.length===e.length&&t.every((function(t,n){return e[n]&&JSON.stringify(t.data)===JSON.stringify(e[n].data)}))},placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0},style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide:function(){this.hide()},show:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(t,e)},prevent:function(t){this.prevent(t)}},hide:function(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show:function(t){var e,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.nodes,s=i.duration,o=i.delay;!this.state.prevent&&this.state.targetElement&&(this.state.pointer=fS(t,this),e=Array.isArray(r)?this.props.filter(r):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,e)||(this.dispatcher.clear(),this.state.activeNodes=e,this.state.activeNodes.length&&this.dispatcher.invoke((function(){return n.invokeRenderer(n.state.activeNodes)}),s,o)))},prevent:function(t){this.state.prevent=!!t},init:function(t){var e,n,i,r,s,o,a,l,c,u=this;this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=t.settings,this.dispatcher=(n=(e={defaultDuration:this.props.duration,defaultDelay:this.props.delay}).defaultDuration,i=e.defaultDelay,r=null,s=null,o=!1,a=function(){var t=function(){},e={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};return t.set=function(t){e[t].forEach((function(e){return e(t)}))},t.on=function(t,n){Array.isArray(t)?t.forEach((function(t){return e[t].push(n)})):e[t].push(n)},t.destroy=function(){Object.keys(e).forEach((function(t){e[t].length=0}))},t}(),c=function(){r=null,s=null,o=!1,a.set("fulfilled")},(l=function(){}).invoke=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout((function(){t(),o=!0,r=null,a.set("active")}),l),e>0&&(s&&clearTimeout(s),s=setTimeout(c,e+Math.max(l,0)))},l.clear=function(){o?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),s&&clearTimeout(s),r=null,s=null,o=!1},l.on=function(t,e){a.on(t,e)},l.destroy=function(){l.clear(),a.destroy()},l);var h=this.dispatcher.clear;this.dispatcher.on("pending",(function(){uS&&uS!==h&&uS(),uS=h,"function"==typeof u.props.beforeShow&&u.props.beforeShow.call(void 0,{resources:{formatter:u.chart.formatter,scale:u.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(function(){var t={resources:{formatter:u.chart.formatter,scale:u.chart.scale}};"function"==typeof u.props.beforeHide&&u.props.beforeHide.call(void 0,pd({element:u.state.tooltipElm},t)),"function"==typeof u.props.onHide?u.props.onHide.call(void 0,pd({element:u.state.tooltipElm},t)):u.renderer.clear([]),"function"==typeof u.props.afterHide&&u.props.afterHide.call(void 0,t),uS===h&&(uS=null),u.state.tooltipElm=void 0})),this.dispatcher.on("active",(function(){"function"==typeof u.props.afterShow&&u.props.afterShow.call(void 0,{element:u.state.tooltipElm,resources:{formatter:u.chart.formatter,scale:u.chart.scale}})}))},created:function(){this.init(this.settings)},beforeUpdate:function(t){var e=t.settings;this.dispatcher&&(this.dispatcher.destroy(),dS()),this.init(e)},render:function(t){return this.h=t,[]},beforeDestroy:function(){this.dispatcher.destroy(),dS()},appendTo:function(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;var t=this.state.targetElement.getBoundingClientRect(),e=t.width,n=t.height;this.renderer.destroy(),this.renderer.size({width:e,height:n}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted:function(){this.appendTo()},updated:function(){this.appendTo()},invokeRenderer:function(t){var e=function(t,e){var n=e.chart,i=e.props,r={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:e.scale,h:e.h},s=[];return t.forEach((function(t){if("function"==typeof i.extract){var e=pd({node:t},r);s.push(i.extract(e))}})),s}(t,this),n=function(t,e){var n=e.chart,i=e.state,r=e.props,s={resources:{formatter:n.formatter,scale:n.scale,component:n.component,getComponentBoundsFromNode:function(t){return cS(t,i.pointer,n)},getNodeBoundsRelativeToTarget:function(t){return function(t,e,n){var i=cS(t,e,n),r=t.bounds;return{x:i.x+e.dx+r.x,y:i.y+e.dy+r.y,width:r.width,height:r.height}}(t,i.pointer,n)}},nodes:i.activeNodes,pointer:i.pointer,width:t.width,height:t.height},o=gd(r.placement);if("object"===o&&"function"==typeof r.placement.fn)return r.placement.fn(s);var a={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===o&&(a=pd(a,r.placement(s))),"object"===o&&hS[r.placement.type]?a=pd(a,r.placement):"string"===o&&hS[r.placement]&&(a=pd(a,{type:r.placement})),s.options=a;var l=hS[a.type](s),c=s.resources.getComponentBoundsFromNode(s.nodes[0]),u=c.x,h=c.y,d=c.width,f=c.height;return d+=u+=s.pointer.dx,f+=h+=s.pointer.dy,l.computedTooltipStyle.left="".concat(Math.min(Math.max(0,u,parseFloat(l.computedTooltipStyle.left)),d),"px"),l.computedTooltipStyle.top="".concat(Math.min(Math.max(0,h,parseFloat(l.computedTooltipStyle.top)),f),"px"),l}(nS(e,{style:{left:"0px",top:"0px",visibility:"hidden"}},this).getBoundingClientRect(),this);this.state.tooltipElm=nS(e,n,this)}},yS={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update:function(){this.draw()}},draw:function(){var t=this,e=this.chart.findShapes(this.props.selector).filter((function(e){return e.key===t.props.target})).filter((function(t){return t.collider})).map((function(t){return t.collider}));e.forEach((function(e){e.fill=t.props.fill,e.stroke=t.props.stroke,e.opacity=t.props.opacity,e.collider={type:null}})),this.renderer.render(e)},created:function(){this.props=this.settings.settings},resize:function(t){return this.props.useOuterRect?t.outer:t.inner},render:function(){},mounted:function(){this.draw()},updated:function(){this.props=this.settings.settings,this.draw()}},gS=2*Math.PI;function mS(t,e,n,i){return Math.abs(t.x+n.x-(e.x+e.x))+Math.abs(t.y+n.y-(e.y+e.y))+Math.abs(e.x+i.x-(n.x+n.x))+Math.abs(e.y+i.y-(n.y+n.y))}function vS(t,e){return{x:.5*(t.x+e.x),y:.5*(t.y+e.y)}}function xS(t,e,n,i,r){var s=1-t;return Math.pow(s,3)*e+3*Math.pow(s,2)*t*n+3*s*Math.pow(t,2)*i+Math.pow(t,3)*r}function bS(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(s<1||mS(t,e,n,i)<=10)return r[r.length-1]!==t&&r.push(t),r.push(i),r;var o=.5,a=vS(t,e),l=vS(e,n),c=vS(n,i),u={x:xS(o,t.x,e.x,n.x,i.x),y:xS(o,t.y,e.y,n.y,i.y)},h=vS(a,l),d=vS(l,c);return bS(t,a,h,u,r,s-1),bS(u,d,c,i,r,s-1),r}function _S(t,e,n){var i=function(t,e,n){return{cp1:{x:t.x+2/3*(e.x-t.x),y:t.y+2/3*(e.y-t.y)},cp2:{x:n.x+2/3*(e.x-n.x),y:n.y+2/3*(e.y-n.y)}}}(t,e,n);return bS(t,i.cp1,i.cp2,n)}function wS(t,e,n){var i,r,s,o,a=[],l=!!t[4],c=!!t[5],u=t[3],h=t[6],d=t[7],f=t[1],p=t[2];if("a"===t[0]&&(h+=e,d+=n),e===d&&n===d)return a;if(!f||!p)return a.push({x:h,y:d}),a;var y=function(t,e,n,i,r,s,o,a,l){var c,u,h,d,f,p,y=lx(n%360),g=Math.cos(y),m=Math.sin(y),v=(a-s)/2,x=(l-o)/2,b=g*v+m*x,_=g*x-m*v;t=Math.abs(t),e=Math.abs(e),(p=Math.pow(b,2)/Math.pow(t,2)+Math.pow(_,2)/Math.pow(e,2))>1&&(t*=p=Math.sqrt(p),e*=p);var w=t*e,k=t*_,S=e*b,M=Math.pow(k,2)+Math.pow(S,2),E=Math.pow(w,2)-M,C=Math.sqrt(Math.max(E/M,0));i===r&&(C=-C);var T=C*(k/e),A=C*(-S/t);d=g*T-m*A+(a+s)/2,f=m*T+g*A+(l+o)/2;var R=(-b-T)/t,N=(-_-A)/e;return c=Math.atan2((_-A)/e,(b-T)/t),c+=c<0?gS:0,u=Math.atan2(N,R),h=(u+=u<0?gS:0)-c,!r&&c<u?h-=gS:r&&u<c&&(h+=gS),{startAngle:c,sweepAngle:h%=gS,cx:d,cy:f,rx:t,ry:e}}(f,p,u,l,c,h,d,e,n);i=y.cx,r=y.cy,f=y.rx,p=y.ry,s=y.sweepAngle,o=y.startAngle;for(var g=Math.abs(s*Math.sqrt((Math.pow(f,2)+Math.pow(p,2))/2)),m=Math.ceil(g/10),v=s/m,x=1;x<=m;x++){var b=(o+v*x)%gS,_=Math.cos(b),w=Math.sin(b);a.push({x:i+_*f+-w*_,y:r+w*p+_*w})}return a}function kS(t){for(var e=sd(t),n=[],i=[],r=0,s=0,o=null,a=null,l=null,c=null,u=0;u<e.length;++u){var h=e[u],d=h[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(o=null,a=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":i.length&&n.push(i.splice(0));case"l":i.push({x:r+=h[1],y:s+=h[2]});break;case"M":i.length&&n.push(i.splice(0));case"L":i.push({x:r=h[1],y:s=h[2]});break;case"H":i.push({x:r=h[1],y:s});break;case"h":i.push({x:r+=h[1],y:s});break;case"V":i.push({x:r,y:s=h[1]});break;case"v":i.push({x:r,y:s+=h[1]});break;case"a":i.push.apply(i,Id(wS(h,r,s))),r+=h[6],s+=h[7];break;case"A":i.push.apply(i,Id(wS(h,r,s))),r=h[6],s=h[7];break;case"c":i.push.apply(i,Id(bS({x:r,y:s},{x:h[1]+r,y:h[2]+s},{x:h[3]+r,y:h[4]+s},{x:h[5]+r,y:h[6]+s}))),o=h[3]+r,a=h[4]+s,r+=h[5],s+=h[6];break;case"C":i.push.apply(i,Id(bS({x:r,y:s},{x:h[1],y:h[2]},{x:h[3],y:h[4]},{x:h[5],y:h[6]}))),o=h[3],a=h[4],r=h[5],s=h[6];break;case"s":null!==o&&null!==o||(o=r,a=s),i.push.apply(i,Id(bS({x:r,y:s},{x:2*r-o,y:2*s-a},{x:h[1]+r,y:h[2]+s},{x:h[3]+r,y:h[4]+s}))),o=h[1]+r,a=h[2]+s,r+=h[3],s+=h[4];break;case"S":null!==o&&null!==o||(o=r,a=s),i.push.apply(i,Id(bS({x:r,y:s},{x:2*r-o,y:2*s-a},{x:h[1],y:h[2]},{x:h[3],y:h[4]}))),o=h[1],a=h[2],r=h[3],s=h[4];break;case"Q":i.push.apply(i,Id(_S({x:r,y:s},{x:h[1],y:h[2]},{x:h[3],y:h[4]}))),l=h[1],c=h[2],r=h[3],s=h[4];break;case"q":i.push.apply(i,Id(_S({x:r,y:s},{x:h[1]+r,y:h[2]+s},{x:h[3]+r,y:h[4]+s}))),l=h[1]+r,c=h[2]+s,r+=h[3],s+=h[4];break;case"T":null!==l&&null!==l||(l=r,c=s),i.push.apply(i,Id(_S({x:r,y:s},{x:l=2*r-l,y:c=2*s-c},{x:h[1],y:h[2]}))),r=h[1],s=h[2];break;case"t":null!==l&&null!==l||(l=r,c=s),i.push.apply(i,Id(_S({x:r,y:s},{x:l=2*r-l,y:c=2*s-c},{x:h[1]+r,y:h[2]+s}))),r+=h[1],s+=h[2];break;case"z":case"Z":i.length&&i.push({x:i[0].x,y:i[0].y})}}return function(t){for(var e=0;e<t.length-1;e++){var n=t[e],i=t[e+1];Math.abs(n.x-i.x)<1e-12&&Math.abs(n.y-i.y)<1e-12&&(t.splice(e,1),e--)}}(i),n.push(i.splice(0)),n}var SS={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update:function(){this.draw()}},draw:function(){var t=this,e=this.chart.findShapes("path").filter((function(e){return e.key===t.props.target})),n=[];e.forEach((function(e){kS(e.attrs.d).forEach((function(e){e.forEach((function(e){n.push({type:"circle",cx:e.x,cy:e.y,r:t.props.radius,fill:t.props.fill,stroke:t.props.stroke,opacity:t.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(n)},created:function(){this.props=this.settings.settings},resize:function(t){return this.props.useOuterRect?t.outer:t.inner},render:function(){},mounted:function(){this.draw()},updated:function(){this.props=this.settings.settings,this.draw()}},MS=[function(t){t.component("box",Jb),t.component("box-marker",Jb)},function(t){t.component("point",s_),t.component("point-marker",s_)},function(t){t.component("pie",l_)},function(t){t.component("grid-line",f_)},function(t){t.component("ref-line",b_)},function(t){t.component("axis",P_)},function(t){t.component("container",D_)},function(t){t.component("text",F_)},function(t){t.component("scrollbar",V_)},function(t){t.component("brush-range",nw),t.component("brush-area-dir",sw)},function(t){t.component("range",lw)},function(t){t.component("brush-lasso",pw)},function(t){t.component("labels",Nk)},function(t){t.component("legend-cat",Vk)},function(t){t.component("legend-seq",Yk)},function(t){t.component("line",Zk)},function(t){t.component("brush-area",eS)},function(t){t.component("tooltip",pS)},function(t){t.component("debug-collider",yS)},function(t){t.component("debug-path-to-points",SS)}],ES=function(){function t(e){md(this,t),this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}return xd(t,[{key:"detach",value:function(){return this._parent&&this._parent.removeChild(this),this}},{key:"parent",get:function(){return this._parent}},{key:"isBranch",get:function(){return this._children&&this._children.length}},{key:"children",get:function(){return this._children}},{key:"ancestors",get:function(){var t;return this._ancestors||(this._ancestors=[],this.parent&&(t=this._ancestors).push.apply(t,[this.parent].concat(Id(this.parent.ancestors)))),this._ancestors}},{key:"descendants",get:function(){var t,e,n=[],i=this.children.length;for(t=0;t<i;t++)n.push(e=this.children[t]),e.children.length&&n.push.apply(n,Id(e.descendants));return n}},{key:"equals",value:function(t){var e=this.children,n=t.children;if(e.length!==n.length)return!1;for(var i=0;i<e.length;i++)if(!e[i].equals(n[i]))return!1;return!0}},{key:"toJSON",value:function(){return{type:this.type,children:this.children.map((function(t){return t.toJSON()}))}}}]),t}(),CS=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.x,i=void 0===n?0:n,r=e.y,s=void 0===r?0:r,o=e.width,a=void 0===o?0:o,l=e.height,c=void 0===l?0:l,u=e.minWidth,h=void 0===u?0:u,d=e.minHeight,f=void 0===d?0:d;md(this,t),this.set({x:i,y:s,width:a,height:c,minWidth:h,minHeight:f})}return xd(t,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x,n=void 0===e?0:e,i=t.y,r=void 0===i?0:i,s=t.width,o=void 0===s?0:s,a=t.height,l=void 0===a?0:a,c=t.minWidth,u=void 0===c?0:c,h=t.minHeight,d=void 0===h?0:h;this.type="rect",o>=0?(this.x=n,this.width=Math.max(o,u)):(this.x=n+Math.min(o,-u),this.width=-Math.min(o,-u)),l>=0?(this.y=r,this.height=Math.max(l,d)):(this.y=r+Math.min(l,-d),this.height=-Math.min(l,-d))}},{key:"containsPoint",value:function(t){return Ux(this,t)}},{key:"intersectsLine",value:function(t){return Yx(this,Bd(t))}},{key:"intersectsRect",value:function(t){return Wx(this,Hd(t))}},{key:"intersectsCircle",value:function(t){return Fx(t,this)}},{key:"intersectsPolygon",value:function(t){return Bx(t,this)}},{key:"intersectsGeoPolygon",value:function(t){return eb(t,this)}},{key:"points",value:function(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}]),t}(),TS=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.cx,i=void 0===n?0:n,r=e.cy,s=void 0===r?0:r,o=e.r,a=void 0===o?0:o,l=e.minRadius,c=void 0===l?0:l;md(this,t),this.set({cx:i,cy:s,r:a,minRadius:c})}return xd(t,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.cx,n=void 0===e?0:e,i=t.cy,r=void 0===i?0:i,s=t.r,o=void 0===s?0:s,a=t.minRadius,l=void 0===a?0:a;this.type="circle",this.cx=n,this.cy=r,this.r=Math.max(o,l),this.vector={x:this.cx,y:this.cy}}},{key:"containsPoint",value:function(t){return zx(this,t)}},{key:"intersectsLine",value:function(t){return qx(this,Bd(t))}},{key:"intersectsRect",value:function(t){return Fx(this,Hd(t))}},{key:"intersectsCircle",value:function(t){return function(t,e){if(Ix(t)||Ix(e))return!1;var n=t.cy-e.cy;return Math.pow(t.cx-e.cx,2)+Math.pow(n,2)<=Math.pow(t.r+e.r,2)}(this,t)}},{key:"intersectsPolygon",value:function(t){return Lx(this,t)}},{key:"intersectsGeoPolygon",value:function(t){return Gx(this,t)}},{key:"points",value:function(){return[{x:this.cx,y:this.cy}]}}]),t}(),AS=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.x1,i=void 0===n?0:n,r=e.y1,s=void 0===r?0:r,o=e.x2,a=void 0===o?0:o,l=e.y2,c=void 0===l?0:l,u=e.tolerance,h=void 0===u?0:u;md(this,t),this.set({x1:i,y1:s,x2:a,y2:c,tolerance:h})}return xd(t,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x1,n=void 0===e?0:e,i=t.y1,r=void 0===i?0:i,s=t.x2,o=void 0===s?0:s,a=t.y2,l=void 0===a?0:a,c=t.tolerance,u=void 0===c?0:c;this.type="line",this.x1=n,this.y1=r,this.x2=o,this.y2=l,this.tolerance=Math.max(0,Math.round(u)),this.vectors=this.points(),this.zeroSize=n===o&&r===l}},{key:"containsPoint",value:function(t){return this.tolerance>0?qx({cx:t.x,cy:t.y,r:this.tolerance},this):Kx(this,t)}},{key:"intersectsLine",value:function(t){return Qx(this,Bd(t))}},{key:"intersectsRect",value:function(t){return Yx(Hd(t),this)}},{key:"intersectsCircle",value:function(t){return qx(t,this)}},{key:"intersectsPolygon",value:function(t){return Hx(t,this)}},{key:"intersectsGeoPolygon",value:function(t){return tb(t,this)}},{key:"points",value:function(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}]),t}();function RS(t){var e=t[0],n=t[t.length-1];e.x===n.x&&e.y===n.y||t.push(e)}function NS(t){for(var e=0;e<t.length-1;e++){var n=t[e],i=t[e+1];n.x===i.x&&n.y===i.y&&(t.splice(e,1),e--)}}var OS=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.vertices,i=void 0===n?[]:n;md(this,t),this.set({vertices:i})}return xd(t,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.vertices,n=void 0===e?[]:e;if(this.type="polygon",this.vertices=n.slice(),this.edges=[],NS(this.vertices),!(this.vertices.length<=2)){RS(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(var i=0;i<this.vertices.length;i++)i<this.vertices.length-1&&this.edges.push([this.vertices[i],this.vertices[i+1]]),this.xMin=isNaN(this.xMin)?this.vertices[i].x:Math.min(this.xMin,this.vertices[i].x),this.xMax=isNaN(this.xMax)?this.vertices[i].x:Math.max(this.xMax,this.vertices[i].x),this.yMin=isNaN(this.yMin)?this.vertices[i].y:Math.min(this.yMin,this.vertices[i].y),this.yMax=isNaN(this.yMax)?this.vertices[i].y:Math.max(this.yMax,this.vertices[i].y);this._bounds=null,this._boundingRect=null}}},{key:"containsPoint",value:function(t){return Vx(this,t)}},{key:"intersectsCircle",value:function(t){return Lx(t,this)}},{key:"intersectsLine",value:function(t){return Hx(this,Bd(t))}},{key:"intersectsRect",value:function(t){return Bx(this,Hd(t))}},{key:"intersectsPolygon",value:function(t){return Xx(this,t)}},{key:"intersectsGeoPolygon",value:function(t){return Zx(t,this)}},{key:"points",value:function(){return this.vertices}},{key:"bounds",value:function(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}},{key:"boundingRect",value:function(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}]),t}();function IS(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(OS,e)}function PS(t){var e=t[0],n=t[t.length-1];e.x===n.x&&e.y===n.y||t.push(e)}function DS(t){for(var e=0;e<t.length-1;e++){var n=t[e],i=t[e+1];n.x===i.x&&n.y===i.y&&(t.splice(e,1),e--)}}var jS=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.vertices,i=void 0===n?[[]]:n;md(this,t),this.set({vertices:i})}return xd(t,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.vertices,n=void 0===e?[]:e;this.type="geopolygon",this.vertices=n.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(var i=0;i<this.numPolygons;i++)DS(this.vertices[i]),this.vertices[i].length>2&&PS(this.vertices[i]),this.polygons[i]=IS({vertices:this.vertices[i]}),this.xMin=isNaN(this.xMin)?this.polygons[i].xMin:Math.min(this.xMin,this.polygons[i].xMin),this.xMax=isNaN(this.xMax)?this.polygons[i].xMax:Math.max(this.xMax,this.polygons[i].xMax),this.yMin=isNaN(this.yMin)?this.polygons[i].yMin:Math.min(this.yMin,this.polygons[i].yMin),this.yMax=isNaN(this.yMax)?this.polygons[i].yMax:Math.max(this.yMax,this.polygons[i].yMax);this._bounds=null,this._boundingRect=null}},{key:"containsPoint",value:function(t){return Jx(this,t)}},{key:"intersectsCircle",value:function(t){return Gx(t,this)}},{key:"intersectsLine",value:function(t){return tb(this,Bd(t))}},{key:"intersectsRect",value:function(t){return eb(this,Hd(t))}},{key:"intersectsPolygon",value:function(t){return Zx(this,t)}},{key:"intersectsGeoPolygon",value:function(t){return n=t,!!Wx(i=(e=this).boundingRect(),r=n.boundingRect())&&($x(r,i)?jx(n,e):jx(e,n));var e,n,i,r}},{key:"points",value:function(){return this.vertices}},{key:"bounds",value:function(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}},{key:"boundingRect",value:function(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}]),t}();function zS(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(jS,e)}function FS(t,e){return t.x!==e.x||t.y!==e.y}var qS=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.points,i=void 0===n?[]:n;md(this,t),this.set({points:i})}return xd(t,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.points,n=void 0===e?[]:e;if(this.type="polyline",this.segments=[],this._points=n.slice(),this._points.length>1)for(var i=0,r=this._points.length-1;i<r;i++)FS(this._points[i],this._points[i+1])&&this.segments.push({x1:this._points[i].x,y1:this._points[i].y,x2:this._points[i+1].x,y2:this._points[i+1].y})}},{key:"containsPoint",value:function(t){return this.segments.some((function(e){return Kx(e,t)}))}},{key:"intersectsCircle",value:function(t){return this.segments.some((function(e){return qx(t,e)}))}},{key:"intersectsLine",value:function(t){var e=Bd(t);return this.segments.some((function(t){return Qx(t,e)}))}},{key:"intersectsRect",value:function(t){var e=Hd(t);return this.segments.some((function(t){return Yx(e,t)}))}},{key:"intersectsPolygon",value:function(t){return this.segments.some((function(e){return Hx(t,e)}))}},{key:"intersectsGeoPolygon",value:function(t){return this.segments.some((function(e){return tb(t,e)}))}},{key:"points",value:function(){return this._points}}]),t}(),LS=Xf();function VS(t,e){return LS.get(t)(e)}LS.add("rect",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(CS,e)})),LS.add("circle",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(TS,e)})),LS.add("line",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(AS,e)})),LS.add("polygon",IS),LS.add("geopolygon",zS),LS.add("polyline",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(qS,e)}));var HS=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];md(this,t),this.set(e)}return xd(t,[{key:"set",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach((function(e){var n=VS(e.type,e);n&&t.geometries.push(n)}))}},{key:"containsPoint",value:function(t){return this.geometries.some((function(e){return e.containsPoint(t)}))}},{key:"intersectsLine",value:function(t){return this.geometries.some((function(e){return e.intersectsLine(t)}))}},{key:"intersectsRect",value:function(t){return this.geometries.some((function(e){return e.intersectsRect(t)}))}},{key:"intersectsCircle",value:function(t){return this.geometries.some((function(e){return e.intersectsCircle(t)}))}},{key:"intersectsPolygon",value:function(t){return this.geometries.some((function(e){return e.intersectsPolygon(t)}))}},{key:"intersectsGeoPolygon",value:function(t){return this.geometries.some((function(e){return e.intersectsGeoPolygon(t)}))}}]),t}(),BS=function(){function t(){md(this,t),this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}return xd(t,[{key:"clone",value:function(){return(new t).multiply(this)}},{key:"set",value:function(t){return this._elements=t,this}},{key:"save",value:function(){return this._stack.push(this.elements),this}},{key:"restore",value:function(){return this._stack.length&&(this._elements=this._stack.pop()),this}},{key:"add",value:function(t){var e,n;for(e=0;e<this._elements.length;e++)for(n=0;n<this._elements[e].length;n++)this._elements[e][n]+=t;return this}},{key:"translate",value:function(t,e){return this.multiply([[1,0,t],[0,1,e],[0,0,1]]),this}},{key:"rotate",value:function(t){var e=Math.cos(-t),n=Math.sin(-t);return this.multiply([[e,n,0],[-n,e,0],[0,0,1]]),this}},{key:"multiply",value:function(e){var n,i,r,s;if(e instanceof t&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],n=0;n<this._elements.length;n++)for(i=0;i<this._elements[n].length;i++)for(s=0;s<3;s++)r[n][i]+=this._elements[n][s]*e[s][i];this._elements=r}else for(n=0;n<this._elements.length;n++)for(i=0;i<this._elements[n].length;i++)this._elements[n][i]*=e;return this}},{key:"scale",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.multiply([[t,0,0],[0,e,0],[0,0,1]]),this}},{key:"transform",value:function(t,e,n,i,r,s){return this.multiply([[t,n,r],[e,i,s],[0,0,1]]),this}},{key:"determinant",value:function(){var t=this._elements[0][0],e=this._elements[0][1],n=this._elements[0][2],i=this._elements[1][0],r=this._elements[1][1],s=this._elements[1][2],o=this._elements[2][0],a=this._elements[2][1],l=this._elements[2][2];return t*r*l+e*s*o+n*i*a-n*r*o-e*i*l-t*s*a}},{key:"invert",value:function(){var t=this.determinant(),e=this._elements[0][0],n=this._elements[0][1],i=this._elements[0][2],r=this._elements[1][0],s=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[s*c-o*l,i*l-n*c,n*o-i*s],[o*a-r*c,e*c-i*a,i*r-e*o],[r*l-s*a,a*n-e*l,e*s-n*r]],this.multiply(1/t),this}},{key:"transpose",value:function(){var t=Object.create(this._elements);return this._elements=[[t[0][0],t[1][0],t[2][0]],[t[0][1],t[1][1],t[2][1]],[t[0][2],t[1][2],t[2][2]]],this}},{key:"identity",value:function(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}},{key:"toString",value:function(){return"".concat(this._elements.map((function(t){return t.join("\t")})).join("\n"))}},{key:"isIdentity",value:function(){var t=this._elements;return 1===t[0][0]&&0===t[0][1]&&0===t[0][2]&&0===t[1][0]&&1===t[1][1]&&0===t[1][2]&&0===t[2][0]&&0===t[2][1]&&1===t[2][2]}},{key:"transformPoint",value:function(t){var e,n,i=[t.x,t.y,1],r=this._elements,s=[0,0,0];for(e=0;e<this._elements.length;e++)for(n=0;n<this._elements[e].length;n++)s[e]+=i[n]*r[e][n];return{x:s[0],y:s[1]}}},{key:"transformPoints",value:function(t){var e,n,i,r,s,o=this._elements,a=[];for(r=0;r<t.length;r++){for(e=[t[r].x,t[r].y,1],s=[0,0,0],n=0;n<this._elements.length;n++)for(i=0;i<this._elements[n].length;i++)s[n]+=e[i]*o[n][i];a.push({x:s[0],y:s[1]})}return a}},{key:"elements",get:function(){var t=this._elements;return[[t[0][0],t[0][1],t[0][2]],[t[1][0],t[1][1],t[1][2]],[t[2][0],t[2][1],t[2][2]]]}}]),t}(),WS=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function $S(t,e){var n=e.args[0]*(Math.PI/180);if(e.args.length>2){var i=e.args[1],r=e.args[2];t.translate(i,r),t.rotate(n),t.translate(-i,-r)}else 1===e.args.length&&t.rotate(n)}function US(t,e){var n=e.args[0],i=isNaN(e.args[1])?e.args[0]:e.args[1];t.scale(n,i)}function YS(t,e){var n=e.args[0],i=isNaN(e.args[1])?0:e.args[1];t.translate(n,i)}function QS(t,e){e.args.length>=6&&t.transform.apply(t,Id(e.args))}function KS(t,e){for(var n,i=function(t){for(var e,n=[];null!==(e=WS.exec(t));){var i=e[2].trim(),r=-1===i.indexOf(",")?i.split(" "):i.split(",");n.push({cmd:e[1],args:r.filter((function(t){return t.trim().length>0})).map((function(t){return Number(t)}))})}return n}(t),r=0,s=i.length;r<s;r++)"rotate"===(n=i[r]).cmd?$S(e,n):"scale"===n.cmd?US(e,n):"matrix"===n.cmd?QS(e,n):"translate"===n.cmd&&YS(e,n)}var XS={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},ZS={type:function(t,e){return e.filter((function(e){var n=e.type;return!!n&&n.toLowerCase()===t.toLowerCase()}))},attr:function(t,e,n,i){return i.filter((function(i){var r=i.attrs[t];if(!e)return void 0!==r;if(void 0===r)return!1;switch(e){case"=":return n===String(r);case"!=":return n!==String(r);default:return!1}}))},universal:function(t){return t},tag:function(t,e){return e.filter((function(e){var n=e.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(t.replace(".",""))}))}};function GS(t,e,n){var i=t.type,r=t.points();n&&(r=r.every((function(t){return Array.isArray(t)}))?r.map((function(t){return n.transformPoints(t)})):n.transformPoints(r)),function(t,e){for(var n=0,i=t.length;n<i;n++)t[n].x/=e,t[n].y/=e}(r,e);var s=null;if("rect"===i||"bounds"===i)(s=Hd(r)).type=i;else if("circle"===i)(s=function(t,e){return{cx:t[0].x,cy:t[0].y,r:e}}(r,t.r)).type=i;else if("line"===i)(s=Bd(r)).type=i;else if("polygon"===i||"polyline"===i)s={type:"path",d:ox(r,"polygon"===i)};else if("geopolygon"===i){for(var o="",a=0;a<r.length;a++)o+=ox(r[a],!0);s={type:"path",d:o}}return s}var JS=function(){function t(e){var n=this;md(this,t),this._bounds=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0},i=n.x,r=n.y,s=n.width,o=n.height;return{x:i,y:r,width:s,height:o}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=function(){return function(t,e){if(t.collider){var n=t.modelViewMatrix;return"collection"===t.colliderType?{type:"container",children:t.collider.geometries.map((function(t){return GS(t,e,n)}))}:GS(t.collider,e,n)}return null}(e,n._dpi)},this._desc=e.desc,this._tag=e.tag,this._children=function(){return e.children.map((function(e){return new t(e)}))},this._parent=function(){return e.parent?new t(e.parent):null},this._cache={elementBoundingRect:null},this._getElementBoundingRect=function(){return!n._cache.elementBoundingRect&&n.element&&(n._cache.elementBoundingRect=n.element.getBoundingClientRect()),n._cache.elementBoundingRect||{left:0,top:0}}}return xd(t,[{key:"children",get:function(){return this._children()}},{key:"parent",get:function(){return this._parent()}},{key:"type",get:function(){return this._type}},{key:"data",get:function(){return this._data}},{key:"attrs",get:function(){return this._attrs}},{key:"element",get:function(){return this._element},set:function(t){this._cache.elementBoundingRect=null,this._element=t}},{key:"key",get:function(){return this._key},set:function(t){this._key=t}},{key:"bounds",get:function(){var t=this._bounds();return t.x/=this._dpi,t.y/=this._dpi,t.width/=this._dpi,t.height/=this._dpi,t}},{key:"localBounds",get:function(){return this._bounds(!1)}},{key:"boundsRelativeTo",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=gd(t),i=e?this.bounds:this.localBounds,r=this._getElementBoundingRect(),s=r.left,o=r.top;if("object"===n&&null!==t&&"function"==typeof t.getBoundingClientRect){var a=t.getBoundingClientRect(),l=a.left,c=void 0===l?0:l,u=a.top,h=void 0===u?0:u;s-=c,o-=h}return i.x+=s,i.y+=o,i}},{key:"collider",get:function(){return this._collider()}},{key:"desc",get:function(){return this._desc}},{key:"tag",get:function(){return this._tag}}]),t}();function tM(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(JS,e)}var eM=function(){function t(e){md(this,t),this._node=tM(e),this._parent=null,this._input=null}return xd(t,[{key:"node",get:function(){return this._node}},{key:"parent",get:function(){return this._parent},set:function(t){this._parent=t}},{key:"input",get:function(){return this._input},set:function(t){this._input=t}}]),t}();function nM(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(eM,e)}function iM(t,e){var n=t.parent;if(n&&"stage"!==n.type){e.parent=nM(n);var i=n.parent;i&&"stage"!==i.type&&iM(i,e.parent)}}function rM(t,e,n){if(null===t.colliderType)return null;var i=function(t,e){var n={};if(t.modelViewMatrix)if(Array.isArray(e))n=t.inverseModelViewMatrix.transformPoints(e);else if(isNaN(e.r))Array.isArray(e.vertices)?n.vertices=t.inverseModelViewMatrix.transformPoints(e.vertices):n=t.inverseModelViewMatrix.transformPoint(e);else{var i=t.inverseModelViewMatrix.transformPoint({x:e.cx,y:e.cy});n.cx=i.x,n.cy=i.y,n.r=e.r}else n=e;return Array.isArray(n.vertices)&&(n=n.vertices.every((function(t){return Array.isArray(t)}))?zS(n):IS(n)),n}(t,n);return"frontChild"===t.colliderType?function(t,e,n){for(var i=t.descendants.length-1;i>=0;i--){var r=t.descendants[i];if(null!==r.collider&&r.collider[e](n)){var s=nM(r);return iM(r,s),s}}return null}(t,e,i):function(t,e,n){if(t.collider[e](n)){var i=nM(t);return iM(t,i),i}return null}(t,e,i)}function sM(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=Wd(t),i={};switch(n){case"circle":return i.cx=t.cx*e,i.cy=t.cy*e,i.r=t.r,["intersectsCircle",i];case"rect":return["intersectsRect",i=Vd(t).map((function(t){return dx(t,e)}))];case"line":return["intersectsLine",i=Ld(t).map((function(t){return dx(t,e)}))];case"point":return["containsPoint",i=dx(t,e)];case"polygon":return i.vertices=t.vertices.map((function(t){return dx(t,e)})),["intersectsPolygon",i];case"geopolygon":return i.vertices=t.vertices.map((function(t){return t.map((function(t){return dx(t,e)}))})),["intersectsGeoPolygon",i];default:return[]}}function oM(t,e){var n=Od(sM(e,t.dpi),2);return function t(e,n,i){for(var r=e.length,s=0;s<r;s++){var o=e[s];if(null!==rM(o,n,i))return!0;if(o.children&&!o.collider)return t(o.children,n,i)}return!1}([t],n[0],n[1])}var aM=function(t){kd(n,t);var e=Rd(n);function n(t){var i;return md(this,n),(i=e.call(this,t))._stage=null,i._collider={type:null,definition:null,fn:null},i._attrs={},i._node=null,i}return xd(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=t;var e=t.data,n=t.desc,i=t.tag,r=t.strokeReference,s=t.fillReference;sx(this.attrs,t),void 0!==e&&(this.data=e),"object"===gd(n)&&(this.desc=pd(!0,{},n)),"string"==typeof i&&(this.tag=i),"string"==typeof r&&(this.strokeReference=r),"string"==typeof s&&(this.fillReference=s)}},{key:"findShapes",value:function(t){return function(t,e){var n,i,r=[],s=[];if(e.isBranch){var o;n=function(t){var e,n,i,r,s=[];return t.split(/\s*,\s*/).forEach((function(t){t=t.trim(),e=[];for(var o=function(s){(i=t.match(XS[s]))&&(r=!0,t=t.slice(i[0].length),n={type:s,value:i[0]},"attr"===s&&(i=i[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),n.attribute=i[1],n.operator=i[2],n.attributeValue=i[3]),e.push(n))};t&&(r=!1,(i=t.match(/^\s*([>+~]|\s)\s*/))&&(r=!0,e.push({type:" ",value:i[0]}),t=t.slice(i[0].length)),Object.keys(XS).forEach(o),e&&e.length&&s.indexOf(e)<0&&s.push(e),r););})),s}(t),i=e.descendants;for(var a=function(t,e){o=n[t];var r=[],a=i.slice(),l=!1;o.reverse().forEach((function(t){if(" "===t.type)return r.push(a),a=i.slice(),void(l=!1);a=function(t,e){if(!e||!e.length||!t||"function"!=typeof ZS[t.type])return[];switch(t.type){case"type":return ZS[t.type](t.value,e);case"attr":return ZS[t.type](t.attribute,t.operator,t.attributeValue,e);case"universal":return ZS[t.type](e);case"tag":return ZS[t.type](t.value,e);default:return[]}}(t,a),l=!0})),l&&r.push(a);var c=r[0].filter((function(t){for(var e,n=t.parent,i=1;i<r.length;i++){for(e=r[i].indexOf(n);n&&e<0;)e=r[i].indexOf(n=n.parent);if(e<0)return!1}return!0}));s.push(c)},l=0,c=n.length;l<c;l++)a(l);for(var u=0,h=s.length;u<h;u++)for(var d=0,f=s[u].length;d<f;d++)r.indexOf(s[u][d])<0&&r.push(s[u][d])}return r||[]}(t,this).map((function(t){return tM(t)}))}},{key:"getItemsFrom",value:function(t){return function(t,e){var n=Od(sM(e,t.dpi),2),i=n[0],r=[];return i&&(function t(e,n,i,r){for(var s=e.length,o=0;o<s;o++){var a=e[o],l=rM(a,n,r);l&&i.push(l),!a.children||l||a.collider||t(a.children,n,i,r)}}([t],i,r,n[1]),function(t,e){for(var n=0,i=e.length;n<i;n++)e[n].input=t}(e,r)),r}(this,t)}},{key:"containsPoint",value:function(t){return oM(this,t)}},{key:"intersectsLine",value:function(t){return oM(this,t)}},{key:"intersectsRect",value:function(t){return oM(this,t)}},{key:"intersectsCircle",value:function(t){return oM(this,t)}},{key:"intersectsPolygon",value:function(t){return oM(this,t)}},{key:"intersectsGeoPolygon",value:function(t){return oM(this,t)}},{key:"resolveLocalTransform",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new BS;void 0!==this.attrs.transform&&KS(this.attrs.transform,t),this.modelViewMatrix=t.clone()}},{key:"resolveGlobalTransform",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new BS,e=this.ancestors;if(e.length>0)for(var n=e.length-1;n>=0;n--)e[n].resolveLocalTransform(t),t=e[n].modelViewMatrix;this.resolveLocalTransform(t)}},{key:"attr",value:function(t){return this.attrs[t]}},{key:"equals",value:function(t){var e=this.attrs,i=Object.keys(e),r=t.attrs,s=Object.keys(r);if(i.length!==s.length)return!1;for(var o=0;o<i.length;o++){var a=i[o];if(!Object.hasOwnProperty.call(r,a))return!1;if(e[a]!==r[a])return!1}return Nd(Sd(n.prototype),"equals",this).call(this,t)}},{key:"toJSON",value:function(){var t=Nd(Sd(n.prototype),"toJSON",this).call(this);return t.attrs=this.attrs,t}},{key:"attrs",get:function(){return this._attrs}},{key:"stage",get:function(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}},{key:"modelViewMatrix",get:function(){return this._mvm},set:function(t){this._mvm=t,this._imvm=null}},{key:"inverseModelViewMatrix",get:function(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}},{key:"node",get:function(){return this._node},set:function(t){this._node=t}},{key:"collider",get:function(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(HS,e)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=VS("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=VS(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn},set:function(t){var e=Array.isArray(t)?"collection":t&&t.type;return"string"!=typeof e?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===e&&null!==this._collider.fn?(this._collider.fn.set(t),void(this._collider.definition=t)):(this._collider.type=e,void(this._collider.definition=t))}},{key:"colliderType",get:function(){return this._collider.type}}]),n}(ES),lM=function(t){kd(n,t);var e=Rd(n);function n(){return md(this,n),e.apply(this,arguments)}return xd(n,[{key:"addChild",value:function(t){if(!(t&&t instanceof ES))throw new TypeError("Expecting a Node as argument, but got ".concat(t));if(t===this)throw new Error("Can not add itself as child!");if(t._children&&t._children.length&&this.ancestors.indexOf(t)>=0)throw new Error("Can not add an ancestor as child!");return t._parent&&t._parent!==this&&t._parent.removeChild(t),this._children.push(t),t._parent=this,t._ancestors=null,this}},{key:"addChildren",value:function(t){var e,n=t?t.length:0;for(e=0;e<n;e++)this.addChild(t[e]);return this}},{key:"removeChild",value:function(t){var e=this._children.indexOf(t);return e>=0&&(this._children.splice(e,1),t._parent=null,t._ancestors=null),this}},{key:"removeChildren",value:function(t){var e,n;if(!this._children)return this;if(t)for(n=t.length,e=0;e<n;e++)this.removeChild(t[e]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}]),n}(ES),cM=lM.prototype,uM=function(t){kd(n,t);var e=Rd(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};md(this,n);var r=i.type,s=void 0===r?"container":r;return(t=e.call(this,s)).set(i),t}return xd(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Nd(Sd(n.prototype),"set",this).call(this,t);var e=t.collider,i=pd({type:null},e);this.collider=i,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"appendChildRect",value:function(t,e){if(void 0!==t.bounds){var n=this.__boundingRect[e]||{},i=Od(t.bounds(e),3),r=i[0],s=i[2],o=r.x,a=r.y,l=s.x,c=s.y,u=isNaN(n.width)?l:Math.max(l,n.width+n.x),h=isNaN(n.height)?c:Math.max(c,n.height+n.y);n.x=isNaN(n.x)?o:Math.min(o,n.x),n.y=isNaN(n.y)?a:Math.min(a,n.y),n.width=u-n.x,n.height=h-n.y,this.__boundingRect[e]=n}}},{key:"boundingRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];for(var e=this.children.length,n=0;n<e;n++)this.appendChildRect(this.children[n],t);return this.__boundingRect[t]=pd({x:0,y:0,width:0,height:0},this.__boundingRect[t]),this.__boundingRect[t]}},{key:"bounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[t])return this.__bounds[t];var e=this.boundingRect(t);return this.__bounds[t]=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],this.__bounds[t]}},{key:"addChild",value:function(t){var e=cM.addChild.call(this,t);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(t,!0);var n=pd({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=n}return e}},{key:"addChildren",value:function(t){var e=cM.addChildren.call(this,t),n=t.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(var i=0;i<n;i++)this.appendChildRect(t[i],!0);var r=pd({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=r}return e}},{key:"removeChild",value:function(t){t._stage=null;var e,n=t.descendants,i=n?n.length:0;for(e=0;e<i;e++)n[e]._stage=null;if(cM.removeChild.call(this,t),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};var r=pd(this.boundingRect(!0),{type:"bounds"});this.collider=r}return this}},{key:"removeChildren",value:function(t){if(cM.removeChildren.call(this,t),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};var e=pd(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}]),n}(aM);function hM(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(uM,e)}var dM=function(t){kd(n,t);var e=Rd(n);function n(t){var i;return md(this,n),(i=e.call(this,"stage"))._stage=Td(i),i._dpiRatio=t||1,i}return xd(n,[{key:"dpi",get:function(){return this._dpiRatio}}]),n}(uM),fM=lM.prototype,pM=["x1","x2","y1","y2","id","offset","style"],yM=function(t){kd(n,t);var e=Rd(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};md(this,n);var r=i.type,s=void 0===r?"container":r;return(t=e.call(this,s)).set(i),t._boundingRect={},t}return xd(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Nd(Sd(n.prototype),"set",this).call(this,t);for(var e=this.attrs,i="",r=0,s=pM.length;r!==s;r++)void 0!==t[i=pM[r]]&&(e[i]=t[i])}},{key:"addChild",value:function(t){return fM.addChild.call(this,t)}},{key:"addChildren",value:function(t){return fM.addChildren.call(this,t)}},{key:"removeChild",value:function(t){t._stage=null;var e,n=t.descendants,i=n?n.length:0;for(e=0;e<i;e++)n[e]._stage=null;return fM.removeChild.call(this,t),this}},{key:"removeChildren",value:function(t){return fM.removeChildren.call(this,t),this}}]),n}(aM);function gM(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(yM,e)}var mM=lM.prototype,vM=["patternUnits","x","y","width","height","id"],xM=function(t){kd(n,t);var e=Rd(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};md(this,n);var r=i.type,s=void 0===r?"container":r;return(t=e.call(this,s)).set(i),t._boundingRect={},t}return xd(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Nd(Sd(n.prototype),"set",this).call(this,t);for(var e=this.attrs,i="",r=0,s=vM.length;r!==s;r++)void 0!==t[i=vM[r]]&&(e[i]=t[i])}},{key:"addChild",value:function(t){return mM.addChild.call(this,t)}},{key:"addChildren",value:function(t){return mM.addChildren.call(this,t)}},{key:"removeChild",value:function(t){t._stage=null;var e,n=t.descendants,i=n?n.length:0;for(e=0;e<i;e++)n[e]._stage=null;return mM.removeChild.call(this,t),this}},{key:"removeChildren",value:function(t){return mM.removeChildren.call(this,t),this}}]),n}(aM),bM=function(t){kd(n,t);var e=Rd(n);function n(){var t,i;return md(this,n),(t=i=e.call(this,"rect")).set.apply(t,arguments),i}return xd(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x,i=void 0===e?0:e,r=t.y,s=void 0===r?0:r,o=t.width,a=void 0===o?0:o,l=t.height,c=void 0===l?0:l,u=t.rx,h=void 0===u?0:u,d=t.ry,f=void 0===d?0:d,p=t.collider,y=pd({type:"rect",x:i,y:s,width:a,height:c},p);Nd(Sd(n.prototype),"set",this).call(this,t),a>=0?(this.attrs.x=i,this.attrs.width=a):(this.attrs.x=i+a,this.attrs.width=-a),c>=0?(this.attrs.y=s,this.attrs.height=c):(this.attrs.y=s+c,this.attrs.height=-c),h>0&&(this.attrs.rx=h),f>0&&(this.attrs.ry=f),this.collider=y,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];var e=Vd(this.attrs),n=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(e):e,i=qd(n),r=Od(i,4),s=r[0],o=r[1],a=r[2],l=r[3];return this.__boundingRect[t]={x:s,y:o,width:a-s,height:l-o},this.__boundingRect[t]}},{key:"bounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[t])return this.__bounds[t];var e=this.boundingRect(t);return this.__bounds[t]=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],this.__bounds[t]}}]),n}(aM),_M=function(t){kd(n,t);var e=Rd(n);function n(){var t,i;return md(this,n),(t=i=e.call(this,"circle")).set.apply(t,arguments),i}return xd(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.cx,i=void 0===e?0:e,r=t.cy,s=void 0===r?0:r,o=t.r,a=void 0===o?0:o,l=t.collider,c=pd({type:"circle",cx:i,cy:s,r:a},l);Nd(Sd(n.prototype),"set",this).call(this,t),this.attrs.cx=i,this.attrs.cy=s,this.attrs.r=a,this.collider=c,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];var e=this.bounds(t);return this.__boundingRect[t]={x:e[0].x,y:e[0].y,width:e[2].x-e[0].x,height:e[2].y-e[0].y},this.__boundingRect[t]}},{key:"bounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[t])return this.__bounds[t];var e=this.attrs,n=e.cx,i=e.cy,r=e.r,s=e.r,o=n-r,a=i-s,l=2*r,c=2*s,u=[{x:o,y:a},{x:o+l,y:a},{x:o+l,y:a+c},{x:o,y:a+c}];if(t&&this.modelViewMatrix){var h=qd(u=this.modelViewMatrix.transformPoints(u)),d=Od(h,4),f=d[0],p=d[1],y=d[2],g=d[3];this.__bounds[t]=[{x:f,y:p},{x:f+(l=y-f),y:p},{x:f+l,y:p+(c=g-p)},{x:f,y:p+c}]}else this.__bounds[t]=u;return this.__bounds[t]}}]),n}(aM),wM=function(t){kd(n,t);var e=Rd(n);function n(){var t,i;return md(this,n),(t=i=e.call(this,"line")).set.apply(t,arguments),i}return xd(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x1,i=void 0===e?0:e,r=t.y1,s=void 0===r?0:r,o=t.x2,a=void 0===o?0:o,l=t.y2,c=void 0===l?0:l,u=t.collider;Nd(Sd(n.prototype),"set",this).call(this,t),this.attrs.x1=i,this.attrs.y1=s,this.attrs.x2=a,this.attrs.y2=c;var h={type:"line",x1:i,y1:s,x2:a,y2:c};this.collider=pd(h,u),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];var e=Ld(this.attrs);t&&this.modelViewMatrix&&(e=this.modelViewMatrix.transformPoints(e));var n=qd(e),i=Od(n,4),r=i[0],s=i[1],o=i[2],a=i[3],l=r!==o||s!==a;return this.__boundingRect[t]={x:r,y:s,width:l?Math.max(1,o-r):0,height:l?Math.max(1,a-s):0},this.__boundingRect[t]}},{key:"bounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[t])return this.__bounds[t];var e=this.boundingRect(t);return this.__bounds[t]=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],this.__bounds[t]}}]),n}(aM),kM=Math.PI/2;function SM(t,e){var n=Math.atan2(e.y-t.y,e.x-t.x);return n<0?n+2*Math.PI:n}function MM(t,e,n){return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}}function EM(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=[],r=[];if("h"===n.forceOrientation){var s=t[0].x<t[1].x?-1:1,o=t[t.length-1].x>t[t.length-2].x?1:-1;t.unshift({x:t[0].x+s,y:t[0].y}),t.push({x:t[t.length-1].x+o,y:t[t.length-1].y})}else if("v"===n.forceOrientation){var a=t[0].y<t[1].y?-1:1,l=t[t.length-1].y>t[t.length-2].y?1:-1;t.unshift({x:t[0].x,y:t[0].y+a}),t.push({x:t[t.length-1].x,y:t[t.length-1].y+l})}for(var c=t.length-1,u=1;u<c;u++){var h=t[u-1],d=t[u],f=t[u+1],p=SM(d,h),y=SM(d,f),g=(p+y)/2,m=g+Math.PI,v=Math.max(g,m),x=Math.min(g,m),b=p>y;if(1===u){var _=SM(h,d);i.push(MM(h,_-kM,e)),r.unshift(MM(h,_+kM,e))}var w=b?v:x,k=b?x:v;if(i.push(MM(d,w,e)),r.unshift(MM(d,k,e)),u===c-1){var S=SM(f,d);i.push(MM(f,S+kM,e)),r.unshift(MM(f,S-kM,e))}}return{type:"polygon",vertices:[].concat(i,r)}}function CM(t){for(var e,n=[],i=t.length,r=0;r<i;r++){e=t[r];for(var s=0;s<e.length;s++)n.push(e[s])}return n}function TM(t){if(t.length<2)return!1;var e=t[0],n=t[t.length-1];return Math.abs(e.x-n.x)<1e-12&&Math.abs(e.y-n.y)<1e-12}var AM=function(t){kd(n,t);var e=Rd(n);function n(){var t,i;return md(this,n),(t=i=e.call(this,"path")).set.apply(t,arguments),i}return xd(n,[{key:"set",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Nd(Sd(n.prototype),"set",this).call(this,e),this.segments=[],this.points=[],this.attrs.d=e.d,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"===gd(e.collider)&&void 0!==e.collider.type)this.collider=e.collider;else if(e.d){if(this.segments=kS(e.d),this.segments.length>1&&this.segments.every((function(t){return TM(t)})))return void(this.collider=pd({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((function(n){n.length<=1||(t.collider=TM(n)?pd({type:"polygon",vertices:n},e.collider):"object"===gd(e.collider)&&e.collider.visual?EM(n,t.attrs["stroke-width"]/2,e.collider):pd({type:"polyline",points:n},e.collider))}))}}},{key:"boundingRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];this.points.length||(this.segments=this.segments.length?this.segments:kS(this.attrs.d),this.points=CM(this.segments));var e=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,n=qd(e),i=Od(n,4),r=i[0],s=i[1],o=i[2],a=i[3];return this.__boundingRect[t]={x:r||0,y:s||0,width:o-r||0,height:a-s||0},this.__boundingRect[t]}},{key:"bounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[t])return this.__bounds[t];var e=this.boundingRect(t);return this.__bounds[t]=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],this.__bounds[t]}}]),n}(aM);function RM(t){return null!=t.data&&(t._boundingRect||t._textBoundsFn)}var NM=function(t){kd(n,t);var e=Rd(n);function n(){var t,i;return md(this,n),(t=i=e.call(this,"text")).set.apply(t,arguments),i}return xd(n,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x,i=void 0===e?0:e,r=t.y,s=void 0===r?0:r,o=t.dx,a=void 0===o?0:o,l=t.dy,c=void 0===l?0:l,u=t.textBoundsFn,h=t.text,d=t.title,f=t.collider,p=t.boundingRect,y=t.ellipsed;Nd(Sd(n.prototype),"set",this).call(this,t),this.attrs.x=i,this.attrs.y=s,this.attrs.dx=a,this.attrs.dy=c,this.attrs.text=h,void 0!==d&&(this.attrs.title=String(d)),"object"===gd(p)?this._textBoundsFn=function(){return p}:"function"==typeof u&&(this._textBoundsFn=u),"string"==typeof y&&(this.ellipsed=y),this.collider=pd({type:RM(this)?"bounds":null},f),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};var e=Vd(this._textBoundsFn(this.attrs)),n=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(e):e,i=qd(n),r=Od(i,4),s=r[0],o=r[1],a=r[2],l=r[3];return this.__boundingRect[t]={x:s,y:o,width:a-s,height:l-o},this.__boundingRect[t]}},{key:"bounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[t])return this.__bounds[t];var e=this.boundingRect(t);return this.__bounds[t]=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],this.__bounds[t]}}]),n}(aM),OM=Xf();function IM(t,e){return OM.get(t)(e)}OM.add("rect",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(bM,e)})),OM.add("circle",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(_M,e)})),OM.add("text",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(NM,e)})),OM.add("line",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(wM,e)})),OM.add("path",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(AM,e)})),OM.add("stage",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(dM,e)})),OM.add("container",hM),OM.add("defs",hM),OM.add("linearGradient",gM),OM.add("radialGradient",gM),OM.add("stop",gM),OM.add("pattern",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cd(xM,e)}));var PM=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=[{}];function n(){return e[e.length-1]}return n.save=function(){for(var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n(),s={},o="",a=0;a<t.length;a++)void 0!==r[o=t[a]]&&(s[o]=r[o]);return pd(s,i),e.push(s),n()},n.restore=function(){e.splice(e.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function DM(t,e){if(Array.isArray(e))for(var n=0,i=e.length;n<i;n++)e[n](t)}function jM(t,e,n){t.node=n[e],t.index=e}function zM(t){var e=t.items,n=t.stage,i=t.on,r=void 0===i?{}:i;return n||(n=IM("stage",t.dpi)),function t(e,n,i,r){for(var s={siblings:e,node:null,index:0},o=0,a=e.length;o<a;o++)if(jM(s,o,e),DM(s,r.create),!("function"==typeof s.node.disabled?s.node.disabled():s.node.disabled)){s.node=PM.save(s.node);var l=IM(s.node.type,s.node);l&&(s.node.transform&&(i.save(),KS(s.node.transform,i)),i.isIdentity()||(l.modelViewMatrix=i.clone()),n.addChild(l),s.node.children&&t(s.node.children,l,i,r),s.node.transform&&i.restore()),PM.restore()}}(e,n,new BS,r),n}function FM(t,e,n){var i=n.degree,r=n.stops,s=void 0===r?[]:r,o=null;if("radial"===n.orientation){var a=e.boundingRect();o=t.createRadialGradient(a.x+a.width/2,a.y+a.height/2,1e-5,a.x+a.width/2,a.y+a.height/2,Math.max(a.width,a.height)/2)}else{var l=cx(i);["x1","x2","y1","y2"].forEach((function(t){t in n&&(l[t]=n[t])}));var c=e.boundingRect();o=t.createLinearGradient(c.x+l.x1*c.width,c.y+l.y1*c.height,c.x+l.x2*c.width,c.y+l.y2*c.height)}for(var u=0,h=s.length;u<h;u++){var d=s[u];o.addColorStop(d.offset,d.color)}return o}function qM(t,e,n){return e.width=t.width,e.height=t.height,n.save(),n.fillStyle=t.fill,t.shapes.forEach((function(t){switch(t.type){case"rect":n.rect(t.x,t.y,t.width,t.height)}})),n.fill(),n.restore(),n.createPattern(e,"repeat")}function LM(t){var e=t.createElement("canvas"),n=e.getContext("2d"),i={};return{create:function(t){var r=t.key;return r?(i[r]=i[r]||qM(t,e,n),i[r]):qM(t,e,n)},clear:function(){i={}}}}function VM(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.x,n=t.y,i=t.width,r=t.height,s=t.scaleRatio,o=t.margin,a=t.edgeBleed,l={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return l.x=isNaN(e)?l.x:e,l.y=isNaN(n)?l.y:n,l.width=isNaN(i)?l.width:i,l.height=isNaN(r)?l.height:r,void 0!==s&&(l.scaleRatio.x=isNaN(s.x)?l.scaleRatio.x:s.x,l.scaleRatio.y=isNaN(s.y)?l.scaleRatio.y:s.y),void 0!==o&&(l.margin.left=isNaN(o.left)?0:o.left,l.margin.top=isNaN(o.top)?0:o.top),"object"===gd(a)&&["left","right","top","bottom"].forEach((function(t){!isNaN(a[t])&&a[t]>0&&(l.edgeBleed[t]=a[t],l.edgeBleed.bool=!0)})),l.computedPhysical={x:Math.round(l.margin.left+(l.x-l.edgeBleed.left)*l.scaleRatio.x),y:Math.round(l.margin.top+(l.y-l.edgeBleed.top)*l.scaleRatio.y),width:Math.round((l.width+l.edgeBleed.left+l.edgeBleed.right)*l.scaleRatio.x),height:Math.round((l.height+l.edgeBleed.top+l.edgeBleed.bottom)*l.scaleRatio.y)},l}function HM(){var t={element:function(){},root:function(){},settings:function(){},appendTo:function(){},render:function(){return!1},itemsAt:function(){return[]},findShapes:function(){return[]},clear:function(){},destory:function(){},size:function(){},measureText:wk,textBounds:Sk,setKey:function(e){t.element().setAttribute("data-key",e)}};return t}function BM(t){return function(e){var n=e.node;"text"!==n.type||null==n.data||n.textBoundsFn||(n.textBoundsFn=t.textBounds)}}var WM=function(){function t(e){md(this,t),this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}return xd(t,[{key:"updateSize",value:function(t){var e,n=t.rect,i=t.dpiRatio,r=t.canvasBufferSize;e=r?"function"==typeof r?r(n):r:{width:n.computedPhysical.width+400,height:n.computedPhysical.height+400},this.bufferCanvas.style.width="".concat(e.width,"px"),this.bufferCanvas.style.height="".concat(e.height,"px"),this.bufferCanvas.width=Math.round(e.width*i),this.bufferCanvas.height=Math.round(e.height*i)}},{key:"apply",value:function(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}},{key:"clear",value:function(){this.bufferCanvas.width=this.bufferCanvas.width}},{key:"getContext",value:function(){return this.bufferCanvas.getContext("2d")}}]),t}(),$M=Xf();function UM(t){return Array.isArray(t)?t:"string"==typeof t?-1!==t.indexOf(",")?t.split(","):t.split(" "):[]}function YM(t){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}function QM(t,e){e.setTransform(t[0][0],t[1][0],t[0][1],t[1][1],t[0][2],t[1][2])}function KM(t,e,n){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=Object.keys(i),s=0,o=n.length;s<o;s++){var a=n[s],l=a[0],c=a[1],u=a[2];if(l in e.attrs&&!(c in i)&&t[c]!==e.attrs[l]){var h=u?u(e.attrs[l]):e.attrs[l];"function"==typeof t[c]?t[c](h):t[c]=h}}for(var d=0,f=r.length;d<f;d++){var p=r[d];t[p]=i[p]}}function XM(t,e,n,i){for(var r=0,s=t.length;r<s;r++){var o=t[r],a={};e.save(),o.attrs&&(o.attrs.fill||o.attrs.stroke)&&(o.attrs.fill&&"object"===gd(o.attrs.fill)&&"gradient"===o.attrs.fill.type?a.fillStyle=FM(e,o,o.attrs.fill):o.attrs.fill&&"object"===gd(o.attrs.fill)&&"pattern"===o.attrs.fill.type&&(a.fillStyle=i.patterns.create(o.attrs.fill)),o.attrs.stroke&&"object"===gd(o.attrs.stroke)&&"gradient"===o.attrs.stroke.type?a.strokeStyle=FM(e,o,o.attrs.stroke):o.attrs.stroke&&"object"===gd(o.attrs.stroke)&&"pattern"===o.attrs.stroke.type&&(a.strokeStyle=i.patterns.create(o.attrs.stroke))),KM(e,o,n,a),o.modelViewMatrix&&QM(o.modelViewMatrix.elements,e),$M.has(o.type)&&$M.get(o.type)(o.attrs,{g:e,doFill:"fill"in o.attrs&&"none"!==o.attrs.fill,doStroke:"stroke"in o.attrs&&0!==o.attrs["stroke-width"],ellipsed:o.ellipsed}),o.children&&XM(o.children,e,n,i),e.restore()}}function ZM(t){var e=t.el,n=t.dpiRatio,i=t.transform;if("object"===gd(i)){var r=[i.horizontalScaling,i.horizontalSkewing,i.verticalSkewing,i.verticalScaling,i.horizontalMoving*n,i.verticalMoving*n],s=e.getContext("2d");s.setTransform.apply(s,r)}}function GM(){var t,e,n,i,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zM,s={transform:void 0,canvasBufferSize:void 0},o=!1,a=VM(),l=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",UM]],c=HM();return c.element=function(){return t},c.root=function(){return t},c.settings=function(t){return t&&Object.keys(s).forEach((function(e){void 0!==t[e]&&(s[e]=t[e])})),s},c.appendTo=function(n){return t||((t=n.ownerDocument.createElement("canvas")).style.position="absolute",t.style["-webkit-font-smoothing"]="antialiased",t.style["-moz-osx-font-smoothing"]="antialiased",t.style.pointerEvents="none"),"function"!=typeof s.transform||e||(e=new WM(t)),n.appendChild(t),t},c.render=function(u){if(!t)return!1;i||(i=LM(t.ownerDocument));var h=e&&e.getContext()||t.getContext("2d"),d=YM(h),f=e&&s.transform();if(f)return t.width=t.width,ZM({el:t,dpiRatio:d,transform:f}),e.apply(),!0;var p=a.scaleRatio.x,y=a.scaleRatio.y;o&&(t.style.left="".concat(a.computedPhysical.x,"px"),t.style.top="".concat(a.computedPhysical.y,"px"),t.style.width="".concat(a.computedPhysical.width,"px"),t.style.height="".concat(a.computedPhysical.height,"px"),t.width=Math.round(a.computedPhysical.width*d),t.height=Math.round(a.computedPhysical.height*d),e&&e.updateSize({rect:a,dpiRatio:d,canvasBufferSize:s.canvasBufferSize}));var g={type:"container",children:u,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*d*p,", ").concat(a.edgeBleed.top*d*y,")"):""};1===d&&1===p&&1===y||(g.transform+="scale(".concat(d*p,", ").concat(d*y,")"));var m=r({items:[g],dpi:d,on:{create:[fk(c.measureText),BM(c)]}}),v=!n||!m.equals(n);i.clear();var x=o||v;return x&&(c.clear(),XM(m.children,h,l,{patterns:i})),e&&(t.width=t.width,e.apply()),o=!1,n=m,x},c.itemsAt=function(t){return n?n.getItemsFrom(t):[]},c.findShapes=function(t){return n?n.findShapes(t):[]},c.clear=function(){return t&&(t.width=t.width),e&&e.clear(),n=null,c},c.size=function(t){if(t){var e=VM(t);JSON.stringify(a)!==JSON.stringify(e)&&(o=!0,a=e)}return a},c.destroy=function(){t&&(t.parentElement&&t.parentElement.removeChild(t),t=null),e&&(e=null),n=null},c}function JM(t,e){$M.add(t,e)}function tE(t,e){return Math.max(0,Math.min(t,e))}var eE=new RegExp("[A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u02bb-\u02c1\u02d0-\u02d1\u02e0-\u02e4\u02ee\u0370-\u0373\u0376-\u037d\u0386\u0388-\u03f5\u03f7-\u0482\u048a-\u0589\u0903-\u0939\u093b\u093d-\u0940\u0949-\u094c\u094e-\u0950\u0958-\u0961\u0964-\u097f\u0982-\u09b9\u09bd-\u09c0\u09c7-\u09cc\u09ce-\u09e1\u09e6-\u09f1\u09f4-\u09fa\u0a03-\u0a39\u0a3e-\u0a40\u0a59-\u0a6f\u0a72-\u0a74\u0a83-\u0ab9\u0abd-\u0ac0\u0ac9-\u0acc\u0ad0-\u0ae1\u0ae6-\u0aef\u0b02-\u0b39\u0b3d-\u0b3e\u0b40\u0b47-\u0b4c\u0b57-\u0b61\u0b66-\u0b77\u0b83-\u0bbf\u0bc1-\u0bcc\u0bd0-\u0bf2\u0c01-\u0c3d\u0c41-\u0c44\u0c58-\u0c61\u0c66-\u0c6f\u0c7f-\u0cb9\u0cbd-\u0ccb\u0cd5-\u0ce1\u0ce6-\u0d40\u0d46-\u0d4c\u0d4e-\u0d61\u0d66-\u0dc6\u0dcf-\u0dd1\u0dd8-\u0e30\u0e32-\u0e33\u0e40-\u0e46\u0e4f-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec6\u0ed0-\u0f17\u0f1a-\u0f34\u0f36\u0f38\u0f3e-\u0f6c\u0f7f\u0f85\u0f88-\u0f8c\u0fbe-\u0fc5\u0fc7-\u102c\u1031\u1038\u103b-\u103c\u103f-\u1057\u105a-\u105d\u1061-\u1070\u1075-\u1081\u1083-\u1084\u1087-\u108c\u108e-\u109c\u109e-\u135a\u1360-\u138f\u13a0-\u13f4\u1401-\u167f\u1681-\u169a\u16a0-\u1711\u1720-\u1731\u1735-\u1751\u1760-\u1770\u1780-\u17b6\u17be-\u17c5\u17c7-\u17c8\u17d4-\u17da\u17dc\u17e0-\u17e9\u1810-\u18a8\u18aa-\u191c\u1923-\u1926\u1929-\u1931\u1933-\u1938\u1946-\u19da\u1a00-\u1a16\u1a19-\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1a80-\u1aad\u1b04-\u1b33\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b6a\u1b74-\u1b7c\u1b82-\u1ba1\u1ba6-\u1ba7\u1baa-\u1be5\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1c2b\u1c34-\u1c35\u1c3b-\u1c7f\u1cd3\u1ce1\u1ce9-\u1cec\u1cee-\u1dbf\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u200e\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e-\u214f\u2160-\u2188\u2336-\u237a\u2395\u249c-\u24e9\u26ac\u2800-\u28ff\u2c00-\u2ce4\u2ceb-\u2cee\u2d00-\u2d70\u2d80-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u31ba\u31f0-\u321c\u3220-\u324f\u3260-\u327b\u327f-\u32b0\u32c0-\u32cb\u32d0-\u3376\u337b-\u33dd\u33e0-\u33fe\u3400-\u4db5\u4e00-\ua48c\ua4d0-\ua60c\ua610-\ua66e\ua680-\ua6ef\ua6f2-\ua6f7\ua722-\ua787\ua789-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua824\ua827\ua830-\ua837\ua840-\ua873\ua880-\ua8c3\ua8ce-\ua8d9\ua8f2-\ua925\ua92e-\ua946\ua952-\ua97c\ua983-\ua9b2\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\uaa28\uaa2f-\uaa30\uaa33-\uaa34\uaa40-\uaa42\uaa44-\uaa4b\uaa4d-\uaaaf\uaab1\uaab5-\uaab6\uaab9-\uaabd\uaac0\uaac2-\uabe4\uabe6-\uabe7\uabe9-\uabec\uabf0-\ufb17\uff21-\uff3a\uff41-\uff5a\uff66-\uffdc]"),nE=new RegExp("[\u05be\u05c0\u05c3\u05c6\u05d0-\u05f4\u07c0-\u07ea\u07f4-\u07f5\u07fa-\u0815\u081a\u0824\u0828\u0830-\u0858\u085e\u200f\ufb1d\ufb1f-\ufb28\ufb2a-\ufb4f]"),iE=new RegExp("[\u0608\u060b\u060d\u061b-\u064a\u066d-\u066f\u0671-\u06d5\u06e5-\u06e6\u06ee-\u06ef\u06fa-\u070d\u0710\u0712-\u072f\u074d-\u07a5\u07b1\ufb50-\ufd3d\ufd50-\ufdfc\ufe70-\ufefc]");function rE(t){return eE.test(t)}function sE(t){return nE.test(t)||iE.test(t)}function oE(t){var e,n,i=t?t.length:0;for(e=0;e<i;e++){if(rE(n=t[e]))return"ltr";if(sE(n))return"rtl"}return"ltr"}var aE={start:"end",end:"start",center:"center",middle:"middle"};function lE(t,e){return"rtl"===e?aE[t]:t}function cE(t,e,n){for(var i=0,r=t.length;i<r;i++)t[i].object=n(t[i].content.type,e)}function uE(t,e){for(var n=0,i=t.length;n<i;n++)null!=t[n].object&&(e(t[n].object),t[n].object=null)}function hE(t,e,n,i,r,s){var o=function t(e,n){var i,r,s,o=[],a=[],l=[],c=[],u=function(t){return t.id},h=function(t,e){var n;return n="object"===gd(t)?"id"in t?t.id:e:t,{content:t,id:"".concat(n,"__").concat(t.type||"")}};e.isTree||(e=e.map(h)),n=n.map(h),r=e.map(u),s=n.map(u);for(var d=0,f=n.length;d<f;d++)-1===r.indexOf(n[d].id)?o.push(n[d]):l.push(n[d]);for(var p=0,y=e.length;p<y;p++)-1===s.indexOf(e[p].id)?a.push(e[p]):c.push(e[p]);for(var g=0,m=o.length;g<m;g++)o[g].content.children&&(o[g].diff=t([],o[g].content.children),o[g].children=o[g].diff.updatedNew.concat(o[g].diff.added),o[g].children.isTree=!0);for(var v=0,x=l.length;v<x;v++)l[v].diff=t(c[v].children||[],l[v].content.children||[]),l[v].object=c[v].object,l[v].children=l[v].diff.items;return i=l.concat(o),o.isTree=!0,a.isTree=!0,l.isTree=!0,c.isTree=!0,i.isTree=!0,{added:o,updatedNew:l,updatedOld:c,removed:a,items:i}}(t,e);return cE(o.added,n,i),uE(o.removed,s),function t(e,n,i,r){for(var s,o=0,a=e.length;o<a;o++)null!=(s=e[o]).object&&(i(s.object,s.content),s.diff&&(cE(s.diff.added,s.object,n),uE(s.diff.removed,r),t(s.diff.items,n,i,r)))}(o.items,i,r,s),o.items}JM("rect",(function(t,e){var n=e.g,i=e.doFill,r=e.doStroke;n.beginPath(),t.rx>0||t.ry>0?function(t,e,n,i,r,s,o){s=tE(i/2,s>0?s:o),o=tE(r/2,o>0?o:s),t.moveTo(e,n+o),t.lineTo(e,n+r-o),t.quadraticCurveTo(e,n+r,e+s,n+r),t.lineTo(e+i-s,n+r),t.quadraticCurveTo(e+i,n+r,e+i,n+r-o),t.lineTo(e+i,n+o),t.quadraticCurveTo(e+i,n,e+i-s,n),t.lineTo(e+s,n),t.quadraticCurveTo(e,n,e,n+o)}(n,t.x,t.y,t.width,t.height,t.rx,t.ry):n.rect(t.x,t.y,t.width,t.height),i&&n.fill(),r&&n.stroke()})),JM("circle",(function(t,e){var n=e.g,i=e.doFill,r=e.doStroke;n.beginPath(),n.moveTo(t.cx+t.r,t.cy),n.arc(t.cx,t.cy,t.r,0,2*Math.PI,!1),i&&n.fill(),r&&n.stroke()})),JM("line",(function(t,e){var n=e.g,i=e.doStroke;n.beginPath(),n.moveTo(t.x1,t.y1),n.lineTo(t.x2,t.y2),i&&n.stroke()})),JM("path",(function(t,e){var n=e.g,i=e.doStroke,r=e.doFill,s=new Path2D(t.d);r&&n.fill(s),i&&n.stroke(s)})),JM("text",(function(t,e){var n=e.g,i=e.ellipsed||pk(t,wk);n.font="".concat(t["font-size"]," ").concat(t["font-family"]);var r=oE(t.text);n.canvas.dir!==r&&(n.canvas.dir=r);var s=lE("middle"===t["text-anchor"]?"center":t["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);var o=yk(t);n.fillText(i,t.x+t.dx,t.y+t.dy+o)}));var dE="http://www.w3.org/2000/svg",fE=function(t,e){if(!t||"string"!=typeof t)throw new Error("Invalid type: ".concat(t));var n=e.ownerDocument.createElementNS(dE,"container"===t?"g":t);return e.appendChild(n),n},pE=function(t){t.parentNode&&t.parentNode.removeChild(t)},yE=function(t,e){if(function(t){switch(t.type){case"circle":return!isNaN(t.attrs.cx)&&!isNaN(t.attrs.cy)&&!isNaN(t.attrs.r);case"line":return!(isNaN(t.attrs.x1)||isNaN(t.attrs.y1)||isNaN(t.attrs.x2)||isNaN(t.attrs.y2));case"rect":return!(isNaN(t.attrs.x)||isNaN(t.attrs.y)||isNaN(t.attrs.width)||isNaN(t.attrs.height));case"text":return!isNaN(t.attrs.x)&&!isNaN(t.attrs.y);default:return!0}}(e)){for(var n in e.attrs)if("stroke"===n&&e.strokeReference)t.setAttribute("stroke",e.strokeReference);else if("fill"===n&&e.fillReference)t.setAttribute("fill",e.fillReference);else if("text"===n){t.setAttribute("style","white-space: pre"),t.textContent=e.ellipsed||pk(e.attrs,wk);var i=oE(e.attrs.text);"rtl"===i&&(t.setAttribute("direction","rtl"),t.setAttribute("dir","rtl"),t.setAttribute("text-anchor",lE(t.getAttribute("text-anchor"),i)))}else if("text"!==e.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===e.type&&"title"===n&&e.attrs.title){var r=t.ownerDocument.createElementNS(dE,"title");r.textContent=e.attrs.title,t.appendChild(r)}else t.setAttribute(n,e.attrs[n]);else{var s,o=+t.getAttribute(n)||0;s="dominant-baseline"===n?yk(e.attrs):e.attrs[n],t.setAttribute("dy",s+o)}if("string"==typeof e.data||"number"==typeof e.data||"boolean"==typeof e.data)t.setAttribute("data",e.data);else if("object"===gd(e.data)&&null!==e.data)for(var a in e.data)"string"!=typeof e.data[a]&&"number"!=typeof e.data[a]&&"boolean"!=typeof e.data[a]||t.setAttribute("data-".concat(a),e.data[a])}},gE=function(){function t(e,n,i,r){md(this,t),this.create=e,this.nodeCreator=n,this.nodeMaintainer=i,this.nodeDestroyer=r}return xd(t,[{key:"render",value:function(t,e){return this.create([],t,e,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}]),t}();function mE(){return new gE(hE,fE,yE,pE)}function vE(t){var e,n,i=0;if(0===(t=JSON.stringify(t)).length)return i;for(e=0,n=t.length;e<n;e++)i=(i<<5)-i+t.charCodeAt(e),i&=i;return i}function xE(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vE,n={},i=Date.now(),r={getOrCreateGradient:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=e(r[s]),l="picasso-gradient-".concat(i,"-").concat(a);if(!n[a]){var c=r[s],u=c.orientation,h=c.degree,d=c.stops,f=void 0===d?[]:d,p={};void 0===h&&(h=90),"radial"===u?p.type="radialGradient":(p=cx(h),["x1","x2","y1","y2"].forEach((function(t){t in r[s]&&(p[t]=r[s][t])})),p.type="linearGradient"),p.id=l,p.children=f.map((function(t){var e=t.color,n=t.opacity;return{type:"stop",offset:"".concat(100*t.offset,"%"),style:"stop-color:".concat(e,";stop-opacity:").concat(void 0!==n?n:1)}})),t.push(p),n[a]=l}return"url('".concat(o,"#").concat(l,"')")},onCreate:function(t){var e="";"undefined"!=typeof window&&(e=window.location.href.split("#")[0]);var n=t.node;n.fill&&"object"===gd(n.fill)&&"gradient"===n.fill.type&&(n.fillReference=r.getOrCreateGradient(n,"fill",e)),n.stroke&&"object"===gd(n.stroke)&&"gradient"===n.stroke.type&&(n.strokeReference=r.getOrCreateGradient(n,"stroke",e))},clear:function(){n={}}};return r}function bE(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vE,n={},i=Date.now(),r={onCreate:function(r){var s={};r.node&&"object"===gd(r.node.fill)&&"pattern"===r.node.fill.type&&r.node.fill.shapes&&(s.fill=r.node.fill),r.node&&"object"===gd(r.node.stroke)&&"pattern"===r.node.stroke.type&&r.node.stroke.shapes&&(s.stroke=r.node.stroke),Object.keys(s).forEach((function(o){var a="",l=s[o],c=e(l),u="picasso-pattern-".concat(i,"-").concat(c);if("undefined"!=typeof window&&(a=window.location.href.split("#")[0]),!n[c]){var h={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach((function(t){h.children.push(t)})),t.push(h),n[c]=!0}r.node["".concat(o,"Reference")]="url('".concat(a,"#").concat(u,"')")}))},clear:function(){n={}}};return r}function _E(){var t,e,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mE,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dE,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:zM,o=i(),a=!1,l=VM(),c={transform:void 0},u=HM(),h={type:"defs",children:[]},d=bE(h.children),f=xE(h.children);return u.element=function(){return t},u.root=function(){return e},u.settings=function(t){return t&&Object.keys(c).forEach((function(e){void 0!==t[e]&&(c[e]=t[e])})),c},u.appendTo=function(n){return t||((t=n.ownerDocument.createElementNS(r,"svg")).style.position="absolute",t.style["-webkit-font-smoothing"]="antialiased",t.style["-moz-osx-font-smoothing"]="antialiased",t.style.pointerEvents="none",t.setAttribute("xmlns",r),(e=n.ownerDocument.createElementNS(r,"g")).style.pointerEvents="auto",t.appendChild(e)),n.appendChild(t),t},u.render=function(i){if(!t)return!1;var r="function"==typeof c.transform&&c.transform();if(r){var p=r.b,y=r.c,g=r.d,m=r.e,v=r.f;return e.style.transform="matrix(".concat(r.a,", ").concat(p,", ").concat(y,", ").concat(g,", ").concat(m,", ").concat(v,")"),!0}e.style.transform="";var x=l.scaleRatio.x,b=l.scaleRatio.y;a&&(t.style.left="".concat(l.computedPhysical.x,"px"),t.style.top="".concat(l.computedPhysical.y,"px"),t.setAttribute("width",l.computedPhysical.width),t.setAttribute("height",l.computedPhysical.height)),f.clear(),d.clear(),h.children.length=0;var _={type:"container",children:Array.isArray(i)?[].concat(Id(i),[h]):i,transform:l.edgeBleed.bool?"translate(".concat(l.edgeBleed.left*x,", ").concat(l.edgeBleed.top*b,")"):""};1===x&&1===b||(_.transform+="scale(".concat(x,", ").concat(b,")"));var w=s({items:[_],on:{create:[function(t){t.node.fillReference=void 0,t.node.strokeReference=void 0},f.onCreate,d.onCreate,fk(u.measureText),BM(u)]}}),k=!n||!w.equals(n),S=a||k;return S&&(u.clear(),o.render(w.children,e)),a=!1,n=w,S},u.itemsAt=function(t){return n?n.getItemsFrom(t):[]},u.findShapes=function(t){return n?n.findShapes(t):[]},u.clear=function(){if(!e)return u;n=null;var i=e.cloneNode(!1);return t.replaceChild(i,e),e=i,u},u.destroy=function(){t&&t.parentNode&&t.parentNode.removeChild(t),t=null,e=null},u.size=function(t){if(t){var e=VM(t);JSON.stringify(l)!==JSON.stringify(e)&&(a=!0,l=e)}return l},u}var wE,kE,SE,ME,EE={},CE=[],TE=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function AE(t,e){for(var n in e)t[n]=e[n];return t}function RE(t){var e=t.parentNode;e&&e.removeChild(t)}function NE(t,e,n){var i,r,s,o=arguments,a={};for(s in e)"key"==s?i=e[s]:"ref"==s?r=e[s]:a[s]=e[s];if(arguments.length>3)for(n=[n],s=3;s<arguments.length;s++)n.push(o[s]);if(null!=n&&(a.children=n),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return OE(t,a,i,r,null)}function OE(t,e,n,i,r){var s={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++wE.__v:r};return null!=wE.vnode&&wE.vnode(s),s}function IE(t){return t.children}function PE(t,e){this.props=t,this.context=e}function DE(t,e){if(null==e)return t.__?DE(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?DE(t):null}function jE(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return jE(t)}}function zE(t){(!t.__d&&(t.__d=!0)&&kE.push(t)&&!FE.__r++||ME!==wE.debounceRendering)&&((ME=wE.debounceRendering)||SE)(FE)}function FE(){for(var t;FE.__r=kE.length;)t=kE.sort((function(t,e){return t.__v.__b-e.__v.__b})),kE=[],t.some((function(t){var e,n,i,r,s,o;t.__d&&(s=(r=(e=t).__v).__e,(o=e.__P)&&(n=[],(i=AE({},r)).__v=r.__v+1,UE(o,r,i,e.__n,void 0!==o.ownerSVGElement,null!=r.__h?[s]:null,n,null==s?DE(r):s,r.__h),YE(n,r),r.__e!=s&&jE(r)))}))}function qE(t,e,n,i,r,s,o,a,l,c){var u,h,d,f,p,y,g,m=i&&i.__k||CE,v=m.length;for(n.__k=[],u=0;u<e.length;u++)if(null!=(f=n.__k[u]=null==(f=e[u])||"boolean"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?OE(null,f,null,null,f):Array.isArray(f)?OE(IE,{children:f},null,null,null):f.__b>0?OE(f.type,f.props,f.key,null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(d=m[u])||d&&f.key==d.key&&f.type===d.type)m[u]=void 0;else for(h=0;h<v;h++){if((d=m[h])&&f.key==d.key&&f.type===d.type){m[h]=void 0;break}d=null}UE(t,f,d=d||EE,r,s,o,a,l,c),p=f.__e,(h=f.ref)&&d.ref!=h&&(g||(g=[]),d.ref&&g.push(d.ref,null,f),g.push(h,f.__c||p,f)),null!=p?(null==y&&(y=p),"function"==typeof f.type&&null!=f.__k&&f.__k===d.__k?f.__d=l=LE(f,l,t):l=VE(t,f,d,m,p,l),c||"option"!==n.type?"function"==typeof n.type&&(n.__d=l):t.value=""):l&&d.__e==l&&l.parentNode!=t&&(l=DE(d))}for(n.__e=y,u=v;u--;)null!=m[u]&&("function"==typeof n.type&&null!=m[u].__e&&m[u].__e==n.__d&&(n.__d=DE(i,u+1)),XE(m[u],m[u]));if(g)for(u=0;u<g.length;u++)KE(g[u],g[++u],g[++u])}function LE(t,e,n){var i,r;for(i=0;i<t.__k.length;i++)(r=t.__k[i])&&(r.__=t,e="function"==typeof r.type?LE(r,e,n):VE(n,r,r,t.__k,r.__e,e));return e}function VE(t,e,n,i,r,s){var o,a,l;if(void 0!==e.__d)o=e.__d,e.__d=void 0;else if(null==n||r!=s||null==r.parentNode)t:if(null==s||s.parentNode!==t)t.appendChild(r),o=null;else{for(a=s,l=0;(a=a.nextSibling)&&l<i.length;l+=2)if(a==r)break t;t.insertBefore(r,s),o=s}return void 0!==o?o:r.nextSibling}function HE(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||TE.test(e)?n:n+"px"}function BE(t,e,n,i,r){var s;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||HE(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||HE(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])s=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?i||t.addEventListener(e,s?$E:WE,s):t.removeEventListener(e,s?$E:WE,s);else if("dangerouslySetInnerHTML"!==e){if(r)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null!=n&&(!1!==n||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,n):t.removeAttribute(e))}}function WE(t){this.l[t.type+!1](wE.event?wE.event(t):t)}function $E(t){this.l[t.type+!0](wE.event?wE.event(t):t)}function UE(t,e,n,i,r,s,o,a,l){var c,u,h,d,f,p,y,g,m,v,x,b=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(l=n.__h,a=e.__e=n.__e,e.__h=null,s=[a]),(c=wE.__b)&&c(e);try{t:if("function"==typeof b){if(g=e.props,m=(c=b.contextType)&&i[c.__c],v=c?m?m.props.value:c.__:i,n.__c?y=(u=e.__c=n.__c).__=u.__E:("prototype"in b&&b.prototype.render?e.__c=u=new b(g,v):(e.__c=u=new PE(g,v),u.constructor=b,u.render=ZE),m&&m.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=i,h=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=b.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=AE({},u.__s)),AE(u.__s,b.getDerivedStateFromProps(g,u.__s))),d=u.props,f=u.state,h)null==b.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==b.getDerivedStateFromProps&&g!==d&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,v),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,v)||e.__v===n.__v){u.props=g,u.state=u.__s,e.__v!==n.__v&&(u.__d=!1),u.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),u.__h.length&&o.push(u);break t}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,v),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(d,f,p)}))}u.context=v,u.props=g,u.state=u.__s,(c=wE.__r)&&c(e),u.__d=!1,u.__v=e,u.__P=t,c=u.render(u.props,u.state,u.context),u.state=u.__s,null!=u.getChildContext&&(i=AE(AE({},i),u.getChildContext())),h||null==u.getSnapshotBeforeUpdate||(p=u.getSnapshotBeforeUpdate(d,f)),x=null!=c&&c.type===IE&&null==c.key?c.props.children:c,qE(t,Array.isArray(x)?x:[x],e,n,i,r,s,o,a,l),u.base=e.__e,e.__h=null,u.__h.length&&o.push(u),y&&(u.__E=u.__=null),u.__e=!1}else null==s&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=QE(n.__e,e,n,i,r,s,o,l);(c=wE.diffed)&&c(e)}catch(t){e.__v=null,(l||null!=s)&&(e.__e=a,e.__h=!!l,s[s.indexOf(a)]=null),wE.__e(t,e,n)}}function YE(t,e){wE.__c&&wE.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){wE.__e(t,e.__v)}}))}function QE(t,e,n,i,r,s,o,a){var l,c,u,h,d=n.props,f=e.props,p=e.type,y=0;if("svg"===p&&(r=!0),null!=s)for(;y<s.length;y++)if((l=s[y])&&(l===t||(p?l.localName==p:3==l.nodeType))){t=l,s[y]=null;break}if(null==t){if(null===p)return document.createTextNode(f);t=r?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,f.is&&f),s=null,a=!1}if(null===p)d===f||a&&t.data===f||(t.data=f);else{if(s=s&&CE.slice.call(t.childNodes),c=(d=n.props||EE).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!a){if(null!=s)for(d={},h=0;h<t.attributes.length;h++)d[t.attributes[h].name]=t.attributes[h].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===t.innerHTML)||(t.innerHTML=u&&u.__html||""))}if(function(t,e,n,i,r){var s;for(s in n)"children"===s||"key"===s||s in e||BE(t,s,null,n[s],i);for(s in e)r&&"function"!=typeof e[s]||"children"===s||"key"===s||"value"===s||"checked"===s||n[s]===e[s]||BE(t,s,e[s],n[s],i)}(t,f,d,r,a),u)e.__k=[];else if(y=e.props.children,qE(t,Array.isArray(y)?y:[y],e,n,i,r&&"foreignObject"!==p,s,o,t.firstChild,a),null!=s)for(y=s.length;y--;)null!=s[y]&&RE(s[y]);a||("value"in f&&void 0!==(y=f.value)&&(y!==t.value||"progress"===p&&!y)&&BE(t,"value",y,d.value,!1),"checked"in f&&void 0!==(y=f.checked)&&y!==t.checked&&BE(t,"checked",y,d.checked,!1))}return t}function KE(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){wE.__e(t,n)}}function XE(t,e,n){var i,r,s;if(wE.unmount&&wE.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||KE(i,null,e)),n||"function"==typeof t.type||(n=null!=(r=t.__e)),t.__e=t.__d=void 0,null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){wE.__e(t,e)}i.base=i.__P=null}if(i=t.__k)for(s=0;s<i.length;s++)i[s]&&XE(i[s],e,n);null!=r&&RE(r)}function ZE(t,e,n){return this.constructor(t,n)}function GE(t,e,n){var i,r,s;wE.__&&wE.__(t,e),r=(i="function"==typeof n)?null:n&&n.__k||e.__k,s=[],UE(e,t=(!i&&n||e).__k=NE(IE,null,[t]),r||EE,EE,void 0!==e.ownerSVGElement,!i&&n?[n]:r?null:e.firstChild?CE.slice.call(e.childNodes):null,s,!i&&n?n:r?r.__e:e.firstChild,i),YE(s,t)}function JE(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.createElement,r=void 0===i?document.createElement.bind(document):i,s=VM(),o={transform:void 0},a=HM();return a.element=function(){return t},a.root=function(){return t},a.settings=function(t){return t&&Object.keys(o).forEach((function(e){void 0!==t[e]&&(o[e]=t[e])})),o},a.appendTo=function(e){return t||((t=r("div")).style.position="absolute",t.style["-webkit-font-smoothing"]="antialiased",t.style["-moz-osx-font-smoothing"]="antialiased",t.style.pointerEvents="none"),e.appendChild(t),t},a.render=function(n){if(!t)return!1;var i,r="function"==typeof o.transform&&o.transform();if(r){var a=r.b,l=r.c,c=r.d,u=r.e,h=r.f;return t.style.transform="matrix(".concat(r.a,", ").concat(a,", ").concat(l,", ").concat(c,", ").concat(u,", ").concat(h,")"),!0}return t.style.transform="",t.style.left="".concat(s.computedPhysical.x,"px"),t.style.top="".concat(s.computedPhysical.y,"px"),t.style.width="".concat(s.computedPhysical.width,"px"),t.style.height="".concat(s.computedPhysical.height,"px"),i=Array.isArray(n)?NE("div",null,n):n,e=GE(i,t,e),!0},a.renderArgs=[NE],a.clear=function(){if(t){for(var n=t.firstChild;n;)t.removeChild(n),n=t.firstChild;e=null}return a},a.destroy=function(){t&&t.parentElement&&t.parentElement.removeChild(t),t=null,e=null},a.size=function(t){return t&&(s=VM(t)),s},a}wE={__e:function(t,e){for(var n,i,r;e=e.__;)if((n=e.__c)&&!n.__)try{if((i=n.constructor)&&null!=i.getDerivedStateFromError&&(n.setState(i.getDerivedStateFromError(t)),r=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(t),r=n.__d),r)return n.__E=n}catch(e){t=e}throw t},__v:0},PE.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=AE({},this.state),"function"==typeof t&&(t=t(AE({},n),this.props)),t&&AE(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),zE(this))},PE.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),zE(this))},PE.prototype.render=IE,kE=[],SE="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,FE.__r=0;var tC=[function(t){t.renderer("svg",_E)},function(t){t.renderer("canvas",GM)},function(t){t.renderer("dom",JE)}],eC={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},nC=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.level,i=void 0===n?eC.OFF:n,r=e.pipe,s=void 0===r?console:r,o=i,a=(bd(t={},eC.OFF,(function(){})),bd(t,eC.ERROR,(function(){return s.error.apply(s,arguments)})),bd(t,eC.WARN,(function(){return s.warn.apply(s,arguments)})),bd(t,eC.INFO,(function(){return s.info.apply(s,arguments)})),bd(t,eC.DEBUG,(function(){return s.log.apply(s,arguments)})),t),l=function(t){if(t&&!(o<t)){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];(a[t]||a[eC.DEBUG]).apply(void 0,n)}};return{log:l,error:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l.apply(void 0,[eC.ERROR].concat(e))},warn:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l.apply(void 0,[eC.WARN].concat(e))},info:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l.apply(void 0,[eC.INFO].concat(e))},debug:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l.apply(void 0,[eC.DEBUG].concat(e))},level:function(t){return"number"==typeof t&&(o=t),o},LOG_LEVEL:eC}};function iC(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;t(n,e)}var rC=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=nC(e.logger),r={component:Xf(n.component,"component",i),data:Xf(n.data,"data",i),formatter:Xf(n.formatter,"formatter",i),interaction:Xf(n.interaction,"interaction",i),renderer:Ab(n.renderer),scale:Xf(n.scale,"scale",i),symbol:Xf(n.symbol,"symbol",i),logger:i};function s(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i={palettes:e.palettes.concat(n.palettes||[]),style:pd({},e.style,n.style),logger:n.logger||e.logger,renderer:n.renderer||e.renderer};return t(i,r)}return e.renderer&&e.renderer.prio&&r.renderer.default(e.renderer.prio[0]),s.use=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return iC(t,e,r)},s.chart=function(t){return Tb(t,{registries:r,logger:i,style:e.style,palettes:e.palettes})},s.config=function(){return e},Object.keys(r).forEach((function(t){s[t]=r[t]})),s.version=yd,s}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l"},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:Rb,data:Wb,formatter:Xy,interaction:$b,renderer:Ab(),scale:cv,symbol:_x});MS.forEach(rC.use),tC.forEach(rC.use),[].forEach(rC.use);var sC=rC;function oC(t){return(oC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function aC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lC(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function cC(t,e,n){return e&&lC(t.prototype,e),n&&lC(t,n),t}function uC(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function dC(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?hC(Object(n),!0).forEach((function(e){uC(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hC(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function fC(t,e){return(fC=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function pC(){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(t){return!1}}function yC(t,e,n){return(yC=pC()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&fC(r,n.prototype),r}).apply(null,arguments)}function gC(t){return function(t){if(Array.isArray(t))return vC(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||mC(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mC(t,e){if(t){if("string"==typeof t)return vC(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vC(t,e):void 0}}function vC(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var xC=Object.prototype.hasOwnProperty,bC=Object.prototype.toString,_C=Object.defineProperty,wC=Object.getOwnPropertyDescriptor,kC=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===bC.call(t)},SC=function(t){if(!t||"[object Object]"!==bC.call(t))return!1;var e,n=xC.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&xC.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!i)return!1;for(e in t);return void 0===e||xC.call(t,e)},MC=function(t,e){_C&&"__proto__"===e.name?_C(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},EC=function(t,e){if("__proto__"===e){if(!xC.call(t,e))return;if(wC)return wC(t,e).value}return t[e]},CC=function t(){var e,n,i,r,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[1]||{},l=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});l<c;++l)if(null!=(e=arguments[l]))for(n in e)i=EC(a,n),a!==(r=EC(e,n))&&(u&&r&&(SC(r)||(s=kC(r)))?(s?(s=!1,o=i&&kC(i)?i:[]):o=i&&SC(i)?i:{},MC(a,{name:n,newValue:t(u,o,r)})):void 0!==r&&MC(a,{name:n,newValue:r}));return a};function TC(t,e,n){if(!t)return-1;var i=n.cache,r=t.origin?t.origin():null;r&&(t=r);var s=i.fields.indexOf(t),o=-1,a=-1;if(-1===s)for(var l=0;l<i.wrappedFields.length;l++)if(a=i.wrappedFields[l].attrDims.map((function(t){return t.instance})).indexOf(t),o=i.wrappedFields[l].attrExps.map((function(t){return t.instance})).indexOf(t),-1!==a||-1!==o){s=l;break}return(s-=e.qArea.qLeft)<0||s>=e.qArea.qWidth?-1:a>=0?function(t){return t[s].qAttrDims.qValues[a]}:o>=0?function(t){return t[s].qAttrExps.qValues[o]}:function(t){return t[s]}}function AC(t,e,n){var i=n.key,r={value:"function"==typeof t.value?t.value(e):void 0!==t.value?t.value:e};return r.label="function"==typeof t.label?t.label(e):String(void 0!==t.label?t.label:r.value),t.field&&(r.source={key:i,field:t.field.key()}),r}function RC(t){var e=t.p,n=t.rowIdx,i=t.row,r=t.sourceKey,s=t.target,o=t.targetProp,a=t.mainCell;if(e.field&&e.field!==t.f){var l=TC(e.field,t.page,{cache:t.cache});if(-1===l)return;a=CC({qRow:n},l(i))}s[o]=AC(e,a,{key:r})}function NC(t,e,n,i){for(var r=Array.isArray(t)?t:[t],s=[],o=0;o<r.length;o++)if(void 0!==r[o].field){for(var a=e.raw(),l=e.key(),c="object"===oC(r[o].field)?r[o].field:e.field(r[o].field),u=i.normalizeConfig(r[o],e),h=u.props,d=u.main,f=Object.keys(h),p=!!r[o].trackBy,y=oC(r[o].trackBy),g={},m=[],v=[],x=0;x<a.qDataPages.length;x++){var b=TC(c,a.qDataPages[x],{cache:n});if(-1!==b)for(var _=0;_<a.qDataPages[x].qMatrix.length;_++){var w=a.qDataPages[x].qArea.qTop+_,k=CC({qRow:w},b(a.qDataPages[x].qMatrix[_])),S=AC(d,k,{key:l});if(!d.filter||d.filter(k)){for(var M=0;M<f.length;M++){var E=h[f[M]],C=E.fields||[E];E.fields&&(S[f[M]]=[]);for(var T=0;T<C.length;T++)RC({cache:n,f:c,mainCell:k,p:C[T],prop:f[M],props:h,page:a.qDataPages[x],rowIdx:w,row:a.qDataPages[x].qMatrix[_],sourceKey:l,target:E.fields?S[f[M]]:S,targetProp:E.fields?T:f[M]});if(E.fields){var A=S[f[M]].map((function(t){return t.value})),R=S[f[M]].map((function(t){return t.label}));S[f[M]]={value:"function"==typeof E.value?E.value(A):void 0!==E.value?E.value:A,label:"function"==typeof E.label?E.label(R):String(void 0!==E.label?E.label:S[f[M]].value)}}}p&&i.track({cfg:r[o],itemData:k,obj:S,target:m,tracker:g,trackType:y}),v.push(S)}}}s.push.apply(s,p?gC(i.collect(m,{main:d,propsArr:f,props:h})):v)}return s}function OC(t){var e=0,n=t.children,i=n&&n.length;if(i)for(;--i>=0;)e+=n[i].value;else e=1;t.value=e}function IC(t,e){var n,i,r,s,o,a=new zC(t),l=+t.value&&(a.value=t.value),c=[a];for(null==e&&(e=PC);n=c.pop();)if(l&&(n.value=+n.data.value),(r=e(n.data))&&(o=r.length))for(n.children=new Array(o),s=o-1;s>=0;--s)c.push(i=n.children[s]=new zC(r[s])),i.parent=n,i.depth=n.depth+1;return a.eachBefore(jC)}function PC(t){return t.children}function DC(t){t.data=t.data.data}function jC(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function zC(t){this.data=t,this.depth=this.height=0,this.parent=null}function FC(t){if("function"!=typeof t)throw new Error;return t}zC.prototype=IC.prototype={constructor:zC,count:function(){return this.eachAfter(OC)},each:function(t){var e,n,i,r,s=this,o=[s];do{for(e=o.reverse(),o=[];s=e.pop();)if(t(s),n=s.children)for(i=0,r=n.length;i<r;++i)o.push(n[i])}while(o.length);return this},eachAfter:function(t){for(var e,n,i,r=this,s=[r],o=[];r=s.pop();)if(o.push(r),e=r.children)for(n=0,i=e.length;n<i;++n)s.push(e[n]);for(;r=o.pop();)t(r);return this},eachBefore:function(t){for(var e,n,i=this,r=[i];i=r.pop();)if(t(i),e=i.children)for(n=e.length-1;n>=0;--n)r.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;for(t=n.pop(),e=i.pop();t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)i.push(e=e.parent);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return IC(this).eachBefore(DC)}};var qC={depth:-1},LC={};function VC(t){return t.id}function HC(t){return t.parentId}function BC(t,e){"/"===t.charAt(0)&&(t=t.substring(1));for(var n,i=t.split("/"),r=e,s=0;s<i.length;s++){if("*"===i[s]&&Array.isArray(r)){var o=[];n=i.slice(s+1).join("/");for(var a=0;a<r.length;a++){var l=BC(n,r[a]);Array.isArray(l)?o.push.apply(o,gC(l)):o.push(l)}return o}if(!i[s]&&Array.isArray(r)){var c=new Array(r.length);n=i.slice(s+1).join("/");for(var u=0;u<r.length;u++)c[u]=BC(n,r[u]);return c}i[s]in r&&(r=r[i[s]])}return r}function WC(t,e){var n=e.cache;if("number"==typeof t)return n.fields[t];var i=n.allFields;if("function"==typeof t){for(var r=0;r<i.length;r++)if(t(i[r]))return i[r];return!1}if("string"==typeof t){for(var s=0;s<i.length;s++)if(i[s].key()===t||i[s].title()===t)return i[s]}else if(t&&-1!==i.indexOf(t))return t;throw Error("Field not found: ".concat(t))}var $C=/^qDimensionInfo(?:\/(\d+))?/,UC=/^\/?qMeasureInfo\/(\d+)/,YC=/\/qAttrExprInfo\/(\d+)/,QC=/\/qAttrDimInfo\/(\d+)/;function KC(t){return(t.qColumnOrder&&t.qColumnOrder.length?t.qColumnOrder:t.qDimensionInfo.map((function(t,e){return e}))).filter((function(e){return e<t.qDimensionInfo.length}))}function XC(t,e){var n=e.cube;if(!t)return-1;var i=t.origin&&t.origin()?t.origin().key():t.key(),r=!1,s=-1,o=-1,a=-1,l=-1,c=-1,u=i,h=n.qEffectiveInterColumnSortOrder,d=KC(n);return $C.test(u)&&(r=!0,s=+$C.exec(u)[1],u=i.replace($C,"")),UC.test(u)&&("K"===n.qMode?l=+UC.exec(u)[1]:h&&-1!==h.indexOf(-1)?(l=+UC.exec(u)[1],c=0):c=+UC.exec(u)[1],u=u.replace(UC,"")),u&&(QC.exec(u)?a=+QC.exec(u)[1]:YC.exec(u)&&(o=+YC.exec(u)[1])),{fieldDepth:(r?"S"===n.qMode?d[s]:h?h.indexOf(s):s:h&&-1!==h.indexOf(-1)?h.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:c,attrDimIdx:a,attrIdx:o}}function ZC(t,e){var n,i=function(t,e,n){if(t===e)return function(t){return t};if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(t){for(var e=t,n=0;n<i;++n)e=e.parent;return e}}if(e>t){var r=Math.max(0,Math.min(100,e-t));return function(t){return function t(e,n,i){var r=[];if(!e||!e.length)return r;if(n<=0)r.push.apply(r,gC(i>=0?[e[i]]:e));else for(var s=0;s<e.length;s++)e[s].children&&e[s].children.length&&r.push.apply(r,gC(t(e[s].children,n-1,i)));return r}(t.children,r-1,n)}}return!1}(t.fieldDepth,e.fieldDepth,e.pseudoMeasureIndex);return e.attrDimIdx>=0?n=function(t){var n;return null==t||null===(n=t.qAttrDims)||void 0===n?void 0:n.qValues[e.attrDimIdx]}:e.attrIdx>=0&&(n=function(t){var n;return null==t||null===(n=t.qAttrExps)||void 0===n?void 0:n.qValues[e.attrIdx]}),{nodeFn:i,attrFn:n,valueFn:e.measureIdx>=0?function(t){return t.data.qValues[e.measureIdx]}:function(t){return t.data}}}function GC(t,e,n){var i=n.key,r={value:"function"==typeof t.value?t.value(e):void 0!==t.value?t.value:e};return r.label="function"==typeof t.label?t.label(e):String(void 0!==t.label?t.label:r.value),t.field&&(r.source={key:i,field:t.field.key()}),r}function JC(t){for(var e=t.propsArr,n=t.props,i=t.item,r=t.itemData,s=t.ret,o=t.sourceKey,a=0;a<e.length;a++){var l=n[e[a]],c=l.fields||[l],u=void 0,h=void 0;l.fields&&(u=[],h=[]);for(var d=function(t){var n=c[t],d=void 0,f=void 0,p=void 0,y=void 0,g=void 0,m=void 0;if("primitive"===n.type?(p=n.value,m=String(n.value)):("function"==typeof n.value&&(d=function(t){return n.value(t,i)}),"function"==typeof n.label&&(f=function(t){return n.label(t,i)}),n.accessor?(y=n.accessor(i),Array.isArray(y)?(g=y.map(n.valueAccessor),n.attrAccessor&&(g=g.map(n.attrAccessor)),d&&(p=g.map(d),d=null),f&&(m=g.map(f),f=null),p=n.reduce?n.reduce(p):p,m=n.reduceLabel?n.reduceLabel(m,p):String(p)):m=p=n.attrAccessor?n.attrAccessor(n.valueAccessor(y)):n.valueAccessor(y)):(p=r,m=r)),l.fields){var v=d?d(p):p;u.push(v),h.push(f&&null!=m?f(m):null!=m?m:String(v))}else{var x=d?d(p):p;s[e[a]]={value:x,label:f?f(m):null!=m?m:String(x)},n.field&&(s[e[a]].source={field:n.field.key(),key:o})}},f=0;f<c.length;f++)d(f);u&&(s[e[a]]={value:"function"==typeof l.value?l.value(u,i):u,label:"function"==typeof l.label?l.label(h,i):h})}}var tT=function(t,e,n){var i="K"===t.qMode?"qSubNodes":"qNodes",r=BC("K"===t.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",t);return r&&r[0]?(e.tree=IC(r[0],n.children||function(t){return t[i]}),e.tree):null};function eT(t){for(var e=t.raw().qDataPages.length?t.raw().qDataPages[0].qMatrix:[],n=function(t){var e=t.raw().qColumnOrder,n=t.fields();return e&&e.length===n.length?e:n.map((function(t,e){return e}))}(t),i=t.fields(),r=t.fields().filter((function(t){return"dimension"===t.type()})).map((function(t){return n.indexOf(i.indexOf(t))})),s=t.fields().filter((function(t){return"measure"===t.type()})).map((function(t){return n.indexOf(i.indexOf(t))})),o={__root:{__id:"__root",qValues:[]}},a=0;a<e.length;a++){for(var l=e[a],c="__root",u=!1,h=0;h<r.length;h++){var d=l[r[h]],f="".concat(c,"__").concat(d.qText);o[f]||(o[f]=dC({__id:f,__parent:c,qValues:[]},d),u=!0),c=f}if(u)for(var p=0;p<s.length;p++)o[c].qValues.push(l[s[p]])}var y=Object.keys(o).map((function(t){return o[t]}));return function(){var t=VC,e=HC;function n(n){var i,r,s,o,a,l,c,u=n.length,h=new Array(u),d={};for(r=0;r<u;++r)a=h[r]=new zC(i=n[r]),null!=(l=t(i,r,n))&&(l+="")&&(d[c="$"+(a.id=l)]=c in d?LC:a);for(r=0;r<u;++r)if(a=h[r],null!=(l=e(n[r],r,n))&&(l+="")){if(!(o=d["$"+l]))throw new Error("missing: "+l);if(o===LC)throw new Error("ambiguous: "+l);o.children?o.children.push(a):o.children=[a],a.parent=o}else{if(s)throw new Error("multiple roots");s=a}if(!s)throw new Error("no root");if(s.parent=qC,s.eachBefore((function(t){t.depth=t.parent.depth+1,--u})).eachBefore(jC),s.parent=null,u>0)throw new Error("cycle");return s}return n.id=function(e){return arguments.length?(t=FC(e),n):t},n.parentId=function(t){return arguments.length?(e=FC(t),n):e},n}().id((function(t){return t.__id})).parentId((function(t){return t.__parent}))(y)}var nT=function(t){for(var e=t.propsArr,n=t.props,i=t.cube,r=t.cache,s=t.itemDepthObject,o=t.f,a=0;a<e.length;a++)for(var l=n[e[a]],c=l.fields?l.fields:[l],u=0;u<c.length;u++){var h=c[u];if(h.field!==o){var d=ZC(s,XC(h.field,{cube:i,cache:r}));h.accessor=d.nodeFn,h.valueAccessor=d.valueFn,h.attrAccessor=d.attrFn}}};function iT(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=e.raw(),s=e.key(),o="S"===r.qMode?eT(e):tT(r,n,t);if(!o)return null;for(var a=o.height,l=[],c=0;c<=a;c++){var u=null;if(c>0)if("S"===r.qMode){var h=KC(r),d=h[c-1];u=n.fields[d]}else{var f=r.qEffectiveInterColumnSortOrder[c-1];c>r.qEffectiveInterColumnSortOrder.length&&(f=r.qDimensionInfo.length),u=n.fields[f]}var p=i.normalizeConfig(dC(dC({},t),{},{field:u?u.key():void 0}),e),y=p.props,g=p.main,m=Object.keys(y);l[c]={propsArr:m,props:y,main:g};var v=u?XC(u,{cube:r,cache:n}):{fieldDepth:0};nT({propsArr:m,props:y,cube:r,cache:n,itemDepthObject:v,f:u})}for(var x=o.copy(),b=x.descendants(),_=o.descendants(),w=0;w<_.length;w++){var k=l[_[w].depth].propsArr,S=l[_[w].depth].props,M=l[_[w].depth].main,E=b[w],C=E.data,T=GC(M,C,{key:s});JC({propsArr:k,props:S,item:E,itemData:C,ret:T,sourceKey:s,isTree:!0}),_[w].data=T}return o}function rT(t,e,n,i){for(var r=Array.isArray(t)?t:[t],s=[],o=0;o<r.length;o++)if(void 0!==r[o].field){var a=e.raw(),l=e.key();if(!tT(a,n,t))continue;var c="object"===oC(r[o].field)?r[o].field:e.field(r[o].field),u=i.normalizeConfig(r[o],e),h=u.props,d=u.main,f=Object.keys(h),p=XC(c,{cube:a,cache:n}),y=ZC({fieldDepth:0},p),g=y.nodeFn,m=y.attrFn,v=y.valueFn;nT({propsArr:f,props:h,cube:a,cache:n,itemDepthObject:p,f:c});for(var x=!!r[o].trackBy,b=oC(r[o].trackBy),_={},w=[],k=g(n.tree),S=[],M=0;M<k.length;M++){var E=k[M],C=m?m(v(E)):v(E);if(!d.filter||d.filter(C)){var T=GC(d,C,{key:l});JC({propsArr:f,props:h,item:E,itemData:C,ret:T,sourceKey:l}),x&&i.track({cfg:r[o],itemData:C,obj:T,target:w,tracker:_,trackType:b}),S.push(T)}}s.push.apply(s,x?gC(i.collect(w,{main:d,propsArr:f,props:h})):S)}return s}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var sT=function(t,e){return function(t){t.exports=function(t,e){if(!t||isNaN(+e))return e;var n,i,r,s,o,a,l,c,u,h,d=t.length,f=t.search(/[0-9\-\+#]/),p=f>0?t.substring(0,f):"",y=t.split("").reverse().join(""),g=y.search(/[0-9\-\+#]/),m=d-g,v=t.substring(m,m+1),x=m+("."===v||","===v?1:0),b=g>0?t.substring(x,d):"";if(n=(e="-"===(t=t.substring(f,x)).charAt(0)?-e:+e)<0?e=-e:0,s=(i=t.match(/[^\d\-\+#]/g))&&i[1]&&i[0]||",",t=t.split(r=i&&i[i.length-1]||"."),e=+(e=e.toFixed(t[1]&&t[1].length))+"",a=t[1]&&t[1].lastIndexOf("0"),(!(c=e.split("."))[1]||c[1]&&c[1].length<=a)&&(e=(+e).toFixed(a+1)),u=t[0].split(s),t[0]=u.join(""),(o=t[0]&&t[0].indexOf("0"))>-1)for(;c[0].length<t[0].length-o;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((e=e.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(y="",m=(h=e[0]).length%l,d=h.length,x=0;x<d;x++)y+=h.charAt(x),!((x-m+1)%l)&&x<d-l&&(y+=s);e[0]=y}return e[1]=t[1]&&e[1]?r+e[1]:"","0"!==(i=e.join(""))&&""!==i||(n=!1),p+(n?"-":"")+i+b}}(e={exports:{}}),e.exports}();function oT(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var aT={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"\u03bc","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},lT=/%$/,cT=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,uT=/^\(oct\)/i,hT=/^\(dec\)/i,dT=/^\(hex\)/i,fT=/^\(bin\)/i,pT=/^\(rom\)/i,yT=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,gT=/#|0/g;function mT(t,e,n,i){return t=t.toString(e),n[1]===n[1].toUpperCase()&&(t=t.toUpperCase()),t.length-t.indexOf(".")>10&&(t=t.slice(0,t.indexOf(".")+11)),t.replace(".",i||".")}function vT(t,e,n){var i=oT(t);return n?i:new RegExp(i||"",e)}function xT(t,e,n){var i,r,s,o,a,l,c,u,h,d,f,p=t.pattern;p.indexOf("A")>=0&&(p=p.replace("A",""),t.abbreviate=!0),d=e,(f=n)&&(f=oT(f)),d&&(d=oT(d)),h=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(f,"[#0]+)?")),o=(s=(s=p.match(h))?s[0]:"")?p.substr(0,p.indexOf(s)):p,a=s?p.substring(p.indexOf(s)+s.length):"",s||(s=p?"#":"##########"),e&&e===n&&(r=(i=s.split(n)).pop(),s=i.join("")+n+r,e=""),l=e,e=/,/.test(n)?"\xa4":",",l&&(s=s.replace(vT(l,"g"),e)),c=n,n=".",c&&(s=s.replace(vT(c,"g"),n)),u=(u=s.match(/#/g))?u.length:0;var y,g=p.split(c);g[1]&&(y=g[1].match(gT)),t.prefix=o||"",t.postfix=a||"",t.pattern=p,t.maxPrecision=y?y.length:2,t.percentage=lT.test(p),t.numericPattern=s||"",t.numericRegex=new RegExp("".concat(vT(e,null,!0),"|").concat(vT(n,null,!0)),"g"),t.groupTemp=l,t.decTemp=c,t.t=e,t.d=n,t.temp=u}var bT=function(){function t(e,n,i,r,s){aC(this,t),this.localeInfo=e,this.pattern=n,this.thousandDelimiter=i||",",this.decimalDelimiter=r||".",this.type=s||"numeric",this.patternSeparator=";",this.abbreviations=function(t,e){if(!t||!t.qNumericalAbbreviation)return aT;var n={};return t.qNumericalAbbreviation.split(e).forEach((function(t){var e=t.split(":");2===e.length&&(n[e[0]]=e[1])})),n}(e,this.patternSeparator),this.prepare()}return cC(t,[{key:"clone",value:function(){var e=new t(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}},{key:"format",value:function(t,e,n,i){return this.prepare(e,n,i),this.formatValue(t)}},{key:"prepare",value:function(t,e,n){var i;void 0===t&&(t=this.pattern),void 0===e&&(e=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),t?(this._prepared={positive:{d:n,t:e,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:e,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:e,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},i=this._prepared,t=t.split(this.patternSeparator),i.positive.pattern=t[0],i.negative.pattern=t[1],i.zero.pattern=t[2],yT.test(t[0])&&(i.positive.isFunctional=!0),t[1]?yT.test(t[1])&&(i.negative.isFunctional=!0):i.negative=!1,t[2]?yT.test(t[2])&&(i.zero.isFunctional=!0):i.zero=!1,i.positive.isFunctional||xT(i.positive,e,n),i.negative&&!i.negative.isFunctional&&xT(i.negative,e,n),i.zero&&!i.zero.isFunctional&&xT(i.zero,e,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(t){var e,n,i,r,s,o,a,l,c,u=this._prepared,h="",d="",f=t;if(isNaN(t))return"".concat(f);if(t=+t,!1===u.pattern)return t.toString();if(0===t&&u.zero)return(u=u.zero).pattern;if(t<0&&u.negative?(u=u.negative,t=-t):u=u.positive,s=u.d,o=u.t,u.isFunctional)t=function(t,e,n){var i;return cT.test(e)?t=mT(t,Number(/\d{2}/.exec(e)[0]),e,n):uT.test(e)?t=mT(t,8,e,n):hT.test(e)?t=mT(t,10,e,n):dT.test(e)?t=mT(t,16,e,n):fT.test(e)?t=mT(t,2,e,n):pT.test(e)&&(i="",t<0&&(i="-",t=-t),t=0===(t=Math.floor(t))?"0":t<=5e5?i+(t=function(t,e){for(var n,i="",r=Number(String(t).slice(-3)),s=(t-r)/1e3,o=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),a=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();r>0;)for(n=0;n<o.length;n++)if(o[n]<=r){i+=a[n],r-=o[n];break}for(n=0;n<s;n++)i="M".concat(i);return e[1]!==e[1].toUpperCase()&&(i=i.toLowerCase()),i}(t,e)):e+i+t.toExponential(0)),t}(t,u.pattern,s);else{if(u.percentage&&(t*=100),u.abbreviate){var p,y,g=Object.keys(this.abbreviations).map((function(t){return parseInt(t,10)})).sort((function(t,e){return t-e})),m=g[0];for(a=0,n=Number(Number(t).toExponential().split("e")[1]);m<=n&&a<g.length;)m=g[++a];a>0&&(p=g[a-1]),p&&n>0&&p>0?y=p:(n<0&&p<0||!p)&&(m<0&&m-n<=u.maxPrecision?y=m:p<=n&&!(m>0&&-n<=u.maxPrecision)&&(y=p)),y&&(h=this.abbreviations[y],t/=Math.pow(10,y))}if(i=Math.abs(t),e=u.temp,c=(l=u.numericPattern).split(s)[1],"I"===this.type&&(t=Math.round(t)),r=t,c||"#"!==l.slice(-1)[0])if(i>=1e15||i>0&&i<=1e-14)t=i?i.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(t.toFixed(Math.min(20,c?c.length:0)).split(".")[0]),x=l.split(s)[0];if(t=sT(x+=s,v)||"0",c){var b=Math.max(0,Math.min(14,c.length)),_=c.replace(/#+$/,"").length,w=("I"===this.type?0:i%1).toFixed(b).slice(2).replace(/0+$/,"");for(a=w.length;a<_;a++)w+="0";w&&(t+=s+w)}else 0===v&&(r=0)}else if(i>=Math.pow(10,e)||i<1||i<1e-4)0===t?t="0":i<1e-4||i>=1e20?(t=(t=r.toExponential(Math.max(1,Math.min(14,e))-1)).replace(/\.?0+(?=e)/,""),d=""):(t=t.toPrecision(Math.max(1,Math.min(14,e)))).indexOf(".")>=0&&(t=(t=t.replace(t.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",s));else{for(l+=s,e=Math.max(0,Math.min(20,e-Math.ceil(Math.log(i)/Math.log(10)))),a=0;a<e;a++)l+="#";t=sT(l,t)}t=t.replace(u.numericRegex,(function(t){return t===o?u.groupTemp:t===s?u.decTemp:""})),r<0&&!/^-/.test(t)&&(t="-".concat(t))}return u.prefix+t+d+h+u.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(t){return"".concat(t)}}}}]),t}();function _T(t){var e,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.size,s=void 0===r?5e3:r,o=i.multipleArguments,a=void 0!==o&&o,l=i.toKey,c=void 0===l?function(t){return t}:l,u=Object.create(null),h=Object.create(null),d=0,f=0;return(e=a?function(){return n=c.apply(void 0,arguments),e.has(n)?e.get(n):e.set(n,t.apply(void 0,arguments))}:function(i){return n=c(i),e.has(n)?e.get(n):e.set(n,t(i))}).set=function(t,e){return d>=s&&(delete u[h[f]],delete h[f],d--,f++),u[t]=e,h[d]=t,d++,e},e.get=function(t){return u[t]},e.has=function(t){return t in u},e.clear=function(){u=Object.create(null),h=Object.create(null),d=0,f=0},e.size=function(){return d},e}function wT(t,e,n,i,r){var s=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return yC(bT,e)}(r,t,e,n,i),o=_T(s.formatValue.bind(s),{toKey:function(t){return isNaN(t)?t:+t}});function a(t){return o(t)}return a.format=function(t,e,n,i){return o.clear(),s.format(e,t,n,i)},a.pattern=function(t){return t&&(o.clear(),s.pattern=t,s.prepare()),s.pattern},a}var kT=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ST=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],MT=["January","February","March","April","May","June","July","August","September","October","November","December"],ET=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function CT(t,e){for(var n=t.length;n<e;n++)t="0".concat(t);return t}function TT(t){var e=t.toString().split(".");return e[1]?e=Number("0.".concat(e[1])):0}var AT=function(){function t(e,n,i){aC(this,t);var r,s=e||{};s.qCalendarStrings||(s.qCalendarStrings={qLongDayNames:kT,qDayNames:ST,qLongMonthNames:MT,qMonthNames:ET}),this.localeInfo=s,this.locale_days=s.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=s.qCalendarStrings.qDayNames.slice(),this.locale_months=s.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=s.qCalendarStrings.qMonthNames.slice(),n||(n=(uC(r={},"T",s.qTimeFmt||"hh:mm:ss"),uC(r,"D",s.qDateFmt||"YYYY-MM-DD"),uC(r,"TS",s.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),r)[i]),this.pattern=n}return cC(t,[{key:"clone",value:function(){var e=new t(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}},{key:"format",value:function(t,e){e||(e=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),e=e.replace(/\[.+]|\[|]/g,"");var n,i=/t+/gi.test(e);t instanceof Date?n=function(t,e){var n=t.getUTCHours(),i=t.getUTCDay()-1;return e&&((n%=12)||(n=12)),i<0&&(i=6),{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:i,date:t.getUTCDate(),h:n,m:t.getUTCMinutes(),s:t.getUTCSeconds(),f:t.getUTCMilliseconds(),t:t.getUTCHours()>=12?"pm":"am"}}(t,i):(t<0&&(t=-t,e="-".concat(e)),n=function(t,e){var n,i=function(t){var e=t,n=24*TT(e),i=60*TT(n),r=60*TT(i),s=1e3*TT(r);return{d:Math.floor(e),h:Math.floor(n),m:Math.floor(i),s:Math.floor(r),f:Math.round(s)}}(t),r=i.d,s=i.h,o=i.m,a=i.s,l=i.f,c=0;/w+|t+/gi.test(e)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(t),0,0,Math.round(86400*(t-Math.floor(t))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(e)||(s+=24*r),/h+/gi.test(e)||(o+=60*s),/m+/gi.test(e)||(a+=60*o),/w+/gi.test(e)&&(c=n?n.getDay()-1:0)<0&&(c=6);var u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:r,h:s,m:o,s:a,f:l,t:u}}(t,e));var r=function(t,e){return{"Y+|y+":{Y:"".concat(Number("".concat(e.year).slice(-2))),YY:CT("".concat(e.year).slice(-2),2),YYY:CT("".concat(e.year).slice(-3),3),def:function(t){return CT("".concat(e.year),t.length)}},"M+":{M:e.month+1,MM:CT("".concat(e.month+1),2),MMM:t.locale_months_abbr[e.month],def:t.locale_months[e.month]},"W+|w+":{W:e.day,WW:CT("".concat(e.day),2),WWW:t.locale_days_abbr[e.day],def:t.locale_days[e.day]},"D+|d+":{D:e.date,def:function(t){return CT("".concat(e.date),t.length)}},"h+|H+":{h:e.h,def:function(t){return CT("".concat(e.h),t.length)}},"m+":{m:e.m,def:function(t){return CT("".concat(e.m),t.length)}},"s+|S+":{s:e.s,def:function(t){return CT("".concat(e.s),t.length)}},"f+|F+":{def:function(t){var n="".concat(e.f),i=t.length-n.length;if(i>0)for(var r=0;r<i;r++)n+="0";else i<0&&(n=n.slice(0,t.length));return n}},"t{1,2}|T{1,2}":{def:function(t){var n=e.t;return t[0].toUpperCase()===t[0]&&(n=n.toUpperCase()),n.slice(0,t.length)}}}}(this,n),s=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&s.push(o);var a=new RegExp(s.join("|"),"g");return e.replace(a,(function(t){var e,n,i;for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&(e=new RegExp(n)).test(t))break;if(!e)return"";for(var s in r[n])if(s===t||s.toLowerCase()===t){void 0===(i=r[n][s])&&(i=r[n][s.toLowerCase()]);break}return void 0===i&&(i=r[n].def),"function"==typeof i&&(i=i(t)),i}))}}]),t}();function RT(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return yC(AT,e)}function NT(t){return new Date(Date.UTC(1899,11,30+Math.floor(t),0,0,0,Math.round(864e5*(t-Math.floor(t)))))}function OT(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=RT(n,t,e),r=_T(i.format.bind(i),{toKey:function(t){return"object"===oC(t)&&"function"==typeof t.getTime?t.getTime():t}});function s(t){return"IV"!==e?NT(t):t}function o(t){return t=s(t),r(t)}return o.format=function(t,e){return r.clear(),e=s(e),i.format(e,t)},o.locale=function(n){return i=RT(n,t,e),r=_T(i.format.bind(i),{toKey:function(t){return"object"===oC(t)?t.getTime():t}}),this},o.qtype=function(t){return void 0!==t&&(e=t,r.clear()),e},o}function IT(t,e){if(t&&t.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(t.qNumFormat.qType))return OT(t.qNumFormat.qFmt,t.qNumFormat.qType,e);var n="#",i=e&&void 0!==e.qThousandSep?e.qThousandSep:",",r=e&&void 0!==e.qDecimalSep?e.qDecimalSep:".",s="U",o=t&&!!t.qIsAutoFormat;return t&&t.qNumFormat?(n=t.qNumFormat.qFmt||n,i=t.qNumFormat.qThou||i,r=t.qNumFormat.qDec||r,s=t.qNumFormat.qType||s,o=o&&-1===["M"].indexOf(t.qNumFormat.qType)):o=!0,(o||"U"===s)&&(n="#".concat(r,"##A"),s="U"),wT(n,i,r,s,e)}function PT(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.meta,i=e.id,r=e.key,s=e.localeInfo,o=e.fieldExtractor,a=e.value,l=e.type,c=e.sourceField,u=a||("dimension"===l?function(t){return t.qElemNo}:function(t){return t.qValue}),h=function(t){return t.qText||""},d="dimension"===l?"first":"avg",f=IT(n,s),p="dimension"===l?"first":function(t,e){return f(e)},y={id:function(){return i},key:function(){return r},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return l},origin:function(){return c},items:function(){return t||(t=o(y)),t},min:function(){return n.qMin},max:function(){return n.qMax},value:u,label:h,reduce:d,reduceLabel:p,formatter:function(){return f},tags:function(){return n.qTags}};return y}function DT(t,e,n,i,r){return(e[t]||[]).map((function(e,s){var o="".concat(i?"".concat(i,"/"):"").concat(t,"/").concat(s),a={instance:PT(CC({id:"".concat(n?"".concat(n,"/"):"").concat(o),key:o,meta:e},r))};return a.attrDims=DT("qAttrDimInfo",e,n,o,CC({},r,{value:function(t){return t.qElemNo},type:"dimension"})),a.attrExps=DT("qAttrExprInfo",e,n,o,CC({},r,{value:function(t){return t.qNum},type:"measure"})),a.measures=DT("qMeasureInfo",e,n,o,CC({},r,{value:function(t){return t.qValue},type:"measure"})),a}))}function jT(){var t,e,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=i.key,s=i.data,o=i.config,a=void 0===o?{}:o,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},c=s;if(!c)throw new Error('Missing "data" input');if(!c.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var u=jT.util,h={cache:l,cube:c,localeInfo:a.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:a.virtualFields},d={key:function(){return r},raw:function(){return c},field:function(t){return WC(t,h)},fields:function(){return l.fields.slice()},extract:function(t){return h.extractor(t,d,l,u)},hierarchy:function(t){return h.hierarchy(t,d,l,u)},_cache:function(){return l}};"K"===c.qMode||"T"===c.qMode||!c.qMode&&c.qNodesOnDim?(h.extractor=rT,h.hierarchy=iT,h.pages="K"===c.qMode?c.qStackedDataPages:c.qTreeDataPages):"S"===c.qMode?(h.extractor=NC,h.pages=c.qDataPages,h.hierarchy=iT):h.extractor=function(){return[]},h.fieldExtractor=function(t){return h.extractor({field:t},d,l,u)};var f="S"===c.qMode?function(t){return t.qElemNumber}:void 0,p="S"===c.qMode?function(t){return t.qNum}:void 0;(t=l.wrappedFields).push.apply(t,gC(DT("qDimensionInfo",c,r,"",CC({},h,{value:f,type:"dimension"})))),(e=l.wrappedFields).push.apply(e,gC(DT("qMeasureInfo",c,r,"",CC({},h,{value:p,type:"measure"})))),l.fields=l.wrappedFields.map((function(t){return t.instance}));var y=function t(e){e.forEach((function(e){l.allFields.push(e.instance),t(e.measures),t(e.attrDims),t(e.attrExps)}))};return y(l.wrappedFields),(a.virtualFields||[]).forEach((function(t){var e=d.field(t.from),n=PT(dC({meta:e.raw(),id:"".concat(r,"/").concat(t.key),sourceField:e,fieldExtractor:function(t){return h.extractor({field:t},d,l,u)},key:t.key,type:e.type(),localeInfo:h.localeInfo,value:e.value},t.override||{}));l.virtualFields.push(n)})),(n=l.allFields).push.apply(n,gC(l.virtualFields)),d}var zT=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],FT=/\/qDimensionInfo(?:\/(\d+))?/,qT=/\/qMeasureInfo\/(\d+)/,LT=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,VT=/\/qAttrExprInfo\/(\d+)/,HT=/\/?qHyperCube/,BT=/\/?qTreeData/,WT=function(t){return"".concat(t.substr(0,t.indexOf("/qHyperCubeDef")+14))},$T=function(t){return"".concat(t.substr(0,t.indexOf("/qTreeDataDef")+13))};function UT(t,e){var n=t,i=-1,r=-1,s="",o=function(t){return t};HT.test(t)?(s="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),o=WT):BT.test(t)&&(s="".concat(n.substr(0,n.indexOf("qTreeData")+9)),o=$T);var a=!0;if(FT.test(t)&&(i=+FT.exec(t)[1]),qT.test(t)&&(r=+qT.exec(t)[1]),LT.test(t)){r=-1,i=0;var l=+LT.exec(n)[2];isNaN(l)||(i=l,n=n.replace(/\/\d+$/,"")),a=!1}if(VT.test(t)){var c=r;if(e){r=0;var u=BC(s,e);r+=(u.qMeasureInfo||[]).length,i>-1?(r=u.qDimensionInfo.slice(0,i).reduce((function(t,e){return t+e.qAttrExprInfo.length}),r),i=-1):(r=u.qDimensionInfo.reduce((function(t,e){return t+e.qAttrExprInfo.length}),r),r=u.qMeasureInfo.slice(0,c).reduce((function(t,e){return t+e.qAttrExprInfo.length}),r)),r+=+VT.exec(n)[1]}else i>-1?(i=-1,r=+VT.exec(n)[1]):r+=+VT.exec(n)[1]+1}return zT.forEach((function(t){var e,i=(2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,s=void 0;try{for(var o,a=t[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),2!==n.length);i=!0);}catch(l){r=!0,s=l}finally{try{i||null==a.return||a.return()}finally{if(r)throw s}}return n}}(e)||mC(e,2)||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.")}());n=n.replace(i[0],i[1])})),a&&(n=o(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:r,dimensionIdx:i,path:n}}function YT(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,r=n.byCells,s=n.primarySource,o=[],a={},l=t.isActive(),c=!1;return t.brushes().forEach((function(t){var e=UT(t.id,i);if("range"===t.type&&e.measureIdx>-1&&e.dimensionIdx>-1){var n=t.brush.ranges();n.length&&(c=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:e.path,ranges:[]}),n.forEach((function(t){return a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:e.measureIdx,qDimensionIx:e.dimensionIdx,qRange:{qMin:t.min,qMax:t.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===t.type&&e.measureIdx>-1){var l=t.brush.ranges();l.length&&(c=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:e.path,ranges:[]}),l.forEach((function(t){return a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:e.measureIdx,qRange:{qMin:t.min,qMax:t.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===t.type&&e.dimensionIdx>-1){var u=t.brush.ranges();u.length&&(c=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:e.path,ranges:[]}),u.forEach((function(t){return a.selectHyperCubeContinuousRange.ranges.push({qDimIx:e.dimensionIdx,qRange:{qMin:t.min,qMax:t.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===t.type&&e.dimensionIdx>-1)if(r)if(i&&i.qHyperCube&&("P"===i.qHyperCube.qMode||"T"===i.qHyperCube.qMode||"K"===i.qHyperCube.qMode)){var h=i.qHyperCube,d=h.qNoOfLeftDims,f=h.qEffectiveInterColumnSortOrder.indexOf(e.dimensionIdx);a.selectPivotCells||(a.selectPivotCells={path:e.path,cells:[]}),t.id!==s&&s||(t.brush.values().map((function(t){return+t})).filter((function(t){return!isNaN(t)})).forEach((0===d||f>=d)&&d>-1?function(t){a.selectPivotCells.cells.push({qType:"T",qCol:t,qRow:f-d})}:function(t){a.selectPivotCells.cells.push({qType:"L",qCol:e.dimensionIdx,qRow:t})}),c=!!a.selectPivotCells.cells.length)}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:e.path,cols:[]}),a.selectHyperCubeCells.cols.push(e.dimensionIdx),t.id!==s&&(s||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=t.brush.values().map((function(t){return+t})).filter((function(t){return!isNaN(t)})),c=!!a.selectHyperCubeCells.values.length);else{var p=t.brush.values().map((function(t){return+t})).filter((function(t){return!isNaN(t)}));c=!!p.length,o.push({params:[e.path,e.dimensionIdx,p,!1],method:"selectHyperCubeValues"})}}})),!c&&l?[{method:"resetMadeSelections",params:[]}]:(a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(e=n.orMode)||void 0===e||e]}),a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o)}function QT(t){jT.util=t.data("matrix").util,t.data("q",jT),t.formatter("q-number",wT),t.formatter("q-time",OT)}QT.qBrushHelper=YT,QT.selections=YT;var KT=QT,XT={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function ZT(t){return XT[t]||t}function GT(t){return function(e,n,i){var r,s,o,a,l=[],c=!0;function u(){"function"==typeof r.enable&&(r.enable=r.enable.bind(s)()),r.enable&&(r.gestures.forEach((function(e){e.options=e.options||{},void 0===e.options.enable&&(e.options.enable=!0),"function"==typeof e.options.enable&&(e.options.enable=e.options.enable.bind(s));var n=ZT(e.type);t&&t[n]&&(e.options.event=e.options.event||e.type.toLowerCase(),(o=o||new t.Manager(i)).add(new t[n](e.options)),Object.keys(e.events).forEach((function(t){e.events[t]=e.events[t].bind(s),o.on(t,e.events[t])})),l.push(e))})),r.gestures.forEach((function(e){var n=ZT(e.type);t&&t[n]&&(e.recognizeWith&&o.get(e.options.event).recognizeWith(e.recognizeWith.split(" ").filter((function(t){return""!==t}))),e.requireFailure&&o.get(e.options.event).requireFailure(e.requireFailure.split(" ").filter((function(t){return""!==t}))))})))}function h(){l.forEach((function(t){Object.keys(t.events).forEach((function(e){o.off(e,t.events[e])})),o.remove(t.options.event)})),l=[]}return{get key(){return a},set:function(t){!function(t){a=t.key,s={chart:e,mediator:n,settings:r=t},r.gestures=r.gestures||[],void 0===r.enable&&(r.enable=!0)}(t),h(),c&&u()},off:function(){c=!1,h()},on:function(){c=!0,0===l.length&&u()},destroy:function(){h(),o&&o.destroy(),o=null,s=null,r=null}}}}function JT(t){if("function"!=typeof t.interaction)return function(e){e.interaction("hammer",GT(t))};t.interaction("hammer",GT(Hammer))}var tA=n("oEtN");const eA=["scroll"],nA=["scrollHandle"];let iA=(()=>{class t{constructor(t){this.elRef=t,this.scrollOffset=0,this.scrollOffsetChange=new Do,this.miniMapHandleHeight=0}onMouseMove(t){if(this.dragStartEvent){t.preventDefault();const e=Math.min(Math.max(0,"horizontal"===this.orientation?t.clientY-this.offset-this.dragStartEvent.offsetY:t.clientX-this.offset-this.dragStartEvent.offsetX),this.height-this.miniMapHandleHeight);this.changeScrollOffset(e/this.height)}}onMouseUp(t){this.dragStartEvent=null}changeScrollOffset(t){this.scrollOffset=t,this.scrollOffsetChange.emit(t)}get miniMapHandleStyle(){const t=this.scrollOffset*this.height;return{width:"horizontal"===this.orientation?"100%":this.miniMapHandleHeight+"px",height:"horizontal"===this.orientation?this.miniMapHandleHeight+"px":"100%",right:"horizontal"===this.orientation?0:void 0,top:"horizontal"===this.orientation?t+"px":void 0,left:"horizontal"===this.orientation?void 0:t+"px",bottom:"horizontal"===this.orientation?void 0:0}}ngAfterViewInit(){this.scrollInstance=sC.chart(Object.assign({element:this.scrollEl.nativeElement},this.picassoBackground)),this.miniMapHandleHeight=this.height/this.totalItemCount*this.itemsInView}onMouseDown(t){this.dragStartEvent=t}ngOnChanges(t){}get height(){return"horizontal"===this.orientation?this.elRef.nativeElement.getBoundingClientRect().height:this.elRef.nativeElement.getBoundingClientRect().width}get offset(){return"horizontal"===this.orientation?this.elRef.nativeElement.getBoundingClientRect().top:this.elRef.nativeElement.getBoundingClientRect().left}onResized(){console.log(this.scrollOffset),this.miniMapHandleHeight=this.height/this.totalItemCount*this.itemsInView,this.scrollInstance.update()}}return t.\u0275fac=function(e){return new(e||t)(us($s))},t.\u0275cmp=oe({type:t,selectors:[["drayman-mini-map-internal"]],viewQuery:function(t,e){var n;1&t&&(Yo(eA,!0),Yo(nA,!0)),2&t&&(Uo(n=Qo())&&(e.scrollEl=n.first),Uo(n=Qo())&&(e.scrollHandleEl=n.first))},hostBindings:function(t,e){1&t&&ms("mousemove",(function(t){return e.onMouseMove(t)}),!1,Rn)("mouseup",(function(t){return e.onMouseUp(t)}),!1,Rn)},inputs:{totalItemCount:"totalItemCount",picassoBackground:"picassoBackground",itemsInView:"itemsInView",orientation:"orientation",scrollOffset:"scrollOffset"},outputs:{scrollOffsetChange:"scrollOffsetChange"},features:[Ee],decls:5,vars:2,consts:[[1,"mini-map-wrapper",3,"resized"],[1,"mini-map"],["scroll",""],[1,"mini-map-handle",3,"mousedown"],["scrollHandle",""]],template:function(t,e){1&t&&(fs(0,"div",0),ms("resized",(function(){return e.onResized()})),ys(1,"div",1,2),fs(3,"div",3,4),ms("mousedown",(function(t){return e.onMouseDown(t)})),ps(),ps()),2&t&&(_i(3),Ns(e.miniMapHandleStyle))},directives:[Qh],styles:[".mini-map-wrapper[_ngcontent-%COMP%]{display:flex;position:relative;width:100%;height:100%}.mini-map-handle[_ngcontent-%COMP%]{background-color:#000;opacity:.2;position:absolute}.mini-map[_ngcontent-%COMP%]{opacity:.5;flex:1;position:relative}"]}),t})();const rA=["container"];function sA(t,e){if(1&t){const t=Ue();fs(0,"drayman-mini-map-internal",4),ms("scrollOffsetChange",(function(e){return We.lFrame.contextLView=t,bs().onScrollOffsetChange(e)})),ps()}if(2&t){const t=bs();hs("totalItemCount",t.qLayout.qHyperCube.qDataPages[0].qMatrix.length)("picassoBackground",t.picassoMiniMapBackground)("orientation",t.settings.orientation)("scrollOffset",t.scrollOffset)("itemsInView",t.itemsInView)}}const oA=function(t){return{flexDirection:t}};let aA=(()=>{class t{constructor(t,e){this.elRef=t,this.cdRef=e,this.clearSelections=()=>{const t=this.instance.brush("select");this.instance.component("my-brush-area-component").emit("rangeClear"),this.instance.component("my-brush-area-component-2").emit("rangeClear"),t.end()},this.itemsInView=0,this.scrollOffset=0,this.selectionChanges$=new k,this.updated=!1,this.selectionChangesSubscription=this.selectionChanges$.pipe(function(t,e=Wa){return n=>n.lift(new Oh(t,e))}(500)).subscribe(()=>{var t,e;const n=this.instance.brush("select"),i=KT.selections(n);i.map(t=>t.method).includes("resetMadeSelections")?null===(t=this.onSelectionsChange)||void 0===t||t.call(this,{selections:[]}):null===(e=this.onSelectionsChange)||void 0===e||e.call(this,{selections:i})})}ngOnDestroy(){this.selectionChangesSubscription&&this.selectionChangesSubscription.unsubscribe()}ngAfterViewInit(){var t,e,n,i,r;sC.use(KT),sC.use(JT);const s=this.settings.colorPalette;this.picassoMiniMapBackground={settings:{scales:{y:{data:{field:this.qLayout.qHyperCube.qMeasureInfo[0].qFallbackTitle},invert:"horizontal"!==this.settings.orientation,include:[0]},t:{data:{extract:{field:this.qLayout.qHyperCube.qDimensionInfo[0].qFallbackTitle}}}}},data:{type:"q",key:"qHyperCube",data:this.qLayout.qHyperCube}};const o={key:"leftAxis",type:"axis",dock:"left",scale:"horizontal"===this.settings.orientation?"primaryCategoryScale":"primaryValueScale"},a={key:"bottomAxis",type:"axis",dock:"bottom",scale:"horizontal"===this.settings.orientation?"primaryValueScale":"primaryCategoryScale"},l={key:"topAxis",type:"axis",dock:"top",scale:"horizontal"===this.settings.orientation?"secondaryValueScale":"secondaryCategoryScale"},c={key:"rightAxis",type:"axis",dock:"right",scale:"horizontal"===this.settings.orientation?"secondaryCategoryScale":"secondaryValueScale"},u={key:"gridLines",type:"grid-line",layout:{displayOrder:-1},["horizontal"===this.settings.orientation?"x":"y"]:{scale:"primaryValueScale"}};let h=this.settings.legend.dock;"auto"===h&&(h="horizontal"===this.settings.orientation?"bottom":"right");const d={key:"legend",type:"legend-cat",dock:h,scale:{type:"categorical-color",data:this.settings.measures.map(t=>t.title),range:s},settings:{layout:{size:2}}};this.settings.legend.showTitle&&(d.settings.title={text:"Measures"});let f=[o,a];"combochart"===this.settings.type&&f.push("horizontal"===this.settings.orientation?l:c);const p=(t,e,n=1,i=0)=>{console.log({barMeasures:t,boxId:e,groupCount:n});var r=1/n*1,s=1*r,o=.5/n*(1+0*(n-1));return{key:"bar-"+e,type:"box",data:{extract:t.map((e,n)=>(this.settings.measures.findIndex(t=>t.title===e.title),{field:this.settings.dimensions[0].title,props:{formatter:"primary"===e.axis?"primaryAxisFormatter":"secondaryAxisFormatter",valueForLabel:{field:e.title},rofl:{field:this.settings.dimensions[1].title},start:0===n?0:{field:t[n-1].title},end:{field:e.title},tooltip:{field:this.settings.dimensions[0].title,value:t=>{var e,n;if(1===(null===(n=null===(e=t.qAttrExps)||void 0===e?void 0:e.qValues)||void 0===n?void 0:n.length))return t.qAttrExps.qValues[0].qText}},dimDef:Object.assign(Object.assign({},this.settings.colors.scale.data),{value:t=>(console.log("flat",Object(tA.flatten)(t)),"individual"===this.settings.colors.scale.type?e.color:Object(tA.flatten)(t)[this.settings.colors.dataAccessor])}),measure:e.title}}))},settings:{major:{scale:"primaryCategoryScale",fn:function(t){return console.log("major",t),t.scale(t.datum.value)+o*t.scale.bandwidth()+i*t.scale.bandwidth()*r}},minor:{start:t=>{const e=t.data.items.filter(e=>e.value===t.datum.value);let n=0;for(let i of e)if(n+=i.start.value,i.end.source.field===t.datum.end.source.field)break;return t.resources.scale("primaryValueScale")(n)},end:t=>{const e=t.data.items.filter(e=>e.value===t.datum.value);let n=0;for(let i of e)if(n+=i.end.value,i.end.source.field===t.datum.end.source.field)break;return t.resources.scale("primaryValueScale")(n)}},orientation:this.settings.orientation,box:{fill:t=>(console.log(t),this.settings.colors.scale.type?"individual"===this.settings.colors.scale.type?t.datum.dimDef.value:t.resources.scale("myScale")(t.datum.dimDef.value):t.datum.dimDef.value),width:s,stroke:this.settings.measures[0].barStroke,strokeWidth:this.settings.measures[0].barStrokeWidth}}}};if("stacked"===this.settings.barGrouping)f.push(p(this.settings.measures.filter(t=>"bar"===t.type),0,1));else if("grouped"===this.settings.barGrouping){const t=this.settings.measures.filter(t=>"bar"===t.type).length;let e=0;for(let n=0;n<this.settings.measures.length;n++){const i=this.settings.measures[n];"bar"===i.type&&(f.push(p([i],n,t,e)),e++)}}for(let v=0;v<this.settings.measures.length;v++){const t=this.settings.measures[v];if("bar"===t.type&&"stacked"!==this.settings.barGrouping&&"grouped"!==this.settings.barGrouping)f.push(p([t],v,1));else if("line"===t.type){const e={key:"line-"+v,type:"line",data:{extract:{field:this.settings.dimensions[0].title,props:{v:{field:t.title}}}},settings:{coordinates:{major:{scale:"primaryCategoryScale"},minor:{scale:"primary"===t.axis?"primaryValueScale":"secondaryValueScale",ref:"v"}},orientation:"horizontal"===this.settings.orientation?"vertical":"horizontal",layers:{line:{stroke:s[v]}}}};"area"===t.lineType&&(e.settings.layers.area={fill:s[v],opacity:.3}),f.push(e),t.showDataPoint&&f.push({key:"data-point-"+v,type:"point",data:{extract:{field:this.settings.dimensions[0].title,props:{tooltip:{field:this.settings.dimensions[0].title,value:t=>{var e,n;if(1===(null===(n=null===(e=t.qAttrExps)||void 0===e?void 0:e.qValues)||void 0===n?void 0:n.length))return t.qAttrExps.qValues[0].qText}},formatter:"primary"===t.axis?"primaryAxisFormatter":"secondaryAxisFormatter",valueForLabel:{field:t.title},v:{field:t.title},measure:t.title}}},settings:{fill:s[v],sizeLimits:{maxPx:7,minPx:7},x:{scale:"primaryCategoryScale"},y:{scale:"primary"===t.axis?"primaryValueScale":"secondaryValueScale",ref:"v"}}}),f.push({key:"data-point-label-"+v,type:"labels",displayOrder:2,settings:{sources:[{component:"data-point-"+v,selector:"circle",strategy:{type:"bar",settings:{direction:"right",labels:[{placements:[{position:"outside",overflow:!0,fill:"black"}],label:t=>(console.log({a:t}),t.formatter(t.data.formatter.value)(t.data.valueForLabel.value))}]}}}]}})}else"marker"===t.type&&f.push({key:"marker-"+v,type:"point",data:{extract:{field:this.settings.dimensions[0].title,props:{v:{field:t.title}}}},settings:{fill:s[v],sizeLimits:{maxPx:7,minPx:7},x:{scale:"primaryCategoryScale"},y:{scale:"primary"===t.axis?"primaryValueScale":"secondaryValueScale",ref:"v"}}})}f.push({key:"tooltip",type:"tooltip",displayOrder:3,settings:{filter:t=>t.filter(t=>{var e,n;return(null===(e=t.data)||void 0===e?void 0:e.valueForLabel)||(null===(n=t.data)||void 0===n?void 0:n.tooltip)}),extract:t=>{var e,n,i,r,s;console.log(t);const o=[];return(null===(n=null===(e=t.node)||void 0===e?void 0:e.data)||void 0===n?void 0:n.tooltip)&&o.push({data:t.node.data.tooltip.value}),(null===(s=null===(r=null===(i=t.node)||void 0===i?void 0:i.data)||void 0===r?void 0:r.valueForLabel)||void 0===s?void 0:s.value)&&(o.push({data:t.node.data.label,style:{"font-weight":"bold"}}),o.push({data:`${t.node.data.measure.value}: ${t.resources.formatter(t.node.data.formatter.value)(t.node.data.valueForLabel.value)}`})),o},content:t=>{console.log({c:t}),console.log("LENGTH",t.data.length);const e=[];for(let n of t.data||[])for(let t of n.filter(t=>!!t))console.log({item:t,content:e}),e.find(e=>e.data===t.data)||e.push(t);if(e.length)return t.h("div",{style:{display:"flex","flex-direction":"column",gap:"5px"}},e.map(e=>t.h("div",e.style?{style:e.style}:{},e.data)))},afterShow({element:t}){t.children[0].style.opacity=1,t.children[1].style.opacity=1},onHide({element:t}){t.children[0].style.opacity=0,t.children[1].style.opacity=0},placement:{type:"bounds",area:"target"}},style:{content:{"border-spacing":"4px",opacity:0,transition:"opacity 150ms ease-in",width:"250px"},arrow:{opacity:0,transition:"opacity 150ms ease-in"}}});const y={interactions:[{key:"legend-navigation",type:"native",events:{click:t=>{console.log("click event!",t.target.getAttribute("data-action"),t),t.preventDefault(),this.instance.component("legend").emit(t.target.getAttribute("data-action"))},mousemove:t=>{this.instance.component("tooltip").emit("show",t)},mouseleave:t=>{this.instance.component("tooltip").emit("hide")}}}],formatters:{primaryAxisFormatter:{data:{field:null===(t=this.settings.measures.find(t=>"primary"===t.axis))||void 0===t?void 0:t.title}},secondaryAxisFormatter:{data:{field:null===(e=this.settings.measures.find(t=>"secondary"===t.axis))||void 0===e?void 0:e.title}}},scales:{primaryValueScale:{data:{field:this.settings.measures.find(t=>"primary"===t.axis).title},invert:"horizontal"!==this.settings.orientation,min:this.settings.primaryAxis.min,max:this.settings.primaryAxis.max},secondaryValueScale:{data:{field:null===(n=this.settings.measures.find(t=>"secondary"===t.axis))||void 0===n?void 0:n.title},invert:"horizontal"!==this.settings.orientation,min:null===(i=this.settings.secondaryAxis)||void 0===i?void 0:i.min,max:null===(r=this.settings.secondaryAxis)||void 0===r?void 0:r.max},myScale:this.settings.colors.scale,primaryCategoryScale:{data:{extract:{field:this.settings.dimensions[0].title}},paddingInner:.2,range:()=>{if(this.showMiniMap){const t=this.qLayout.qHyperCube.qDataPages[0].qMatrix.length/this.itemsInView,e=-Math.min(this.scrollOffset*t,t-1);return[e,e+t]}return[0,1]}}},components:f};y.components.push(u),this.instance=sC.chart({element:this.containerEl.nativeElement,settings:y,data:{type:"q",key:"qHyperCube",data:this.qLayout.qHyperCube}});const g=sC.data("q")({key:"qHyperCube",data:this.qLayout.qHyperCube});console.log("extract",g.extract(this.settings.measures.map((t,e)=>{const n=this.settings.measures.findIndex(e=>e.title===t.title);return{field:this.settings.dimensions[0].title,props:{idx:n,end:{field:t.title}}}})));const m=this.instance.brush("select");console.log(m),m.clear=t=>{},m.on("update",(t,e)=>{console.log(KT.selections(m)),this.selectionChanges$.next()})}ngOnChanges(t){if(console.log(this.qLayout.qHyperCube),t.qHyperCube&&this.instance&&JSON.stringify(this.qLayout.qHyperCubePrevious)!==JSON.stringify(this.qLayout.qHyperCube)){console.log(this.qLayout.qHyperCube);const{height:t,width:e}=(this.instance.component("bars")||this.instance.component("line")||this.instance.component("bar-0")).rect,n={type:"q",key:"qHyperCube",data:this.qLayout.qHyperCube};this.picassoMiniMapBackground.data=n,this.showMiniMap=!1,this.cdRef.detectChanges();const i="grouped"===this.settings.barGrouping?this.settings.measures.filter(t=>"bar"===t.type).length:1;this.itemsInView=("horizontal"===this.settings.orientation?t:e)/30/(i+.2*i),this.showMiniMap=this.itemsInView<this.qLayout.qHyperCube.qDataPages[0].qMatrix.length,this.scrollOffset=0,this.instance.update({data:n})}this.qLayout.qHyperCubePrevious=this.qLayout.qHyperCube}onResized(t){const e="grouped"===this.settings.barGrouping?this.settings.measures.filter(t=>"bar"===t.type).length:1,{height:n,width:i}=(this.instance.component("bars")||this.instance.component("line-0")||this.instance.component("bar-0")).rect;this.itemsInView=("horizontal"===this.settings.orientation?n:i)/30/(e+.2*e),this.showMiniMap=this.itemsInView<this.qLayout.qHyperCube.qDataPages[0].qMatrix.length,this.scrollOffset=Math.min(Math.max(0,this.scrollOffset),1-this.itemsInView/this.qLayout.qHyperCube.qDataPages[0].qMatrix.length),this.instance&&this.instance.update()}onScrollOffsetChange(t){this.scrollOffset=t,this.instance.update({partialData:!0})}onWheel(t){t.preventDefault();const{deltaY:e,deltaX:n}=t;this.scrollOffset=Math.min(Math.max(0,this.scrollOffset+("horizontal"===this.settings.orientation?n:e)/this.height/5),1-this.itemsInView/this.qLayout.qHyperCube.qDataPages[0].qMatrix.length),console.log(this.scrollOffset,{deltaY:e,deltaX:n}),this.instance.update({partialData:!0})}get height(){return"horizontal"===this.settings.orientation?this.elRef.nativeElement.getBoundingClientRect().height:this.elRef.nativeElement.getBoundingClientRect().width}}return t.\u0275fac=function(e){return new(e||t)(us($s),us(Hr))},t.\u0275cmp=oe({type:t,selectors:[["drayman-picasso-internal"]],viewQuery:function(t,e){var n;1&t&&Yo(rA,!0),2&t&&Uo(n=Qo())&&(e.containerEl=n.first)},inputs:{settings:"settings",qLayout:"qLayout",theme:"theme",clearSelections:"clearSelections",onSelectionsChange:"onSelectionsChange"},features:[Ee],decls:4,vars:5,consts:[[1,"picasso-wrapper",2,"width","100%","height","100%",3,"wheel","resized"],[1,"picasso-container",2,"flex","1"],["container",""],["style","flex: 0 0 40px;",3,"totalItemCount","picassoBackground","orientation","scrollOffset","itemsInView","scrollOffsetChange",4,"ngIf"],[2,"flex","0 0 40px",3,"totalItemCount","picassoBackground","orientation","scrollOffset","itemsInView","scrollOffsetChange"]],template:function(t,e){var n,i,r,s;1&t&&(fs(0,"div",0),ms("wheel",(function(t){return e.onWheel(t)}))("resized",(function(t){return e.onResized(t)})),ys(1,"div",1,2),function(t,e,n,i,r,s,o,a){const l=Ue(),c=Ye(),u=c.firstCreatePass?function(t,e,n,i,r,s,o,a,l){const c=e.consts,u=Oi(e,n[6],3,0,"drayman-mini-map-internal",Ve(c,3));Wi(e,n,u,Ve(c,undefined)),fn(e,u);const h=u.tViews=Li(2,-1,i,1,5,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c),d=Hi(0,null,2,-1,null,null);return d.injectorIndex=u.injectorIndex,h.node=d,null!==e.queries&&(e.queries.template(e,u),h.queries=e.queries.embeddedTView(u)),u}(0,c,l,e):c.data[23];Ke(u,!1);const h=l[11].createComment("");Cr(c,l,h,u),ni(h,l),sr(l,l[23]=nr(h,l,h,u)),we(u)&&zi(c,l,u)}(0,sA),ps()),2&t&&(Ns((n=3,i=oA,r="horizontal"===e.settings.orientation?"row":"column",function(t,e,n,i,r,s){const o=e+n;return cs(t,o,r)?function(t,e,n){return t[e]=n}(t,o+1,s?i.call(s,r):i(r)):function(t,e){const n=t[e];return n===gi?void 0:n}(t,o+1)}(Ue(),function(){const t=We.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}(),n,i,r,s))),_i(3),hs("ngIf",e.instance&&e.height&&e.showMiniMap))},directives:[Qh,ll,iA],styles:[".picasso-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;display:flex;overscroll-behavior-x:contain}.picasso-container[_ngcontent-%COMP%]{position:relative}"]}),t})(),lA=(()=>{class t{constructor(t){this.injector=t}ngDoBootstrap(){const t=function(t,e){const n=function(t,e){return e.get(Ws).resolveComponentFactory(t).inputs}(t,e.injector),i=e.strategyFactory||new _l(t,e.injector),r=function(t){const e={};return t.forEach(({propName:t,templateName:n})=>{var i;e[(i=n,i.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()))]=t}),e}(n);class s extends kl{constructor(t){super(),this.injector=t}get ngElementStrategy(){if(!this._ngElementStrategy){const t=this._ngElementStrategy=i.create(this.injector||e.injector),r=n.filter(({propName:t})=>this.hasOwnProperty(t)).map(({propName:t})=>[t,this[t]]);this instanceof s?r.forEach(([t])=>delete this[t]):Sl(n,this),r.forEach(([e,n])=>t.setInputValue(e,n))}return this._ngElementStrategy}attributeChangedCallback(t,e,n,i){this.ngElementStrategy.setInputValue(r[t],n)}connectedCallback(){let t=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),t=!0),this.ngElementStrategy.connect(this),t||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(t=>{const e=function(t,e,n){if("function"!=typeof CustomEvent){const i=t.createEvent("CustomEvent");return i.initCustomEvent(e,!1,!1,n),i}return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:n})}(this.ownerDocument,t.name,t.value);this.dispatchEvent(e)})}}return s.observedAttributes=Object.keys(r),Object.defineProperty(s.prototype,"ngElementStrategy",{enumerable:!0}),Sl(n,s.prototype),s}(aA,{injector:this.injector});customElements.define("drayman-picasso",t)}}return t.\u0275mod=ue({type:t}),t.\u0275inj=at({factory:function(e){return new(e||t)(Wt(is))},providers:[{provide:ml,useClass:Nh}],imports:[[Gl,Rh,$h,Kh]]}),t})();(function(){if(ti)throw new Error("Cannot enable prod mode after platform setup.");Jn=!1})(),Xl().bootstrapModule(lA).catch(t=>console.error(t))},zn8P:function(t,e){function n(t){return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}))}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"}});
|