@rcsb/rcsb-statistics 0.3.43 → 0.3.44-dev.aipcb.0
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/README.md +12 -0
- package/build/ai/chart-catalog.json +61 -0
- package/build/ai/chart-core.d.ts +39 -0
- package/build/ai/chart-core.js +1 -0
- package/build/index.html +1 -1
- package/build/static/css/221.70921a0b.chunk.css +73 -0
- package/build/static/css/81.70921a0b.chunk.css +73 -0
- package/build/static/css/main.894a09f3.css +10 -0
- package/build/static/js/221.6ab15159.chunk.js +1 -0
- package/build/static/js/233.044321e4.chunk.js +2 -0
- package/build/static/js/233.044321e4.chunk.js.LICENSE.txt +13 -0
- package/build/static/js/417.a91bf47f.chunk.js +1 -0
- package/build/static/js/463.93a9a793.chunk.js +1 -0
- package/build/static/js/503.aa3a1e3b.chunk.js +1 -0
- package/build/static/js/646.d06a86d8.chunk.js +1 -0
- package/build/static/js/669.4bc24392.chunk.js +2 -0
- package/build/static/js/{152.d0d96551.chunk.js.LICENSE.txt → 669.4bc24392.chunk.js.LICENSE.txt} +0 -14
- package/build/static/js/690.c5f42ab2.chunk.js +1 -0
- package/build/static/js/732.59dd3430.chunk.js +1 -0
- package/build/static/js/81.3f4b69e8.chunk.js +1 -0
- package/build/static/js/main.760776f1.js +2 -0
- package/package.json +2 -1
- package/build/static/css/main.a8ce960b.css +0 -8
- package/build/static/js/10.d9d49a66.chunk.js +0 -1
- package/build/static/js/109.2ff3158c.chunk.js +0 -1
- package/build/static/js/152.d0d96551.chunk.js +0 -2
- package/build/static/js/317.c95bf735.chunk.js +0 -1
- package/build/static/js/47.96ede111.chunk.js +0 -1
- package/build/static/js/613.8638dc20.chunk.js +0 -1
- package/build/static/js/630.bc43e10d.chunk.js +0 -1
- package/build/static/js/main.75a73ba9.js +0 -2
- /package/build/static/js/{main.75a73ba9.js.LICENSE.txt → main.760776f1.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 152.d0d96551.chunk.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_rcsb_rcsb_statistics=self.webpackChunk_rcsb_rcsb_statistics||[]).push([[152],{7704(t,e){"use strict";function n(t,e,i){const r=null!=i?i:[];return(o=t,o.map(t=>"value"in t?{name:t.name,buckets:[{label:t.name,population:t.value}]}:t)).forEach(t=>{const i=t.buckets.filter(t=>Array.isArray(t.facets));i.length>0&&i.forEach(t=>{t.facets&&n(t.facets,e?e.concat(t.label):[t.label],r)});const o={name:t.name,labelPath:null!=e?e:[],data:[]};t.buckets.forEach(t=>{t.label&&t.population&&o.data.push({label:t.label,population:t.population})}),r.push(o)}),r;var o}e.z=void 0,e.z=function(t){return t.facets?n(t.facets):[]}},8154(t,e,n){"use strict";e.vw=void 0;n(7231),n(2543);e.vw=function t(e,n){Array.isArray(n.facets)&&n.facets.forEach(n=>t(e,n)),"name"in n&&"attribute"in n&&(Array.isArray(n.facets)?n.facets.unshift(e):n.facets=[e])}},3839(t,e,n){"use strict";n.d(e,{Ay:()=>nt});var i=n(7168),r=n.n(i),o=n(9311);const s=t=>t&&t.enabled&&t.modifierKey,a=(t,e)=>t&&e[t+"Key"],l=(t,e)=>t&&!e[t+"Key"];function c(t,e,n){return void 0===t||("string"==typeof t?-1!==t.indexOf(e):"function"==typeof t&&-1!==t({chart:n}).indexOf(e))}function u(t,e){return"function"==typeof t&&(t=t({chart:e})),"string"==typeof t?{x:-1!==t.indexOf("x"),y:-1!==t.indexOf("y")}:{x:!1,y:!1}}function h(t,e,n){const{mode:i="xy",scaleMode:r,overScaleMode:s}=t||{},a=function({x:t,y:e},n){const i=n.scales,r=Object.keys(i);for(let n=0;n<r.length;n++){const o=i[r[n]];if(e>=o.top&&e<=o.bottom&&t>=o.left&&t<=o.right)return o}return null}(e,n),l=u(i,n),c=u(r,n);if(s){const t=u(s,n);for(const e of["x","y"])t[e]&&(c[e]=l[e],l[e]=!1)}if(a&&c[a.axis])return[a];const h=[];return(0,o.F)(n.scales,function(t){l[t.axis]&&h.push(t)}),h}const f=new WeakMap;function d(t){let e=f.get(t);return e||(e={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{},dragging:!1,panning:!1},f.set(t,e)),e}function p(t,e,n,i){const r=Math.max(0,Math.min(1,(t-e)/n||0));return{min:i*r,max:i*(1-r)}}function g(t,e){const n=t.isHorizontal()?e.x:e.y;return t.getValueForPixel(n)}function m(t,e,n){const i=t.max-t.min,r=i*(e-1);return p(g(t,n),t.min,i,r)}function v(t,e,n,i,r){let s=n[i];if("original"===s){const n=t.originalScaleLimits[e.id][i];s=(0,o.v)(n.options,n.scale)}return(0,o.v)(s,r)}function y(t,{min:e,max:n},i,r=!1){const s=d(t.chart),{options:a}=t,l=function(t,e){return e&&(e[t.id]||e[t.axis])||{}}(t,i),{minRange:c=0}=l,u=v(s,t,l,"min",-1/0),h=v(s,t,l,"max",1/0);if("pan"===r&&(e<u||n>h))return!0;const f=t.max-t.min,p=r?Math.max(n-e,c):f;if(r&&p===c&&f<=c)return!0;const g=function(t,{min:e,max:n,minLimit:i,maxLimit:r},s){const a=(t-n+e)/2;e-=a,n+=a;const l=s.min.options??s.min.scale,c=s.max.options??s.max.scale,u=t/1e6;return(0,o.aK)(e,l,u)&&(e=l),(0,o.aK)(n,c,u)&&(n=c),e<i?(e=i,n=Math.min(i+t,r)):n>r&&(n=r,e=Math.max(r-t,i)),{min:e,max:n}}(p,{min:e,max:n,minLimit:u,maxLimit:h},s.originalScaleLimits[t.id]);return a.min=g.min,a.max=g.max,s.updatedScaleLimits[t.id]=g,t.parse(g.min)!==t.min||t.parse(g.max)!==t.max}const _=t=>0===t||isNaN(t)?0:t<0?Math.min(Math.round(t),-1):Math.max(Math.round(t),1),b={second:500,minute:3e4,hour:18e5,day:432e5,week:3024e5,month:1296e6,quarter:5184e6,year:157248e5};function x(t,e,n,i=!1){const{min:r,max:o,options:s}=t,a=s.time&&s.time.round,l=b[a]||0,c=t.getValueForPixel(t.getPixelForValue(r+l)-e),u=t.getValueForPixel(t.getPixelForValue(o+l)-e);return!(!isNaN(c)&&!isNaN(u))||y(t,{min:c,max:u},n,!!i&&"pan")}function w(t,e,n){return x(t,e,n,!0)}const k={category:function(t,e,n,i){const r=m(t,e,n);return t.min===t.max&&e<1&&function(t){const e=t.getLabels().length-1;t.min>0&&(t.min-=1),t.max<e&&(t.max+=1)}(t),y(t,{min:t.min+_(r.min),max:t.max-_(r.max)},i,!0)},default:function(t,e,n,i){const r=m(t,e,n);return y(t,{min:t.min+r.min,max:t.max-r.max},i,!0)},logarithmic:function(t,e,n,i){const r=function(t,e,n){const i=g(t,n);if(void 0===i)return{min:t.min,max:t.max};const r=Math.log10(t.min),o=Math.log10(t.max),s=o-r,a=p(Math.log10(i),r,s,s*(e-1));return{min:Math.pow(10,r+a.min),max:Math.pow(10,o-a.max)}}(t,e,n);return y(t,r,i,!0)}},S={default:function(t,e,n,i){y(t,function(t,e,n){const i=t.getValueForPixel(e),r=t.getValueForPixel(n);return{min:Math.min(i,r),max:Math.max(i,r)}}(t,e,n),i,!0)}},M={category:function(t,e,n){const i=t.getLabels().length-1;let{min:r,max:o}=t;const s=Math.max(o-r,1),a=Math.round(function(t){return t.isHorizontal()?t.width:t.height}(t)/Math.max(s,10)),l=Math.round(Math.abs(e/a));let c;return e<-a?(o=Math.min(o+l,i),r=1===s?o:o-s,c=o===i):e>a&&(r=Math.max(0,r-l),o=1===s?r:r+s,c=0===r),y(t,{min:r,max:o},n)||c},default:x,logarithmic:w,timeseries:w};function E(t,e){(0,o.F)(t,(n,i)=>{e[i]||delete t[i]})}function R(t,e){const{scales:n}=t,{originalScaleLimits:i,updatedScaleLimits:r}=e;return(0,o.F)(n,function(t){(function(t,e,n){const{id:i,options:{min:r,max:o}}=t;if(!e[i]||!n[i])return!0;const s=n[i];return s.min!==r||s.max!==o})(t,i,r)&&(i[t.id]={min:{scale:t.min,options:t.options.min},max:{scale:t.max,options:t.options.max}})}),E(i,n),E(r,n),i}function T(t,e,n,i){const r=k[t.type]||k.default;(0,o.Q)(r,[t,e,n,i])}function A(t,e,n,i){const r=S[t.type]||S.default;(0,o.Q)(r,[t,e,n,i])}function O(t){const e=t.chartArea;return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function C(t,e,n="none",i="api"){const{x:r=1,y:s=1,focalPoint:a=O(t)}="number"==typeof e?{x:e,y:e}:e,l=d(t),{options:{limits:c,zoom:u}}=l;R(t,l);const f=1!==r,p=1!==s,g=h(u,a,t);(0,o.F)(g||t.scales,function(t){t.isHorizontal()&&f?T(t,r,a,c):!t.isHorizontal()&&p&&T(t,s,a,c)}),t.update(n),(0,o.Q)(u.onZoom,[{chart:t,trigger:i}])}function P(t,e,n,i="none",r="api"){const s=d(t),{options:{limits:a,zoom:l}}=s,{mode:u="xy"}=l;R(t,s);const h=c(u,"x",t),f=c(u,"y",t);(0,o.F)(t.scales,function(t){t.isHorizontal()&&h?A(t,e.x,n.x,a):!t.isHorizontal()&&f&&A(t,e.y,n.y,a)}),t.update(i),(0,o.Q)(l.onZoom,[{chart:t,trigger:r}])}function I(t,e,n,i){const{panDelta:r}=i,s=r[t.id]||0;(0,o.s)(s)===(0,o.s)(e)&&(e+=s);const a=M[t.type]||M.default;(0,o.Q)(a,[t,e,n])?r[t.id]=0:r[t.id]=e}function D(t,e,n,i="none"){const{x:r=0,y:s=0}="number"==typeof e?{x:e,y:e}:e,a=d(t),{options:{pan:l,limits:c}}=a,{onPan:u}=l||{};R(t,a);const h=0!==r,f=0!==s;(0,o.F)(n||t.scales,function(t){t.isHorizontal()&&h?I(t,r,c,a):!t.isHorizontal()&&f&&I(t,s,c,a)}),t.update(i),(0,o.Q)(u,[{chart:t}])}function L(t){const e=d(t);R(t,e);const n={};for(const i of Object.keys(t.scales)){const{min:t,max:r}=e.originalScaleLimits[i]||{min:{},max:{}};n[i]={min:t.scale,max:r.scale}}return n}function z(t){const e=d(t);return e.panning||e.dragging}const N=(t,e,n)=>Math.min(n,Math.max(e,t));function F(t,e){const{handlers:n}=d(t),i=n[e];i&&i.target&&(i.target.removeEventListener(e,i),delete n[e])}function j(t,e,n,i){const{handlers:r,options:o}=d(t),s=r[n];if(s&&s.target===e)return;F(t,n),r[n]=e=>i(t,e,o),r[n].target=e;const a="wheel"!==n&&void 0;e.addEventListener(n,r[n],{passive:a})}function H(t,e){const n=d(t);n.dragStart&&(n.dragging=!0,n.dragEnd=e,t.update("none"))}function B(t,e){const n=d(t);n.dragStart&&"Escape"===e.key&&(F(t,"keydown"),n.dragging=!1,n.dragStart=n.dragEnd=null,t.update("none"))}function W(t,e){if(t.target!==e.canvas){const n=e.canvas.getBoundingClientRect();return{x:t.clientX-n.left,y:t.clientY-n.top}}return(0,o.z)(t,e)}function V(t,e,n){const{onZoomStart:i,onZoomRejected:r}=n;if(i){const n=W(e,t);if(!1===(0,o.Q)(i,[{chart:t,event:e,point:n}]))return(0,o.Q)(r,[{chart:t,event:e}]),!1}}function $(t,e){if(t.legend){const n=(0,o.z)(e,t);if((0,o.C)(n,t.legend))return}const n=d(t),{pan:i,zoom:r={}}=n.options;if(0!==e.button||a(s(i),e)||l(s(r.drag),e))return(0,o.Q)(r.onZoomRejected,[{chart:t,event:e}]);!1!==V(t,e,r)&&(n.dragStart=e,j(t,t.canvas.ownerDocument,"mousemove",H),j(t,window.document,"keydown",B))}function U(t,e,n,{min:i,max:r,prop:o}){t[i]=N(Math.min(n.begin[o],n.end[o]),e[i],e[r]),t[r]=N(Math.max(n.begin[o],n.end[o]),e[i],e[r])}function Q(t,e,n,i){const r=c(e,"x",t),o=c(e,"y",t),{top:s,left:a,right:l,bottom:u,width:h,height:f}=t.chartArea,d={top:s,left:a,right:l,bottom:u},p=function(t,e,n){const i={begin:W(e.dragStart,t),end:W(e.dragEnd,t)};return n&&function({begin:t,end:e},n){let i=e.x-t.x,r=e.y-t.y;const o=Math.abs(i/r);o>n?i=Math.sign(i)*Math.abs(r*n):o<n&&(r=Math.sign(r)*Math.abs(i/n)),e.x=t.x+i,e.y=t.y+r}(i,t.chartArea.width/t.chartArea.height),i}(t,n,i&&r&&o);r&&U(d,t.chartArea,p,{min:"left",max:"right",prop:"x"}),o&&U(d,t.chartArea,p,{min:"top",max:"bottom",prop:"y"});const g=d.right-d.left,m=d.bottom-d.top;return{...d,width:g,height:m,zoomX:r&&g?1+(h-g)/h:1,zoomY:o&&m?1+(f-m)/f:1}}function Y(t,e){const n=d(t);if(!n.dragStart)return;F(t,"mousemove");const{mode:i,onZoomComplete:r,drag:{threshold:s=0,maintainAspectRatio:a}}=n.options.zoom,l=Q(t,i,{dragStart:n.dragStart,dragEnd:e},a),u=c(i,"x",t)?l.width:0,h=c(i,"y",t)?l.height:0,f=Math.sqrt(u*u+h*h);if(n.dragStart=n.dragEnd=null,f<=s)return n.dragging=!1,void t.update("none");P(t,{x:l.left,y:l.top},{x:l.right,y:l.bottom},"zoom","drag"),n.dragging=!1,n.filterNextClick=!0,(0,o.Q)(r,[{chart:t}])}function q(t,e){const{handlers:{onZoomComplete:n},options:{zoom:i}}=d(t);if(!function(t,e,n){if(l(s(n.wheel),e))(0,o.Q)(n.onZoomRejected,[{chart:t,event:e}]);else if(!1!==V(t,e,n)&&(e.cancelable&&e.preventDefault(),void 0!==e.deltaY))return!0}(t,e,i))return;const r=e.target.getBoundingClientRect(),a=i.wheel.speed,c=e.deltaY>=0?2-1/(1-a):1+a;C(t,{x:c,y:c,focalPoint:{x:e.clientX-r.left,y:e.clientY-r.top}},"zoom","wheel"),(0,o.Q)(n,[{chart:t}])}function X(t,e){return function(n,i){const{pan:r,zoom:c={}}=e.options;if(!r||!r.enabled)return!1;const u=i&&i.srcEvent;return!(u&&!e.panning&&"mouse"===i.pointerType&&(l(s(r),u)||a(s(c.drag),u))&&((0,o.Q)(r.onPanRejected,[{chart:t,event:i}]),1))}}function Z(t,e,n){if(e.scale){const{center:i,pointers:r}=n,o=1/e.scale*n.scale,s=n.target.getBoundingClientRect(),a=function(t,e){const n=Math.abs(t.clientX-e.clientX),i=Math.abs(t.clientY-e.clientY),r=n/i;let o,s;return r>.3&&r<1.7?o=s=!0:n>i?o=!0:s=!0,{x:o,y:s}}(r[0],r[1]),l=e.options.zoom.mode;C(t,{x:a.x&&c(l,"x",t)?o:1,y:a.y&&c(l,"y",t)?o:1,focalPoint:{x:i.x-s.left,y:i.y-s.top}},"zoom","pinch"),e.scale=n.scale}}function K(t,e,n){const i=e.delta;i&&(e.panning=!0,D(t,{x:n.deltaX-i.x,y:n.deltaY-i.y},e.panScales),e.delta={x:n.deltaX,y:n.deltaY})}const G=new WeakMap;function J(t,e){const n=d(t),i=t.canvas,{pan:s,zoom:a}=e,l=new(r().Manager)(i);a&&a.pinch.enabled&&(l.add(new(r().Pinch)),l.on("pinchstart",e=>function(t,e,n){if(e.options.zoom.pinch.enabled){const i=(0,o.z)(n,t);!1===(0,o.Q)(e.options.zoom.onZoomStart,[{chart:t,event:n,point:i}])?(e.scale=null,(0,o.Q)(e.options.zoom.onZoomRejected,[{chart:t,event:n}])):e.scale=1}}(t,n,e)),l.on("pinch",e=>Z(t,n,e)),l.on("pinchend",e=>function(t,e,n){e.scale&&(Z(t,e,n),e.scale=null,(0,o.Q)(e.options.zoom.onZoomComplete,[{chart:t}]))}(t,n,e))),s&&s.enabled&&(l.add(new(r().Pan)({threshold:s.threshold,enable:X(t,n)})),l.on("panstart",e=>function(t,e,n){const{enabled:i,onPanStart:r,onPanRejected:s}=e.options.pan;if(!i)return;const a=n.target.getBoundingClientRect(),l={x:n.center.x-a.left,y:n.center.y-a.top};if(!1===(0,o.Q)(r,[{chart:t,event:n,point:l}]))return(0,o.Q)(s,[{chart:t,event:n}]);e.panScales=h(e.options.pan,l,t),e.delta={x:0,y:0},K(t,e,n)}(t,n,e)),l.on("panmove",e=>K(t,n,e)),l.on("panend",()=>function(t,e){e.delta=null,e.panning&&(e.panning=!1,e.filterNextClick=!0,(0,o.Q)(e.options.pan.onPanComplete,[{chart:t}]))}(t,n))),G.set(t,l)}function tt(t){const e=G.get(t);e&&(e.remove("pinchstart"),e.remove("pinch"),e.remove("pinchend"),e.remove("panstart"),e.remove("pan"),e.remove("panend"),e.destroy(),G.delete(t))}function et(t,e,n){const i=n.zoom.drag,{dragStart:r,dragEnd:o}=d(t);if(i.drawTime!==e||!o)return;const{left:s,top:a,width:l,height:c}=Q(t,n.zoom.mode,{dragStart:r,dragEnd:o},i.maintainAspectRatio),u=t.ctx;u.save(),u.beginPath(),u.fillStyle=i.backgroundColor||"rgba(225,225,225,0.3)",u.fillRect(s,a,l,c),i.borderWidth>0&&(u.lineWidth=i.borderWidth,u.strokeStyle=i.borderColor||"rgba(225,225,225)",u.strokeRect(s,a,l,c)),u.restore()}var nt={id:"zoom",version:"2.2.0",defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(t,e,n){d(t).options=n,Object.prototype.hasOwnProperty.call(n.zoom,"enabled")&&console.warn("The option `zoom.enabled` is no longer supported. Please use `zoom.wheel.enabled`, `zoom.drag.enabled`, or `zoom.pinch.enabled`."),(Object.prototype.hasOwnProperty.call(n.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(n.pan,"overScaleMode"))&&console.warn("The option `overScaleMode` is deprecated. Please use `scaleMode` instead (and update `mode` as desired)."),r()&&J(t,n),t.pan=(e,n,i)=>D(t,e,n,i),t.zoom=(e,n)=>C(t,e,n),t.zoomRect=(e,n,i)=>P(t,e,n,i),t.zoomScale=(e,n,i)=>function(t,e,n,i="none",r="api"){const s=d(t);R(t,s),y(t.scales[e],n,void 0,!0),t.update(i),(0,o.Q)(s.options.zoom?.onZoom,[{chart:t,trigger:r}])}(t,e,n,i),t.resetZoom=e=>function(t,e="default"){const n=d(t),i=R(t,n);(0,o.F)(t.scales,function(t){const e=t.options;i[t.id]?(e.min=i[t.id].min.options,e.max=i[t.id].max.options):(delete e.min,delete e.max),delete n.updatedScaleLimits[t.id]}),t.update(e),(0,o.Q)(n.options.zoom.onZoomComplete,[{chart:t}])}(t,e),t.getZoomLevel=()=>function(t){const e=d(t);let n=1,i=1;return(0,o.F)(t.scales,function(t){const r=function(t,e){const n=t.originalScaleLimits[e];if(!n)return;const{min:i,max:r}=n;return(0,o.v)(r.options,r.scale)-(0,o.v)(i.options,i.scale)}(e,t.id);if(r){const e=Math.round(r/(t.max-t.min)*100)/100;n=Math.min(n,e),i=Math.max(i,e)}}),n<1?n:i}(t),t.getInitialScaleBounds=()=>L(t),t.getZoomedScaleBounds=()=>function(t){const e=d(t),n={};for(const i of Object.keys(t.scales))n[i]=e.updatedScaleLimits[i];return n}(t),t.isZoomedOrPanned=()=>function(t){const e=L(t);for(const n of Object.keys(t.scales)){const{min:i,max:r}=e[n];if(void 0!==i&&t.scales[n].min!==i)return!0;if(void 0!==r&&t.scales[n].max!==r)return!0}return!1}(t),t.isZoomingOrPanning=()=>z(t)},beforeEvent(t,{event:e}){if(z(t))return!1;if("click"===e.type||"mouseup"===e.type){const e=d(t);if(e.filterNextClick)return e.filterNextClick=!1,!1}},beforeUpdate:function(t,e,n){const i=d(t),r=i.options;i.options=n,function(t,e){const{pan:n,zoom:i}=t,{pan:r,zoom:o}=e;return i?.zoom?.pinch?.enabled!==o?.zoom?.pinch?.enabled||n?.enabled!==r?.enabled||n?.threshold!==r?.threshold}(r,n)&&(tt(t),J(t,n)),function(t,e){const n=t.canvas,{wheel:i,drag:r,onZoomComplete:s}=e.zoom;i.enabled?(j(t,n,"wheel",q),function(t,e,n,i){n&&(d(t).handlers[e]=function(t,e){let n;return function(){return clearTimeout(n),n=setTimeout(t,e),e}}(()=>(0,o.Q)(n,[{chart:t}]),i))}(t,"onZoomComplete",s,250)):F(t,"wheel"),r.enabled?(j(t,n,"mousedown",$),j(t,n.ownerDocument,"mouseup",Y)):(F(t,"mousedown"),F(t,"mousemove"),F(t,"mouseup"),F(t,"keydown"))}(t,n)},beforeDatasetsDraw(t,e,n){et(t,"beforeDatasetsDraw",n)},afterDatasetsDraw(t,e,n){et(t,"afterDatasetsDraw",n)},beforeDraw(t,e,n){et(t,"beforeDraw",n)},afterDraw(t,e,n){et(t,"afterDraw",n)},stop:function(t){!function(t){F(t,"mousedown"),F(t,"mousemove"),F(t,"mouseup"),F(t,"wheel"),F(t,"click"),F(t,"keydown")}(t),r()&&tt(t),function(t){f.delete(t)}(t)},panFunctions:M,zoomFunctions:k,zoomRectFunctions:S}},2195(t,e,n){"use strict";n.d(e,{x:()=>Fe});var i,r=n(6540);function o(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,"symbol"==typeof(r=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key))?r:String(r),i)}var r}function s(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(){return a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},a.apply(this,arguments)}function l(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,c(t,e)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(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 f(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return h(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)?h(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}!function(t){t[t.Init=0]="Init",t[t.Loading=1]="Loading",t[t.Loaded=2]="Loaded",t[t.Rendered=3]="Rendered",t[t.Error=4]="Error"}(i||(i={}));var d,p,g,m,v,y,_,b={},x=[],w=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function k(t,e){for(var n in e)t[n]=e[n];return t}function S(t){var e=t.parentNode;e&&e.removeChild(t)}function M(t,e,n){var i,r,o,s={};for(o in e)"key"==o?i=e[o]:"ref"==o?r=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?d.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===s[o]&&(s[o]=t.defaultProps[o]);return E(t,s,i,r,null)}function E(t,e,n,i,r){var o={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?++g:r};return null==r&&null!=p.vnode&&p.vnode(o),o}function R(t){return t.children}function T(t,e){this.props=t,this.context=e}function A(t,e){if(null==e)return t.__?A(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?A(t):null}function O(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 O(t)}}function C(t){(!t.__d&&(t.__d=!0)&&v.push(t)&&!P.__r++||y!==p.debounceRendering)&&((y=p.debounceRendering)||setTimeout)(P)}function P(){for(var t;P.__r=v.length;)t=v.sort(function(t,e){return t.__v.__b-e.__v.__b}),v=[],t.some(function(t){var e,n,i,r,o,s;t.__d&&(o=(r=(e=t).__v).__e,(s=e.__P)&&(n=[],(i=k({},r)).__v=r.__v+1,H(s,r,i,e.__n,void 0!==s.ownerSVGElement,null!=r.__h?[o]:null,n,null==o?A(r):o,r.__h),B(n,r),r.__e!=o&&O(r)))})}function I(t,e,n,i,r,o,s,a,l,c){var u,h,f,d,p,g,m,v=i&&i.__k||x,y=v.length;for(n.__k=[],u=0;u<e.length;u++)if(null!=(d=n.__k[u]=null==(d=e[u])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?E(null,d,null,null,d):Array.isArray(d)?E(R,{children:d},null,null,null):d.__b>0?E(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)){if(d.__=n,d.__b=n.__b+1,null===(f=v[u])||f&&d.key==f.key&&d.type===f.type)v[u]=void 0;else for(h=0;h<y;h++){if((f=v[h])&&d.key==f.key&&d.type===f.type){v[h]=void 0;break}f=null}H(t,d,f=f||b,r,o,s,a,l,c),p=d.__e,(h=d.ref)&&f.ref!=h&&(m||(m=[]),f.ref&&m.push(f.ref,null,d),m.push(h,d.__c||p,d)),null!=p?(null==g&&(g=p),"function"==typeof d.type&&d.__k===f.__k?d.__d=l=D(d,l,t):l=L(t,d,f,v,p,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=t&&(l=A(f))}for(n.__e=g,u=y;u--;)null!=v[u]&&$(v[u],v[u]);if(m)for(u=0;u<m.length;u++)V(m[u],m[++u],m[++u])}function D(t,e,n){for(var i,r=t.__k,o=0;r&&o<r.length;o++)(i=r[o])&&(i.__=t,e="function"==typeof i.type?D(i,e,n):L(n,i,i,r,i.__e,e));return e}function L(t,e,n,i,r,o){var s,a,l;if(void 0!==e.__d)s=e.__d,e.__d=void 0;else if(null==n||r!=o||null==r.parentNode)t:if(null==o||o.parentNode!==t)t.appendChild(r),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<i.length;l+=1)if(a==r)break t;t.insertBefore(r,o),s=o}return void 0!==s?s:r.nextSibling}function z(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||w.test(e)?n:n+"px"}function N(t,e,n,i,r){var o;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||z(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||z(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?i||t.addEventListener(e,o?j:F,o):t.removeEventListener(e,o?j:F,o);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&&-1==e.indexOf("-")?t.removeAttribute(e):t.setAttribute(e,n))}}function F(t){this.l[t.type+!1](p.event?p.event(t):t)}function j(t){this.l[t.type+!0](p.event?p.event(t):t)}function H(t,e,n,i,r,o,s,a,l){var c,u,h,f,d,g,m,v,y,_,b,x,w,S,M,E=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(l=n.__h,a=e.__e=n.__e,e.__h=null,o=[a]),(c=p.__b)&&c(e);try{t:if("function"==typeof E){if(v=e.props,y=(c=E.contextType)&&i[c.__c],_=c?y?y.props.value:c.__:i,n.__c?m=(u=e.__c=n.__c).__=u.__E:("prototype"in E&&E.prototype.render?e.__c=u=new E(v,_):(e.__c=u=new T(v,_),u.constructor=E,u.render=U),y&&y.sub(u),u.props=v,u.state||(u.state={}),u.context=_,u.__n=i,h=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=E.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=k({},u.__s)),k(u.__s,E.getDerivedStateFromProps(v,u.__s))),f=u.props,d=u.state,h)null==E.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==E.getDerivedStateFromProps&&v!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(v,_),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(v,u.__s,_)||e.__v===n.__v){for(u.props=v,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)}),b=0;b<u._sb.length;b++)u.__h.push(u._sb[b]);u._sb=[],u.__h.length&&s.push(u);break t}null!=u.componentWillUpdate&&u.componentWillUpdate(v,u.__s,_),null!=u.componentDidUpdate&&u.__h.push(function(){u.componentDidUpdate(f,d,g)})}if(u.context=_,u.props=v,u.__v=e,u.__P=t,x=p.__r,w=0,"prototype"in E&&E.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(e),c=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do{u.__d=!1,x&&x(e),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(i=k(k({},i),u.getChildContext())),h||null==u.getSnapshotBeforeUpdate||(g=u.getSnapshotBeforeUpdate(f,d)),M=null!=c&&c.type===R&&null==c.key?c.props.children:c,I(t,Array.isArray(M)?M:[M],e,n,i,r,o,s,a,l),u.base=e.__e,e.__h=null,u.__h.length&&s.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=W(n.__e,e,n,i,r,o,s,l);(c=p.diffed)&&c(e)}catch(t){e.__v=null,(l||null!=o)&&(e.__e=a,e.__h=!!l,o[o.indexOf(a)]=null),p.__e(t,e,n)}}function B(t,e){p.__c&&p.__c(e,t),t.some(function(e){try{t=e.__h,e.__h=[],t.some(function(t){t.call(e)})}catch(t){p.__e(t,e.__v)}})}function W(t,e,n,i,r,o,s,a){var l,c,u,h=n.props,f=e.props,p=e.type,g=0;if("svg"===p&&(r=!0),null!=o)for(;g<o.length;g++)if((l=o[g])&&"setAttribute"in l==!!p&&(p?l.localName===p:3===l.nodeType)){t=l,o[g]=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),o=null,a=!1}if(null===p)h===f||a&&t.data===f||(t.data=f);else{if(o=o&&d.call(t.childNodes),c=(h=n.props||b).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!a){if(null!=o)for(h={},g=0;g<t.attributes.length;g++)h[t.attributes[g].name]=t.attributes[g].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 o;for(o in n)"children"===o||"key"===o||o in e||N(t,o,null,n[o],i);for(o in e)r&&"function"!=typeof e[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===e[o]||N(t,o,e[o],n[o],i)}(t,f,h,r,a),u)e.__k=[];else if(g=e.props.children,I(t,Array.isArray(g)?g:[g],e,n,i,r&&"foreignObject"!==p,o,s,o?o[0]:n.__k&&A(n,0),a),null!=o)for(g=o.length;g--;)null!=o[g]&&S(o[g]);a||("value"in f&&void 0!==(g=f.value)&&(g!==t.value||"progress"===p&&!g||"option"===p&&g!==h.value)&&N(t,"value",g,h.value,!1),"checked"in f&&void 0!==(g=f.checked)&&g!==t.checked&&N(t,"checked",g,h.checked,!1))}return t}function V(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){p.__e(t,n)}}function $(t,e,n){var i,r;if(p.unmount&&p.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||V(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){p.__e(t,e)}i.base=i.__P=null,t.__c=void 0}if(i=t.__k)for(r=0;r<i.length;r++)i[r]&&$(i[r],e,n||"function"!=typeof t.type);n||null==t.__e||S(t.__e),t.__=t.__e=t.__d=void 0}function U(t,e,n){return this.constructor(t,n)}function Q(t,e,n){var i,r,o;p.__&&p.__(t,e),r=(i="function"==typeof n)?null:n&&n.__k||e.__k,o=[],H(e,t=(!i&&n||e).__k=M(R,null,[t]),r||b,b,void 0!==e.ownerSVGElement,!i&&n?[n]:r?null:e.firstChild?d.call(e.childNodes):null,o,!i&&n?n:r?r.__e:e.firstChild,i),B(o,t)}function Y(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})}d=x.slice,p={__e:function(t,e,n,i){for(var r,o,s;e=e.__;)if((r=e.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(t)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,i||{}),s=r.__d),s)return r.__E=r}catch(e){t=e}throw t}},g=0,m=function(t){return null!=t&&void 0===t.constructor},T.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=k({},this.state),"function"==typeof t&&(t=t(k({},n),this.props)),t&&k(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),C(this))},T.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),C(this))},T.prototype.render=R,v=[],P.__r=0,_=0;var q=function(){function t(t){this._id=void 0,this._id=t||Y()}return s(t,[{key:"id",get:function(){return this._id}}]),t}();function X(t){return M(t.parentElement||"span",{dangerouslySetInnerHTML:{__html:t.content}})}function Z(t,e){return M(X,{content:t,parentElement:e})}var K,G=function(t){function e(e){var n;return(n=t.call(this)||this).data=void 0,n.update(e),n}l(e,t);var n=e.prototype;return n.cast=function(t){return t instanceof HTMLElement?Z(t.outerHTML):t},n.update=function(t){return this.data=this.cast(t),this},e}(q),J=function(t){function e(e){var n;return(n=t.call(this)||this)._cells=void 0,n.cells=e||[],n}l(e,t);var n=e.prototype;return n.cell=function(t){return this._cells[t]},n.toArray=function(){return this.cells.map(function(t){return t.data})},e.fromCells=function(t){return new e(t.map(function(t){return new G(t.data)}))},s(e,[{key:"cells",get:function(){return this._cells},set:function(t){this._cells=t}},{key:"length",get:function(){return this.cells.length}}]),e}(q),tt=function(t){function e(e){var n;return(n=t.call(this)||this)._rows=void 0,n._length=void 0,n.rows=e instanceof Array?e:e instanceof J?[e]:[],n}return l(e,t),e.prototype.toArray=function(){return this.rows.map(function(t){return t.toArray()})},e.fromRows=function(t){return new e(t.map(function(t){return J.fromCells(t.cells)}))},e.fromArray=function(t){return new e((t=function(t){return!t[0]||t[0]instanceof Array?t:[t]}(t)).map(function(t){return new J(t.map(function(t){return new G(t)}))}))},s(e,[{key:"rows",get:function(){return this._rows},set:function(t){this._rows=t}},{key:"length",get:function(){return this._length||this.rows.length},set:function(t){this._length=t}}]),e}(q),et=function(){function t(){this.callbacks=void 0}var e=t.prototype;return e.init=function(t){this.callbacks||(this.callbacks={}),t&&!this.callbacks[t]&&(this.callbacks[t]=[])},e.listeners=function(){return this.callbacks},e.on=function(t,e){return this.init(t),this.callbacks[t].push(e),this},e.off=function(t,e){var n=t;return this.init(),this.callbacks[n]&&0!==this.callbacks[n].length?(this.callbacks[n]=this.callbacks[n].filter(function(t){return t!=e}),this):this},e.emit=function(t){var e=arguments,n=t;return this.init(n),this.callbacks[n].length>0&&(this.callbacks[n].forEach(function(t){return t.apply(void 0,[].slice.call(e,1))}),!0)},t}();function nt(t,e){if(typeof t!=typeof e)return!1;if(null===t&&null===e)return!0;if("object"!=typeof t)return t===e;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!nt(t[n],e[n]))return!1;return!0}if(t.hasOwnProperty("constructor")&&e.hasOwnProperty("constructor")&&t.hasOwnProperty("props")&&e.hasOwnProperty("props")&&t.hasOwnProperty("key")&&e.hasOwnProperty("key")&&t.hasOwnProperty("ref")&&e.hasOwnProperty("ref")&&t.hasOwnProperty("type")&&e.hasOwnProperty("type"))return nt(t.props,e.props);var i=Object.keys(t),r=Object.keys(e);if(i.length!==r.length)return!1;for(var o=0,s=i;o<s.length;o++){var a=s[o];if(!e.hasOwnProperty(a)||!nt(t[a],e[a]))return!1}return!0}!function(t){t[t.Initiator=0]="Initiator",t[t.ServerFilter=1]="ServerFilter",t[t.ServerSort=2]="ServerSort",t[t.ServerLimit=3]="ServerLimit",t[t.Extractor=4]="Extractor",t[t.Transformer=5]="Transformer",t[t.Filter=6]="Filter",t[t.Sort=7]="Sort",t[t.Limit=8]="Limit"}(K||(K={}));var it=function(t){function e(e){var n;return(n=t.call(this)||this).id=void 0,n._props=void 0,n._props={},n.id=Y(),e&&n.setProps(e),n}l(e,t);var n=e.prototype;return n.process=function(){var t=[].slice.call(arguments);this.validateProps instanceof Function&&this.validateProps.apply(this,t),this.emit.apply(this,["beforeProcess"].concat(t));var e=this._process.apply(this,t);return this.emit.apply(this,["afterProcess"].concat(t)),e},n.setProps=function(t){var e=a({},this._props,t);return nt(e,this._props)||(this._props=e,this.emit("propsUpdated",this)),this},s(e,[{key:"props",get:function(){return this._props}}]),e}(et),rt=function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype._process=function(t){return this.props.keyword?(e=String(this.props.keyword).trim(),n=this.props.columns,i=this.props.ignoreHiddenColumns,r=t,o=this.props.selector,e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),new tt(r.rows.filter(function(t,r){return t.cells.some(function(t,s){if(!t)return!1;if(i&&n&&n[s]&&"object"==typeof n[s]&&n[s].hidden)return!1;var a="";if("function"==typeof o)a=o(t.data,r,s);else if("object"==typeof t.data){var l=t.data;l&&l.props&&l.props.content&&(a=l.props.content)}else a=String(t.data);return new RegExp(e,"gi").test(a)})}))):t;var e,n,i,r,o},s(e,[{key:"type",get:function(){return K.Filter}}]),e}(it);function ot(){return"gridjs"+[].slice.call(arguments).reduce(function(t,e){return t+"-"+e},"")}function st(){return[].slice.call(arguments).map(function(t){return t?t.toString():""}).filter(function(t){return t}).reduce(function(t,e){return(t||"")+" "+e},"").trim()}var at,lt,ct,ut,ht=function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype._process=function(t){if(!this.props.keyword)return t;var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.keyword)),this.props.body&&(e.body=this.props.body(t.body,this.props.keyword)),a({},t,e)},s(e,[{key:"type",get:function(){return K.ServerFilter}}]),e}(it),ft=0,dt=[],pt=[],gt=p.__b,mt=p.__r,vt=p.diffed,yt=p.__c,_t=p.unmount;function bt(t,e){p.__h&&p.__h(lt,t,ft||e),ft=0;var n=lt.__H||(lt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:pt}),n.__[t]}function xt(t){return ft=1,function(t,e){var n=bt(at++,2);if(n.t=t,!n.__c&&(n.__=[Ct(void 0,e),function(t){var e=n.__N?n.__N[0]:n.__[0],i=n.t(e,t);e!==i&&(n.__N=[i,n.__[1]],n.__c.setState({}))}],n.__c=lt,!lt.u)){lt.u=!0;var i=lt.shouldComponentUpdate;lt.shouldComponentUpdate=function(t,e,r){if(!n.__c.__H)return!0;var o=n.__c.__H.__.filter(function(t){return t.__c});if(o.every(function(t){return!t.__N}))return!i||i.call(this,t,e,r);var s=!1;return o.forEach(function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}}),!(!s&&n.__c.props===t)&&(!i||i.call(this,t,e,r))}}return n.__N||n.__}(Ct,t)}function wt(t,e){var n=bt(at++,3);!p.__s&&Ot(n.__H,e)&&(n.__=t,n.i=e,lt.__H.__h.push(n))}function kt(t){return ft=5,St(function(){return{current:t}},[])}function St(t,e){var n=bt(at++,7);return Ot(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function Mt(){for(var t;t=dt.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Tt),t.__H.__h.forEach(At),t.__H.__h=[]}catch(e){t.__H.__h=[],p.__e(e,t.__v)}}p.__b=function(t){lt=null,gt&>(t)},p.__r=function(t){mt&&mt(t),at=0;var e=(lt=t.__c).__H;e&&(ct===lt?(e.__h=[],lt.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=pt,t.__N=t.i=void 0})):(e.__h.forEach(Tt),e.__h.forEach(At),e.__h=[])),ct=lt},p.diffed=function(t){vt&&vt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==dt.push(e)&&ut===p.requestAnimationFrame||((ut=p.requestAnimationFrame)||Rt)(Mt)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==pt&&(t.__=t.__V),t.i=void 0,t.__V=pt})),ct=lt=null},p.__c=function(t,e){e.some(function(t){try{t.__h.forEach(Tt),t.__h=t.__h.filter(function(t){return!t.__||At(t)})}catch(n){e.some(function(t){t.__h&&(t.__h=[])}),e=[],p.__e(n,t.__v)}}),yt&&yt(t,e)},p.unmount=function(t){_t&&_t(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(t){try{Tt(t)}catch(t){e=t}}),n.__H=void 0,e&&p.__e(e,n.__v))};var Et="function"==typeof requestAnimationFrame;function Rt(t){var e,n=function(){clearTimeout(i),Et&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);Et&&(e=requestAnimationFrame(n))}function Tt(t){var e=lt,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),lt=e}function At(t){var e=lt;t.__c=t.__(),lt=e}function Ot(t,e){return!t||t.length!==e.length||e.some(function(e,n){return e!==t[n]})}function Ct(t,e){return"function"==typeof e?e(t):e}function Pt(){return function(t){var e=lt.context[t.__c],n=bt(at++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(lt)),e.props.value):t.__}(de)}var It={search:{placeholder:"Type a keyword..."},sort:{sortAsc:"Sort column ascending",sortDesc:"Sort column descending"},pagination:{previous:"Previous",next:"Next",navigate:function(t,e){return"Page "+t+" of "+e},page:function(t){return"Page "+t},showing:"Showing",of:"of",to:"to",results:"results"},loading:"Loading...",noRecordsFound:"No matching records found",error:"An error happened while fetching the data"},Dt=function(){function t(t){this._language=void 0,this._defaultLanguage=void 0,this._language=t,this._defaultLanguage=It}var e=t.prototype;return e.getString=function(t,e){if(!e||!t)return null;var n=t.split("."),i=n[0];if(e[i]){var r=e[i];return"string"==typeof r?function(){return r}:"function"==typeof r?r:this.getString(n.slice(1).join("."),r)}return null},e.translate=function(t){var e;return(e=this.getString(t,this._language)||this.getString(t,this._defaultLanguage))?e.apply(void 0,[].slice.call(arguments,1)):t},t}();function Lt(){var t=Pt();return function(e){var n;return(n=t.translator).translate.apply(n,[e].concat([].slice.call(arguments,1)))}}var zt=function(t){return function(e){return a({},e,{search:{keyword:t}})}};function Nt(){return Pt().store}function Ft(t){var e=Nt(),n=xt(t(e.getState())),i=n[0],r=n[1];return wt(function(){return e.subscribe(function(){var n=t(e.getState());i!==n&&r(n)})},[]),i}function jt(){var t,e=xt(void 0),n=e[0],i=e[1],r=Pt(),o=r.search,s=Lt(),a=Nt().dispatch,l=Ft(function(t){return t.search});wt(function(){n&&n.setProps({keyword:null==l?void 0:l.keyword})},[l,n]),wt(function(){i(o.server?new ht({keyword:o.keyword,url:o.server.url,body:o.server.body}):new rt({keyword:o.keyword,columns:r.header&&r.header.columns,ignoreHiddenColumns:o.ignoreHiddenColumns||void 0===o.ignoreHiddenColumns,selector:o.selector})),o.keyword&&a(zt(o.keyword))},[o]),wt(function(){if(n)return r.pipeline.register(n),function(){return r.pipeline.unregister(n)}},[r,n]);var c,u,h,f=function(t,e){return ft=8,St(function(){return t},e)}((c=function(t){t.target instanceof HTMLInputElement&&a(zt(t.target.value))},u=n instanceof ht?o.debounceTimeout||250:0,function(){var t=arguments;return new Promise(function(e){h&&clearTimeout(h),h=setTimeout(function(){return e(c.apply(void 0,[].slice.call(t)))},u)})}),[o,n]);return M("div",{className:ot(st("search",null==(t=r.className)?void 0:t.search))},M("input",{type:"search",placeholder:s("search.placeholder"),"aria-label":s("search.placeholder"),onInput:f,className:st(ot("input"),ot("search","input")),defaultValue:(null==l?void 0:l.keyword)||""}))}var Ht=function(t){function e(){return t.apply(this,arguments)||this}l(e,t);var n=e.prototype;return n.validateProps=function(){if(isNaN(Number(this.props.limit))||isNaN(Number(this.props.page)))throw Error("Invalid parameters passed")},n._process=function(t){var e=this.props.page;return new tt(t.rows.slice(e*this.props.limit,(e+1)*this.props.limit))},s(e,[{key:"type",get:function(){return K.Limit}}]),e}(it),Bt=function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype._process=function(t){var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.page,this.props.limit)),this.props.body&&(e.body=this.props.body(t.body,this.props.page,this.props.limit)),a({},t,e)},s(e,[{key:"type",get:function(){return K.ServerLimit}}]),e}(it);function Wt(){var t=Pt(),e=t.pagination,n=e.server,i=e.summary,r=void 0===i||i,o=e.nextButton,s=void 0===o||o,a=e.prevButton,l=void 0===a||a,c=e.buttonsCount,u=void 0===c?3:c,h=e.limit,f=void 0===h?10:h,d=e.page,p=void 0===d?0:d,g=e.resetPageOnUpdate,m=void 0===g||g,v=kt(null),y=xt(p),_=y[0],b=y[1],x=xt(0),w=x[0],k=x[1],S=Lt();wt(function(){return n?(v.current=new Bt({limit:f,page:_,url:n.url,body:n.body}),t.pipeline.register(v.current)):(v.current=new Ht({limit:f,page:_}),t.pipeline.register(v.current)),v.current instanceof Bt?t.pipeline.on("afterProcess",function(t){return k(t.length)}):v.current instanceof Ht&&v.current.on("beforeProcess",function(t){return k(t.length)}),t.pipeline.on("updated",E),t.pipeline.on("error",function(){k(0),b(0)}),function(){t.pipeline.unregister(v.current),t.pipeline.off("updated",E)}},[]);var E=function(t){m&&t!==v.current&&(b(0),0!==v.current.props.page&&v.current.setProps({page:0}))},T=function(){return Math.ceil(w/f)},A=function(t){if(t>=T()||t<0||t===_)return null;b(t),v.current.setProps({page:t})};return M("div",{className:st(ot("pagination"),t.className.pagination)},M(R,null,r&&w>0&&M("div",{role:"status","aria-live":"polite",className:st(ot("summary"),t.className.paginationSummary),title:S("pagination.navigate",_+1,T())},S("pagination.showing")," ",M("b",null,S(""+(_*f+1)))," ",S("pagination.to")," ",M("b",null,S(""+Math.min((_+1)*f,w)))," ",S("pagination.of")," ",M("b",null,S(""+w))," ",S("pagination.results"))),M("div",{className:ot("pages")},l&&M("button",{tabIndex:0,role:"button",disabled:0===_,onClick:function(){return A(_-1)},title:S("pagination.previous"),"aria-label":S("pagination.previous"),className:st(t.className.paginationButton,t.className.paginationButtonPrev)},S("pagination.previous")),function(){if(u<=0)return null;var e=Math.min(T(),u),n=Math.min(_,Math.floor(e/2));return _+Math.floor(e/2)>=T()&&(n=e-(T()-_)),M(R,null,T()>e&&_-n>0&&M(R,null,M("button",{tabIndex:0,role:"button",onClick:function(){return A(0)},title:S("pagination.firstPage"),"aria-label":S("pagination.firstPage"),className:t.className.paginationButton},S("1")),M("button",{tabIndex:-1,className:st(ot("spread"),t.className.paginationButton)},"...")),Array.from(Array(e).keys()).map(function(t){return _+(t-n)}).map(function(e){return M("button",{tabIndex:0,role:"button",onClick:function(){return A(e)},className:st(_===e?st(ot("currentPage"),t.className.paginationButtonCurrent):null,t.className.paginationButton),title:S("pagination.page",e+1),"aria-label":S("pagination.page",e+1)},S(""+(e+1)))}),T()>e&&T()>_+n+1&&M(R,null,M("button",{tabIndex:-1,className:st(ot("spread"),t.className.paginationButton)},"..."),M("button",{tabIndex:0,role:"button",onClick:function(){return A(T()-1)},title:S("pagination.page",T()),"aria-label":S("pagination.page",T()),className:t.className.paginationButton},S(""+T()))))}(),s&&M("button",{tabIndex:0,role:"button",disabled:T()===_+1||0===T(),onClick:function(){return A(_+1)},title:S("pagination.next"),"aria-label":S("pagination.next"),className:st(t.className.paginationButton,t.className.paginationButtonNext)},S("pagination.next"))))}function Vt(t,e){return"string"==typeof t?t.indexOf("%")>-1?e/100*parseInt(t,10):parseInt(t,10):t}function $t(t){return t?Math.floor(t)+"px":""}function Ut(t){var e=t.tableRef.cloneNode(!0);return e.style.position="absolute",e.style.width="100%",e.style.zIndex="-2147483640",e.style.visibility="hidden",M("div",{ref:function(t){t&&t.appendChild(e)}})}function Qt(t){if(!t)return"";var e=t.split(" ");return 1===e.length&&/([a-z][A-Z])+/g.test(t)?t:e.map(function(t,e){return 0==e?t.toLowerCase():t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}).join("")}var Yt,qt=new(function(){function t(){}var e=t.prototype;return e.format=function(t,e){return"[Grid.js] ["+e.toUpperCase()+"]: "+t},e.error=function(t,e){void 0===e&&(e=!1);var n=this.format(t,"error");if(e)throw Error(n);console.error(n)},e.warn=function(t){console.warn(this.format(t,"warn"))},e.info=function(t){console.info(this.format(t,"info"))},t}());!function(t){t[t.Header=0]="Header",t[t.Footer=1]="Footer",t[t.Cell=2]="Cell"}(Yt||(Yt={}));var Xt=function(){function t(){this.plugins=void 0,this.plugins=[]}var e=t.prototype;return e.get=function(t){return this.plugins.find(function(e){return e.id===t})},e.add=function(t){return t.id?this.get(t.id)?(qt.error("Duplicate plugin ID: "+t.id),this):(this.plugins.push(t),this):(qt.error("Plugin ID cannot be empty"),this)},e.remove=function(t){var e=this.get(t);return e&&this.plugins.splice(this.plugins.indexOf(e),1),this},e.list=function(t){return(null!=t||null!=t?this.plugins.filter(function(e){return e.position===t}):this.plugins).sort(function(t,e){return t.order&&e.order?t.order-e.order:1})},t}();function Zt(t){var e=this,n=Pt();if(t.pluginId){var i=n.plugin.get(t.pluginId);return i?M(R,{},M(i.component,a({plugin:i},t.props))):null}return void 0!==t.position?M(R,{},n.plugin.list(t.position).map(function(t){return M(t.component,a({plugin:t},e.props.props))})):null}var Kt=function(t){function e(){var e;return(e=t.call(this)||this)._columns=void 0,e._columns=[],e}l(e,t);var n=e.prototype;return n.adjustWidth=function(t,n,i){var r=t.container,o=t.autoWidth;if(!r)return this;var s=r.clientWidth,l={};n.current&&o&&(Q(M(Ut,{tableRef:n.current}),i.current),l=function(t){var e=t.querySelector("table");if(!e)return{};var n=e.className,i=e.style.cssText;e.className=n+" "+ot("shadowTable"),e.style.tableLayout="auto",e.style.width="auto",e.style.padding="0",e.style.margin="0",e.style.border="none",e.style.outline="none";var r=Array.from(e.parentNode.querySelectorAll("thead th")).reduce(function(t,e){var n;return e.style.width=e.clientWidth+"px",a(((n={})[e.getAttribute("data-column-id")]={minWidth:e.clientWidth},n),t)},{});return e.className=n,e.style.cssText=i,e.style.tableLayout="auto",Array.from(e.parentNode.querySelectorAll("thead th")).reduce(function(t,e){return t[e.getAttribute("data-column-id")].width=e.clientWidth,t},r)}(i.current));for(var c,u=f(e.tabularFormat(this.columns).reduce(function(t,e){return t.concat(e)},[]));!(c=u()).done;){var h=c.value;h.columns&&h.columns.length>0||(!h.width&&o?h.id in l&&(h.width=$t(l[h.id].width),h.minWidth=$t(l[h.id].minWidth)):h.width=$t(Vt(h.width,s)))}return n.current&&o&&Q(null,i.current),this},n.setSort=function(t,e){for(var n,i=f(e||this.columns||[]);!(n=i()).done;){var r=n.value;r.columns&&r.columns.length>0?r.sort=void 0:void 0===r.sort&&t?r.sort={}:r.sort?"object"==typeof r.sort&&(r.sort=a({},r.sort)):r.sort=void 0,r.columns&&this.setSort(t,r.columns)}},n.setResizable=function(t,e){for(var n,i=f(e||this.columns||[]);!(n=i()).done;){var r=n.value;void 0===r.resizable&&(r.resizable=t),r.columns&&this.setResizable(t,r.columns)}},n.setID=function(t){for(var e,n=f(t||this.columns||[]);!(e=n()).done;){var i=e.value;i.id||"string"!=typeof i.name||(i.id=Qt(i.name)),i.id||qt.error('Could not find a valid ID for one of the columns. Make sure a valid "id" is set for all columns.'),i.columns&&this.setID(i.columns)}},n.populatePlugins=function(t,e){for(var n,i=f(e);!(n=i()).done;){var r=n.value;void 0!==r.plugin&&t.add(a({id:r.id},r.plugin,{position:Yt.Cell}))}},e.fromColumns=function(t){for(var n,i=new e,r=f(t);!(n=r()).done;){var o=n.value;if("string"==typeof o||m(o))i.columns.push({name:o});else if("object"==typeof o){var s=o;s.columns&&(s.columns=e.fromColumns(s.columns).columns),"object"==typeof s.plugin&&void 0===s.data&&(s.data=null),i.columns.push(o)}}return i},e.createFromConfig=function(t){var n=new e;return t.from?n.columns=e.fromHTMLTable(t.from).columns:t.columns?n.columns=e.fromColumns(t.columns).columns:!t.data||"object"!=typeof t.data[0]||t.data[0]instanceof Array||(n.columns=Object.keys(t.data[0]).map(function(t){return{name:t}})),n.columns.length?(n.setID(),n.setSort(t.sort),n.setResizable(t.resizable),n.populatePlugins(t.plugin,n.columns),n):null},e.fromHTMLTable=function(t){for(var n,i=new e,r=f(t.querySelector("thead").querySelectorAll("th"));!(n=r()).done;){var o=n.value;i.columns.push({name:o.innerHTML,width:o.width})}return i},e.tabularFormat=function(t){var e=[],n=t||[],i=[];if(n&&n.length){e.push(n);for(var r,o=f(n);!(r=o()).done;){var s=r.value;s.columns&&s.columns.length&&(i=i.concat(s.columns))}i.length&&(e=e.concat(this.tabularFormat(i)))}return e},e.leafColumns=function(t){var e=[],n=t||[];if(n&&n.length)for(var i,r=f(n);!(i=r()).done;){var o=i.value;o.columns&&0!==o.columns.length||e.push(o),o.columns&&(e=e.concat(this.leafColumns(o.columns)))}return e},e.maximumDepth=function(t){return this.tabularFormat([t]).length-1},s(e,[{key:"columns",get:function(){return this._columns},set:function(t){this._columns=t}},{key:"visibleColumns",get:function(){return this._columns.filter(function(t){return!t.hidden})}}]),e}(q),Gt=function(){},Jt=function(t){function e(e){var n;return(n=t.call(this)||this).data=void 0,n.set(e),n}l(e,t);var n=e.prototype;return n.get=function(){try{return Promise.resolve(this.data()).then(function(t){return{data:t,total:t.length}})}catch(t){return Promise.reject(t)}},n.set=function(t){return t instanceof Array?this.data=function(){return t}:t instanceof Function&&(this.data=t),this},e}(Gt),te=function(t){function e(e){var n;return(n=t.call(this)||this).options=void 0,n.options=e,n}l(e,t);var n=e.prototype;return n.handler=function(t){return"function"==typeof this.options.handle?this.options.handle(t):t.ok?t.json():(qt.error("Could not fetch data: "+t.status+" - "+t.statusText,!0),null)},n.get=function(t){var e=a({},this.options,t);return"function"==typeof e.data?e.data(e):fetch(e.url,e).then(this.handler.bind(this)).then(function(t){return{data:e.then(t),total:"function"==typeof e.total?e.total(t):void 0}})},e}(Gt),ee=function(){function t(){}return t.createFromConfig=function(t){var e=null;return t.data&&(e=new Jt(t.data)),t.from&&(e=new Jt(this.tableElementToArray(t.from)),t.from.style.display="none"),t.server&&(e=new te(t.server)),e||qt.error("Could not determine the storage type",!0),e},t.tableElementToArray=function(t){for(var e,n,i=[],r=f(t.querySelector("tbody").querySelectorAll("tr"));!(e=r()).done;){for(var o,s=[],a=f(e.value.querySelectorAll("td"));!(o=a()).done;){var l=o.value;1===l.childNodes.length&&l.childNodes[0].nodeType===Node.TEXT_NODE?s.push((n=l.innerHTML,(new DOMParser).parseFromString(n,"text/html").documentElement.textContent)):s.push(Z(l.innerHTML))}i.push(s)}return i},t}(),ne="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function ie(t,e,n){if(!t.s){if(n instanceof re){if(!n.s)return void(n.o=ie.bind(null,t,e));1&e&&(e=n.s),n=n.v}if(n&&n.then)return void n.then(ie.bind(null,t,e),ie.bind(null,t,2));t.s=e,t.v=n;var i=t.o;i&&i(t)}}var re=function(){function t(){}return t.prototype.then=function(e,n){var i=new t,r=this.s;if(r){var o=1&r?e:n;if(o){try{ie(i,1,o(this.v))}catch(t){ie(i,2,t)}return i}return this}return this.o=function(t){try{var r=t.v;1&t.s?ie(i,1,e?e(r):r):n?ie(i,1,n(r)):ie(i,2,r)}catch(t){ie(i,2,t)}},i},t}();function oe(t){return t instanceof re&&1&t.s}var se=function(t){function e(e){var n;return(n=t.call(this)||this)._steps=new Map,n.cache=new Map,n.lastProcessorIndexUpdated=-1,e&&e.forEach(function(t){return n.register(t)}),n}l(e,t);var n=e.prototype;return n.clearCache=function(){this.cache=new Map,this.lastProcessorIndexUpdated=-1},n.register=function(t,e){if(void 0===e&&(e=null),!t)throw Error("Processor is not defined");if(null===t.type)throw Error("Processor type is not defined");if(this.findProcessorIndexByID(t.id)>-1)throw Error("Processor ID "+t.id+" is already defined");return t.on("propsUpdated",this.processorPropsUpdated.bind(this)),this.addProcessorByPriority(t,e),this.afterRegistered(t),t},n.tryRegister=function(t,e){void 0===e&&(e=null);try{return this.register(t,e)}catch(t){}},n.unregister=function(t){if(t&&-1!==this.findProcessorIndexByID(t.id)){var e=this._steps.get(t.type);e&&e.length&&(this._steps.set(t.type,e.filter(function(e){return e!=t})),this.emit("updated",t))}},n.addProcessorByPriority=function(t,e){var n=this._steps.get(t.type);if(!n){var i=[];this._steps.set(t.type,i),n=i}if(null===e||e<0)n.push(t);else if(n[e]){var r=n.slice(0,e-1),o=n.slice(e+1);this._steps.set(t.type,r.concat(t).concat(o))}else n[e]=t},n.getStepsByType=function(t){return this.steps.filter(function(e){return e.type===t})},n.getSortedProcessorTypes=function(){return Object.keys(K).filter(function(t){return!isNaN(Number(t))}).map(function(t){return Number(t)})},n.process=function(t){try{var e=function(t){return n.lastProcessorIndexUpdated=r.length,n.emit("afterProcess",o),o},n=this,i=n.lastProcessorIndexUpdated,r=n.steps,o=t,s=function(t,e){try{var s=function(t,e){if("function"==typeof t[ne]){var n,i,r,o=t[ne]();if(function t(s){try{for(;!(n=o.next()).done;)if((s=e(n.value))&&s.then){if(!oe(s))return void s.then(t,r||(r=ie.bind(null,i=new re,2)));s=s.v}i?ie(i,1,s):i=s}catch(t){ie(i||(i=new re),2,t)}}(),o.return){var s=function(t){try{n.done||o.return()}catch(t){}return t};if(i&&i.then)return i.then(s,function(t){throw s(t)});s()}return i}if(!("length"in t))throw new TypeError("Object is not iterable");for(var a=[],l=0;l<t.length;l++)a.push(t[l]);return function(t,e){var n,i,r=-1;return function o(s){try{for(;++r<t.length;)if((s=e(r))&&s.then){if(!oe(s))return void s.then(o,i||(i=ie.bind(null,n=new re,2)));s=s.v}n?ie(n,1,s):n=s}catch(t){ie(n||(n=new re),2,t)}}(),n}(a,function(t){return e(a[t])})}(r,function(t){var e=n.findProcessorIndexByID(t.id),r=function(){if(e>=i)return Promise.resolve(t.process(o)).then(function(e){n.cache.set(t.id,o=e)});o=n.cache.get(t.id)}();if(r&&r.then)return r.then(function(){})})}catch(t){return e(t)}return s&&s.then?s.then(void 0,e):s}(0,function(t){throw qt.error(t),n.emit("error",o),t});return Promise.resolve(s&&s.then?s.then(e):e())}catch(t){return Promise.reject(t)}},n.findProcessorIndexByID=function(t){return this.steps.findIndex(function(e){return e.id==t})},n.setLastProcessorIndex=function(t){var e=this.findProcessorIndexByID(t.id);this.lastProcessorIndexUpdated>e&&(this.lastProcessorIndexUpdated=e)},n.processorPropsUpdated=function(t){this.setLastProcessorIndex(t),this.emit("propsUpdated"),this.emit("updated",t)},n.afterRegistered=function(t){this.setLastProcessorIndex(t),this.emit("afterRegister"),this.emit("updated",t)},s(e,[{key:"steps",get:function(){for(var t,e=[],n=f(this.getSortedProcessorTypes());!(t=n()).done;){var i=this._steps.get(t.value);i&&i.length&&(e=e.concat(i))}return e.filter(function(t){return t})}}]),e}(et),ae=function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype._process=function(t){try{return Promise.resolve(this.props.storage.get(t))}catch(t){return Promise.reject(t)}},s(e,[{key:"type",get:function(){return K.Extractor}}]),e}(it),le=function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype._process=function(t){var e=tt.fromArray(t.data);return e.length=t.total,e},s(e,[{key:"type",get:function(){return K.Transformer}}]),e}(it),ce=function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype._process=function(){return Object.entries(this.props.serverStorageOptions).filter(function(t){return"function"!=typeof t[1]}).reduce(function(t,e){var n;return a({},t,((n={})[e[0]]=e[1],n))},{})},s(e,[{key:"type",get:function(){return K.Initiator}}]),e}(it),ue=function(t){function e(){return t.apply(this,arguments)||this}l(e,t);var n=e.prototype;return n.castData=function(t){if(!t||!t.length)return[];if(!this.props.header||!this.props.header.columns)return t;var e=Kt.leafColumns(this.props.header.columns);return t[0]instanceof Array?t.map(function(t){var n=0;return e.map(function(e,i){return void 0!==e.data?(n++,"function"==typeof e.data?e.data(t):e.data):t[i-n]})}):"object"!=typeof t[0]||t[0]instanceof Array?[]:t.map(function(t){return e.map(function(e,n){return void 0!==e.data?"function"==typeof e.data?e.data(t):e.data:e.id?t[e.id]:(qt.error("Could not find the correct cell for column at position "+n+".\n Make sure either 'id' or 'selector' is defined for all columns."),null)})})},n._process=function(t){return{data:this.castData(t.data),total:t.total}},s(e,[{key:"type",get:function(){return K.Transformer}}]),e}(it),he=function(){function t(){}return t.createFromConfig=function(t){var e=new se;return t.storage instanceof te&&e.register(new ce({serverStorageOptions:t.server})),e.register(new ae({storage:t.storage})),e.register(new ue({header:t.header})),e.register(new le),e},t}(),fe=function(t){var e=this;this.state=void 0,this.listeners=[],this.isDispatching=!1,this.getState=function(){return e.state},this.getListeners=function(){return e.listeners},this.dispatch=function(t){if("function"!=typeof t)throw new Error("Reducer is not a function");if(e.isDispatching)throw new Error("Reducers may not dispatch actions");e.isDispatching=!0;var n=e.state;try{e.state=t(e.state)}finally{e.isDispatching=!1}for(var i,r=f(e.listeners);!(i=r()).done;)(0,i.value)(e.state,n);return e.state},this.subscribe=function(t){if("function"!=typeof t)throw new Error("Listener is not a function");return e.listeners=[].concat(e.listeners,[t]),function(){return e.listeners=e.listeners.filter(function(e){return e!==t})}},this.state=t},de=function(t,e){var n={__c:e="__cC"+_++,__:null,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(C)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}(),pe=function(){function t(){Object.assign(this,t.defaultConfig())}var e=t.prototype;return e.assign=function(t){return Object.assign(this,t)},e.update=function(e){return e?(this.assign(t.fromPartialConfig(a({},this,e))),this):this},t.defaultConfig=function(){return{store:new fe({status:i.Init,header:void 0,data:null}),plugin:new Xt,tableRef:{current:null},width:"100%",height:"auto",processingThrottleMs:100,autoWidth:!0,style:{},className:{}}},t.fromPartialConfig=function(e){var n=(new t).assign(e);return"boolean"==typeof e.sort&&e.sort&&n.assign({sort:{multiColumn:!0}}),n.assign({header:Kt.createFromConfig(n)}),n.assign({storage:ee.createFromConfig(n)}),n.assign({pipeline:he.createFromConfig(n)}),n.assign({translator:new Dt(n.language)}),n.plugin=new Xt,n.search&&n.plugin.add({id:"search",position:Yt.Header,component:jt}),n.pagination&&n.plugin.add({id:"pagination",position:Yt.Footer,component:Wt}),n.plugins&&n.plugins.forEach(function(t){return n.plugin.add(t)}),n},t}();function ge(t){var e,n=Pt();return M("td",a({role:t.role,colSpan:t.colSpan,"data-column-id":t.column&&t.column.id,className:st(ot("td"),t.className,n.className.td),style:a({},t.style,n.style.td),onClick:function(e){t.messageCell||n.eventEmitter.emit("cellClick",e,t.cell,t.column,t.row)}},(e=t.column)?"function"==typeof e.attributes?e.attributes(t.cell.data,t.row,t.column):e.attributes:{}),t.column&&"function"==typeof t.column.formatter?t.column.formatter(t.cell.data,t.row,t.column):t.column&&t.column.plugin?M(Zt,{pluginId:t.column.id,props:{column:t.column,cell:t.cell,row:t.row}}):t.cell.data)}function me(t){var e=Pt(),n=Ft(function(t){return t.header});return M("tr",{className:st(ot("tr"),e.className.tr),onClick:function(n){t.messageRow||e.eventEmitter.emit("rowClick",n,t.row)}},t.children?t.children:t.row.cells.map(function(e,i){var r=function(t){if(n){var e=Kt.leafColumns(n.columns);if(e)return e[t]}return null}(i);return r&&r.hidden?null:M(ge,{key:e.id,cell:e,row:t.row,column:r})}))}function ve(t){return M(me,{messageRow:!0},M(ge,{role:"alert",colSpan:t.colSpan,messageCell:!0,cell:new G(t.message),className:st(ot("message"),t.className?t.className:null)}))}function ye(){var t=Pt(),e=Ft(function(t){return t.data}),n=Ft(function(t){return t.status}),r=Ft(function(t){return t.header}),o=Lt(),s=function(){return r?r.visibleColumns.length:0};return M("tbody",{className:st(ot("tbody"),t.className.tbody)},e&&e.rows.map(function(t){return M(me,{key:t.id,row:t})}),n===i.Loading&&(!e||0===e.length)&&M(ve,{message:o("loading"),colSpan:s(),className:st(ot("loading"),t.className.loading)}),n===i.Rendered&&e&&0===e.length&&M(ve,{message:o("noRecordsFound"),colSpan:s(),className:st(ot("notfound"),t.className.notfound)}),n===i.Error&&M(ve,{message:o("error"),colSpan:s(),className:st(ot("error"),t.className.error)}))}var _e=function(t){function e(){return t.apply(this,arguments)||this}l(e,t);var n=e.prototype;return n.validateProps=function(){for(var t,e=f(this.props.columns);!(t=e()).done;){var n=t.value;void 0===n.direction&&(n.direction=1),1!==n.direction&&-1!==n.direction&&qt.error("Invalid sort direction "+n.direction)}},n.compare=function(t,e){return t>e?1:t<e?-1:0},n.compareWrapper=function(t,e){for(var n,i=0,r=f(this.props.columns);!(n=r()).done;){var o=n.value;if(0!==i)break;var s=t.cells[o.index].data,a=e.cells[o.index].data;i|="function"==typeof o.compare?o.compare(s,a)*o.direction:this.compare(s,a)*o.direction}return i},n._process=function(t){var e=[].concat(t.rows);e.sort(this.compareWrapper.bind(this));var n=new tt(e);return n.length=t.length,n},s(e,[{key:"type",get:function(){return K.Sort}}]),e}(it),be=function(t,e,n,i){return function(r){var o,s=null!=(o=r.sort)&&o.columns?r.sort.columns.map(function(t){return a({},t)}):[],l=s.length,c=s.find(function(e){return e.index===t}),u=!1,h=!1,f=!1,d=!1;if(void 0!==c?n?-1===c.direction?f=!0:d=!0:1===l?d=!0:l>1&&(h=!0,u=!0):0===l?u=!0:l>0&&!n?(u=!0,h=!0):l>0&&n&&(u=!0),h&&(s=[]),u)s.push({index:t,direction:e,compare:i});else if(d){var p=s.indexOf(c);s[p].direction=e}else if(f){var g=s.indexOf(c);s.splice(g,1)}return a({},r,{sort:{columns:s}})}},xe=function(t,e,n){return function(i){var r=(i.sort?[].concat(i.sort.columns):[]).find(function(e){return e.index===t});return a({},i,r?be(t,1===r.direction?-1:1,e,n)(i):be(t,1,e,n)(i))}},we=function(t){function e(){return t.apply(this,arguments)||this}return l(e,t),e.prototype._process=function(t){var e={};return this.props.url&&(e.url=this.props.url(t.url,this.props.columns)),this.props.body&&(e.body=this.props.body(t.body,this.props.columns)),a({},t,e)},s(e,[{key:"type",get:function(){return K.ServerSort}}]),e}(it);function ke(t){var e=Pt(),n=Nt().dispatch,i=Lt(),r=xt(0),o=r[0],s=r[1],l=e.sort,c=Ft(function(t){return t.sort}),u="object"==typeof(null==l?void 0:l.server)?K.ServerSort:K.Sort,h=function(){var t=e.pipeline.getStepsByType(u);if(t.length)return t[0]};return wt(function(){var t=h()||(u===K.ServerSort?new we(a({columns:c?c.columns:[]},l.server)):new _e({columns:c?c.columns:[]}));return e.pipeline.tryRegister(t),function(){return e.pipeline.unregister(t)}},[e]),wt(function(){if(c){var e,n=c.columns.find(function(e){return e.index===t.index});n?(0===o&&(n.direction=null!=(e=t.direction)?e:1),s(n.direction)):s(0)}},[c]),wt(function(){var t=h();t&&c&&t.setProps({columns:c.columns})},[c]),M("button",{tabIndex:-1,"aria-label":i("sort.sort"+(1===o?"Desc":"Asc")),title:i("sort.sort"+(1===o?"Desc":"Asc")),className:st(ot("sort"),ot("sort",function(t){return 1===t?"asc":-1===t?"desc":"neutral"}(o)),e.className.sort),onClick:function(e){e.preventDefault(),e.stopPropagation(),n(xe(t.index,!0===e.shiftKey&&l.multiColumn,t.compare))}})}var Se=function(t,e){var n;void 0===e&&(e=100);var i=Date.now(),r=function(){i=Date.now(),t.apply(void 0,[].slice.call(arguments))};return function(){var t=[].slice.call(arguments),o=Date.now()-i;o>=e?r.apply(void 0,t):(n&&clearTimeout(n),n=setTimeout(function(){r.apply(void 0,t),n=null},e-o))}};function Me(t){var e,n=function(t){return t instanceof MouseEvent?Math.floor(t.pageX):Math.floor(t.changedTouches[0].pageX)},i=function(i){i.stopPropagation();var s=parseInt(t.thRef.current.style.width,10)-n(i);e=Se(function(t){return r(t,s)},10),document.addEventListener("mouseup",o),document.addEventListener("touchend",o),document.addEventListener("mousemove",e),document.addEventListener("touchmove",e)},r=function(e,i){e.stopPropagation();var r=t.thRef.current;i+n(e)>=parseInt(r.style.minWidth,10)&&(r.style.width=i+n(e)+"px")},o=function t(n){n.stopPropagation(),document.removeEventListener("mouseup",t),document.removeEventListener("mousemove",e),document.removeEventListener("touchmove",e),document.removeEventListener("touchend",t)};return M("div",{className:st(ot("th"),ot("resizable")),onMouseDown:i,onTouchStart:i,onClick:function(t){return t.stopPropagation()}})}function Ee(t){var e=Pt(),n=kt(null),i=xt({}),r=i[0],o=i[1],s=Nt().dispatch;wt(function(){if(e.fixedHeader&&n.current){var t=n.current.offsetTop;"number"==typeof t&&o({top:t})}},[n]);var l,c=function(){return null!=t.column.sort},u=function(n){n.stopPropagation(),c()&&s(xe(t.index,!0===n.shiftKey&&e.sort.multiColumn,t.column.sort.compare))};return M("th",a({ref:n,"data-column-id":t.column&&t.column.id,className:st(ot("th"),c()?ot("th","sort"):null,e.fixedHeader?ot("th","fixed"):null,e.className.th),onClick:u,style:a({},e.style.th,{minWidth:t.column.minWidth,width:t.column.width},r,t.style),onKeyDown:function(t){c()&&13===t.which&&u(t)},rowSpan:t.rowSpan>1?t.rowSpan:void 0,colSpan:t.colSpan>1?t.colSpan:void 0},(l=t.column)?"function"==typeof l.attributes?l.attributes(null,null,t.column):l.attributes:{},c()?{tabIndex:0}:{}),M("div",{className:ot("th","content")},void 0!==t.column.name?t.column.name:void 0!==t.column.plugin?M(Zt,{pluginId:t.column.plugin.id,props:{column:t.column}}):null),c()&&M(ke,a({index:t.index},t.column.sort)),t.column.resizable&&t.index<e.header.visibleColumns.length-1&&M(Me,{column:t.column,thRef:n}))}function Re(){var t,e=Pt(),n=Ft(function(t){return t.header});return n?M("thead",{key:n.id,className:st(ot("thead"),e.className.thead)},(t=Kt.tabularFormat(n.columns)).map(function(e,i){return function(t,e,i){var r=Kt.leafColumns(n.columns);return M(me,null,t.map(function(t){return t.hidden?null:function(t,e,n,i){var r=function(t,e,n){var i=Kt.maximumDepth(t),r=n-e;return{rowSpan:Math.floor(r-i-i/r),colSpan:t.columns&&t.columns.length||1}}(t,e,i);return M(Ee,{column:t,index:n,colSpan:r.colSpan,rowSpan:r.rowSpan})}(t,e,r.indexOf(t),i)}))}(e,i,t.length)})):null}var Te=function(t){return function(e){return a({},e,{header:t})}};function Ae(){var t=Pt(),e=kt(null),n=Nt().dispatch;return wt(function(){e&&n(function(t){return function(e){return a({},e,{tableRef:t})}}(e))},[e]),M("table",{ref:e,role:"grid",className:st(ot("table"),t.className.table),style:a({},t.style.table,{height:t.height})},M(Re,null),M(ye,null))}function Oe(){var t=xt(!0),e=t[0],n=t[1],i=kt(null),r=Pt();return wt(function(){0===i.current.children.length&&n(!1)},[i]),e?M("div",{ref:i,className:st(ot("head"),r.className.header),style:a({},r.style.header)},M(Zt,{position:Yt.Header})):null}function Ce(){var t=kt(null),e=xt(!0),n=e[0],i=e[1],r=Pt();return wt(function(){0===t.current.children.length&&i(!1)},[t]),n?M("div",{ref:t,className:st(ot("footer"),r.className.footer),style:a({},r.style.footer)},M(Zt,{position:Yt.Footer})):null}function Pe(){var t=Pt(),e=Nt().dispatch,n=Ft(function(t){return t.status}),r=Ft(function(t){return t.data}),o=Ft(function(t){return t.tableRef}),s={current:null},l=Se(function(){try{e(function(t){return a({},t,{status:i.Loading})});var n=function(n,r){try{var o=Promise.resolve(t.pipeline.process()).then(function(t){e(function(t){return function(e){return t?a({},e,{data:t,status:i.Loaded}):e}}(t)),setTimeout(function(){e(function(t){return t.status===i.Loaded?a({},t,{status:i.Rendered}):t})},0)})}catch(t){return r(t)}return o&&o.then?o.then(void 0,r):o}(0,function(t){qt.error(t),e(function(t){return a({},t,{data:null,status:i.Error})})});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(t){return Promise.reject(t)}},t.processingThrottleMs);return wt(function(){return e(Te(t.header)),l(),t.pipeline.on("updated",l),function(){return t.pipeline.off("updated",l)}},[]),wt(function(){t.header&&n===i.Loaded&&null!=r&&r.length&&e(Te(t.header.adjustWidth(t,o,s)))},[r,t,s]),M("div",{role:"complementary",className:st("gridjs",ot("container"),n===i.Loading?ot("loading"):null,t.className.container),style:a({},t.style.container,{width:t.width})},n===i.Loading&&M("div",{className:ot("loading-bar")}),M(Oe,null),M("div",{className:ot("wrapper"),style:{height:t.height}},M(Ae,null)),M(Ce,null),M("div",{ref:s,id:"gridjs-temp",className:ot("temp")}))}var Ie=function(t){function e(e){var n;return(n=t.call(this)||this).config=void 0,n.plugin=void 0,n.config=(new pe).assign({instance:u(n),eventEmitter:u(n)}).update(e),n.plugin=n.config.plugin,n}l(e,t);var n=e.prototype;return n.updateConfig=function(t){return this.config.update(t),this},n.createElement=function(){return M(de.Provider,{value:this.config,children:M(Pe,{})})},n.forceRender=function(){return this.config&&this.config.container||qt.error("Container is empty. Make sure you call render() before forceRender()",!0),this.destroy(),Q(this.createElement(),this.config.container),this},n.destroy=function(){this.config.pipeline.clearCache(),Q(null,this.config.container)},n.render=function(t){return t||qt.error("Container element cannot be null",!0),t.childNodes.length>0?(qt.error("The container element "+t+" is not empty. Make sure the container is empty and call render() again"),this):(this.config.container=t,Q(this.createElement(),t),this)},e}(et),De=n(961),Le=function(t,e){return Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Le(t,e)};function ze(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Le(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Ne,Fe=function(t){function e(e){var n=t.call(this,e)||this;return n.wrapper=(0,r.createRef)(),n.instance=null,n.instance=new Ie(e||{}),n}return ze(e,t),e.prototype.getInstance=function(){return this.instance},e.prototype.componentDidMount=function(){this.wrapper.current.childNodes.length>0&&(this.wrapper.current.innerHTML=""),this.instance.render(this.wrapper.current)},e.prototype.componentDidUpdate=function(){this.instance.updateConfig(this.props).forceRender()},e.prototype.render=function(){return r.createElement("div",{ref:this.wrapper})},e}(r.Component),je=De;Ne=je.createRoot,je.hydrateRoot,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ref={current:null},e}ze(e,t),e.prototype.componentDidMount=function(){Ne(this.ref.current).render(this.props.element)},e.prototype.render=function(){return M(this.props.parent,{ref:this.ref})},e.defaultProps={parent:"div"}}(T)},7168(t,e,n){var i;!function(r,o,s,a){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],u=o.createElement("div"),h=Math.round,f=Math.abs,d=Date.now;function p(t,e,n){return setTimeout(x(t,n),e)}function g(t,e,n){return!!Array.isArray(t)&&(m(t,n[e],n),!0)}function m(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 v(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",o=r.console&&(r.console.warn||r.console.log);return o&&o.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 y=v(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`."),_=v(function(t,e){return y(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 x(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){m(T(e),function(e){t.addEventListener(e,n,!1)})}function M(t,e,n){m(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 R(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 O(t){return Array.prototype.slice.call(t,0)}function C(t,e,n){for(var i=[],r=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];A(r,s)<0&&i.push(t[o]),r[o]=s,o++}return n&&(i=e?i.sort(function(t,n){return t[e]>n[e]}):i.sort()),i}function P(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o<c.length;){if((i=(n=c[o])?n+r:e)in t)return i;o++}return a}var I=1;function D(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}var L="ontouchstart"in r,z=P(r,"PointerEvent")!==a,N=L&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),F="touch",j="mouse",H=["x","y"],B=["clientX","clientY"];function W(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 V(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=1&e&&i-r===0,s=12&e&&i-r===0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=$(e)),r>1&&!n.firstMultiple?n.firstMultiple=$(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,l=s?s.center:o.center,c=e.center=U(i);e.timeStamp=d(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=X(l,c),e.distance=q(l,c),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};1!==e.eventType&&4!==o.eventType||(r=t.prevDelta={x:o.deltaX||0,y:o.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=Q(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=f(p.x)>f(p.y)?p.x:p.y,e.scale=s?(u=s.pointers,q((h=i)[0],h[1],B)/q(u[0],u[1],B)):1,e.rotation=s?function(t,e){return X(e[1],e[0],B)+X(t[1],t[0],B)}(s.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,o,s=t.lastInterval||e,l=e.timeStamp-s.timeStamp;if(8!=e.eventType&&(l>25||s.velocity===a)){var c=e.deltaX-s.deltaX,u=e.deltaY-s.deltaY,h=Q(l,c,u);i=h.x,r=h.y,n=f(h.x)>f(h.y)?h.x:h.y,o=Y(c,u),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}(n,e);var g=t.element;E(e.srcEvent.target,g)&&(g=e.srcEvent.target),e.target=g}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function $(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:d(),pointers:e,center:U(e),deltaX:t.deltaX,deltaY:t.deltaY}}function U(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 Q(t,e,n){return{x:e/t||0,y:n/t||0}}function Y(t,e){return t===e?1:f(t)>=f(e)?t<0?2:4:e<0?8:16}function q(t,e,n){n||(n=H);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function X(t,e,n){n||(n=H);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}W.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(D(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(D(this.element),this.evWin,this.domHandler)}};var Z={mousedown:1,mousemove:2,mouseup:4};function K(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,W.apply(this,arguments)}b(K,W,{handler:function(t){var e=Z[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:j,srcEvent:t}))}});var G={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},J={2:F,3:"pen",4:j,5:"kinect"},tt="pointerdown",et="pointermove pointerup pointercancel";function nt(){this.evEl=tt,this.evWin=et,W.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(tt="MSPointerDown",et="MSPointerMove MSPointerUp MSPointerCancel"),b(nt,W,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=G[i],o=J[t.pointerType]||t.pointerType,s=o==F,a=A(e,t.pointerId,"pointerId");1&r&&(0===t.button||s)?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:o,srcEvent:t}),n&&e.splice(a,1))}});var it={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function rt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,W.apply(this,arguments)}function ot(t,e){var n=O(t.touches),i=O(t.changedTouches);return 12&e&&(n=C(n.concat(i),"identifier",!0)),[n,i]}b(rt,W,{handler:function(t){var e=it[t.type];if(1===e&&(this.started=!0),this.started){var n=ot.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 st={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function at(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},W.apply(this,arguments)}function lt(t,e){var n=O(t.touches),i=this.targetIds;if(3&e&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=O(t.changedTouches),a=[],l=this.target;if(o=n.filter(function(t){return E(t.target,l)}),1===e)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),12&e&&delete i[s[r].identifier],r++;return a.length?[C(o.concat(a),"identifier",!0),a]:void 0}function ct(){W.apply(this,arguments);var t=x(this.handler,this);this.touch=new at(this.manager,t),this.mouse=new K(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function ut(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,ht.call(this,e)):12&t&&ht.call(this,e)}function ht(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 ft(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(e-r.x),s=Math.abs(n-r.y);if(o<=25&&s<=25)return!0}return!1}b(at,W,{handler:function(t){var e=st[t.type],n=lt.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:F,srcEvent:t})}}),b(ct,W,{handler:function(t,e,n){var i=n.pointerType==F,r=n.pointerType==j;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)ut.call(this,e,n);else if(r&&ft.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var dt=P(u.style,"touchAction"),pt=dt!==a,gt="compute",mt="auto",vt="manipulation",yt="none",_t="pan-x",bt="pan-y",xt=function(){if(!pt)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 wt(t,e){this.manager=t,this.set(e)}wt.prototype={set:function(t){t==gt&&(t=this.compute()),pt&&this.manager.element.style&&xt[t]&&(this.manager.element.style[dt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return m(this.manager.recognizers,function(e){w(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(R(t,yt))return yt;var e=R(t,_t),n=R(t,bt);return e&&n?yt:e||n?e?_t:bt:R(t,vt)?vt:mt}(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=R(i,yt)&&!xt[yt],o=R(i,bt)&&!xt[bt],s=R(i,_t)&&!xt[_t];if(r){var a=1===t.pointers.length,l=t.distance<2,c=t.deltaTime<250;if(a&&l&&c)return}if(!s||!o)return r||o&&6&n||s&&24&n?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var kt=32;function St(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 Mt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function Et(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function Rt(t,e){var n=e.manager;return n?n.get(t):t}function Tt(){St.apply(this,arguments)}function At(){Tt.apply(this,arguments),this.pX=null,this.pY=null}function Ot(){Tt.apply(this,arguments)}function Ct(){St.apply(this,arguments),this._timer=null,this._input=null}function Pt(){Tt.apply(this,arguments)}function It(){Tt.apply(this,arguments)}function Dt(){St.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 zt(t,e)}function zt(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||(z?nt:N?at:L?ct:K))(this,V),this.touchAction=new wt(this,this.options.touchAction),Nt(this,!0),m(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 Nt(t,e){var n,i=t.element;i.style&&(m(t.options.cssProps,function(r,o){n=P(i.style,o),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={}))}St.prototype={defaults:{},set:function(t){return l(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(g(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Rt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return g(t,"dropRecognizeWith",this)||(t=Rt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(g(t,"requireFailure",this))return this;var e=this.requireFail;return-1===A(e,t=Rt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(g(t,"dropRequireFailure",this))return this;t=Rt(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+Mt(n)),i(e.options.event),t.additionalEvent&&i(t.additionalEvent),n>=8&&i(e.options.event+Mt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=kt},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=kt);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(Tt,St,{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:kt}}),b(At,Tt,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push(bt),24&t&&e.push(_t),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(6&e.direction?(r=0===o?1:o<0?2:4,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?1:s<0?8:16,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return Tt.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=Et(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),b(Ot,Tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[yt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),b(Ct,St,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[mt]},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 kt},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=d(),this.manager.emit(this.options.event,this._input)))}}),b(Pt,Tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[yt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),b(It,Tt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return At.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&&f(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=Et(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),b(Dt,St,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[vt]},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 o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||q(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?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 kt},failTimeout:function(){return this._timer=p(function(){this.state=kt},this.options.interval,this),kt},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:gt,enable:!0,inputTarget:null,inputClass:null,preset:[[Pt,{enable:!1}],[Ot,{enable:!1},["rotate"]],[It,{direction:6}],[At,{direction:6},["swipe"]],[Dt],[Dt,{event:"doubletap",taps:2},["tap"]],[Ct]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},zt.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 o=0;o<i.length;)n=i[o],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),o++}},get:function(t){if(t instanceof St)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(g(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(g(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 m(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 m(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=o.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&&Nt(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:kt,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:zt,Input:W,TouchAction:wt,TouchInput:at,MouseInput:K,PointerEventInput:nt,TouchMouseInput:ct,SingleTouchInput:rt,Recognizer:St,AttrRecognizer:Tt,Tap:Dt,Pan:At,Swipe:It,Pinch:Ot,Rotate:Pt,Press:Ct,on:S,off:M,each:m,merge:_,extend:y,assign:l,inherit:b,bindFn:x,prefixed:P}),(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)},2543(t,e,n){var i;t=n.nmd(t),function(){var r,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",l=32,c=128,u=1/0,h=9007199254740991,f=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",v="[object Boolean]",y="[object Date]",_="[object Error]",b="[object Function]",x="[object GeneratorFunction]",w="[object Map]",k="[object Number]",S="[object Object]",M="[object Promise]",E="[object RegExp]",R="[object Set]",T="[object String]",A="[object Symbol]",O="[object WeakMap]",C="[object ArrayBuffer]",P="[object DataView]",I="[object Float32Array]",D="[object Float64Array]",L="[object Int8Array]",z="[object Int16Array]",N="[object Int32Array]",F="[object Uint8Array]",j="[object Uint8ClampedArray]",H="[object Uint16Array]",B="[object Uint32Array]",W=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,U=/&(?:amp|lt|gt|quot|#39);/g,Q=/[&<>"']/g,Y=RegExp(U.source),q=RegExp(Q.source),X=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),it=/^\s+/,rt=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ut=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ft=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,bt=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",kt="\\u2700-\\u27bf",St="a-z\\xdf-\\xf6\\xf8-\\xff",Mt="A-Z\\xc0-\\xd6\\xd8-\\xde",Et="\\ufe0e\\ufe0f",Rt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Tt="["+xt+"]",At="["+Rt+"]",Ot="["+wt+"]",Ct="\\d+",Pt="["+kt+"]",It="["+St+"]",Dt="[^"+xt+Rt+Ct+kt+St+Mt+"]",Lt="\\ud83c[\\udffb-\\udfff]",zt="[^"+xt+"]",Nt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",jt="["+Mt+"]",Ht="\\u200d",Bt="(?:"+It+"|"+Dt+")",Wt="(?:"+jt+"|"+Dt+")",Vt="(?:['’](?:d|ll|m|re|s|t|ve))?",$t="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+Ot+"|"+Lt+")?",Qt="["+Et+"]?",Yt=Qt+Ut+"(?:"+Ht+"(?:"+[zt,Nt,Ft].join("|")+")"+Qt+Ut+")*",qt="(?:"+[Pt,Nt,Ft].join("|")+")"+Yt,Xt="(?:"+[zt+Ot+"?",Ot,Nt,Ft,Tt].join("|")+")",Zt=RegExp("['’]","g"),Kt=RegExp(Ot,"g"),Gt=RegExp(Lt+"(?="+Lt+")|"+Xt+Yt,"g"),Jt=RegExp([jt+"?"+It+"+"+Vt+"(?="+[At,jt,"$"].join("|")+")",Wt+"+"+$t+"(?="+[At,jt+Bt,"$"].join("|")+")",jt+"?"+Bt+"+"+Vt,jt+"+"+$t,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ct,qt].join("|"),"g"),te=RegExp("["+Ht+xt+wt+Et+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ie=-1,re={};re[I]=re[D]=re[L]=re[z]=re[N]=re[F]=re[j]=re[H]=re[B]=!0,re[g]=re[m]=re[C]=re[v]=re[P]=re[y]=re[_]=re[b]=re[w]=re[k]=re[S]=re[E]=re[R]=re[T]=re[O]=!1;var oe={};oe[g]=oe[m]=oe[C]=oe[P]=oe[v]=oe[y]=oe[I]=oe[D]=oe[L]=oe[z]=oe[N]=oe[w]=oe[k]=oe[S]=oe[E]=oe[R]=oe[T]=oe[A]=oe[F]=oe[j]=oe[H]=oe[B]=!0,oe[_]=oe[b]=oe[O]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,le=parseInt,ce="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ue="object"==typeof self&&self&&self.Object===Object&&self,he=ce||ue||Function("return this")(),fe=e&&!e.nodeType&&e,de=fe&&t&&!t.nodeType&&t,pe=de&&de.exports===fe,ge=pe&&ce.process,me=function(){try{return de&&de.require&&de.require("util").types||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ve=me&&me.isArrayBuffer,ye=me&&me.isDate,_e=me&&me.isMap,be=me&&me.isRegExp,xe=me&&me.isSet,we=me&&me.isTypedArray;function ke(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Se(t,e,n,i){for(var r=-1,o=null==t?0:t.length;++r<o;){var s=t[r];e(i,s,n(s),t)}return i}function Me(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t}function Ee(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Re(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(!e(t[n],n,t))return!1;return!0}function Te(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var s=t[n];e(s,n,t)&&(o[r++]=s)}return o}function Ae(t,e){return!(null==t||!t.length)&&je(t,e,0)>-1}function Oe(t,e,n){for(var i=-1,r=null==t?0:t.length;++i<r;)if(n(e,t[i]))return!0;return!1}function Ce(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}function Pe(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}function Ie(t,e,n,i){var r=-1,o=null==t?0:t.length;for(i&&o&&(n=t[++r]);++r<o;)n=e(n,t[r],r,t);return n}function De(t,e,n,i){var r=null==t?0:t.length;for(i&&r&&(n=t[--r]);r--;)n=e(n,t[r],r,t);return n}function Le(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}var ze=Ve("length");function Ne(t,e,n){var i;return n(t,function(t,n,r){if(e(t,n,r))return i=n,!1}),i}function Fe(t,e,n,i){for(var r=t.length,o=n+(i?1:-1);i?o--:++o<r;)if(e(t[o],o,t))return o;return-1}function je(t,e,n){return e==e?function(t,e,n){for(var i=n-1,r=t.length;++i<r;)if(t[i]===e)return i;return-1}(t,e,n):Fe(t,Be,n)}function He(t,e,n,i){for(var r=n-1,o=t.length;++r<o;)if(i(t[r],e))return r;return-1}function Be(t){return t!=t}function We(t,e){var n=null==t?0:t.length;return n?Qe(t,e)/n:f}function Ve(t){return function(e){return null==e?r:e[t]}}function $e(t){return function(e){return null==t?r:t[e]}}function Ue(t,e,n,i,r){return r(t,function(t,r,o){n=i?(i=!1,t):e(n,t,r,o)}),n}function Qe(t,e){for(var n,i=-1,o=t.length;++i<o;){var s=e(t[i]);s!==r&&(n=n===r?s:n+s)}return n}function Ye(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function qe(t){return t?t.slice(0,fn(t)+1).replace(it,""):t}function Xe(t){return function(e){return t(e)}}function Ze(t,e){return Ce(e,function(e){return t[e]})}function Ke(t,e){return t.has(e)}function Ge(t,e){for(var n=-1,i=t.length;++n<i&&je(e,t[n],0)>-1;);return n}function Je(t,e){for(var n=t.length;n--&&je(e,t[n],0)>-1;);return n}var tn=$e({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),en=$e({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(t){return"\\"+se[t]}function rn(t){return te.test(t)}function on(t){var e=-1,n=Array(t.size);return t.forEach(function(t,i){n[++e]=[i,t]}),n}function sn(t,e){return function(n){return t(e(n))}}function an(t,e){for(var n=-1,i=t.length,r=0,o=[];++n<i;){var s=t[n];s!==e&&s!==a||(t[n]=a,o[r++]=n)}return o}function ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function cn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function un(t){return rn(t)?function(t){for(var e=Gt.lastIndex=0;Gt.test(t);)++e;return e}(t):ze(t)}function hn(t){return rn(t)?function(t){return t.match(Gt)||[]}(t):function(t){return t.split("")}(t)}function fn(t){for(var e=t.length;e--&&rt.test(t.charAt(e)););return e}var dn=$e({"&":"&","<":"<",">":">",""":'"',"'":"'"}),pn=function t(e){var n,i=(e=null==e?he:pn.defaults(he.Object(),e,pn.pick(he,ne))).Array,rt=e.Date,xt=e.Error,wt=e.Function,kt=e.Math,St=e.Object,Mt=e.RegExp,Et=e.String,Rt=e.TypeError,Tt=i.prototype,At=wt.prototype,Ot=St.prototype,Ct=e["__core-js_shared__"],Pt=At.toString,It=Ot.hasOwnProperty,Dt=0,Lt=(n=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",zt=Ot.toString,Nt=Pt.call(St),Ft=he._,jt=Mt("^"+Pt.call(It).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ht=pe?e.Buffer:r,Bt=e.Symbol,Wt=e.Uint8Array,Vt=Ht?Ht.allocUnsafe:r,$t=sn(St.getPrototypeOf,St),Ut=St.create,Qt=Ot.propertyIsEnumerable,Yt=Tt.splice,qt=Bt?Bt.isConcatSpreadable:r,Xt=Bt?Bt.iterator:r,Gt=Bt?Bt.toStringTag:r,te=function(){try{var t=lo(St,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==he.clearTimeout&&e.clearTimeout,ce=rt&&rt.now!==he.Date.now&&rt.now,ue=e.setTimeout!==he.setTimeout&&e.setTimeout,fe=kt.ceil,de=kt.floor,ge=St.getOwnPropertySymbols,me=Ht?Ht.isBuffer:r,ze=e.isFinite,$e=Tt.join,gn=sn(St.keys,St),mn=kt.max,vn=kt.min,yn=rt.now,_n=e.parseInt,bn=kt.random,xn=Tt.reverse,wn=lo(e,"DataView"),kn=lo(e,"Map"),Sn=lo(e,"Promise"),Mn=lo(e,"Set"),En=lo(e,"WeakMap"),Rn=lo(St,"create"),Tn=En&&new En,An={},On=No(wn),Cn=No(kn),Pn=No(Sn),In=No(Mn),Dn=No(En),Ln=Bt?Bt.prototype:r,zn=Ln?Ln.valueOf:r,Nn=Ln?Ln.toString:r;function Fn(t){if(ta(t)&&!Vs(t)&&!(t instanceof Wn)){if(t instanceof Bn)return t;if(It.call(t,"__wrapped__"))return Fo(t)}return new Bn(t)}var jn=function(){function t(){}return function(e){if(!Js(e))return{};if(Ut)return Ut(e);t.prototype=e;var n=new t;return t.prototype=r,n}}();function Hn(){}function Bn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=r}function Wn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function $n(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Un(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Qn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Un;++e<n;)this.add(t[e])}function Yn(t){var e=this.__data__=new $n(t);this.size=e.size}function qn(t,e){var n=Vs(t),i=!n&&Ws(t),r=!n&&!i&&Ys(t),o=!n&&!i&&!r&&la(t),s=n||i||r||o,a=s?Ye(t.length,Et):[],l=a.length;for(var c in t)!e&&!It.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mo(c,l))||a.push(c);return a}function Xn(t){var e=t.length;return e?t[Ui(0,e-1)]:r}function Zn(t,e){return Po(Er(t),oi(e,0,t.length))}function Kn(t){return Po(Er(t))}function Gn(t,e,n){(n!==r&&!js(t[e],n)||n===r&&!(e in t))&&ii(t,e,n)}function Jn(t,e,n){var i=t[e];It.call(t,e)&&js(i,n)&&(n!==r||e in t)||ii(t,e,n)}function ti(t,e){for(var n=t.length;n--;)if(js(t[n][0],e))return n;return-1}function ei(t,e,n,i){return ui(t,function(t,r,o){e(i,t,n(t),o)}),i}function ni(t,e){return t&&Rr(e,Oa(e),t)}function ii(t,e,n){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ri(t,e){for(var n=-1,o=e.length,s=i(o),a=null==t;++n<o;)s[n]=a?r:Ma(t,e[n]);return s}function oi(t,e,n){return t==t&&(n!==r&&(t=t<=n?t:n),e!==r&&(t=t>=e?t:e)),t}function si(t,e,n,i,o,s){var a,l=1&e,c=2&e,u=4&e;if(n&&(a=o?n(t,i,o,s):n(t)),a!==r)return a;if(!Js(t))return t;var h=Vs(t);if(h){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&It.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!l)return Er(t,a)}else{var f=ho(t),d=f==b||f==x;if(Ys(t))return br(t,l);if(f==S||f==g||d&&!o){if(a=c||d?{}:po(t),!l)return c?function(t,e){return Rr(t,uo(t),e)}(t,function(t,e){return t&&Rr(e,Ca(e),t)}(a,t)):function(t,e){return Rr(t,co(t),e)}(t,ni(a,t))}else{if(!oe[f])return o?t:{};a=function(t,e,n){var i,r=t.constructor;switch(e){case C:return xr(t);case v:case y:return new r(+t);case P:return function(t,e){var n=e?xr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case I:case D:case L:case z:case N:case F:case j:case H:case B:return wr(t,n);case w:return new r;case k:case T:return new r(t);case E:return function(t){var e=new t.constructor(t.source,ft.exec(t));return e.lastIndex=t.lastIndex,e}(t);case R:return new r;case A:return i=t,zn?St(zn.call(i)):{}}}(t,f,l)}}s||(s=new Yn);var p=s.get(t);if(p)return p;s.set(t,a),oa(t)?t.forEach(function(i){a.add(si(i,e,n,i,t,s))}):ea(t)&&t.forEach(function(i,r){a.set(r,si(i,e,n,r,t,s))});var m=h?r:(u?c?eo:to:c?Ca:Oa)(t);return Me(m||t,function(i,r){m&&(i=t[r=i]),Jn(a,r,si(i,e,n,r,t,s))}),a}function ai(t,e,n){var i=n.length;if(null==t)return!i;for(t=St(t);i--;){var o=n[i],s=e[o],a=t[o];if(a===r&&!(o in t)||!s(a))return!1}return!0}function li(t,e,n){if("function"!=typeof t)throw new Rt(o);return To(function(){t.apply(r,n)},e)}function ci(t,e,n,i){var r=-1,o=Ae,s=!0,a=t.length,l=[],c=e.length;if(!a)return l;n&&(e=Ce(e,Xe(n))),i?(o=Oe,s=!1):e.length>=200&&(o=Ke,s=!1,e=new Qn(e));t:for(;++r<a;){var u=t[r],h=null==n?u:n(u);if(u=i||0!==u?u:0,s&&h==h){for(var f=c;f--;)if(e[f]===h)continue t;l.push(u)}else o(e,h,i)||l.push(u)}return l}Fn.templateSettings={escape:X,evaluate:Z,interpolate:K,variable:"",imports:{_:Fn}},Fn.prototype=Hn.prototype,Fn.prototype.constructor=Fn,Bn.prototype=jn(Hn.prototype),Bn.prototype.constructor=Bn,Wn.prototype=jn(Hn.prototype),Wn.prototype.constructor=Wn,Vn.prototype.clear=function(){this.__data__=Rn?Rn(null):{},this.size=0},Vn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Vn.prototype.get=function(t){var e=this.__data__;if(Rn){var n=e[t];return n===s?r:n}return It.call(e,t)?e[t]:r},Vn.prototype.has=function(t){var e=this.__data__;return Rn?e[t]!==r:It.call(e,t)},Vn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Rn&&e===r?s:e,this},$n.prototype.clear=function(){this.__data__=[],this.size=0},$n.prototype.delete=function(t){var e=this.__data__,n=ti(e,t);return!(n<0||(n==e.length-1?e.pop():Yt.call(e,n,1),--this.size,0))},$n.prototype.get=function(t){var e=this.__data__,n=ti(e,t);return n<0?r:e[n][1]},$n.prototype.has=function(t){return ti(this.__data__,t)>-1},$n.prototype.set=function(t,e){var n=this.__data__,i=ti(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this},Un.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(kn||$n),string:new Vn}},Un.prototype.delete=function(t){var e=so(this,t).delete(t);return this.size-=e?1:0,e},Un.prototype.get=function(t){return so(this,t).get(t)},Un.prototype.has=function(t){return so(this,t).has(t)},Un.prototype.set=function(t,e){var n=so(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},Qn.prototype.add=Qn.prototype.push=function(t){return this.__data__.set(t,s),this},Qn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.clear=function(){this.__data__=new $n,this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Yn.prototype.get=function(t){return this.__data__.get(t)},Yn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof $n){var i=n.__data__;if(!kn||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Un(i)}return n.set(t,e),this.size=n.size,this};var ui=Or(yi),hi=Or(_i,!0);function fi(t,e){var n=!0;return ui(t,function(t,i,r){return n=!!e(t,i,r)}),n}function di(t,e,n){for(var i=-1,o=t.length;++i<o;){var s=t[i],a=e(s);if(null!=a&&(l===r?a==a&&!aa(a):n(a,l)))var l=a,c=s}return c}function pi(t,e){var n=[];return ui(t,function(t,i,r){e(t,i,r)&&n.push(t)}),n}function gi(t,e,n,i,r){var o=-1,s=t.length;for(n||(n=go),r||(r=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?gi(a,e-1,n,i,r):Pe(r,a):i||(r[r.length]=a)}return r}var mi=Cr(),vi=Cr(!0);function yi(t,e){return t&&mi(t,e,Oa)}function _i(t,e){return t&&vi(t,e,Oa)}function bi(t,e){return Te(e,function(e){return Zs(t[e])})}function xi(t,e){for(var n=0,i=(e=mr(e,t)).length;null!=t&&n<i;)t=t[zo(e[n++])];return n&&n==i?t:r}function wi(t,e,n){var i=e(t);return Vs(t)?i:Pe(i,n(t))}function ki(t){return null==t?t===r?"[object Undefined]":"[object Null]":Gt&&Gt in St(t)?function(t){var e=It.call(t,Gt),n=t[Gt];try{t[Gt]=r;var i=!0}catch(t){}var o=zt.call(t);return i&&(e?t[Gt]=n:delete t[Gt]),o}(t):function(t){return zt.call(t)}(t)}function Si(t,e){return t>e}function Mi(t,e){return null!=t&&It.call(t,e)}function Ei(t,e){return null!=t&&e in St(t)}function Ri(t,e,n){for(var o=n?Oe:Ae,s=t[0].length,a=t.length,l=a,c=i(a),u=1/0,h=[];l--;){var f=t[l];l&&e&&(f=Ce(f,Xe(e))),u=vn(f.length,u),c[l]=!n&&(e||s>=120&&f.length>=120)?new Qn(l&&f):r}f=t[0];var d=-1,p=c[0];t:for(;++d<s&&h.length<u;){var g=f[d],m=e?e(g):g;if(g=n||0!==g?g:0,!(p?Ke(p,m):o(h,m,n))){for(l=a;--l;){var v=c[l];if(!(v?Ke(v,m):o(t[l],m,n)))continue t}p&&p.push(m),h.push(g)}}return h}function Ti(t,e,n){var i=null==(t=Mo(t,e=mr(e,t)))?t:t[zo(Xo(e))];return null==i?r:ke(i,t,n)}function Ai(t){return ta(t)&&ki(t)==g}function Oi(t,e,n,i,o){return t===e||(null==t||null==e||!ta(t)&&!ta(e)?t!=t&&e!=e:function(t,e,n,i,o,s){var a=Vs(t),l=Vs(e),c=a?m:ho(t),u=l?m:ho(e),h=(c=c==g?S:c)==S,f=(u=u==g?S:u)==S,d=c==u;if(d&&Ys(t)){if(!Ys(e))return!1;a=!0,h=!1}if(d&&!h)return s||(s=new Yn),a||la(t)?Gr(t,e,n,i,o,s):function(t,e,n,i,r,o,s){switch(n){case P:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case C:return!(t.byteLength!=e.byteLength||!o(new Wt(t),new Wt(e)));case v:case y:case k:return js(+t,+e);case _:return t.name==e.name&&t.message==e.message;case E:case T:return t==e+"";case w:var a=on;case R:var l=1&i;if(a||(a=ln),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;i|=2,s.set(t,e);var u=Gr(a(t),a(e),i,r,o,s);return s.delete(t),u;case A:if(zn)return zn.call(t)==zn.call(e)}return!1}(t,e,c,n,i,o,s);if(!(1&n)){var p=h&&It.call(t,"__wrapped__"),b=f&&It.call(e,"__wrapped__");if(p||b){var x=p?t.value():t,M=b?e.value():e;return s||(s=new Yn),o(x,M,n,i,s)}}return!!d&&(s||(s=new Yn),function(t,e,n,i,o,s){var a=1&n,l=to(t),c=l.length;if(c!=to(e).length&&!a)return!1;for(var u=c;u--;){var h=l[u];if(!(a?h in e:It.call(e,h)))return!1}var f=s.get(t),d=s.get(e);if(f&&d)return f==e&&d==t;var p=!0;s.set(t,e),s.set(e,t);for(var g=a;++u<c;){var m=t[h=l[u]],v=e[h];if(i)var y=a?i(v,m,h,e,t,s):i(m,v,h,t,e,s);if(!(y===r?m===v||o(m,v,n,i,s):y)){p=!1;break}g||(g="constructor"==h)}if(p&&!g){var _=t.constructor,b=e.constructor;_==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(p=!1)}return s.delete(t),s.delete(e),p}(t,e,n,i,o,s))}(t,e,n,i,Oi,o))}function Ci(t,e,n,i){var o=n.length,s=o,a=!i;if(null==t)return!s;for(t=St(t);o--;){var l=n[o];if(a&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++o<s;){var c=(l=n[o])[0],u=t[c],h=l[1];if(a&&l[2]){if(u===r&&!(c in t))return!1}else{var f=new Yn;if(i)var d=i(u,h,c,t,e,f);if(!(d===r?Oi(h,u,3,i,f):d))return!1}}return!0}function Pi(t){return!(!Js(t)||(e=t,Lt&&Lt in e))&&(Zs(t)?jt:gt).test(No(t));var e}function Ii(t){return"function"==typeof t?t:null==t?nl:"object"==typeof t?Vs(t)?Fi(t[0],t[1]):Ni(t):hl(t)}function Di(t){if(!xo(t))return gn(t);var e=[];for(var n in St(t))It.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Li(t,e){return t<e}function zi(t,e){var n=-1,r=Us(t)?i(t.length):[];return ui(t,function(t,i,o){r[++n]=e(t,i,o)}),r}function Ni(t){var e=ao(t);return 1==e.length&&e[0][2]?ko(e[0][0],e[0][1]):function(n){return n===t||Ci(n,t,e)}}function Fi(t,e){return yo(t)&&wo(e)?ko(zo(t),e):function(n){var i=Ma(n,t);return i===r&&i===e?Ea(n,t):Oi(e,i,3)}}function ji(t,e,n,i,o){t!==e&&mi(e,function(s,a){if(o||(o=new Yn),Js(s))!function(t,e,n,i,o,s,a){var l=Eo(t,n),c=Eo(e,n),u=a.get(c);if(u)Gn(t,n,u);else{var h=s?s(l,c,n+"",t,e,a):r,f=h===r;if(f){var d=Vs(c),p=!d&&Ys(c),g=!d&&!p&&la(c);h=c,d||p||g?Vs(l)?h=l:Qs(l)?h=Er(l):p?(f=!1,h=br(c,!0)):g?(f=!1,h=wr(c,!0)):h=[]:ia(c)||Ws(c)?(h=l,Ws(l)?h=ma(l):Js(l)&&!Zs(l)||(h=po(c))):f=!1}f&&(a.set(c,h),o(h,c,i,s,a),a.delete(c)),Gn(t,n,h)}}(t,e,a,n,ji,i,o);else{var l=i?i(Eo(t,a),s,a+"",t,e,o):r;l===r&&(l=s),Gn(t,a,l)}},Ca)}function Hi(t,e){var n=t.length;if(n)return mo(e+=e<0?n:0,n)?t[e]:r}function Bi(t,e,n){e=e.length?Ce(e,function(t){return Vs(t)?function(e){return xi(e,1===t.length?t[0]:t)}:t}):[nl];var i=-1;e=Ce(e,Xe(oo()));var r=zi(t,function(t,n,r){var o=Ce(e,function(e){return e(t)});return{criteria:o,index:++i,value:t}});return function(t){var e=t.length;for(t.sort(function(t,e){return function(t,e,n){for(var i=-1,r=t.criteria,o=e.criteria,s=r.length,a=n.length;++i<s;){var l=kr(r[i],o[i]);if(l)return i>=a?l:l*("desc"==n[i]?-1:1)}return t.index-e.index}(t,e,n)});e--;)t[e]=t[e].value;return t}(r)}function Wi(t,e,n){for(var i=-1,r=e.length,o={};++i<r;){var s=e[i],a=xi(t,s);n(a,s)&&Zi(o,mr(s,t),a)}return o}function Vi(t,e,n,i){var r=i?He:je,o=-1,s=e.length,a=t;for(t===e&&(e=Er(e)),n&&(a=Ce(t,Xe(n)));++o<s;)for(var l=0,c=e[o],u=n?n(c):c;(l=r(a,u,l,i))>-1;)a!==t&&Yt.call(a,l,1),Yt.call(t,l,1);return t}function $i(t,e){for(var n=t?e.length:0,i=n-1;n--;){var r=e[n];if(n==i||r!==o){var o=r;mo(r)?Yt.call(t,r,1):lr(t,r)}}return t}function Ui(t,e){return t+de(bn()*(e-t+1))}function Qi(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=de(e/2))&&(t+=t)}while(e);return n}function Yi(t,e){return Ao(So(t,e,nl),t+"")}function qi(t){return Xn(ja(t))}function Xi(t,e){var n=ja(t);return Po(n,oi(e,0,n.length))}function Zi(t,e,n,i){if(!Js(t))return t;for(var o=-1,s=(e=mr(e,t)).length,a=s-1,l=t;null!=l&&++o<s;){var c=zo(e[o]),u=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var h=l[c];(u=i?i(h,c,l):r)===r&&(u=Js(h)?h:mo(e[o+1])?[]:{})}Jn(l,c,u),l=l[c]}return t}var Ki=Tn?function(t,e){return Tn.set(t,e),t}:nl,Gi=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:Ja(e),writable:!0})}:nl;function Ji(t){return Po(ja(t))}function tr(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var s=i(o);++r<o;)s[r]=t[r+e];return s}function er(t,e){var n;return ui(t,function(t,i,r){return!(n=e(t,i,r))}),!!n}function nr(t,e,n){var i=0,r=null==t?i:t.length;if("number"==typeof e&&e==e&&r<=2147483647){for(;i<r;){var o=i+r>>>1,s=t[o];null!==s&&!aa(s)&&(n?s<=e:s<e)?i=o+1:r=o}return r}return ir(t,e,nl,n)}function ir(t,e,n,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(e=n(e))!=e,l=null===e,c=aa(e),u=e===r;o<s;){var h=de((o+s)/2),f=n(t[h]),d=f!==r,p=null===f,g=f==f,m=aa(f);if(a)var v=i||g;else v=u?g&&(i||d):l?g&&d&&(i||!p):c?g&&d&&!p&&(i||!m):!p&&!m&&(i?f<=e:f<e);v?o=h+1:s=h}return vn(s,4294967294)}function rr(t,e){for(var n=-1,i=t.length,r=0,o=[];++n<i;){var s=t[n],a=e?e(s):s;if(!n||!js(a,l)){var l=a;o[r++]=0===s?0:s}}return o}function or(t){return"number"==typeof t?t:aa(t)?f:+t}function sr(t){if("string"==typeof t)return t;if(Vs(t))return Ce(t,sr)+"";if(aa(t))return Nn?Nn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ar(t,e,n){var i=-1,r=Ae,o=t.length,s=!0,a=[],l=a;if(n)s=!1,r=Oe;else if(o>=200){var c=e?null:Qr(t);if(c)return ln(c);s=!1,r=Ke,l=new Qn}else l=e?[]:a;t:for(;++i<o;){var u=t[i],h=e?e(u):u;if(u=n||0!==u?u:0,s&&h==h){for(var f=l.length;f--;)if(l[f]===h)continue t;e&&l.push(h),a.push(u)}else r(l,h,n)||(l!==a&&l.push(h),a.push(u))}return a}function lr(t,e){var n=-1,i=(e=mr(e,t)).length;if(!i)return!0;for(var r=null==t||"object"!=typeof t&&"function"!=typeof t;++n<i;){var o=e[n];if("string"==typeof o){if("__proto__"===o&&!It.call(t,"__proto__"))return!1;if("constructor"===o&&n+1<i&&"string"==typeof e[n+1]&&"prototype"===e[n+1]){if(r&&0===n)continue;return!1}}}var s=Mo(t,e);return null==s||delete s[zo(Xo(e))]}function cr(t,e,n,i){return Zi(t,e,n(xi(t,e)),i)}function ur(t,e,n,i){for(var r=t.length,o=i?r:-1;(i?o--:++o<r)&&e(t[o],o,t););return n?tr(t,i?0:o,i?o+1:r):tr(t,i?o+1:0,i?r:o)}function hr(t,e){var n=t;return n instanceof Wn&&(n=n.value()),Ie(e,function(t,e){return e.func.apply(e.thisArg,Pe([t],e.args))},n)}function fr(t,e,n){var r=t.length;if(r<2)return r?ar(t[0]):[];for(var o=-1,s=i(r);++o<r;)for(var a=t[o],l=-1;++l<r;)l!=o&&(s[o]=ci(s[o]||a,t[l],e,n));return ar(gi(s,1),e,n)}function dr(t,e,n){for(var i=-1,o=t.length,s=e.length,a={};++i<o;){var l=i<s?e[i]:r;n(a,t[i],l)}return a}function pr(t){return Qs(t)?t:[]}function gr(t){return"function"==typeof t?t:nl}function mr(t,e){return Vs(t)?t:yo(t,e)?[t]:Lo(va(t))}var vr=Yi;function yr(t,e,n){var i=t.length;return n=n===r?i:n,!e&&n>=i?t:tr(t,e,n)}var _r=se||function(t){return he.clearTimeout(t)};function br(t,e){if(e)return t.slice();var n=t.length,i=Vt?Vt(n):new t.constructor(n);return t.copy(i),i}function xr(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function wr(t,e){var n=e?xr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function kr(t,e){if(t!==e){var n=t!==r,i=null===t,o=t==t,s=aa(t),a=e!==r,l=null===e,c=e==e,u=aa(e);if(!l&&!u&&!s&&t>e||s&&a&&c&&!l&&!u||i&&a&&c||!n&&c||!o)return 1;if(!i&&!s&&!u&&t<e||u&&n&&o&&!i&&!s||l&&n&&o||!a&&o||!c)return-1}return 0}function Sr(t,e,n,r){for(var o=-1,s=t.length,a=n.length,l=-1,c=e.length,u=mn(s-a,0),h=i(c+u),f=!r;++l<c;)h[l]=e[l];for(;++o<a;)(f||o<s)&&(h[n[o]]=t[o]);for(;u--;)h[l++]=t[o++];return h}function Mr(t,e,n,r){for(var o=-1,s=t.length,a=-1,l=n.length,c=-1,u=e.length,h=mn(s-l,0),f=i(h+u),d=!r;++o<h;)f[o]=t[o];for(var p=o;++c<u;)f[p+c]=e[c];for(;++a<l;)(d||o<s)&&(f[p+n[a]]=t[o++]);return f}function Er(t,e){var n=-1,r=t.length;for(e||(e=i(r));++n<r;)e[n]=t[n];return e}function Rr(t,e,n,i){var o=!n;n||(n={});for(var s=-1,a=e.length;++s<a;){var l=e[s],c=i?i(n[l],t[l],l,n,t):r;c===r&&(c=t[l]),o?ii(n,l,c):Jn(n,l,c)}return n}function Tr(t,e){return function(n,i){var r=Vs(n)?Se:ei,o=e?e():{};return r(n,t,oo(i,2),o)}}function Ar(t){return Yi(function(e,n){var i=-1,o=n.length,s=o>1?n[o-1]:r,a=o>2?n[2]:r;for(s=t.length>3&&"function"==typeof s?(o--,s):r,a&&vo(n[0],n[1],a)&&(s=o<3?r:s,o=1),e=St(e);++i<o;){var l=n[i];l&&t(e,l,i,s)}return e})}function Or(t,e){return function(n,i){if(null==n)return n;if(!Us(n))return t(n,i);for(var r=n.length,o=e?r:-1,s=St(n);(e?o--:++o<r)&&!1!==i(s[o],o,s););return n}}function Cr(t){return function(e,n,i){for(var r=-1,o=St(e),s=i(e),a=s.length;a--;){var l=s[t?a:++r];if(!1===n(o[l],l,o))break}return e}}function Pr(t){return function(e){var n=rn(e=va(e))?hn(e):r,i=n?n[0]:e.charAt(0),o=n?yr(n,1).join(""):e.slice(1);return i[t]()+o}}function Ir(t){return function(e){return Ie(Za(Wa(e).replace(Zt,"")),t,"")}}function Dr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=jn(t.prototype),i=t.apply(n,e);return Js(i)?i:n}}function Lr(t){return function(e,n,i){var o=St(e);if(!Us(e)){var s=oo(n,3);e=Oa(e),n=function(t){return s(o[t],t,o)}}var a=t(e,n,i);return a>-1?o[s?e[a]:a]:r}}function zr(t){return Jr(function(e){var n=e.length,i=n,s=Bn.prototype.thru;for(t&&e.reverse();i--;){var a=e[i];if("function"!=typeof a)throw new Rt(o);if(s&&!l&&"wrapper"==io(a))var l=new Bn([],!0)}for(i=l?i:n;++i<n;){var c=io(a=e[i]),u="wrapper"==c?no(a):r;l=u&&_o(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[io(u[0])].apply(l,u[3]):1==a.length&&_o(a)?l[c]():l.thru(a)}return function(){var t=arguments,i=t[0];if(l&&1==t.length&&Vs(i))return l.plant(i).value();for(var r=0,o=n?e[r].apply(this,t):i;++r<n;)o=e[r].call(this,o);return o}})}function Nr(t,e,n,o,s,a,l,u,h,f){var d=e&c,p=1&e,g=2&e,m=24&e,v=512&e,y=g?r:Dr(t);return function c(){for(var _=arguments.length,b=i(_),x=_;x--;)b[x]=arguments[x];if(m)var w=ro(c),k=function(t,e){for(var n=t.length,i=0;n--;)t[n]===e&&++i;return i}(b,w);if(o&&(b=Sr(b,o,s,m)),a&&(b=Mr(b,a,l,m)),_-=k,m&&_<f){var S=an(b,w);return $r(t,e,Nr,c.placeholder,n,b,S,u,h,f-_)}var M=p?n:this,E=g?M[t]:t;return _=b.length,u?b=function(t,e){for(var n=t.length,i=vn(e.length,n),o=Er(t);i--;){var s=e[i];t[i]=mo(s,n)?o[s]:r}return t}(b,u):v&&_>1&&b.reverse(),d&&h<_&&(b.length=h),this&&this!==he&&this instanceof c&&(E=y||Dr(E)),E.apply(M,b)}}function Fr(t,e){return function(n,i){return function(t,e,n,i){return yi(t,function(t,r,o){e(i,n(t),r,o)}),i}(n,t,e(i),{})}}function jr(t,e){return function(n,i){var o;if(n===r&&i===r)return e;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=sr(n),i=sr(i)):(n=or(n),i=or(i)),o=t(n,i)}return o}}function Hr(t){return Jr(function(e){return e=Ce(e,Xe(oo())),Yi(function(n){var i=this;return t(e,function(t){return ke(t,i,n)})})})}function Br(t,e){var n=(e=e===r?" ":sr(e)).length;if(n<2)return n?Qi(e,t):e;var i=Qi(e,fe(t/un(e)));return rn(e)?yr(hn(i),0,t).join(""):i.slice(0,t)}function Wr(t){return function(e,n,o){return o&&"number"!=typeof o&&vo(e,n,o)&&(n=o=r),e=fa(e),n===r?(n=e,e=0):n=fa(n),function(t,e,n,r){for(var o=-1,s=mn(fe((e-t)/(n||1)),0),a=i(s);s--;)a[r?s:++o]=t,t+=n;return a}(e,n,o=o===r?e<n?1:-1:fa(o),t)}}function Vr(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ga(e),n=ga(n)),t(e,n)}}function $r(t,e,n,i,o,s,a,c,u,h){var f=8&e;e|=f?l:64,4&(e&=~(f?64:l))||(e&=-4);var d=[t,e,o,f?s:r,f?a:r,f?r:s,f?r:a,c,u,h],p=n.apply(r,d);return _o(t)&&Ro(p,d),p.placeholder=i,Oo(p,t,e)}function Ur(t){var e=kt[t];return function(t,n){if(t=ga(t),(n=null==n?0:vn(da(n),292))&&ze(t)){var i=(va(t)+"e").split("e");return+((i=(va(e(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return e(t)}}var Qr=Mn&&1/ln(new Mn([,-0]))[1]==u?function(t){return new Mn(t)}:al;function Yr(t){return function(e){var n=ho(e);return n==w?on(e):n==R?cn(e):function(t,e){return Ce(e,function(e){return[e,t[e]]})}(e,t(e))}}function qr(t,e,n,s,u,h,f,d){var p=2&e;if(!p&&"function"!=typeof t)throw new Rt(o);var g=s?s.length:0;if(g||(e&=-97,s=u=r),f=f===r?f:mn(da(f),0),d=d===r?d:da(d),g-=u?u.length:0,64&e){var m=s,v=u;s=u=r}var y=p?r:no(t),_=[t,e,n,s,u,m,v,h,f,d];if(y&&function(t,e){var n=t[1],i=e[1],r=n|i,o=r<131,s=i==c&&8==n||i==c&&256==n&&t[7].length<=e[8]||384==i&&e[7].length<=e[8]&&8==n;if(!o&&!s)return t;1&i&&(t[2]=e[2],r|=1&n?0:4);var l=e[3];if(l){var u=t[3];t[3]=u?Sr(u,l,e[4]):l,t[4]=u?an(t[3],a):e[4]}(l=e[5])&&(u=t[5],t[5]=u?Mr(u,l,e[6]):l,t[6]=u?an(t[5],a):e[6]),(l=e[7])&&(t[7]=l),i&c&&(t[8]=null==t[8]?e[8]:vn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=r}(_,y),t=_[0],e=_[1],n=_[2],s=_[3],u=_[4],!(d=_[9]=_[9]===r?p?0:t.length:mn(_[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)b=8==e||16==e?function(t,e,n){var o=Dr(t);return function s(){for(var a=arguments.length,l=i(a),c=a,u=ro(s);c--;)l[c]=arguments[c];var h=a<3&&l[0]!==u&&l[a-1]!==u?[]:an(l,u);return(a-=h.length)<n?$r(t,e,Nr,s.placeholder,r,l,h,r,r,n-a):ke(this&&this!==he&&this instanceof s?o:t,this,l)}}(t,e,d):e!=l&&33!=e||u.length?Nr.apply(r,_):function(t,e,n,r){var o=1&e,s=Dr(t);return function e(){for(var a=-1,l=arguments.length,c=-1,u=r.length,h=i(u+l),f=this&&this!==he&&this instanceof e?s:t;++c<u;)h[c]=r[c];for(;l--;)h[c++]=arguments[++a];return ke(f,o?n:this,h)}}(t,e,n,s);else var b=function(t,e,n){var i=1&e,r=Dr(t);return function e(){return(this&&this!==he&&this instanceof e?r:t).apply(i?n:this,arguments)}}(t,e,n);return Oo((y?Ki:Ro)(b,_),t,e)}function Xr(t,e,n,i){return t===r||js(t,Ot[n])&&!It.call(i,n)?e:t}function Zr(t,e,n,i,o,s){return Js(t)&&Js(e)&&(s.set(e,t),ji(t,e,r,Zr,s),s.delete(e)),t}function Kr(t){return ia(t)?r:t}function Gr(t,e,n,i,o,s){var a=1&n,l=t.length,c=e.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(t),h=s.get(e);if(u&&h)return u==e&&h==t;var f=-1,d=!0,p=2&n?new Qn:r;for(s.set(t,e),s.set(e,t);++f<l;){var g=t[f],m=e[f];if(i)var v=a?i(m,g,f,e,t,s):i(g,m,f,t,e,s);if(v!==r){if(v)continue;d=!1;break}if(p){if(!Le(e,function(t,e){if(!Ke(p,e)&&(g===t||o(g,t,n,i,s)))return p.push(e)})){d=!1;break}}else if(g!==m&&!o(g,m,n,i,s)){d=!1;break}}return s.delete(t),s.delete(e),d}function Jr(t){return Ao(So(t,r,$o),t+"")}function to(t){return wi(t,Oa,co)}function eo(t){return wi(t,Ca,uo)}var no=Tn?function(t){return Tn.get(t)}:al;function io(t){for(var e=t.name+"",n=An[e],i=It.call(An,e)?n.length:0;i--;){var r=n[i],o=r.func;if(null==o||o==t)return r.name}return e}function ro(t){return(It.call(Fn,"placeholder")?Fn:t).placeholder}function oo(){var t=Fn.iteratee||il;return t=t===il?Ii:t,arguments.length?t(arguments[0],arguments[1]):t}function so(t,e){var n,i,r=t.__data__;return("string"==(i=typeof(n=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof e?"string":"hash"]:r.map}function ao(t){for(var e=Oa(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,wo(r)]}return e}function lo(t,e){var n=function(t,e){return null==t?r:t[e]}(t,e);return Pi(n)?n:r}var co=ge?function(t){return null==t?[]:(t=St(t),Te(ge(t),function(e){return Qt.call(t,e)}))}:pl,uo=ge?function(t){for(var e=[];t;)Pe(e,co(t)),t=$t(t);return e}:pl,ho=ki;function fo(t,e,n){for(var i=-1,r=(e=mr(e,t)).length,o=!1;++i<r;){var s=zo(e[i]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++i!=r?o:!!(r=null==t?0:t.length)&&Gs(r)&&mo(s,r)&&(Vs(t)||Ws(t))}function po(t){return"function"!=typeof t.constructor||xo(t)?{}:jn($t(t))}function go(t){return Vs(t)||Ws(t)||!!(qt&&t&&t[qt])}function mo(t,e){var n=typeof t;return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function vo(t,e,n){if(!Js(n))return!1;var i=typeof e;return!!("number"==i?Us(n)&&mo(e,n.length):"string"==i&&e in n)&&js(n[e],t)}function yo(t,e){if(Vs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!aa(t))||J.test(t)||!G.test(t)||null!=e&&t in St(e)}function _o(t){var e=io(t),n=Fn[e];if("function"!=typeof n||!(e in Wn.prototype))return!1;if(t===n)return!0;var i=no(n);return!!i&&t===i[0]}(wn&&ho(new wn(new ArrayBuffer(1)))!=P||kn&&ho(new kn)!=w||Sn&&ho(Sn.resolve())!=M||Mn&&ho(new Mn)!=R||En&&ho(new En)!=O)&&(ho=function(t){var e=ki(t),n=e==S?t.constructor:r,i=n?No(n):"";if(i)switch(i){case On:return P;case Cn:return w;case Pn:return M;case In:return R;case Dn:return O}return e});var bo=Ct?Zs:gl;function xo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ot)}function wo(t){return t==t&&!Js(t)}function ko(t,e){return function(n){return null!=n&&n[t]===e&&(e!==r||t in St(n))}}function So(t,e,n){return e=mn(e===r?t.length-1:e,0),function(){for(var r=arguments,o=-1,s=mn(r.length-e,0),a=i(s);++o<s;)a[o]=r[e+o];o=-1;for(var l=i(e+1);++o<e;)l[o]=r[o];return l[e]=n(a),ke(t,this,l)}}function Mo(t,e){return e.length<2?t:xi(t,tr(e,0,-1))}function Eo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ro=Co(Ki),To=ue||function(t,e){return he.setTimeout(t,e)},Ao=Co(Gi);function Oo(t,e,n){var i=e+"";return Ao(t,function(t,e){var n=e.length;if(!n)return t;var i=n-1;return e[i]=(n>1?"& ":"")+e[i],e=e.join(n>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(i,function(t,e){return Me(p,function(n){var i="_."+n[0];e&n[1]&&!Ae(t,i)&&t.push(i)}),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(i),n)))}function Co(t){var e=0,n=0;return function(){var i=yn(),o=16-(i-n);if(n=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(r,arguments)}}function Po(t,e){var n=-1,i=t.length,o=i-1;for(e=e===r?i:e;++n<e;){var s=Ui(n,o),a=t[s];t[s]=t[n],t[n]=a}return t.length=e,t}var Io,Do,Lo=(Io=Is(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,function(t,n,i,r){e.push(i?r.replace(ut,"$1"):n||t)}),e},function(t){return 500===Do.size&&Do.clear(),t}),Do=Io.cache,Io);function zo(t){if("string"==typeof t||aa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function No(t){if(null!=t){try{return Pt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Fo(t){if(t instanceof Wn)return t.clone();var e=new Bn(t.__wrapped__,t.__chain__);return e.__actions__=Er(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var jo=Yi(function(t,e){return Qs(t)?ci(t,gi(e,1,Qs,!0)):[]}),Ho=Yi(function(t,e){var n=Xo(e);return Qs(n)&&(n=r),Qs(t)?ci(t,gi(e,1,Qs,!0),oo(n,2)):[]}),Bo=Yi(function(t,e){var n=Xo(e);return Qs(n)&&(n=r),Qs(t)?ci(t,gi(e,1,Qs,!0),r,n):[]});function Wo(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:da(n);return r<0&&(r=mn(i+r,0)),Fe(t,oo(e,3),r)}function Vo(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return n!==r&&(o=da(n),o=n<0?mn(i+o,0):vn(o,i-1)),Fe(t,oo(e,3),o,!0)}function $o(t){return null!=t&&t.length?gi(t,1):[]}function Uo(t){return t&&t.length?t[0]:r}var Qo=Yi(function(t){var e=Ce(t,pr);return e.length&&e[0]===t[0]?Ri(e):[]}),Yo=Yi(function(t){var e=Xo(t),n=Ce(t,pr);return e===Xo(n)?e=r:n.pop(),n.length&&n[0]===t[0]?Ri(n,oo(e,2)):[]}),qo=Yi(function(t){var e=Xo(t),n=Ce(t,pr);return(e="function"==typeof e?e:r)&&n.pop(),n.length&&n[0]===t[0]?Ri(n,r,e):[]});function Xo(t){var e=null==t?0:t.length;return e?t[e-1]:r}var Zo=Yi(Ko);function Ko(t,e){return t&&t.length&&e&&e.length?Vi(t,e):t}var Go=Jr(function(t,e){var n=null==t?0:t.length,i=ri(t,e);return $i(t,Ce(e,function(t){return mo(t,n)?+t:t}).sort(kr)),i});function Jo(t){return null==t?t:xn.call(t)}var ts=Yi(function(t){return ar(gi(t,1,Qs,!0))}),es=Yi(function(t){var e=Xo(t);return Qs(e)&&(e=r),ar(gi(t,1,Qs,!0),oo(e,2))}),ns=Yi(function(t){var e=Xo(t);return e="function"==typeof e?e:r,ar(gi(t,1,Qs,!0),r,e)});function is(t){if(!t||!t.length)return[];var e=0;return t=Te(t,function(t){if(Qs(t))return e=mn(t.length,e),!0}),Ye(e,function(e){return Ce(t,Ve(e))})}function rs(t,e){if(!t||!t.length)return[];var n=is(t);return null==e?n:Ce(n,function(t){return ke(e,r,t)})}var os=Yi(function(t,e){return Qs(t)?ci(t,e):[]}),ss=Yi(function(t){return fr(Te(t,Qs))}),as=Yi(function(t){var e=Xo(t);return Qs(e)&&(e=r),fr(Te(t,Qs),oo(e,2))}),ls=Yi(function(t){var e=Xo(t);return e="function"==typeof e?e:r,fr(Te(t,Qs),r,e)}),cs=Yi(is),us=Yi(function(t){var e=t.length,n=e>1?t[e-1]:r;return n="function"==typeof n?(t.pop(),n):r,rs(t,n)});function hs(t){var e=Fn(t);return e.__chain__=!0,e}function fs(t,e){return e(t)}var ds=Jr(function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,o=function(e){return ri(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Wn&&mo(n)?((i=i.slice(n,+n+(e?1:0))).__actions__.push({func:fs,args:[o],thisArg:r}),new Bn(i,this.__chain__).thru(function(t){return e&&!t.length&&t.push(r),t})):this.thru(o)}),ps=Tr(function(t,e,n){It.call(t,n)?++t[n]:ii(t,n,1)}),gs=Lr(Wo),ms=Lr(Vo);function vs(t,e){return(Vs(t)?Me:ui)(t,oo(e,3))}function ys(t,e){return(Vs(t)?Ee:hi)(t,oo(e,3))}var _s=Tr(function(t,e,n){It.call(t,n)?t[n].push(e):ii(t,n,[e])}),bs=Yi(function(t,e,n){var r=-1,o="function"==typeof e,s=Us(t)?i(t.length):[];return ui(t,function(t){s[++r]=o?ke(e,t,n):Ti(t,e,n)}),s}),xs=Tr(function(t,e,n){ii(t,n,e)});function ws(t,e){return(Vs(t)?Ce:zi)(t,oo(e,3))}var ks=Tr(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),Ss=Yi(function(t,e){if(null==t)return[];var n=e.length;return n>1&&vo(t,e[0],e[1])?e=[]:n>2&&vo(e[0],e[1],e[2])&&(e=[e[0]]),Bi(t,gi(e,1),[])}),Ms=ce||function(){return he.Date.now()};function Es(t,e,n){return e=n?r:e,e=t&&null==e?t.length:e,qr(t,c,r,r,r,r,e)}function Rs(t,e){var n;if("function"!=typeof e)throw new Rt(o);return t=da(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=r),n}}var Ts=Yi(function(t,e,n){var i=1;if(n.length){var r=an(n,ro(Ts));i|=l}return qr(t,i,e,n,r)}),As=Yi(function(t,e,n){var i=3;if(n.length){var r=an(n,ro(As));i|=l}return qr(e,i,t,n,r)});function Os(t,e,n){var i,s,a,l,c,u,h=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new Rt(o);function g(e){var n=i,o=s;return i=s=r,h=e,l=t.apply(o,n)}function m(t){var n=t-u;return u===r||n>=e||n<0||d&&t-h>=a}function v(){var t=Ms();if(m(t))return y(t);c=To(v,function(t){var n=e-(t-u);return d?vn(n,a-(t-h)):n}(t))}function y(t){return c=r,p&&i?g(t):(i=s=r,l)}function _(){var t=Ms(),n=m(t);if(i=arguments,s=this,u=t,n){if(c===r)return function(t){return h=t,c=To(v,e),f?g(t):l}(u);if(d)return _r(c),c=To(v,e),g(u)}return c===r&&(c=To(v,e)),l}return e=ga(e)||0,Js(n)&&(f=!!n.leading,a=(d="maxWait"in n)?mn(ga(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),_.cancel=function(){c!==r&&_r(c),h=0,i=u=s=c=r},_.flush=function(){return c===r?l:y(Ms())},_}var Cs=Yi(function(t,e){return li(t,1,e)}),Ps=Yi(function(t,e,n){return li(t,ga(e)||0,n)});function Is(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Rt(o);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=t.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(Is.Cache||Un),n}function Ds(t){if("function"!=typeof t)throw new Rt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Is.Cache=Un;var Ls=vr(function(t,e){var n=(e=1==e.length&&Vs(e[0])?Ce(e[0],Xe(oo())):Ce(gi(e,1),Xe(oo()))).length;return Yi(function(i){for(var r=-1,o=vn(i.length,n);++r<o;)i[r]=e[r].call(this,i[r]);return ke(t,this,i)})}),zs=Yi(function(t,e){var n=an(e,ro(zs));return qr(t,l,r,e,n)}),Ns=Yi(function(t,e){var n=an(e,ro(Ns));return qr(t,64,r,e,n)}),Fs=Jr(function(t,e){return qr(t,256,r,r,r,e)});function js(t,e){return t===e||t!=t&&e!=e}var Hs=Vr(Si),Bs=Vr(function(t,e){return t>=e}),Ws=Ai(function(){return arguments}())?Ai:function(t){return ta(t)&&It.call(t,"callee")&&!Qt.call(t,"callee")},Vs=i.isArray,$s=ve?Xe(ve):function(t){return ta(t)&&ki(t)==C};function Us(t){return null!=t&&Gs(t.length)&&!Zs(t)}function Qs(t){return ta(t)&&Us(t)}var Ys=me||gl,qs=ye?Xe(ye):function(t){return ta(t)&&ki(t)==y};function Xs(t){if(!ta(t))return!1;var e=ki(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ia(t)}function Zs(t){if(!Js(t))return!1;var e=ki(t);return e==b||e==x||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ks(t){return"number"==typeof t&&t==da(t)}function Gs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function Js(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=_e?Xe(_e):function(t){return ta(t)&&ho(t)==w};function na(t){return"number"==typeof t||ta(t)&&ki(t)==k}function ia(t){if(!ta(t)||ki(t)!=S)return!1;var e=$t(t);if(null===e)return!0;var n=It.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Pt.call(n)==Nt}var ra=be?Xe(be):function(t){return ta(t)&&ki(t)==E},oa=xe?Xe(xe):function(t){return ta(t)&&ho(t)==R};function sa(t){return"string"==typeof t||!Vs(t)&&ta(t)&&ki(t)==T}function aa(t){return"symbol"==typeof t||ta(t)&&ki(t)==A}var la=we?Xe(we):function(t){return ta(t)&&Gs(t.length)&&!!re[ki(t)]},ca=Vr(Li),ua=Vr(function(t,e){return t<=e});function ha(t){if(!t)return[];if(Us(t))return sa(t)?hn(t):Er(t);if(Xt&&t[Xt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Xt]());var e=ho(t);return(e==w?on:e==R?ln:ja)(t)}function fa(t){return t?(t=ga(t))===u||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function da(t){var e=fa(t),n=e%1;return e==e?n?e-n:e:0}function pa(t){return t?oi(da(t),0,d):0}function ga(t){if("number"==typeof t)return t;if(aa(t))return f;if(Js(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Js(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=qe(t);var n=pt.test(t);return n||mt.test(t)?le(t.slice(2),n?2:8):dt.test(t)?f:+t}function ma(t){return Rr(t,Ca(t))}function va(t){return null==t?"":sr(t)}var ya=Ar(function(t,e){if(xo(e)||Us(e))Rr(e,Oa(e),t);else for(var n in e)It.call(e,n)&&Jn(t,n,e[n])}),_a=Ar(function(t,e){Rr(e,Ca(e),t)}),ba=Ar(function(t,e,n,i){Rr(e,Ca(e),t,i)}),xa=Ar(function(t,e,n,i){Rr(e,Oa(e),t,i)}),wa=Jr(ri),ka=Yi(function(t,e){t=St(t);var n=-1,i=e.length,o=i>2?e[2]:r;for(o&&vo(e[0],e[1],o)&&(i=1);++n<i;)for(var s=e[n],a=Ca(s),l=-1,c=a.length;++l<c;){var u=a[l],h=t[u];(h===r||js(h,Ot[u])&&!It.call(t,u))&&(t[u]=s[u])}return t}),Sa=Yi(function(t){return t.push(r,Zr),ke(Ia,r,t)});function Ma(t,e,n){var i=null==t?r:xi(t,e);return i===r?n:i}function Ea(t,e){return null!=t&&fo(t,e,Ei)}var Ra=Fr(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=zt.call(e)),t[e]=n},Ja(nl)),Ta=Fr(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=zt.call(e)),It.call(t,e)?t[e].push(n):t[e]=[n]},oo),Aa=Yi(Ti);function Oa(t){return Us(t)?qn(t):Di(t)}function Ca(t){return Us(t)?qn(t,!0):function(t){if(!Js(t))return function(t){var e=[];if(null!=t)for(var n in St(t))e.push(n);return e}(t);var e=xo(t),n=[];for(var i in t)("constructor"!=i||!e&&It.call(t,i))&&n.push(i);return n}(t)}var Pa=Ar(function(t,e,n){ji(t,e,n)}),Ia=Ar(function(t,e,n,i){ji(t,e,n,i)}),Da=Jr(function(t,e){var n={};if(null==t)return n;var i=!1;e=Ce(e,function(e){return e=mr(e,t),i||(i=e.length>1),e}),Rr(t,eo(t),n),i&&(n=si(n,7,Kr));for(var r=e.length;r--;)lr(n,e[r]);return n}),La=Jr(function(t,e){return null==t?{}:function(t,e){return Wi(t,e,function(e,n){return Ea(t,n)})}(t,e)});function za(t,e){if(null==t)return{};var n=Ce(eo(t),function(t){return[t]});return e=oo(e),Wi(t,n,function(t,n){return e(t,n[0])})}var Na=Yr(Oa),Fa=Yr(Ca);function ja(t){return null==t?[]:Ze(t,Oa(t))}var Ha=Ir(function(t,e,n){return e=e.toLowerCase(),t+(n?Ba(e):e)});function Ba(t){return Xa(va(t).toLowerCase())}function Wa(t){return(t=va(t))&&t.replace(yt,tn).replace(Kt,"")}var Va=Ir(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),$a=Ir(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Ua=Pr("toLowerCase"),Qa=Ir(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Ya=Ir(function(t,e,n){return t+(n?" ":"")+Xa(e)}),qa=Ir(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Xa=Pr("toUpperCase");function Za(t,e,n){return t=va(t),(e=n?r:e)===r?function(t){return ee.test(t)}(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.match(lt)||[]}(t):t.match(e)||[]}var Ka=Yi(function(t,e){try{return ke(t,r,e)}catch(t){return Xs(t)?t:new xt(t)}}),Ga=Jr(function(t,e){return Me(e,function(e){e=zo(e),ii(t,e,Ts(t[e],t))}),t});function Ja(t){return function(){return t}}var tl=zr(),el=zr(!0);function nl(t){return t}function il(t){return Ii("function"==typeof t?t:si(t,1))}var rl=Yi(function(t,e){return function(n){return Ti(n,t,e)}}),ol=Yi(function(t,e){return function(n){return Ti(t,n,e)}});function sl(t,e,n){var i=Oa(e),r=bi(e,i);null!=n||Js(e)&&(r.length||!i.length)||(n=e,e=t,t=this,r=bi(e,Oa(e)));var o=!(Js(n)&&"chain"in n&&!n.chain),s=Zs(t);return Me(r,function(n){var i=e[n];t[n]=i,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Er(this.__actions__)).push({func:i,args:arguments,thisArg:t}),n.__chain__=e,n}return i.apply(t,Pe([this.value()],arguments))})}),t}function al(){}var ll=Hr(Ce),cl=Hr(Re),ul=Hr(Le);function hl(t){return yo(t)?Ve(zo(t)):function(t){return function(e){return xi(e,t)}}(t)}var fl=Wr(),dl=Wr(!0);function pl(){return[]}function gl(){return!1}var ml,vl=jr(function(t,e){return t+e},0),yl=Ur("ceil"),_l=jr(function(t,e){return t/e},1),bl=Ur("floor"),xl=jr(function(t,e){return t*e},1),wl=Ur("round"),kl=jr(function(t,e){return t-e},0);return Fn.after=function(t,e){if("function"!=typeof e)throw new Rt(o);return t=da(t),function(){if(--t<1)return e.apply(this,arguments)}},Fn.ary=Es,Fn.assign=ya,Fn.assignIn=_a,Fn.assignInWith=ba,Fn.assignWith=xa,Fn.at=wa,Fn.before=Rs,Fn.bind=Ts,Fn.bindAll=Ga,Fn.bindKey=As,Fn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Vs(t)?t:[t]},Fn.chain=hs,Fn.chunk=function(t,e,n){e=(n?vo(t,e,n):e===r)?1:mn(da(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var s=0,a=0,l=i(fe(o/e));s<o;)l[a++]=tr(t,s,s+=e);return l},Fn.compact=function(t){for(var e=-1,n=null==t?0:t.length,i=0,r=[];++e<n;){var o=t[e];o&&(r[i++]=o)}return r},Fn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=i(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Pe(Vs(n)?Er(n):[n],gi(e,1))},Fn.cond=function(t){var e=null==t?0:t.length,n=oo();return t=e?Ce(t,function(t){if("function"!=typeof t[1])throw new Rt(o);return[n(t[0]),t[1]]}):[],Yi(function(n){for(var i=-1;++i<e;){var r=t[i];if(ke(r[0],this,n))return ke(r[1],this,n)}})},Fn.conforms=function(t){return function(t){var e=Oa(t);return function(n){return ai(n,t,e)}}(si(t,1))},Fn.constant=Ja,Fn.countBy=ps,Fn.create=function(t,e){var n=jn(t);return null==e?n:ni(n,e)},Fn.curry=function t(e,n,i){var o=qr(e,8,r,r,r,r,r,n=i?r:n);return o.placeholder=t.placeholder,o},Fn.curryRight=function t(e,n,i){var o=qr(e,16,r,r,r,r,r,n=i?r:n);return o.placeholder=t.placeholder,o},Fn.debounce=Os,Fn.defaults=ka,Fn.defaultsDeep=Sa,Fn.defer=Cs,Fn.delay=Ps,Fn.difference=jo,Fn.differenceBy=Ho,Fn.differenceWith=Bo,Fn.drop=function(t,e,n){var i=null==t?0:t.length;return i?tr(t,(e=n||e===r?1:da(e))<0?0:e,i):[]},Fn.dropRight=function(t,e,n){var i=null==t?0:t.length;return i?tr(t,0,(e=i-(e=n||e===r?1:da(e)))<0?0:e):[]},Fn.dropRightWhile=function(t,e){return t&&t.length?ur(t,oo(e,3),!0,!0):[]},Fn.dropWhile=function(t,e){return t&&t.length?ur(t,oo(e,3),!0):[]},Fn.fill=function(t,e,n,i){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&vo(t,e,n)&&(n=0,i=o),function(t,e,n,i){var o=t.length;for((n=da(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:da(i))<0&&(i+=o),i=n>i?0:pa(i);n<i;)t[n++]=e;return t}(t,e,n,i)):[]},Fn.filter=function(t,e){return(Vs(t)?Te:pi)(t,oo(e,3))},Fn.flatMap=function(t,e){return gi(ws(t,e),1)},Fn.flatMapDeep=function(t,e){return gi(ws(t,e),u)},Fn.flatMapDepth=function(t,e,n){return n=n===r?1:da(n),gi(ws(t,e),n)},Fn.flatten=$o,Fn.flattenDeep=function(t){return null!=t&&t.length?gi(t,u):[]},Fn.flattenDepth=function(t,e){return null!=t&&t.length?gi(t,e=e===r?1:da(e)):[]},Fn.flip=function(t){return qr(t,512)},Fn.flow=tl,Fn.flowRight=el,Fn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,i={};++e<n;){var r=t[e];i[r[0]]=r[1]}return i},Fn.functions=function(t){return null==t?[]:bi(t,Oa(t))},Fn.functionsIn=function(t){return null==t?[]:bi(t,Ca(t))},Fn.groupBy=_s,Fn.initial=function(t){return null!=t&&t.length?tr(t,0,-1):[]},Fn.intersection=Qo,Fn.intersectionBy=Yo,Fn.intersectionWith=qo,Fn.invert=Ra,Fn.invertBy=Ta,Fn.invokeMap=bs,Fn.iteratee=il,Fn.keyBy=xs,Fn.keys=Oa,Fn.keysIn=Ca,Fn.map=ws,Fn.mapKeys=function(t,e){var n={};return e=oo(e,3),yi(t,function(t,i,r){ii(n,e(t,i,r),t)}),n},Fn.mapValues=function(t,e){var n={};return e=oo(e,3),yi(t,function(t,i,r){ii(n,i,e(t,i,r))}),n},Fn.matches=function(t){return Ni(si(t,1))},Fn.matchesProperty=function(t,e){return Fi(t,si(e,1))},Fn.memoize=Is,Fn.merge=Pa,Fn.mergeWith=Ia,Fn.method=rl,Fn.methodOf=ol,Fn.mixin=sl,Fn.negate=Ds,Fn.nthArg=function(t){return t=da(t),Yi(function(e){return Hi(e,t)})},Fn.omit=Da,Fn.omitBy=function(t,e){return za(t,Ds(oo(e)))},Fn.once=function(t){return Rs(2,t)},Fn.orderBy=function(t,e,n,i){return null==t?[]:(Vs(e)||(e=null==e?[]:[e]),Vs(n=i?r:n)||(n=null==n?[]:[n]),Bi(t,e,n))},Fn.over=ll,Fn.overArgs=Ls,Fn.overEvery=cl,Fn.overSome=ul,Fn.partial=zs,Fn.partialRight=Ns,Fn.partition=ks,Fn.pick=La,Fn.pickBy=za,Fn.property=hl,Fn.propertyOf=function(t){return function(e){return null==t?r:xi(t,e)}},Fn.pull=Zo,Fn.pullAll=Ko,Fn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Vi(t,e,oo(n,2)):t},Fn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Vi(t,e,r,n):t},Fn.pullAt=Go,Fn.range=fl,Fn.rangeRight=dl,Fn.rearg=Fs,Fn.reject=function(t,e){return(Vs(t)?Te:pi)(t,Ds(oo(e,3)))},Fn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var i=-1,r=[],o=t.length;for(e=oo(e,3);++i<o;){var s=t[i];e(s,i,t)&&(n.push(s),r.push(i))}return $i(t,r),n},Fn.rest=function(t,e){if("function"!=typeof t)throw new Rt(o);return Yi(t,e=e===r?e:da(e))},Fn.reverse=Jo,Fn.sampleSize=function(t,e,n){return e=(n?vo(t,e,n):e===r)?1:da(e),(Vs(t)?Zn:Xi)(t,e)},Fn.set=function(t,e,n){return null==t?t:Zi(t,e,n)},Fn.setWith=function(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:Zi(t,e,n,i)},Fn.shuffle=function(t){return(Vs(t)?Kn:Ji)(t)},Fn.slice=function(t,e,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&vo(t,e,n)?(e=0,n=i):(e=null==e?0:da(e),n=n===r?i:da(n)),tr(t,e,n)):[]},Fn.sortBy=Ss,Fn.sortedUniq=function(t){return t&&t.length?rr(t):[]},Fn.sortedUniqBy=function(t,e){return t&&t.length?rr(t,oo(e,2)):[]},Fn.split=function(t,e,n){return n&&"number"!=typeof n&&vo(t,e,n)&&(e=n=r),(n=n===r?d:n>>>0)?(t=va(t))&&("string"==typeof e||null!=e&&!ra(e))&&!(e=sr(e))&&rn(t)?yr(hn(t),0,n):t.split(e,n):[]},Fn.spread=function(t,e){if("function"!=typeof t)throw new Rt(o);return e=null==e?0:mn(da(e),0),Yi(function(n){var i=n[e],r=yr(n,0,e);return i&&Pe(r,i),ke(t,this,r)})},Fn.tail=function(t){var e=null==t?0:t.length;return e?tr(t,1,e):[]},Fn.take=function(t,e,n){return t&&t.length?tr(t,0,(e=n||e===r?1:da(e))<0?0:e):[]},Fn.takeRight=function(t,e,n){var i=null==t?0:t.length;return i?tr(t,(e=i-(e=n||e===r?1:da(e)))<0?0:e,i):[]},Fn.takeRightWhile=function(t,e){return t&&t.length?ur(t,oo(e,3),!1,!0):[]},Fn.takeWhile=function(t,e){return t&&t.length?ur(t,oo(e,3)):[]},Fn.tap=function(t,e){return e(t),t},Fn.throttle=function(t,e,n){var i=!0,r=!0;if("function"!=typeof t)throw new Rt(o);return Js(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Os(t,e,{leading:i,maxWait:e,trailing:r})},Fn.thru=fs,Fn.toArray=ha,Fn.toPairs=Na,Fn.toPairsIn=Fa,Fn.toPath=function(t){return Vs(t)?Ce(t,zo):aa(t)?[t]:Er(Lo(va(t)))},Fn.toPlainObject=ma,Fn.transform=function(t,e,n){var i=Vs(t),r=i||Ys(t)||la(t);if(e=oo(e,4),null==n){var o=t&&t.constructor;n=r?i?new o:[]:Js(t)&&Zs(o)?jn($t(t)):{}}return(r?Me:yi)(t,function(t,i,r){return e(n,t,i,r)}),n},Fn.unary=function(t){return Es(t,1)},Fn.union=ts,Fn.unionBy=es,Fn.unionWith=ns,Fn.uniq=function(t){return t&&t.length?ar(t):[]},Fn.uniqBy=function(t,e){return t&&t.length?ar(t,oo(e,2)):[]},Fn.uniqWith=function(t,e){return e="function"==typeof e?e:r,t&&t.length?ar(t,r,e):[]},Fn.unset=function(t,e){return null==t||lr(t,e)},Fn.unzip=is,Fn.unzipWith=rs,Fn.update=function(t,e,n){return null==t?t:cr(t,e,gr(n))},Fn.updateWith=function(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:cr(t,e,gr(n),i)},Fn.values=ja,Fn.valuesIn=function(t){return null==t?[]:Ze(t,Ca(t))},Fn.without=os,Fn.words=Za,Fn.wrap=function(t,e){return zs(gr(e),t)},Fn.xor=ss,Fn.xorBy=as,Fn.xorWith=ls,Fn.zip=cs,Fn.zipObject=function(t,e){return dr(t||[],e||[],Jn)},Fn.zipObjectDeep=function(t,e){return dr(t||[],e||[],Zi)},Fn.zipWith=us,Fn.entries=Na,Fn.entriesIn=Fa,Fn.extend=_a,Fn.extendWith=ba,sl(Fn,Fn),Fn.add=vl,Fn.attempt=Ka,Fn.camelCase=Ha,Fn.capitalize=Ba,Fn.ceil=yl,Fn.clamp=function(t,e,n){return n===r&&(n=e,e=r),n!==r&&(n=(n=ga(n))==n?n:0),e!==r&&(e=(e=ga(e))==e?e:0),oi(ga(t),e,n)},Fn.clone=function(t){return si(t,4)},Fn.cloneDeep=function(t){return si(t,5)},Fn.cloneDeepWith=function(t,e){return si(t,5,e="function"==typeof e?e:r)},Fn.cloneWith=function(t,e){return si(t,4,e="function"==typeof e?e:r)},Fn.conformsTo=function(t,e){return null==e||ai(t,e,Oa(e))},Fn.deburr=Wa,Fn.defaultTo=function(t,e){return null==t||t!=t?e:t},Fn.divide=_l,Fn.endsWith=function(t,e,n){t=va(t),e=sr(e);var i=t.length,o=n=n===r?i:oi(da(n),0,i);return(n-=e.length)>=0&&t.slice(n,o)==e},Fn.eq=js,Fn.escape=function(t){return(t=va(t))&&q.test(t)?t.replace(Q,en):t},Fn.escapeRegExp=function(t){return(t=va(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Fn.every=function(t,e,n){var i=Vs(t)?Re:fi;return n&&vo(t,e,n)&&(e=r),i(t,oo(e,3))},Fn.find=gs,Fn.findIndex=Wo,Fn.findKey=function(t,e){return Ne(t,oo(e,3),yi)},Fn.findLast=ms,Fn.findLastIndex=Vo,Fn.findLastKey=function(t,e){return Ne(t,oo(e,3),_i)},Fn.floor=bl,Fn.forEach=vs,Fn.forEachRight=ys,Fn.forIn=function(t,e){return null==t?t:mi(t,oo(e,3),Ca)},Fn.forInRight=function(t,e){return null==t?t:vi(t,oo(e,3),Ca)},Fn.forOwn=function(t,e){return t&&yi(t,oo(e,3))},Fn.forOwnRight=function(t,e){return t&&_i(t,oo(e,3))},Fn.get=Ma,Fn.gt=Hs,Fn.gte=Bs,Fn.has=function(t,e){return null!=t&&fo(t,e,Mi)},Fn.hasIn=Ea,Fn.head=Uo,Fn.identity=nl,Fn.includes=function(t,e,n,i){t=Us(t)?t:ja(t),n=n&&!i?da(n):0;var r=t.length;return n<0&&(n=mn(r+n,0)),sa(t)?n<=r&&t.indexOf(e,n)>-1:!!r&&je(t,e,n)>-1},Fn.indexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:da(n);return r<0&&(r=mn(i+r,0)),je(t,e,r)},Fn.inRange=function(t,e,n){return e=fa(e),n===r?(n=e,e=0):n=fa(n),function(t,e,n){return t>=vn(e,n)&&t<mn(e,n)}(t=ga(t),e,n)},Fn.invoke=Aa,Fn.isArguments=Ws,Fn.isArray=Vs,Fn.isArrayBuffer=$s,Fn.isArrayLike=Us,Fn.isArrayLikeObject=Qs,Fn.isBoolean=function(t){return!0===t||!1===t||ta(t)&&ki(t)==v},Fn.isBuffer=Ys,Fn.isDate=qs,Fn.isElement=function(t){return ta(t)&&1===t.nodeType&&!ia(t)},Fn.isEmpty=function(t){if(null==t)return!0;if(Us(t)&&(Vs(t)||"string"==typeof t||"function"==typeof t.splice||Ys(t)||la(t)||Ws(t)))return!t.length;var e=ho(t);if(e==w||e==R)return!t.size;if(xo(t))return!Di(t).length;for(var n in t)if(It.call(t,n))return!1;return!0},Fn.isEqual=function(t,e){return Oi(t,e)},Fn.isEqualWith=function(t,e,n){var i=(n="function"==typeof n?n:r)?n(t,e):r;return i===r?Oi(t,e,r,n):!!i},Fn.isError=Xs,Fn.isFinite=function(t){return"number"==typeof t&&ze(t)},Fn.isFunction=Zs,Fn.isInteger=Ks,Fn.isLength=Gs,Fn.isMap=ea,Fn.isMatch=function(t,e){return t===e||Ci(t,e,ao(e))},Fn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:r,Ci(t,e,ao(e),n)},Fn.isNaN=function(t){return na(t)&&t!=+t},Fn.isNative=function(t){if(bo(t))throw new xt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pi(t)},Fn.isNil=function(t){return null==t},Fn.isNull=function(t){return null===t},Fn.isNumber=na,Fn.isObject=Js,Fn.isObjectLike=ta,Fn.isPlainObject=ia,Fn.isRegExp=ra,Fn.isSafeInteger=function(t){return Ks(t)&&t>=-9007199254740991&&t<=h},Fn.isSet=oa,Fn.isString=sa,Fn.isSymbol=aa,Fn.isTypedArray=la,Fn.isUndefined=function(t){return t===r},Fn.isWeakMap=function(t){return ta(t)&&ho(t)==O},Fn.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==ki(t)},Fn.join=function(t,e){return null==t?"":$e.call(t,e)},Fn.kebabCase=Va,Fn.last=Xo,Fn.lastIndexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=da(n))<0?mn(i+o,0):vn(o,i-1)),e==e?function(t,e,n){for(var i=n+1;i--;)if(t[i]===e)return i;return i}(t,e,o):Fe(t,Be,o,!0)},Fn.lowerCase=$a,Fn.lowerFirst=Ua,Fn.lt=ca,Fn.lte=ua,Fn.max=function(t){return t&&t.length?di(t,nl,Si):r},Fn.maxBy=function(t,e){return t&&t.length?di(t,oo(e,2),Si):r},Fn.mean=function(t){return We(t,nl)},Fn.meanBy=function(t,e){return We(t,oo(e,2))},Fn.min=function(t){return t&&t.length?di(t,nl,Li):r},Fn.minBy=function(t,e){return t&&t.length?di(t,oo(e,2),Li):r},Fn.stubArray=pl,Fn.stubFalse=gl,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=xl,Fn.nth=function(t,e){return t&&t.length?Hi(t,da(e)):r},Fn.noConflict=function(){return he._===this&&(he._=Ft),this},Fn.noop=al,Fn.now=Ms,Fn.pad=function(t,e,n){t=va(t);var i=(e=da(e))?un(t):0;if(!e||i>=e)return t;var r=(e-i)/2;return Br(de(r),n)+t+Br(fe(r),n)},Fn.padEnd=function(t,e,n){t=va(t);var i=(e=da(e))?un(t):0;return e&&i<e?t+Br(e-i,n):t},Fn.padStart=function(t,e,n){t=va(t);var i=(e=da(e))?un(t):0;return e&&i<e?Br(e-i,n)+t:t},Fn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),_n(va(t).replace(it,""),e||0)},Fn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&vo(t,e,n)&&(e=n=r),n===r&&("boolean"==typeof e?(n=e,e=r):"boolean"==typeof t&&(n=t,t=r)),t===r&&e===r?(t=0,e=1):(t=fa(t),e===r?(e=t,t=0):e=fa(e)),t>e){var i=t;t=e,e=i}if(n||t%1||e%1){var o=bn();return vn(t+o*(e-t+ae("1e-"+((o+"").length-1))),e)}return Ui(t,e)},Fn.reduce=function(t,e,n){var i=Vs(t)?Ie:Ue,r=arguments.length<3;return i(t,oo(e,4),n,r,ui)},Fn.reduceRight=function(t,e,n){var i=Vs(t)?De:Ue,r=arguments.length<3;return i(t,oo(e,4),n,r,hi)},Fn.repeat=function(t,e,n){return e=(n?vo(t,e,n):e===r)?1:da(e),Qi(va(t),e)},Fn.replace=function(){var t=arguments,e=va(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Fn.result=function(t,e,n){var i=-1,o=(e=mr(e,t)).length;for(o||(o=1,t=r);++i<o;){var s=null==t?r:t[zo(e[i])];s===r&&(i=o,s=n),t=Zs(s)?s.call(t):s}return t},Fn.round=wl,Fn.runInContext=t,Fn.sample=function(t){return(Vs(t)?Xn:qi)(t)},Fn.size=function(t){if(null==t)return 0;if(Us(t))return sa(t)?un(t):t.length;var e=ho(t);return e==w||e==R?t.size:Di(t).length},Fn.snakeCase=Qa,Fn.some=function(t,e,n){var i=Vs(t)?Le:er;return n&&vo(t,e,n)&&(e=r),i(t,oo(e,3))},Fn.sortedIndex=function(t,e){return nr(t,e)},Fn.sortedIndexBy=function(t,e,n){return ir(t,e,oo(n,2))},Fn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var i=nr(t,e);if(i<n&&js(t[i],e))return i}return-1},Fn.sortedLastIndex=function(t,e){return nr(t,e,!0)},Fn.sortedLastIndexBy=function(t,e,n){return ir(t,e,oo(n,2),!0)},Fn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=nr(t,e,!0)-1;if(js(t[n],e))return n}return-1},Fn.startCase=Ya,Fn.startsWith=function(t,e,n){return t=va(t),n=null==n?0:oi(da(n),0,t.length),e=sr(e),t.slice(n,n+e.length)==e},Fn.subtract=kl,Fn.sum=function(t){return t&&t.length?Qe(t,nl):0},Fn.sumBy=function(t,e){return t&&t.length?Qe(t,oo(e,2)):0},Fn.template=function(t,e,n){var i=Fn.templateSettings;n&&vo(t,e,n)&&(e=r),t=va(t),e=ba({},e,i,Xr);var o,s,a=ba({},e.imports,i.imports,Xr),l=Oa(a),c=Ze(a,l),u=0,h=e.interpolate||_t,f="__p += '",d=Mt((e.escape||_t).source+"|"+h.source+"|"+(h===K?ht:_t).source+"|"+(e.evaluate||_t).source+"|$","g"),p="//# sourceURL="+(It.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ie+"]")+"\n";t.replace(d,function(e,n,i,r,a,l){return i||(i=r),f+=t.slice(u,l).replace(bt,nn),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),u=l+e.length,e}),f+="';\n";var g=It.call(e,"variable")&&e.variable;if(g){if(ct.test(g))throw new xt("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(W,""):f).replace(V,"$1").replace($,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Ka(function(){return wt(l,p+"return "+f).apply(r,c)});if(m.source=f,Xs(m))throw m;return m},Fn.times=function(t,e){if((t=da(t))<1||t>h)return[];var n=d,i=vn(t,d);e=oo(e),t-=d;for(var r=Ye(i,e);++n<t;)e(n);return r},Fn.toFinite=fa,Fn.toInteger=da,Fn.toLength=pa,Fn.toLower=function(t){return va(t).toLowerCase()},Fn.toNumber=ga,Fn.toSafeInteger=function(t){return t?oi(da(t),-9007199254740991,h):0===t?t:0},Fn.toString=va,Fn.toUpper=function(t){return va(t).toUpperCase()},Fn.trim=function(t,e,n){if((t=va(t))&&(n||e===r))return qe(t);if(!t||!(e=sr(e)))return t;var i=hn(t),o=hn(e);return yr(i,Ge(i,o),Je(i,o)+1).join("")},Fn.trimEnd=function(t,e,n){if((t=va(t))&&(n||e===r))return t.slice(0,fn(t)+1);if(!t||!(e=sr(e)))return t;var i=hn(t);return yr(i,0,Je(i,hn(e))+1).join("")},Fn.trimStart=function(t,e,n){if((t=va(t))&&(n||e===r))return t.replace(it,"");if(!t||!(e=sr(e)))return t;var i=hn(t);return yr(i,Ge(i,hn(e))).join("")},Fn.truncate=function(t,e){var n=30,i="...";if(Js(e)){var o="separator"in e?e.separator:o;n="length"in e?da(e.length):n,i="omission"in e?sr(e.omission):i}var s=(t=va(t)).length;if(rn(t)){var a=hn(t);s=a.length}if(n>=s)return t;var l=n-un(i);if(l<1)return i;var c=a?yr(a,0,l).join(""):t.slice(0,l);if(o===r)return c+i;if(a&&(l+=c.length-l),ra(o)){if(t.slice(l).search(o)){var u,h=c;for(o.global||(o=Mt(o.source,va(ft.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var f=u.index;c=c.slice(0,f===r?l:f)}}else if(t.indexOf(sr(o),l)!=l){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i},Fn.unescape=function(t){return(t=va(t))&&Y.test(t)?t.replace(U,dn):t},Fn.uniqueId=function(t){var e=++Dt;return va(t)+e},Fn.upperCase=qa,Fn.upperFirst=Xa,Fn.each=vs,Fn.eachRight=ys,Fn.first=Uo,sl(Fn,(ml={},yi(Fn,function(t,e){It.call(Fn.prototype,e)||(ml[e]=t)}),ml),{chain:!1}),Fn.VERSION="4.17.23",Me(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){Fn[t].placeholder=Fn}),Me(["drop","take"],function(t,e){Wn.prototype[t]=function(n){n=n===r?1:mn(da(n),0);var i=this.__filtered__&&!e?new Wn(this):this.clone();return i.__filtered__?i.__takeCount__=vn(n,i.__takeCount__):i.__views__.push({size:vn(n,d),type:t+(i.__dir__<0?"Right":"")}),i},Wn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Me(["filter","map","takeWhile"],function(t,e){var n=e+1,i=1==n||3==n;Wn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oo(t,3),type:n}),e.__filtered__=e.__filtered__||i,e}}),Me(["head","last"],function(t,e){var n="take"+(e?"Right":"");Wn.prototype[t]=function(){return this[n](1).value()[0]}}),Me(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");Wn.prototype[t]=function(){return this.__filtered__?new Wn(this):this[n](1)}}),Wn.prototype.compact=function(){return this.filter(nl)},Wn.prototype.find=function(t){return this.filter(t).head()},Wn.prototype.findLast=function(t){return this.reverse().find(t)},Wn.prototype.invokeMap=Yi(function(t,e){return"function"==typeof t?new Wn(this):this.map(function(n){return Ti(n,t,e)})}),Wn.prototype.reject=function(t){return this.filter(Ds(oo(t)))},Wn.prototype.slice=function(t,e){t=da(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Wn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==r&&(n=(e=da(e))<0?n.dropRight(-e):n.take(e-t)),n)},Wn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Wn.prototype.toArray=function(){return this.take(d)},yi(Wn.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=Fn[i?"take"+("last"==e?"Right":""):e],s=i||/^find/.test(e);o&&(Fn.prototype[e]=function(){var e=this.__wrapped__,a=i?[1]:arguments,l=e instanceof Wn,c=a[0],u=l||Vs(e),h=function(t){var e=o.apply(Fn,Pe([t],a));return i&&f?e[0]:e};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var f=this.__chain__,d=!!this.__actions__.length,p=s&&!f,g=l&&!d;if(!s&&u){e=g?e:new Wn(this);var m=t.apply(e,a);return m.__actions__.push({func:fs,args:[h],thisArg:r}),new Bn(m,f)}return p&&g?t.apply(this,a):(m=this.thru(h),p?i?m.value()[0]:m.value():m)})}),Me(["pop","push","shift","sort","splice","unshift"],function(t){var e=Tt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);Fn.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var r=this.value();return e.apply(Vs(r)?r:[],t)}return this[n](function(n){return e.apply(Vs(n)?n:[],t)})}}),yi(Wn.prototype,function(t,e){var n=Fn[e];if(n){var i=n.name+"";It.call(An,i)||(An[i]=[]),An[i].push({name:e,func:n})}}),An[Nr(r,2).name]=[{name:"wrapper",func:r}],Wn.prototype.clone=function(){var t=new Wn(this.__wrapped__);return t.__actions__=Er(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Er(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Er(this.__views__),t},Wn.prototype.reverse=function(){if(this.__filtered__){var t=new Wn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Wn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Vs(t),i=e<0,r=n?t.length:0,o=function(t,e,n){for(var i=-1,r=n.length;++i<r;){var o=n[i],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=vn(e,t+s);break;case"takeRight":t=mn(t,e-s)}}return{start:t,end:e}}(0,r,this.__views__),s=o.start,a=o.end,l=a-s,c=i?a:s-1,u=this.__iteratees__,h=u.length,f=0,d=vn(l,this.__takeCount__);if(!n||!i&&r==l&&d==l)return hr(t,this.__actions__);var p=[];t:for(;l--&&f<d;){for(var g=-1,m=t[c+=e];++g<h;){var v=u[g],y=v.iteratee,_=v.type,b=y(m);if(2==_)m=b;else if(!b){if(1==_)continue t;break t}}p[f++]=m}return p},Fn.prototype.at=ds,Fn.prototype.chain=function(){return hs(this)},Fn.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},Fn.prototype.next=function(){this.__values__===r&&(this.__values__=ha(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?r:this.__values__[this.__index__++]}},Fn.prototype.plant=function(t){for(var e,n=this;n instanceof Hn;){var i=Fo(n);i.__index__=0,i.__values__=r,e?o.__wrapped__=i:e=i;var o=i;n=n.__wrapped__}return o.__wrapped__=t,e},Fn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Wn){var e=t;return this.__actions__.length&&(e=new Wn(this)),(e=e.reverse()).__actions__.push({func:fs,args:[Jo],thisArg:r}),new Bn(e,this.__chain__)}return this.thru(Jo)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return hr(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,Xt&&(Fn.prototype[Xt]=function(){return this}),Fn}();he._=pn,(i=function(){return pn}.call(e,n,e,t))===r||(t.exports=i)}.call(this)},1105(t,e,n){"use strict";n.d(e,{A:()=>c});var i=n(6942),r=n.n(i),o=n(6540),s=n(6519),a=n(4848);const l=o.forwardRef((t,e)=>{const[{className:n,...i},{as:o="div",bsPrefix:l,spans:c}]=function({as:t,bsPrefix:e,className:n,...i}){e=(0,s.oU)(e,"col");const o=(0,s.gy)(),a=(0,s.Jm)(),l=[],c=[];return o.forEach(t=>{const n=i[t];let r,o,s;delete i[t],"object"==typeof n&&null!=n?({span:r,offset:o,order:s}=n):r=n;const u=t!==a?`-${t}`:"";r&&l.push(!0===r?`${e}${u}`:`${e}${u}-${r}`),null!=s&&c.push(`order${u}-${s}`),null!=o&&c.push(`offset${u}-${o}`)}),[{...i,className:r()(n,...l,...c)},{as:t,bsPrefix:e,spans:l}]}(t);return(0,a.jsx)(o,{...i,ref:e,className:r()(n,!c.length&&l)})});l.displayName="Col";const c=l},3048(t,e,n){"use strict";n.d(e,{A:()=>c});var i=n(6942),r=n.n(i),o=n(6540),s=n(6519),a=n(4848);const l=o.forwardRef(({bsPrefix:t,fluid:e=!1,as:n="div",className:i,...o},l)=>{const c=(0,s.oU)(t,"container"),u="string"==typeof e?`-${e}`:"-fluid";return(0,a.jsx)(n,{ref:l,...o,className:r()(i,e?`${c}${u}`:c)})});l.displayName="Container";const c=l},1376(t,e,n){"use strict";n.d(e,{A:()=>B});var i=n(6942),r=n.n(i),o=n(5556),s=n.n(o),a=n(6540),l=n(4848);const c={type:s().string,tooltip:s().bool,as:s().elementType},u=a.forwardRef(({as:t="div",className:e,type:n="valid",tooltip:i=!1,...o},s)=>(0,l.jsx)(t,{...o,ref:s,className:r()(e,`${n}-${i?"tooltip":"feedback"}`)}));u.displayName="Feedback",u.propTypes=c;const h=u,f=a.createContext({});var d=n(6519);const p=a.forwardRef(({id:t,bsPrefix:e,className:n,type:i="checkbox",isValid:o=!1,isInvalid:s=!1,as:c="input",...u},h)=>{const{controlId:p}=(0,a.useContext)(f);return e=(0,d.oU)(e,"form-check-input"),(0,l.jsx)(c,{...u,ref:h,type:i,id:t||p,className:r()(n,e,o&&"is-valid",s&&"is-invalid")})});p.displayName="FormCheckInput";const g=p,m=a.forwardRef(({bsPrefix:t,className:e,htmlFor:n,...i},o)=>{const{controlId:s}=(0,a.useContext)(f);return t=(0,d.oU)(t,"form-check-label"),(0,l.jsx)("label",{...i,ref:o,htmlFor:n||s,className:r()(e,t)})});m.displayName="FormCheckLabel";const v=m,y=a.forwardRef(({id:t,bsPrefix:e,bsSwitchPrefix:n,inline:i=!1,reverse:o=!1,disabled:s=!1,isValid:c=!1,isInvalid:u=!1,feedbackTooltip:p=!1,feedback:m,feedbackType:y,className:_,style:b,title:x="",type:w="checkbox",label:k,children:S,as:M="input",...E},R)=>{e=(0,d.oU)(e,"form-check"),n=(0,d.oU)(n,"form-switch");const{controlId:T}=(0,a.useContext)(f),A=(0,a.useMemo)(()=>({controlId:t||T}),[T,t]),O=!S&&null!=k&&!1!==k||function(t,e){return a.Children.toArray(t).some(t=>a.isValidElement(t)&&t.type===e)}(S,v),C=(0,l.jsx)(g,{...E,type:"switch"===w?"checkbox":w,ref:R,isValid:c,isInvalid:u,disabled:s,as:M});return(0,l.jsx)(f.Provider,{value:A,children:(0,l.jsx)("div",{style:b,className:r()(_,O&&e,i&&`${e}-inline`,o&&`${e}-reverse`,"switch"===w&&n),children:S||(0,l.jsxs)(l.Fragment,{children:[C,O&&(0,l.jsx)(v,{title:x,children:k}),m&&(0,l.jsx)(h,{type:y,tooltip:p,children:m})]})})})});y.displayName="FormCheck";const _=Object.assign(y,{Input:g,Label:v});n(9771);const b=a.forwardRef(({bsPrefix:t,type:e,size:n,htmlSize:i,id:o,className:s,isValid:c=!1,isInvalid:u=!1,plaintext:h,readOnly:p,as:g="input",...m},v)=>{const{controlId:y}=(0,a.useContext)(f);return t=(0,d.oU)(t,"form-control"),(0,l.jsx)(g,{...m,type:e,size:i,ref:v,readOnly:p,id:o||y,className:r()(s,h?`${t}-plaintext`:t,n&&`${t}-${n}`,"color"===e&&`${t}-color`,c&&"is-valid",u&&"is-invalid")})});b.displayName="FormControl";const x=Object.assign(b,{Feedback:h}),w=a.forwardRef(({className:t,bsPrefix:e,as:n="div",...i},o)=>(e=(0,d.oU)(e,"form-floating"),(0,l.jsx)(n,{ref:o,className:r()(t,e),...i})));w.displayName="FormFloating";const k=w,S=a.forwardRef(({controlId:t,as:e="div",...n},i)=>{const r=(0,a.useMemo)(()=>({controlId:t}),[t]);return(0,l.jsx)(f.Provider,{value:r,children:(0,l.jsx)(e,{...n,ref:i})})});S.displayName="FormGroup";const M=S;var E=n(1105);const R=a.forwardRef(({as:t="label",bsPrefix:e,column:n=!1,visuallyHidden:i=!1,className:o,htmlFor:s,...c},u)=>{const{controlId:h}=(0,a.useContext)(f);e=(0,d.oU)(e,"form-label");let p="col-form-label";"string"==typeof n&&(p=`${p} ${p}-${n}`);const g=r()(o,e,i&&"visually-hidden",n&&p);return s=s||h,n?(0,l.jsx)(E.A,{ref:u,as:"label",className:g,htmlFor:s,...c}):(0,l.jsx)(t,{ref:u,className:g,htmlFor:s,...c})});R.displayName="FormLabel";const T=R,A=a.forwardRef(({bsPrefix:t,className:e,id:n,...i},o)=>{const{controlId:s}=(0,a.useContext)(f);return t=(0,d.oU)(t,"form-range"),(0,l.jsx)("input",{...i,type:"range",ref:o,className:r()(e,t),id:n||s})});A.displayName="FormRange";const O=A,C=a.forwardRef(({bsPrefix:t,size:e,htmlSize:n,className:i,isValid:o=!1,isInvalid:s=!1,id:c,...u},h)=>{const{controlId:p}=(0,a.useContext)(f);return t=(0,d.oU)(t,"form-select"),(0,l.jsx)("select",{...u,size:n,ref:h,className:r()(i,t,e&&`${t}-${e}`,o&&"is-valid",s&&"is-invalid"),id:c||p})});C.displayName="FormSelect";const P=C,I=a.forwardRef(({bsPrefix:t,className:e,as:n="small",muted:i,...o},s)=>(t=(0,d.oU)(t,"form-text"),(0,l.jsx)(n,{...o,ref:s,className:r()(e,t,i&&"text-muted")})));I.displayName="FormText";const D=I,L=a.forwardRef((t,e)=>(0,l.jsx)(_,{...t,ref:e,type:"switch"}));L.displayName="Switch";const z=Object.assign(L,{Input:_.Input,Label:_.Label}),N=a.forwardRef(({bsPrefix:t,className:e,children:n,controlId:i,label:o,...s},a)=>(t=(0,d.oU)(t,"form-floating"),(0,l.jsxs)(M,{ref:a,className:r()(e,t),controlId:i,...s,children:[n,(0,l.jsx)("label",{htmlFor:i,children:o})]})));N.displayName="FloatingLabel";const F=N,j={_ref:s().any,validated:s().bool,as:s().elementType},H=a.forwardRef(({className:t,validated:e,as:n="form",...i},o)=>(0,l.jsx)(n,{...i,ref:o,className:r()(t,e&&"was-validated")}));H.displayName="Form",H.propTypes=j;const B=Object.assign(H,{Group:M,Control:x,Floating:k,Check:_,Switch:z,Label:T,Text:D,Range:O,Select:P,FloatingLabel:F})},4479(t,e,n){"use strict";n.d(e,{A:()=>c});var i=n(6942),r=n.n(i),o=n(6540),s=n(6519),a=n(4848);const l=o.forwardRef(({bsPrefix:t,className:e,as:n="div",...i},o)=>{const l=(0,s.oU)(t,"row"),c=(0,s.gy)(),u=(0,s.Jm)(),h=`${l}-cols`,f=[];return c.forEach(t=>{const e=i[t];let n;delete i[t],null!=e&&"object"==typeof e?({cols:n}=e):n=e;const r=t!==u?`-${t}`:"";null!=n&&f.push(`${h}${r}-${n}`)}),(0,a.jsx)(n,{ref:o,...i,className:r()(e,l,...f)})});l.displayName="Row";const c=l},1651(t,e,n){"use strict";n.d(e,{$:()=>h});var i=n(9658),r=n(1381),o=n(6261),s=n(3345),a=n(6500),l=n(4658),c=n(4880),u=n(2775),h=class extends a.Q{constructor(t,e){super(),this.options=e,this.#t=t,this.#e=null,this.#n=(0,l.T)(),this.bindMethods(),this.setOptions(e)}#t;#i=void 0;#r=void 0;#o=void 0;#s;#a;#n;#e;#l;#c;#u;#h;#f;#d;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#i.addObserver(this),f(this.#i,this.options)?this.#g():this.updateResult(),this.#m())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#i,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#i,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#y(),this.#i.removeObserver(this)}setOptions(t){const e=this.options,n=this.#i;if(this.options=this.#t.defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,c.nU)(this.options.enabled,this.#i))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#i.setOptions(this.options),e._defaulted&&!(0,c.f8)(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#i,observer:this});const i=this.hasListeners();i&&p(this.#i,n,this.options,e)&&this.#g(),this.updateResult(),!i||this.#i===n&&(0,c.nU)(this.options.enabled,this.#i)===(0,c.nU)(e.enabled,this.#i)&&(0,c.d2)(this.options.staleTime,this.#i)===(0,c.d2)(e.staleTime,this.#i)||this.#b();const r=this.#x();!i||this.#i===n&&(0,c.nU)(this.options.enabled,this.#i)===(0,c.nU)(e.enabled,this.#i)&&r===this.#d||this.#w(r)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),n=this.createResult(e,t);return i=this,r=n,!(0,c.f8)(i.getCurrentResult(),r)&&(this.#o=n,this.#a=this.options,this.#s=this.#i.state),n;var i,r}getCurrentResult(){return this.#o}trackResult(t,e){return new Proxy(t,{get:(t,n)=>(this.trackProp(n),e?.(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#n.status||this.#n.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(t,n))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#i}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),n=this.#t.getQueryCache().build(this.#t,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#g({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#g(t){this.#_();let e=this.#i.fetch(this.options,t);return t?.throwOnError||(e=e.catch(c.lQ)),e}#b(){this.#v();const t=(0,c.d2)(this.options.staleTime,this.#i);if(r.H.isServer()||this.#o.isStale||!(0,c.gn)(t))return;const e=(0,c.j3)(this.#o.dataUpdatedAt,t)+1;this.#h=u.zs.setTimeout(()=>{this.#o.isStale||this.updateResult()},e)}#x(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#i):this.options.refetchInterval)??!1}#w(t){this.#y(),this.#d=t,!r.H.isServer()&&!1!==(0,c.nU)(this.options.enabled,this.#i)&&(0,c.gn)(this.#d)&&0!==this.#d&&(this.#f=u.zs.setInterval(()=>{(this.options.refetchIntervalInBackground||i.m.isFocused())&&this.#g()},this.#d))}#m(){this.#b(),this.#w(this.#x())}#v(){void 0!==this.#h&&(u.zs.clearTimeout(this.#h),this.#h=void 0)}#y(){void 0!==this.#f&&(u.zs.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){const n=this.#i,i=this.options,r=this.#o,o=this.#s,a=this.#a,u=t!==n?t.state:this.#r,{state:h}=t;let d,m={...h},v=!1;if(e._optimisticResults){const r=this.hasListeners(),o=!r&&f(t,e),a=r&&p(t,n,e,i);(o||a)&&(m={...m,...(0,s.k)(h.data,t.options)}),"isRestoring"===e._optimisticResults&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:_,status:b}=m;d=m.data;let x=!1;if(void 0!==e.placeholderData&&void 0===d&&"pending"===b){let t;r?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(t=r.data,x=!0):t="function"==typeof e.placeholderData?e.placeholderData(this.#u?.state.data,this.#u):e.placeholderData,void 0!==t&&(b="success",d=(0,c.pl)(r?.data,t,e),v=!0)}if(e.select&&void 0!==d&&!x)if(r&&d===o?.data&&e.select===this.#l)d=this.#c;else try{this.#l=e.select,d=e.select(d),d=(0,c.pl)(r?.data,d,e),this.#c=d,this.#e=null}catch(t){this.#e=t}this.#e&&(y=this.#e,d=this.#c,_=Date.now(),b="error");const w="fetching"===m.fetchStatus,k="pending"===b,S="error"===b,M=k&&w,E=void 0!==d,R={status:b,fetchStatus:m.fetchStatus,isPending:k,isSuccess:"success"===b,isError:S,isInitialLoading:M,isLoading:M,data:d,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:_,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>u.dataUpdateCount||m.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!k,isLoadingError:S&&!E,isPaused:"paused"===m.fetchStatus,isPlaceholderData:v,isRefetchError:S&&E,isStale:g(t,e),refetch:this.refetch,promise:this.#n,isEnabled:!1!==(0,c.nU)(e.enabled,t)};if(this.options.experimental_prefetchInRender){const e=void 0!==R.data,i="error"===R.status&&!e,r=t=>{i?t.reject(R.error):e&&t.resolve(R.data)},o=()=>{const t=this.#n=R.promise=(0,l.T)();r(t)},s=this.#n;switch(s.status){case"pending":t.queryHash===n.queryHash&&r(s);break;case"fulfilled":(i||R.data!==s.value)&&o();break;case"rejected":i&&R.error===s.reason||o()}}return R}updateResult(){const t=this.#o,e=this.createResult(this.#i,this.options);this.#s=this.#i.state,this.#a=this.options,void 0!==this.#s.data&&(this.#u=this.#i),(0,c.f8)(e,t)||(this.#o=e,this.#k({listeners:(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!this.#p.size)return!0;const i=new Set(n??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#o).some(e=>{const n=e;return this.#o[n]!==t[n]&&i.has(n)})})()}))}#_(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#i)return;const e=this.#i;this.#i=t,this.#r=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#m()}#k(t){o.jG.batch(()=>{t.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#t.getQueryCache().notify({query:this.#i,type:"observerResultsUpdated"})})}};function f(t,e){return function(t,e){return!1!==(0,c.nU)(e.enabled,t)&&void 0===t.state.data&&!("error"===t.state.status&&!1===(0,c.nU)(e.retryOnMount,t))}(t,e)||void 0!==t.state.data&&d(t,e,e.refetchOnMount)}function d(t,e,n){if(!1!==(0,c.nU)(e.enabled,t)&&"static"!==(0,c.d2)(e.staleTime,t)){const i="function"==typeof n?n(t):n;return"always"===i||!1!==i&&g(t,e)}return!1}function p(t,e,n,i){return(t!==e||!1===(0,c.nU)(i.enabled,t))&&(!n.suspense||"error"!==t.state.status)&&g(t,n)}function g(t,e){return!1!==(0,c.nU)(e.enabled,t)&&t.isStaleByTime((0,c.d2)(e.staleTime,t))}},3335(t,e,n){"use strict";n.d(e,{w:()=>o});var i=n(6540),r=i.createContext(!1),o=()=>i.useContext(r);r.Provider},6672(t,e,n){"use strict";n.d(e,{h:()=>o});var i=n(6540);n(4848);var r=i.createContext(function(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}()),o=()=>i.useContext(r)},8590(t,e,n){"use strict";n.d(e,{$1:()=>a,LJ:()=>o,wZ:()=>s});var i=n(6540),r=n(4880),o=(t,e,n)=>{const i=n?.state.error&&"function"==typeof t.throwOnError?(0,r.GU)(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(e.isReset()||(t.retryOnMount=!1))},s=t=>{i.useEffect(()=>{t.clearReset()},[t])},a=({result:t,errorResetBoundary:e,throwOnError:n,query:i,suspense:o})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(o&&void 0===t.data||(0,r.GU)(n,[t.error,i]))},791(t,e,n){"use strict";n.d(e,{EU:()=>o,iL:()=>s,jv:()=>i,nE:()=>r});var i=t=>{if(t.suspense){const e=1e3,n=t=>"static"===t?t:Math.max(t??e,e),i=t.staleTime;t.staleTime="function"==typeof i?(...t)=>n(i(...t)):n(i),"number"==typeof t.gcTime&&(t.gcTime=Math.max(t.gcTime,e))}},r=(t,e)=>t.isLoading&&t.isFetching&&!e,o=(t,e)=>t?.suspense&&e.isPending,s=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()})},7571(t,e,n){"use strict";n.d(e,{E:()=>g});var i=n(6540),r=n(6261),o=n(1651),s=n(6500),a=n(4880);function l(t,e){const n=new Set(e);return t.filter(t=>!n.has(t))}var c=class extends s.Q{#t;#S;#M;#E;#R;#T;#A;#O;#C;#P=[];constructor(t,e,n){super(),this.#t=t,this.#E=n,this.#M=[],this.#R=[],this.#S=[],this.setQueries(e)}onSubscribe(){1===this.listeners.size&&this.#R.forEach(t=>{t.subscribe(e=>{this.#I(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#R.forEach(t=>{t.destroy()})}setQueries(t,e){this.#M=t,this.#E=e,r.jG.batch(()=>{const t=this.#R,e=this.#D(this.#M);e.forEach(t=>t.observer.setOptions(t.defaultedQueryOptions));const n=e.map(t=>t.observer),i=n.map(t=>t.getCurrentResult()),r=t.length!==n.length,o=n.some((e,n)=>e!==t[n]),s=r||o,c=!!s||i.some((t,e)=>{const n=this.#S[e];return!n||!(0,a.f8)(t,n)});(s||c)&&(s&&(this.#P=e,this.#R=n),this.#S=i,this.hasListeners()&&(s&&(l(t,n).forEach(t=>{t.destroy()}),l(n,t).forEach(t=>{t.subscribe(e=>{this.#I(t,e)})})),this.#k()))})}getCurrentResult(){return this.#S}getQueries(){return this.#R.map(t=>t.getCurrentQuery())}getObservers(){return this.#R}getOptimisticResult(t,e){const n=this.#D(t),i=n.map(t=>t.observer.getOptimisticResult(t.defaultedQueryOptions)),r=n.map(t=>t.defaultedQueryOptions.queryHash);return[i,t=>this.#L(t??i,e,r),()=>this.#z(i,n)]}#z(t,e){return e.map((n,i)=>{const r=t[i];return n.defaultedQueryOptions.notifyOnChangeProps?r:n.observer.trackResult(r,t=>{e.forEach(e=>{e.observer.trackProp(t)})})})}#L(t,e,n){if(e){const i=this.#C,r=void 0!==n&&void 0!==i&&(i.length!==n.length||n.some((t,e)=>t!==i[e]));return this.#T&&this.#S===this.#O&&!r&&e===this.#A||(this.#A=e,this.#O=this.#S,void 0!==n&&(this.#C=n),this.#T=(0,a.BH)(this.#T,e(t))),this.#T}return t}#N(){return void 0!==this.#E?.combine&&this.#R.some((t,e)=>t.options.suspense&&void 0===this.#S[e]?.data)}#D(t){const e=new Map;this.#R.forEach(t=>{const n=t.options.queryHash;if(!n)return;const i=e.get(n);i?i.push(t):e.set(n,[t])});const n=[];return t.forEach(t=>{const i=this.#t.defaultQueryOptions(t),r=e.get(i.queryHash)?.shift(),s=r??new o.$(this.#t,i);n.push({defaultedQueryOptions:i,observer:s})}),n}#I(t,e){const n=this.#R.indexOf(t);-1!==n&&(this.#S=function(t,e,n){const i=t.slice(0);return i[e]=n,i}(this.#S,n,e),this.#k())}#k(){if(this.hasListeners()){const t=this.#z(this.#S,this.#P),e=this.#N(),n=this.#T,i=e?n:this.#L(t,this.#E?.combine);(e||n!==i)&&r.jG.batch(()=>{this.listeners.forEach(t=>{t(this.#S)})})}}},u=n(7665),h=n(3335),f=n(6672),d=n(8590),p=n(791);function g({queries:t,...e},n){const s=(0,u.jE)(n),l=(0,h.w)(),g=(0,f.h)(),m=i.useMemo(()=>t.map(t=>{const e=s.defaultQueryOptions(t);return e._optimisticResults=l?"isRestoring":"optimistic",e}),[t,s,l]);m.forEach(t=>{(0,p.jv)(t);const e=s.getQueryCache().get(t.queryHash);(0,d.LJ)(t,g,e)}),(0,d.wZ)(g);const[v]=i.useState(()=>new c(s,m,e)),[y,_,b]=v.getOptimisticResult(m,e.combine),x=!l&&!1!==e.subscribed;i.useSyncExternalStore(i.useCallback(t=>x?v.subscribe(r.jG.batchCalls(t)):a.lQ,[v,x]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),i.useEffect(()=>{v.setQueries(m,e)},[m,e,v]);const w=y.some((t,e)=>(0,p.EU)(m[e],t))?y.flatMap((t,e)=>{const n=m[e];if(n&&(0,p.EU)(n,t)){const t=new o.$(s,n);return(0,p.iL)(n,t,g)}return[]}):[];if(w.length>0)throw Promise.all(w);const k=y.find((t,e)=>{const n=m[e];return n&&(0,d.$1)({result:t,errorResetBoundary:g,throwOnError:n.throwOnError,query:s.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(k?.error)throw k.error;return _(b())}},8069(t,e,n){"use strict";n.d(e,{I:()=>d});var i=n(1651),r=n(6540),o=n(6261),s=n(4880),a=n(1381),l=n(7665),c=n(6672),u=n(8590),h=n(3335),f=n(791);function d(t,e){return function(t,e,n){const i=(0,h.w)(),d=(0,c.h)(),p=(0,l.jE)(n),g=p.defaultQueryOptions(t);p.getDefaultOptions().queries?._experimental_beforeQuery?.(g);const m=p.getQueryCache().get(g.queryHash),v=!1!==t.subscribed;g._optimisticResults=i?"isRestoring":v?"optimistic":void 0,(0,f.jv)(g),(0,u.LJ)(g,d,m),(0,u.wZ)(d);const y=!p.getQueryCache().get(g.queryHash),[_]=r.useState(()=>new e(p,g)),b=_.getOptimisticResult(g),x=!i&&v;if(r.useSyncExternalStore(r.useCallback(t=>{const e=x?_.subscribe(o.jG.batchCalls(t)):s.lQ;return _.updateResult(),e},[_,x]),()=>_.getCurrentResult(),()=>_.getCurrentResult()),r.useEffect(()=>{_.setOptions(g)},[g,_]),(0,f.EU)(g,b))throw(0,f.iL)(g,_,d);if((0,u.$1)({result:b,errorResetBoundary:d,throwOnError:g.throwOnError,query:m,suspense:g.suspense}))throw b.error;if(p.getDefaultOptions().queries?._experimental_afterQuery?.(g,b),g.experimental_prefetchInRender&&!a.H.isServer()&&(0,f.nE)(b,i)){const t=y?(0,f.iL)(g,_,d):m?.promise;t?.catch(s.lQ).finally(()=>{_.updateResult()})}return g.notifyOnChangeProps?b:_.trackResult(b)}(t,i.$,e)}},6118(t,e,n){"use strict";n.d(e,{A6:()=>O,Bs:()=>re,E8:()=>be,FN:()=>pe,No:()=>fe,OJ:()=>Je,P$:()=>I,PP:()=>Ue,ZT:()=>P,hE:()=>Ee,kc:()=>qe,m_:()=>Ve,s$:()=>Se,t1:()=>te,tK:()=>Te});var i=n(9311);class r{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){const r=e.listeners[i],o=e.duration;r.forEach(i=>i({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(n-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=i.r.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const r=n.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>n.duration&&(n.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(i.draw(),this._notify(i,n,t,"progress")),r.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=r.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var o=new r;const s="transparent",a={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const r=(0,i.c)(t||s),o=r.valid&&(0,i.c)(e||s);return o&&o.valid?o.mix(r,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class l{constructor(t,e,n,r){const o=e[n];r=(0,i.a)([t.to,r,o,t.from]);const s=(0,i.a)([t.from,o,r]);this._active=!0,this._fn=t.fn||a[t.type||typeof s],this._easing=i.e[t.easing]||i.e.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const r=this._target[this._prop],o=n-this._start,s=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=(0,i.a)([t.to,e,r,t.from]),this._from=(0,i.a)([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e<n),!this._active)return this._target[i]=s,void this._notify(!0);e<0?this._target[i]=r:(a=e/n%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[i]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let t=0;t<n.length;t++)n[t][e]()}}class c{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!(0,i.i)(t))return;const e=Object.keys(i.d.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const o=t[r];if(!(0,i.i)(o))return;const s={};for(const t of e)s[t]=o[t];((0,i.b)(o.properties)&&o.properties||[r]).forEach(t=>{t!==r&&n.has(t)||n.set(t,s)})})}_animateOptions(t,e){const n=e.options,i=function(t,e){if(!e)return;let n=t.options;if(n)return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n;t.options=e}(t,n);if(!i)return[];const r=this._createAnimations(i,n);return n.$shared&&function(t,e){const n=[],i=Object.keys(e);for(let e=0;e<i.length;e++){const r=t[i[e]];r&&r.active()&&n.push(r.wait())}return Promise.all(n)}(t.options.$animations,n).then(()=>{t.options=n},()=>{}),r}_createAnimations(t,e){const n=this._properties,i=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const c=o[a];if("$"===c.charAt(0))continue;if("options"===c){i.push(...this._animateOptions(t,e));continue}const u=e[c];let h=r[c];const f=n.get(c);if(h){if(f&&h.active()){h.update(f,u,s);continue}h.cancel()}f&&f.duration?(r[c]=h=new l(f,t,c,u),i.push(h)):t[c]=u}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(o.add(this._chart,n),!0):void 0}}function u(t,e){const n=t&&t.options||{},i=n.reverse,r=void 0===n.min?e:0,o=void 0===n.max?e:0;return{start:i?o:r,end:i?r:o}}function h(t,e){const n=[],i=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=i.length;r<o;++r)n.push(i[r].index);return n}function f(t,e,n,r={}){const o=t.keys,s="single"===r.mode;let a,l,c,u;if(null===e)return;let h=!1;for(a=0,l=o.length;a<l;++a){if(c=+o[a],c===n){if(h=!0,r.all)continue;break}u=t.values[c],(0,i.g)(u)&&(s||0===e||(0,i.s)(e)===(0,i.s)(u))&&(e+=u)}return h||r.all?e:0}function d(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function p(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function g(t,e,n,i){for(const r of e.getMatchingVisibleMetas(i).reverse()){const e=t[r.index];if(n&&e>0||!n&&e<0)return r.index}return null}function m(t,e){const{chart:n,_cachedMeta:i}=t,r=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=i,l=o.axis,c=s.axis,u=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(o,s,i),h=e.length;let f;for(let t=0;t<h;++t){const n=e[t],{[l]:o,[c]:h}=n;f=(n._stacks||(n._stacks={}))[c]=p(r,u,o),f[a]=h,f._top=g(f,s,!0,i.type),f._bottom=g(f,s,!1,i.type),(f._visualValues||(f._visualValues={}))[a]=h}}function v(t,e){const n=t.scales;return Object.keys(n).filter(t=>n[t].axis===e).shift()}function y(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n],void 0!==e[i]._visualValues&&void 0!==e[i]._visualValues[n]&&delete e[i]._visualValues[n]}}}const _=t=>"reset"===t||"none"===t,b=(t,e)=>e?t:Object.assign({},t);class x{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=d(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&y(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),r=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,o=e.xAxisID=(0,i.v)(n.xAxisID,v(t,"x")),s=e.yAxisID=(0,i.v)(n.yAxisID,v(t,"y")),a=e.rAxisID=(0,i.v)(n.rAxisID,v(t,"r")),l=e.indexAxis,c=e.iAxisID=r(l,o,s,a),u=e.vAxisID=r(l,s,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&(0,i.u)(this._data,this),t._stacked&&y(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if((0,i.i)(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:n,vScale:i}=e,r="x"===n.axis?"x":"y",o="x"===i.axis?"x":"y",s=Object.keys(t),a=new Array(s.length);let l,c,u;for(l=0,c=s.length;l<c;++l)u=s[l],a[l]={[r]:u,[o]:t[u]};return a}(e,t)}else if(n!==e){if(n){(0,i.u)(n,this);const t=this._cachedMeta;y(t),t._parsed=[]}e&&Object.isExtensible(e)&&(0,i.l)(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const r=e._stacked;e._stacked=d(e.vScale,e),e.stack!==n.stack&&(i=!0,y(e),e.stack=n.stack),this._resyncElements(t),(i||r!==e._stacked)&&(m(this,e._parsed),e._stacked=d(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:r}=this,{iScale:o,_stacked:s}=n,a=o.axis;let l,c,u,h=0===t&&e===r.length||n._sorted,f=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,u=r;else{u=(0,i.b)(r[t])?this.parseArrayData(n,r,t,e):(0,i.i)(r[t])?this.parseObjectData(n,r,t,e):this.parsePrimitiveData(n,r,t,e);const o=()=>null===c[a]||f&&c[a]<f[a];for(l=0;l<e;++l)n._parsed[l+t]=c=u[l],h&&(o()&&(h=!1),f=c);n._sorted=h}s&&m(this,u)}parsePrimitiveData(t,e,n,i){const{iScale:r,vScale:o}=t,s=r.axis,a=o.axis,l=r.getLabels(),c=r===o,u=new Array(i);let h,f,d;for(h=0,f=i;h<f;++h)d=h+n,u[h]={[s]:c||r.parse(l[d],d),[a]:o.parse(e[d],d)};return u}parseArrayData(t,e,n,i){const{xScale:r,yScale:o}=t,s=new Array(i);let a,l,c,u;for(a=0,l=i;a<l;++a)c=a+n,u=e[c],s[a]={x:r.parse(u[0],c),y:o.parse(u[1],c)};return s}parseObjectData(t,e,n,r){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(r);let u,h,f,d;for(u=0,h=r;u<h;++u)f=u+n,d=e[f],c[u]={x:o.parse((0,i.f)(d,a),f),y:s.parse((0,i.f)(d,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const i=this.chart,r=this._cachedMeta,o=e[t.axis];return f({keys:h(i,!0),values:e._stacks[t.axis]._visualValues},o,r.index,{mode:n})}updateRangeFromParsed(t,e,n,i){const r=n[e.axis];let o=null===r?NaN:r;const s=i&&n._stacks[e.axis];i&&s&&(i.values=s,o=f(i,r,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const n=this._cachedMeta,r=n._parsed,o=n._sorted&&t===n.iScale,s=r.length,a=this._getOtherScale(t),l=((t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:h(n,!0),values:null})(e,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=function(t){const{min:e,max:n,minDefined:i,maxDefined:r}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}(a);let d,p;function g(){p=r[d];const e=p[a.axis];return!(0,i.g)(p[t.axis])||u>e||f<e}for(d=0;d<s&&(g()||(this.updateRangeFromParsed(c,t,p,l),!o));++d);if(o)for(d=s-1;d>=0;--d)if(!g()){this.updateRangeFromParsed(c,t,p,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let r,o,s;for(r=0,o=e.length;r<o;++r)s=e[r][t.axis],(0,i.g)(s)&&n.push(s);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,i=e.vScale,r=this.getParsed(t);return{label:n?""+n.getLabelForValue(r[n.axis]):"",value:i?""+i.getLabelForValue(r[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,n,r,o;return(0,i.i)(t)?(e=t.top,n=t.right,r=t.bottom,o=t.left):e=n=r=o=t,{top:e,right:n,bottom:r,left:o,disabled:!1===t}}((0,i.v)(this.options.clip,function(t,e,n){if(!1===n)return!1;const i=u(t,n),r=u(e,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,i=n.data||[],r=e.chartArea,o=[],s=this._drawStart||0,a=this._drawCount||i.length-s,l=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(t,r,s,a),c=s;c<s+a;++c){const e=i[c];e.hidden||(e.active&&l?o.push(e):e.draw(t,r))}for(c=0;c<o.length;++c)o[c].draw(t,r)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const r=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];o=e.$context||(e.$context=function(t,e,n){return(0,i.j)(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),o.parsed=this.getParsed(t),o.raw=r.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=function(t,e){return(0,i.j)(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),o.dataset=r,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=n,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const r="active"===e,o=this._cachedDataOpts,s=t+"-"+e,a=o[s],l=this.enableOptionSharing&&(0,i.h)(n);if(a)return b(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),h=r?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),d=Object.keys(i.d.elements[t]),p=c.resolveNamedOptions(f,d,()=>this.getContext(n,r,e),h);return p.$shared&&(p.$shared=l,o[s]=Object.freeze(b(p,l))),p}_resolveAnimations(t,e,n){const i=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==i.options.animation){const i=this.chart.config,r=i.datasetAnimationScopeKeys(this._type,e),o=i.getOptionScopes(this.getDataset(),r);a=i.createResolver(o,this.getContext(t,n,e))}const l=new c(i,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||_(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,r=this.getSharedOptions(n),o=this.includeOptions(e,r)||r!==i;return this.updateSharedOptions(r,e,n),{sharedOptions:r,includeOptions:o}}updateElement(t,e,n,i){_(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!_(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const r=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[t,e,n]of this._syncList)this[t](e,n);this._syncList=[];const i=n.length,r=e.length,o=Math.min(r,i);o&&this.parse(0,o),r>i?this._insertElements(i,r-i,t):r<i&&this._removeElements(r,i-r)}_insertElements(t,e,n=!0){const i=this._cachedMeta,r=i.data,o=t+e;let s;const a=t=>{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;s<o;++s)r[s]=new this.dataElementType;this._parsing&&a(i._parsed),this.parse(t,e),n&&this.updateElements(r,t,e,"reset")}updateElements(t,e,n,i){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,e);n._stacked&&y(n,i)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,i]=t;this[e](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function w(t){const e=t.iScale,n=function(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let r=[];for(let e=0,i=n.length;e<i;e++)r=r.concat(n[e].controller.getAllParsedValues(t));t._cache.$bar=(0,i._)(r.sort((t,e)=>t-e))}return t._cache.$bar}(e,t.type);let r,o,s,a,l=e._length;const c=()=>{32767!==s&&-32768!==s&&((0,i.h)(a)&&(l=Math.min(l,Math.abs(s-a)||l)),a=s)};for(r=0,o=n.length;r<o;++r)s=e.getPixelForValue(n[r]),c();for(a=void 0,r=0,o=e.ticks.length;r<o;++r)s=e.getPixelForTick(r),c();return l}function k(t,e,n,r){return(0,i.b)(t)?function(t,e,n,i){const r=n.parse(t[0],i),o=n.parse(t[1],i),s=Math.min(r,o),a=Math.max(r,o);let l=s,c=a;Math.abs(s)>Math.abs(a)&&(l=a,c=s),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,n,r):e[n.axis]=n.parse(t,r),e}function S(t,e,n,i){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,u,h,f;for(c=n,u=n+i;c<u;++c)f=e[c],h={},h[r.axis]=a||r.parse(s[c],c),l.push(k(f,h,o,c));return l}function M(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function E(t,e,n,i){let r=e.borderSkipped;const o={};if(!r)return void(t.borderSkipped=o);if(!0===r)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:s,end:a,reverse:l,top:c,bottom:u}=function(t){let e,n,i,r,o;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(r="end",o="start"):(r="start",o="end"),{start:n,end:i,reverse:e,top:r,bottom:o}}(t);"middle"===r&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?r=c:(n._bottom||0)===i?r=u:(o[R(u,s,a,l)]=!0,r=c)),o[R(r,s,a,l)]=!0,t.borderSkipped=o}function R(t,e,n,i){var r,o,s;return i?(s=n,t=T(t=(r=t)===(o=e)?s:r===s?o:r,n,e)):t=T(t,e,n),t}function T(t,e,n){return"start"===t?e:"end"===t?n:t}function A(t,{inflateAmount:e},n){t.inflateAmount="auto"===e?1===n?.33:0:e}class O extends x{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,n,i){return S(t,e,n,i)}parseArrayData(t,e,n,i){return S(t,e,n,i)}parseObjectData(t,e,n,r){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c="x"===o.axis?a:l,u="x"===s.axis?a:l,h=[];let f,d,p,g;for(f=n,d=n+r;f<d;++f)g=e[f],p={},p[o.axis]=o.parse((0,i.f)(g,c),f),h.push(k((0,i.f)(g,u),p,s,f));return h}updateRangeFromParsed(t,e,n,i){super.updateRangeFromParsed(t,e,n,i);const r=n._custom;r&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:i}=e,r=this.getParsed(t),o=r._custom,s=M(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(r[i.axis]);return{label:""+n.getLabelForValue(r[n.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,r){const o="reset"===r,{index:s,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:h,includeOptions:f}=this._getSharedOptions(e,r);for(let d=e;d<e+n;d++){const e=this.getParsed(d),n=o||(0,i.k)(e[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(d),p=this._calculateBarIndexPixels(d,u),g=(e._stacks||{})[a.axis],m={horizontal:c,base:n.base,enableBorderRadius:!g||M(e._custom)||s===g._top||s===g._bottom,x:c?n.head:p.center,y:c?p.center:n.head,height:c?p.size:Math.abs(n.size),width:c?Math.abs(n.size):p.size};f&&(m.options=h||this.resolveDataElementOptions(d,t[d].active?"active":r));const v=m.options||t[d].options;E(m,v,g,s),A(m,v,u.ratio),this.updateElement(t[d],d,m,r)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,r=n.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),o=n.options.stacked,s=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[n.axis],c=t=>{const e=t._parsed.find(t=>t[n.axis]===l),r=e&&e[t.vScale.axis];if((0,i.k)(r)||isNaN(r))return!0};for(const n of r)if((void 0===e||!c(n))&&((!1===o||-1===s.indexOf(n.stack)||void 0===o&&void 0===n.stack)&&s.push(n.stack),n.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const n of this.chart.data.datasets)t[(0,i.v)("x"===this.chart.options.indexAxis?n.xAxisID:n.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,n){const i=this._getStacks(t,n),r=void 0!==e?i.indexOf(e):-1;return-1===r?i.length-1:r}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,i=[];let r,o;for(r=0,o=e.data.length;r<o;++r)i.push(n.getPixelForValue(this.getParsed(r)[n.axis],r));const s=t.barThickness;return{min:s||w(e),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n,index:r},options:{base:o,minBarLength:s}}=this,a=o||0,l=this.getParsed(t),c=l._custom,u=M(c);let h,f,d=l[e.axis],p=0,g=n?this.applyStack(e,l,n):d;g!==d&&(p=g-d,g=d),u&&(d=c.barStart,g=c.barEnd-c.barStart,0!==d&&(0,i.s)(d)!==(0,i.s)(c.barEnd)&&(p=0),p+=d);const m=(0,i.k)(o)||u?p:o;let v=e.getPixelForValue(m);if(h=this.chart.getDataVisibility(t)?e.getPixelForValue(p+g):v,f=h-v,Math.abs(f)<s){f=function(t,e,n){return 0!==t?(0,i.s)(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}(f,e,a)*s,d===a&&(v-=f/2);const t=e.getPixelForDecimal(0),o=e.getPixelForDecimal(1),c=Math.min(t,o),p=Math.max(t,o);v=Math.max(Math.min(v,p),c),h=v+f,n&&!u&&(l._stacks[e.axis]._visualValues[r]=e.getValueForPixel(h)-e.getValueForPixel(v))}if(v===e.getPixelForValue(a)){const t=(0,i.s)(f)*e.getLineWidthForValue(a)/2;v+=t,f-=t}return{size:f,base:v,head:h,center:h+f/2}}_calculateBarIndexPixels(t,e){const n=e.scale,r=this.options,o=r.skipNull,s=(0,i.v)(r.maxBarThickness,1/0);let a,l;const c=this._getAxisCount();if(e.grouped){const n=o?this._getStackCount(t):e.stackCount,u="flex"===r.barThickness?function(t,e,n,i){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t<r.length-1?r[t+1]:null;const l=n.categoryPercentage;null===s&&(s=o-(null===a?e.end-e.start:a-o)),null===a&&(a=o+o-s);const c=o-(o-Math.min(s,a))/2*l;return{chunk:Math.abs(a-s)/2*l/i,ratio:n.barPercentage,start:c}}(t,e,r,n*c):function(t,e,n,r){const o=n.barThickness;let s,a;return(0,i.k)(o)?(s=e.min*n.categoryPercentage,a=n.barPercentage):(s=o*r,a=1),{chunk:s/r,ratio:a,start:e.pixels[t]-s/2}}(t,e,r,n*c),h="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,f=this._getAxis().indexOf((0,i.v)(h,this.getFirstScaleIdForIndexAxis())),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+f;a=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else a=n.getPixelForValue(this.getParsed(t)[n.axis],t),l=Math.min(s,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,i=n.length;let r=0;for(;r<i;++r)null===this.getParsed(r)[e.axis]||n[r].hidden||n[r].draw(this._ctx)}}class C extends x{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:n,textAlign:i,color:r,useBorderRadius:o,borderRadius:s}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((e,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:e,fillStyle:l.backgroundColor,fontColor:r,hidden:!t.getDataVisibility(a),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:i,pointStyle:n,borderRadius:o&&(s||l.borderRadius),index:a}}):[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{let o,s,a=t=>+n[t];if((0,i.i)(n[t])){const{key:t="value"}=this._parsing;a=e=>+(0,i.f)(n[e],t)}for(o=t,s=t+e;o<s;++o)r._parsed[o]=a(o)}}_getRotation(){return(0,i.t)(this.options.rotation-90)}_getCircumference(){return(0,i.t)(this.options.circumference)}_getRotationExtents(){let t=i.T,e=-i.T;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const i=this.chart.getDatasetMeta(n).controller,r=i._getRotation(),o=i._getCircumference();t=Math.min(t,r),e=Math.max(e,r+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,r=this._cachedMeta,o=r.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-s)/2,0),l=Math.min((0,i.m)(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:f,ratioY:d,offsetX:p,offsetY:g}=function(t,e,n){let r=1,o=1,s=0,a=0;if(e<i.T){const l=t,c=l+e,u=Math.cos(l),h=Math.sin(l),f=Math.cos(c),d=Math.sin(c),p=(t,e,r)=>(0,i.p)(t,l,c,!0)?1:Math.max(e,e*n,r,r*n),g=(t,e,r)=>(0,i.p)(t,l,c,!0)?-1:Math.min(e,e*n,r,r*n),m=p(0,u,f),v=p(i.H,h,d),y=g(i.P,u,f),_=g(i.P+i.H,h,d);r=(m-y)/2,o=(v-_)/2,s=-(m+y)/2,a=-(v+_)/2}return{ratioX:r,ratioY:o,offsetX:s,offsetY:a}}(h,u,l),m=(n.width-s)/f,v=(n.height-s)/d,y=Math.max(Math.min(m,v)/2,0),_=(0,i.n)(this.options.radius,y),b=(_-Math.max(_*l,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*_,this.offsetY=g*_,r.total=this.calculateTotal(),this.outerRadius=_-b*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-b*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const n=this.options,r=this._cachedMeta,o=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===r._parsed[t]||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*o/i.T)}updateElements(t,e,n,i){const r="reset"===i,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,u=r&&a.animateScale,h=u?0:this.innerRadius,f=u?0:this.outerRadius,{sharedOptions:d,includeOptions:p}=this._getSharedOptions(e,i);let g,m=this._getRotation();for(g=0;g<e;++g)m+=this._circumference(g,r);for(g=e;g<e+n;++g){const e=this._circumference(g,r),n=t[g],o={x:l+this.offsetX,y:c+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:f,innerRadius:h};p&&(o.options=d||this.resolveDataElementOptions(g,n.active?"active":i)),m+=e,this.updateElement(n,g,o,i)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n,i=0;for(n=0;n<e.length;n++){const r=t._parsed[n];null===r||isNaN(r)||!this.chart.getDataVisibility(n)||e[n].hidden||(i+=Math.abs(r))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?i.T*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=(0,i.o)(e._parsed[t],n.options.locale);return{label:r[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const n=this.chart;let i,r,o,s,a;if(!t)for(i=0,r=n.data.datasets.length;i<r;++i)if(n.isDatasetVisible(i)){o=n.getDatasetMeta(i),t=o.data,s=o.controller;break}if(!t)return 0;for(i=0,r=t.length;i<r;++i)a=s.resolveDataElementOptions(i),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,i=t.length;n<i;++n){const t=this.resolveDataElementOptions(n);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max((0,i.v)(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class P extends x{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:r=[],_dataset:o}=e,s=this.chart._animationsDisabled;let{start:a,count:l}=(0,i.q)(e,r,s);this._drawStart=a,this._drawCount=l,(0,i.w)(e)&&(a=0,l=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=r;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!s,options:c},t),this.updateElements(r,a,l,t)}updateElements(t,e,n,r){const o="reset"===r,{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:h}=this._getSharedOptions(e,r),f=s.axis,d=a.axis,{spanGaps:p,segment:g}=this.options,m=(0,i.x)(p)?p:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||"none"===r,y=e+n,_=t.length;let b=e>0&&this.getParsed(e-1);for(let n=0;n<_;++n){const p=t[n],_=v?p:{};if(n<e||n>=y){_.skip=!0;continue}const x=this.getParsed(n),w=(0,i.k)(x[d]),k=_[f]=s.getPixelForValue(x[f],n),S=_[d]=o||w?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,x,l):x[d],n);_.skip=isNaN(k)||isNaN(S)||w,_.stop=n>0&&Math.abs(x[f]-b[f])>m,g&&(_.parsed=x,_.raw=c.data[n]),h&&(_.options=u||this.resolveDataElementOptions(n,p.active?"active":r)),v||this.updateElement(p,n,_,r),b=x}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const r=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class I extends C{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function D(t,e,n,r){const{controller:o,data:s,_sorted:a}=t,l=o._cachedMeta.iScale,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(l&&e===l.axis&&"r"!==e&&a&&s.length){const a=l._reversePixels?i.A:i.B;if(!r){const r=a(s,e,n);if(c){const{vScale:e}=o._cachedMeta,{_parsed:n}=t,s=n.slice(0,r.lo+1).reverse().findIndex(t=>!(0,i.k)(t[e.axis]));r.lo-=Math.max(0,s);const a=n.slice(r.hi).findIndex(t=>!(0,i.k)(t[e.axis]));r.hi+=Math.max(0,a)}return r}if(o._sharedOptions){const t=s[0],i="function"==typeof t.getRange&&t.getRange(e);if(i){const t=a(s,e,n-i),r=a(s,e,n+i);return{lo:t.lo,hi:r.hi}}}}return{lo:0,hi:s.length-1}}function L(t,e,n,i,r){const o=t.getSortedVisibleDatasetMetas(),s=n[e];for(let t=0,n=o.length;t<n;++t){const{index:n,data:a}=o[t],{lo:l,hi:c}=D(o[t],e,s,r);for(let t=l;t<=c;++t){const e=a[t];e.skip||i(e,n,t)}}}function z(t,e,n,r,o){const s=[];return o||t.isPointInArea(e)?(L(t,n,e,function(n,a,l){(o||(0,i.C)(n,t.chartArea,0))&&n.inRange(e.x,e.y,r)&&s.push({element:n,datasetIndex:a,index:l})},!0),s):s}function N(t,e,n,r,o,s){return s||t.isPointInArea(e)?"r"!==n||r?function(t,e,n,i,r,o){let s=[];const a=function(t){const e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){const r=e?Math.abs(t.x-i.x):0,o=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}}(n);let l=Number.POSITIVE_INFINITY;return L(t,n,e,function(n,c,u){const h=n.inRange(e.x,e.y,r);if(i&&!h)return;const f=n.getCenterPoint(r);if(!o&&!t.isPointInArea(f)&&!h)return;const d=a(e,f);d<l?(s=[{element:n,datasetIndex:c,index:u}],l=d):d===l&&s.push({element:n,datasetIndex:c,index:u})}),s}(t,e,n,r,o,s):function(t,e,n,r){let o=[];return L(t,n,e,function(t,n,s){const{startAngle:a,endAngle:l}=t.getProps(["startAngle","endAngle"],r),{angle:c}=(0,i.D)(t,{x:e.x,y:e.y});(0,i.p)(c,a,l)&&o.push({element:t,datasetIndex:n,index:s})}),o}(t,e,n,o):[]}function F(t,e,n,i,r){const o=[],s="x"===n?"inXRange":"inYRange";let a=!1;return L(t,n,e,(t,i,l)=>{t[s]&&t[s](e[n],r)&&(o.push({element:t,datasetIndex:i,index:l}),a=a||t.inRange(e.x,e.y,r))}),i&&!a?[]:o}var j={evaluateInteractionItems:L,modes:{index(t,e,n,r){const o=(0,i.z)(e,t),s=n.axis||"x",a=n.includeInvisible||!1,l=n.intersect?z(t,o,s,r,a):N(t,o,s,!1,r,a),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=l[0].index,n=t.data[e];n&&!n.skip&&c.push({element:n,datasetIndex:t.index,index:e})}),c):[]},dataset(t,e,n,r){const o=(0,i.z)(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;let l=n.intersect?z(t,o,s,r,a):N(t,o,s,!1,r,a);if(l.length>0){const e=l[0].datasetIndex,n=t.getDatasetMeta(e).data;l=[];for(let t=0;t<n.length;++t)l.push({element:n[t],datasetIndex:e,index:t})}return l},point:(t,e,n,r)=>z(t,(0,i.z)(e,t),n.axis||"xy",r,n.includeInvisible||!1),nearest(t,e,n,r){const o=(0,i.z)(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;return N(t,o,s,n.intersect,r,a)},x:(t,e,n,r)=>F(t,(0,i.z)(e,t),"x",n.intersect,r),y:(t,e,n,r)=>F(t,(0,i.z)(e,t),"y",n.intersect,r)}};const H=["left","top","right","bottom"];function B(t,e){return t.filter(t=>t.pos===e)}function W(t,e){return t.filter(t=>-1===H.indexOf(t.pos)&&t.box.axis===e)}function V(t,e){return t.sort((t,n)=>{const i=e?n:t,r=e?t:n;return i.weight===r.weight?i.index-r.index:i.weight-r.weight})}function $(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function U(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Q(t,e,n,r){const{pos:o,box:s}=n,a=t.maxPadding;if(!(0,i.i)(o)){n.size&&(t[o]-=n.size);const e=r[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?s.height:s.width),n.size=e.size/e.count,t[o]+=n.size}s.getPadding&&U(a,s.getPadding());const l=Math.max(0,e.outerWidth-$(a,t,"left","right")),c=Math.max(0,e.outerHeight-$(a,t,"top","bottom")),u=l!==t.w,h=c!==t.h;return t.w=l,t.h=c,n.horizontal?{same:u,other:h}:{same:h,other:u}}function Y(t,e){const n=e.maxPadding;return function(t){const i={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{i[t]=Math.max(e[t],n[t])}),i}(t?["left","right"]:["top","bottom"])}function q(t,e,n,i){const r=[];let o,s,a,l,c,u;for(o=0,s=t.length,c=0;o<s;++o){a=t[o],l=a.box,l.update(a.width||e.w,a.height||e.h,Y(a.horizontal,e));const{same:s,other:h}=Q(e,n,a,i);c|=s&&r.length,u=u||h,l.fullSize||r.push(a)}return c&&q(r,e,n,i)||u}function X(t,e,n,i,r){t.top=n,t.left=e,t.right=e+i,t.bottom=n+r,t.width=i,t.height=r}function Z(t,e,n,r){const o=n.padding;let{x:s,y:a}=e;for(const l of t){const t=l.box,c=r[l.stack]||{count:1,placed:0,weight:1},u=l.stackWeight/c.weight||1;if(l.horizontal){const r=e.w*u,s=c.size||t.height;(0,i.h)(c.start)&&(a=c.start),t.fullSize?X(t,o.left,a,n.outerWidth-o.right-o.left,s):X(t,e.left+c.placed,a,r,s),c.start=a,c.placed+=r,a=t.bottom}else{const r=e.h*u,a=c.size||t.width;(0,i.h)(c.start)&&(s=c.start),t.fullSize?X(t,s,o.top,a,n.outerHeight-o.bottom-o.top):X(t,s,e.top+c.placed,a,r),c.start=s,c.placed+=r,s=t.right}}e.x=s,e.y=a}var K={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;const o=(0,i.E)(t.options.layout.padding),s=Math.max(e-o.width,0),a=Math.max(n-o.height,0),l=function(t){const e=function(t){const e=[];let n,i,r,o,s,a;for(n=0,i=(t||[]).length;n<i;++n)r=t[n],({position:o,options:{stack:s,stackWeight:a=1}}=r),e.push({index:n,box:r,pos:o,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&o+s,stackWeight:a});return e}(t),n=V(e.filter(t=>t.box.fullSize),!0),i=V(B(e,"left"),!0),r=V(B(e,"right")),o=V(B(e,"top"),!0),s=V(B(e,"bottom")),a=W(e,"x"),l=W(e,"y");return{fullSize:n,leftAndTop:i.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:B(e,"chartArea"),vertical:i.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),c=l.vertical,u=l.horizontal;(0,i.F)(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const h=c.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/h,hBoxMaxHeight:a/2}),d=Object.assign({},o);U(d,(0,i.E)(r));const p=Object.assign({maxPadding:d,w:s,h:a,x:o.left,y:o.top},o),g=function(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:i,stackWeight:r}=n;if(!t||!H.includes(i))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:i,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o<s;++o){a=t[o];const{fullSize:s}=a.box,l=n[a.stack],c=l&&a.stackWeight/l.weight;a.horizontal?(a.width=c?c*i:s&&e.availableWidth,a.height=r):(a.width=i,a.height=c?c*r:s&&e.availableHeight)}return n}(c.concat(u),f);q(l.fullSize,p,f,g),q(c,p,f,g),q(u,p,f,g)&&q(c,p,f,g),function(t){const e=t.maxPadding;function n(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(p),Z(l.leftAndTop,p,f,g),p.x+=p.w,p.y+=p.h,Z(l.rightAndBottom,p,f,g),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},(0,i.F)(l.chartArea,e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class G{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class J extends G{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const tt="$chartjs",et={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},nt=t=>null===t||""===t,it=!!i.K&&{passive:!0};function rt(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,it)}function ot(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function st(t,e,n){const i=t.canvas,r=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||ot(n.addedNodes,i),e=e&&!ot(n.removedNodes,i);e&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function at(t,e,n){const i=t.canvas,r=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||ot(n.removedNodes,i),e=e&&!ot(n.addedNodes,i);e&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const lt=new Map;let ct=0;function ut(){const t=window.devicePixelRatio;t!==ct&&(ct=t,lt.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function ht(t,e,n){const r=t.canvas,o=r&&(0,i.I)(r);if(!o)return;const s=(0,i.L)((t,e)=>{const i=o.clientWidth;n(t,e),i<o.clientWidth&&n()},window),a=new ResizeObserver(t=>{const e=t[0],n=e.contentRect.width,i=e.contentRect.height;0===n&&0===i||s(n,i)});return a.observe(o),function(t,e){lt.size||window.addEventListener("resize",ut),lt.set(t,e)}(t,s),a}function ft(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){lt.delete(t),lt.size||window.removeEventListener("resize",ut)}(t)}function dt(t,e,n){const r=t.canvas,o=(0,i.L)(e=>{null!==t.ctx&&n(function(t,e){const n=et[t.type]||t.type,{x:r,y:o}=(0,i.z)(t,e);return{type:n,chart:e,native:t,x:void 0!==r?r:null,y:void 0!==o?o:null}}(e,t))},t);return function(t,e,n){t&&t.addEventListener(e,n,it)}(r,e,o),o}class pt extends G{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,r=t.getAttribute("height"),o=t.getAttribute("width");if(t[tt]={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",nt(o)){const e=(0,i.J)(t,"width");void 0!==e&&(t.width=e)}if(nt(r))if(""===t.style.height)t.height=t.width/(e||2);else{const e=(0,i.J)(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[tt])return!1;const n=e[tt].initial;["height","width"].forEach(t=>{const r=n[t];(0,i.k)(r)?e.removeAttribute(t):e.setAttribute(t,r)});const r=n.style||{};return Object.keys(r).forEach(t=>{e.style[t]=r[t]}),e.width=e.width,delete e[tt],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),r={attach:st,detach:at,resize:ht}[e]||dt;i[e]=r(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];i&&(({attach:ft,detach:ft,resize:ft}[e]||rt)(t,e,i),n[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,r){return(0,i.G)(t,e,n,r)}isAttached(t){const e=t&&(0,i.I)(t);return!(!e||!e.isConnected)}}class gt{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return(0,i.x)(this.x)&&(0,i.x)(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach(t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]}),i}}function mt(t,e,n,r,o){const s=(0,i.v)(r,0),a=Math.min((0,i.v)(o,t.length),t.length);let l,c,u,h=0;for(n=Math.ceil(n),o&&(l=o-r,n=l/Math.floor(l/n)),u=s;u<0;)h++,u=Math.round(s+h*n);for(c=Math.max(s,0);c<a;c++)c===u&&(e.push(t[c]),h++,u=Math.round(s+h*n))}const vt=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n,yt=(t,e)=>Math.min(e||t,t);function _t(t,e){const n=[],i=t.length/e,r=t.length;let o=0;for(;o<r;o+=i)n.push(t[Math.floor(o)]);return n}function bt(t,e,n){const i=t.ticks.length,r=Math.min(e,i-1),o=t._startPixel,s=t._endPixel,a=1e-6;let l,c=t.getPixelForTick(r);if(!(n&&(l=1===i?Math.max(c-o,s-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(r-1))/2,c+=r<e?l:-l,c<o-a||c>s+a)))return c}function xt(t){return t.drawTicks?t.tickLength:0}function wt(t,e){if(!t.display)return 0;const n=(0,i.a0)(t.font,e),r=(0,i.E)(t.padding);return((0,i.b)(t.text)?t.text.length:1)*n.lineHeight+r.height}function kt(t,e,n){let r=(0,i.a1)(t);return(n&&"right"!==e||!n&&"right"===e)&&(r=(t=>"left"===t?"right":"right"===t?"left":t)(r)),r}class St extends gt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:r}=this;return t=(0,i.O)(t,Number.POSITIVE_INFINITY),e=(0,i.O)(e,Number.NEGATIVE_INFINITY),n=(0,i.O)(n,Number.POSITIVE_INFINITY),r=(0,i.O)(r,Number.NEGATIVE_INFINITY),{min:(0,i.O)(t,n),max:(0,i.O)(e,r),minDefined:(0,i.g)(t),maxDefined:(0,i.g)(e)}}getMinMax(t){let e,{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();if(o&&s)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let i=0,l=a.length;i<l;++i)e=a[i].controller.getMinMax(this,t),o||(n=Math.min(n,e.min)),s||(r=Math.max(r,e.max));return n=s&&n>r?r:n,r=o&&n>r?n:r,{min:(0,i.O)(n,(0,i.O)(r,n)),max:(0,i.O)(r,(0,i.O)(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,i.Q)(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:r,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,i.R)(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?_t(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||"auto"===s.source)&&(this.ticks=function(t,e){const n=t.options.ticks,r=function(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),r=t._maxLength/n;return Math.floor(Math.min(i,r))}(t),o=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?function(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}(e):[],a=s.length,l=s[0],c=s[a-1],u=[];if(a>o)return function(t,e,n,i){let r,o=0,s=n[0];for(i=Math.ceil(i),r=0;r<t.length;r++)r===s&&(e.push(t[r]),o++,s=n[o*i])}(e,u,s,a/o),u;const h=function(t,e,n){const r=function(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}(t),o=e.length/n;if(!r)return Math.max(o,1);const s=(0,i.N)(r);for(let t=0,e=s.length-1;t<e;t++){const e=s[t];if(e>o)return e}return Math.max(o,1)}(s,e,o);if(a>0){let t,n;const r=a>1?Math.round((c-l)/(a-1)):null;for(mt(e,u,h,(0,i.k)(r)?0:l-r,l),t=0,n=a-1;t<n;t++)mt(e,u,h,s[t],s[t+1]);return mt(e,u,h,c,(0,i.k)(r)?e.length:c+r),u}return mt(e,u,h),u}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,n=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){(0,i.Q)(this.options.afterUpdate,[this])}beforeSetDimensions(){(0,i.Q)(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){(0,i.Q)(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),(0,i.Q)(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){(0,i.Q)(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,r,o;for(n=0,r=t.length;n<r;n++)o=t[n],o.label=(0,i.Q)(e.callback,[o.value,n,t],this)}afterTickToLabelConversion(){(0,i.Q)(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){(0,i.Q)(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=yt(this.ticks.length,t.ticks.maxTicksLimit),r=e.minRotation||0,o=e.maxRotation;let s,a,l,c=r;if(!this._isVisible()||!e.display||r>=o||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const u=this._getLabelSizes(),h=u.widest.width,f=u.highest.height,d=(0,i.S)(this.chart.width-h,0,this.maxWidth);s=t.offset?this.maxWidth/n:d/(n-1),h+6>s&&(s=d/(n-(t.offset?.5:1)),a=this.maxHeight-xt(t.grid)-e.padding-wt(t.title,this.chart.options.font),l=Math.sqrt(h*h+f*f),c=(0,i.U)(Math.min(Math.asin((0,i.S)((u.highest.height+6)/s,-1,1)),Math.asin((0,i.S)(a/l,-1,1))-Math.asin((0,i.S)(f/l,-1,1)))),c=Math.max(r,Math.min(o,c))),this.labelRotation=c}afterCalculateLabelRotation(){(0,i.Q)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,i.Q)(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:r,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const s=wt(r,e.options.font);if(a?(t.width=this.maxWidth,t.height=xt(o)+s):(t.height=this.maxHeight,t.width=xt(o)+s),n.display&&this.ticks.length){const{first:e,last:r,widest:o,highest:s}=this._getLabelSizes(),l=2*n.padding,c=(0,i.t)(this.labelRotation),u=Math.cos(c),h=Math.sin(c);if(a){const e=n.mirror?0:h*o.width+u*s.height;t.height=Math.min(this.maxHeight,t.height+e+l)}else{const e=n.mirror?0:u*o.width+h*s.height;t.width=Math.min(this.maxWidth,t.width+e+l)}this._calculatePadding(e,r,h,u)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,h=0;a?l?(u=i*t.width,h=n*e.height):(u=n*t.height,h=i*e.width):"start"===r?h=e.width:"end"===r?u=t.width:"inner"!==r&&(u=t.width/2,h=e.width/2),this.paddingLeft=Math.max((u-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((h-c+o)*this.width/(this.width-c),0)}else{let n=e.height/2,i=t.height/2;"start"===r?(n=0,i=t.height):"end"===r&&(n=e.height,i=0),this.paddingTop=n+o,this.paddingBottom=i+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,i.Q)(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e<n;e++)(0,i.k)(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=_t(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:r,_longestTextCache:o}=this,s=[],a=[],l=Math.floor(e/yt(e,n));let c,u,h,f,d,p,g,m,v,y,_,b=0,x=0;for(c=0;c<e;c+=l){if(f=t[c].label,d=this._resolveTickFontOptions(c),r.font=p=d.string,g=o[p]=o[p]||{data:{},gc:[]},m=d.lineHeight,v=y=0,(0,i.k)(f)||(0,i.b)(f)){if((0,i.b)(f))for(u=0,h=f.length;u<h;++u)_=f[u],(0,i.k)(_)||(0,i.b)(_)||(v=(0,i.V)(r,g.data,g.gc,v,_),y+=m)}else v=(0,i.V)(r,g.data,g.gc,v,f),y=m;s.push(v),a.push(y),b=Math.max(v,b),x=Math.max(y,x)}!function(t,e){(0,i.F)(t,t=>{const n=t.gc,i=n.length/2;let r;if(i>e){for(r=0;r<i;++r)delete t.data[n[r]];n.splice(0,i)}})}(o,e);const w=s.indexOf(b),k=a.indexOf(x),S=t=>({width:s[t]||0,height:a[t]||0});return{first:S(0),last:S(e-1),widest:S(w),highest:S(k),widths:s,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return(0,i.W)(this._alignToPixels?(0,i.X)(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=function(t,e,n){return(0,i.j)(t,{tick:n,index:e,type:"tick"})}(this.getContext(),t,n))}return this.$context||(this.$context=(n=this.chart.getContext(),(0,i.j)(n,{scale:this,type:"scale"})));var n}_tickSize(){const t=this.options.ticks,e=(0,i.t)(this.labelRotation),n=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,a=o?o.widest.width+s:0,l=o?o.highest.height+s:0;return this.isHorizontal()?l*n>a*r?a/n:l/r:l*r<a*n?l/n:a/r}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,r=this.options,{grid:o,position:s,border:a}=r,l=o.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),h=xt(o),f=[],d=a.setContext(this.getContext()),p=d.display?d.width:0,g=p/2,m=function(t){return(0,i.X)(n,t,p)};let v,y,_,b,x,w,k,S,M,E,R,T;if("top"===s)v=m(this.bottom),w=this.bottom-h,S=v-g,E=m(t.top)+g,T=t.bottom;else if("bottom"===s)v=m(this.top),E=t.top,T=m(t.bottom)-g,w=v+g,S=this.top+h;else if("left"===s)v=m(this.right),x=this.right-h,k=v-g,M=m(t.left)+g,R=t.right;else if("right"===s)v=m(this.left),M=t.left,R=m(t.right)-g,x=v+g,k=this.left+h;else if("x"===e){if("center"===s)v=m((t.top+t.bottom)/2+.5);else if((0,i.i)(s)){const t=Object.keys(s)[0],e=s[t];v=m(this.chart.scales[t].getPixelForValue(e))}E=t.top,T=t.bottom,w=v+g,S=w+h}else if("y"===e){if("center"===s)v=m((t.left+t.right)/2);else if((0,i.i)(s)){const t=Object.keys(s)[0],e=s[t];v=m(this.chart.scales[t].getPixelForValue(e))}x=v-g,k=x-h,M=t.left,R=t.right}const A=(0,i.v)(r.ticks.maxTicksLimit,u),O=Math.max(1,Math.ceil(u/A));for(y=0;y<u;y+=O){const t=this.getContext(y),e=o.setContext(t),r=a.setContext(t),s=e.lineWidth,u=e.color,h=r.dash||[],d=r.dashOffset,p=e.tickWidth,g=e.tickColor,m=e.tickBorderDash||[],v=e.tickBorderDashOffset;_=bt(this,y,l),void 0!==_&&(b=(0,i.X)(n,_,s),c?x=k=M=R=b:w=S=E=T=b,f.push({tx1:x,ty1:w,tx2:k,ty2:S,x1:M,y1:E,x2:R,y2:T,width:s,color:u,borderDash:h,borderDashOffset:d,tickWidth:p,tickColor:g,tickBorderDash:m,tickBorderDashOffset:v}))}return this._ticksLength=u,this._borderValue=v,f}_computeLabelItems(t){const e=this.axis,n=this.options,{position:r,ticks:o}=n,s=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:h}=o,f=xt(n.grid),d=f+u,p=h?-u:d,g=-(0,i.t)(this.labelRotation),m=[];let v,y,_,b,x,w,k,S,M,E,R,T,A="middle";if("top"===r)w=this.bottom-p,k=this._getXAxisLabelAlignment();else if("bottom"===r)w=this.top+p,k=this._getXAxisLabelAlignment();else if("left"===r){const t=this._getYAxisLabelAlignment(f);k=t.textAlign,x=t.x}else if("right"===r){const t=this._getYAxisLabelAlignment(f);k=t.textAlign,x=t.x}else if("x"===e){if("center"===r)w=(t.top+t.bottom)/2+d;else if((0,i.i)(r)){const t=Object.keys(r)[0],e=r[t];w=this.chart.scales[t].getPixelForValue(e)+d}k=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===r)x=(t.left+t.right)/2-d;else if((0,i.i)(r)){const t=Object.keys(r)[0],e=r[t];x=this.chart.scales[t].getPixelForValue(e)}k=this._getYAxisLabelAlignment(f).textAlign}"y"===e&&("start"===l?A="top":"end"===l&&(A="bottom"));const O=this._getLabelSizes();for(v=0,y=a.length;v<y;++v){_=a[v],b=_.label;const t=o.setContext(this.getContext(v));S=this.getPixelForTick(v)+o.labelOffset,M=this._resolveTickFontOptions(v),E=M.lineHeight,R=(0,i.b)(b)?b.length:1;const e=R/2,n=t.color,l=t.textStrokeColor,u=t.textStrokeWidth;let f,d=k;if(s?(x=S,"inner"===k&&(d=v===y-1?this.options.reverse?"left":"right":0===v?this.options.reverse?"right":"left":"center"),T="top"===r?"near"===c||0!==g?-R*E+E/2:"center"===c?-O.highest.height/2-e*E+E:-O.highest.height+E/2:"near"===c||0!==g?E/2:"center"===c?O.highest.height/2-e*E:O.highest.height-R*E,h&&(T*=-1),0===g||t.showLabelBackdrop||(x+=E/2*Math.sin(g))):(w=S,T=(1-R)*E/2),t.showLabelBackdrop){const e=(0,i.E)(t.backdropPadding),n=O.heights[v],r=O.widths[v];let o=T-e.top,s=0-e.left;switch(A){case"middle":o-=n/2;break;case"bottom":o-=n}switch(k){case"center":s-=r/2;break;case"right":s-=r;break;case"inner":v===y-1?s-=r:v>0&&(s-=r/2)}f={left:s,top:o,width:r+e.width,height:n+e.height,color:t.backdropColor}}m.push({label:b,font:M,textOffset:T,options:{rotation:g,color:n,strokeColor:l,strokeWidth:u,textAlign:d,textBaseline:A,translation:[x,w],backdrop:f}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-(0,i.t)(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:i,padding:r}}=this.options,o=t+r,s=this._getLabelSizes().widest.width;let a,l;return"left"===e?i?(l=this.right+r,"near"===n?a="left":"center"===n?(a="center",l+=s/2):(a="right",l+=s)):(l=this.right-o,"near"===n?a="right":"center"===n?(a="center",l-=s/2):(a="left",l=this.left)):"right"===e?i?(l=this.left+r,"near"===n?a="right":"center"===n?(a="center",l-=s/2):(a="left",l-=s)):(l=this.left+o,"near"===n?a="left":"center"===n?(a="center",l+=s/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:i,width:r,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,r,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(e=>e.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(r=0,o=i.length;r<o;++r){const t=i[r];e.drawOnChartArea&&s({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&s({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:r}}=this,o=n.setContext(this.getContext()),s=n.display?o.width:0;if(!s)return;const a=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,h,f;this.isHorizontal()?(c=(0,i.X)(t,this.left,s)-s/2,u=(0,i.X)(t,this.right,a)+a/2,h=f=l):(h=(0,i.X)(t,this.top,s)-s/2,f=(0,i.X)(t,this.bottom,a)+a/2,c=u=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,h),e.lineTo(u,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,n=this._computeLabelArea();n&&(0,i.Y)(e,n);const r=this.getLabelItems(t);for(const t of r){const n=t.options,r=t.font,o=t.label,s=t.textOffset;(0,i.Z)(e,o,0,s,r,n)}n&&(0,i.$)(e)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:r}}=this;if(!n.display)return;const o=(0,i.a0)(n.font),s=(0,i.E)(n.padding),a=n.align;let l=o.lineHeight/2;"bottom"===e||"center"===e||(0,i.i)(e)?(l+=s.bottom,(0,i.b)(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:h,rotation:f}=function(t,e,n,r){const{top:o,left:s,bottom:a,right:l,chart:c}=t,{chartArea:u,scales:h}=c;let f,d,p,g=0;const m=a-o,v=l-s;if(t.isHorizontal()){if(d=(0,i.a2)(r,s,l),(0,i.i)(n)){const t=Object.keys(n)[0],i=n[t];p=h[t].getPixelForValue(i)+m-e}else p="center"===n?(u.bottom+u.top)/2+m-e:vt(t,n,e);f=l-s}else{if((0,i.i)(n)){const t=Object.keys(n)[0],i=n[t];d=h[t].getPixelForValue(i)-v+e}else d="center"===n?(u.left+u.right)/2-v+e:vt(t,n,e);p=(0,i.a2)(r,a,o),g="left"===n?-i.H:i.H}return{titleX:d,titleY:p,maxWidth:f,rotation:g}}(this,l,e,a);(0,i.Z)(t,n.text,0,0,o,{color:n.color,maxWidth:h,rotation:f,textAlign:kt(a,e,r),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=(0,i.v)(t.grid&&t.grid.z,-1),r=(0,i.v)(t.border&&t.border.z,0);return this._isVisible()&&this.draw===St.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let r,o;for(r=0,o=e.length;r<o;++r){const o=e[r];o[n]!==this.id||t&&o.type!==t||i.push(o)}return i}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return(0,i.a0)(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Mt{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(e)&&(n=this.register(e));const r=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in r||(r[o]=t,function(t,e,n){const r=(0,i.a4)(Object.create(null),[n?i.d.get(n):{},i.d.get(e),t.defaults]);i.d.set(e,r),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(n=>{const r=n.split("."),o=r.pop(),s=[t].concat(r).join("."),a=e[n].split("."),l=a.pop(),c=a.join(".");i.d.route(s,o,c,l)})}(e,t.defaultRoutes),t.descriptors&&i.d.describe(e,t.descriptors)}(t,s,n),this.override&&i.d.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,r=this.scope;n in e&&delete e[n],r&&n in i.d[r]&&(delete i.d[r][n],this.override&&delete i.a3[n])}}class Et{constructor(){this.controllers=new Mt(x,"datasets",!0),this.elements=new Mt(gt,"elements"),this.plugins=new Mt(Object,"plugins"),this.scales=new Mt(St,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(e=>{const r=n||this._getRegistryForType(e);n||r.isForType(e)||r===this.plugins&&e.id?this._exec(t,r,e):(0,i.F)(e,e=>{const i=n||this._getRegistryForType(e);this._exec(t,i,e)})})}_exec(t,e,n){const r=(0,i.a5)(t);(0,i.Q)(n["before"+r],[],n),e[t](n),(0,i.Q)(n["after"+r],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const i=e.get(t);if(void 0===i)throw new Error('"'+t+'" is not a registered '+n+".");return i}}var Rt=new Et;class Tt{constructor(){this._init=void 0}notify(t,e,n,i){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const r=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(r,t,e,n);return"afterDestroy"===e&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,e,n,r){r=r||{};for(const o of t){const t=o.plugin,s=t[n],a=[e,r,o.options];if(!1===(0,i.Q)(s,a,t)&&r.cancelable)return!1}return!0}invalidate(){(0,i.k)(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,r=(0,i.v)(n.options&&n.options.plugins,{}),o=function(t){const e={},n=[],i=Object.keys(Rt.plugins.items);for(let t=0;t<i.length;t++)n.push(Rt.getPlugin(i[t]));const r=t.plugins||[];for(let t=0;t<r.length;t++){const i=r[t];-1===n.indexOf(i)&&(n.push(i),e[i.id]=!0)}return{plugins:n,localIds:e}}(n);return!1!==r||e?function(t,{plugins:e,localIds:n},i,r){const o=[],s=t.getContext();for(const a of e){const e=a.id,l=At(i[e],r);null!==l&&o.push({plugin:a,options:Ot(t.config,{plugin:a,local:n[e]},l,s)})}return o}(t,o,r,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,i=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function At(t,e){return e||!1!==t?!0===t?{}:t:null}function Ot(t,{plugin:e,local:n},i,r){const o=t.pluginScopeKeys(e),s=t.getOptionScopes(i,o);return n&&e.defaults&&s.push(e.defaults),t.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ct(t,e){const n=i.d.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function Pt(t){if("x"===t||"y"===t||"r"===t)return t}function It(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function Dt(t,...e){if(Pt(t))return t;for(const n of e){const e=n.axis||It(n.position)||t.length>1&&Pt(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Lt(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function zt(t){const e=t.options||(t.options={});e.plugins=(0,i.v)(e.plugins,{}),e.scales=function(t,e){const n=i.a3[t.type]||{scales:{}},r=e.scales||{},o=Ct(t.type,e),s=Object.create(null);return Object.keys(r).forEach(e=>{const a=r[e];if(!(0,i.i)(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const l=Dt(e,a,function(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(n.length)return Lt(t,"x",n[0])||Lt(t,"y",n[0])}return{}}(e,t),i.d.scales[a.type]),c=function(t,e){return t===e?"_index_":"_value_"}(l,o),u=n.scales||{};s[e]=(0,i.ab)(Object.create(null),[{axis:l},a,u[l],u[c]])}),t.data.datasets.forEach(n=>{const o=n.type||t.type,a=n.indexAxis||Ct(o,e),l=(i.a3[o]||{}).scales||{};Object.keys(l).forEach(t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,a),o=n[e+"AxisID"]||e;s[o]=s[o]||Object.create(null),(0,i.ab)(s[o],[{axis:e},r[o],l[t]])})}),Object.keys(s).forEach(t=>{const e=s[t];(0,i.ab)(e,[i.d.scales[e.type],i.d.scale])}),s}(t,e)}function Nt(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Ft=new Map,jt=new Set;function Ht(t,e){let n=Ft.get(t);return n||(n=e(),Ft.set(t,n),jt.add(n)),n}const Bt=(t,e,n)=>{const r=(0,i.f)(e,n);void 0!==r&&t.add(r)};class Wt{constructor(t){this._config=function(t){return(t=t||{}).data=Nt(t.data),zt(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Nt(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),zt(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ht(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ht(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ht(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return Ht(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return i&&!e||(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:r,type:o}=this,s=this._cachedScopes(t,n),a=s.get(e);if(a)return a;const l=new Set;e.forEach(e=>{t&&(l.add(t),e.forEach(e=>Bt(l,t,e))),e.forEach(t=>Bt(l,r,t)),e.forEach(t=>Bt(l,i.a3[o]||{},t)),e.forEach(t=>Bt(l,i.d,t)),e.forEach(t=>Bt(l,i.a6,t))});const c=Array.from(l);return 0===c.length&&c.push(Object.create(null)),jt.has(e)&&s.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,i.a3[e]||{},i.d.datasets[e]||{},{type:e},i.d,i.a6]}resolveNamedOptions(t,e,n,r=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Vt(this._resolverCache,t,r);let l=s;if(function(t,e){const{isScriptable:n,isIndexable:r}=(0,i.aa)(t);for(const o of e){const e=n(o),s=r(o),a=(s||e)&&t[o];if(e&&((0,i.a7)(a)||$t(a))||s&&(0,i.b)(a))return!0}return!1}(s,e)){o.$shared=!1,n=(0,i.a7)(n)?n():n;const e=this.createResolver(t,n,a);l=(0,i.a8)(s,n,e)}for(const t of e)o[t]=l[t];return o}createResolver(t,e,n=[""],r){const{resolver:o}=Vt(this._resolverCache,t,n);return(0,i.i)(e)?(0,i.a8)(o,e,void 0,r):o}}function Vt(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const o=n.join();let s=r.get(o);return s||(s={resolver:(0,i.a9)(e,n),subPrefixes:n.filter(t=>!t.toLowerCase().includes("hover"))},r.set(o,s)),s}const $t=t=>(0,i.i)(t)&&Object.getOwnPropertyNames(t).some(e=>(0,i.a7)(t[e])),Ut=["top","bottom","left","right","chartArea"];function Qt(t,e){return"top"===t||"bottom"===t||-1===Ut.indexOf(t)&&"x"===e}function Yt(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function qt(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),(0,i.Q)(n&&n.onComplete,[t],e)}function Xt(t){const e=t.chart,n=e.options.animation;(0,i.Q)(n&&n.onProgress,[t],e)}function Zt(t){return(0,i.M)()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Kt={},Gt=t=>{const e=Zt(t);return Object.values(Kt).filter(t=>t.canvas===e).pop()};function Jt(t,e,n){const i=Object.keys(t);for(const r of i){const i=+r;if(i>=e){const o=t[r];delete t[r],(n>0||i>e)&&(t[i+n]=o)}}}class te{static defaults=i.d;static instances=Kt;static overrides=i.a3;static registry=Rt;static version="4.5.1";static getChart=Gt;static register(...t){Rt.add(...t),ee()}static unregister(...t){Rt.remove(...t),ee()}constructor(t,e){const n=this.config=new Wt(e),r=Zt(t),s=Gt(r);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!(0,i.M)()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?J:pt}(r)),this.platform.updateConfig(n);const l=this.platform.acquireContext(r,a.aspectRatio),c=l&&l.canvas,u=c&&c.height,h=c&&c.width;this.id=(0,i.ac)(),this.ctx=l,this.canvas=c,this.width=h,this.height=u,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Tt,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,i.ad)(t=>this.update(t),a.resizeDelay||0),this._dataChanges=[],Kt[this.id]=this,l&&c?(o.listen(this,"complete",qt),o.listen(this,"progress",Xt),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:r,_aspectRatio:o}=this;return(0,i.k)(t)?e&&o?o:r?n/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Rt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,i.ae)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,i.af)(this.canvas,this.ctx),this}stop(){return o.stop(this),this}resize(t,e){o.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,r=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,e,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,(0,i.ae)(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),(0,i.Q)(n.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};(0,i.F)(t,(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,r=Object.keys(n).reduce((t,e)=>(t[e]=!1,t),{});let o=[];e&&(o=o.concat(Object.keys(e).map(t=>{const n=e[t],i=Dt(t,n),r="r"===i,o="x"===i;return{options:n,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}}))),(0,i.F)(o,e=>{const o=e.options,s=o.id,a=Dt(s,o),l=(0,i.v)(o.type,e.dtype);void 0!==o.position&&Qt(o.position,a)===Qt(e.dposition)||(o.position=e.dposition),r[s]=!0;let c=null;s in n&&n[s].type===l?c=n[s]:(c=new(Rt.getScale(l))({id:s,type:l,ctx:this.ctx,chart:this}),n[c.id]=c),c.init(o,t)}),(0,i.F)(r,(t,e)=>{t||delete n[e]}),(0,i.F)(n,t=>{K.configure(this,t,t.options),K.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((t,e)=>t.index-e.index),n>e){for(let t=e;t<n;++t)this._destroyDatasetMeta(t);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(Yt("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,n)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=e.length;n<r;n++){const r=e[n];let o=this.getDatasetMeta(n);const s=r.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=s,o.indexAxis=r.indexAxis||Ct(s,this.options),o.order=r.order||0,o.index=n,o.label=""+r.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const e=Rt.getController(s),{datasetElementType:r,dataElementType:a}=i.d.datasets[s];Object.assign(e,{dataElementType:Rt.getElement(a),datasetElementType:r&&Rt.getElement(r)}),o.controller=new e(this,n),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){(0,i.F)(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),n=!r&&-1===o.indexOf(e);e.buildOrUpdateElements(n),s=Math.max(+e.getMaxOverflow(),s)}s=this._minPadding=n.layout.autoPadding?s:0,this._updateLayout(s),r||(0,i.F)(o,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Yt("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){(0,i.F)(this.scales,t=>{K.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(0,i.ag)(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:r}of e)Jt(t,i,"_removeElements"===n?-r:r)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),r=n(0);for(let t=1;t<e;t++)if(!(0,i.ag)(r,n(t)))return;return Array.from(r).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;K.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],(0,i.F)(this.boxes,t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,(0,i.a7)(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",i)&&(n.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(o.has(this)?this.attached&&!o.running(this)&&o.start(this):(this.draw(),qt({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let i,r;for(i=0,r=e.length;i<r;++i){const r=e[i];t&&!r.visible||n.push(r)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n={meta:t,index:t.index,cancelable:!0},r=(0,i.ah)(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(r&&(0,i.Y)(e,r),t.controller.draw(),r&&(0,i.$)(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return(0,i.C)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){const r=j.modes[e];return"function"==typeof r?r(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter(t=>t&&t._dataset===e).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=(0,i.j)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const r=n?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,r);(0,i.h)(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),s.update(o,{visible:n}),this.update(e=>e.datasetIndex===t?r:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),o.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),(0,i.af)(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Kt[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},r=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};(0,i.F)(this.options.events,t=>n(t,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(n,i)=>{t[n]&&(e.removeEventListener(this,n,i),delete t[n])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{i("attach",s),this.attached=!0,this.resize(),n("resize",r),n("detach",o)};o=()=>{this.attached=!1,i("resize",r),this._stop(),this._resize(0,0),n("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){(0,i.F)(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},(0,i.F)(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+i+"DatasetHoverStyle"]()),s=0,a=t.length;s<a;++s){o=t[s];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map(({datasetIndex:t,index:e})=>{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}});!(0,i.ai)(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,n){const i=this.options.hover,r=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),o=r(e,t),s=n?t:r(t,e);o.length&&this.updateHoverStyle(o,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,i))return;const r=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(r||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:r=[],options:o}=this,s=e,a=this._getActiveElements(t,r,n,s),l=(0,i.aj)(t),c=function(t,e,n,i){return n&&"mouseout"!==t.type?i?e:t:null}(t,this._lastEvent,n,l);n&&(this._lastEvent=null,(0,i.Q)(o.onHover,[t,a,this],this),l&&(0,i.Q)(o.onClick,[t,a,this],this));const u=!(0,i.ai)(a,r);return(u||e)&&(this._active=a,this._updateHoverStyles(a,r,e)),this._lastEvent=c,u}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,i)}}function ee(){return(0,i.F)(te.instances,t=>t._plugins.invalidate())}function ne(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function ie(t,e,n,r,o,s){const{x:a,y:l,startAngle:c,pixelMargin:u,innerRadius:h}=e,f=Math.max(e.outerRadius+r+n-u,0),d=h>0?h+r+n+u:0;let p=0;const g=o-c;if(r){const t=((h>0?h-r:0)+(f>0?f-r:0))/2;p=(g-(0!==t?g*t/(t+r):g))/2}const m=(g-Math.max(.001,g*f-n/i.P)/f)/2,v=c+m+p,y=o-m-p,{outerStart:_,outerEnd:b,innerStart:x,innerEnd:w}=function(t,e,n,r){const o=(s=t.options.borderRadius,(0,i.am)(s,["outerStart","outerEnd","innerStart","innerEnd"]));var s;const a=(n-e)/2,l=Math.min(a,r*e/2),c=t=>{const e=(n-Math.min(a,t))*r/2;return(0,i.S)(t,0,Math.min(a,e))};return{outerStart:c(o.outerStart),outerEnd:c(o.outerEnd),innerStart:(0,i.S)(o.innerStart,0,l),innerEnd:(0,i.S)(o.innerEnd,0,l)}}(e,d,f,y-v),k=f-_,S=f-b,M=v+_/k,E=y-b/S,R=d+x,T=d+w,A=v+x/R,O=y-w/T;if(t.beginPath(),s){const e=(M+E)/2;if(t.arc(a,l,f,M,e),t.arc(a,l,f,e,E),b>0){const e=ne(S,E,a,l);t.arc(e.x,e.y,b,E,y+i.H)}const n=ne(T,y,a,l);if(t.lineTo(n.x,n.y),w>0){const e=ne(T,O,a,l);t.arc(e.x,e.y,w,y+i.H,O+Math.PI)}const r=(y-w/d+(v+x/d))/2;if(t.arc(a,l,d,y-w/d,r,!0),t.arc(a,l,d,r,v+x/d,!0),x>0){const e=ne(R,A,a,l);t.arc(e.x,e.y,x,A+Math.PI,v-i.H)}const o=ne(k,v,a,l);if(t.lineTo(o.x,o.y),_>0){const e=ne(k,M,a,l);t.arc(e.x,e.y,_,v-i.H,M)}}else{t.moveTo(a,l);const e=Math.cos(M)*f+a,n=Math.sin(M)*f+l;t.lineTo(e,n);const i=Math.cos(E)*f+a,r=Math.sin(E)*f+l;t.lineTo(i,r)}t.closePath()}class re extends gt{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,n){const r=this.getProps(["x","y"],n),{angle:o,distance:s}=(0,i.D)(r,{x:t,y:e}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:u,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),f=(this.options.spacing+this.options.borderWidth)/2,d=(0,i.v)(h,l-a),p=(0,i.p)(o,a,l)&&a!==l,g=d>=i.T||p,m=(0,i.ak)(s,c+f,u+f);return g&&m}getCenterPoint(t){const{x:e,y:n,startAngle:i,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:a,spacing:l}=this.options,c=(i+r)/2,u=(o+s+l+a)/2;return{x:e+Math.cos(c)*u,y:n+Math.sin(c)*u}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:n}=this,r=(e.offset||0)/4,o=(e.spacing||0)/2,s=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=n>i.T?Math.floor(n/i.T):0,0===n||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*r,Math.sin(a)*r);const l=r*(1-Math.sin(Math.min(i.P,n||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,n,r,o){const{fullCircles:s,startAngle:a,circumference:l}=e;let c=e.endAngle;if(s){ie(t,e,n,r,c,o);for(let e=0;e<s;++e)t.fill();isNaN(l)||(c=a+(l%i.T||i.T))}ie(t,e,n,r,c,o),t.fill()}(t,this,l,o,s),function(t,e,n,r,o){const{fullCircles:s,startAngle:a,circumference:l,options:c}=e,{borderWidth:u,borderJoinStyle:h,borderDash:f,borderDashOffset:d,borderRadius:p}=c,g="inner"===c.borderAlign;if(!u)return;t.setLineDash(f||[]),t.lineDashOffset=d,g?(t.lineWidth=2*u,t.lineJoin=h||"round"):(t.lineWidth=u,t.lineJoin=h||"bevel");let m=e.endAngle;if(s){ie(t,e,n,r,m,o);for(let e=0;e<s;++e)t.stroke();isNaN(l)||(m=a+(l%i.T||i.T))}g&&function(t,e,n){const{startAngle:r,pixelMargin:o,x:s,y:a,outerRadius:l,innerRadius:c}=e;let u=o/l;t.beginPath(),t.arc(s,a,l,r-u,n+u),c>o?(u=o/c,t.arc(s,a,c,n+u,r-u,!0)):t.arc(s,a,o,n+i.H,r-i.H),t.closePath(),t.clip()}(t,e,m),c.selfJoin&&m-a>=i.P&&0===p&&"miter"!==h&&function(t,e,n){const{startAngle:r,x:o,y:s,outerRadius:a,innerRadius:l,options:c}=e,{borderWidth:u,borderJoinStyle:h}=c,f=Math.min(u/a,(0,i.al)(r-n));if(t.beginPath(),t.arc(o,s,a-u/2,r+f/2,n-f/2),l>0){const e=Math.min(u/l,(0,i.al)(r-n));t.arc(o,s,l+u/2,n-e/2,r+e/2,!0)}else{const e=Math.min(u/2,a*(0,i.al)(r-n));if("round"===h)t.arc(o,s,e,n-i.P/2,r+i.P/2,!0);else if("bevel"===h){const a=2*e*e,l=-a*Math.cos(n+i.P/2)+o,c=-a*Math.sin(n+i.P/2)+s,u=a*Math.cos(r+i.P/2)+o,h=a*Math.sin(r+i.P/2)+s;t.lineTo(l,c),t.lineTo(u,h)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,m),s||(ie(t,e,n,r,m,o),t.stroke())}(t,this,l,o,s),t.restore()}}function oe(t,e,n=e){t.lineCap=(0,i.v)(n.borderCapStyle,e.borderCapStyle),t.setLineDash((0,i.v)(n.borderDash,e.borderDash)),t.lineDashOffset=(0,i.v)(n.borderDashOffset,e.borderDashOffset),t.lineJoin=(0,i.v)(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=(0,i.v)(n.borderWidth,e.borderWidth),t.strokeStyle=(0,i.v)(n.borderColor,e.borderColor)}function se(t,e,n){t.lineTo(n.x,n.y)}function ae(t,e,n={}){const i=t.length,{start:r=0,end:o=i-1}=n,{start:s,end:a}=e,l=Math.max(r,s),c=Math.min(o,a),u=r<s&&o<s||r>a&&o>a;return{count:i,start:l,loop:e.loop,ilen:c<l&&!u?i+c-l:c-l}}function le(t,e,n,r){const{points:o,options:s}=e,{count:a,start:l,loop:c,ilen:u}=ae(o,n,r),h=function(t){return t.stepped?i.at:t.tension||"monotone"===t.cubicInterpolationMode?i.au:se}(s);let f,d,p,{move:g=!0,reverse:m}=r||{};for(f=0;f<=u;++f)d=o[(l+(m?u-f:f))%a],d.skip||(g?(t.moveTo(d.x,d.y),g=!1):h(t,p,d,m,s.stepped),p=d);return c&&(d=o[(l+(m?u:0))%a],h(t,p,d,m,s.stepped)),!!c}function ce(t,e,n,i){const r=e.points,{count:o,start:s,ilen:a}=ae(r,n,i),{move:l=!0,reverse:c}=i||{};let u,h,f,d,p,g,m=0,v=0;const y=t=>(s+(c?a-t:t))%o,_=()=>{d!==p&&(t.lineTo(m,p),t.lineTo(m,d),t.lineTo(m,g))};for(l&&(h=r[y(0)],t.moveTo(h.x,h.y)),u=0;u<=a;++u){if(h=r[y(u)],h.skip)continue;const e=h.x,n=h.y,i=0|e;i===f?(n<d?d=n:n>p&&(p=n),m=(v*m+e)/++v):(_(),t.lineTo(e,n),f=i,v=0,d=p=n),g=n}_()}function ue(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||n?le:ce}const he="function"==typeof Path2D;class fe extends gt{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;(0,i.an)(this._points,n,t,r,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=(0,i.ao)(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,r=t[e],o=this.points,s=(0,i.ap)(this,{property:e,start:r,end:r});if(!s.length)return;const a=[],l=function(t){return t.stepped?i.aq:t.tension||"monotone"===t.cubicInterpolationMode?i.ar:i.as}(n);let c,u;for(c=0,u=s.length;c<u;++c){const{start:i,end:u}=s[c],h=o[i],f=o[u];if(h===f){a.push(h);continue}const d=l(h,f,Math.abs((r-h[e])/(f[e]-h[e])),n.stepped);d[e]=t[e],a.push(d)}return 1===a.length?a[0]:a}pathSegment(t,e,n){return ue(this)(t,this,e,n)}path(t,e,n){const i=this.segments,r=ue(this);let o=this._loop;e=e||0,n=n||this.points.length-e;for(const s of i)o&=r(t,this,s,{start:e,end:e+n-1});return!!o}draw(t,e,n,i){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),function(t,e,n,i){he&&!e.options.segment?function(t,e,n,i){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,i)&&r.closePath()),oe(t,e.options),t.stroke(r)}(t,e,n,i):function(t,e,n,i){const{segments:r,options:o}=e,s=ue(e);for(const a of r)oe(t,o,a.style),t.beginPath(),s(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}(t,e,n,i)}(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function de(t,e,n,i){const r=t.options,{[n]:o}=t.getProps([n],i);return Math.abs(e-o)<r.radius+r.hitRadius}class pe extends gt{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.options,{x:r,y:o}=this.getProps(["x","y"],n);return Math.pow(t-r,2)+Math.pow(e-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,e){return de(this,t,"x",e)}inYRange(t,e){return de(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const n=this.options;this.skip||n.radius<.1||!(0,i.C)(this,e,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,(0,i.av)(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function ge(t,e){const{x:n,y:i,base:r,width:o,height:s}=t.getProps(["x","y","base","width","height"],e);let a,l,c,u,h;return t.horizontal?(h=s/2,a=Math.min(n,r),l=Math.max(n,r),c=i-h,u=i+h):(h=o/2,a=n-h,l=n+h,c=Math.min(i,r),u=Math.max(i,r)),{left:a,top:c,right:l,bottom:u}}function me(t,e,n,r){return t?0:(0,i.S)(e,n,r)}function ve(t,e,n,r){const o=null===e,s=null===n,a=t&&!(o&&s)&&ge(t,r);return a&&(o||(0,i.ak)(e,a.left,a.right))&&(s||(0,i.ak)(n,a.top,a.bottom))}function ye(t,e){t.rect(e.x,e.y,e.w,e.h)}function _e(t,e,n={}){const i=t.x!==n.x?-e:0,r=t.y!==n.y?-e:0,o=(t.x+t.w!==n.x+n.w?e:0)-i,s=(t.y+t.h!==n.y+n.h?e:0)-r;return{x:t.x+i,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}class be extends gt{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:r}}=this,{inner:o,outer:s}=function(t){const e=ge(t),n=e.right-e.left,r=e.bottom-e.top,o=function(t,e,n){const r=t.options.borderWidth,o=t.borderSkipped,s=(0,i.ax)(r);return{t:me(o.top,s.top,0,n),r:me(o.right,s.right,0,e),b:me(o.bottom,s.bottom,0,n),l:me(o.left,s.left,0,e)}}(t,n/2,r/2),s=function(t,e,n){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,s=(0,i.ay)(o),a=Math.min(e,n),l=t.borderSkipped,c=r||(0,i.i)(o);return{topLeft:me(!c||l.top||l.left,s.topLeft,0,a),topRight:me(!c||l.top||l.right,s.topRight,0,a),bottomLeft:me(!c||l.bottom||l.left,s.bottomLeft,0,a),bottomRight:me(!c||l.bottom||l.right,s.bottomRight,0,a)}}(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}(this),a=(l=s.radius).topLeft||l.topRight||l.bottomLeft||l.bottomRight?i.aw:ye;var l;t.save(),s.w===o.w&&s.h===o.h||(t.beginPath(),a(t,_e(s,e,o)),t.clip(),a(t,_e(o,-e,s)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),a(t,_e(o,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,n){return ve(this,t,e,n)}inXRange(t,e){return ve(this,t,null,e)}inYRange(t,e){return ve(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:i,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+i)/2:e,y:r?n:(n+i)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}const xe=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}};class we extends gt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=(0,i.Q)(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,n)=>t.sort(e,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const n=t.labels,r=(0,i.a0)(n.font),o=r.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=xe(n,o);let c,u;e.font=r.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(s,r,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,i){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=i+s;let u=t;r.textAlign="left",r.textBaseline="middle";let h=-1,f=-c;return this.legendItems.forEach((t,d)=>{const p=n+e/2+r.measureText(t.text).width;(0===d||l[l.length-1]+p+2*s>o)&&(u+=c,l[l.length-(d>0?0:1)]=0,f+=c,h++),a[d]={left:0,top:f,row:h,width:p,height:i},l[l.length-1]+=p+s}),u}_fitCols(t,e,n,i){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let u=s,h=0,f=0,d=0,p=0;return this.legendItems.forEach((t,o)=>{const{itemWidth:g,itemHeight:m}=function(t,e,n,i,r){const o=function(t,e,n,i){let r=t.text;return r&&"string"!=typeof r&&(r=r.reduce((t,e)=>t.length>e.length?t:e)),e+n.size/2+i.measureText(r).width}(i,t,e,n),s=function(t,e,n){let i=t;return"string"!=typeof e.text&&(i=ke(e,n)),i}(r,i,e.lineHeight);return{itemWidth:o,itemHeight:s}}(n,e,r,t,i);o>0&&f+m+2*s>c&&(u+=h+s,l.push({width:h,height:f}),d+=h+s,p++,h=f=0),a[o]={left:d,top:f,col:p,width:g,height:m},h=Math.max(h,g),f+=m+s}),u+=h,l.push({width:h,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:r},rtl:o}}=this,s=(0,i.aA)(o,this.left,this.width);if(this.isHorizontal()){let o=0,a=(0,i.a2)(n,this.left+r,this.right-this.lineWidths[o]);for(const l of e)o!==l.row&&(o=l.row,a=(0,i.a2)(n,this.left+r,this.right-this.lineWidths[o])),l.top+=this.top+t+r,l.left=s.leftForLtr(s.x(a),l.width),a+=l.width+r}else{let o=0,a=(0,i.a2)(n,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const l of e)l.col!==o&&(o=l.col,a=(0,i.a2)(n,this.top+t+r,this.bottom-this.columnSizes[o].height)),l.top=a,l.left+=this.left+r,l.left=s.leftForLtr(s.x(l.left),l.width),a+=l.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;(0,i.Y)(t,this),this._draw(),(0,i.$)(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:r}=this,{align:o,labels:s}=t,a=i.d.color,l=(0,i.aA)(t.rtl,this.left,this.width),c=(0,i.a0)(s.font),{padding:u}=s,h=c.size,f=h/2;let d;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=xe(s,h),v=this.isHorizontal(),y=this._computeTitleHeight();d=v?{x:(0,i.a2)(o,this.left+u,this.right-n[0]),y:this.top+u+y,line:0}:{x:this.left+u,y:(0,i.a2)(o,this.top+y+u,this.bottom-e[0].height),line:0},(0,i.aB)(this.ctx,t.textDirection);const _=m+u;this.legendItems.forEach((b,x)=>{r.strokeStyle=b.fontColor,r.fillStyle=b.fontColor;const w=r.measureText(b.text).width,k=l.textAlign(b.textAlign||(b.textAlign=s.textAlign)),S=p+f+w;let M=d.x,E=d.y;if(l.setWidth(this.width),v?x>0&&M+S+u>this.right&&(E=d.y+=_,d.line++,M=d.x=(0,i.a2)(o,this.left+u,this.right-n[d.line])):x>0&&E+_>this.bottom&&(M=d.x=M+e[d.line].width+u,d.line++,E=d.y=(0,i.a2)(o,this.top+y+u,this.bottom-e[d.line].height)),function(t,e,n){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;r.save();const o=(0,i.v)(n.lineWidth,1);if(r.fillStyle=(0,i.v)(n.fillStyle,a),r.lineCap=(0,i.v)(n.lineCap,"butt"),r.lineDashOffset=(0,i.v)(n.lineDashOffset,0),r.lineJoin=(0,i.v)(n.lineJoin,"miter"),r.lineWidth=o,r.strokeStyle=(0,i.v)(n.strokeStyle,a),r.setLineDash((0,i.v)(n.lineDash,[])),s.usePointStyle){const a={radius:g*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:o},c=l.xPlus(t,p/2),u=e+f;(0,i.aE)(r,a,c,u,s.pointStyleWidth&&p)}else{const s=e+Math.max((h-g)/2,0),a=l.leftForLtr(t,p),c=(0,i.ay)(n.borderRadius);r.beginPath(),Object.values(c).some(t=>0!==t)?(0,i.aw)(r,{x:a,y:s,w:p,h:g,radius:c}):r.rect(a,s,p,g),r.fill(),0!==o&&r.stroke()}r.restore()}(l.x(M),E,b),M=(0,i.aC)(k,M+p+f,v?M+S:this.right,t.rtl),function(t,e,n){(0,i.Z)(r,n.text,t,e+m/2,c,{strikethrough:n.hidden,textAlign:l.textAlign(n.textAlign)})}(l.x(M),E,b),v)d.x+=S+u;else if("string"!=typeof b.text){const t=c.lineHeight;d.y+=ke(b,t)+u}else d.y+=_}),(0,i.aD)(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=(0,i.a0)(e.font),r=(0,i.E)(e.padding);if(!e.display)return;const o=(0,i.aA)(t.rtl,this.left,this.width),s=this.ctx,a=e.position,l=n.size/2,c=r.top+l;let u,h=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,h=(0,i.a2)(t.align,h,this.right-f);else{const e=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);u=c+(0,i.a2)(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=(0,i.a2)(a,h,h+f);s.textAlign=o.textAlign((0,i.a1)(a)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=n.string,(0,i.Z)(s,e.text,d,u,n)}_computeTitleHeight(){const t=this.options.title,e=(0,i.a0)(t.font),n=(0,i.E)(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,r,o;if((0,i.ak)(t,this.left,this.right)&&(0,i.ak)(e,this.top,this.bottom))for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(r=o[n],(0,i.ak)(t,r.left,r.left+r.width)&&(0,i.ak)(e,r.top,r.top+r.height))return this.legendItems[n];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const s=this._hoveredItem,a=(o=n,null!==(r=s)&&null!==o&&r.datasetIndex===o.datasetIndex&&r.index===o.index);s&&!a&&(0,i.Q)(e.onLeave,[t,s,this],this),this._hoveredItem=n,n&&!a&&(0,i.Q)(e.onHover,[t,n,this],this)}else n&&(0,i.Q)(e.onClick,[t,n,this],this);var r,o}}function ke(t,e){return e*(t.text?t.text.length:0)}var Se={id:"legend",_element:we,start(t,e,n){const i=t.legend=new we({ctx:t.ctx,options:n,chart:t});K.configure(t,i,n),K.addBox(t,i)},stop(t){K.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;K.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),e.hidden=!0):(r.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:o,color:s,useBorderRadius:a,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{const c=t.controller.getStyle(n?0:void 0),u=(0,i.E)(c.borderWidth);return{text:e[t.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:o||c.textAlign,borderRadius:a&&(l||c.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Me extends gt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const r=(0,i.b)(n.text)?n.text.length:1;this._padding=(0,i.E)(n.padding);const o=r*(0,i.a0)(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:n,bottom:r,right:o,options:s}=this,a=s.align;let l,c,u,h=0;return this.isHorizontal()?(c=(0,i.a2)(a,n,o),u=e+t,l=o-n):("left"===s.position?(c=n+t,u=(0,i.a2)(a,r,e),h=-.5*i.P):(c=o-t,u=(0,i.a2)(a,e,r),h=.5*i.P),l=r-e),{titleX:c,titleY:u,maxWidth:l,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=(0,i.a0)(e.font),r=n.lineHeight/2+this._padding.top,{titleX:o,titleY:s,maxWidth:a,rotation:l}=this._drawArgs(r);(0,i.Z)(t,e.text,0,0,n,{color:e.color,maxWidth:a,rotation:l,textAlign:(0,i.a1)(e.align),textBaseline:"middle",translation:[o,s]})}}var Ee={id:"title",_element:Me,start(t,e,n){!function(t,e){const n=new Me({ctx:t.ctx,options:e,chart:t});K.configure(t,n,e),K.addBox(t,n),t.titleBlock=n}(t,n)},stop(t){const e=t.titleBlock;K.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;K.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Re=new WeakMap;var Te={id:"subtitle",start(t,e,n){const i=new Me({ctx:t.ctx,options:n,chart:t});K.configure(t,i,n),K.addBox(t,i),Re.set(t,i)},stop(t){K.removeBox(t,Re.get(t)),Re.delete(t)},beforeUpdate(t,e,n){const i=Re.get(t);K.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ae={average(t){if(!t.length)return!1;let e,n,i=new Set,r=0,o=0;for(e=0,n=t.length;e<n;++e){const n=t[e].element;if(n&&n.hasValue()){const t=n.tooltipPosition();i.add(t.x),r+=t.y,++o}}return 0!==o&&0!==i.size&&{x:[...i].reduce((t,e)=>t+e)/i.size,y:r/o}},nearest(t,e){if(!t.length)return!1;let n,r,o,s=e.x,a=e.y,l=Number.POSITIVE_INFINITY;for(n=0,r=t.length;n<r;++n){const r=t[n].element;if(r&&r.hasValue()){const t=r.getCenterPoint(),n=(0,i.aF)(e,t);n<l&&(l=n,o=r)}}if(o){const t=o.tooltipPosition();s=t.x,a=t.y}return{x:s,y:a}}};function Oe(t,e){return e&&((0,i.b)(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ce(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Pe(t,e){const{element:n,datasetIndex:i,index:r}=e,o=t.getDatasetMeta(i).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[i].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function Ie(t,e){const n=t.chart.ctx,{body:r,footer:o,title:s}=t,{boxWidth:a,boxHeight:l}=e,c=(0,i.a0)(e.bodyFont),u=(0,i.a0)(e.titleFont),h=(0,i.a0)(e.footerFont),f=s.length,d=o.length,p=r.length,g=(0,i.E)(e.padding);let m=g.height,v=0,y=r.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);y+=t.beforeBody.length+t.afterBody.length,f&&(m+=f*u.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),y&&(m+=p*(e.displayColors?Math.max(l,c.lineHeight):c.lineHeight)+(y-p)*c.lineHeight+(y-1)*e.bodySpacing),d&&(m+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let _=0;const b=function(t){v=Math.max(v,n.measureText(t).width+_)};return n.save(),n.font=u.string,(0,i.F)(t.title,b),n.font=c.string,(0,i.F)(t.beforeBody.concat(t.afterBody),b),_=e.displayColors?a+2+e.boxPadding:0,(0,i.F)(r,t=>{(0,i.F)(t.before,b),(0,i.F)(t.lines,b),(0,i.F)(t.after,b)}),_=0,n.font=h.string,(0,i.F)(t.footer,b),n.restore(),v+=g.width,{width:v,height:m}}function De(t,e,n,i){const{x:r,width:o}=n,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===i?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,n,i){const{x:r,width:o}=i,s=n.caretSize+n.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,n)&&(c="center"),c}function Le(t,e,n){const i=n.yAlign||e.yAlign||function(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||De(t,e,n,i),yAlign:i}}function ze(t,e,n,r){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:l,yAlign:c}=n,u=o+s,{topLeft:h,topRight:f,bottomLeft:d,bottomRight:p}=(0,i.ay)(a);let g=function(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}(e,l);const m=function(t,e,n){let{y:i,height:r}=t;return"top"===e?i+=n:i-="bottom"===e?r+n:r/2,i}(e,c,u);return"center"===c?"left"===l?g+=u:"right"===l&&(g-=u):"left"===l?g-=Math.max(h,d)+o:"right"===l&&(g+=Math.max(f,p)+o),{x:(0,i.S)(g,0,r.width-e.width),y:(0,i.S)(m,0,r.height-e.height)}}function Ne(t,e,n){const r=(0,i.E)(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-r.right:t.x+r.left}function Fe(t){return Oe([],Ce(t))}function je(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const He={beforeTitle:i.aG,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:i.aG,beforeBody:i.aG,beforeLabel:i.aG,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return(0,i.k)(n)||(e+=n),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:i.aG,afterBody:i.aG,beforeFooter:i.aG,footer:i.aG,afterFooter:i.aG};function Be(t,e,n,i){const r=t[e].call(n,i);return void 0===r?He[e].call(n,i):r}class We extends gt{static positioners=Ae;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&e.options.animation&&n.animations,r=new c(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this._tooltipItems,(0,i.j)(t,{tooltip:this,tooltipItems:e,type:"tooltip"})));var t,e}getTitle(t,e){const{callbacks:n}=e,i=Be(n,"beforeTitle",this,t),r=Be(n,"title",this,t),o=Be(n,"afterTitle",this,t);let s=[];return s=Oe(s,Ce(i)),s=Oe(s,Ce(r)),s=Oe(s,Ce(o)),s}getBeforeBody(t,e){return Fe(Be(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,r=[];return(0,i.F)(t,t=>{const e={before:[],lines:[],after:[]},i=je(n,t);Oe(e.before,Ce(Be(i,"beforeLabel",this,t))),Oe(e.lines,Be(i,"label",this,t)),Oe(e.after,Ce(Be(i,"afterLabel",this,t))),r.push(e)}),r}getAfterBody(t,e){return Fe(Be(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,i=Be(n,"beforeFooter",this,t),r=Be(n,"footer",this,t),o=Be(n,"afterFooter",this,t);let s=[];return s=Oe(s,Ce(i)),s=Oe(s,Ce(r)),s=Oe(s,Ce(o)),s}_createItems(t){const e=this._active,n=this.chart.data,r=[],o=[],s=[];let a,l,c=[];for(a=0,l=e.length;a<l;++a)c.push(Pe(this.chart,e[a]));return t.filter&&(c=c.filter((e,i,r)=>t.filter(e,i,r,n))),t.itemSort&&(c=c.sort((e,i)=>t.itemSort(e,i,n))),(0,i.F)(c,e=>{const n=je(t.callbacks,e);r.push(Be(n,"labelColor",this,e)),o.push(Be(n,"labelPointStyle",this,e)),s.push(Be(n,"labelTextColor",this,e))}),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=c,c}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let r,o=[];if(i.length){const t=Ae[n.position].call(this,i,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const e=this._size=Ie(this,n),s=Object.assign({},t,e),a=Le(this.chart,n,s),l=ze(n,s,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const r=this.getCaretPosition(t,n,i);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,n){const{xAlign:r,yAlign:o}=this,{caretSize:s,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:h}=(0,i.ay)(a),{x:f,y:d}=t,{width:p,height:g}=e;let m,v,y,_,b,x;return"center"===o?(b=d+g/2,"left"===r?(m=f,v=m-s,_=b+s,x=b-s):(m=f+p,v=m+s,_=b-s,x=b+s),y=m):(v="left"===r?f+Math.max(l,u)+s:"right"===r?f+p-Math.max(c,h)-s:this.caretX,"top"===o?(_=d,b=_-s,m=v-s,y=v+s):(_=d+g,b=_+s,m=v+s,y=v-s),x=_),{x1:m,x2:v,x3:y,y1:_,y2:b,y3:x}}drawTitle(t,e,n){const r=this.title,o=r.length;let s,a,l;if(o){const c=(0,i.aA)(n.rtl,this.x,this.width);for(t.x=Ne(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",s=(0,i.a0)(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=s.string,l=0;l<o;++l)e.fillText(r[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,l+1===o&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,e,n,r,o){const s=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=o,u=(0,i.a0)(o.bodyFont),h=Ne(this,"left",o),f=r.x(h),d=l<u.lineHeight?(u.lineHeight-l)/2:0,p=e.y+d;if(o.usePointStyle){const e={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},n=r.leftForLtr(f,c)+c/2,u=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,(0,i.av)(t,e,n,u),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,(0,i.av)(t,e,n,u)}else{t.lineWidth=(0,i.i)(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const e=r.leftForLtr(f,c),n=r.leftForLtr(r.xPlus(f,1),c-2),a=(0,i.ay)(s.borderRadius);Object.values(a).some(t=>0!==t)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,(0,i.aw)(t,{x:e,y:p,w:c,h:l,radius:a}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),(0,i.aw)(t,{x:n,y:p+1,w:c-2,h:l-2,radius:a}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,p,c,l),t.strokeRect(e,p,c,l),t.fillStyle=s.backgroundColor,t.fillRect(n,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:r}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=n,h=(0,i.a0)(n.bodyFont);let f=h.lineHeight,d=0;const p=(0,i.aA)(n.rtl,this.x,this.width),g=function(n){e.fillText(n,p.x(t.x+d),t.y+f/2),t.y+=f+o},m=p.textAlign(s);let v,y,_,b,x,w,k;for(e.textAlign=s,e.textBaseline="middle",e.font=h.string,t.x=Ne(this,m,n),e.fillStyle=n.bodyColor,(0,i.F)(this.beforeBody,g),d=a&&"right"!==m?"center"===s?c/2+u:c+2+u:0,b=0,w=r.length;b<w;++b){for(v=r[b],y=this.labelTextColors[b],e.fillStyle=y,(0,i.F)(v.before,g),_=v.lines,a&&_.length&&(this._drawColorBox(e,t,b,p,n),f=Math.max(h.lineHeight,l)),x=0,k=_.length;x<k;++x)g(_[x]),f=h.lineHeight;(0,i.F)(v.after,g)}d=0,f=h.lineHeight,(0,i.F)(this.afterBody,g),t.y-=o}drawFooter(t,e,n){const r=this.footer,o=r.length;let s,a;if(o){const l=(0,i.aA)(n.rtl,this.x,this.width);for(t.x=Ne(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=l.textAlign(n.footerAlign),e.textBaseline="middle",s=(0,i.a0)(n.footerFont),e.fillStyle=n.footerColor,e.font=s.string,a=0;a<o;++a)e.fillText(r[a],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+n.footerSpacing}}drawBackground(t,e,n,r){const{xAlign:o,yAlign:s}=this,{x:a,y:l}=t,{width:c,height:u}=n,{topLeft:h,topRight:f,bottomLeft:d,bottomRight:p}=(0,i.ay)(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(a+h,l),"top"===s&&this.drawCaret(t,e,n,r),e.lineTo(a+c-f,l),e.quadraticCurveTo(a+c,l,a+c,l+f),"center"===s&&"right"===o&&this.drawCaret(t,e,n,r),e.lineTo(a+c,l+u-p),e.quadraticCurveTo(a+c,l+u,a+c-p,l+u),"bottom"===s&&this.drawCaret(t,e,n,r),e.lineTo(a+d,l+u),e.quadraticCurveTo(a,l+u,a,l+u-d),"center"===s&&"left"===o&&this.drawCaret(t,e,n,r),e.lineTo(a,l+h),e.quadraticCurveTo(a,l,a+h,l),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,r=n&&n.y;if(i||r){const n=Ae[t.position].call(this,this._active,this._eventPosition);if(!n)return;const o=this._size=Ie(this,t),s=Object.assign({},n,this._size),a=Le(e,t,s),l=ze(t,s,a,e);i._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const s=(0,i.E)(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,r,e),(0,i.aB)(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),(0,i.aD)(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,r=t.map(({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}),o=!(0,i.ai)(n,r),s=this._positionChanged(r,e);(o||s)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],s=this._getActiveElements(t,o,e,n),a=this._positionChanged(s,t),l=e||!(0,i.ai)(s,o)||a;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,i){const r=this.options;if("mouseout"===t.type)return[];if(!i)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));const o=this.chart.getElementsAtEventForMode(t,r.mode,r,n);return r.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:n,caretY:i,options:r}=this,o=Ae[r.position].call(this,t,e);return!1!==o&&(n!==o.x||i!==o.y)}}var Ve={id:"tooltip",_element:We,positioners:Ae,afterInit(t,e,n){n&&(t.tooltip=new We({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:He},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function $e(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ue extends St{static id="category";static defaults={ticks:{callback:$e}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:n,label:i}of e)t[n]===i&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if((0,i.k)(t))return null;const n=this.getLabels();return((t,e)=>null===t?null:(0,i.S)(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:function(t,e,n,i){const r=t.indexOf(e);return-1===r?((t,e,n,i)=>("string"==typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n))(t,e,n,i):r!==t.lastIndexOf(e)?n:r}(n,t,(0,i.v)(e,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,i=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=t;n<=e;n++)i.push({value:n});return i}getLabelForValue(t){return $e.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Qe(t,e,{horizontal:n,minRotation:r}){const o=(0,i.t)(r),s=(n?Math.sin(o):Math.cos(o))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}class Ye extends St{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return(0,i.k)(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:o}=this;const s=t=>r=e?r:t,a=t=>o=n?o:t;if(t){const t=(0,i.s)(r),e=(0,i.s)(o);t<0&&e<0?a(0):t>0&&e>0&&s(0)}if(r===o){let e=0===o?1:Math.abs(.05*o);a(o+e),t||s(r-e)}this.min=r,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=function(t,e){const n=[],{bounds:r,step:o,min:s,max:a,precision:l,count:c,maxTicks:u,maxDigits:h,includeBounds:f}=t,d=o||1,p=u-1,{min:g,max:m}=e,v=!(0,i.k)(s),y=!(0,i.k)(a),_=!(0,i.k)(c),b=(m-g)/(h+1);let x,w,k,S,M=(0,i.aI)((m-g)/p/d)*d;if(M<1e-14&&!v&&!y)return[{value:g},{value:m}];S=Math.ceil(m/M)-Math.floor(g/M),S>p&&(M=(0,i.aI)(S*M/p/d)*d),(0,i.k)(l)||(x=Math.pow(10,l),M=Math.ceil(M*x)/x),"ticks"===r?(w=Math.floor(g/M)*M,k=Math.ceil(m/M)*M):(w=g,k=m),v&&y&&o&&(0,i.aJ)((a-s)/o,M/1e3)?(S=Math.round(Math.min((a-s)/M,u)),M=(a-s)/S,w=s,k=a):_?(w=v?s:w,k=y?a:k,S=c-1,M=(k-w)/S):(S=(k-w)/M,S=(0,i.aK)(S,Math.round(S),M/1e3)?Math.round(S):Math.ceil(S));const E=Math.max((0,i.aL)(M),(0,i.aL)(w));x=Math.pow(10,(0,i.k)(l)?E:l),w=Math.round(w*x)/x,k=Math.round(k*x)/x;let R=0;for(v&&(f&&w!==s?(n.push({value:s}),w<s&&R++,(0,i.aK)(Math.round((w+R*M)*x)/x,s,Qe(s,b,t))&&R++):w<s&&R++);R<S;++R){const t=Math.round((w+R*M)*x)/x;if(y&&t>a)break;n.push({value:t})}return y&&f&&k!==a?n.length&&(0,i.aK)(n[n.length-1].value,a,Qe(a,b,t))?n[n.length-1].value=a:n.push({value:a}):y&&k!==a||n.push({value:k}),n}({maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&(0,i.aH)(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return(0,i.o)(t,this.chart.options.locale,this.options.ticks.format)}}class qe extends Ye{static id="linear";static defaults={ticks:{callback:i.aM.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=(0,i.g)(t)?t:0,this.max=(0,i.g)(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=(0,i.t)(this.options.ticks.minRotation),r=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/r))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Xe=t=>Math.floor((0,i.aN)(t)),Ze=(t,e)=>Math.pow(10,Xe(t)+e);function Ke(t){return 1===t/Math.pow(10,Xe(t))}function Ge(t,e,n){const i=Math.pow(10,n),r=Math.floor(t/i);return Math.ceil(e/i)-r}class Je extends St{static id="logarithmic";static defaults={ticks:{callback:i.aM.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=Ye.prototype.parse.apply(this,[t,e]);if(0!==n)return(0,i.g)(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=(0,i.g)(t)?Math.max(0,t):null,this.max=(0,i.g)(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!(0,i.g)(this._userMin)&&(this.min=t===Ze(this.min,0)?Ze(this.min,-1):Ze(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,i=this.max;const r=e=>n=t?n:e,o=t=>i=e?i:t;n===i&&(n<=0?(r(1),o(10)):(r(Ze(n,-1)),o(Ze(i,1)))),n<=0&&r(Ze(i,-1)),i<=0&&o(Ze(n,1)),this.min=n,this.max=i}buildTicks(){const t=this.options,e=function(t,{min:e,max:n}){e=(0,i.O)(t.min,e);const r=[],o=Xe(e);let s=function(t,e){let n=Xe(e-t);for(;Ge(t,e,n)>10;)n++;for(;Ge(t,e,n)<10;)n--;return Math.min(n,Xe(t))}(e,n),a=s<0?Math.pow(10,Math.abs(s)):1;const l=Math.pow(10,s),c=o>s?Math.pow(10,o):0,u=Math.round((e-c)*a)/a,h=Math.floor((e-c)/l/10)*l*10;let f=Math.floor((u-h)/Math.pow(10,s)),d=(0,i.O)(t.min,Math.round((c+h+f*Math.pow(10,s))*a)/a);for(;d<n;)r.push({value:d,major:Ke(d),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(s++,f=2,a=s>=0?1:a),d=Math.round((c+h+f*Math.pow(10,s))*a)/a;const p=(0,i.O)(t.max,d);return r.push({value:p,major:Ke(p),significand:f}),r}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&(0,i.aH)(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":(0,i.o)(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=(0,i.aN)(t),this._valueRange=(0,i.aN)(this.max)-(0,i.aN)(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:((0,i.aN)(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}i.aM.formatters.numeric},9311(t,e,n){"use strict";function i(t){return t+.5|0}n.d(e,{$:()=>xe,A:()=>Dt,B:()=>It,C:()=>_e,D:()=>St,E:()=>Le,F:()=>$,G:()=>gn,H:()=>ut,I:()=>ln,J:()=>yn,K:()=>vn,L:()=>Bt,M:()=>an,N:()=>vt,O:()=>j,P:()=>ot,Q:()=>V,R:()=>Fe,S:()=>At,T:()=>st,U:()=>wt,V:()=>de,W:()=>Ot,X:()=>ge,Y:()=>be,Z:()=>Ee,_:()=>jt,a:()=>Ne,a0:()=>ze,a1:()=>Vt,a2:()=>$t,a3:()=>ae,a4:()=>X,a5:()=>tt,a6:()=>le,a7:()=>nt,a8:()=>Be,a9:()=>He,aA:()=>wn,aB:()=>kn,aC:()=>Ut,aD:()=>Sn,aE:()=>ye,aF:()=>Mt,aG:()=>I,aH:()=>bt,aI:()=>mt,aJ:()=>_t,aK:()=>gt,aL:()=>kt,aM:()=>se,aN:()=>dt,aO:()=>pe,aP:()=>Lt,aQ:()=>Pt,aa:()=>We,ab:()=>Z,ac:()=>D,ad:()=>Wt,ae:()=>mn,af:()=>me,ag:()=>it,ah:()=>Dn,ai:()=>U,aj:()=>rt,ak:()=>Ct,al:()=>Rt,am:()=>Pe,an:()=>sn,ao:()=>An,ap:()=>Tn,aq:()=>bn,ar:()=>xn,as:()=>_n,at:()=>we,au:()=>ke,av:()=>ve,aw:()=>Re,ax:()=>Ie,ay:()=>De,b:()=>z,c:()=>Jt,d:()=>fe,e:()=>Kt,f:()=>J,g:()=>F,h:()=>et,i:()=>N,j:()=>je,k:()=>L,l:()=>Nt,m:()=>B,n:()=>W,o:()=>re,p:()=>Tt,q:()=>Qt,r:()=>Ht,s:()=>pt,t:()=>xt,u:()=>Ft,v:()=>H,w:()=>Yt,x:()=>yt,y:()=>Je,z:()=>dn});const r=(t,e,n)=>Math.max(Math.min(t,n),e);function o(t){return r(i(2.55*t),0,255)}function s(t){return r(i(255*t),0,255)}function a(t){return r(i(t/2.55)/100,0,1)}function l(t){return r(i(100*t),0,100)}const c={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},u=[..."0123456789ABCDEF"],h=t=>u[15&t],f=t=>u[(240&t)>>4]+u[15&t],d=t=>(240&t)>>4==(15&t);const p=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function g(t,e,n){const i=e*Math.min(n,1-n),r=(e,r=(e+t/30)%12)=>n-i*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function m(t,e,n){const i=(i,r=(i+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function v(t,e,n){const i=g(t,1,.5);let r;for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)i[r]*=1-e-n,i[r]+=e;return i}function y(t){const e=t.r/255,n=t.g/255,i=t.b/255,r=Math.max(e,n,i),o=Math.min(e,n,i),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=function(t,e,n,i,r){return t===r?(e-n)/i+(e<n?6:0):e===r?(n-t)/i+2:(t-e)/i+4}(e,n,i,c,r),a=60*a+.5),[0|a,l||0,s]}function _(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(s)}function b(t,e,n){return _(g,t,e,n)}function x(t){return(t%360+360)%360}const w={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},k={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let S;const M=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,E=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,R=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function T(t,e,n){if(t){let i=y(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=b(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function A(t,e){return t?Object.assign(e||{},t):t}function O(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=s(t[3]))):(e=A(t,{r:0,g:0,b:0,a:1})).a=s(e.a),e}function C(t){return"r"===t.charAt(0)?function(t){const e=M.exec(t);let n,i,s,a=255;if(e){if(e[7]!==n){const t=+e[7];a=e[8]?o(t):r(255*t,0,255)}return n=+e[1],i=+e[3],s=+e[5],n=255&(e[2]?o(n):r(n,0,255)),i=255&(e[4]?o(i):r(i,0,255)),s=255&(e[6]?o(s):r(s,0,255)),{r:n,g:i,b:s,a}}}(t):function(t){const e=p.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?o(+e[5]):s(+e[5]));const r=x(+e[2]),a=+e[3]/100,l=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return _(v,t,e,n)}(r,a,l):"hsv"===e[1]?function(t,e,n){return _(m,t,e,n)}(r,a,l):b(r,a,l),{r:n[0],g:n[1],b:n[2],a:i}}(t)}class P{constructor(t){if(t instanceof P)return t;const e=typeof t;let n;var i,r,o;"object"===e?n=O(t):"string"===e&&(o=(i=t).length,"#"===i[0]&&(4===o||5===o?r={r:255&17*c[i[1]],g:255&17*c[i[2]],b:255&17*c[i[3]],a:5===o?17*c[i[4]]:255}:7!==o&&9!==o||(r={r:c[i[1]]<<4|c[i[2]],g:c[i[3]]<<4|c[i[4]],b:c[i[5]]<<4|c[i[6]],a:9===o?c[i[7]]<<4|c[i[8]]:255})),n=r||function(t){S||(S=function(){const t={},e=Object.keys(k),n=Object.keys(w);let i,r,o,s,a;for(i=0;i<e.length;i++){for(s=a=e[i],r=0;r<n.length;r++)o=n[r],a=a.replace(o,w[o]);o=parseInt(k[s],16),t[a]=[o>>16&255,o>>8&255,255&o]}return t}(),S.transparent=[0,0,0,0]);const e=S[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||C(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=A(this._rgb);return t&&(t.a=a(t.a)),t}set rgb(t){this._rgb=O(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${a(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=(t=>d(t.r)&&d(t.g)&&d(t.b)&&d(t.a))(t)?h:f,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=y(t),n=e[0],i=l(e[1]),r=l(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${r}%, ${a(t.a)})`:`hsl(${n}, ${i}%, ${r}%)`}(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,i=t.rgb;let r;const o=e===r?.5:e,s=2*o-1,a=n.a-i.a,l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2;r=1-l,n.r=255&l*n.r+r*i.r+.5,n.g=255&l*n.g+r*i.g+.5,n.b=255&l*n.b+r*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const i=R(a(t.r)),r=R(a(t.g)),o=R(a(t.b));return{r:s(E(i+n*(R(a(e.r))-i))),g:s(E(r+n*(R(a(e.g))-r))),b:s(E(o+n*(R(a(e.b))-o))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new P(this.rgb)}alpha(t){return this._rgb.a=s(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=i(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return T(this._rgb,2,t),this}darken(t){return T(this._rgb,2,-t),this}saturate(t){return T(this._rgb,1,t),this}desaturate(t){return T(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=y(t);n[0]=x(n[0]+e),n=b(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function I(){}const D=(()=>{let t=0;return()=>t++})();function L(t){return null==t}function z(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function N(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function F(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function j(t,e){return F(t)?t:e}function H(t,e){return void 0===t?e:t}const B=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,W=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function V(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function $(t,e,n,i){let r,o,s;if(z(t))if(o=t.length,i)for(r=o-1;r>=0;r--)e.call(n,t[r],r);else for(r=0;r<o;r++)e.call(n,t[r],r);else if(N(t))for(s=Object.keys(t),o=s.length,r=0;r<o;r++)e.call(n,t[s[r]],s[r])}function U(t,e){let n,i,r,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=t[n],o=e[n],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function Q(t){if(z(t))return t.map(Q);if(N(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let r=0;for(;r<i;++r)e[n[r]]=Q(t[n[r]]);return e}return t}function Y(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function q(t,e,n,i){if(!Y(t))return;const r=e[t],o=n[t];N(r)&&N(o)?X(r,o,i):e[t]=Q(o)}function X(t,e,n){const i=z(e)?e:[e],r=i.length;if(!N(t))return t;const o=(n=n||{}).merger||q;let s;for(let e=0;e<r;++e){if(s=i[e],!N(s))continue;const r=Object.keys(s);for(let e=0,i=r.length;e<i;++e)o(r[e],t,s,n)}return t}function Z(t,e){return X(t,e,{merger:K})}function K(t,e,n){if(!Y(t))return;const i=e[t],r=n[t];N(i)&&N(r)?Z(i,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Q(r))}const G={"":t=>t,x:t=>t.x,y:t=>t.y};function J(t,e){const n=G[e]||(G[e]=function(t){const e=function(t){const e=t.split("."),n=[];let i="";for(const t of e)i+=t,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function tt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const et=t=>void 0!==t,nt=t=>"function"==typeof t,it=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function rt(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const ot=Math.PI,st=2*ot,at=st+ot,lt=Number.POSITIVE_INFINITY,ct=ot/180,ut=ot/2,ht=ot/4,ft=2*ot/3,dt=Math.log10,pt=Math.sign;function gt(t,e,n){return Math.abs(t-e)<n}function mt(t){const e=Math.round(t);t=gt(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(dt(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function vt(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i===0&&(e.push(i),e.push(t/i));return n===(0|n)&&e.push(n),e.sort((t,e)=>t-e).pop(),e}function yt(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function _t(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function bt(t,e,n){let i,r,o;for(i=0,r=t.length;i<r;i++)o=t[i][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function xt(t){return t*(ot/180)}function wt(t){return t*(180/ot)}function kt(t){if(!F(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function St(t,e){const n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i);let o=Math.atan2(i,n);return o<-.5*ot&&(o+=st),{angle:o,distance:r}}function Mt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Et(t,e){return(t-e+at)%st-ot}function Rt(t){return(t%st+st)%st}function Tt(t,e,n,i){const r=Rt(t),o=Rt(e),s=Rt(n),a=Rt(o-r),l=Rt(s-r),c=Rt(r-o),u=Rt(r-s);return r===o||r===s||i&&o===s||a>l&&c<u}function At(t,e,n){return Math.max(e,Math.min(n,t))}function Ot(t){return At(t,-32768,32767)}function Ct(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function Pt(t,e,n){n=n||(n=>t[n]<e);let i,r=t.length-1,o=0;for(;r-o>1;)i=o+r>>1,n(i)?o=i:r=i;return{lo:o,hi:r}}const It=(t,e,n,i)=>Pt(t,n,i?i=>{const r=t[i][e];return r<n||r===n&&t[i+1][e]===n}:i=>t[i][e]<n),Dt=(t,e,n)=>Pt(t,n,i=>t[i][e]>=n);function Lt(t,e,n){let i=0,r=t.length;for(;i<r&&t[i]<e;)i++;for(;r>i&&t[r-1]>n;)r--;return i>0||r<t.length?t.slice(i,r):t}const zt=["push","pop","shift","splice","unshift"];function Nt(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),zt.forEach(e=>{const n="_onData"+tt(e),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const r=i.apply(this,e);return t._chartjs.listeners.forEach(t=>{"function"==typeof t[n]&&t[n](...e)}),r}})}))}function Ft(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(e);-1!==r&&i.splice(r,1),i.length>0||(zt.forEach(e=>{delete t[e]}),delete t._chartjs)}function jt(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Ht="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Bt(t,e){let n=[],i=!1;return function(...r){n=r,i||(i=!0,Ht.call(window,()=>{i=!1,t.apply(e,n)}))}}function Wt(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const Vt=t=>"start"===t?"left":"end"===t?"right":"center",$t=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2,Ut=(t,e,n,i)=>t===(i?"left":"right")?n:"center"===t?(e+n)/2:e;function Qt(t,e,n){const i=e.length;let r=0,o=i;if(t._sorted){const{iScale:s,vScale:a,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,u=s.axis,{min:h,max:f,minDefined:d,maxDefined:p}=s.getUserBounds();if(d){if(r=Math.min(It(l,u,h).lo,n?i:It(e,u,s.getPixelForValue(h)).lo),c){const t=l.slice(0,r+1).reverse().findIndex(t=>!L(t[a.axis]));r-=Math.max(0,t)}r=At(r,0,i-1)}if(p){let t=Math.max(It(l,s.axis,f,!0).hi+1,n?0:It(e,u,s.getPixelForValue(f),!0).hi+1);if(c){const e=l.slice(t-1).findIndex(t=>!L(t[a.axis]));t+=Math.max(0,e)}o=At(t,r,i)-r}else o=i-r}return{start:r,count:o}}function Yt(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,r={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=r,!0;const o=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),o}const qt=t=>0===t||1===t,Xt=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*st/n),Zt=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*st/n)+1,Kt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*ut),easeOutSine:t=>Math.sin(t*ut),easeInOutSine:t=>-.5*(Math.cos(ot*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>qt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>qt(t)?t:Xt(t,.075,.3),easeOutElastic:t=>qt(t)?t:Zt(t,.075,.3),easeInOutElastic(t){const e=.1125;return qt(t)?t:t<.5?.5*Xt(2*t,e,.45):.5+.5*Zt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Kt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*Kt.easeInBounce(2*t):.5*Kt.easeOutBounce(2*t-1)+.5};function Gt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Jt(t){return Gt(t)?t:new P(t)}function te(t){return Gt(t)?t:new P(t).saturate(.5).darken(.1).hexString()}const ee=["x","y","borderWidth","radius","tension"],ne=["color","borderColor","backgroundColor"],ie=new Map;function re(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let i=ie.get(n);return i||(i=new Intl.NumberFormat(t,e),ie.set(n,i)),i}(e,n).format(t)}const oe={values:t=>z(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const i=this.chart.options.locale;let r,o=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}(t,n)}const s=dt(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),re(t,i,l)},logarithmic(t,e,n){if(0===t)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(dt(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?oe.numeric.call(this,t,e,n):""}};var se={formatters:oe};const ae=Object.create(null),le=Object.create(null);function ce(t,e){if(!e)return t;const n=e.split(".");for(let e=0,i=n.length;e<i;++e){const i=n[e];t=t[i]||(t[i]=Object.create(null))}return t}function ue(t,e,n){return"string"==typeof e?X(ce(t,e),n):X(ce(t,""),e)}class he{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>te(e.backgroundColor),this.hoverBorderColor=(t,e)=>te(e.borderColor),this.hoverColor=(t,e)=>te(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return ue(this,t,e)}get(t){return ce(this,t)}describe(t,e){return ue(le,t,e)}override(t,e){return ue(ae,t,e)}route(t,e,n,i){const r=ce(this,t),o=ce(this,n),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[i];return N(t)?Object.assign({},e,t):H(t,e)},set(t){this[s]=t}}})}apply(t){t.forEach(t=>t(this))}}var fe=new he({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:ne},numbers:{type:"number",properties:ee}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:se.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function de(t,e,n,i,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,n.push(r)),o>i&&(i=o),i}function pe(t,e,n,i){let r=(i=i||{}).data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},o=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let s=0;const a=n.length;let l,c,u,h,f;for(l=0;l<a;l++)if(h=n[l],null==h||z(h)){if(z(h))for(c=0,u=h.length;c<u;c++)f=h[c],null==f||z(f)||(s=de(t,r,o,s,f))}else s=de(t,r,o,s,h);t.restore();const d=o.length/2;if(d>n.length){for(l=0;l<d;l++)delete r[o[l]];o.splice(0,d)}return s}function ge(t,e,n){const i=t.currentDevicePixelRatio,r=0!==n?Math.max(n/2,.5):0;return Math.round((e-r)*i)/i+r}function me(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function ve(t,e,n,i){ye(t,e,n,i,null)}function ye(t,e,n,i,r){let o,s,a,l,c,u,h,f;const d=e.pointStyle,p=e.rotation,g=e.radius;let m=(p||0)*ct;if(d&&"object"==typeof d&&(o=d.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(n,i),t.rotate(m),t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),d){default:r?t.ellipse(n,i,r/2,g,0,0,st):t.arc(n,i,g,0,st),t.closePath();break;case"triangle":u=r?r/2:g,t.moveTo(n+Math.sin(m)*u,i-Math.cos(m)*g),m+=ft,t.lineTo(n+Math.sin(m)*u,i-Math.cos(m)*g),m+=ft,t.lineTo(n+Math.sin(m)*u,i-Math.cos(m)*g),t.closePath();break;case"rectRounded":c=.516*g,l=g-c,s=Math.cos(m+ht)*l,h=Math.cos(m+ht)*(r?r/2-c:l),a=Math.sin(m+ht)*l,f=Math.sin(m+ht)*(r?r/2-c:l),t.arc(n-h,i-a,c,m-ot,m-ut),t.arc(n+f,i-s,c,m-ut,m),t.arc(n+h,i+a,c,m,m+ut),t.arc(n-f,i+s,c,m+ut,m+ot),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,u=r?r/2:l,t.rect(n-u,i-l,2*u,2*l);break}m+=ht;case"rectRot":h=Math.cos(m)*(r?r/2:g),s=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(r?r/2:g),t.moveTo(n-h,i-a),t.lineTo(n+f,i-s),t.lineTo(n+h,i+a),t.lineTo(n-f,i+s),t.closePath();break;case"crossRot":m+=ht;case"cross":h=Math.cos(m)*(r?r/2:g),s=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(r?r/2:g),t.moveTo(n-h,i-a),t.lineTo(n+h,i+a),t.moveTo(n+f,i-s),t.lineTo(n-f,i+s);break;case"star":h=Math.cos(m)*(r?r/2:g),s=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(r?r/2:g),t.moveTo(n-h,i-a),t.lineTo(n+h,i+a),t.moveTo(n+f,i-s),t.lineTo(n-f,i+s),m+=ht,h=Math.cos(m)*(r?r/2:g),s=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(r?r/2:g),t.moveTo(n-h,i-a),t.lineTo(n+h,i+a),t.moveTo(n+f,i-s),t.lineTo(n-f,i+s);break;case"line":s=r?r/2:Math.cos(m)*g,a=Math.sin(m)*g,t.moveTo(n-s,i-a),t.lineTo(n+s,i+a);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(m)*(r?r/2:g),i+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function _e(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function be(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function xe(t){t.restore()}function we(t,e,n,i,r){if(!e)return t.lineTo(n.x,n.y);if("middle"===r){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else"after"===r!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function ke(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function Se(t,e,n,i,r){if(r.strikethrough||r.underline){const o=t.measureText(i),s=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(s,u),t.lineTo(a,u),t.stroke()}}function Me(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Ee(t,e,n,i,r,o={}){const s=z(e)?e:[e],a=o.strokeWidth>0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),L(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;l<s.length;++l)c=s[l],o.backdrop&&Me(t,o.backdrop),a&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),L(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(c,n,i,o.maxWidth)),t.fillText(c,n,i,o.maxWidth),Se(t,n,i,c,o),i+=Number(r.lineHeight);t.restore()}function Re(t,e){const{x:n,y:i,w:r,h:o,radius:s}=e;t.arc(n+s.topLeft,i+s.topLeft,s.topLeft,1.5*ot,ot,!0),t.lineTo(n,i+o-s.bottomLeft),t.arc(n+s.bottomLeft,i+o-s.bottomLeft,s.bottomLeft,ot,ut,!0),t.lineTo(n+r-s.bottomRight,i+o),t.arc(n+r-s.bottomRight,i+o-s.bottomRight,s.bottomRight,ut,0,!0),t.lineTo(n+r,i+s.topRight),t.arc(n+r-s.topRight,i+s.topRight,s.topRight,0,-ut,!0),t.lineTo(n+s.topLeft,i)}const Te=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Ae=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Oe(t,e){const n=(""+t).match(Te);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}const Ce=t=>+t||0;function Pe(t,e){const n={},i=N(e),r=i?Object.keys(e):e,o=N(t)?i?n=>H(t[n],t[e[n]]):e=>t[e]:()=>t;for(const t of r)n[t]=Ce(o(t));return n}function Ie(t){return Pe(t,{top:"y",right:"x",bottom:"y",left:"x"})}function De(t){return Pe(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Le(t){const e=Ie(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ze(t,e){t=t||{},e=e||fe.font;let n=H(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let i=H(t.style,e.style);i&&!(""+i).match(Ae)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:H(t.family,e.family),lineHeight:Oe(H(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:H(t.weight,e.weight),string:""};return r.string=function(t){return!t||L(t.size)||L(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function Ne(t,e,n,i){let r,o,s,a=!0;for(r=0,o=t.length;r<o;++r)if(s=t[r],void 0!==s&&(void 0!==e&&"function"==typeof s&&(s=s(e),a=!1),void 0!==n&&z(s)&&(s=s[n%s.length],a=!1),void 0!==s))return i&&!a&&(i.cacheable=!1),s}function Fe(t,e,n){const{min:i,max:r}=t,o=W(e,(r-i)/2),s=(t,e)=>n&&0===t?0:t+e;return{min:s(i,-Math.abs(o)),max:s(r,o)}}function je(t,e){return Object.assign(Object.create(t),e)}function He(t,e=[""],n,i,r=()=>t[0]){const o=n||t;void 0===i&&(i=Ke("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:i,_getTarget:r,override:n=>He([n,...t],e,o,i)};return new Proxy(s,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>Ue(n,i,()=>function(t,e,n,i){let r;for(const o of e)if(r=Ke(Ve(o,t),n),void 0!==r)return $e(t,r)?Xe(n,i,t,r):r}(i,e,t,n)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ge(t).includes(e),ownKeys:t=>Ge(t),set(t,e,n){const i=t._storage||(t._storage=r());return t[e]=i[e]=n,delete t._keys,!0}})}function Be(t,e,n,i){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:We(t,i),setContext:e=>Be(t,e,n,i),override:r=>Be(t.override(r),e,n,i)};return new Proxy(r,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>Ue(t,e,()=>function(t,e,n){const{_proxy:i,_context:r,_subProxy:o,_descriptors:s}=t;let a=i[e];return nt(a)&&s.isScriptable(e)&&(a=function(t,e,n,i){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(o,s||i);return a.delete(t),$e(t,l)&&(l=Xe(r._scopes,r,t,l)),l}(e,a,t,n)),z(a)&&a.length&&(a=function(t,e,n,i){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=n;if(void 0!==o.index&&i(t))return e[o.index%e.length];if(N(e[0])){const n=e,i=r._scopes.filter(t=>t!==n);e=[];for(const l of n){const n=Xe(i,r,t,l);e.push(Be(n,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable)),$e(e,a)&&(a=Be(a,r,o&&o[e],s)),a}(t,e,n)),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,i)=>(t[n]=i,delete e[n],!0)})}function We(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:i,isScriptable:nt(n)?n:()=>n,isIndexable:nt(i)?i:()=>i}}const Ve=(t,e)=>t?t+tt(e):e,$e=(t,e)=>N(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Ue(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const i=n();return t[e]=i,i}function Qe(t,e,n){return nt(t)?t(e,n):t}const Ye=(t,e)=>!0===t?e:"string"==typeof t?J(e,t):void 0;function qe(t,e,n,i,r){for(const o of e){const e=Ye(n,o);if(e){t.add(e);const o=Qe(e._fallback,n,r);if(void 0!==o&&o!==n&&o!==i)return o}else if(!1===e&&void 0!==i&&n!==i)return null}return!1}function Xe(t,e,n,i){const r=e._rootScopes,o=Qe(e._fallback,n,i),s=[...t,...r],a=new Set;a.add(i);let l=Ze(a,s,n,o||n,i);return null!==l&&(void 0===o||o===n||(l=Ze(a,s,o,l,i),null!==l))&&He(Array.from(a),[""],r,o,()=>function(t,e,n){const i=t._getTarget();e in i||(i[e]={});const r=i[e];return z(r)&&N(n)?n:r||{}}(e,n,i))}function Ze(t,e,n,i,r){for(;n;)n=qe(t,e,n,i,r);return n}function Ke(t,e){for(const n of e){if(!n)continue;const e=n[t];if(void 0!==e)return e}}function Ge(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function Je(t,e,n,i){const{iScale:r}=t,{key:o="r"}=this._parsing,s=new Array(i);let a,l,c,u;for(a=0,l=i;a<l;++a)c=a+n,u=e[c],s[a]={r:r.parse(J(u,o),c)};return s}const tn=Number.EPSILON||1e-14,en=(t,e)=>e<t.length&&!t[e].skip&&t[e],nn=t=>"x"===t?"y":"x";function rn(t,e,n,i){const r=t.skip?e:t,o=e,s=n.skip?e:n,a=Mt(o,r),l=Mt(s,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const h=i*c,f=i*u;return{previous:{x:o.x-h*(s.x-r.x),y:o.y-h*(s.y-r.y)},next:{x:o.x+f*(s.x-r.x),y:o.y+f*(s.y-r.y)}}}function on(t,e,n){return Math.max(Math.min(t,n),e)}function sn(t,e,n,i,r){let o,s,a,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const n=nn(e),i=t.length,r=Array(i).fill(0),o=Array(i);let s,a,l,c=en(t,0);for(s=0;s<i;++s)if(a=l,l=c,c=en(t,s+1),l){if(c){const t=c[e]-l[e];r[s]=0!==t?(c[n]-l[n])/t:0}o[s]=a?c?pt(r[s-1])!==pt(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}!function(t,e,n){const i=t.length;let r,o,s,a,l,c=en(t,0);for(let u=0;u<i-1;++u)l=c,c=en(t,u+1),l&&c&&(gt(e[u],0,tn)?n[u]=n[u+1]=0:(r=n[u]/e[u],o=n[u+1]/e[u],a=Math.pow(r,2)+Math.pow(o,2),a<=9||(s=3/Math.sqrt(a),n[u]=r*s*e[u],n[u+1]=o*s*e[u])))}(t,r,o),function(t,e,n="x"){const i=nn(n),r=t.length;let o,s,a,l=en(t,0);for(let c=0;c<r;++c){if(s=a,a=l,l=en(t,c+1),!a)continue;const r=a[n],u=a[i];s&&(o=(r-s[n])/3,a[`cp1${n}`]=r-o,a[`cp1${i}`]=u-o*e[c]),l&&(o=(l[n]-r)/3,a[`cp2${n}`]=r+o,a[`cp2${i}`]=u+o*e[c])}}(t,o,e)}(t,r);else{let n=i?t[t.length-1]:t[0];for(o=0,s=t.length;o<s;++o)a=t[o],l=rn(n,a,t[Math.min(o+1,s-(i?0:1))%s],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,n=a}e.capBezierPoints&&function(t,e){let n,i,r,o,s,a=_e(t[0],e);for(n=0,i=t.length;n<i;++n)s=o,o=a,a=n<i-1&&_e(t[n+1],e),o&&(r=t[n],s&&(r.cp1x=on(r.cp1x,e.left,e.right),r.cp1y=on(r.cp1y,e.top,e.bottom)),a&&(r.cp2x=on(r.cp2x,e.left,e.right),r.cp2y=on(r.cp2y,e.top,e.bottom)))}(t,n)}function an(){return"undefined"!=typeof window&&"undefined"!=typeof document}function ln(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function cn(t,e,n){let i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}const un=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),hn=["top","right","bottom","left"];function fn(t,e,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const o=hn[r];i[o]=parseFloat(t[e+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function dn(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,r=un(n),o="border-box"===r.boxSizing,s=fn(r,"padding"),a=fn(r,"border","width"),{x:l,y:c,box:u}=function(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:r,offsetY:o}=i;let s,a,l=!1;if(((t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot))(r,o,t.target))s=r,a=o;else{const t=e.getBoundingClientRect();s=i.clientX-t.left,a=i.clientY-t.top,l=!0}return{x:s,y:a,box:l}}(t,n),h=s.left+(u&&a.left),f=s.top+(u&&a.top);let{width:d,height:p}=e;return o&&(d-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-h)/d*n.width/i),y:Math.round((c-f)/p*n.height/i)}}const pn=t=>Math.round(10*t)/10;function gn(t,e,n,i){const r=un(t),o=fn(r,"margin"),s=cn(r.maxWidth,t,"clientWidth")||lt,a=cn(r.maxHeight,t,"clientHeight")||lt,l=function(t,e,n){let i,r;if(void 0===e||void 0===n){const o=t&&ln(t);if(o){const t=o.getBoundingClientRect(),s=un(o),a=fn(s,"border","width"),l=fn(s,"padding");e=t.width-l.width-a.width,n=t.height-l.height-a.height,i=cn(s.maxWidth,o,"clientWidth"),r=cn(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||lt,maxHeight:r||lt}}(t,e,n);let{width:c,height:u}=l;if("content-box"===r.boxSizing){const t=fn(r,"border","width"),e=fn(r,"padding");c-=e.width+t.width,u-=e.height+t.height}return c=Math.max(0,c-o.width),u=Math.max(0,i?c/i:u-o.height),c=pn(Math.min(c,s,l.maxWidth)),u=pn(Math.min(u,a,l.maxHeight)),c&&!u&&(u=pn(c/2)),(void 0!==e||void 0!==n)&&i&&l.height&&u>l.height&&(u=l.height,c=pn(Math.floor(u*i))),{width:c,height:u}}function mn(t,e,n){const i=e||1,r=pn(t.height*i),o=pn(t.width*i);t.height=pn(t.height),t.width=pn(t.width);const s=t.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=i,s.height=r,s.width=o,t.ctx.setTransform(i,0,0,i,0,0),!0)}const vn=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};an()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function yn(t,e){const n=function(t,e){return un(t).getPropertyValue(e)}(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function _n(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function bn(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function xn(t,e,n,i){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=_n(t,r,n),a=_n(r,o,n),l=_n(o,e,n),c=_n(s,a,n),u=_n(a,l,n);return _n(c,u,n)}function wn(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function kn(t,e){let n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function Sn(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Mn(t){return"angle"===t?{between:Tt,compare:Et,normalize:Rt}:{between:Ct,compare:(t,e)=>t-e,normalize:t=>t}}function En({start:t,end:e,count:n,loop:i,style:r}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0,style:r}}function Rn(t,e,n){if(!n)return[t];const{property:i,start:r,end:o}=n,s=e.length,{compare:a,between:l,normalize:c}=Mn(i),{start:u,end:h,loop:f,style:d}=function(t,e,n){const{property:i,start:r,end:o}=n,{between:s,normalize:a}=Mn(i),l=e.length;let c,u,{start:h,end:f,loop:d}=t;if(d){for(h+=l,f+=l,c=0,u=l;c<u&&s(a(e[h%l][i]),r,o);++c)h--,f--;h%=l,f%=l}return f<h&&(f+=l),{start:h,end:f,loop:d,style:t.style}}(t,e,n),p=[];let g,m,v,y=!1,_=null;const b=()=>y||l(r,v,g)&&0!==a(r,v),x=()=>!y||0===a(o,g)||l(o,v,g);for(let t=u,n=u;t<=h;++t)m=e[t%s],m.skip||(g=c(m[i]),g!==v&&(y=l(g,r,o),null===_&&b()&&(_=0===a(g,r)?t:n),null!==_&&x()&&(p.push(En({start:_,end:t,loop:f,count:s,style:d})),_=null),n=t,v=g));return null!==_&&p.push(En({start:_,end:h,loop:f,count:s,style:d})),p}function Tn(t,e){const n=[],i=t.segments;for(let r=0;r<i.length;r++){const o=Rn(i[r],t.points,e);o.length&&n.push(...o)}return n}function An(t,e){const n=t.points,i=t.options.spanGaps,r=n.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,n,i){let r=0,o=e-1;if(n&&!i)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,n&&(o+=r);o>r&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(n,r,o,i);return On(t,!0===i?[{start:s,end:a,loop:o}]:function(t,e,n,i){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=n;++s){const n=t[s%r];n.skip||n.stop?l.skip||(i=!1,o.push({start:e%r,end:(s-1)%r,loop:i}),e=a=n.stop?s:null):(a=s,l.skip&&(e=s)),l=n}return null!==a&&o.push({start:e%r,end:a%r,loop:i}),o}(n,s,a<s?a+r:a,!!t._fullLoop&&0===s&&a===r-1),n,e)}function On(t,e,n,i){return i&&i.setContext&&n?function(t,e,n,i){const r=t._chart.getContext(),o=Cn(t.options),{_datasetIndex:s,options:{spanGaps:a}}=t,l=n.length,c=[];let u=o,h=e[0].start,f=h;function d(t,e,i,r){const o=a?-1:1;if(t!==e){for(t+=l;n[t%l].skip;)t-=o;for(;n[e%l].skip;)e+=o;t%l!==e%l&&(c.push({start:t%l,end:e%l,loop:i,style:r}),u=r,h=e%l)}}for(const t of e){h=a?h:t.start;let e,o=n[h%l];for(f=h+1;f<=t.end;f++){const a=n[f%l];e=Cn(i.setContext(je(r,{type:"segment",p0:o,p1:a,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:s}))),Pn(e,u)&&d(h,f-1,t.loop,u),o=a,u=e}h<f-1&&d(h,f-1,t.loop,u)}return c}(t,e,n,i):e}function Cn(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Pn(t,e){if(!e)return!1;const n=[],i=function(t,e){return Gt(e)?(n.includes(e)||n.push(e),n.indexOf(e)):e};return JSON.stringify(t,i)!==JSON.stringify(e,i)}function In(t,e,n){return t.options.clip?t[n]:e[n]}function Dn(t,e){const n=e._clip;if(n.disabled)return!1;const i=function(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:In(n,e,"left"),right:In(n,e,"right"),top:In(i,e,"top"),bottom:In(i,e,"bottom")}:e}(e,t.chartArea);return{left:!1===n.left?0:i.left-(!0===n.left?0:n.left),right:!1===n.right?t.width:i.right+(!0===n.right?0:n.right),top:!1===n.top?0:i.top-(!0===n.top?0:n.top),bottom:!1===n.bottom?t.height:i.bottom+(!0===n.bottom?0:n.bottom)}}},4731(t,e,n){"use strict";n.d(e,{Fq:()=>m,N1:()=>p,yP:()=>g});var i=n(4848),r=n(6540),o=n(6118);const s="label";function a(t,e){"function"==typeof t?t(e):t&&(t.current=e)}function l(t,e){t.labels=e}function c(t,e,n=s){const i=[];t.datasets=e.map(e=>{const r=t.datasets.find(t=>t[n]===e[n]);return r&&e.data&&!i.includes(r)?(i.push(r),Object.assign(r,e),r):{...e}})}function u(t,e=s){const n={labels:[],datasets:[]};return l(n,t.labels),c(n,t.datasets,e),n}function h(t,e){const{height:n=150,width:s=300,redraw:h=!1,datasetIdKey:f,type:d,data:p,options:g,plugins:m=[],fallbackContent:v,updateMode:y,..._}=t,b=(0,r.useRef)(null),x=(0,r.useRef)(null),w=()=>{b.current&&(x.current=new o.t1(b.current,{type:d,data:u(p,f),options:g&&{...g},plugins:m}),a(e,x.current))},k=()=>{a(e,null),x.current&&(x.current.destroy(),x.current=null)};return(0,r.useEffect)(()=>{!h&&x.current&&g&&function(t,e){const n=t.options;n&&e&&Object.assign(n,e)}(x.current,g)},[h,g]),(0,r.useEffect)(()=>{!h&&x.current&&l(x.current.config.data,p.labels)},[h,p.labels]),(0,r.useEffect)(()=>{!h&&x.current&&p.datasets&&c(x.current.config.data,p.datasets,f)},[h,p.datasets]),(0,r.useEffect)(()=>{x.current&&(h?(k(),setTimeout(w)):x.current.update(y))},[h,g,p.labels,p.datasets,y]),(0,r.useEffect)(()=>{x.current&&(k(),setTimeout(w))},[d]),(0,r.useEffect)(()=>(w(),()=>k()),[]),(0,i.jsx)("canvas",{ref:b,role:"img",height:n,width:s,..._,children:v})}const f=(0,r.forwardRef)(h);function d(t,e){return o.t1.register(e),(0,r.forwardRef)((e,n)=>(0,i.jsx)(f,{...e,ref:n,type:t}))}const p=d("line",o.ZT),g=d("bar",o.A6),m=d("pie",o.P$)},658(t,e,n){"use strict";n.d(e,{CkS:()=>r});var i=n(1085);function r(t){return(0,i.k5)({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M13.5 2l-7.5 7.5-3.5-3.5-2.5 2.5 6 6 10-10z"},child:[]}]})(t)}},1223(t,e,n){"use strict";n.d(e,{BVt:()=>r});var i=n(1085);function r(t){return(0,i.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M4 19H20V12H22V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V12H4V19ZM14 9H19L12 16L5 9H10V3H14V9Z"},child:[]}]})(t)}},6044(t,e,n){"use strict";n.d(e,{m_:()=>Ft});var i=n(6540);const r=Math.min,o=Math.max,s=Math.round,a=Math.floor,l=t=>({x:t,y:t}),c={left:"right",right:"left",bottom:"top",top:"bottom"};function u(t,e,n){return o(t,r(e,n))}function h(t,e){return"function"==typeof t?t(e):t}function f(t){return t.split("-")[0]}function d(t){return t.split("-")[1]}function p(t){return"x"===t?"y":"x"}function g(t){return"y"===t?"height":"width"}function m(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function v(t){return p(m(t))}function y(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const _=["left","right"],b=["right","left"],x=["top","bottom"],w=["bottom","top"];function k(t){const e=f(t);return c[e]+t.slice(e.length)}function S(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function M(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function E(t,e,n){let{reference:i,floating:r}=t;const o=m(e),s=v(e),a=g(s),l=f(e),c="y"===o,u=i.x+i.width/2-r.width/2,h=i.y+i.height/2-r.height/2,p=i[a]/2-r[a]/2;let y;switch(l){case"top":y={x:u,y:i.y-r.height};break;case"bottom":y={x:u,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:h};break;case"left":y={x:i.x-r.width,y:h};break;default:y={x:i.x,y:i.y}}switch(d(e)){case"start":y[s]-=p*(n&&c?-1:1);break;case"end":y[s]+=p*(n&&c?-1:1)}return y}async function R(t,e){var n;void 0===e&&(e={});const{x:i,y:r,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=h(e,t),g=S(p),m=a[d?"floating"===f?"reference":"floating":f],v=M(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===f?{x:i,y:r,width:s.floating.width,height:s.floating.height}:s.reference,_=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),b=await(null==o.isElement?void 0:o.isElement(_))&&await(null==o.getScale?void 0:o.getScale(_))||{x:1,y:1},x=M(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:_,strategy:l}):y);return{top:(v.top-x.top+g.top)/b.y,bottom:(x.bottom-v.bottom+g.bottom)/b.y,left:(v.left-x.left+g.left)/b.x,right:(x.right-v.right+g.right)/b.x}}const T=new Set(["left","top"]);function A(){return"undefined"!=typeof window}function O(t){return I(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function P(t){var e;return null==(e=(I(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function I(t){return!!A()&&(t instanceof Node||t instanceof C(t).Node)}function D(t){return!!A()&&(t instanceof Element||t instanceof C(t).Element)}function L(t){return!!A()&&(t instanceof HTMLElement||t instanceof C(t).HTMLElement)}function z(t){return!(!A()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof C(t).ShadowRoot)}function N(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=Y(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&"inline"!==r&&"contents"!==r}function F(t){return/^(table|td|th)$/.test(O(t))}function j(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const H=/transform|translate|scale|rotate|perspective|filter/,B=/paint|layout|strict|content/,W=t=>!!t&&"none"!==t;let V;function $(t){const e=D(t)?Y(t):t;return W(e.transform)||W(e.translate)||W(e.scale)||W(e.rotate)||W(e.perspective)||!U()&&(W(e.backdropFilter)||W(e.filter))||H.test(e.willChange||"")||B.test(e.contain||"")}function U(){return null==V&&(V="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),V}function Q(t){return/^(html|body|#document)$/.test(O(t))}function Y(t){return C(t).getComputedStyle(t)}function q(t){return D(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function X(t){if("html"===O(t))return t;const e=t.assignedSlot||t.parentNode||z(t)&&t.host||P(t);return z(e)?e.host:e}function Z(t){const e=X(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:L(e)&&N(e)?e:Z(e)}function K(t,e,n){var i;void 0===e&&(e=[]),void 0===n&&(n=!0);const r=Z(t),o=r===(null==(i=t.ownerDocument)?void 0:i.body),s=C(r);if(o){const t=G(s);return e.concat(s,s.visualViewport||[],N(r)?r:[],t&&n?K(t):[])}return e.concat(r,K(r,[],n))}function G(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function J(t){const e=Y(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=L(t),o=r?t.offsetWidth:n,a=r?t.offsetHeight:i,l=s(n)!==o||s(i)!==a;return l&&(n=o,i=a),{width:n,height:i,$:l}}function tt(t){return D(t)?t:t.contextElement}function et(t){const e=tt(t);if(!L(e))return l(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:o}=J(e);let a=(o?s(n.width):n.width)/i,c=(o?s(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),c&&Number.isFinite(c)||(c=1),{x:a,y:c}}const nt=l(0);function it(t){const e=C(t);return U()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:nt}function rt(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),o=tt(t);let s=l(1);e&&(i?D(i)&&(s=et(i)):s=et(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==C(t))&&e}(o,n,i)?it(o):l(0);let c=(r.left+a.x)/s.x,u=(r.top+a.y)/s.y,h=r.width/s.x,f=r.height/s.y;if(o){const t=C(o),e=i&&D(i)?C(i):i;let n=t,r=G(n);for(;r&&i&&e!==n;){const t=et(r),e=r.getBoundingClientRect(),i=Y(r),o=e.left+(r.clientLeft+parseFloat(i.paddingLeft))*t.x,s=e.top+(r.clientTop+parseFloat(i.paddingTop))*t.y;c*=t.x,u*=t.y,h*=t.x,f*=t.y,c+=o,u+=s,n=C(r),r=G(n)}}return M({width:h,height:f,x:c,y:u})}function ot(t,e){const n=q(t).scrollLeft;return e?e.left+n:rt(P(t)).left+n}function st(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-ot(t,n),y:n.top+e.scrollTop}}function at(t,e,n){let i;if("viewport"===e)i=function(t,e){const n=C(t),i=P(t),r=n.visualViewport;let o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;const t=U();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}const c=ot(i);if(c<=0){const t=i.ownerDocument,e=t.body,n=getComputedStyle(e),r="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(i.clientWidth-e.clientWidth-r);s<=25&&(o-=s)}else c<=25&&(o+=c);return{width:o,height:s,x:a,y:l}}(t,n);else if("document"===e)i=function(t){const e=P(t),n=q(t),i=t.ownerDocument.body,r=o(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=o(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-n.scrollLeft+ot(t);const l=-n.scrollTop;return"rtl"===Y(i).direction&&(a+=o(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:a,y:l}}(P(t));else if(D(e))i=function(t,e){const n=rt(t,!0,"fixed"===e),i=n.top+t.clientTop,r=n.left+t.clientLeft,o=L(t)?et(t):l(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:r*o.x,y:i*o.y}}(e,n);else{const n=it(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return M(i)}function lt(t,e){const n=X(t);return!(n===e||!D(n)||Q(n))&&("fixed"===Y(n).position||lt(n,e))}function ct(t,e,n){const i=L(e),r=P(e),o="fixed"===n,s=rt(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const c=l(0);function u(){c.x=ot(r)}if(i||!i&&!o)if(("body"!==O(e)||N(r))&&(a=q(e)),i){const t=rt(e,!0,o,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else r&&u();o&&!i&&r&&u();const h=!r||i||o?l(0):st(r,a);return{x:s.left+a.scrollLeft-c.x-h.x,y:s.top+a.scrollTop-c.y-h.y,width:s.width,height:s.height}}function ut(t){return"static"===Y(t).position}function ht(t,e){if(!L(t)||"fixed"===Y(t).position)return null;if(e)return e(t);let n=t.offsetParent;return P(t)===n&&(n=n.ownerDocument.body),n}function ft(t,e){const n=C(t);if(j(t))return n;if(!L(t)){let e=X(t);for(;e&&!Q(e);){if(D(e)&&!ut(e))return e;e=X(e)}return n}let i=ht(t,e);for(;i&&F(i)&&ut(i);)i=ht(i,e);return i&&Q(i)&&ut(i)&&!$(i)?n:i||function(t){let e=X(t);for(;L(e)&&!Q(e);){if($(e))return e;if(j(e))return null;e=X(e)}return null}(t)||n}const dt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const o="fixed"===r,s=P(i),a=!!e&&j(e.floating);if(i===s||a&&o)return n;let c={scrollLeft:0,scrollTop:0},u=l(1);const h=l(0),f=L(i);if((f||!f&&!o)&&(("body"!==O(i)||N(s))&&(c=q(i)),f)){const t=rt(i);u=et(i),h.x=t.x+i.clientLeft,h.y=t.y+i.clientTop}const d=!s||f||o?l(0):st(s,c);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+h.x+d.x,y:n.y*u.y-c.scrollTop*u.y+h.y+d.y}},getDocumentElement:P,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const a=[..."clippingAncestors"===n?j(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let i=K(t,[],!1).filter(t=>D(t)&&"body"!==O(t)),r=null;const o="fixed"===Y(t).position;let s=o?X(t):t;for(;D(s)&&!Q(s);){const e=Y(s),n=$(s);n||"fixed"!==e.position||(r=null),(o?!n&&!r:!n&&"static"===e.position&&r&&("absolute"===r.position||"fixed"===r.position)||N(s)&&!n&<(t,s))?i=i.filter(t=>t!==s):r=e,s=X(s)}return e.set(t,i),i}(e,this._c):[].concat(n),i],l=at(e,a[0],s);let c=l.top,u=l.right,h=l.bottom,f=l.left;for(let t=1;t<a.length;t++){const n=at(e,a[t],s);c=o(n.top,c),u=r(n.right,u),h=r(n.bottom,h),f=o(n.left,f)}return{width:u-f,height:h-c,x:f,y:c}},getOffsetParent:ft,getElementRects:async function(t){const e=this.getOffsetParent||ft,n=this.getDimensions,i=await n(t.floating);return{reference:ct(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=J(t);return{width:e,height:n}},getScale:et,isElement:D,isRTL:function(t){return"rtl"===Y(t).direction}};function pt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const gt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:r,y:o,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:n,platform:i,elements:r}=t,o=await(null==i.isRTL?void 0:i.isRTL(r.floating)),s=f(n),a=d(n),l="y"===m(n),c=T.has(s)?-1:1,u=o&&l?-1:1,p=h(e,t);let{mainAxis:g,crossAxis:v,alignmentAxis:y}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&"number"==typeof y&&(v="end"===a?-1*y:y),l?{x:v*u,y:g*c}:{x:g*c,y:v*u}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:s}}}}},mt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=h(t,e),d={x:n,y:i},g=await o.detectOverflow(e,c),v=m(f(r)),y=p(v);let _=d[y],b=d[v];if(s){const t="y"===y?"bottom":"right";_=u(_+g["y"===y?"top":"left"],_,_-g[t])}if(a){const t="y"===v?"bottom":"right";b=u(b+g["y"===v?"top":"left"],b,b-g[t])}const x=l.fn({...e,[y]:_,[v]:b});return{...x,data:{x:x.x-n,y:x.y-i,enabled:{[y]:s,[v]:a}}}}}},vt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:r,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:S,fallbackStrategy:M="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:R=!0,...T}=h(t,e);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const A=f(r),O=m(a),C=f(a)===a,P=await(null==l.isRTL?void 0:l.isRTL(c.floating)),I=S||(C||!R?[k(a)]:function(t){const e=k(t);return[y(t),e,y(e)]}(a)),D="none"!==E;!S&&D&&I.push(...function(t,e,n,i){const r=d(t);let o=function(t,e,n){switch(t){case"top":case"bottom":return n?e?b:_:e?_:b;case"left":case"right":return e?x:w;default:return[]}}(f(t),"start"===n,i);return r&&(o=o.map(t=>t+"-"+r),e&&(o=o.concat(o.map(y)))),o}(a,R,E,P));const L=[a,...I],z=await l.detectOverflow(e,T),N=[];let F=(null==(i=o.flip)?void 0:i.overflows)||[];if(u&&N.push(z[A]),p){const t=function(t,e,n){void 0===n&&(n=!1);const i=d(t),r=v(t),o=g(r);let s="x"===r?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=k(s)),[s,k(s)]}(r,s,P);N.push(z[t[0]],z[t[1]])}if(F=[...F,{placement:r,overflows:N}],!N.every(t=>t<=0)){var j,H;const t=((null==(j=o.flip)?void 0:j.index)||0)+1,e=L[t];if(e&&("alignment"!==p||O===m(e)||F.every(t=>m(t.placement)!==O||t.overflows[0]>0)))return{data:{index:t,overflows:F},reset:{placement:e}};let n=null==(H=F.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:H.placement;if(!n)switch(M){case"bestFit":{var B;const t=null==(B=F.filter(t=>{if(D){const e=m(t.placement);return e===O||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:B[0];t&&(n=t);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},yt=(t,e,n)=>{const i=new Map,r={platform:dt,...n},o={...r.platform,_c:i};return(async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:R},l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:h}=E(c,i,l),f=i,d=0;const p={};for(let n=0;n<o.length;n++){const g=o[n];if(!g)continue;const{name:m,fn:v}=g,{x:y,y:_,data:b,reset:x}=await v({x:u,y:h,initialPlacement:i,placement:f,strategy:r,middlewareData:p,rects:c,platform:a,elements:{reference:t,floating:e}});u=null!=y?y:u,h=null!=_?_:h,p[m]={...p[m],...b},x&&d<50&&(d++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(c=!0===x.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):x.rects),({x:u,y:h}=E(c,f,l))),n=-1)}return{x:u,y:h,placement:f,strategy:r,middlewareData:p}})(t,e,{...r,platform:o})};var _t=n(6942);const bt={core:!1,base:!1};function xt({css:t,id:e="react-tooltip-base-styles",type:n="base",ref:i}){var r,o;if(!t||"undefined"==typeof document||bt[n])return;if("core"===n&&"undefined"!=typeof process&&(null===(r=null===process||void 0===process?void 0:process.env)||void 0===r?void 0:r.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==n&&"undefined"!=typeof process&&(null===(o=null===process||void 0===process?void 0:process.env)||void 0===o?void 0:o.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===n&&(e="react-tooltip-core-styles"),i||(i={});const{insertAt:s}=i;if(document.getElementById(e))return;const a=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=e,l.type="text/css","top"===s&&a.firstChild?a.insertBefore(l,a.firstChild):a.appendChild(l),l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t)),bt[n]=!0}const wt=async({elementReference:t=null,tooltipReference:e=null,tooltipArrowReference:n=null,place:i="top",offset:o=10,strategy:s="absolute",middlewares:a=[gt(Number(o)),vt({fallbackAxisSideDirection:"start"}),mt({padding:5})],border:l,arrowSize:c=8})=>{if(!t)return{tooltipStyles:{},tooltipArrowStyles:{},place:i};if(null===e)return{tooltipStyles:{},tooltipArrowStyles:{},place:i};const f=a;return n?(f.push({name:"arrow",options:p={element:n,padding:5},async fn(t){const{x:e,y:n,placement:i,rects:o,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:f=0}=h(p,t)||{};if(null==c)return{};const m=S(f),y={x:e,y:n},_=v(i),b=g(_),x=await s.getDimensions(c),w="y"===_,k=w?"top":"left",M=w?"bottom":"right",E=w?"clientHeight":"clientWidth",R=o.reference[b]+o.reference[_]-y[_]-o.floating[b],T=y[_]-o.reference[_],A=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let O=A?A[E]:0;O&&await(null==s.isElement?void 0:s.isElement(A))||(O=a.floating[E]||o.floating[b]);const C=R/2-T/2,P=O/2-x[b]/2-1,I=r(m[k],P),D=r(m[M],P),L=I,z=O-x[b]-D,N=O/2-x[b]/2+C,F=u(L,N,z),j=!l.arrow&&null!=d(i)&&N!==F&&o.reference[b]/2-(N<L?I:D)-x[b]/2<0,H=j?N<L?N-L:N-z:0;return{[_]:y[_]+H,data:{[_]:F,centerOffset:N-F-H,...j&&{alignmentOffset:H}},reset:j}}}),yt(t,e,{placement:i,strategy:s,middleware:f}).then(({x:t,y:e,placement:n,middlewareData:i})=>{var r,o;const s={left:`${t}px`,top:`${e}px`,border:l},{x:a,y:u}=null!==(r=i.arrow)&&void 0!==r?r:{x:0,y:0},h=null!==(o={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==o?o:"bottom",f=l&&{borderBottom:l,borderRight:l};let d=0;if(l){const t=`${l}`.match(/(\d+)px/);d=(null==t?void 0:t[1])?Number(t[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=u?`${u}px`:"",right:"",bottom:"",...f,[h]:`-${c/2+d-1}px`},place:n}})):yt(t,e,{placement:"bottom",strategy:s,middleware:f}).then(({x:t,y:e,placement:n})=>({tooltipStyles:{left:`${t}px`,top:`${e}px`},tooltipArrowStyles:{},place:n}));var p},kt=(t,e)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(t,e),St=(t,e,n)=>{let i=null;const r=function(...r){const o=()=>{i=null,n||t.apply(this,r)};n&&!i&&(t.apply(this,r),i=setTimeout(o,e)),n||(i&&clearTimeout(i),i=setTimeout(o,e))};return r.cancel=()=>{i&&(clearTimeout(i),i=null)},r},Mt=t=>null!==t&&!Array.isArray(t)&&"object"==typeof t,Et=(t,e)=>{if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&t.every((t,n)=>Et(t,e[n]));if(Array.isArray(t)!==Array.isArray(e))return!1;if(!Mt(t)||!Mt(e))return t===e;const n=Object.keys(t),i=Object.keys(e);return n.length===i.length&&n.every(n=>Et(t[n],e[n]))},Rt=t=>{if(!(t instanceof HTMLElement||t instanceof SVGElement))return!1;const e=getComputedStyle(t);return["overflow","overflow-x","overflow-y"].some(t=>{const n=e.getPropertyValue(t);return"auto"===n||"scroll"===n})},Tt=t=>{if(!t)return null;let e=t.parentElement;for(;e;){if(Rt(e))return e;e=e.parentElement}return document.scrollingElement||document.documentElement},At="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,Ot=t=>{t.current&&(clearTimeout(t.current),t.current=null)},Ct={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Pt=(0,i.createContext)({getTooltipData:()=>Ct});function It(t="DEFAULT_TOOLTIP_ID"){return(0,i.useContext)(Pt).getTooltipData(t)}var Dt={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",content:"core-styles-module_content__BRKdB",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Lt={tooltip:"styles-module_tooltip__mnnfp",content:"styles-module_content__ydYdI",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const zt=({forwardRef:t,id:e,className:n,classNameArrow:s,variant:l="dark",anchorId:c,anchorSelect:u,place:h="top",offset:f=10,events:d=["hover"],openOnClick:p=!1,positionStrategy:g="absolute",middlewares:m,wrapper:v,delayShow:y=0,delayHide:_=0,float:b=!1,hidden:x=!1,noArrow:w=!1,clickable:k=!1,closeOnEsc:S=!1,closeOnScroll:M=!1,closeOnResize:E=!1,openEvents:R,closeEvents:T,globalCloseEvents:A,imperativeModeOnly:O,style:C,position:I,afterShow:D,afterHide:L,disableTooltip:z,content:N,contentWrapperRef:F,isOpen:j,defaultIsOpen:H=!1,setIsOpen:B,previousActiveAnchor:W,activeAnchor:V,setActiveAnchor:$,border:U,opacity:Q,arrowColor:Y,arrowSize:q=8,role:X="tooltip"})=>{var Z;const G=(0,i.useRef)(null),J=(0,i.useRef)(null),et=(0,i.useRef)(null),nt=(0,i.useRef)(null),it=(0,i.useRef)(null),[ot,st]=(0,i.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:h}),[at,lt]=(0,i.useState)(!1),[ct,ut]=(0,i.useState)(!1),[ht,ft]=(0,i.useState)(null),dt=(0,i.useRef)(!1),gt=(0,i.useRef)(null),{anchorRefs:mt,setActiveAnchor:vt}=It(e),yt=(0,i.useRef)(!1),[bt,xt]=(0,i.useState)([]),kt=(0,i.useRef)(!1),Mt=p||d.includes("click"),Rt=Mt||(null==R?void 0:R.click)||(null==R?void 0:R.dblclick)||(null==R?void 0:R.mousedown),Ct=R?{...R}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!R&&Mt&&Object.assign(Ct,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Pt=T?{...T}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!T&&Mt&&Object.assign(Pt,{mouseleave:!1,blur:!1,mouseout:!1});const zt=A?{...A}:{escape:S||!1,scroll:M||!1,resize:E||!1,clickOutsideAnchor:Rt||!1};O&&(Object.assign(Ct,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pt,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(zt,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),At(()=>(kt.current=!0,()=>{kt.current=!1}),[]);const Nt=t=>{kt.current&&(t&&ut(!0),setTimeout(()=>{kt.current&&(null==B||B(t),void 0===j&<(t))},10))};(0,i.useEffect)(()=>{if(e){if(at){n(W);const i=t(V),r=[...new Set([...i,e])].filter(Boolean).join(" ");null==V||V.setAttribute("aria-describedby",r)}else n(V);return()=>{n(V),n(W)}}function t(t){var e;return(null===(e=null==t?void 0:t.getAttribute("aria-describedby"))||void 0===e?void 0:e.split(" "))||[]}function n(n){const i=t(n).filter(t=>t!==e);i.length?null==n||n.setAttribute("aria-describedby",i.join(" ")):null==n||n.removeAttribute("aria-describedby")}},[V,at,e,W]),(0,i.useEffect)(()=>{if(void 0===j)return()=>null;j&&ut(!0);const t=setTimeout(()=>{lt(j)},10);return()=>{clearTimeout(t)}},[j]),(0,i.useEffect)(()=>{if(at!==dt.current)if(Ot(it),dt.current=at,at)null==D||D();else{const t=(()=>{const t=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!t)return 0;const[,e,n]=t;return Number(e)*("ms"===n?1:1e3)})();it.current=setTimeout(()=>{ut(!1),ft(null),null==L||L()},t+25)}},[at]);const Ft=t=>{st(e=>Et(e,t)?e:t)},jt=(t=y)=>{Ot(et),ct?Nt(!0):et.current=setTimeout(()=>{Nt(!0)},t)},Ht=(t=_)=>{Ot(nt),nt.current=setTimeout(()=>{yt.current||Nt(!1)},t)},Bt=t=>{var e;if(!t)return;const n=null!==(e=t.currentTarget)&&void 0!==e?e:t.target;if(!(null==n?void 0:n.isConnected))return $(null),void vt({current:null});y?jt():Nt(!0),$(n),vt({current:n}),Ot(nt)},Wt=()=>{k?Ht(_||100):_?Ht():Nt(!1),Ot(et)},Vt=({x:t,y:e})=>{var n;const i={getBoundingClientRect:()=>({x:t,y:e,width:0,height:0,top:e,left:t,right:t,bottom:e})};wt({place:null!==(n=null==ht?void 0:ht.place)&&void 0!==n?n:h,offset:f,elementReference:i,tooltipReference:G.current,tooltipArrowReference:J.current,strategy:g,middlewares:m,border:U,arrowSize:q}).then(t=>{Ft(t)})},$t=t=>{if(!t)return;const e=t,n={x:e.clientX,y:e.clientY};Vt(n),gt.current=n},Ut=t=>{var e;if(!at)return;const n=t.target;n.isConnected&&((null===(e=G.current)||void 0===e?void 0:e.contains(n))||[document.querySelector(`[id='${c}']`),...bt].some(t=>null==t?void 0:t.contains(n))||(Nt(!1),Ot(et)))},Qt=St(Bt,50,!0),Yt=St(Wt,50,!0),qt=t=>{Yt.cancel(),Qt(t)},Xt=()=>{Qt.cancel(),Yt()},Zt=(0,i.useCallback)(()=>{var t,e;const n=null!==(t=null==ht?void 0:ht.position)&&void 0!==t?t:I;n?Vt(n):b?gt.current&&Vt(gt.current):(null==V?void 0:V.isConnected)&&wt({place:null!==(e=null==ht?void 0:ht.place)&&void 0!==e?e:h,offset:f,elementReference:V,tooltipReference:G.current,tooltipArrowReference:J.current,strategy:g,middlewares:m,border:U,arrowSize:q}).then(t=>{kt.current&&Ft(t)})},[at,V,N,C,h,null==ht?void 0:ht.place,f,g,I,null==ht?void 0:ht.position,b,q]);(0,i.useEffect)(()=>{var t,e;const n=new Set(mt);bt.forEach(t=>{(null==z?void 0:z(t))||n.add({current:t})});const i=document.querySelector(`[id='${c}']`);i&&!(null==z?void 0:z(i))&&n.add({current:i});const s=()=>{Nt(!1)},l=Tt(V),u=Tt(G.current);zt.scroll&&(window.addEventListener("scroll",s),null==l||l.addEventListener("scroll",s),null==u||u.addEventListener("scroll",s));let h=null;zt.resize?window.addEventListener("resize",s):V&&G.current&&(h=function(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:h=!1}=i,f=tt(t),d=s||l?[...f?K(f):[],...e?K(e):[]]:[];d.forEach(t=>{s&&t.addEventListener("scroll",n,{passive:!0}),l&&t.addEventListener("resize",n)});const p=f&&u?function(t,e){let n,i=null;const s=P(t);function l(){var t;clearTimeout(n),null==(t=i)||t.disconnect(),i=null}return function c(u,h){void 0===u&&(u=!1),void 0===h&&(h=1),l();const f=t.getBoundingClientRect(),{left:d,top:p,width:g,height:m}=f;if(u||e(),!g||!m)return;const v={rootMargin:-a(p)+"px "+-a(s.clientWidth-(d+g))+"px "+-a(s.clientHeight-(p+m))+"px "+-a(d)+"px",threshold:o(0,r(1,h))||1};let y=!0;function _(e){const i=e[0].intersectionRatio;if(i!==h){if(!y)return c();i?c(!1,i):n=setTimeout(()=>{c(!1,1e-7)},1e3)}1!==i||pt(f,t.getBoundingClientRect())||c(),y=!1}try{i=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch(t){i=new IntersectionObserver(_,v)}i.observe(t)}(!0),l}(f,n):null;let g,m=-1,v=null;c&&(v=new ResizeObserver(t=>{let[i]=t;i&&i.target===f&&v&&e&&(v.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var t;null==(t=v)||t.observe(e)})),n()}),f&&!h&&v.observe(f),e&&v.observe(e));let y=h?rt(t):null;return h&&function e(){const i=rt(t);y&&!pt(y,i)&&n(),y=i,g=requestAnimationFrame(e)}(),n(),()=>{var t;d.forEach(t=>{s&&t.removeEventListener("scroll",n),l&&t.removeEventListener("resize",n)}),null==p||p(),null==(t=v)||t.disconnect(),v=null,h&&cancelAnimationFrame(g)}}(V,G.current,Zt,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=t=>{"Escape"===t.key&&Nt(!1)};zt.escape&&window.addEventListener("keydown",f),zt.clickOutsideAnchor&&window.addEventListener("click",Ut);const d=[],p=t=>Boolean((null==t?void 0:t.target)&&(null==V?void 0:V.contains(t.target))),g=t=>{at&&p(t)||Bt(t)},m=t=>{at&&p(t)&&Wt()},v=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(Ct).forEach(([t,e])=>{e&&(v.includes(t)?d.push({event:t,listener:qt}):y.includes(t)&&d.push({event:t,listener:g}))}),Object.entries(Pt).forEach(([t,e])=>{e&&(v.includes(t)?d.push({event:t,listener:Xt}):y.includes(t)&&d.push({event:t,listener:m}))}),b&&d.push({event:"pointermove",listener:$t});const _=()=>{yt.current=!0},x=()=>{yt.current=!1,Wt()},w=k&&(Pt.mouseout||Pt.mouseleave);return w&&(null===(t=G.current)||void 0===t||t.addEventListener("mouseover",_),null===(e=G.current)||void 0===e||e.addEventListener("mouseout",x)),d.forEach(({event:t,listener:e})=>{n.forEach(n=>{var i;null===(i=n.current)||void 0===i||i.addEventListener(t,e)})}),()=>{var t,e;zt.scroll&&(window.removeEventListener("scroll",s),null==l||l.removeEventListener("scroll",s),null==u||u.removeEventListener("scroll",s)),zt.resize?window.removeEventListener("resize",s):null==h||h(),zt.clickOutsideAnchor&&window.removeEventListener("click",Ut),zt.escape&&window.removeEventListener("keydown",f),w&&(null===(t=G.current)||void 0===t||t.removeEventListener("mouseover",_),null===(e=G.current)||void 0===e||e.removeEventListener("mouseout",x)),d.forEach(({event:t,listener:e})=>{n.forEach(n=>{var i;null===(i=n.current)||void 0===i||i.removeEventListener(t,e)})})}},[V,Zt,ct,mt,bt,R,T,A,Mt,y,_]),(0,i.useEffect)(()=>{var t,n;let i=null!==(n=null!==(t=null==ht?void 0:ht.anchorSelect)&&void 0!==t?t:u)&&void 0!==n?n:"";!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`);const r=new MutationObserver(t=>{const n=[],r=[];t.forEach(t=>{if("attributes"===t.type&&"data-tooltip-id"===t.attributeName&&(t.target.getAttribute("data-tooltip-id")===e?n.push(t.target):t.oldValue===e&&r.push(t.target)),"childList"===t.type){if(V){const e=[...t.removedNodes].filter(t=>1===t.nodeType);if(i)try{r.push(...e.filter(t=>t.matches(i))),r.push(...e.flatMap(t=>[...t.querySelectorAll(i)]))}catch(t){}e.some(t=>{var e;return!!(null===(e=null==t?void 0:t.contains)||void 0===e?void 0:e.call(t,V))&&(ut(!1),Nt(!1),$(null),Ot(et),Ot(nt),!0)})}if(i)try{const e=[...t.addedNodes].filter(t=>1===t.nodeType);n.push(...e.filter(t=>t.matches(i))),n.push(...e.flatMap(t=>[...t.querySelectorAll(i)]))}catch(t){}}}),(n.length||r.length)&&xt(t=>[...t.filter(t=>!r.includes(t)),...n])});return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}},[e,u,null==ht?void 0:ht.anchorSelect,V]),(0,i.useEffect)(()=>{Zt()},[Zt]),(0,i.useEffect)(()=>{if(!(null==F?void 0:F.current))return()=>null;const t=new ResizeObserver(()=>{setTimeout(()=>Zt())});return t.observe(F.current),()=>{t.disconnect()}},[N,null==F?void 0:F.current]),(0,i.useEffect)(()=>{var t;const e=document.querySelector(`[id='${c}']`),n=[...bt,e];V&&n.includes(V)||$(null!==(t=bt[0])&&void 0!==t?t:e)},[c,bt,V]),(0,i.useEffect)(()=>(H&&Nt(!0),()=>{Ot(et),Ot(nt)}),[]),(0,i.useEffect)(()=>{var t;let n=null!==(t=null==ht?void 0:ht.anchorSelect)&&void 0!==t?t:u;if(!n&&e&&(n=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),n)try{const t=Array.from(document.querySelectorAll(n));xt(t)}catch(t){xt([])}},[e,u,null==ht?void 0:ht.anchorSelect]),(0,i.useEffect)(()=>{et.current&&(Ot(et),jt(y))},[y]);const Kt=null!==(Z=null==ht?void 0:ht.content)&&void 0!==Z?Z:N,Gt=at&&Object.keys(ot.tooltipStyles).length>0;return(0,i.useImperativeHandle)(t,()=>({open:t=>{if(null==t?void 0:t.anchorSelect)try{document.querySelector(t.anchorSelect)}catch(e){return void console.warn(`[react-tooltip] "${t.anchorSelect}" is not a valid CSS selector`)}ft(null!=t?t:null),(null==t?void 0:t.delay)?jt(t.delay):Nt(!0)},close:t=>{(null==t?void 0:t.delay)?Ht(t.delay):Nt(!1)},activeAnchor:V,place:ot.place,isOpen:Boolean(ct&&!x&&Kt&&Gt)})),ct&&!x&&Kt?i.createElement(v,{id:e,role:X,className:_t("react-tooltip",Dt.tooltip,Lt.tooltip,Lt[l],n,`react-tooltip__place-${ot.place}`,Dt[Gt?"show":"closing"],Gt?"react-tooltip__show":"react-tooltip__closing","fixed"===g&&Dt.fixed,k&&Dt.clickable),onTransitionEnd:t=>{Ot(it),at||"opacity"!==t.propertyName||(ut(!1),ft(null),null==L||L())},style:{...C,...ot.tooltipStyles,opacity:void 0!==Q&&Gt?Q:void 0},ref:G},i.createElement(v,{className:_t("react-tooltip-content-wrapper",Dt.content,Lt.content)},Kt),i.createElement(v,{className:_t("react-tooltip-arrow",Dt.arrow,Lt.arrow,s,w&&Dt.noArrow),style:{...ot.tooltipArrowStyles,background:Y?`linear-gradient(to right bottom, transparent 50%, ${Y} 50%)`:void 0,"--rt-arrow-size":`${q}px`},ref:J})):null},Nt=({content:t})=>i.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),Ft=i.forwardRef(({id:t,anchorId:e,anchorSelect:n,content:r,html:o,render:s,className:a,classNameArrow:l,variant:c="dark",place:u="top",offset:h=10,wrapper:f="div",children:d=null,events:p=["hover"],openOnClick:g=!1,positionStrategy:m="absolute",middlewares:v,delayShow:y=0,delayHide:_=0,float:b=!1,hidden:x=!1,noArrow:w=!1,clickable:k=!1,closeOnEsc:S=!1,closeOnScroll:M=!1,closeOnResize:E=!1,openEvents:R,closeEvents:T,globalCloseEvents:A,imperativeModeOnly:O=!1,style:C,position:P,isOpen:I,defaultIsOpen:D=!1,disableStyleInjection:L=!1,border:z,opacity:N,arrowColor:F,arrowSize:j,setIsOpen:H,afterShow:B,afterHide:W,disableTooltip:V,role:$="tooltip"},U)=>{const[Q,Y]=(0,i.useState)(r),[q,X]=(0,i.useState)(o),[Z,K]=(0,i.useState)(u),[G,J]=(0,i.useState)(c),[tt,et]=(0,i.useState)(h),[nt,it]=(0,i.useState)(y),[rt,ot]=(0,i.useState)(_),[st,at]=(0,i.useState)(b),[lt,ct]=(0,i.useState)(x),[ut,ht]=(0,i.useState)(f),[ft,dt]=(0,i.useState)(p),[pt,gt]=(0,i.useState)(m),[mt,vt]=(0,i.useState)(null),[yt,bt]=(0,i.useState)(null),xt=(0,i.useRef)(null),wt=(0,i.useRef)(L),{anchorRefs:St,activeAnchor:Mt}=It(t),Et=t=>null==t?void 0:t.getAttributeNames().reduce((e,n)=>{var i;return n.startsWith("data-tooltip-")&&(e[n.replace(/^data-tooltip-/,"")]=null!==(i=null==t?void 0:t.getAttribute(n))&&void 0!==i?i:null),e},{}),Rt=t=>{const e={place:t=>{var e;K(null!==(e=t)&&void 0!==e?e:u)},content:t=>{Y(null!=t?t:r)},html:t=>{X(null!=t?t:o)},variant:t=>{var e;J(null!==(e=t)&&void 0!==e?e:c)},offset:t=>{et(null===t?h:Number(t))},wrapper:t=>{var e;ht(null!==(e=t)&&void 0!==e?e:f)},events:t=>{const e=null==t?void 0:t.split(" ");dt(null!=e?e:p)},"position-strategy":t=>{var e;gt(null!==(e=t)&&void 0!==e?e:m)},"delay-show":t=>{it(null===t?y:Number(t))},"delay-hide":t=>{ot(null===t?_:Number(t))},float:t=>{at(null===t?b:"true"===t)},hidden:t=>{ct(null===t?x:"true"===t)},"class-name":t=>{vt(t)}};Object.values(e).forEach(t=>t(null)),Object.entries(t).forEach(([t,n])=>{var i;null===(i=e[t])||void 0===i||i.call(e,n)})};(0,i.useEffect)(()=>{Y(r)},[r]),(0,i.useEffect)(()=>{X(o)},[o]),(0,i.useEffect)(()=>{K(u)},[u]),(0,i.useEffect)(()=>{J(c)},[c]),(0,i.useEffect)(()=>{et(h)},[h]),(0,i.useEffect)(()=>{it(y)},[y]),(0,i.useEffect)(()=>{ot(_)},[_]),(0,i.useEffect)(()=>{at(b)},[b]),(0,i.useEffect)(()=>{ct(x)},[x]),(0,i.useEffect)(()=>{gt(m)},[m]),(0,i.useEffect)(()=>{wt.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[L]),(0,i.useEffect)(()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))},[]),(0,i.useEffect)(()=>{var i;const r=new Set(St);let o=n;if(!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),o)try{document.querySelectorAll(o).forEach(t=>{r.add({current:t})})}catch(i){console.warn(`[react-tooltip] "${o}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${e}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const a=null!==(i=null!=yt?yt:s)&&void 0!==i?i:Mt.current,l=new MutationObserver(t=>{t.forEach(t=>{var e;if(!a||"attributes"!==t.type||!(null===(e=t.attributeName)||void 0===e?void 0:e.startsWith("data-tooltip-")))return;const n=Et(a);Rt(n)})}),c={attributes:!0,childList:!1,subtree:!1};if(a){const t=Et(a);Rt(t),l.observe(a,c)}return()=>{l.disconnect()}},[St,Mt,yt,e,n]),(0,i.useEffect)(()=>{(null==C?void 0:C.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),z&&!kt("border",`${z}`)&&console.warn(`[react-tooltip] "${z}" is not a valid \`border\`.`),(null==C?void 0:C.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),N&&!kt("opacity",`${N}`)&&console.warn(`[react-tooltip] "${N}" is not a valid \`opacity\`.`)},[]);let Tt=d;const At=(0,i.useRef)(null);if(s){const t=s({content:(null==yt?void 0:yt.getAttribute("data-tooltip-content"))||Q||null,activeAnchor:yt});Tt=t?i.createElement("div",{ref:At,className:"react-tooltip-content-wrapper"},t):null}else Q&&(Tt=Q);q&&(Tt=i.createElement(Nt,{content:q}));const Ot={forwardRef:U,id:t,anchorId:e,anchorSelect:n,className:_t(a,mt),classNameArrow:l,content:Tt,contentWrapperRef:At,place:Z,variant:G,offset:tt,wrapper:ut,events:ft,openOnClick:g,positionStrategy:pt,middlewares:v,delayShow:nt,delayHide:rt,float:st,hidden:lt,noArrow:w,clickable:k,closeOnEsc:S,closeOnScroll:M,closeOnResize:E,openEvents:R,closeEvents:T,globalCloseEvents:A,imperativeModeOnly:O,style:C,position:P,isOpen:I,defaultIsOpen:D,border:z,opacity:N,arrowColor:F,arrowSize:j,setIsOpen:H,afterShow:B,afterHide:W,disableTooltip:V,activeAnchor:yt,previousActiveAnchor:xt.current,setActiveAnchor:t=>{bt(e=>((null==t?void 0:t.isSameNode(e))||(xt.current=e),t))},role:$};return i.createElement(zt,{...Ot})});"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",t=>{t.detail.disableCore||xt({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1;-webkit-backface-visibility:hidden;backface-visibility:hidden}.core-styles-module_content__BRKdB{position:relative;z-index:1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),t.detail.disableBase||xt({css:"\n.styles-module_tooltip__mnnfp{border-radius:3px;font-size:90%;width:max-content}.styles-module_content__ydYdI{background:inherit;border-radius:inherit;padding:8px 16px}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})})}}]);
|