@sysvale/cuida 3.151.1 → 3.151.2

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.
@@ -15,12 +15,12 @@
15
15
  * Released under the MIT License
16
16
  */class Uk{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,a,r){const s=n.listeners[r],o=n.duration;s.forEach(l=>l({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(a-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Wm.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((a,r)=>{if(!a.running||!a.items.length)return;const s=a.items;let o=s.length-1,l=!1,d;for(;o>=0;--o)d=s[o],d._active?(d._total>a.duration&&(a.duration=d._total),d.tick(t),l=!0):(s[o]=s[s.length-1],s.pop());l&&(r.draw(),this._notify(r,a,t,"progress")),s.length||(a.running=!1,this._notify(r,a,t,"complete"),a.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let a=n.get(t);return a||(a={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,a)),a}listen(t,n,a){this._getAnims(t).listeners[n].push(a)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((a,r)=>Math.max(a,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const a=n.items;let r=a.length-1;for(;r>=0;--r)a[r].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Ca=new Uk;const v2="transparent",qk={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const a=Km(e||v2),r=a.valid&&Km(t||v2);return r&&r.valid?r.mix(a,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Gk{constructor(t,n,a,r){const s=n[a];r=xl([t.to,r,s,t.from]);const o=xl([t.from,s,r]);this._active=!0,this._fn=t.fn||qk[t.type||typeof o],this._easing=_l[t.easing]||_l.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=a,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(t,n,a){if(this._active){this._notify(!1);const r=this._target[this._prop],s=a-this._start,o=this._duration-s;this._start=a,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=xl([t.to,n,r,t.from]),this._from=xl([t.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,a=this._duration,r=this._prop,s=this._from,o=this._loop,l=this._to;let d;if(this._active=s!==l&&(o||n<a),!this._active){this._target[r]=l,this._notify(!0);return}if(n<0){this._target[r]=s;return}d=n/a%2,d=o&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[r]=this._fn(s,l,d)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,a)=>{t.push({res:n,rej:a})})}_notify(t){const n=t?"res":"rej",a=this._promises||[];for(let r=0;r<a.length;r++)a[r][n]()}}class _2{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!et(t))return;const n=Object.keys(Ft.animation),a=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const s=t[r];if(!et(s))return;const o={};for(const l of n)o[l]=s[l];(Pt(s.properties)&&s.properties||[r]).forEach(l=>{(l===r||!a.has(l))&&a.set(l,o)})})}_animateOptions(t,n){const a=n.options,r=Zk(t,a);if(!r)return[];const s=this._createAnimations(r,a);return a.$shared&&Kk(t.options.$animations,a).then(()=>{t.options=a},()=>{}),s}_createAnimations(t,n){const a=this._properties,r=[],s=t.$animations||(t.$animations={}),o=Object.keys(n),l=Date.now();let d;for(d=o.length-1;d>=0;--d){const h=o[d];if(h.charAt(0)==="$")continue;if(h==="options"){r.push(...this._animateOptions(t,n));continue}const f=n[h];let m=s[h];const g=a.get(h);if(m)if(g&&m.active()){m.update(g,f,l);continue}else m.cancel();if(!g||!g.duration){t[h]=f;continue}s[h]=m=new Gk(g,t,h,f),r.push(m)}return r}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const a=this._createAnimations(t,n);if(a.length)return Ca.add(this._chart,a),!0}}function Kk(e,t){const n=[],a=Object.keys(t);for(let r=0;r<a.length;r++){const s=e[a[r]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function Zk(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function w2(e,t){const n=e&&e.options||{},a=n.reverse,r=n.min===void 0?t:0,s=n.max===void 0?t:0;return{start:a?s:r,end:a?r:s}}function Xk(e,t,n){if(n===!1)return!1;const a=w2(e,n),r=w2(t,n);return{top:r.end,right:a.end,bottom:r.start,left:a.start}}function Jk(e){let t,n,a,r;return et(e)?(t=e.top,n=e.right,a=e.bottom,r=e.left):t=n=a=r=e,{top:t,right:n,bottom:a,left:r,disabled:e===!1}}function k2(e,t){const n=[],a=e._getSortedDatasetMetas(t);let r,s;for(r=0,s=a.length;r<s;++r)n.push(a[r].index);return n}function C2(e,t,n,a={}){const r=e.keys,s=a.mode==="single";let o,l,d,h;if(t===null)return;let f=!1;for(o=0,l=r.length;o<l;++o){if(d=+r[o],d===n){if(f=!0,a.all)continue;break}h=e.values[d],qt(h)&&(s||t===0||na(t)===na(h))&&(t+=h)}return!f&&!a.all?0:t}function Qk(e,t){const{iScale:n,vScale:a}=t,r=n.axis==="x"?"x":"y",s=a.axis==="x"?"x":"y",o=Object.keys(e),l=new Array(o.length);let d,h,f;for(d=0,h=o.length;d<h;++d)f=o[d],l[d]={[r]:f,[s]:e[f]};return l}function m0(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function e9(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function t9(e){const{min:t,max:n,minDefined:a,maxDefined:r}=e.getUserBounds();return{min:a?t:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function n9(e,t,n){const a=e[t]||(e[t]={});return a[n]||(a[n]={})}function x2(e,t,n,a){for(const r of t.getMatchingVisibleMetas(a).reverse()){const s=e[r.index];if(n&&s>0||!n&&s<0)return r.index}return null}function S2(e,t){const{chart:n,_cachedMeta:a}=e,r=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:l}=a,d=s.axis,h=o.axis,f=e9(s,o,a),m=t.length;let g;for(let y=0;y<m;++y){const v=t[y],{[d]:_,[h]:k}=v,x=v._stacks||(v._stacks={});g=x[h]=n9(r,f,_),g[l]=k,g._top=x2(g,o,!0,a.type),g._bottom=x2(g,o,!1,a.type);const M=g._visualValues||(g._visualValues={});M[l]=k}}function g0(e,t){const n=e.scales;return Object.keys(n).filter(a=>n[a].axis===t).shift()}function i9(e,t){return rr(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function a9(e,t,n){return rr(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Sl(e,t){const n=e.controller.index,a=e.vScale&&e.vScale.axis;if(a){t=t||e._parsed;for(const r of t){const s=r._stacks;if(!s||s[a]===void 0||s[a][n]===void 0)return;delete s[a][n],s[a]._visualValues!==void 0&&s[a]._visualValues[n]!==void 0&&delete s[a]._visualValues[n]}}}const y0=e=>e==="reset"||e==="none",M2=(e,t)=>t?e:Object.assign({},e),r9=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:k2(n,!0),values:null};class Li{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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=m0(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&&Sl(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,a=this.getDataset(),r=(m,g,y,v)=>m==="x"?g:m==="r"?v:y,s=n.xAxisID=Re(a.xAxisID,g0(t,"x")),o=n.yAxisID=Re(a.yAxisID,g0(t,"y")),l=n.rAxisID=Re(a.rAxisID,g0(t,"r")),d=n.indexAxis,h=n.iAxisID=r(d,s,o,l),f=n.vAxisID=r(d,o,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(h),n.vScale=this.getScaleForId(f)}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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Rm(this._data,this),t._stacked&&Sl(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),a=this._data;if(et(n)){const r=this._cachedMeta;this._data=Qk(n,r)}else if(a!==n){if(a){Rm(a,this);const r=this._cachedMeta;Sl(r),r._parsed=[]}n&&Object.isExtensible(n)&&Yw(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,a=this.getDataset();let r=!1;this._dataCheck();const s=n._stacked;n._stacked=m0(n.vScale,n),n.stack!==a.stack&&(r=!0,Sl(n),n.stack=a.stack),this._resyncElements(t),(r||s!==n._stacked)&&(S2(this,n._parsed),n._stacked=m0(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),a=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(a,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:a,_data:r}=this,{iScale:s,_stacked:o}=a,l=s.axis;let d=t===0&&n===r.length?!0:a._sorted,h=t>0&&a._parsed[t-1],f,m,g;if(this._parsing===!1)a._parsed=r,a._sorted=!0,g=r;else{Pt(r[t])?g=this.parseArrayData(a,r,t,n):et(r[t])?g=this.parseObjectData(a,r,t,n):g=this.parsePrimitiveData(a,r,t,n);const y=()=>m[l]===null||h&&m[l]<h[l];for(f=0;f<n;++f)a._parsed[f+t]=m=g[f],d&&(y()&&(d=!1),h=m);a._sorted=d}o&&S2(this,g)}parsePrimitiveData(t,n,a,r){const{iScale:s,vScale:o}=t,l=s.axis,d=o.axis,h=s.getLabels(),f=s===o,m=new Array(r);let g,y,v;for(g=0,y=r;g<y;++g)v=g+a,m[g]={[l]:f||s.parse(h[v],v),[d]:o.parse(n[v],v)};return m}parseArrayData(t,n,a,r){const{xScale:s,yScale:o}=t,l=new Array(r);let d,h,f,m;for(d=0,h=r;d<h;++d)f=d+a,m=n[f],l[d]={x:s.parse(m[0],f),y:o.parse(m[1],f)};return l}parseObjectData(t,n,a,r){const{xScale:s,yScale:o}=t,{xAxisKey:l="x",yAxisKey:d="y"}=this._parsing,h=new Array(r);let f,m,g,y;for(f=0,m=r;f<m;++f)g=f+a,y=n[g],h[f]={x:s.parse(nr(y,l),g),y:o.parse(nr(y,d),g)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,a){const r=this.chart,s=this._cachedMeta,o=n[t.axis],l={keys:k2(r,!0),values:n._stacks[t.axis]._visualValues};return C2(l,o,s.index,{mode:a})}updateRangeFromParsed(t,n,a,r){const s=a[n.axis];let o=s===null?NaN:s;const l=r&&a._stacks[n.axis];r&&l&&(r.values=l,o=C2(r,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const a=this._cachedMeta,r=a._parsed,s=a._sorted&&t===a.iScale,o=r.length,l=this._getOtherScale(t),d=r9(n,a,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:m}=t9(l);let g,y;function v(){y=r[g];const _=y[l.axis];return!qt(y[t.axis])||f>_||m<_}for(g=0;g<o&&!(!v()&&(this.updateRangeFromParsed(h,t,y,d),s));++g);if(s){for(g=o-1;g>=0;--g)if(!v()){this.updateRangeFromParsed(h,t,y,d);break}}return h}getAllParsedValues(t){const n=this._cachedMeta._parsed,a=[];let r,s,o;for(r=0,s=n.length;r<s;++r)o=n[r][t.axis],qt(o)&&a.push(o);return a}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,a=n.iScale,r=n.vScale,s=this.getParsed(t);return{label:a?""+a.getLabelForValue(s[a.axis]):"",value:r?""+r.getLabelForValue(s[r.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=Jk(Re(this.options.clip,Xk(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,a=this._cachedMeta,r=a.data||[],s=n.chartArea,o=[],l=this._drawStart||0,d=this._drawCount||r.length-l,h=this.options.drawActiveElementsOnTop;let f;for(a.dataset&&a.dataset.draw(t,s,l,d),f=l;f<l+d;++f){const m=r[f];m.hidden||(m.active&&h?o.push(m):m.draw(t,s))}for(f=0;f<o.length;++f)o[f].draw(t,s)}getStyle(t,n){const a=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(a):this.resolveDataElementOptions(t||0,a)}getContext(t,n,a){const r=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];s=o.$context||(o.$context=a9(this.getContext(),t,o)),s.parsed=this.getParsed(t),s.raw=r.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=i9(this.chart.getContext(),this.index)),s.dataset=r,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=a,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",a){const r=n==="active",s=this._cachedDataOpts,o=t+"-"+n,l=s[o],d=this.enableOptionSharing&&yl(a);if(l)return M2(l,d);const h=this.chart.config,f=h.datasetElementScopeKeys(this._type,t),m=r?[`${t}Hover`,"hover",t,""]:[t,""],g=h.getOptionScopes(this.getDataset(),f),y=Object.keys(Ft.elements[t]),v=()=>this.getContext(a,r,n),_=h.resolveNamedOptions(g,y,v,m);return _.$shared&&(_.$shared=d,s[o]=Object.freeze(M2(_,d))),_}_resolveAnimations(t,n,a){const r=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,l=s[o];if(l)return l;let d;if(r.options.animation!==!1){const f=this.chart.config,m=f.datasetAnimationScopeKeys(this._type,n),g=f.getOptionScopes(this.getDataset(),m);d=f.createResolver(g,this.getContext(t,a,n))}const h=new _2(r,d&&d.animations);return d&&d._cacheable&&(s[o]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||y0(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const a=this.resolveDataElementOptions(t,n),r=this._sharedOptions,s=this.getSharedOptions(a),o=this.includeOptions(n,s)||s!==r;return this.updateSharedOptions(s,n,a),{sharedOptions:s,includeOptions:o}}updateElement(t,n,a,r){y0(r)?Object.assign(t,a):this._resolveAnimations(n,r).update(t,a)}updateSharedOptions(t,n,a){t&&!y0(n)&&this._resolveAnimations(void 0,n).update(t,a)}_setStyle(t,n,a,r){t.active=r;const s=this.getStyle(n,r);this._resolveAnimations(n,a,r).update(t,{options:!r&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,a){this._setStyle(t,a,"active",!1)}setHoverStyle(t,n,a){this._setStyle(t,a,"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 n=this._data,a=this._cachedMeta.data;for(const[l,d,h]of this._syncList)this[l](d,h);this._syncList=[];const r=a.length,s=n.length,o=Math.min(s,r);o&&this.parse(0,o),s>r?this._insertElements(r,s-r,t):s<r&&this._removeElements(s,r-s)}_insertElements(t,n,a=!0){const r=this._cachedMeta,s=r.data,o=t+n;let l;const d=h=>{for(h.length+=n,l=h.length-1;l>=o;l--)h[l]=h[l-n]};for(d(s),l=t;l<o;++l)s[l]=new this.dataElementType;this._parsing&&d(r._parsed),this.parse(t,n),a&&this.updateElements(s,t,n,"reset")}updateElements(t,n,a,r){}_removeElements(t,n){const a=this._cachedMeta;if(this._parsing){const r=a._parsed.splice(t,n);a._stacked&&Sl(a,r)}a.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,a,r]=t;this[n](a,r)}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,n){n&&this._sync(["_removeElements",t,n]);const a=arguments.length-2;a&&this._sync(["_insertElements",t,a])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}we(Li,"defaults",{}),we(Li,"datasetElementType",null),we(Li,"dataElementType",null);function s9(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let a=[];for(let r=0,s=n.length;r<s;r++)a=a.concat(n[r].controller.getAllParsedValues(e));e._cache.$bar=Hm(a.sort((r,s)=>r-s))}return e._cache.$bar}function o9(e){const t=e.iScale,n=s9(t,e.type);let a=t._length,r,s,o,l;const d=()=>{o===32767||o===-32768||(yl(l)&&(a=Math.min(a,Math.abs(o-l)||a)),l=o)};for(r=0,s=n.length;r<s;++r)o=t.getPixelForValue(n[r]),d();for(l=void 0,r=0,s=t.ticks.length;r<s;++r)o=t.getPixelForTick(r),d();return a}function l9(e,t,n,a){const r=n.barThickness;let s,o;return Ze(r)?(s=t.min*n.categoryPercentage,o=n.barPercentage):(s=r*a,o=1),{chunk:s/a,ratio:o,start:t.pixels[e]-s/2}}function c9(e,t,n,a){const r=t.pixels,s=r[e];let o=e>0?r[e-1]:null,l=e<r.length-1?r[e+1]:null;const d=n.categoryPercentage;o===null&&(o=s-(l===null?t.end-t.start:l-s)),l===null&&(l=s+s-o);const h=s-(s-Math.min(o,l))/2*d;return{chunk:Math.abs(l-o)/2*d/a,ratio:n.barPercentage,start:h}}function d9(e,t,n,a){const r=n.parse(e[0],a),s=n.parse(e[1],a),o=Math.min(r,s),l=Math.max(r,s);let d=o,h=l;Math.abs(o)>Math.abs(l)&&(d=l,h=o),t[n.axis]=h,t._custom={barStart:d,barEnd:h,start:r,end:s,min:o,max:l}}function B2(e,t,n,a){return Pt(e)?d9(e,t,n,a):t[n.axis]=n.parse(e,a),t}function E2(e,t,n,a){const r=e.iScale,s=e.vScale,o=r.getLabels(),l=r===s,d=[];let h,f,m,g;for(h=n,f=n+a;h<f;++h)g=t[h],m={},m[r.axis]=l||r.parse(o[h],h),d.push(B2(g,m,s,h));return d}function b0(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function u9(e,t,n){return e!==0?na(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function h9(e){let t,n,a,r,s;return e.horizontal?(t=e.base>e.x,n="left",a="right"):(t=e.base<e.y,n="bottom",a="top"),t?(r="end",s="start"):(r="start",s="end"),{start:n,end:a,reverse:t,top:r,bottom:s}}function f9(e,t,n,a){let r=t.borderSkipped;const s={};if(!r){e.borderSkipped=s;return}if(r===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:l,reverse:d,top:h,bottom:f}=h9(e);r==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===a?r=h:(n._bottom||0)===a?r=f:(s[O2(f,o,l,d)]=!0,r=h)),s[O2(r,o,l,d)]=!0,e.borderSkipped=s}function O2(e,t,n,a){return a?(e=p9(e,t,n),e=D2(e,n,t)):e=D2(e,t,n),e}function p9(e,t,n){return e===t?n:e===n?t:e}function D2(e,t,n){return e==="start"?t:e==="end"?n:e}function m9(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Ml extends Li{parsePrimitiveData(t,n,a,r){return E2(t,n,a,r)}parseArrayData(t,n,a,r){return E2(t,n,a,r)}parseObjectData(t,n,a,r){const{iScale:s,vScale:o}=t,{xAxisKey:l="x",yAxisKey:d="y"}=this._parsing,h=s.axis==="x"?l:d,f=o.axis==="x"?l:d,m=[];let g,y,v,_;for(g=a,y=a+r;g<y;++g)_=n[g],v={},v[s.axis]=s.parse(nr(_,h),g),m.push(B2(nr(_,f),v,o,g));return m}updateRangeFromParsed(t,n,a,r){super.updateRangeFromParsed(t,n,a,r);const s=a._custom;s&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:a,vScale:r}=n,s=this.getParsed(t),o=s._custom,l=b0(o)?"["+o.start+", "+o.end+"]":""+r.getLabelForValue(s[r.axis]);return{label:""+a.getLabelForValue(s[a.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,a,r){const s=r==="reset",{index:o,_cachedMeta:{vScale:l}}=this,d=l.getBasePixel(),h=l.isHorizontal(),f=this._getRuler(),{sharedOptions:m,includeOptions:g}=this._getSharedOptions(n,r);for(let y=n;y<n+a;y++){const v=this.getParsed(y),_=s||Ze(v[l.axis])?{base:d,head:d}:this._calculateBarValuePixels(y),k=this._calculateBarIndexPixels(y,f),x=(v._stacks||{})[l.axis],M={horizontal:h,base:_.base,enableBorderRadius:!x||b0(v._custom)||o===x._top||o===x._bottom,x:h?_.head:k.center,y:h?k.center:_.head,height:h?k.size:Math.abs(_.size),width:h?Math.abs(_.size):k.size};g&&(M.options=m||this.resolveDataElementOptions(y,t[y].active?"active":r));const B=M.options||t[y].options;f9(M,B,x,o),m9(M,B,f.ratio),this.updateElement(t[y],y,M,r)}}_getStacks(t,n){const{iScale:a}=this._cachedMeta,r=a.getMatchingVisibleMetas(this._type).filter(f=>f.controller.options.grouped),s=a.options.stacked,o=[],l=this._cachedMeta.controller.getParsed(n),d=l&&l[a.axis],h=f=>{const m=f._parsed.find(y=>y[a.axis]===d),g=m&&m[f.vScale.axis];if(Ze(g)||isNaN(g))return!0};for(const f of r)if(!(n!==void 0&&h(f))&&((s===!1||o.indexOf(f.stack)===-1||s===void 0&&f.stack===void 0)&&o.push(f.stack),f.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,a){const r=this._getStacks(t,a),s=n!==void 0?r.indexOf(n):-1;return s===-1?r.length-1:s}_getRuler(){const t=this.options,n=this._cachedMeta,a=n.iScale,r=[];let s,o;for(s=0,o=n.data.length;s<o;++s)r.push(a.getPixelForValue(this.getParsed(s)[a.axis],s));const l=t.barThickness;return{min:l||o9(n),pixels:r,start:a._startPixel,end:a._endPixel,stackCount:this._getStackCount(),scale:a,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:a,index:r},options:{base:s,minBarLength:o}}=this,l=s||0,d=this.getParsed(t),h=d._custom,f=b0(h);let m=d[n.axis],g=0,y=a?this.applyStack(n,d,a):m,v,_;y!==m&&(g=y-m,y=m),f&&(m=h.barStart,y=h.barEnd-h.barStart,m!==0&&na(m)!==na(h.barEnd)&&(g=0),g+=m);const k=!Ze(s)&&!f?s:g;let x=n.getPixelForValue(k);if(this.chart.getDataVisibility(t)?v=n.getPixelForValue(g+y):v=x,_=v-x,Math.abs(_)<o){_=u9(_,n,l)*o,m===l&&(x-=_/2);const M=n.getPixelForDecimal(0),B=n.getPixelForDecimal(1),C=Math.min(M,B),V=Math.max(M,B);x=Math.max(Math.min(x,V),C),v=x+_,a&&!f&&(d._stacks[n.axis]._visualValues[r]=n.getValueForPixel(v)-n.getValueForPixel(x))}if(x===n.getPixelForValue(l)){const M=na(_)*n.getLineWidthForValue(l)/2;x+=M,_-=M}return{size:_,base:x,head:v,center:v+_/2}}_calculateBarIndexPixels(t,n){const a=n.scale,r=this.options,s=r.skipNull,o=Re(r.maxBarThickness,1/0);let l,d;if(n.grouped){const h=s?this._getStackCount(t):n.stackCount,f=r.barThickness==="flex"?c9(t,n,r,h):l9(t,n,r,h),m=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0);l=f.start+f.chunk*m+f.chunk/2,d=Math.min(o,f.chunk*f.ratio)}else l=a.getPixelForValue(this.getParsed(t)[a.axis],t),d=Math.min(o,n.min*n.ratio);return{base:l-d/2,head:l+d/2,center:l,size:d}}draw(){const t=this._cachedMeta,n=t.vScale,a=t.data,r=a.length;let s=0;for(;s<r;++s)this.getParsed(s)[n.axis]!==null&&!a[s].hidden&&a[s].draw(this._ctx)}}we(Ml,"id","bar"),we(Ml,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),we(Ml,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class _d extends Li{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,a,r){const s=super.parsePrimitiveData(t,n,a,r);for(let o=0;o<s.length;o++)s[o]._custom=this.resolveDataElementOptions(o+a).radius;return s}parseArrayData(t,n,a,r){const s=super.parseArrayData(t,n,a,r);for(let o=0;o<s.length;o++){const l=n[a+o];s[o]._custom=Re(l[2],this.resolveDataElementOptions(o+a).radius)}return s}parseObjectData(t,n,a,r){const s=super.parseObjectData(t,n,a,r);for(let o=0;o<s.length;o++){const l=n[a+o];s[o]._custom=Re(l&&l.r&&+l.r,this.resolveDataElementOptions(o+a).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let a=t.length-1;a>=0;--a)n=Math.max(n,t[a].size(this.resolveDataElementOptions(a))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,a=this.chart.data.labels||[],{xScale:r,yScale:s}=n,o=this.getParsed(t),l=r.getLabelForValue(o.x),d=s.getLabelForValue(o.y),h=o._custom;return{label:a[t]||"",value:"("+l+", "+d+(h?", "+h:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,a,r){const s=r==="reset",{iScale:o,vScale:l}=this._cachedMeta,{sharedOptions:d,includeOptions:h}=this._getSharedOptions(n,r),f=o.axis,m=l.axis;for(let g=n;g<n+a;g++){const y=t[g],v=!s&&this.getParsed(g),_={},k=_[f]=s?o.getPixelForDecimal(.5):o.getPixelForValue(v[f]),x=_[m]=s?l.getBasePixel():l.getPixelForValue(v[m]);_.skip=isNaN(k)||isNaN(x),h&&(_.options=d||this.resolveDataElementOptions(g,y.active?"active":r),s&&(_.options.radius=0)),this.updateElement(y,g,_,r)}}resolveDataElementOptions(t,n){const a=this.getParsed(t);let r=super.resolveDataElementOptions(t,n);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const s=r.radius;return n!=="active"&&(r.radius=0),r.radius+=Re(a&&a._custom,s),r}}we(_d,"id","bubble"),we(_d,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),we(_d,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function g9(e,t,n){let a=1,r=1,s=0,o=0;if(t<Nt){const l=e,d=l+t,h=Math.cos(l),f=Math.sin(l),m=Math.cos(d),g=Math.sin(d),y=(B,C,V)=>vl(B,l,d,!0)?1:Math.max(C,C*n,V,V*n),v=(B,C,V)=>vl(B,l,d,!0)?-1:Math.min(C,C*n,V,V*n),_=y(0,h,m),k=y(Zt,f,g),x=v(At,h,m),M=v(At+Zt,f,g);a=(_-x)/2,r=(k-M)/2,s=-(_+x)/2,o=-(k+M)/2}return{ratioX:a,ratioY:r,offsetX:s,offsetY:o}}class sr extends Li{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const a=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=a;else{let s=d=>+a[d];if(et(a[t])){const{key:d="value"}=this._parsing;s=h=>+nr(a[h],d)}let o,l;for(o=t,l=t+n;o<l;++o)r._parsed[o]=s(o)}}_getRotation(){return zi(this.options.rotation-90)}_getCircumference(){return zi(this.options.circumference)}_getRotationExtents(){let t=Nt,n=-Nt;for(let a=0;a<this.chart.data.datasets.length;++a)if(this.chart.isDatasetVisible(a)&&this.chart.getDatasetMeta(a).type===this._type){const r=this.chart.getDatasetMeta(a).controller,s=r._getRotation(),o=r._getCircumference();t=Math.min(t,s),n=Math.max(n,s+o)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:a}=n,r=this._cachedMeta,s=r.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(a.width,a.height)-o)/2,0),d=Math.min(Ow(this.options.cutout,l),1),h=this._getRingWeight(this.index),{circumference:f,rotation:m}=this._getRotationExtents(),{ratioX:g,ratioY:y,offsetX:v,offsetY:_}=g9(m,f,d),k=(a.width-o)/g,x=(a.height-o)/y,M=Math.max(Math.min(k,x)/2,0),B=Vm(this.options.radius,M),C=Math.max(B*d,0),V=(B-C)/this._getVisibleDatasetWeightTotal();this.offsetX=v*B,this.offsetY=_*B,r.total=this.calculateTotal(),this.outerRadius=B-V*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-V*h,0),this.updateElements(s,0,s.length,t)}_circumference(t,n){const a=this.options,r=this._cachedMeta,s=this._getCircumference();return n&&a.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*s/Nt)}updateElements(t,n,a,r){const s=r==="reset",o=this.chart,l=o.chartArea,h=o.options.animation,f=(l.left+l.right)/2,m=(l.top+l.bottom)/2,g=s&&h.animateScale,y=g?0:this.innerRadius,v=g?0:this.outerRadius,{sharedOptions:_,includeOptions:k}=this._getSharedOptions(n,r);let x=this._getRotation(),M;for(M=0;M<n;++M)x+=this._circumference(M,s);for(M=n;M<n+a;++M){const B=this._circumference(M,s),C=t[M],V={x:f+this.offsetX,y:m+this.offsetY,startAngle:x,endAngle:x+B,circumference:B,outerRadius:v,innerRadius:y};k&&(V.options=_||this.resolveDataElementOptions(M,C.active?"active":r)),x+=B,this.updateElement(C,M,V,r)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let a=0,r;for(r=0;r<n.length;r++){const s=t._parsed[r];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(r)&&!n[r].hidden&&(a+=Math.abs(s))}return a}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Nt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,a=this.chart,r=a.data.labels||[],s=wl(n._parsed[t],a.options.locale);return{label:r[t]||"",value:s}}getMaxBorderWidth(t){let n=0;const a=this.chart;let r,s,o,l,d;if(!t){for(r=0,s=a.data.datasets.length;r<s;++r)if(a.isDatasetVisible(r)){o=a.getDatasetMeta(r),t=o.data,l=o.controller;break}}if(!t)return 0;for(r=0,s=t.length;r<s;++r)d=l.resolveDataElementOptions(r),d.borderAlign!=="inner"&&(n=Math.max(n,d.borderWidth||0,d.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let a=0,r=t.length;a<r;++a){const s=this.resolveDataElementOptions(a);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let a=0;a<t;++a)this.chart.isDatasetVisible(a)&&(n+=this._getRingWeight(a));return n}_getRingWeight(t){return Math.max(Re(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}we(sr,"id","doughnut"),we(sr,"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"}),we(sr,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),we(sr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:a,color:r}}=t.legend.options;return n.labels.map((s,o)=>{const d=t.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:r,lineWidth:d.borderWidth,pointStyle:a,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,a){a.chart.toggleDataVisibility(n.index),a.chart.update()}}}});class Bl extends Li{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:a,data:r=[],_dataset:s}=n,o=this.chart._animationsDisabled;let{start:l,count:d}=jm(n,r,o);this._drawStart=l,this._drawCount=d,Um(n)&&(l=0,d=r.length),a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!s._decimated,a.points=r;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(a,void 0,{animated:!o,options:h},t),this.updateElements(r,l,d,t)}updateElements(t,n,a,r){const s=r==="reset",{iScale:o,vScale:l,_stacked:d,_dataset:h}=this._cachedMeta,{sharedOptions:f,includeOptions:m}=this._getSharedOptions(n,r),g=o.axis,y=l.axis,{spanGaps:v,segment:_}=this.options,k=As(v)?v:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||s||r==="none",M=n+a,B=t.length;let C=n>0&&this.getParsed(n-1);for(let V=0;V<B;++V){const $=t[V],L=x?$:{};if(V<n||V>=M){L.skip=!0;continue}const T=this.getParsed(V),R=Ze(T[y]),q=L[g]=o.getPixelForValue(T[g],V),ee=L[y]=s||R?l.getBasePixel():l.getPixelForValue(d?this.applyStack(l,T,d):T[y],V);L.skip=isNaN(q)||isNaN(ee)||R,L.stop=V>0&&Math.abs(T[g]-C[g])>k,_&&(L.parsed=T,L.raw=h.data[V]),m&&(L.options=f||this.resolveDataElementOptions(V,$.active?"active":r)),x||this.updateElement($,V,L,r),C=T}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,a=n.options&&n.options.borderWidth||0,r=t.data||[];if(!r.length)return a;const s=r[0].size(this.resolveDataElementOptions(0)),o=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(a,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}we(Bl,"id","line"),we(Bl,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),we(Bl,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ps extends Li{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,a=this.chart,r=a.data.labels||[],s=wl(n._parsed[t].r,a.options.locale);return{label:r[t]||"",value:s}}parseObjectData(t,n,a,r){return o2.bind(this)(t,n,a,r)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((a,r)=>{const s=this.getParsed(r).r;!isNaN(s)&&this.chart.getDataVisibility(r)&&(s<n.min&&(n.min=s),s>n.max&&(n.max=s))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,a=t.options,r=Math.min(n.right-n.left,n.bottom-n.top),s=Math.max(r/2,0),o=Math.max(a.cutoutPercentage?s/100*a.cutoutPercentage:1,0),l=(s-o)/t.getVisibleDatasetCount();this.outerRadius=s-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,n,a,r){const s=r==="reset",o=this.chart,d=o.options.animation,h=this._cachedMeta.rScale,f=h.xCenter,m=h.yCenter,g=h.getIndexAngle(0)-.5*At;let y=g,v;const _=360/this.countVisibleElements();for(v=0;v<n;++v)y+=this._computeAngle(v,r,_);for(v=n;v<n+a;v++){const k=t[v];let x=y,M=y+this._computeAngle(v,r,_),B=o.getDataVisibility(v)?h.getDistanceFromCenterForValue(this.getParsed(v).r):0;y=M,s&&(d.animateScale&&(B=0),d.animateRotate&&(x=M=g));const C={x:f,y:m,innerRadius:0,outerRadius:B,startAngle:x,endAngle:M,options:this.resolveDataElementOptions(v,k.active?"active":r)};this.updateElement(k,v,C,r)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((a,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&n++}),n}_computeAngle(t,n,a){return this.chart.getDataVisibility(t)?zi(this.resolveDataElementOptions(t,n).angle||a):0}}we(Ps,"id","polarArea"),we(Ps,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),we(Ps,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:a,color:r}}=t.legend.options;return n.labels.map((s,o)=>{const d=t.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:r,lineWidth:d.borderWidth,pointStyle:a,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,a){a.chart.toggleDataVisibility(n.index),a.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class wd extends sr{}we(wd,"id","pie"),we(wd,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class kd extends Li{getLabelAndValue(t){const n=this._cachedMeta.vScale,a=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(a[n.axis])}}parseObjectData(t,n,a,r){return o2.bind(this)(t,n,a,r)}update(t){const n=this._cachedMeta,a=n.dataset,r=n.data||[],s=n.iScale.getLabels();if(a.points=r,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const l={_loop:!0,_fullLoop:s.length===r.length,options:o};this.updateElement(a,void 0,l,t)}this.updateElements(r,0,r.length,t)}updateElements(t,n,a,r){const s=this._cachedMeta.rScale,o=r==="reset";for(let l=n;l<n+a;l++){const d=t[l],h=this.resolveDataElementOptions(l,d.active?"active":r),f=s.getPointPositionForValue(l,this.getParsed(l).r),m=o?s.xCenter:f.x,g=o?s.yCenter:f.y,y={x:m,y:g,angle:f.angle,skip:isNaN(m)||isNaN(g),options:h};this.updateElement(d,l,y,r)}}}we(kd,"id","radar"),we(kd,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),we(kd,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Cd extends Li{getLabelAndValue(t){const n=this._cachedMeta,a=this.chart.data.labels||[],{xScale:r,yScale:s}=n,o=this.getParsed(t),l=r.getLabelForValue(o.x),d=s.getLabelForValue(o.y);return{label:a[t]||"",value:"("+l+", "+d+")"}}update(t){const n=this._cachedMeta,{data:a=[]}=n,r=this.chart._animationsDisabled;let{start:s,count:o}=jm(n,a,r);if(this._drawStart=s,this._drawCount=o,Um(n)&&(s=0,o=a.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:d}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!d._decimated,l.points=a;const h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(l,void 0,{animated:!r,options:h},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(a,s,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,a,r){const s=r==="reset",{iScale:o,vScale:l,_stacked:d,_dataset:h}=this._cachedMeta,f=this.resolveDataElementOptions(n,r),m=this.getSharedOptions(f),g=this.includeOptions(r,m),y=o.axis,v=l.axis,{spanGaps:_,segment:k}=this.options,x=As(_)?_:Number.POSITIVE_INFINITY,M=this.chart._animationsDisabled||s||r==="none";let B=n>0&&this.getParsed(n-1);for(let C=n;C<n+a;++C){const V=t[C],$=this.getParsed(C),L=M?V:{},T=Ze($[v]),R=L[y]=o.getPixelForValue($[y],C),q=L[v]=s||T?l.getBasePixel():l.getPixelForValue(d?this.applyStack(l,$,d):$[v],C);L.skip=isNaN(R)||isNaN(q)||T,L.stop=C>0&&Math.abs($[y]-B[y])>x,k&&(L.parsed=$,L.raw=h.data[C]),g&&(L.options=m||this.resolveDataElementOptions(C,V.active?"active":r)),M||this.updateElement(V,C,L,r),B=$}this.updateSharedOptions(m,r,f)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let l=0;for(let d=n.length-1;d>=0;--d)l=Math.max(l,n[d].size(this.resolveDataElementOptions(d))/2);return l>0&&l}const a=t.dataset,r=a.options&&a.options.borderWidth||0;if(!n.length)return r;const s=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,s,o)/2}}we(Cd,"id","scatter"),we(Cd,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),we(Cd,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var y9=Object.freeze({__proto__:null,BarController:Ml,BubbleController:_d,DoughnutController:sr,LineController:Bl,PieController:wd,PolarAreaController:Ps,RadarController:kd,ScatterController:Cd});function Kr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class v0{constructor(t){we(this,"options");this.options=t||{}}static override(t){Object.assign(v0.prototype,t)}init(){}formats(){return Kr()}parse(){return Kr()}format(){return Kr()}add(){return Kr()}diff(){return Kr()}startOf(){return Kr()}endOf(){return Kr()}}var V2={_date:v0};function b9(e,t,n,a){const{controller:r,data:s,_sorted:o}=e,l=r._cachedMeta.iScale,d=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(l&&t===l.axis&&t!=="r"&&o&&s.length){const h=l._reversePixels?Hw:wa;if(a){if(r._sharedOptions){const f=s[0],m=typeof f.getRange=="function"&&f.getRange(t);if(m){const g=h(s,t,n-m),y=h(s,t,n+m);return{lo:g.lo,hi:y.hi}}}}else{const f=h(s,t,n);if(d){const{vScale:m}=r._cachedMeta,{_parsed:g}=e,y=g.slice(0,f.lo+1).reverse().findIndex(_=>!Ze(_[m.axis]));f.lo-=Math.max(0,y);const v=g.slice(f.hi).findIndex(_=>!Ze(_[m.axis]));f.hi+=Math.max(0,v)}return f}}return{lo:0,hi:s.length-1}}function xd(e,t,n,a,r){const s=e.getSortedVisibleDatasetMetas(),o=n[t];for(let l=0,d=s.length;l<d;++l){const{index:h,data:f}=s[l],{lo:m,hi:g}=b9(s[l],t,o,r);for(let y=m;y<=g;++y){const v=f[y];v.skip||a(v,h,y)}}}function v9(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(a,r){const s=t?Math.abs(a.x-r.x):0,o=n?Math.abs(a.y-r.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function _0(e,t,n,a,r){const s=[];return!r&&!e.isPointInArea(t)||xd(e,n,t,function(l,d,h){!r&&!ka(l,e.chartArea,0)||l.inRange(t.x,t.y,a)&&s.push({element:l,datasetIndex:d,index:h})},!0),s}function _9(e,t,n,a){let r=[];function s(o,l,d){const{startAngle:h,endAngle:f}=o.getProps(["startAngle","endAngle"],a),{angle:m}=Pm(o,{x:t.x,y:t.y});vl(m,h,f)&&r.push({element:o,datasetIndex:l,index:d})}return xd(e,n,t,s),r}function w9(e,t,n,a,r,s){let o=[];const l=v9(n);let d=Number.POSITIVE_INFINITY;function h(f,m,g){const y=f.inRange(t.x,t.y,r);if(a&&!y)return;const v=f.getCenterPoint(r);if(!(!!s||e.isPointInArea(v))&&!y)return;const k=l(t,v);k<d?(o=[{element:f,datasetIndex:m,index:g}],d=k):k===d&&o.push({element:f,datasetIndex:m,index:g})}return xd(e,n,t,h),o}function w0(e,t,n,a,r,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!a?_9(e,t,n,r):w9(e,t,n,a,r,s)}function $2(e,t,n,a,r){const s=[],o=n==="x"?"inXRange":"inYRange";let l=!1;return xd(e,n,t,(d,h,f)=>{d[o]&&d[o](t[n],r)&&(s.push({element:d,datasetIndex:h,index:f}),l=l||d.inRange(t.x,t.y,r))}),a&&!l?[]:s}var k9={modes:{index(e,t,n,a){const r=qr(t,e),s=n.axis||"x",o=n.includeInvisible||!1,l=n.intersect?_0(e,r,s,a,o):w0(e,r,s,!1,a,o),d=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(h=>{const f=l[0].index,m=h.data[f];m&&!m.skip&&d.push({element:m,datasetIndex:h.index,index:f})}),d):[]},dataset(e,t,n,a){const r=qr(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;let l=n.intersect?_0(e,r,s,a,o):w0(e,r,s,!1,a,o);if(l.length>0){const d=l[0].datasetIndex,h=e.getDatasetMeta(d).data;l=[];for(let f=0;f<h.length;++f)l.push({element:h[f],datasetIndex:d,index:f})}return l},point(e,t,n,a){const r=qr(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return _0(e,r,s,a,o)},nearest(e,t,n,a){const r=qr(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return w0(e,r,s,n.intersect,a,o)},x(e,t,n,a){const r=qr(t,e);return $2(e,r,"x",n.intersect,a)},y(e,t,n,a){const r=qr(t,e);return $2(e,r,"y",n.intersect,a)}}};const T2=["left","top","right","bottom"];function El(e,t){return e.filter(n=>n.pos===t)}function I2(e,t){return e.filter(n=>T2.indexOf(n.pos)===-1&&n.box.axis===t)}function Ol(e,t){return e.sort((n,a)=>{const r=t?a:n,s=t?n:a;return r.weight===s.weight?r.index-s.index:r.weight-s.weight})}function C9(e){const t=[];let n,a,r,s,o,l;for(n=0,a=(e||[]).length;n<a;++n)r=e[n],{position:s,options:{stack:o,stackWeight:l=1}}=r,t.push({index:n,box:r,pos:s,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&s+o,stackWeight:l});return t}function x9(e){const t={};for(const n of e){const{stack:a,pos:r,stackWeight:s}=n;if(!a||!T2.includes(r))continue;const o=t[a]||(t[a]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return t}function S9(e,t){const n=x9(e),{vBoxMaxWidth:a,hBoxMaxHeight:r}=t;let s,o,l;for(s=0,o=e.length;s<o;++s){l=e[s];const{fullSize:d}=l.box,h=n[l.stack],f=h&&l.stackWeight/h.weight;l.horizontal?(l.width=f?f*a:d&&t.availableWidth,l.height=r):(l.width=a,l.height=f?f*r:d&&t.availableHeight)}return n}function M9(e){const t=C9(e),n=Ol(t.filter(h=>h.box.fullSize),!0),a=Ol(El(t,"left"),!0),r=Ol(El(t,"right")),s=Ol(El(t,"top"),!0),o=Ol(El(t,"bottom")),l=I2(t,"x"),d=I2(t,"y");return{fullSize:n,leftAndTop:a.concat(s),rightAndBottom:r.concat(d).concat(o).concat(l),chartArea:El(t,"chartArea"),vertical:a.concat(r).concat(d),horizontal:s.concat(o).concat(l)}}function A2(e,t,n,a){return Math.max(e[n],t[n])+Math.max(e[a],t[a])}function N2(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function B9(e,t,n,a){const{pos:r,box:s}=n,o=e.maxPadding;if(!et(r)){n.size&&(e[r]-=n.size);const m=a[n.stack]||{size:0,count:1};m.size=Math.max(m.size,n.horizontal?s.height:s.width),n.size=m.size/m.count,e[r]+=n.size}s.getPadding&&N2(o,s.getPadding());const l=Math.max(0,t.outerWidth-A2(o,e,"left","right")),d=Math.max(0,t.outerHeight-A2(o,e,"top","bottom")),h=l!==e.w,f=d!==e.h;return e.w=l,e.h=d,n.horizontal?{same:h,other:f}:{same:f,other:h}}function E9(e){const t=e.maxPadding;function n(a){const r=Math.max(t[a]-e[a],0);return e[a]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function O9(e,t){const n=t.maxPadding;function a(r){const s={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{s[o]=Math.max(t[o],n[o])}),s}return a(e?["left","right"]:["top","bottom"])}function Dl(e,t,n,a){const r=[];let s,o,l,d,h,f;for(s=0,o=e.length,h=0;s<o;++s){l=e[s],d=l.box,d.update(l.width||t.w,l.height||t.h,O9(l.horizontal,t));const{same:m,other:g}=B9(t,n,l,a);h|=m&&r.length,f=f||g,d.fullSize||r.push(l)}return h&&Dl(r,t,n,a)||f}function Sd(e,t,n,a,r){e.top=n,e.left=t,e.right=t+a,e.bottom=n+r,e.width=a,e.height=r}function z2(e,t,n,a){const r=n.padding;let{x:s,y:o}=t;for(const l of e){const d=l.box,h=a[l.stack]||{placed:0,weight:1},f=l.stackWeight/h.weight||1;if(l.horizontal){const m=t.w*f,g=h.size||d.height;yl(h.start)&&(o=h.start),d.fullSize?Sd(d,r.left,o,n.outerWidth-r.right-r.left,g):Sd(d,t.left+h.placed,o,m,g),h.start=o,h.placed+=m,o=d.bottom}else{const m=t.h*f,g=h.size||d.width;yl(h.start)&&(s=h.start),d.fullSize?Sd(d,s,r.top,g,n.outerHeight-r.bottom-r.top):Sd(d,s,t.top+h.placed,g,m),h.start=s,h.placed+=m,s=d.right}}t.x=s,t.y=o}var Mn={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,a){if(!e)return;const r=Sn(e.options.layout.padding),s=Math.max(t-r.width,0),o=Math.max(n-r.height,0),l=M9(e.boxes),d=l.vertical,h=l.horizontal;vt(e.boxes,_=>{typeof _.beforeLayout=="function"&&_.beforeLayout()});const f=d.reduce((_,k)=>k.box.options&&k.box.options.display===!1?_:_+1,0)||1,m=Object.freeze({outerWidth:t,outerHeight:n,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/f,hBoxMaxHeight:o/2}),g=Object.assign({},r);N2(g,Sn(a));const y=Object.assign({maxPadding:g,w:s,h:o,x:r.left,y:r.top},r),v=S9(d.concat(h),m);Dl(l.fullSize,y,m,v),Dl(d,y,m,v),Dl(h,y,m,v)&&Dl(d,y,m,v),E9(y),z2(l.leftAndTop,y,m,v),y.x+=y.w,y.y+=y.h,z2(l.rightAndBottom,y,m,v),e.chartArea={left:y.left,top:y.top,right:y.left+y.w,bottom:y.top+y.h,height:y.h,width:y.w},vt(l.chartArea,_=>{const k=_.box;Object.assign(k,e.chartArea),k.update(y.w,y.h,{left:0,top:0,right:0,bottom:0})})}};class L2{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,a){}removeEventListener(t,n,a){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,a,r){return n=Math.max(0,n||t.width),a=a||t.height,{width:n,height:Math.max(0,r?Math.floor(n/r):a)}}isAttached(t){return!0}updateConfig(t){}}class D9 extends L2{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Md="$chartjs",V9={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},P2=e=>e===null||e==="";function $9(e,t){const n=e.style,a=e.getAttribute("height"),r=e.getAttribute("width");if(e[Md]={initial:{height:a,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",P2(r)){const s=d2(e,"width");s!==void 0&&(e.width=s)}if(P2(a))if(e.style.height==="")e.height=e.width/(t||2);else{const s=d2(e,"height");s!==void 0&&(e.height=s)}return e}const F2=Ak?{passive:!0}:!1;function T9(e,t,n){e&&e.addEventListener(t,n,F2)}function I9(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,F2)}function A9(e,t){const n=V9[e.type]||e.type,{x:a,y:r}=qr(e,t);return{type:n,chart:t,native:e,x:a!==void 0?a:null,y:r!==void 0?r:null}}function Bd(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function N9(e,t,n){const a=e.canvas,r=new MutationObserver(s=>{let o=!1;for(const l of s)o=o||Bd(l.addedNodes,a),o=o&&!Bd(l.removedNodes,a);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function z9(e,t,n){const a=e.canvas,r=new MutationObserver(s=>{let o=!1;for(const l of s)o=o||Bd(l.removedNodes,a),o=o&&!Bd(l.addedNodes,a);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const Vl=new Map;let R2=0;function H2(){const e=window.devicePixelRatio;e!==R2&&(R2=e,Vl.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function L9(e,t){Vl.size||window.addEventListener("resize",H2),Vl.set(e,t)}function P9(e){Vl.delete(e),Vl.size||window.removeEventListener("resize",H2)}function F9(e,t,n){const a=e.canvas,r=a&&p0(a);if(!r)return;const s=Ym((l,d)=>{const h=r.clientWidth;n(l,d),h<r.clientWidth&&n()},window),o=new ResizeObserver(l=>{const d=l[0],h=d.contentRect.width,f=d.contentRect.height;h===0&&f===0||s(h,f)});return o.observe(r),L9(e,s),o}function k0(e,t,n){n&&n.disconnect(),t==="resize"&&P9(e)}function R9(e,t,n){const a=e.canvas,r=Ym(s=>{e.ctx!==null&&n(A9(s,e))},e);return T9(a,t,r),r}class H9 extends L2{acquireContext(t,n){const a=t&&t.getContext&&t.getContext("2d");return a&&a.canvas===t?($9(t,n),a):null}releaseContext(t){const n=t.canvas;if(!n[Md])return!1;const a=n[Md].initial;["height","width"].forEach(s=>{const o=a[s];Ze(o)?n.removeAttribute(s):n.setAttribute(s,o)});const r=a.style||{};return Object.keys(r).forEach(s=>{n.style[s]=r[s]}),n.width=n.width,delete n[Md],!0}addEventListener(t,n,a){this.removeEventListener(t,n);const r=t.$proxies||(t.$proxies={}),o={attach:N9,detach:z9,resize:F9}[n]||R9;r[n]=o(t,n,a)}removeEventListener(t,n){const a=t.$proxies||(t.$proxies={}),r=a[n];if(!r)return;({attach:k0,detach:k0,resize:k0}[n]||I9)(t,n,r),a[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,a,r){return Ik(t,n,a,r)}isAttached(t){const n=t&&p0(t);return!!(n&&n.isConnected)}}function W9(e){return!f0()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?D9:H9}let xa=(Wu=class{constructor(){we(this,"x");we(this,"y");we(this,"active",!1);we(this,"options");we(this,"$animations")}tooltipPosition(t){const{x:n,y:a}=this.getProps(["x","y"],t);return{x:n,y:a}}hasValue(){return As(this.x)&&As(this.y)}getProps(t,n){const a=this.$animations;if(!n||!a)return this;const r={};return t.forEach(s=>{r[s]=a[s]&&a[s].active()?a[s]._to:this[s]}),r}},we(Wu,"defaults",{}),we(Wu,"defaultRoutes"),Wu);function Y9(e,t){const n=e.options.ticks,a=j9(e),r=Math.min(n.maxTicksLimit||a,a),s=n.major.enabled?q9(t):[],o=s.length,l=s[0],d=s[o-1],h=[];if(o>r)return G9(t,h,s,o/r),h;const f=U9(s,t,r);if(o>0){let m,g;const y=o>1?Math.round((d-l)/(o-1)):null;for(Ed(t,h,f,Ze(y)?0:l-y,l),m=0,g=o-1;m<g;m++)Ed(t,h,f,s[m],s[m+1]);return Ed(t,h,f,d,Ze(y)?t.length:d+y),h}return Ed(t,h,f),h}function j9(e){const t=e.options.offset,n=e._tickSize(),a=e._length/n+(t?0:1),r=e._maxLength/n;return Math.floor(Math.min(a,r))}function U9(e,t,n){const a=K9(e),r=t.length/n;if(!a)return Math.max(r,1);const s=zw(a);for(let o=0,l=s.length-1;o<l;o++){const d=s[o];if(d>r)return d}return Math.max(r,1)}function q9(e){const t=[];let n,a;for(n=0,a=e.length;n<a;n++)e[n].major&&t.push(n);return t}function G9(e,t,n,a){let r=0,s=n[0],o;for(a=Math.ceil(a),o=0;o<e.length;o++)o===s&&(t.push(e[o]),r++,s=n[r*a])}function Ed(e,t,n,a,r){const s=Re(a,0),o=Math.min(Re(r,e.length),e.length);let l=0,d,h,f;for(n=Math.ceil(n),r&&(d=r-a,n=d/Math.floor(d/n)),f=s;f<0;)l++,f=Math.round(s+l*n);for(h=Math.max(s,0);h<o;h++)h===f&&(t.push(e[h]),l++,f=Math.round(s+l*n))}function K9(e){const t=e.length;let n,a;if(t<2)return!1;for(a=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==a)return!1;return a}const Z9=e=>e==="left"?"right":e==="right"?"left":e,W2=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Y2=(e,t)=>Math.min(t||e,e);function j2(e,t){const n=[],a=e.length/t,r=e.length;let s=0;for(;s<r;s+=a)n.push(e[Math.floor(s)]);return n}function X9(e,t,n){const a=e.ticks.length,r=Math.min(t,a-1),s=e._startPixel,o=e._endPixel,l=1e-6;let d=e.getPixelForTick(r),h;if(!(n&&(a===1?h=Math.max(d-s,o-d):t===0?h=(e.getPixelForTick(1)-d)/2:h=(d-e.getPixelForTick(r-1))/2,d+=r<t?h:-h,d<s-l||d>o+l)))return d}function J9(e,t){vt(e,n=>{const a=n.gc,r=a.length/2;let s;if(r>t){for(s=0;s<r;++s)delete n.data[a[s]];a.splice(0,r)}})}function $l(e){return e.drawTicks?e.tickLength:0}function U2(e,t){if(!e.display)return 0;const n=sn(e.font,t),a=Sn(e.padding);return(Pt(e.text)?e.text.length:1)*n.lineHeight+a.height}function Q9(e,t){return rr(e,{scale:t,type:"scale"})}function eC(e,t,n){return rr(e,{tick:n,index:t,type:"tick"})}function tC(e,t,n){let a=i0(e);return(n&&t!=="right"||!n&&t==="right")&&(a=Z9(a)),a}function nC(e,t,n,a){const{top:r,left:s,bottom:o,right:l,chart:d}=e,{chartArea:h,scales:f}=d;let m=0,g,y,v;const _=o-r,k=l-s;if(e.isHorizontal()){if(y=xn(a,s,l),et(n)){const x=Object.keys(n)[0],M=n[x];v=f[x].getPixelForValue(M)+_-t}else n==="center"?v=(h.bottom+h.top)/2+_-t:v=W2(e,n,t);g=l-s}else{if(et(n)){const x=Object.keys(n)[0],M=n[x];y=f[x].getPixelForValue(M)-k+t}else n==="center"?y=(h.left+h.right)/2-k+t:y=W2(e,n,t);v=xn(a,o,r),m=n==="left"?-Zt:Zt}return{titleX:y,titleY:v,maxWidth:g,rotation:m}}class Zr extends xa{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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:a,_suggestedMax:r}=this;return t=ni(t,Number.POSITIVE_INFINITY),n=ni(n,Number.NEGATIVE_INFINITY),a=ni(a,Number.POSITIVE_INFINITY),r=ni(r,Number.NEGATIVE_INFINITY),{min:ni(t,a),max:ni(n,r),minDefined:qt(t),maxDefined:qt(n)}}getMinMax(t){let{min:n,max:a,minDefined:r,maxDefined:s}=this.getUserBounds(),o;if(r&&s)return{min:n,max:a};const l=this.getMatchingVisibleMetas();for(let d=0,h=l.length;d<h;++d)o=l[d].controller.getMinMax(this,t),r||(n=Math.min(n,o.min)),s||(a=Math.max(a,o.max));return n=s&&n>a?a:n,a=r&&n>a?n:a,{min:ni(n,ni(a,n)),max:ni(a,ni(n,a))}}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(){Tt(this.options.beforeUpdate,[this])}update(t,n,a){const{beginAtZero:r,grace:s,ticks:o}=this.options,l=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=a=Object.assign({left:0,right:0,top:0,bottom:0},a),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+a.left+a.right:this.height+a.top+a.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=hk(this,s,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=l<this.ticks.length;this._convertTicksToLabels(d?j2(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=Y9(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,a;this.isHorizontal()?(n=this.left,a=this.right):(n=this.top,a=this.bottom,t=!t),this._startPixel=n,this._endPixel=a,this._reversePixels=t,this._length=a-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Tt(this.options.afterUpdate,[this])}beforeSetDimensions(){Tt(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(){Tt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Tt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Tt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let a,r,s;for(a=0,r=t.length;a<r;a++)s=t[a],s.label=Tt(n.callback,[s.value,a,t],this)}afterTickToLabelConversion(){Tt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Tt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,a=Y2(this.ticks.length,t.ticks.maxTicksLimit),r=n.minRotation||0,s=n.maxRotation;let o=r,l,d,h;if(!this._isVisible()||!n.display||r>=s||a<=1||!this.isHorizontal()){this.labelRotation=r;return}const f=this._getLabelSizes(),m=f.widest.width,g=f.highest.height,y=pn(this.chart.width-m,0,this.maxWidth);l=t.offset?this.maxWidth/a:y/(a-1),m+6>l&&(l=y/(a-(t.offset?.5:1)),d=this.maxHeight-$l(t.grid)-n.padding-U2(t.title,this.chart.options.font),h=Math.sqrt(m*m+g*g),o=e0(Math.min(Math.asin(pn((f.highest.height+6)/l,-1,1)),Math.asin(pn(d/h,-1,1))-Math.asin(pn(g/h,-1,1)))),o=Math.max(r,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){Tt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Tt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:a,title:r,grid:s}}=this,o=this._isVisible(),l=this.isHorizontal();if(o){const d=U2(r,n.options.font);if(l?(t.width=this.maxWidth,t.height=$l(s)+d):(t.height=this.maxHeight,t.width=$l(s)+d),a.display&&this.ticks.length){const{first:h,last:f,widest:m,highest:g}=this._getLabelSizes(),y=a.padding*2,v=zi(this.labelRotation),_=Math.cos(v),k=Math.sin(v);if(l){const x=a.mirror?0:k*m.width+_*g.height;t.height=Math.min(this.maxHeight,t.height+x+y)}else{const x=a.mirror?0:_*m.width+k*g.height;t.width=Math.min(this.maxWidth,t.width+x+y)}this._calculatePadding(h,f,k,_)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,a,r){const{ticks:{align:s,padding:o},position:l}=this.options,d=this.labelRotation!==0,h=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,m=this.right-this.getPixelForTick(this.ticks.length-1);let g=0,y=0;d?h?(g=r*t.width,y=a*n.height):(g=a*t.height,y=r*n.width):s==="start"?y=n.width:s==="end"?g=t.width:s!=="inner"&&(g=t.width/2,y=n.width/2),this.paddingLeft=Math.max((g-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((y-m+o)*this.width/(this.width-m),0)}else{let f=n.height/2,m=t.height/2;s==="start"?(f=0,m=t.height):s==="end"&&(f=n.height,m=0),this.paddingTop=f+o,this.paddingBottom=m+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(){Tt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,a;for(n=0,a=t.length;n<a;n++)Ze(t[n].label)&&(t.splice(n,1),a--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let a=this.ticks;n<a.length&&(a=j2(a,n)),this._labelSizes=t=this._computeLabelSizes(a,a.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,a){const{ctx:r,_longestTextCache:s}=this,o=[],l=[],d=Math.floor(n/Y2(n,a));let h=0,f=0,m,g,y,v,_,k,x,M,B,C,V;for(m=0;m<n;m+=d){if(v=t[m].label,_=this._resolveTickFontOptions(m),r.font=k=_.string,x=s[k]=s[k]||{data:{},gc:[]},M=_.lineHeight,B=C=0,!Ze(v)&&!Pt(v))B=fd(r,x.data,x.gc,B,v),C=M;else if(Pt(v))for(g=0,y=v.length;g<y;++g)V=v[g],!Ze(V)&&!Pt(V)&&(B=fd(r,x.data,x.gc,B,V),C+=M);o.push(B),l.push(C),h=Math.max(B,h),f=Math.max(C,f)}J9(s,n);const $=o.indexOf(h),L=l.indexOf(f),T=R=>({width:o[R]||0,height:l[R]||0});return{first:T(0),last:T(n-1),widest:T($),highest:T(L),widths:o,heights:l}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Rw(this._alignToPixels?Wr(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const a=n[t];return a.$context||(a.$context=eC(this.getContext(),t,a))}return this.$context||(this.$context=Q9(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=zi(this.labelRotation),a=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,l=s?s.widest.width+o:0,d=s?s.highest.height+o:0;return this.isHorizontal()?d*a>l*r?l/a:d/r:d*r<l*a?d/a:l/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,a=this.chart,r=this.options,{grid:s,position:o,border:l}=r,d=s.offset,h=this.isHorizontal(),m=this.ticks.length+(d?1:0),g=$l(s),y=[],v=l.setContext(this.getContext()),_=v.display?v.width:0,k=_/2,x=function(me){return Wr(a,me,_)};let M,B,C,V,$,L,T,R,q,ee,F,Z;if(o==="top")M=x(this.bottom),L=this.bottom-g,R=M-k,ee=x(t.top)+k,Z=t.bottom;else if(o==="bottom")M=x(this.top),ee=t.top,Z=x(t.bottom)-k,L=M+k,R=this.top+g;else if(o==="left")M=x(this.right),$=this.right-g,T=M-k,q=x(t.left)+k,F=t.right;else if(o==="right")M=x(this.left),q=t.left,F=x(t.right)-k,$=M+k,T=this.left+g;else if(n==="x"){if(o==="center")M=x((t.top+t.bottom)/2+.5);else if(et(o)){const me=Object.keys(o)[0],be=o[me];M=x(this.chart.scales[me].getPixelForValue(be))}ee=t.top,Z=t.bottom,L=M+k,R=L+g}else if(n==="y"){if(o==="center")M=x((t.left+t.right)/2);else if(et(o)){const me=Object.keys(o)[0],be=o[me];M=x(this.chart.scales[me].getPixelForValue(be))}$=M-k,T=$-g,q=t.left,F=t.right}const ae=Re(r.ticks.maxTicksLimit,m),j=Math.max(1,Math.ceil(m/ae));for(B=0;B<m;B+=j){const me=this.getContext(B),be=s.setContext(me),U=l.setContext(me),ye=be.lineWidth,Y=be.color,Q=U.dash||[],ue=U.dashOffset,ce=be.tickWidth,ve=be.tickColor,ge=be.tickBorderDash||[],Ve=be.tickBorderDashOffset;C=X9(this,B,d),C!==void 0&&(V=Wr(a,C,ye),h?$=T=q=F=V:L=R=ee=Z=V,y.push({tx1:$,ty1:L,tx2:T,ty2:R,x1:q,y1:ee,x2:F,y2:Z,width:ye,color:Y,borderDash:Q,borderDashOffset:ue,tickWidth:ce,tickColor:ve,tickBorderDash:ge,tickBorderDashOffset:Ve}))}return this._ticksLength=m,this._borderValue=M,y}_computeLabelItems(t){const n=this.axis,a=this.options,{position:r,ticks:s}=a,o=this.isHorizontal(),l=this.ticks,{align:d,crossAlign:h,padding:f,mirror:m}=s,g=$l(a.grid),y=g+f,v=m?-f:y,_=-zi(this.labelRotation),k=[];let x,M,B,C,V,$,L,T,R,q,ee,F,Z="middle";if(r==="top")$=this.bottom-v,L=this._getXAxisLabelAlignment();else if(r==="bottom")$=this.top+v,L=this._getXAxisLabelAlignment();else if(r==="left"){const j=this._getYAxisLabelAlignment(g);L=j.textAlign,V=j.x}else if(r==="right"){const j=this._getYAxisLabelAlignment(g);L=j.textAlign,V=j.x}else if(n==="x"){if(r==="center")$=(t.top+t.bottom)/2+y;else if(et(r)){const j=Object.keys(r)[0],me=r[j];$=this.chart.scales[j].getPixelForValue(me)+y}L=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")V=(t.left+t.right)/2-y;else if(et(r)){const j=Object.keys(r)[0],me=r[j];V=this.chart.scales[j].getPixelForValue(me)}L=this._getYAxisLabelAlignment(g).textAlign}n==="y"&&(d==="start"?Z="top":d==="end"&&(Z="bottom"));const ae=this._getLabelSizes();for(x=0,M=l.length;x<M;++x){B=l[x],C=B.label;const j=s.setContext(this.getContext(x));T=this.getPixelForTick(x)+s.labelOffset,R=this._resolveTickFontOptions(x),q=R.lineHeight,ee=Pt(C)?C.length:1;const me=ee/2,be=j.color,U=j.textStrokeColor,ye=j.textStrokeWidth;let Y=L;o?(V=T,L==="inner"&&(x===M-1?Y=this.options.reverse?"left":"right":x===0?Y=this.options.reverse?"right":"left":Y="center"),r==="top"?h==="near"||_!==0?F=-ee*q+q/2:h==="center"?F=-ae.highest.height/2-me*q+q:F=-ae.highest.height+q/2:h==="near"||_!==0?F=q/2:h==="center"?F=ae.highest.height/2-me*q:F=ae.highest.height-ee*q,m&&(F*=-1),_!==0&&!j.showLabelBackdrop&&(V+=q/2*Math.sin(_))):($=T,F=(1-ee)*q/2);let Q;if(j.showLabelBackdrop){const ue=Sn(j.backdropPadding),ce=ae.heights[x],ve=ae.widths[x];let ge=F-ue.top,Ve=0-ue.left;switch(Z){case"middle":ge-=ce/2;break;case"bottom":ge-=ce;break}switch(L){case"center":Ve-=ve/2;break;case"right":Ve-=ve;break;case"inner":x===M-1?Ve-=ve:x>0&&(Ve-=ve/2);break}Q={left:Ve,top:ge,width:ve+ue.width,height:ce+ue.height,color:j.backdropColor}}k.push({label:C,font:R,textOffset:F,options:{rotation:_,color:be,strokeColor:U,strokeWidth:ye,textAlign:Y,textBaseline:Z,translation:[V,$],backdrop:Q}})}return k}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-zi(this.labelRotation))return t==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:a,mirror:r,padding:s}}=this.options,o=this._getLabelSizes(),l=t+s,d=o.widest.width;let h,f;return n==="left"?r?(f=this.right+s,a==="near"?h="left":a==="center"?(h="center",f+=d/2):(h="right",f+=d)):(f=this.right-l,a==="near"?h="right":a==="center"?(h="center",f-=d/2):(h="left",f=this.left)):n==="right"?r?(f=this.left+s,a==="near"?h="right":a==="center"?(h="center",f-=d/2):(h="left",f-=d)):(f=this.left+l,a==="near"?h="left":a==="center"?(h="center",f+=d/2):(h="right",f=this.right)):h="right",{textAlign:h,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:a,top:r,width:s,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(a,r,s,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(s=>s.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const n=this.options.grid,a=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const l=(d,h,f)=>{!f.width||!f.color||(a.save(),a.lineWidth=f.width,a.strokeStyle=f.color,a.setLineDash(f.borderDash||[]),a.lineDashOffset=f.borderDashOffset,a.beginPath(),a.moveTo(d.x,d.y),a.lineTo(h.x,h.y),a.stroke(),a.restore())};if(n.display)for(s=0,o=r.length;s<o;++s){const d=r[s];n.drawOnChartArea&&l({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),n.drawTicks&&l({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:a,grid:r}}=this,s=a.setContext(this.getContext()),o=a.display?s.width:0;if(!o)return;const l=r.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let h,f,m,g;this.isHorizontal()?(h=Wr(t,this.left,o)-o/2,f=Wr(t,this.right,l)+l/2,m=g=d):(m=Wr(t,this.top,o)-o/2,g=Wr(t,this.bottom,l)+l/2,h=f=d),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(h,m),n.lineTo(f,g),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const a=this.ctx,r=this._computeLabelArea();r&&pd(a,r);const s=this.getLabelItems(t);for(const o of s){const l=o.options,d=o.font,h=o.label,f=o.textOffset;Yr(a,h,0,f,d,l)}r&&md(a)}drawTitle(){const{ctx:t,options:{position:n,title:a,reverse:r}}=this;if(!a.display)return;const s=sn(a.font),o=Sn(a.padding),l=a.align;let d=s.lineHeight/2;n==="bottom"||n==="center"||et(n)?(d+=o.bottom,Pt(a.text)&&(d+=s.lineHeight*(a.text.length-1))):d+=o.top;const{titleX:h,titleY:f,maxWidth:m,rotation:g}=nC(this,d,n,l);Yr(t,a.text,0,0,s,{color:a.color,maxWidth:m,rotation:g,textAlign:tC(l,n,r),textBaseline:"middle",translation:[h,f]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,a=Re(t.grid&&t.grid.z,-1),r=Re(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Zr.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:a,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",r=[];let s,o;for(s=0,o=n.length;s<o;++s){const l=n[s];l[a]===this.id&&(!t||l.type===t)&&r.push(l)}return r}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return sn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Od{constructor(t,n,a){this.type=t,this.scope=n,this.override=a,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let a;rC(n)&&(a=this.register(n));const r=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in r||(r[s]=t,iC(t,o,a),this.override&&Ft.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,a=t.id,r=this.scope;a in n&&delete n[a],r&&a in Ft[r]&&(delete Ft[r][a],this.override&&delete Hr[a])}}function iC(e,t,n){const a=ml(Object.create(null),[n?Ft.get(n):{},Ft.get(t),e.defaults]);Ft.set(t,a),e.defaultRoutes&&aC(t,e.defaultRoutes),e.descriptors&&Ft.describe(t,e.descriptors)}function aC(e,t){Object.keys(t).forEach(n=>{const a=n.split("."),r=a.pop(),s=[e].concat(a).join("."),o=t[n].split("."),l=o.pop(),d=o.join(".");Ft.route(s,r,d,l)})}function rC(e){return"id"in e&&"defaults"in e}class sC{constructor(){this.controllers=new Od(Li,"datasets",!0),this.elements=new Od(xa,"elements"),this.plugins=new Od(Object,"plugins"),this.scales=new Od(Zr,"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,n,a){[...n].forEach(r=>{const s=a||this._getRegistryForType(r);a||s.isForType(r)||s===this.plugins&&r.id?this._exec(t,s,r):vt(r,o=>{const l=a||this._getRegistryForType(o);this._exec(t,l,o)})})}_exec(t,n,a){const r=Q1(t);Tt(a["before"+r],[],a),n[t](a),Tt(a["after"+r],[],a)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const a=this._typedRegistries[n];if(a.isForType(t))return a}return this.plugins}_get(t,n,a){const r=n.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+a+".");return r}}var ia=new sC;class oC{constructor(){this._init=[]}notify(t,n,a,r){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=r?this._descriptors(t).filter(r):this._descriptors(t),o=this._notify(s,t,n,a);return n==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,a,r){r=r||{};for(const s of t){const o=s.plugin,l=o[a],d=[n,r,s.options];if(Tt(l,d,o)===!1&&r.cancelable)return!1}return!0}invalidate(){Ze(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const a=t&&t.config,r=Re(a.options&&a.options.plugins,{}),s=lC(a);return r===!1&&!n?[]:dC(t,s,r,n)}_notifyStateChanges(t){const n=this._oldCache||[],a=this._cache,r=(s,o)=>s.filter(l=>!o.some(d=>l.plugin.id===d.plugin.id));this._notify(r(n,a),t,"stop"),this._notify(r(a,n),t,"start")}}function lC(e){const t={},n=[],a=Object.keys(ia.plugins.items);for(let s=0;s<a.length;s++)n.push(ia.getPlugin(a[s]));const r=e.plugins||[];for(let s=0;s<r.length;s++){const o=r[s];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function cC(e,t){return!t&&e===!1?null:e===!0?{}:e}function dC(e,{plugins:t,localIds:n},a,r){const s=[],o=e.getContext();for(const l of t){const d=l.id,h=cC(a[d],r);h!==null&&s.push({plugin:l,options:uC(e.config,{plugin:l,local:n[d]},h,o)})}return s}function uC(e,{plugin:t,local:n},a,r){const s=e.pluginScopeKeys(t),o=e.getOptionScopes(a,s);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function C0(e,t){const n=Ft.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function hC(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function fC(e,t){return e===t?"_index_":"_value_"}function q2(e){if(e==="x"||e==="y"||e==="r")return e}function pC(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function x0(e,...t){if(q2(e))return e;for(const n of t){const a=n.axis||pC(n.position)||e.length>1&&q2(e[0].toLowerCase());if(a)return a}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function G2(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function mC(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(a=>a.xAxisID===e||a.yAxisID===e);if(n.length)return G2(e,"x",n[0])||G2(e,"y",n[0])}return{}}function gC(e,t){const n=Hr[e.type]||{scales:{}},a=t.scales||{},r=C0(e.type,t),s=Object.create(null);return Object.keys(a).forEach(o=>{const l=a[o];if(!et(l))return console.error(`Invalid scale configuration for scale: ${o}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const d=x0(o,l,mC(o,e),Ft.scales[l.type]),h=fC(d,r),f=n.scales||{};s[o]=gl(Object.create(null),[{axis:d},l,f[d],f[h]])}),e.data.datasets.forEach(o=>{const l=o.type||e.type,d=o.indexAxis||C0(l,t),f=(Hr[l]||{}).scales||{};Object.keys(f).forEach(m=>{const g=hC(m,d),y=o[g+"AxisID"]||g;s[y]=s[y]||Object.create(null),gl(s[y],[{axis:g},a[y],f[m]])})}),Object.keys(s).forEach(o=>{const l=s[o];gl(l,[Ft.scales[l.type],Ft.scale])}),s}function K2(e){const t=e.options||(e.options={});t.plugins=Re(t.plugins,{}),t.scales=gC(e,t)}function Z2(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function yC(e){return e=e||{},e.data=Z2(e.data),K2(e),e}const X2=new Map,J2=new Set;function Dd(e,t){let n=X2.get(e);return n||(n=t(),X2.set(e,n),J2.add(n)),n}const Tl=(e,t,n)=>{const a=nr(t,n);a!==void 0&&e.add(a)};class bC{constructor(t){this._config=yC(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=Z2(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(),K2(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Dd(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Dd(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Dd(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,a=this.type;return Dd(`${a}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const a=this._scopeCache;let r=a.get(t);return(!r||n)&&(r=new Map,a.set(t,r)),r}getOptionScopes(t,n,a){const{options:r,type:s}=this,o=this._cachedScopes(t,a),l=o.get(n);if(l)return l;const d=new Set;n.forEach(f=>{t&&(d.add(t),f.forEach(m=>Tl(d,t,m))),f.forEach(m=>Tl(d,r,m)),f.forEach(m=>Tl(d,Hr[s]||{},m)),f.forEach(m=>Tl(d,Ft,m)),f.forEach(m=>Tl(d,s0,m))});const h=Array.from(d);return h.length===0&&h.push(Object.create(null)),J2.has(n)&&o.set(n,h),h}chartOptionScopes(){const{options:t,type:n}=this;return[t,Hr[n]||{},Ft.datasets[n]||{},{type:n},Ft,s0]}resolveNamedOptions(t,n,a,r=[""]){const s={$shared:!0},{resolver:o,subPrefixes:l}=Q2(this._resolverCache,t,r);let d=o;if(_C(o,n)){s.$shared=!1,a=ir(a)?a():a;const h=this.createResolver(t,a,l);d=Ns(o,a,h)}for(const h of n)s[h]=d[h];return s}createResolver(t,n,a=[""],r){const{resolver:s}=Q2(this._resolverCache,t,a);return et(n)?Ns(s,n,void 0,r):s}}function Q2(e,t,n){let a=e.get(t);a||(a=new Map,e.set(t,a));const r=n.join();let s=a.get(r);return s||(s={resolver:d0(t,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},a.set(r,s)),s}const vC=e=>et(e)&&Object.getOwnPropertyNames(e).some(t=>ir(e[t]));function _C(e,t){const{isScriptable:n,isIndexable:a}=t2(e);for(const r of t){const s=n(r),o=a(r),l=(o||s)&&e[r];if(s&&(ir(l)||vC(l))||o&&Pt(l))return!0}return!1}var wC="4.4.8";const kC=["top","bottom","left","right","chartArea"];function eg(e,t){return e==="top"||e==="bottom"||kC.indexOf(e)===-1&&t==="x"}function tg(e,t){return function(n,a){return n[e]===a[e]?n[t]-a[t]:n[e]-a[e]}}function ng(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Tt(n&&n.onComplete,[e],t)}function CC(e){const t=e.chart,n=t.options.animation;Tt(n&&n.onProgress,[e],t)}function ig(e){return f0()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Vd={},ag=e=>{const t=ig(e);return Object.values(Vd).filter(n=>n.canvas===t).pop()};function xC(e,t,n){const a=Object.keys(e);for(const r of a){const s=+r;if(s>=t){const o=e[r];delete e[r],(n>0||s>t)&&(e[s+n]=o)}}}function SC(e,t,n,a){return!n||e.type==="mouseout"?null:a?t:e}function $d(e,t,n){return e.options.clip?e[n]:t[n]}function MC(e,t){const{xScale:n,yScale:a}=e;return n&&a?{left:$d(n,t,"left"),right:$d(n,t,"right"),top:$d(a,t,"top"),bottom:$d(a,t,"bottom")}:t}let aa=(kr=class{static register(...t){ia.add(...t),rg()}static unregister(...t){ia.remove(...t),rg()}constructor(t,n){const a=this.config=new bC(n),r=ig(t),s=ag(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 o=a.createResolver(a.chartOptionScopes(),this.getContext());this.platform=new(a.platform||W9(r)),this.platform.updateConfig(a);const l=this.platform.acquireContext(r,o.aspectRatio),d=l&&l.canvas,h=d&&d.height,f=d&&d.width;if(this.id=Ew(),this.ctx=l,this.canvas=d,this.width=f,this.height=h,this._options=o,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 oC,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=jw(m=>this.update(m),o.resizeDelay||0),this._dataChanges=[],Vd[this.id]=this,!l||!d){console.error("Failed to create chart: can't acquire context from the given item");return}Ca.listen(this,"complete",ng),Ca.listen(this,"progress",CC),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:a,height:r,_aspectRatio:s}=this;return Ze(t)?n&&s?s:r?a/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 ia}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():c2(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Jm(this.canvas,this.ctx),this}stop(){return Ca.stop(this),this}resize(t,n){Ca.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const a=this.options,r=this.canvas,s=a.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,t,n,s),l=a.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,c2(this,l,!0)&&(this.notifyPlugins("resize",{size:o}),Tt(a.onResize,[this,o],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};vt(n,(a,r)=>{a.id=r})}buildOrUpdateScales(){const t=this.options,n=t.scales,a=this.scales,r=Object.keys(a).reduce((o,l)=>(o[l]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const l=n[o],d=x0(o,l),h=d==="r",f=d==="x";return{options:l,dposition:h?"chartArea":f?"bottom":"left",dtype:h?"radialLinear":f?"category":"linear"}}))),vt(s,o=>{const l=o.options,d=l.id,h=x0(d,l),f=Re(l.type,o.dtype);(l.position===void 0||eg(l.position,h)!==eg(o.dposition))&&(l.position=o.dposition),r[d]=!0;let m=null;if(d in a&&a[d].type===f)m=a[d];else{const g=ia.getScale(f);m=new g({id:d,type:f,ctx:this.ctx,chart:this}),a[m.id]=m}m.init(l,t)}),vt(r,(o,l)=>{o||delete a[l]}),vt(a,o=>{Mn.configure(this,o,o.options),Mn.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,a=t.length;if(t.sort((r,s)=>r.index-s.index),a>n){for(let r=n;r<a;++r)this._destroyDatasetMeta(r);t.splice(n,a-n)}this._sortedMetasets=t.slice(0).sort(tg("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((a,r)=>{n.filter(s=>s===a._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let a,r;for(this._removeUnreferencedMetasets(),a=0,r=n.length;a<r;a++){const s=n[a];let o=this.getDatasetMeta(a);const l=s.type||this.config.type;if(o.type&&o.type!==l&&(this._destroyDatasetMeta(a),o=this.getDatasetMeta(a)),o.type=l,o.indexAxis=s.indexAxis||C0(l,this.options),o.order=s.order||0,o.index=a,o.label=""+s.label,o.visible=this.isDatasetVisible(a),o.controller)o.controller.updateIndex(a),o.controller.linkScales();else{const d=ia.getController(l),{datasetElementType:h,dataElementType:f}=Ft.datasets[l];Object.assign(d,{dataElementType:ia.getElement(f),datasetElementType:h&&ia.getElement(h)}),o.controller=new d(this,a),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){vt(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const a=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!a.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let h=0,f=this.data.datasets.length;h<f;h++){const{controller:m}=this.getDatasetMeta(h),g=!r&&s.indexOf(m)===-1;m.buildOrUpdateElements(g),o=Math.max(+m.getMaxOverflow(),o)}o=this._minPadding=a.layout.autoPadding?o:0,this._updateLayout(o),r||vt(s,h=>{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(tg("z","_idx"));const{_active:l,_lastEvent:d}=this;d?this._eventHandler(d,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){vt(this.scales,t=>{Mn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),a=new Set(t.events);(!Im(n,a)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:a,start:r,count:s}of n){const o=a==="_removeElements"?-s:s;xC(t,r,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,a=s=>new Set(t.filter(o=>o[0]===s).map((o,l)=>l+","+o.splice(1).join(","))),r=a(0);for(let s=1;s<n;s++)if(!Im(r,a(s)))return;return Array.from(r).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Mn.update(this,this.width,this.height,t);const n=this.chartArea,a=n.width<=0||n.height<=0;this._layers=[],vt(this.boxes,r=>{a&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,s)=>{r._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,a=this.data.datasets.length;n<a;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,a=this.data.datasets.length;n<a;++n)this._updateDataset(n,ir(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const a=this.getDatasetMeta(t),r={meta:a,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(a.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ca.has(this)?this.attached&&!Ca.running(this)&&Ca.start(this):(this.draw(),ng({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:a,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(a,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,a=[];let r,s;for(r=0,s=n.length;r<s;++r){const o=n[r];(!t||o.visible)&&a.push(o)}return a}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,a=t._clip,r=!a.disabled,s=MC(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&pd(n,{left:a.left===!1?0:s.left-a.left,right:a.right===!1?this.width:s.right+a.right,top:a.top===!1?0:s.top-a.top,bottom:a.bottom===!1?this.height:s.bottom+a.bottom}),t.controller.draw(),r&&md(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return ka(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,a,r){const s=k9.modes[n];return typeof s=="function"?s(this,t,a,r):[]}getDatasetMeta(t){const n=this.data.datasets[t],a=this._metasets;let r=a.filter(s=>s&&s._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},a.push(r)),r}getContext(){return this.$context||(this.$context=rr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const a=this.getDatasetMeta(t);return typeof a.hidden=="boolean"?!a.hidden:!n.hidden}setDatasetVisibility(t,n){const a=this.getDatasetMeta(t);a.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,a){const r=a?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,r);yl(n)?(s.data[n].hidden=!a,this.update()):(this.setDatasetVisibility(t,a),o.update(s,{visible:a}),this.update(l=>l.datasetIndex===t?r:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Ca.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Jm(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Vd[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,n=this.platform,a=(s,o)=>{n.addEventListener(this,s,o),t[s]=o},r=(s,o,l)=>{s.offsetX=o,s.offsetY=l,this._eventHandler(s)};vt(this.options.events,s=>a(s,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,a=(d,h)=>{n.addEventListener(this,d,h),t[d]=h},r=(d,h)=>{t[d]&&(n.removeEventListener(this,d,h),delete t[d])},s=(d,h)=>{this.canvas&&this.resize(d,h)};let o;const l=()=>{r("attach",l),this.attached=!0,this.resize(),a("resize",s),a("detach",o)};o=()=>{this.attached=!1,r("resize",s),this._stop(),this._resize(0,0),a("attach",l)},n.isAttached(this.canvas)?l():o()}unbindEvents(){vt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},vt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,a){const r=a?"set":"remove";let s,o,l,d;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+r+"DatasetHoverStyle"]()),l=0,d=t.length;l<d;++l){o=t[l];const h=o&&this.getDatasetMeta(o.datasetIndex).controller;h&&h[r+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],a=t.map(({datasetIndex:s,index:o})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[o],index:o}});!ld(a,n)&&(this._active=a,this._lastEvent=null,this._updateHoverStyles(a,n))}notifyPlugins(t,n,a){return this._plugins.notify(this,t,n,a)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,a){const r=this.options.hover,s=(d,h)=>d.filter(f=>!h.some(m=>f.datasetIndex===m.datasetIndex&&f.index===m.index)),o=s(n,t),l=a?t:s(t,n);o.length&&this.updateHoverStyle(o,r.mode,!1),l.length&&r.mode&&this.updateHoverStyle(l,r.mode,!0)}_eventHandler(t,n){const a={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},r=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",a,r)===!1)return;const s=this._handleEvent(t,n,a.inChartArea);return a.cancelable=!1,this.notifyPlugins("afterEvent",a,r),(s||a.changed)&&this.render(),this}_handleEvent(t,n,a){const{_active:r=[],options:s}=this,o=n,l=this._getActiveElements(t,r,a,o),d=Iw(t),h=SC(t,this._lastEvent,a,d);a&&(this._lastEvent=null,Tt(s.onHover,[t,l,this],this),d&&Tt(s.onClick,[t,l,this],this));const f=!ld(l,r);return(f||n)&&(this._active=l,this._updateHoverStyles(l,r,n)),this._lastEvent=h,f}_getActiveElements(t,n,a,r){if(t.type==="mouseout")return[];if(!a)return n;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,r)}},we(kr,"defaults",Ft),we(kr,"instances",Vd),we(kr,"overrides",Hr),we(kr,"registry",ia),we(kr,"version",wC),we(kr,"getChart",ag),kr);function rg(){return vt(aa.instances,e=>e._plugins.invalidate())}function BC(e,t,n){const{startAngle:a,pixelMargin:r,x:s,y:o,outerRadius:l,innerRadius:d}=t;let h=r/l;e.beginPath(),e.arc(s,o,l,a-h,n+h),d>r?(h=r/d,e.arc(s,o,d,n+h,a-h,!0)):e.arc(s,o,r,n+Zt,a-Zt),e.closePath(),e.clip()}function EC(e){return c0(e,["outerStart","outerEnd","innerStart","innerEnd"])}function OC(e,t,n,a){const r=EC(e.options.borderRadius),s=(n-t)/2,o=Math.min(s,a*t/2),l=d=>{const h=(n-Math.min(s,d))*a/2;return pn(d,0,Math.min(s,h))};return{outerStart:l(r.outerStart),outerEnd:l(r.outerEnd),innerStart:pn(r.innerStart,0,o),innerEnd:pn(r.innerEnd,0,o)}}function Fs(e,t,n,a){return{x:n+e*Math.cos(t),y:a+e*Math.sin(t)}}function Td(e,t,n,a,r,s){const{x:o,y:l,startAngle:d,pixelMargin:h,innerRadius:f}=t,m=Math.max(t.outerRadius+a+n-h,0),g=f>0?f+a+n+h:0;let y=0;const v=r-d;if(a){const j=f>0?f-a:0,me=m>0?m-a:0,be=(j+me)/2,U=be!==0?v*be/(be+a):v;y=(v-U)/2}const _=Math.max(.001,v*m-n/At)/m,k=(v-_)/2,x=d+k+y,M=r-k-y,{outerStart:B,outerEnd:C,innerStart:V,innerEnd:$}=OC(t,g,m,M-x),L=m-B,T=m-C,R=x+B/L,q=M-C/T,ee=g+V,F=g+$,Z=x+V/ee,ae=M-$/F;if(e.beginPath(),s){const j=(R+q)/2;if(e.arc(o,l,m,R,j),e.arc(o,l,m,j,q),C>0){const ye=Fs(T,q,o,l);e.arc(ye.x,ye.y,C,q,M+Zt)}const me=Fs(F,M,o,l);if(e.lineTo(me.x,me.y),$>0){const ye=Fs(F,ae,o,l);e.arc(ye.x,ye.y,$,M+Zt,ae+Math.PI)}const be=(M-$/g+(x+V/g))/2;if(e.arc(o,l,g,M-$/g,be,!0),e.arc(o,l,g,be,x+V/g,!0),V>0){const ye=Fs(ee,Z,o,l);e.arc(ye.x,ye.y,V,Z+Math.PI,x-Zt)}const U=Fs(L,x,o,l);if(e.lineTo(U.x,U.y),B>0){const ye=Fs(L,R,o,l);e.arc(ye.x,ye.y,B,x-Zt,R)}}else{e.moveTo(o,l);const j=Math.cos(R)*m+o,me=Math.sin(R)*m+l;e.lineTo(j,me);const be=Math.cos(q)*m+o,U=Math.sin(q)*m+l;e.lineTo(be,U)}e.closePath()}function DC(e,t,n,a,r){const{fullCircles:s,startAngle:o,circumference:l}=t;let d=t.endAngle;if(s){Td(e,t,n,a,d,r);for(let h=0;h<s;++h)e.fill();isNaN(l)||(d=o+(l%Nt||Nt))}return Td(e,t,n,a,d,r),e.fill(),d}function VC(e,t,n,a,r){const{fullCircles:s,startAngle:o,circumference:l,options:d}=t,{borderWidth:h,borderJoinStyle:f,borderDash:m,borderDashOffset:g}=d,y=d.borderAlign==="inner";if(!h)return;e.setLineDash(m||[]),e.lineDashOffset=g,y?(e.lineWidth=h*2,e.lineJoin=f||"round"):(e.lineWidth=h,e.lineJoin=f||"bevel");let v=t.endAngle;if(s){Td(e,t,n,a,v,r);for(let _=0;_<s;++_)e.stroke();isNaN(l)||(v=o+(l%Nt||Nt))}y&&BC(e,t,v),s||(Td(e,t,n,a,v,r),e.stroke())}class Il extends xa{constructor(n){super();we(this,"circumference");we(this,"endAngle");we(this,"fullCircles");we(this,"innerRadius");we(this,"outerRadius");we(this,"pixelMargin");we(this,"startAngle");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,n&&Object.assign(this,n)}inRange(n,a,r){const s=this.getProps(["x","y"],r),{angle:o,distance:l}=Pm(s,{x:n,y:a}),{startAngle:d,endAngle:h,innerRadius:f,outerRadius:m,circumference:g}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),y=(this.options.spacing+this.options.borderWidth)/2,v=Re(g,h-d),_=vl(o,d,h)&&d!==h,k=v>=Nt||_,x=_a(l,f+y,m+y);return k&&x}getCenterPoint(n){const{x:a,y:r,startAngle:s,endAngle:o,innerRadius:l,outerRadius:d}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:h,spacing:f}=this.options,m=(s+o)/2,g=(l+d+f+h)/2;return{x:a+Math.cos(m)*g,y:r+Math.sin(m)*g}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:a,circumference:r}=this,s=(a.offset||0)/4,o=(a.spacing||0)/2,l=a.circular;if(this.pixelMargin=a.borderAlign==="inner"?.33:0,this.fullCircles=r>Nt?Math.floor(r/Nt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const d=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(d)*s,Math.sin(d)*s);const h=1-Math.sin(Math.min(At,r||0)),f=s*h;n.fillStyle=a.backgroundColor,n.strokeStyle=a.borderColor,DC(n,this,f,o,l),VC(n,this,f,o,l),n.restore()}}we(Il,"id","arc"),we(Il,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),we(Il,"defaultRoutes",{backgroundColor:"backgroundColor"}),we(Il,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function sg(e,t,n=t){e.lineCap=Re(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Re(n.borderDash,t.borderDash)),e.lineDashOffset=Re(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Re(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Re(n.borderWidth,t.borderWidth),e.strokeStyle=Re(n.borderColor,t.borderColor)}function $C(e,t,n){e.lineTo(n.x,n.y)}function TC(e){return e.stepped?ik:e.tension||e.cubicInterpolationMode==="monotone"?ak:$C}function og(e,t,n={}){const a=e.length,{start:r=0,end:s=a-1}=n,{start:o,end:l}=t,d=Math.max(r,o),h=Math.min(s,l),f=r<o&&s<o||r>l&&s>l;return{count:a,start:d,loop:t.loop,ilen:h<d&&!f?a+h-d:h-d}}function IC(e,t,n,a){const{points:r,options:s}=t,{count:o,start:l,loop:d,ilen:h}=og(r,n,a),f=TC(s);let{move:m=!0,reverse:g}=a||{},y,v,_;for(y=0;y<=h;++y)v=r[(l+(g?h-y:y))%o],!v.skip&&(m?(e.moveTo(v.x,v.y),m=!1):f(e,_,v,g,s.stepped),_=v);return d&&(v=r[(l+(g?h:0))%o],f(e,_,v,g,s.stepped)),!!d}function AC(e,t,n,a){const r=t.points,{count:s,start:o,ilen:l}=og(r,n,a),{move:d=!0,reverse:h}=a||{};let f=0,m=0,g,y,v,_,k,x;const M=C=>(o+(h?l-C:C))%s,B=()=>{_!==k&&(e.lineTo(f,k),e.lineTo(f,_),e.lineTo(f,x))};for(d&&(y=r[M(0)],e.moveTo(y.x,y.y)),g=0;g<=l;++g){if(y=r[M(g)],y.skip)continue;const C=y.x,V=y.y,$=C|0;$===v?(V<_?_=V:V>k&&(k=V),f=(m*f+C)/++m):(B(),e.lineTo(C,V),v=$,m=0,_=k=V),x=V}B()}function S0(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?AC:IC}function NC(e){return e.stepped?Nk:e.tension||e.cubicInterpolationMode==="monotone"?zk:Gr}function zC(e,t,n,a){let r=t._path;r||(r=t._path=new Path2D,t.path(r,n,a)&&r.closePath()),sg(e,t.options),e.stroke(r)}function LC(e,t,n,a){const{segments:r,options:s}=t,o=S0(t);for(const l of r)sg(e,s,l.style),e.beginPath(),o(e,t,l,{start:n,end:n+a-1})&&e.closePath(),e.stroke()}const PC=typeof Path2D=="function";function FC(e,t,n,a){PC&&!t.options.segment?zC(e,t,n,a):LC(e,t,n,a)}class or extends xa{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,n){const a=this.options;if((a.tension||a.cubicInterpolationMode==="monotone")&&!a.stepped&&!this._pointsUpdated){const r=a.spanGaps?this._loop:this._fullLoop;Ek(this._points,a,t,r,n),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=Wk(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,a=t.length;return a&&n[t[a-1].end]}interpolate(t,n){const a=this.options,r=t[n],s=this.points,o=g2(this,{property:n,start:r,end:r});if(!o.length)return;const l=[],d=NC(a);let h,f;for(h=0,f=o.length;h<f;++h){const{start:m,end:g}=o[h],y=s[m],v=s[g];if(y===v){l.push(y);continue}const _=Math.abs((r-y[n])/(v[n]-y[n])),k=d(y,v,_,a.stepped);k[n]=t[n],l.push(k)}return l.length===1?l[0]:l}pathSegment(t,n,a){return S0(this)(t,this,n,a)}path(t,n,a){const r=this.segments,s=S0(this);let o=this._loop;n=n||0,a=a||this.points.length-n;for(const l of r)o&=s(t,this,l,{start:n,end:n+a-1});return!!o}draw(t,n,a,r){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),FC(t,this,a,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}we(or,"id","line"),we(or,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),we(or,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),we(or,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function lg(e,t,n,a){const r=e.options,{[n]:s}=e.getProps([n],a);return Math.abs(t-s)<r.radius+r.hitRadius}class Id extends xa{constructor(n){super();we(this,"parsed");we(this,"skip");we(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,a,r){const s=this.options,{x:o,y:l}=this.getProps(["x","y"],r);return Math.pow(n-o,2)+Math.pow(a-l,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,a){return lg(this,n,"x",a)}inYRange(n,a){return lg(this,n,"y",a)}getCenterPoint(n){const{x:a,y:r}=this.getProps(["x","y"],n);return{x:a,y:r}}size(n){n=n||this.options||{};let a=n.radius||0;a=Math.max(a,a&&n.hoverRadius||0);const r=a&&n.borderWidth||0;return(a+r)*2}draw(n,a){const r=this.options;this.skip||r.radius<.1||!ka(this,a,this.size(r)/2)||(n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.fillStyle=r.backgroundColor,l0(n,r,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}we(Id,"id","point"),we(Id,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),we(Id,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function cg(e,t){const{x:n,y:a,base:r,width:s,height:o}=e.getProps(["x","y","base","width","height"],t);let l,d,h,f,m;return e.horizontal?(m=o/2,l=Math.min(n,r),d=Math.max(n,r),h=a-m,f=a+m):(m=s/2,l=n-m,d=n+m,h=Math.min(a,r),f=Math.max(a,r)),{left:l,top:h,right:d,bottom:f}}function lr(e,t,n,a){return e?0:pn(t,n,a)}function RC(e,t,n){const a=e.options.borderWidth,r=e.borderSkipped,s=e2(a);return{t:lr(r.top,s.top,0,n),r:lr(r.right,s.right,0,t),b:lr(r.bottom,s.bottom,0,n),l:lr(r.left,s.left,0,t)}}function HC(e,t,n){const{enableBorderRadius:a}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,s=jr(r),o=Math.min(t,n),l=e.borderSkipped,d=a||et(r);return{topLeft:lr(!d||l.top||l.left,s.topLeft,0,o),topRight:lr(!d||l.top||l.right,s.topRight,0,o),bottomLeft:lr(!d||l.bottom||l.left,s.bottomLeft,0,o),bottomRight:lr(!d||l.bottom||l.right,s.bottomRight,0,o)}}function WC(e){const t=cg(e),n=t.right-t.left,a=t.bottom-t.top,r=RC(e,n/2,a/2),s=HC(e,n/2,a/2);return{outer:{x:t.left,y:t.top,w:n,h:a,radius:s},inner:{x:t.left+r.l,y:t.top+r.t,w:n-r.l-r.r,h:a-r.t-r.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,s.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(r.b,r.r))}}}}function M0(e,t,n,a){const r=t===null,s=n===null,l=e&&!(r&&s)&&cg(e,a);return l&&(r||_a(t,l.left,l.right))&&(s||_a(n,l.top,l.bottom))}function YC(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function jC(e,t){e.rect(t.x,t.y,t.w,t.h)}function B0(e,t,n={}){const a=e.x!==n.x?-t:0,r=e.y!==n.y?-t:0,s=(e.x+e.w!==n.x+n.w?t:0)-a,o=(e.y+e.h!==n.y+n.h?t:0)-r;return{x:e.x+a,y:e.y+r,w:e.w+s,h:e.h+o,radius:e.radius}}class Ad extends xa{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:n,options:{borderColor:a,backgroundColor:r}}=this,{inner:s,outer:o}=WC(this),l=YC(o.radius)?Cl:jC;t.save(),(o.w!==s.w||o.h!==s.h)&&(t.beginPath(),l(t,B0(o,n,s)),t.clip(),l(t,B0(s,-n,o)),t.fillStyle=a,t.fill("evenodd")),t.beginPath(),l(t,B0(s,n)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,n,a){return M0(this,t,n,a)}inXRange(t,n){return M0(this,t,null,n)}inYRange(t,n){return M0(this,null,t,n)}getCenterPoint(t){const{x:n,y:a,base:r,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(n+r)/2:n,y:s?a:(a+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}we(Ad,"id","bar"),we(Ad,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),we(Ad,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var UC=Object.freeze({__proto__:null,ArcElement:Il,BarElement:Ad,LineElement:or,PointElement:Id});const E0=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],dg=E0.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function ug(e){return E0[e%E0.length]}function hg(e){return dg[e%dg.length]}function qC(e,t){return e.borderColor=ug(t),e.backgroundColor=hg(t),++t}function GC(e,t){return e.backgroundColor=e.data.map(()=>ug(t++)),t}function KC(e,t){return e.backgroundColor=e.data.map(()=>hg(t++)),t}function ZC(e){let t=0;return(n,a)=>{const r=e.getDatasetMeta(a).controller;r instanceof sr?t=GC(n,t):r instanceof Ps?t=KC(n,t):r&&(t=qC(n,t))}}function fg(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function XC(e){return e&&(e.borderColor||e.backgroundColor)}function JC(){return Ft.borderColor!=="rgba(0,0,0,0.1)"||Ft.backgroundColor!=="rgba(0,0,0,0.1)"}var QC={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:a},options:r}=e.config,{elements:s}=r,o=fg(a)||XC(r)||s&&fg(s)||JC();if(!n.forceOverride&&o)return;const l=ZC(e);a.forEach(l)}};function ex(e,t,n,a,r){const s=r.samples||a;if(s>=n)return e.slice(t,t+n);const o=[],l=(n-2)/(s-2);let d=0;const h=t+n-1;let f=t,m,g,y,v,_;for(o[d++]=e[f],m=0;m<s-2;m++){let k=0,x=0,M;const B=Math.floor((m+1)*l)+1+t,C=Math.min(Math.floor((m+2)*l)+1,n)+t,V=C-B;for(M=B;M<C;M++)k+=e[M].x,x+=e[M].y;k/=V,x/=V;const $=Math.floor(m*l)+1+t,L=Math.min(Math.floor((m+1)*l)+1,n)+t,{x:T,y:R}=e[f];for(y=v=-1,M=$;M<L;M++)v=.5*Math.abs((T-k)*(e[M].y-R)-(T-e[M].x)*(x-R)),v>y&&(y=v,g=e[M],_=M);o[d++]=g,f=_}return o[d++]=e[h],o}function tx(e,t,n,a){let r=0,s=0,o,l,d,h,f,m,g,y,v,_;const k=[],x=t+n-1,M=e[t].x,C=e[x].x-M;for(o=t;o<t+n;++o){l=e[o],d=(l.x-M)/C*a,h=l.y;const V=d|0;if(V===f)h<v?(v=h,m=o):h>_&&(_=h,g=o),r=(s*r+l.x)/++s;else{const $=o-1;if(!Ze(m)&&!Ze(g)){const L=Math.min(m,g),T=Math.max(m,g);L!==y&&L!==$&&k.push({...e[L],x:r}),T!==y&&T!==$&&k.push({...e[T],x:r})}o>0&&$!==y&&k.push(e[$]),k.push(l),f=V,s=0,v=_=h,m=g=y=o}}return k}function pg(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function mg(e){e.data.datasets.forEach(t=>{pg(t)})}function nx(e,t){const n=t.length;let a=0,r;const{iScale:s}=e,{min:o,max:l,minDefined:d,maxDefined:h}=s.getUserBounds();return d&&(a=pn(wa(t,s.axis,o).lo,0,n-1)),h?r=pn(wa(t,s.axis,l).hi+1,a,n)-a:r=n-a,{start:a,count:r}}var ix={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){mg(e);return}const a=e.width;e.data.datasets.forEach((r,s)=>{const{_data:o,indexAxis:l}=r,d=e.getDatasetMeta(s),h=o||r.data;if(xl([l,e.options.indexAxis])==="y"||!d.controller.supportsDecimation)return;const f=e.scales[d.xAxisID];if(f.type!=="linear"&&f.type!=="time"||e.options.parsing)return;let{start:m,count:g}=nx(d,h);const y=n.threshold||4*a;if(g<=y){pg(r);return}Ze(o)&&(r._data=h,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(_){this._data=_}}));let v;switch(n.algorithm){case"lttb":v=ex(h,m,g,a,n);break;case"min-max":v=tx(h,m,g,a);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}r._decimated=v})},destroy(e){mg(e)}};function ax(e,t,n){const a=e.segments,r=e.points,s=t.points,o=[];for(const l of a){let{start:d,end:h}=l;h=D0(d,h,r);const f=O0(n,r[d],r[h],l.loop);if(!t.segments){o.push({source:l,target:f,start:r[d],end:r[h]});continue}const m=g2(t,f);for(const g of m){const y=O0(n,s[g.start],s[g.end],g.loop),v=m2(l,r,y);for(const _ of v)o.push({source:_,target:g,start:{[n]:gg(f,y,"start",Math.max)},end:{[n]:gg(f,y,"end",Math.min)}})}}return o}function O0(e,t,n,a){if(a)return;let r=t[e],s=n[e];return e==="angle"&&(r=ii(r),s=ii(s)),{property:e,start:r,end:s}}function rx(e,t){const{x:n=null,y:a=null}=e||{},r=t.points,s=[];return t.segments.forEach(({start:o,end:l})=>{l=D0(o,l,r);const d=r[o],h=r[l];a!==null?(s.push({x:d.x,y:a}),s.push({x:h.x,y:a})):n!==null&&(s.push({x:n,y:d.y}),s.push({x:n,y:h.y}))}),s}function D0(e,t,n){for(;t>e;t--){const a=n[t];if(!isNaN(a.x)&&!isNaN(a.y))break}return t}function gg(e,t,n,a){return e&&t?a(e[n],t[n]):e?e[n]:t?t[n]:0}function yg(e,t){let n=[],a=!1;return Pt(e)?(a=!0,n=e):n=rx(e,t),n.length?new or({points:n,options:{tension:0},_loop:a,_fullLoop:a}):null}function bg(e){return e&&e.fill!==!1}function sx(e,t,n){let r=e[t].fill;const s=[t];let o;if(!n)return r;for(;r!==!1&&s.indexOf(r)===-1;){if(!qt(r))return r;if(o=e[r],!o)return!1;if(o.visible)return r;s.push(r),r=o.fill}return!1}function ox(e,t,n){const a=ux(e);if(et(a))return isNaN(a.value)?!1:a;let r=parseFloat(a);return qt(r)&&Math.floor(r)===r?lx(a[0],t,r,n):["origin","start","end","stack","shape"].indexOf(a)>=0&&a}function lx(e,t,n,a){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=a?!1:n}function cx(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:et(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function dx(e,t,n){let a;return e==="start"?a=n:e==="end"?a=t.options.reverse?t.min:t.max:et(e)?a=e.value:a=t.getBaseValue(),a}function ux(e){const t=e.options,n=t.fill;let a=Re(n&&n.target,n);return a===void 0&&(a=!!t.backgroundColor),a===!1||a===null?!1:a===!0?"origin":a}function hx(e){const{scale:t,index:n,line:a}=e,r=[],s=a.segments,o=a.points,l=fx(t,n);l.push(yg({x:null,y:t.bottom},a));for(let d=0;d<s.length;d++){const h=s[d];for(let f=h.start;f<=h.end;f++)px(r,o[f],l)}return new or({points:r,options:{}})}function fx(e,t){const n=[],a=e.getMatchingVisibleMetas("line");for(let r=0;r<a.length;r++){const s=a[r];if(s.index===t)break;s.hidden||n.unshift(s.dataset)}return n}function px(e,t,n){const a=[];for(let r=0;r<n.length;r++){const s=n[r],{first:o,last:l,point:d}=mx(s,t,"x");if(!(!d||o&&l)){if(o)a.unshift(d);else if(e.push(d),!l)break}}e.push(...a)}function mx(e,t,n){const a=e.interpolate(t,n);if(!a)return{};const r=a[n],s=e.segments,o=e.points;let l=!1,d=!1;for(let h=0;h<s.length;h++){const f=s[h],m=o[f.start][n],g=o[f.end][n];if(_a(r,m,g)){l=r===m,d=r===g;break}}return{first:l,last:d,point:a}}class vg{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,a){const{x:r,y:s,radius:o}=this;return n=n||{start:0,end:Nt},t.arc(r,s,o,n.end,n.start,!0),!a.bounds}interpolate(t){const{x:n,y:a,radius:r}=this,s=t.angle;return{x:n+Math.cos(s)*r,y:a+Math.sin(s)*r,angle:s}}}function gx(e){const{chart:t,fill:n,line:a}=e;if(qt(n))return yx(t,n);if(n==="stack")return hx(e);if(n==="shape")return!0;const r=bx(e);return r instanceof vg?r:yg(r,a)}function yx(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function bx(e){return(e.scale||{}).getPointPositionForValue?_x(e):vx(e)}function vx(e){const{scale:t={},fill:n}=e,a=cx(n,t);if(qt(a)){const r=t.isHorizontal();return{x:r?a:null,y:r?null:a}}return null}function _x(e){const{scale:t,fill:n}=e,a=t.options,r=t.getLabels().length,s=a.reverse?t.max:t.min,o=dx(n,t,s),l=[];if(a.grid.circular){const d=t.getPointPositionForValue(0,s);return new vg({x:d.x,y:d.y,radius:t.getDistanceFromCenterForValue(o)})}for(let d=0;d<r;++d)l.push(t.getPointPositionForValue(d,o));return l}function V0(e,t,n){const a=gx(t),{line:r,scale:s,axis:o}=t,l=r.options,d=l.fill,h=l.backgroundColor,{above:f=h,below:m=h}=d||{};a&&r.points.length&&(pd(e,n),wx(e,{line:r,target:a,above:f,below:m,area:n,scale:s,axis:o}),md(e))}function wx(e,t){const{line:n,target:a,above:r,below:s,area:o,scale:l}=t,d=n._loop?"angle":t.axis;e.save(),d==="x"&&s!==r&&(_g(e,a,o.top),wg(e,{line:n,target:a,color:r,scale:l,property:d}),e.restore(),e.save(),_g(e,a,o.bottom)),wg(e,{line:n,target:a,color:s,scale:l,property:d}),e.restore()}function _g(e,t,n){const{segments:a,points:r}=t;let s=!0,o=!1;e.beginPath();for(const l of a){const{start:d,end:h}=l,f=r[d],m=r[D0(d,h,r)];s?(e.moveTo(f.x,f.y),s=!1):(e.lineTo(f.x,n),e.lineTo(f.x,f.y)),o=!!t.pathSegment(e,l,{move:o}),o?e.closePath():e.lineTo(m.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function wg(e,t){const{line:n,target:a,property:r,color:s,scale:o}=t,l=ax(n,a,r);for(const{source:d,target:h,start:f,end:m}of l){const{style:{backgroundColor:g=s}={}}=d,y=a!==!0;e.save(),e.fillStyle=g,kx(e,o,y&&O0(r,f,m)),e.beginPath();const v=!!n.pathSegment(e,d);let _;if(y){v?e.closePath():kg(e,a,m,r);const k=!!a.pathSegment(e,h,{move:v,reverse:!0});_=v&&k,_||kg(e,a,f,r)}e.closePath(),e.fill(_?"evenodd":"nonzero"),e.restore()}}function kx(e,t,n){const{top:a,bottom:r}=t.chart.chartArea,{property:s,start:o,end:l}=n||{};s==="x"&&(e.beginPath(),e.rect(o,a,l-o,r-a),e.clip())}function kg(e,t,n,a){const r=t.interpolate(n,a);r&&e.lineTo(r.x,r.y)}var Cx={id:"filler",afterDatasetsUpdate(e,t,n){const a=(e.data.datasets||[]).length,r=[];let s,o,l,d;for(o=0;o<a;++o)s=e.getDatasetMeta(o),l=s.dataset,d=null,l&&l.options&&l instanceof or&&(d={visible:e.isDatasetVisible(o),index:o,fill:ox(l,o,a),chart:e,axis:s.controller.options.indexAxis,scale:s.vScale,line:l}),s.$filler=d,r.push(d);for(o=0;o<a;++o)d=r[o],!(!d||d.fill===!1)&&(d.fill=sx(r,o,n.propagate))},beforeDraw(e,t,n){const a=n.drawTime==="beforeDraw",r=e.getSortedVisibleDatasetMetas(),s=e.chartArea;for(let o=r.length-1;o>=0;--o){const l=r[o].$filler;l&&(l.line.updateControlPoints(s,l.axis),a&&l.fill&&V0(e.ctx,l,s))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const a=e.getSortedVisibleDatasetMetas();for(let r=a.length-1;r>=0;--r){const s=a[r].$filler;bg(s)&&V0(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,t,n){const a=t.meta.$filler;!bg(a)||n.drawTime!=="beforeDatasetDraw"||V0(e.ctx,a,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Cg=(e,t)=>{let{boxHeight:n=t,boxWidth:a=t}=e;return e.usePointStyle&&(n=Math.min(n,t),a=e.pointStyleWidth||Math.min(a,t)),{boxWidth:a,boxHeight:n,itemHeight:Math.max(t,n)}},xx=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class xg extends xa{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,n,a){this.maxWidth=t,this.maxHeight=n,this._margins=a,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 n=Tt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(a=>t.filter(a,this.chart.data))),t.sort&&(n=n.sort((a,r)=>t.sort(a,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const a=t.labels,r=sn(a.font),s=r.size,o=this._computeTitleHeight(),{boxWidth:l,itemHeight:d}=Cg(a,s);let h,f;n.font=r.string,this.isHorizontal()?(h=this.maxWidth,f=this._fitRows(o,s,l,d)+10):(f=this.maxHeight,h=this._fitCols(o,r,l,d)+10),this.width=Math.min(h,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,n,a,r){const{ctx:s,maxWidth:o,options:{labels:{padding:l}}}=this,d=this.legendHitBoxes=[],h=this.lineWidths=[0],f=r+l;let m=t;s.textAlign="left",s.textBaseline="middle";let g=-1,y=-f;return this.legendItems.forEach((v,_)=>{const k=a+n/2+s.measureText(v.text).width;(_===0||h[h.length-1]+k+2*l>o)&&(m+=f,h[h.length-(_>0?0:1)]=0,y+=f,g++),d[_]={left:0,top:y,row:g,width:k,height:r},h[h.length-1]+=k+l}),m}_fitCols(t,n,a,r){const{ctx:s,maxHeight:o,options:{labels:{padding:l}}}=this,d=this.legendHitBoxes=[],h=this.columnSizes=[],f=o-t;let m=l,g=0,y=0,v=0,_=0;return this.legendItems.forEach((k,x)=>{const{itemWidth:M,itemHeight:B}=Sx(a,n,s,k,r);x>0&&y+B+2*l>f&&(m+=g+l,h.push({width:g,height:y}),v+=g+l,_++,g=y=0),d[x]={left:v,top:y,col:_,width:M,height:B},g=Math.max(g,M),y+=B+l}),m+=g,h.push({width:g,height:y}),m}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:a,labels:{padding:r},rtl:s}}=this,o=Ls(s,this.left,this.width);if(this.isHorizontal()){let l=0,d=xn(a,this.left+r,this.right-this.lineWidths[l]);for(const h of n)l!==h.row&&(l=h.row,d=xn(a,this.left+r,this.right-this.lineWidths[l])),h.top+=this.top+t+r,h.left=o.leftForLtr(o.x(d),h.width),d+=h.width+r}else{let l=0,d=xn(a,this.top+t+r,this.bottom-this.columnSizes[l].height);for(const h of n)h.col!==l&&(l=h.col,d=xn(a,this.top+t+r,this.bottom-this.columnSizes[l].height)),h.top=d,h.left+=this.left+r,h.left=o.leftForLtr(o.x(h.left),h.width),d+=h.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;pd(t,this),this._draw(),md(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:a,ctx:r}=this,{align:s,labels:o}=t,l=Ft.color,d=Ls(t.rtl,this.left,this.width),h=sn(o.font),{padding:f}=o,m=h.size,g=m/2;let y;this.drawTitle(),r.textAlign=d.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=h.string;const{boxWidth:v,boxHeight:_,itemHeight:k}=Cg(o,m),x=function($,L,T){if(isNaN(v)||v<=0||isNaN(_)||_<0)return;r.save();const R=Re(T.lineWidth,1);if(r.fillStyle=Re(T.fillStyle,l),r.lineCap=Re(T.lineCap,"butt"),r.lineDashOffset=Re(T.lineDashOffset,0),r.lineJoin=Re(T.lineJoin,"miter"),r.lineWidth=R,r.strokeStyle=Re(T.strokeStyle,l),r.setLineDash(Re(T.lineDash,[])),o.usePointStyle){const q={radius:_*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:R},ee=d.xPlus($,v/2),F=L+g;Qm(r,q,ee,F,o.pointStyleWidth&&v)}else{const q=L+Math.max((m-_)/2,0),ee=d.leftForLtr($,v),F=jr(T.borderRadius);r.beginPath(),Object.values(F).some(Z=>Z!==0)?Cl(r,{x:ee,y:q,w:v,h:_,radius:F}):r.rect(ee,q,v,_),r.fill(),R!==0&&r.stroke()}r.restore()},M=function($,L,T){Yr(r,T.text,$,L+k/2,h,{strikethrough:T.hidden,textAlign:d.textAlign(T.textAlign)})},B=this.isHorizontal(),C=this._computeTitleHeight();B?y={x:xn(s,this.left+f,this.right-a[0]),y:this.top+f+C,line:0}:y={x:this.left+f,y:xn(s,this.top+C+f,this.bottom-n[0].height),line:0},u2(this.ctx,t.textDirection);const V=k+f;this.legendItems.forEach(($,L)=>{r.strokeStyle=$.fontColor,r.fillStyle=$.fontColor;const T=r.measureText($.text).width,R=d.textAlign($.textAlign||($.textAlign=o.textAlign)),q=v+g+T;let ee=y.x,F=y.y;d.setWidth(this.width),B?L>0&&ee+q+f>this.right&&(F=y.y+=V,y.line++,ee=y.x=xn(s,this.left+f,this.right-a[y.line])):L>0&&F+V>this.bottom&&(ee=y.x=ee+n[y.line].width+f,y.line++,F=y.y=xn(s,this.top+C+f,this.bottom-n[y.line].height));const Z=d.x(ee);if(x(Z,F,$),ee=Uw(R,ee+v+g,B?ee+q:this.right,t.rtl),M(d.x(ee),F,$),B)y.x+=q+f;else if(typeof $.text!="string"){const ae=h.lineHeight;y.y+=Sg($,ae)+f}else y.y+=V}),h2(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,a=sn(n.font),r=Sn(n.padding);if(!n.display)return;const s=Ls(t.rtl,this.left,this.width),o=this.ctx,l=n.position,d=a.size/2,h=r.top+d;let f,m=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),f=this.top+h,m=xn(t.align,m,this.right-g);else{const v=this.columnSizes.reduce((_,k)=>Math.max(_,k.height),0);f=h+xn(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const y=xn(l,m,m+g);o.textAlign=s.textAlign(i0(l)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=a.string,Yr(o,n.text,y,f,a)}_computeTitleHeight(){const t=this.options.title,n=sn(t.font),a=Sn(t.padding);return t.display?n.lineHeight+a.height:0}_getLegendItemAt(t,n){let a,r,s;if(_a(t,this.left,this.right)&&_a(n,this.top,this.bottom)){for(s=this.legendHitBoxes,a=0;a<s.length;++a)if(r=s[a],_a(t,r.left,r.left+r.width)&&_a(n,r.top,r.top+r.height))return this.legendItems[a]}return null}handleEvent(t){const n=this.options;if(!Ex(t.type,n))return;const a=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,s=xx(r,a);r&&!s&&Tt(n.onLeave,[t,r,this],this),this._hoveredItem=a,a&&!s&&Tt(n.onHover,[t,a,this],this)}else a&&Tt(n.onClick,[t,a,this],this)}}function Sx(e,t,n,a,r){const s=Mx(a,e,t,n),o=Bx(r,a,t.lineHeight);return{itemWidth:s,itemHeight:o}}function Mx(e,t,n,a){let r=e.text;return r&&typeof r!="string"&&(r=r.reduce((s,o)=>s.length>o.length?s:o)),t+n.size/2+a.measureText(r).width}function Bx(e,t,n){let a=e;return typeof t.text!="string"&&(a=Sg(t,n)),a}function Sg(e,t){const n=e.text?e.text.length:0;return t*n}function Ex(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Ox={id:"legend",_element:xg,start(e,t,n){const a=e.legend=new xg({ctx:e.ctx,options:n,chart:e});Mn.configure(e,a,n),Mn.addBox(e,a)},stop(e){Mn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const a=e.legend;Mn.configure(e,a,n),a.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const a=t.datasetIndex,r=n.chart;r.isDatasetVisible(a)?(r.hide(a),t.hidden=!0):(r.show(a),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:a,textAlign:r,color:s,useBorderRadius:o,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(d=>{const h=d.controller.getStyle(n?0:void 0),f=Sn(h.borderWidth);return{text:t[d.index].label,fillStyle:h.backgroundColor,fontColor:s,hidden:!d.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:h.borderColor,pointStyle:a||h.pointStyle,rotation:h.rotation,textAlign:r||h.textAlign,borderRadius:o&&(l||h.borderRadius),datasetIndex:d.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class $0 extends xa{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,n){const a=this.options;if(this.left=0,this.top=0,!a.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const r=Pt(a.text)?a.text.length:1;this._padding=Sn(a.padding);const s=r*sn(a.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:a,bottom:r,right:s,options:o}=this,l=o.align;let d=0,h,f,m;return this.isHorizontal()?(f=xn(l,a,s),m=n+t,h=s-a):(o.position==="left"?(f=a+t,m=xn(l,r,n),d=At*-.5):(f=s-t,m=xn(l,n,r),d=At*.5),h=r-n),{titleX:f,titleY:m,maxWidth:h,rotation:d}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const a=sn(n.font),s=a.lineHeight/2+this._padding.top,{titleX:o,titleY:l,maxWidth:d,rotation:h}=this._drawArgs(s);Yr(t,n.text,0,0,a,{color:n.color,maxWidth:d,rotation:h,textAlign:i0(n.align),textBaseline:"middle",translation:[o,l]})}}function Dx(e,t){const n=new $0({ctx:e.ctx,options:t,chart:e});Mn.configure(e,n,t),Mn.addBox(e,n),e.titleBlock=n}var Vx={id:"title",_element:$0,start(e,t,n){Dx(e,n)},stop(e){const t=e.titleBlock;Mn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const a=e.titleBlock;Mn.configure(e,a,n),a.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 Nd=new WeakMap;var $x={id:"subtitle",start(e,t,n){const a=new $0({ctx:e.ctx,options:n,chart:e});Mn.configure(e,a,n),Mn.addBox(e,a),Nd.set(e,a)},stop(e){Mn.removeBox(e,Nd.get(e)),Nd.delete(e)},beforeUpdate(e,t,n){const a=Nd.get(e);Mn.configure(e,a,n),a.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 Al={average(e){if(!e.length)return!1;let t,n,a=new Set,r=0,s=0;for(t=0,n=e.length;t<n;++t){const l=e[t].element;if(l&&l.hasValue()){const d=l.tooltipPosition();a.add(d.x),r+=d.y,++s}}return s===0||a.size===0?!1:{x:[...a].reduce((l,d)=>l+d)/a.size,y:r/s}},nearest(e,t){if(!e.length)return!1;let n=t.x,a=t.y,r=Number.POSITIVE_INFINITY,s,o,l;for(s=0,o=e.length;s<o;++s){const d=e[s].element;if(d&&d.hasValue()){const h=d.getCenterPoint(),f=t0(t,h);f<r&&(r=f,l=d)}}if(l){const d=l.tooltipPosition();n=d.x,a=d.y}return{x:n,y:a}}};function ra(e,t){return t&&(Pt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Sa(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
17
17
  `)>-1?e.split(`
18
- `):e}function Tx(e,t){const{element:n,datasetIndex:a,index:r}=t,s=e.getDatasetMeta(a).controller,{label:o,value:l}=s.getLabelAndValue(r);return{chart:e,label:o,parsed:s.getParsed(r),raw:e.data.datasets[a].data[r],formattedValue:l,dataset:s.getDataset(),dataIndex:r,datasetIndex:a,element:n}}function Mg(e,t){const n=e.chart.ctx,{body:a,footer:r,title:s}=e,{boxWidth:o,boxHeight:l}=t,d=sn(t.bodyFont),h=sn(t.titleFont),f=sn(t.footerFont),m=s.length,g=r.length,y=a.length,v=Sn(t.padding);let _=v.height,k=0,x=a.reduce((C,V)=>C+V.before.length+V.lines.length+V.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,m&&(_+=m*h.lineHeight+(m-1)*t.titleSpacing+t.titleMarginBottom),x){const C=t.displayColors?Math.max(l,d.lineHeight):d.lineHeight;_+=y*C+(x-y)*d.lineHeight+(x-1)*t.bodySpacing}g&&(_+=t.footerMarginTop+g*f.lineHeight+(g-1)*t.footerSpacing);let M=0;const B=function(C){k=Math.max(k,n.measureText(C).width+M)};return n.save(),n.font=h.string,vt(e.title,B),n.font=d.string,vt(e.beforeBody.concat(e.afterBody),B),M=t.displayColors?o+2+t.boxPadding:0,vt(a,C=>{vt(C.before,B),vt(C.lines,B),vt(C.after,B)}),M=0,n.font=f.string,vt(e.footer,B),n.restore(),k+=v.width,{width:k,height:_}}function Ix(e,t){const{y:n,height:a}=t;return n<a/2?"top":n>e.height-a/2?"bottom":"center"}function Ax(e,t,n,a){const{x:r,width:s}=a,o=n.caretSize+n.caretPadding;if(e==="left"&&r+s+o>t.width||e==="right"&&r-s-o<0)return!0}function Nx(e,t,n,a){const{x:r,width:s}=n,{width:o,chartArea:{left:l,right:d}}=e;let h="center";return a==="center"?h=r<=(l+d)/2?"left":"right":r<=s/2?h="left":r>=o-s/2&&(h="right"),Ax(h,e,t,n)&&(h="center"),h}function Bg(e,t,n){const a=n.yAlign||t.yAlign||Ix(e,n);return{xAlign:n.xAlign||t.xAlign||Nx(e,t,n,a),yAlign:a}}function zx(e,t){let{x:n,width:a}=e;return t==="right"?n-=a:t==="center"&&(n-=a/2),n}function Lx(e,t,n){let{y:a,height:r}=e;return t==="top"?a+=n:t==="bottom"?a-=r+n:a-=r/2,a}function Eg(e,t,n,a){const{caretSize:r,caretPadding:s,cornerRadius:o}=e,{xAlign:l,yAlign:d}=n,h=r+s,{topLeft:f,topRight:m,bottomLeft:g,bottomRight:y}=jr(o);let v=zx(t,l);const _=Lx(t,d,h);return d==="center"?l==="left"?v+=h:l==="right"&&(v-=h):l==="left"?v-=Math.max(f,g)+r:l==="right"&&(v+=Math.max(m,y)+r),{x:pn(v,0,a.width-t.width),y:pn(_,0,a.height-t.height)}}function zd(e,t,n){const a=Sn(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-a.right:e.x+a.left}function Og(e){return ra([],Sa(e))}function Px(e,t,n){return rr(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Dg(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Vg={beforeTitle:va,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,a=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(a>0&&t.dataIndex<a)return n[t.dataIndex]}return""},afterTitle:va,beforeBody:va,beforeLabel:va,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Ze(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:va,afterBody:va,beforeFooter:va,footer:va,afterFooter:va};function Un(e,t,n,a){const r=e[t].call(n,a);return typeof r>"u"?Vg[t].call(n,a):r}class T0 extends xa{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 n=this.chart,a=this.options.setContext(this.getContext()),r=a.enabled&&n.options.animation&&a.animations,s=new _2(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=Px(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:a}=n,r=Un(a,"beforeTitle",this,t),s=Un(a,"title",this,t),o=Un(a,"afterTitle",this,t);let l=[];return l=ra(l,Sa(r)),l=ra(l,Sa(s)),l=ra(l,Sa(o)),l}getBeforeBody(t,n){return Og(Un(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:a}=n,r=[];return vt(t,s=>{const o={before:[],lines:[],after:[]},l=Dg(a,s);ra(o.before,Sa(Un(l,"beforeLabel",this,s))),ra(o.lines,Un(l,"label",this,s)),ra(o.after,Sa(Un(l,"afterLabel",this,s))),r.push(o)}),r}getAfterBody(t,n){return Og(Un(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:a}=n,r=Un(a,"beforeFooter",this,t),s=Un(a,"footer",this,t),o=Un(a,"afterFooter",this,t);let l=[];return l=ra(l,Sa(r)),l=ra(l,Sa(s)),l=ra(l,Sa(o)),l}_createItems(t){const n=this._active,a=this.chart.data,r=[],s=[],o=[];let l=[],d,h;for(d=0,h=n.length;d<h;++d)l.push(Tx(this.chart,n[d]));return t.filter&&(l=l.filter((f,m,g)=>t.filter(f,m,g,a))),t.itemSort&&(l=l.sort((f,m)=>t.itemSort(f,m,a))),vt(l,f=>{const m=Dg(t.callbacks,f);r.push(Un(m,"labelColor",this,f)),s.push(Un(m,"labelPointStyle",this,f)),o.push(Un(m,"labelTextColor",this,f))}),this.labelColors=r,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=l,l}update(t,n){const a=this.options.setContext(this.getContext()),r=this._active;let s,o=[];if(!r.length)this.opacity!==0&&(s={opacity:0});else{const l=Al[a.position].call(this,r,this._eventPosition);o=this._createItems(a),this.title=this.getTitle(o,a),this.beforeBody=this.getBeforeBody(o,a),this.body=this.getBody(o,a),this.afterBody=this.getAfterBody(o,a),this.footer=this.getFooter(o,a);const d=this._size=Mg(this,a),h=Object.assign({},l,d),f=Bg(this.chart,a,h),m=Eg(a,h,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,s={opacity:1,x:m.x,y:m.y,width:d.width,height:d.height,caretX:l.x,caretY:l.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&a.external&&a.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,a,r){const s=this.getCaretPosition(t,a,r);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,a){const{xAlign:r,yAlign:s}=this,{caretSize:o,cornerRadius:l}=a,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:m}=jr(l),{x:g,y}=t,{width:v,height:_}=n;let k,x,M,B,C,V;return s==="center"?(C=y+_/2,r==="left"?(k=g,x=k-o,B=C+o,V=C-o):(k=g+v,x=k+o,B=C-o,V=C+o),M=k):(r==="left"?x=g+Math.max(d,f)+o:r==="right"?x=g+v-Math.max(h,m)-o:x=this.caretX,s==="top"?(B=y,C=B-o,k=x-o,M=x+o):(B=y+_,C=B+o,k=x+o,M=x-o),V=B),{x1:k,x2:x,x3:M,y1:B,y2:C,y3:V}}drawTitle(t,n,a){const r=this.title,s=r.length;let o,l,d;if(s){const h=Ls(a.rtl,this.x,this.width);for(t.x=zd(this,a.titleAlign,a),n.textAlign=h.textAlign(a.titleAlign),n.textBaseline="middle",o=sn(a.titleFont),l=a.titleSpacing,n.fillStyle=a.titleColor,n.font=o.string,d=0;d<s;++d)n.fillText(r[d],h.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+l,d+1===s&&(t.y+=a.titleMarginBottom-l)}}_drawColorBox(t,n,a,r,s){const o=this.labelColors[a],l=this.labelPointStyles[a],{boxHeight:d,boxWidth:h}=s,f=sn(s.bodyFont),m=zd(this,"left",s),g=r.x(m),y=d<f.lineHeight?(f.lineHeight-d)/2:0,v=n.y+y;if(s.usePointStyle){const _={radius:Math.min(h,d)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},k=r.leftForLtr(g,h)+h/2,x=v+d/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,l0(t,_,k,x),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,l0(t,_,k,x)}else{t.lineWidth=et(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const _=r.leftForLtr(g,h),k=r.leftForLtr(r.xPlus(g,1),h-2),x=jr(o.borderRadius);Object.values(x).some(M=>M!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,Cl(t,{x:_,y:v,w:h,h:d,radius:x}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Cl(t,{x:k,y:v+1,w:h-2,h:d-2,radius:x}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(_,v,h,d),t.strokeRect(_,v,h,d),t.fillStyle=o.backgroundColor,t.fillRect(k,v+1,h-2,d-2))}t.fillStyle=this.labelTextColors[a]}drawBody(t,n,a){const{body:r}=this,{bodySpacing:s,bodyAlign:o,displayColors:l,boxHeight:d,boxWidth:h,boxPadding:f}=a,m=sn(a.bodyFont);let g=m.lineHeight,y=0;const v=Ls(a.rtl,this.x,this.width),_=function(T){n.fillText(T,v.x(t.x+y),t.y+g/2),t.y+=g+s},k=v.textAlign(o);let x,M,B,C,V,$,L;for(n.textAlign=o,n.textBaseline="middle",n.font=m.string,t.x=zd(this,k,a),n.fillStyle=a.bodyColor,vt(this.beforeBody,_),y=l&&k!=="right"?o==="center"?h/2+f:h+2+f:0,C=0,$=r.length;C<$;++C){for(x=r[C],M=this.labelTextColors[C],n.fillStyle=M,vt(x.before,_),B=x.lines,l&&B.length&&(this._drawColorBox(n,t,C,v,a),g=Math.max(m.lineHeight,d)),V=0,L=B.length;V<L;++V)_(B[V]),g=m.lineHeight;vt(x.after,_)}y=0,g=m.lineHeight,vt(this.afterBody,_),t.y-=s}drawFooter(t,n,a){const r=this.footer,s=r.length;let o,l;if(s){const d=Ls(a.rtl,this.x,this.width);for(t.x=zd(this,a.footerAlign,a),t.y+=a.footerMarginTop,n.textAlign=d.textAlign(a.footerAlign),n.textBaseline="middle",o=sn(a.footerFont),n.fillStyle=a.footerColor,n.font=o.string,l=0;l<s;++l)n.fillText(r[l],d.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a.footerSpacing}}drawBackground(t,n,a,r){const{xAlign:s,yAlign:o}=this,{x:l,y:d}=t,{width:h,height:f}=a,{topLeft:m,topRight:g,bottomLeft:y,bottomRight:v}=jr(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(l+m,d),o==="top"&&this.drawCaret(t,n,a,r),n.lineTo(l+h-g,d),n.quadraticCurveTo(l+h,d,l+h,d+g),o==="center"&&s==="right"&&this.drawCaret(t,n,a,r),n.lineTo(l+h,d+f-v),n.quadraticCurveTo(l+h,d+f,l+h-v,d+f),o==="bottom"&&this.drawCaret(t,n,a,r),n.lineTo(l+y,d+f),n.quadraticCurveTo(l,d+f,l,d+f-y),o==="center"&&s==="left"&&this.drawCaret(t,n,a,r),n.lineTo(l,d+m),n.quadraticCurveTo(l,d,l+m,d),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,a=this.$animations,r=a&&a.x,s=a&&a.y;if(r||s){const o=Al[t.position].call(this,this._active,this._eventPosition);if(!o)return;const l=this._size=Mg(this,t),d=Object.assign({},o,this._size),h=Bg(n,t,d),f=Eg(t,d,h,n);(r._to!==f.x||s._to!==f.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=l.width,this.height=l.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let a=this.opacity;if(!a)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},s={x:this.x,y:this.y};a=Math.abs(a)<.001?0:a;const o=Sn(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(t.save(),t.globalAlpha=a,this.drawBackground(s,t,r,n),u2(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),h2(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const a=this._active,r=t.map(({datasetIndex:l,index:d})=>{const h=this.chart.getDatasetMeta(l);if(!h)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:h.data[d],index:d}}),s=!ld(a,r),o=this._positionChanged(r,n);(s||o)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,a=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,s=this._active||[],o=this._getActiveElements(t,s,n,a),l=this._positionChanged(o,t),d=n||!ld(o,s)||l;return d&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),d}_getActiveElements(t,n,a,r){const s=this.options;if(t.type==="mouseout")return[];if(!r)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,s.mode,s,a);return s.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:a,caretY:r,options:s}=this,o=Al[s.position].call(this,t,n);return o!==!1&&(a!==o.x||r!==o.y)}}we(T0,"positioners",Al);var Fx={id:"tooltip",_element:T0,positioners:Al,afterInit(e,t,n){n&&(e.tooltip=new T0({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.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:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.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:Vg},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Rx=Object.freeze({__proto__:null,Colors:QC,Decimation:ix,Filler:Cx,Legend:Ox,SubTitle:$x,Title:Vx,Tooltip:Fx});const Hx=(e,t,n,a)=>(typeof t=="string"?(n=e.push(t)-1,a.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Wx(e,t,n,a){const r=e.indexOf(t);if(r===-1)return Hx(e,t,n,a);const s=e.lastIndexOf(t);return r!==s?n:r}const Yx=(e,t)=>e===null?null:pn(Math.round(e),0,t);function $g(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class I0 extends Zr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const a=this.getLabels();for(const{index:r,label:s}of n)a[r]===s&&a.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Ze(t))return null;const a=this.getLabels();return n=isFinite(n)&&a[n]===t?n:Wx(a,t,Re(n,t),this._addedLabels),Yx(n,a.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:a,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(a=0),n||(r=this.getLabels().length-1)),this.min=a,this.max=r}buildTicks(){const t=this.min,n=this.max,a=this.options.offset,r=[];let s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1),this._valueRange=Math.max(s.length-(a?0:1),1),this._startValue=this.min-(a?.5:0);for(let o=t;o<=n;o++)r.push({value:o});return r}getLabelForValue(t){return $g.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}we(I0,"id","category"),we(I0,"defaults",{ticks:{callback:$g}});function jx(e,t){const n=[],{bounds:r,step:s,min:o,max:l,precision:d,count:h,maxTicks:f,maxDigits:m,includeBounds:g}=e,y=s||1,v=f-1,{min:_,max:k}=t,x=!Ze(o),M=!Ze(l),B=!Ze(h),C=(k-_)/(m+1);let V=Nm((k-_)/v/y)*y,$,L,T,R;if(V<1e-14&&!x&&!M)return[{value:_},{value:k}];R=Math.ceil(k/V)-Math.floor(_/V),R>v&&(V=Nm(R*V/v/y)*y),Ze(d)||($=Math.pow(10,d),V=Math.ceil(V*$)/$),r==="ticks"?(L=Math.floor(_/V)*V,T=Math.ceil(k/V)*V):(L=_,T=k),x&&M&&s&&Pw((l-o)/s,V/1e3)?(R=Math.round(Math.min((l-o)/V,f)),V=(l-o)/R,L=o,T=l):B?(L=x?o:L,T=M?l:T,R=h-1,V=(T-L)/R):(R=(T-L)/V,bl(R,Math.round(R),V/1e3)?R=Math.round(R):R=Math.ceil(R));const q=Math.max(Lm(V),Lm(L));$=Math.pow(10,Ze(d)?q:d),L=Math.round(L*$)/$,T=Math.round(T*$)/$;let ee=0;for(x&&(g&&L!==o?(n.push({value:o}),L<o&&ee++,bl(Math.round((L+ee*V)*$)/$,o,Tg(o,C,e))&&ee++):L<o&&ee++);ee<R;++ee){const F=Math.round((L+ee*V)*$)/$;if(M&&F>l)break;n.push({value:F})}return M&&g&&T!==l?n.length&&bl(n[n.length-1].value,l,Tg(l,C,e))?n[n.length-1].value=l:n.push({value:l}):(!M||T===l)&&n.push({value:T}),n}function Tg(e,t,{horizontal:n,minRotation:a}){const r=zi(a),s=(n?Math.sin(r):Math.cos(r))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}class Ld extends Zr{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,n){return Ze(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:a}=this.getUserBounds();let{min:r,max:s}=this;const o=d=>r=n?r:d,l=d=>s=a?s:d;if(t){const d=na(r),h=na(s);d<0&&h<0?l(0):d>0&&h>0&&o(0)}if(r===s){let d=s===0?1:Math.abs(s*.05);l(s+d),t||o(r-d)}this.min=r,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:a}=t,r;return a?(r=Math.ceil(this.max/a)-Math.floor(this.min/a)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${a} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let a=this.getTickLimit();a=Math.max(2,a);const r={maxTicks:a,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=jx(r,s);return t.bounds==="ticks"&&zm(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,a=this.max;if(super.configure(),this.options.offset&&t.length){const r=(a-n)/Math.max(t.length-1,1)/2;n-=r,a+=r}this._startValue=n,this._endValue=a,this._valueRange=a-n}getLabelForValue(t){return wl(t,this.chart.options.locale,this.options.ticks.format)}}class A0 extends Ld{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=qt(t)?t:0,this.max=qt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,a=zi(this.options.ticks.minRotation),r=(t?Math.sin(a):Math.cos(a))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}we(A0,"id","linear"),we(A0,"defaults",{ticks:{callback:hd.formatters.numeric}});const Nl=e=>Math.floor(ar(e)),Xr=(e,t)=>Math.pow(10,Nl(e)+t);function Ig(e){return e/Math.pow(10,Nl(e))===1}function Ag(e,t,n){const a=Math.pow(10,n),r=Math.floor(e/a);return Math.ceil(t/a)-r}function Ux(e,t){const n=t-e;let a=Nl(n);for(;Ag(e,t,a)>10;)a++;for(;Ag(e,t,a)<10;)a--;return Math.min(a,Nl(e))}function qx(e,{min:t,max:n}){t=ni(e.min,t);const a=[],r=Nl(t);let s=Ux(t,n),o=s<0?Math.pow(10,Math.abs(s)):1;const l=Math.pow(10,s),d=r>s?Math.pow(10,r):0,h=Math.round((t-d)*o)/o,f=Math.floor((t-d)/l/10)*l*10;let m=Math.floor((h-f)/Math.pow(10,s)),g=ni(e.min,Math.round((d+f+m*Math.pow(10,s))*o)/o);for(;g<n;)a.push({value:g,major:Ig(g),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(s++,m=2,o=s>=0?1:o),g=Math.round((d+f+m*Math.pow(10,s))*o)/o;const y=ni(e.max,g);return a.push({value:y,major:Ig(y),significand:m}),a}class N0 extends Zr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const a=Ld.prototype.parse.apply(this,[t,n]);if(a===0){this._zero=!0;return}return qt(a)&&a>0?a:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=qt(t)?Math.max(0,t):null,this.max=qt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!qt(this._userMin)&&(this.min=t===Xr(this.min,0)?Xr(this.min,-1):Xr(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let a=this.min,r=this.max;const s=l=>a=t?a:l,o=l=>r=n?r:l;a===r&&(a<=0?(s(1),o(10)):(s(Xr(a,-1)),o(Xr(r,1)))),a<=0&&s(Xr(r,-1)),r<=0&&o(Xr(a,1)),this.min=a,this.max=r}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},a=qx(n,this);return t.bounds==="ticks"&&zm(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}getLabelForValue(t){return t===void 0?"0":wl(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ar(t),this._valueRange=ar(this.max)-ar(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ar(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}we(N0,"id","logarithmic"),we(N0,"defaults",{ticks:{callback:hd.formatters.logarithmic,major:{enabled:!0}}});function z0(e){const t=e.ticks;if(t.display&&e.display){const n=Sn(t.backdropPadding);return Re(t.font&&t.font.size,Ft.font.size)+n.height}return 0}function Gx(e,t,n){return n=Pt(n)?n:[n],{w:nk(e,t.string,n),h:n.length*t.lineHeight}}function Ng(e,t,n,a,r){return e===a||e===r?{start:t-n/2,end:t+n/2}:e<a||e>r?{start:t-n,end:t}:{start:t,end:t+n}}function Kx(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),a=[],r=[],s=e._pointLabels.length,o=e.options.pointLabels,l=o.centerPointLabels?At/s:0;for(let d=0;d<s;d++){const h=o.setContext(e.getPointLabelContext(d));r[d]=h.padding;const f=e.getPointPosition(d,e.drawingArea+r[d],l),m=sn(h.font),g=Gx(e.ctx,m,e._pointLabels[d]);a[d]=g;const y=ii(e.getIndexAngle(d)+l),v=Math.round(e0(y)),_=Ng(v,f.x,g.w,0,180),k=Ng(v,f.y,g.h,90,270);Zx(n,t,y,_,k)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=Qx(e,a,r)}function Zx(e,t,n,a,r){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let l=0,d=0;a.start<t.l?(l=(t.l-a.start)/s,e.l=Math.min(e.l,t.l-l)):a.end>t.r&&(l=(a.end-t.r)/s,e.r=Math.max(e.r,t.r+l)),r.start<t.t?(d=(t.t-r.start)/o,e.t=Math.min(e.t,t.t-d)):r.end>t.b&&(d=(r.end-t.b)/o,e.b=Math.max(e.b,t.b+d))}function Xx(e,t,n){const a=e.drawingArea,{extra:r,additionalAngle:s,padding:o,size:l}=n,d=e.getPointPosition(t,a+r+o,s),h=Math.round(e0(ii(d.angle+Zt))),f=nS(d.y,l.h,h),m=eS(h),g=tS(d.x,l.w,m);return{visible:!0,x:d.x,y:f,textAlign:m,left:g,top:f,right:g+l.w,bottom:f+l.h}}function Jx(e,t){if(!t)return!0;const{left:n,top:a,right:r,bottom:s}=e;return!(ka({x:n,y:a},t)||ka({x:n,y:s},t)||ka({x:r,y:a},t)||ka({x:r,y:s},t))}function Qx(e,t,n){const a=[],r=e._pointLabels.length,s=e.options,{centerPointLabels:o,display:l}=s.pointLabels,d={extra:z0(s)/2,additionalAngle:o?At/r:0};let h;for(let f=0;f<r;f++){d.padding=n[f],d.size=t[f];const m=Xx(e,f,d);a.push(m),l==="auto"&&(m.visible=Jx(m,h),m.visible&&(h=m))}return a}function eS(e){return e===0||e===180?"center":e<180?"left":"right"}function tS(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function nS(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function iS(e,t,n){const{left:a,top:r,right:s,bottom:o}=n,{backdropColor:l}=t;if(!Ze(l)){const d=jr(t.borderRadius),h=Sn(t.backdropPadding);e.fillStyle=l;const f=a-h.left,m=r-h.top,g=s-a+h.width,y=o-r+h.height;Object.values(d).some(v=>v!==0)?(e.beginPath(),Cl(e,{x:f,y:m,w:g,h:y,radius:d}),e.fill()):e.fillRect(f,m,g,y)}}function aS(e,t){const{ctx:n,options:{pointLabels:a}}=e;for(let r=t-1;r>=0;r--){const s=e._pointLabelItems[r];if(!s.visible)continue;const o=a.setContext(e.getPointLabelContext(r));iS(n,o,s);const l=sn(o.font),{x:d,y:h,textAlign:f}=s;Yr(n,e._pointLabels[r],d,h+l.lineHeight/2,l,{color:o.color,textAlign:f,textBaseline:"middle"})}}function zg(e,t,n,a){const{ctx:r}=e;if(n)r.arc(e.xCenter,e.yCenter,t,0,Nt);else{let s=e.getPointPosition(0,t);r.moveTo(s.x,s.y);for(let o=1;o<a;o++)s=e.getPointPosition(o,t),r.lineTo(s.x,s.y)}}function rS(e,t,n,a,r){const s=e.ctx,o=t.circular,{color:l,lineWidth:d}=t;!o&&!a||!l||!d||n<0||(s.save(),s.strokeStyle=l,s.lineWidth=d,s.setLineDash(r.dash||[]),s.lineDashOffset=r.dashOffset,s.beginPath(),zg(e,n,o,a),s.closePath(),s.stroke(),s.restore())}function sS(e,t,n){return rr(e,{label:n,index:t,type:"pointLabel"})}class zl extends Ld{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Sn(z0(this.options)/2),n=this.width=this.maxWidth-t.width,a=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+a/2+t.top),this.drawingArea=Math.floor(Math.min(n,a)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=qt(t)&&!isNaN(t)?t:0,this.max=qt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/z0(this.options))}generateTickLabels(t){Ld.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,a)=>{const r=Tt(this.options.pointLabels.callback,[n,a],this);return r||r===0?r:""}).filter((n,a)=>this.chart.getDataVisibility(a))}fit(){const t=this.options;t.display&&t.pointLabels.display?Kx(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,a,r){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((a-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,a,r))}getIndexAngle(t){const n=Nt/(this._pointLabels.length||1),a=this.options.startAngle||0;return ii(t*n+zi(a))}getDistanceFromCenterForValue(t){if(Ze(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(Ze(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const a=n[t];return sS(this.getContext(),t,a)}}getPointPosition(t,n,a=0){const r=this.getIndexAngle(t)-Zt+a;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:a,right:r,bottom:s}=this._pointLabelItems[t];return{left:n,top:a,right:r,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const a=this.ctx;a.save(),a.beginPath(),zg(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),a.closePath(),a.fillStyle=t,a.fill(),a.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:a,grid:r,border:s}=n,o=this._pointLabels.length;let l,d,h;if(n.pointLabels.display&&aS(this,o),r.display&&this.ticks.forEach((f,m)=>{if(m!==0||m===0&&this.min<0){d=this.getDistanceFromCenterForValue(f.value);const g=this.getContext(m),y=r.setContext(g),v=s.setContext(g);rS(this,y,d,o,v)}}),a.display){for(t.save(),l=o-1;l>=0;l--){const f=a.setContext(this.getPointLabelContext(l)),{color:m,lineWidth:g}=f;!g||!m||(t.lineWidth=g,t.strokeStyle=m,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,d=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),h=this.getPointPosition(l,d),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(h.x,h.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,a=n.ticks;if(!a.display)return;const r=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((l,d)=>{if(d===0&&this.min>=0&&!n.reverse)return;const h=a.setContext(this.getContext(d)),f=sn(h.font);if(s=this.getDistanceFromCenterForValue(this.ticks[d].value),h.showLabelBackdrop){t.font=f.string,o=t.measureText(l.label).width,t.fillStyle=h.backdropColor;const m=Sn(h.backdropPadding);t.fillRect(-o/2-m.left,-s-f.size/2-m.top,o+m.width,f.size+m.height)}Yr(t,l.label,0,-s,f,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})}),t.restore()}drawTitle(){}}we(zl,"id","radialLinear"),we(zl,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:hd.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),we(zl,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),we(zl,"descriptors",{angleLines:{_fallback:"grid"}});const Pd={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},qn=Object.keys(Pd);function Lg(e,t){return e-t}function Pg(e,t){if(Ze(t))return null;const n=e._adapter,{parser:a,round:r,isoWeekday:s}=e._parseOpts;let o=t;return typeof a=="function"&&(o=a(o)),qt(o)||(o=typeof a=="string"?n.parse(o,a):n.parse(o)),o===null?null:(r&&(o=r==="week"&&(As(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,r)),+o)}function Fg(e,t,n,a){const r=qn.length;for(let s=qn.indexOf(e);s<r-1;++s){const o=Pd[qn[s]],l=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(l*o.size))<=a)return qn[s]}return qn[r-1]}function oS(e,t,n,a,r){for(let s=qn.length-1;s>=qn.indexOf(n);s--){const o=qn[s];if(Pd[o].common&&e._adapter.diff(r,a,o)>=t-1)return o}return qn[n?qn.indexOf(n):0]}function lS(e){for(let t=qn.indexOf(e)+1,n=qn.length;t<n;++t)if(Pd[qn[t]].common)return qn[t]}function Rg(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:a,hi:r}=n0(n,t),s=n[a]>=t?n[a]:n[r];e[s]=!0}}function cS(e,t,n,a){const r=e._adapter,s=+r.startOf(t[0].value,a),o=t[t.length-1].value;let l,d;for(l=s;l<=o;l=+r.add(l,1,a))d=n[l],d>=0&&(t[d].major=!0);return t}function Hg(e,t,n){const a=[],r={},s=t.length;let o,l;for(o=0;o<s;++o)l=t[o],r[l]=o,a.push({value:l,major:!1});return s===0||!n?a:cS(e,a,r,n)}class Ll extends Zr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const a=t.time||(t.time={}),r=this._adapter=new V2._date(t.adapters.date);r.init(n),gl(a.displayFormats,r.formats()),this._parseOpts={parser:a.parser,round:a.round,isoWeekday:a.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Pg(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,a=t.time.unit||"day";let{min:r,max:s,minDefined:o,maxDefined:l}=this.getUserBounds();function d(h){!o&&!isNaN(h.min)&&(r=Math.min(r,h.min)),!l&&!isNaN(h.max)&&(s=Math.max(s,h.max))}(!o||!l)&&(d(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&d(this.getMinMax(!1))),r=qt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),a),s=qt(s)&&!isNaN(s)?s:+n.endOf(Date.now(),a)+1,this.min=Math.min(r,s-1),this.max=Math.max(r+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],a=t[t.length-1]),{min:n,max:a}}buildTicks(){const t=this.options,n=t.time,a=t.ticks,r=a.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const s=this.min,o=this.max,l=Ww(r,s,o);return this._unit=n.unit||(a.autoSkip?Fg(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):oS(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!a.major.enabled||this._unit==="year"?void 0:lS(this._unit),this.initOffsets(r),t.reverse&&l.reverse(),Hg(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,a=0,r,s;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?n=1-r:n=(this.getDecimalForValue(t[1])-r)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?a=s:a=(s-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=pn(n,0,o),a=pn(a,0,o),this._offsets={start:n,end:a,factor:1/(n+1+a)}}_generate(){const t=this._adapter,n=this.min,a=this.max,r=this.options,s=r.time,o=s.unit||Fg(s.minUnit,n,a,this._getLabelCapacity(n)),l=Re(r.ticks.stepSize,1),d=o==="week"?s.isoWeekday:!1,h=As(d)||d===!0,f={};let m=n,g,y;if(h&&(m=+t.startOf(m,"isoWeek",d)),m=+t.startOf(m,h?"day":o),t.diff(a,n,o)>1e5*l)throw new Error(n+" and "+a+" are too far apart with stepSize of "+l+" "+o);const v=r.ticks.source==="data"&&this.getDataTimestamps();for(g=m,y=0;g<a;g=+t.add(g,l,o),y++)Rg(f,g,v);return(g===a||r.bounds==="ticks"||y===1)&&Rg(f,g,v),Object.keys(f).sort(Lg).map(_=>+_)}getLabelForValue(t){const n=this._adapter,a=this.options.time;return a.tooltipFormat?n.format(t,a.tooltipFormat):n.format(t,a.displayFormats.datetime)}format(t,n){const r=this.options.time.displayFormats,s=this._unit,o=n||r[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,a,r){const s=this.options,o=s.ticks.callback;if(o)return Tt(o,[t,n,a],this);const l=s.time.displayFormats,d=this._unit,h=this._majorUnit,f=d&&l[d],m=h&&l[h],g=a[n],y=h&&m&&g&&g.major;return this._adapter.format(t,r||(y?m:f))}generateTickLabels(t){let n,a,r;for(n=0,a=t.length;n<a;++n)r=t[n],r.label=this._tickFormatFunction(r.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,a=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+a)*n.factor)}getValueForPixel(t){const n=this._offsets,a=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+a*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,a=this.ctx.measureText(t).width,r=zi(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(r),o=Math.sin(r),l=this._resolveTickFontOptions(0).size;return{w:a*s+l*o,h:a*o+l*s}}_getLabelCapacity(t){const n=this.options.time,a=n.displayFormats,r=a[n.unit]||a.millisecond,s=this._tickFormatFunction(t,0,Hg(this,[t],this._majorUnit),r),o=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],n,a;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,a=r.length;n<a;++n)t=t.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,a;if(t.length)return t;const r=this.getLabels();for(n=0,a=r.length;n<a;++n)t.push(Pg(this,r[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Hm(t.sort(Lg))}}we(Ll,"id","time"),we(Ll,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Fd(e,t,n){let a=0,r=e.length-1,s,o,l,d;n?(t>=e[a].pos&&t<=e[r].pos&&({lo:a,hi:r}=wa(e,"pos",t)),{pos:s,time:l}=e[a],{pos:o,time:d}=e[r]):(t>=e[a].time&&t<=e[r].time&&({lo:a,hi:r}=wa(e,"time",t)),{time:s,pos:l}=e[a],{time:o,pos:d}=e[r]);const h=o-s;return h?l+(d-l)*(t-s)/h:l}class L0 extends Ll{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Fd(n,this.min),this._tableRange=Fd(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:a}=this,r=[],s=[];let o,l,d,h,f;for(o=0,l=t.length;o<l;++o)h=t[o],h>=n&&h<=a&&r.push(h);if(r.length<2)return[{time:n,pos:0},{time:a,pos:1}];for(o=0,l=r.length;o<l;++o)f=r[o+1],d=r[o-1],h=r[o],Math.round((f+d)/2)!==h&&s.push({time:h,pos:o/(l-1)});return s}_generate(){const t=this.min,n=this.max;let a=super.getDataTimestamps();return(!a.includes(t)||!a.length)&&a.splice(0,0,t),(!a.includes(n)||a.length===1)&&a.push(n),a.sort((r,s)=>r-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),a=this.getLabelTimestamps();return n.length&&a.length?t=this.normalize(n.concat(a)):t=n.length?n:a,t=this._cache.all=t,t}getDecimalForValue(t){return(Fd(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,a=this.getDecimalForPixel(t)/n.factor-n.end;return Fd(this._table,a*this._tableRange+this._minPos,!0)}}we(L0,"id","timeseries"),we(L0,"defaults",Ll.defaults);var dS=Object.freeze({__proto__:null,CategoryScale:I0,LinearScale:A0,LogarithmicScale:N0,RadialLinearScale:zl,TimeScale:Ll,TimeSeriesScale:L0});const Jr=[y9,UC,Rx,dS],Wg={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},uS={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...Wg,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},hS=i.version[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function Rs(e){return i.isProxy(e)?i.toRaw(e):e}function fS(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return i.isProxy(t)?new Proxy(e,{}):e}function pS(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function Yg(e,t){e.labels=t}function jg(e,t,n){const a=[];e.datasets=t.map(r=>{const s=e.datasets.find(o=>o[n]===r[n]);return!s||!r.data||a.includes(s)?{...r}:(a.push(s),Object.assign(s,r),s)})}function mS(e,t){const n={labels:[],datasets:[]};return Yg(n,e.labels),jg(n,e.datasets,t),n}const gS=i.defineComponent({props:uS,setup(e,t){let{expose:n,slots:a}=t;const r=i.ref(null),s=i.shallowRef(null);n({chart:s});const o=()=>{if(!r.value)return;const{type:h,data:f,options:m,plugins:g,datasetIdKey:y}=e,v=mS(f,y),_=fS(v,f);s.value=new aa(r.value,{type:h,data:_,options:{...m},plugins:g})},l=()=>{const h=i.toRaw(s.value);h&&(e.destroyDelay>0?setTimeout(()=>{h.destroy(),s.value=null},e.destroyDelay):(h.destroy(),s.value=null))},d=h=>{h.update(e.updateMode)};return i.onMounted(o),i.onUnmounted(l),i.watch([()=>e.options,()=>e.data],(h,f)=>{let[m,g]=h,[y,v]=f;const _=i.toRaw(s.value);if(!_)return;let k=!1;if(m){const x=Rs(m),M=Rs(y);x&&x!==M&&(pS(_,x),k=!0)}if(g){const x=Rs(g.labels),M=Rs(v.labels),B=Rs(g.datasets),C=Rs(v.datasets);x!==M&&(Yg(_.config.data,x),k=!0),B&&B!==C&&(jg(_.config.data,B,e.datasetIdKey),k=!0)}k&&i.nextTick(()=>{d(_)})},{deep:!0}),()=>i.h("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:r},[i.h("p",{},[a.default?a.default():""])])}});function Pl(e,t){return aa.register(t),i.defineComponent({props:Wg,setup(n,a){let{expose:r}=a;const s=i.shallowRef(null),o=l=>{s.value=l==null?void 0:l.chart};return r({chart:s}),()=>i.h(gS,hS({ref:o},{type:e,...n}))}})}const Ug=Pl("bar",Ml),qg=Pl("doughnut",sr),yS=Pl("line",Bl),bS=Pl("pie",wd),vS=Pl("polarArea",Ps),ai={gp50:"#f3fcf8",gp100:"#e2f8ef",gp200:"#abedd3",gp300:"#6ddfb1",gp400:"#2db981",gp500:"#239f6d",gp600:"#1c7d56",gp700:"#136746",ta50:"#eefcfa",ta100:"#dcf9f6",ta200:"#a2f1e5",ta300:"#51e6d0",ta400:"#20c5ad",ta500:"#18aa94",ta600:"#138675",ta700:"#0f6b5d",ts50:"#f5fbff",ts100:"#e6f6fe",ts200:"#C2EDFF",ts300:"#7BD0F4",ts400:"#42AAD7",ts500:"#1F86B2",ts600:"#18698B",ts700:"#155875",bn50:"#f6f9fe",bn100:"#e6effe",bn200:"#b4cdf8",bn300:"#729ee9",bn400:"#467bd8",bn500:"#2f64c1",bn600:"#2051a7",bn700:"#19438a",in50:"#f5f6ff",in100:"#ebefff",in200:"#CED6FD",in300:"#9bacf8",in400:"#6a7cd7",in500:"#4b5caf",in600:"#374486",in700:"#2f396f",vr50:"#faf5ff",vr100:"#f7f0ff",vr200:"#E6D2F9",vr300:"#CEABED",vr400:"#a772d5",vr500:"#8955B9",vr600:"#6B3A98",vr700:"#5c3082",pp50:"#fff5fb",pp100:"#ffebf7",pp200:"#F9C8E2",pp300:"#EF8FC0",pp400:"#DA629F",pp500:"#BE377C",pp600:"#A12663",pp700:"#88255a",rc50:"#fef6f7",rc100:"#ffebed",rc200:"#FABDC5",rc300:"#F98B98",rc400:"#F3596C",rc500:"#E03E52",rc600:"#C92C3F",rc700:"#b22435",og50:"#fef7f6",og100:"#ffefeb",og200:"#FFD6CC",og300:"#FDAF9B",og400:"#FF8567",og500:"#F06442",og600:"#D64B29",og700:"#bc4224",al50:"#fefbf6",al100:"#fdf3e2",al200:"#ffe5b8",al300:"#fdd286",al400:"#f6bd5a",al500:"#eda831",al600:"#d89013",al700:"#c08011",n0:"#FFFFFF",n10:"#FAFCFE",n20:"#F4F8FB",n30:"#E7EDF3",n40:"#DFE5EC",n50:"#D6DCE3",n100:"#C3CCD5",n200:"#ACB8C3",n300:"#99A6B2",n400:"#8794A1",n500:"#647382",n600:"#52616F",n700:"#3B4754",n800:"#28333E",n900:"#1D262F",palete:'["Light Neutrals", "Light", #FFFFFF, #FAFCFE, #F4F8FB, #E7EDF3, #DFE5EC, "$n-0", "$n-10", "$n-20", "$n-30", "$n-40"], ["Mid Neutrals", "Gray", #D6DCE3, #C3CCD5, #ACB8C3, #99A6B2, #8794A1, "$n-50", "$n-100", "$n-200", "$n-300", "$n-400"], ["Dark Neutrals", "Dark", #647382, #52616F, #3B4754, #28333E, #1D262F, "$n-500", "$n-600", "$n-700", "$n-800", "$n-900"], ["Piccolo Green", "Green", #f3fcf8, #e2f8ef, #abedd3, #6ddfb1, #2db981, #239f6d, #1c7d56, #136746, "$gp-50", "$gp-100", "$gp-200", "$gp-300", "$gp-400", "$gp-500", "$gp-600", "$gp-700"], ["Aquaman Teal", "Teal", #eefcfa, #dcf9f6, #a2f1e5, #51e6d0, #20c5ad, #18aa94, #138675, #0f6b5d, "$ta-50", "$ta-100", "$ta-200", "$ta-300", "$ta-400", "$ta-500", "$ta-600", "$ta-700"], ["Sulivan Turquoise", "Turquoise", #f5fbff, #e6f6fe, #C2EDFF, #7BD0F4, #42AAD7, #1F86B2, #18698B, #155875, "$ts-50", "$ts-100", "$ts-200", "$ts-300", "$ts-400", "$ts-500", "$ts-600", "$ts-700"], ["Nocturne Blue", "Blue", #f6f9fe, #e6effe, #b4cdf8, #729ee9, #467bd8, #2f64c1, #2051a7, #19438a, "$bn-50", "$bn-100", "$bn-200", "$bn-300", "$bn-400", "$bn-500", "$bn-600", "$bn-700"], ["Nightwing Indigo", "Indigo", #f5f6ff, #ebefff, #CED6FD, #9bacf8, #6a7cd7, #4b5caf, #374486, #2f396f, "$in-50", "$in-100", "$in-200", "$in-300", "$in-400", "$in-500", "$in-600", "$in-700"], ["Raven Violet", "Violet", #faf5ff, #f7f0ff, #E6D2F9, #CEABED, #a772d5, #8955B9, #6B3A98, #5c3082, "$vr-50", "$vr-100", "$vr-200", "$vr-300", "$vr-400", "$vr-500", "$vr-600", "$vr-700"], ["Peppa Pink", "Pink", #fff5fb, #ffebf7, #F9C8E2, #EF8FC0, #DA629F, #BE377C, #A12663, #88255a, "$pp-50", "$pp-100", "$pp-200", "$pp-300", "$pp-400", "$pp-500", "$pp-600", "$pp-700"], ["Carmen Red", "Red", #fef6f7, #ffebed, #FABDC5, #F98B98, #F3596C, #E03E52, #C92C3F, #b22435, "$rc-50", "$rc-100", "$rc-200", "$rc-300", "$rc-400", "$rc-500", "$rc-600", "$rc-700"], ["Goku Orange", "Orange", #fef7f6, #ffefeb, #FFD6CC, #FDAF9B, #FF8567, #F06442, #D64B29, #bc4224, "$og-50", "$og-100", "$og-200", "$og-300", "$og-400", "$og-500", "$og-600", "$og-700"], ["Lisa Amber", "Amber", #fefbf6, #fdf3e2, #ffe5b8, #fdd286, #f6bd5a, #eda831, #d89013, #c08011, "$al-50", "$al-100", "$al-200", "$al-300", "$al-400", "$al-500", "$al-600", "$al-700"]',chartThemes:'["Blue Theme", "Blue", #467bd8, #42AAD7, #20c5ad, #19438a, #4b5caf, #6ddfb1, #FFD6CC, #ffefeb, #ffe5b8, #fdd286, "$bn-400", "$ts-400", "$ta-400", "$bn-700", "$in-500", "$gp-300", "$og-200", "$og-100", "$al-200", "$al-300"], ["Indigo Theme", "Indigo", #4b5caf, #CEABED, #FDAF9B, #ffebf7, #FFD6CC, #6a7cd7, #E7EDF3, #EF8FC0, #a772d5, #3B4754, "$in-500", "$pp-100", "$og-200", "$vr-300", "$in-400", "$og-300", "$n-30", "$n-700", "$vr-400", "$pp-300"]'},sa=e=>{let t=[],n={};const a=/(\[[^[\]]*\])/g,r=e.match(a);for(let s=0;s<r.length;s++){r[s]=r[s].replace("[",""),r[s]=r[s].replace("]","");let o=r[s].split(",");n.colorName=o[0].trim().replace(/"/g,""),n.variantName=o[1].trim().replace(/"/g,""),n.color400=o[6],n.colorShades=[],n.colorTokens=[],n.colorData=[];let l=!1;for(let d=2,h=2;d<o.length;d++,h++)o[d].includes("#")?(n.colorShades.push(o[d].trim()),n.colorData[h-2]={},n.colorData[h-2].shade=o[d].trim()):o[d].includes("$")&&(n.colorTokens.push(o[d].trim().replace(/"/g,"")),n.colorData[h-2].token=o[d].trim().replace(/"/g,"")),!l&&o[d+1].includes("$")&&(h=1,l=!0);t.push(n),n={}}return t};aa.register(...Jr);const _S={name:"CdsBarChart",components:{Bar:Ug},props:{data:{type:Array,required:!0},variant:{type:String,required:!0,default:"green",validator:e=>["green","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},labels:{type:Array,required:!0,default:()=>[]},barWidth:{type:Number,default:1},horizontalBar:{type:Boolean,default:!1}},data(){return{sassColorVariables:ai,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{responsive:!0,maintainAspectRatio:!1,categoryPercentage:null,plugins:{tooltip:{callbacks:{beforeTitle:function(e){return`${e[0].dataset.name}`}}},legend:{display:!0,labels:{usePointStyle:!0,pointStyle:"rectRounded"}}}}}},watch:{labels:{handler(e){this.localLabels=e},immediate:!0},variant:{handler(e){e==="gray"||e==="dark"?this.deleteFirstTwoColors=!0:this.deleteFirstTwoColors=!1},immediate:!0},data:{handler(e){this.mergeChartDataNoSelect(e)},immediate:!0},barWidth:{handler(e){e>=.1&&e<=1?this.chartOptions.categoryPercentage=e:this.chartOptions.categoryPercentage=1},immediate:!0}},mounted(){this.horizontalBar&&(this.chartOptions={...this.chartOptions,indexAxis:"y",scales:{y:{beginAtZero:!0}}})},methods:{paleteBuilder:sa,palete(){this.palletColors=this.paleteBuilder(this.sassColorVariables.palete),this.removeFirstTwoElements()},removeFirstTwoElements(){for(let e=0;e<this.palletColors.length;e++){const t=this.palletColors[e];this.deleteFirstTwoColors===!1&&(t.colorShades.splice(0,2),t.colorTokens.splice(0,2),t.colorData.splice(0,2))}},addDataSetNames(){this.data.forEach(e=>{e.datasets.forEach(t=>{t.name=e.name})})},mergeChartDataNoSelect(e){const t={labels:this.localLabels,datasets:[]};this.addDataSetNames(),e.forEach(a=>{a.datasets.forEach(r=>{const s={label:r.label,data:r.data,name:r.name,borderRadius:6};t.datasets.push(s)})}),this.palete();const n=this.generateBackgroundColor();this.setColors(t.datasets,n),this.localChartData=t},generateBackgroundColor(){const e=this.variant.toLowerCase(),t=this.palletColors.find(n=>n.variantName.toLowerCase().includes(e));return t?t.colorShades:[]},setColors(e,t){const n={};this.chartOptions.plugins.legend.display=!0,e.forEach(a=>{const r=a.name;let s;e.length===1&&(s=2,n[r]=t[s],this.chartOptions.plugins.legend.display=!1),n[r]||(s=Object.keys(n).length%t.length,n[r]=t[s]),a.backgroundColor=n[r],a.borderRadius=6})}}},wS={class:"responsive-container"};function kS(e,t,n,a,r,s){const o=i.resolveComponent("Bar");return i.openBlock(),i.createElementBlock("span",null,[i.createElementVNode("div",wS,[i.createVNode(o,{is:"bar",data:r.localChartData,options:r.chartOptions},null,8,["data","options"])])])}const CS=ie(_S,[["render",kS],["__scopeId","data-v-01f4f220"]]);class Qr extends Error{}class xS extends Qr{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class SS extends Qr{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class MS extends Qr{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Hs extends Qr{}class Gg extends Qr{constructor(t){super(`Invalid unit ${t}`)}}class Bn extends Qr{}class cr extends Qr{constructor(){super("Zone is an abstract class")}}const ke="numeric",Pi="short",ri="long",Rd={year:ke,month:ke,day:ke},Kg={year:ke,month:Pi,day:ke},BS={year:ke,month:Pi,day:ke,weekday:Pi},Zg={year:ke,month:ri,day:ke},Xg={year:ke,month:ri,day:ke,weekday:ri},Jg={hour:ke,minute:ke},Qg={hour:ke,minute:ke,second:ke},e3={hour:ke,minute:ke,second:ke,timeZoneName:Pi},t3={hour:ke,minute:ke,second:ke,timeZoneName:ri},n3={hour:ke,minute:ke,hourCycle:"h23"},i3={hour:ke,minute:ke,second:ke,hourCycle:"h23"},a3={hour:ke,minute:ke,second:ke,hourCycle:"h23",timeZoneName:Pi},r3={hour:ke,minute:ke,second:ke,hourCycle:"h23",timeZoneName:ri},s3={year:ke,month:ke,day:ke,hour:ke,minute:ke},o3={year:ke,month:ke,day:ke,hour:ke,minute:ke,second:ke},l3={year:ke,month:Pi,day:ke,hour:ke,minute:ke},c3={year:ke,month:Pi,day:ke,hour:ke,minute:ke,second:ke},ES={year:ke,month:Pi,day:ke,weekday:Pi,hour:ke,minute:ke},d3={year:ke,month:ri,day:ke,hour:ke,minute:ke,timeZoneName:Pi},u3={year:ke,month:ri,day:ke,hour:ke,minute:ke,second:ke,timeZoneName:Pi},h3={year:ke,month:ri,day:ke,weekday:ri,hour:ke,minute:ke,timeZoneName:ri},f3={year:ke,month:ri,day:ke,weekday:ri,hour:ke,minute:ke,second:ke,timeZoneName:ri};class Fl{get type(){throw new cr}get name(){throw new cr}get ianaName(){return this.name}get isUniversal(){throw new cr}offsetName(t,n){throw new cr}formatOffset(t,n){throw new cr}offset(t){throw new cr}equals(t){throw new cr}get isValid(){throw new cr}}let P0=null;class Hd extends Fl{static get instance(){return P0===null&&(P0=new Hd),P0}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:a}){return P3(t,n,a)}formatOffset(t,n){return Yl(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const F0=new Map;function OS(e){let t=F0.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),F0.set(e,t)),t}const DS={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function VS(e,t){const n=e.format(t).replace(/\u200E/g,""),a=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,s,o,l,d,h,f]=a;return[o,r,s,l,d,h,f]}function $S(e,t){const n=e.formatToParts(t),a=[];for(let r=0;r<n.length;r++){const{type:s,value:o}=n[r],l=DS[s];s==="era"?a[l]=o:Ae(l)||(a[l]=parseInt(o,10))}return a}const R0=new Map;class Ma extends Fl{static create(t){let n=R0.get(t);return n===void 0&&R0.set(t,n=new Ma(t)),n}static resetCache(){R0.clear(),F0.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Ma.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:a}){return P3(t,n,a,this.name)}formatOffset(t,n){return Yl(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const a=OS(this.name);let[r,s,o,l,d,h,f]=a.formatToParts?$S(a,n):VS(a,n);l==="BC"&&(r=-Math.abs(r)+1);const g=qd({year:r,month:s,day:o,hour:d===24?0:d,minute:h,second:f,millisecond:0});let y=+n;const v=y%1e3;return y-=v>=0?v:1e3+v,(g-y)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let p3={};function TS(e,t={}){const n=JSON.stringify([e,t]);let a=p3[n];return a||(a=new Intl.ListFormat(e,t),p3[n]=a),a}const H0=new Map;function W0(e,t={}){const n=JSON.stringify([e,t]);let a=H0.get(n);return a===void 0&&(a=new Intl.DateTimeFormat(e,t),H0.set(n,a)),a}const Y0=new Map;function IS(e,t={}){const n=JSON.stringify([e,t]);let a=Y0.get(n);return a===void 0&&(a=new Intl.NumberFormat(e,t),Y0.set(n,a)),a}const j0=new Map;function AS(e,t={}){const{base:n,...a}=t,r=JSON.stringify([e,a]);let s=j0.get(r);return s===void 0&&(s=new Intl.RelativeTimeFormat(e,t),j0.set(r,s)),s}let Rl=null;function NS(){return Rl||(Rl=new Intl.DateTimeFormat().resolvedOptions().locale,Rl)}const U0=new Map;function m3(e){let t=U0.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),U0.set(e,t)),t}const q0=new Map;function zS(e){let t=q0.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...g3,...t}),q0.set(e,t)}return t}function LS(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let a,r;try{a=W0(e).resolvedOptions(),r=e}catch{const d=e.substring(0,n);a=W0(d).resolvedOptions(),r=d}const{numberingSystem:s,calendar:o}=a;return[r,s,o]}}function PS(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function FS(e){const t=[];for(let n=1;n<=12;n++){const a=fe.utc(2009,n,1);t.push(e(a))}return t}function RS(e){const t=[];for(let n=1;n<=7;n++){const a=fe.utc(2016,11,13+n);t.push(e(a))}return t}function Wd(e,t,n,a){const r=e.listingMode();return r==="error"?null:r==="en"?n(t):a(t)}function HS(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||m3(e.locale).numberingSystem==="latn"}class WS{constructor(t,n,a){this.padTo=a.padTo||0,this.floor=a.floor||!1;const{padTo:r,floor:s,...o}=a;if(!n||Object.keys(o).length>0){const l={useGrouping:!1,...a};a.padTo>0&&(l.minimumIntegerDigits=a.padTo),this.inf=IS(t,l)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):nh(t,3);return tn(n,this.padTo)}}}class YS{constructor(t,n,a){this.opts=a,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const o=-1*(t.offset/60),l=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;t.offset!==0&&Ma.create(l).valid?(r=l,this.dt=t):(r="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,r=t.zone.name):(r="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const s={...this.opts};s.timeZone=s.timeZone||r,this.dtf=W0(n,s)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const a=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:a}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class jS{constructor(t,n,a){this.opts={style:"long",...a},!n&&A3()&&(this.rtf=AS(t,a))}format(t,n){return this.rtf?this.rtf.format(t,n):fM(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const g3={firstDay:1,minimalDays:4,weekend:[6,7]};let zt=class Xc{static fromOpts(t){return Xc.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,a,r,s=!1){const o=t||Gt.defaultLocale,l=o||(s?"en-US":NS()),d=n||Gt.defaultNumberingSystem,h=a||Gt.defaultOutputCalendar,f=eh(r)||Gt.defaultWeekSettings;return new Xc(l,d,h,f,o)}static resetCache(){Rl=null,H0.clear(),Y0.clear(),j0.clear(),U0.clear(),q0.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:a,weekSettings:r}={}){return Xc.create(t,n,a,r)}constructor(t,n,a,r,s){const[o,l,d]=LS(t);this.locale=o,this.numberingSystem=n||l||null,this.outputCalendar=a||d||null,this.weekSettings=r,this.intl=PS(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=HS(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:Xc.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,eh(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return Wd(this,t,H3,()=>{const a=n?{month:t,day:"numeric"}:{month:t},r=n?"format":"standalone";return this.monthsCache[r][t]||(this.monthsCache[r][t]=FS(s=>this.extract(s,a,"month"))),this.monthsCache[r][t]})}weekdays(t,n=!1){return Wd(this,t,j3,()=>{const a=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},r=n?"format":"standalone";return this.weekdaysCache[r][t]||(this.weekdaysCache[r][t]=RS(s=>this.extract(s,a,"weekday"))),this.weekdaysCache[r][t]})}meridiems(){return Wd(this,void 0,()=>U3,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[fe.utc(2016,11,13,9),fe.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Wd(this,t,q3,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[fe.utc(-40,1,1),fe.utc(2017,1,1)].map(a=>this.extract(a,n,"era"))),this.eraCache[t]})}extract(t,n,a){const r=this.dtFormatter(t,n),s=r.formatToParts(),o=s.find(l=>l.type.toLowerCase()===a);return o?o.value:null}numberFormatter(t={}){return new WS(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new YS(t,this.intl,n)}relFormatter(t={}){return new jS(this.intl,this.isEnglish(),t)}listFormatter(t={}){return TS(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||m3(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:N3()?zS(this.locale):g3}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},G0=null;class Nn extends Fl{static get utcInstance(){return G0===null&&(G0=new Nn(0)),G0}static instance(t){return t===0?Nn.utcInstance:new Nn(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Nn(Gd(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Yl(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Yl(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Yl(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class US extends Fl{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function dr(e,t){if(Ae(e)||e===null)return t;if(e instanceof Fl)return e;if(JS(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?Hd.instance:n==="utc"||n==="gmt"?Nn.utcInstance:Nn.parseSpecifier(n)||Ma.create(e)}else return ur(e)?Nn.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new US(e)}const K0={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},y3={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},qS=K0.hanidec.replace(/[\[|\]]/g,"").split("");function GS(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const a=e.charCodeAt(n);if(e[n].search(K0.hanidec)!==-1)t+=qS.indexOf(e[n]);else for(const r in y3){const[s,o]=y3[r];a>=s&&a<=o&&(t+=a-s)}}return parseInt(t,10)}else return t}const Z0=new Map;function KS(){Z0.clear()}function Fi({numberingSystem:e},t=""){const n=e||"latn";let a=Z0.get(n);a===void 0&&(a=new Map,Z0.set(n,a));let r=a.get(t);return r===void 0&&(r=new RegExp(`${K0[n]}${t}`),a.set(t,r)),r}let b3=()=>Date.now(),v3="system",_3=null,w3=null,k3=null,C3=60,x3,S3=null;class Gt{static get now(){return b3}static set now(t){b3=t}static set defaultZone(t){v3=t}static get defaultZone(){return dr(v3,Hd.instance)}static get defaultLocale(){return _3}static set defaultLocale(t){_3=t}static get defaultNumberingSystem(){return w3}static set defaultNumberingSystem(t){w3=t}static get defaultOutputCalendar(){return k3}static set defaultOutputCalendar(t){k3=t}static get defaultWeekSettings(){return S3}static set defaultWeekSettings(t){S3=eh(t)}static get twoDigitCutoffYear(){return C3}static set twoDigitCutoffYear(t){C3=t%100}static get throwOnInvalid(){return x3}static set throwOnInvalid(t){x3=t}static resetCaches(){zt.resetCache(),Ma.resetCache(),fe.resetCache(),KS()}}class Ri{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const M3=[0,31,59,90,120,151,181,212,243,273,304,334],B3=[0,31,60,91,121,152,182,213,244,274,305,335];function vi(e,t){return new Ri("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function X0(e,t,n){const a=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&a.setUTCFullYear(a.getUTCFullYear()-1900);const r=a.getUTCDay();return r===0?7:r}function E3(e,t,n){return n+(Hl(e)?B3:M3)[t-1]}function O3(e,t){const n=Hl(e)?B3:M3,a=n.findIndex(s=>s<t),r=t-n[a];return{month:a+1,day:r}}function J0(e,t){return(e-t+7)%7+1}function Yd(e,t=4,n=1){const{year:a,month:r,day:s}=e,o=E3(a,r,s),l=J0(X0(a,r,s),n);let d=Math.floor((o-l+14-t)/7),h;return d<1?(h=a-1,d=Wl(h,t,n)):d>Wl(a,t,n)?(h=a+1,d=1):h=a,{weekYear:h,weekNumber:d,weekday:l,...Zd(e)}}function D3(e,t=4,n=1){const{weekYear:a,weekNumber:r,weekday:s}=e,o=J0(X0(a,1,t),n),l=Ys(a);let d=r*7+s-o-7+t,h;d<1?(h=a-1,d+=Ys(h)):d>l?(h=a+1,d-=Ys(a)):h=a;const{month:f,day:m}=O3(h,d);return{year:h,month:f,day:m,...Zd(e)}}function Q0(e){const{year:t,month:n,day:a}=e,r=E3(t,n,a);return{year:t,ordinal:r,...Zd(e)}}function V3(e){const{year:t,ordinal:n}=e,{month:a,day:r}=O3(t,n);return{year:t,month:a,day:r,...Zd(e)}}function $3(e,t){if(!Ae(e.localWeekday)||!Ae(e.localWeekNumber)||!Ae(e.localWeekYear)){if(!Ae(e.weekday)||!Ae(e.weekNumber)||!Ae(e.weekYear))throw new Hs("Cannot mix locale-based week fields with ISO-based week fields");return Ae(e.localWeekday)||(e.weekday=e.localWeekday),Ae(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Ae(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function ZS(e,t=4,n=1){const a=jd(e.weekYear),r=_i(e.weekNumber,1,Wl(e.weekYear,t,n)),s=_i(e.weekday,1,7);return a?r?s?!1:vi("weekday",e.weekday):vi("week",e.weekNumber):vi("weekYear",e.weekYear)}function XS(e){const t=jd(e.year),n=_i(e.ordinal,1,Ys(e.year));return t?n?!1:vi("ordinal",e.ordinal):vi("year",e.year)}function T3(e){const t=jd(e.year),n=_i(e.month,1,12),a=_i(e.day,1,Ud(e.year,e.month));return t?n?a?!1:vi("day",e.day):vi("month",e.month):vi("year",e.year)}function I3(e){const{hour:t,minute:n,second:a,millisecond:r}=e,s=_i(t,0,23)||t===24&&n===0&&a===0&&r===0,o=_i(n,0,59),l=_i(a,0,59),d=_i(r,0,999);return s?o?l?d?!1:vi("millisecond",r):vi("second",a):vi("minute",n):vi("hour",t)}function Ae(e){return typeof e>"u"}function ur(e){return typeof e=="number"}function jd(e){return typeof e=="number"&&e%1===0}function JS(e){return typeof e=="string"}function QS(e){return Object.prototype.toString.call(e)==="[object Date]"}function A3(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function N3(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function eM(e){return Array.isArray(e)?e:[e]}function z3(e,t,n){if(e.length!==0)return e.reduce((a,r)=>{const s=[t(r),r];return a&&n(a[0],s[0])===a[0]?a:s},null)[1]}function tM(e,t){return t.reduce((n,a)=>(n[a]=e[a],n),{})}function Ws(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function eh(e){if(e==null)return null;if(typeof e!="object")throw new Bn("Week settings must be an object");if(!_i(e.firstDay,1,7)||!_i(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!_i(t,1,7)))throw new Bn("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function _i(e,t,n){return jd(e)&&e>=t&&e<=n}function nM(e,t){return e-t*Math.floor(e/t)}function tn(e,t=2){const n=e<0;let a;return n?a="-"+(""+-e).padStart(t,"0"):a=(""+e).padStart(t,"0"),a}function hr(e){if(!(Ae(e)||e===null||e===""))return parseInt(e,10)}function es(e){if(!(Ae(e)||e===null||e===""))return parseFloat(e)}function th(e){if(!(Ae(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function nh(e,t,n=!1){const a=10**t;return(n?Math.trunc:Math.round)(e*a)/a}function Hl(e){return e%4===0&&(e%100!==0||e%400===0)}function Ys(e){return Hl(e)?366:365}function Ud(e,t){const n=nM(t-1,12)+1,a=e+(t-n)/12;return n===2?Hl(a)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function qd(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function L3(e,t,n){return-J0(X0(e,1,t),n)+t-1}function Wl(e,t=4,n=1){const a=L3(e,t,n),r=L3(e+1,t,n);return(Ys(e)-a+r)/7}function ih(e){return e>99?e:e>Gt.twoDigitCutoffYear?1900+e:2e3+e}function P3(e,t,n,a=null){const r=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};a&&(s.timeZone=a);const o={timeZoneName:t,...s},l=new Intl.DateTimeFormat(n,o).formatToParts(r).find(d=>d.type.toLowerCase()==="timezonename");return l?l.value:null}function Gd(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const a=parseInt(t,10)||0,r=n<0||Object.is(n,-0)?-a:a;return n*60+r}function F3(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Bn(`Invalid unit value ${e}`);return t}function Kd(e,t){const n={};for(const a in e)if(Ws(e,a)){const r=e[a];if(r==null)continue;n[t(a)]=F3(r)}return n}function Yl(e,t){const n=Math.trunc(Math.abs(e/60)),a=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return`${r}${tn(n,2)}:${tn(a,2)}`;case"narrow":return`${r}${n}${a>0?`:${a}`:""}`;case"techie":return`${r}${tn(n,2)}${tn(a,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Zd(e){return tM(e,["hour","minute","second","millisecond"])}const iM=["January","February","March","April","May","June","July","August","September","October","November","December"],R3=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],aM=["J","F","M","A","M","J","J","A","S","O","N","D"];function H3(e){switch(e){case"narrow":return[...aM];case"short":return[...R3];case"long":return[...iM];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const W3=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Y3=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],rM=["M","T","W","T","F","S","S"];function j3(e){switch(e){case"narrow":return[...rM];case"short":return[...Y3];case"long":return[...W3];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const U3=["AM","PM"],sM=["Before Christ","Anno Domini"],oM=["BC","AD"],lM=["B","A"];function q3(e){switch(e){case"narrow":return[...lM];case"short":return[...oM];case"long":return[...sM];default:return null}}function cM(e){return U3[e.hour<12?0:1]}function dM(e,t){return j3(t)[e.weekday-1]}function uM(e,t){return H3(t)[e.month-1]}function hM(e,t){return q3(t)[e.year<0?0:1]}function fM(e,t,n="always",a=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&s){const m=e==="days";switch(t){case 1:return m?"tomorrow":`next ${r[e][0]}`;case-1:return m?"yesterday":`last ${r[e][0]}`;case 0:return m?"today":`this ${r[e][0]}`}}const o=Object.is(t,-0)||t<0,l=Math.abs(t),d=l===1,h=r[e],f=a?d?h[1]:h[2]||h[1]:d?r[e][0]:e;return o?`${l} ${f} ago`:`in ${l} ${f}`}function G3(e,t){let n="";for(const a of e)a.literal?n+=a.val:n+=t(a.val);return n}const pM={D:Rd,DD:Kg,DDD:Zg,DDDD:Xg,t:Jg,tt:Qg,ttt:e3,tttt:t3,T:n3,TT:i3,TTT:a3,TTTT:r3,f:s3,ff:l3,fff:d3,ffff:h3,F:o3,FF:c3,FFF:u3,FFFF:f3};class En{static create(t,n={}){return new En(t,n)}static parseFormat(t){let n=null,a="",r=!1;const s=[];for(let o=0;o<t.length;o++){const l=t.charAt(o);l==="'"?(a.length>0&&s.push({literal:r||/^\s+$/.test(a),val:a}),n=null,a="",r=!r):r||l===n?a+=l:(a.length>0&&s.push({literal:/^\s+$/.test(a),val:a}),a=l,n=l)}return a.length>0&&s.push({literal:r||/^\s+$/.test(a),val:a}),s}static macroTokenToFormatOpts(t){return pM[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return tn(t,n);const a={...this.opts};return n>0&&(a.padTo=n),this.loc.numberFormatter(a).format(t)}formatDateTimeFromString(t,n){const a=this.loc.listingMode()==="en",r=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(y,v)=>this.loc.extract(t,y,v),o=y=>t.isOffsetFixed&&t.offset===0&&y.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,y.format):"",l=()=>a?cM(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),d=(y,v)=>a?uM(t,y):s(v?{month:y}:{month:y,day:"numeric"},"month"),h=(y,v)=>a?dM(t,y):s(v?{weekday:y}:{weekday:y,month:"long",day:"numeric"},"weekday"),f=y=>{const v=En.macroTokenToFormatOpts(y);return v?this.formatWithSystemDefault(t,v):y},m=y=>a?hM(t,y):s({era:y},"era"),g=y=>{switch(y){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return l();case"d":return r?s({day:"numeric"},"day"):this.num(t.day);case"dd":return r?s({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return h("short",!0);case"cccc":return h("long",!0);case"ccccc":return h("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return h("short",!1);case"EEEE":return h("long",!1);case"EEEEE":return h("narrow",!1);case"L":return r?s({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return r?s({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return d("short",!0);case"LLLL":return d("long",!0);case"LLLLL":return d("narrow",!0);case"M":return r?s({month:"numeric"},"month"):this.num(t.month);case"MM":return r?s({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return d("short",!1);case"MMMM":return d("long",!1);case"MMMMM":return d("narrow",!1);case"y":return r?s({year:"numeric"},"year"):this.num(t.year);case"yy":return r?s({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return r?s({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return r?s({year:"numeric"},"year"):this.num(t.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return f(y)}};return G3(En.parseFormat(n),g)}formatDurationFromString(t,n){const a=d=>{switch(d[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=d=>h=>{const f=a(h);return f?this.num(d.get(f),h.length):h},s=En.parseFormat(n),o=s.reduce((d,{literal:h,val:f})=>h?d:d.concat(f),[]),l=t.shiftTo(...o.map(a).filter(d=>d));return G3(s,r(l))}}const K3=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function js(...e){const t=e.reduce((n,a)=>n+a.source,"");return RegExp(`^${t}$`)}function Us(...e){return t=>e.reduce(([n,a,r],s)=>{const[o,l,d]=s(t,r);return[{...n,...o},l||a,d]},[{},null,1]).slice(0,2)}function qs(e,...t){if(e==null)return[null,null];for(const[n,a]of t){const r=n.exec(e);if(r)return a(r)}return[null,null]}function Z3(...e){return(t,n)=>{const a={};let r;for(r=0;r<e.length;r++)a[e[r]]=hr(t[n+r]);return[a,null,n+r]}}const X3=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,mM=`(?:${X3.source}?(?:\\[(${K3.source})\\])?)?`,ah=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,J3=RegExp(`${ah.source}${mM}`),rh=RegExp(`(?:T${J3.source})?`),gM=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,yM=/(\d{4})-?W(\d\d)(?:-?(\d))?/,bM=/(\d{4})-?(\d{3})/,vM=Z3("weekYear","weekNumber","weekDay"),_M=Z3("year","ordinal"),wM=/(\d{4})-(\d\d)-(\d\d)/,Q3=RegExp(`${ah.source} ?(?:${X3.source}|(${K3.source}))?`),kM=RegExp(`(?: ${Q3.source})?`);function Gs(e,t,n){const a=e[t];return Ae(a)?n:hr(a)}function CM(e,t){return[{year:Gs(e,t),month:Gs(e,t+1,1),day:Gs(e,t+2,1)},null,t+3]}function Ks(e,t){return[{hours:Gs(e,t,0),minutes:Gs(e,t+1,0),seconds:Gs(e,t+2,0),milliseconds:th(e[t+3])},null,t+4]}function jl(e,t){const n=!e[t]&&!e[t+1],a=Gd(e[t+1],e[t+2]),r=n?null:Nn.instance(a);return[{},r,t+3]}function Ul(e,t){const n=e[t]?Ma.create(e[t]):null;return[{},n,t+1]}const xM=RegExp(`^T?${ah.source}$`),SM=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function MM(e){const[t,n,a,r,s,o,l,d,h]=e,f=t[0]==="-",m=d&&d[0]==="-",g=(y,v=!1)=>y!==void 0&&(v||y&&f)?-y:y;return[{years:g(es(n)),months:g(es(a)),weeks:g(es(r)),days:g(es(s)),hours:g(es(o)),minutes:g(es(l)),seconds:g(es(d),d==="-0"),milliseconds:g(th(h),m)}]}const BM={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function sh(e,t,n,a,r,s,o){const l={year:t.length===2?ih(hr(t)):hr(t),month:R3.indexOf(n)+1,day:hr(a),hour:hr(r),minute:hr(s)};return o&&(l.second=hr(o)),e&&(l.weekday=e.length>3?W3.indexOf(e)+1:Y3.indexOf(e)+1),l}const EM=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function OM(e){const[,t,n,a,r,s,o,l,d,h,f,m]=e,g=sh(t,r,a,n,s,o,l);let y;return d?y=BM[d]:h?y=0:y=Gd(f,m),[g,new Nn(y)]}function DM(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const VM=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,$M=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,TM=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function e4(e){const[,t,n,a,r,s,o,l]=e;return[sh(t,r,a,n,s,o,l),Nn.utcInstance]}function IM(e){const[,t,n,a,r,s,o,l]=e;return[sh(t,l,n,a,r,s,o),Nn.utcInstance]}const AM=js(gM,rh),NM=js(yM,rh),zM=js(bM,rh),LM=js(J3),t4=Us(CM,Ks,jl,Ul),PM=Us(vM,Ks,jl,Ul),FM=Us(_M,Ks,jl,Ul),RM=Us(Ks,jl,Ul);function HM(e){return qs(e,[AM,t4],[NM,PM],[zM,FM],[LM,RM])}function WM(e){return qs(DM(e),[EM,OM])}function YM(e){return qs(e,[VM,e4],[$M,e4],[TM,IM])}function jM(e){return qs(e,[SM,MM])}const UM=Us(Ks);function qM(e){return qs(e,[xM,UM])}const GM=js(wM,kM),KM=js(Q3),ZM=Us(Ks,jl,Ul);function XM(e){return qs(e,[GM,t4],[KM,ZM])}const n4="Invalid Duration",i4={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},JM={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...i4},wi=146097/400,Zs=146097/4800,QM={years:{quarters:4,months:12,weeks:wi/7,days:wi,hours:wi*24,minutes:wi*24*60,seconds:wi*24*60*60,milliseconds:wi*24*60*60*1e3},quarters:{months:3,weeks:wi/28,days:wi/4,hours:wi*24/4,minutes:wi*24*60/4,seconds:wi*24*60*60/4,milliseconds:wi*24*60*60*1e3/4},months:{weeks:Zs/7,days:Zs,hours:Zs*24,minutes:Zs*24*60,seconds:Zs*24*60*60,milliseconds:Zs*24*60*60*1e3},...i4},ts=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],eB=ts.slice(0).reverse();function fr(e,t,n=!1){const a={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new lt(a)}function a4(e,t){let n=t.milliseconds??0;for(const a of eB.slice(1))t[a]&&(n+=t[a]*e[a].milliseconds);return n}function r4(e,t){const n=a4(e,t)<0?-1:1;ts.reduceRight((a,r)=>{if(Ae(t[r]))return a;if(a){const s=t[a]*n,o=e[r][a],l=Math.floor(s/o);t[r]+=l*n,t[a]-=l*o*n}return r},null),ts.reduce((a,r)=>{if(Ae(t[r]))return a;if(a){const s=t[a]%1;t[a]-=s,t[r]+=s*e[a][r]}return r},null)}function tB(e){const t={};for(const[n,a]of Object.entries(e))a!==0&&(t[n]=a);return t}class lt{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let a=n?QM:JM;t.matrix&&(a=t.matrix),this.values=t.values,this.loc=t.loc||zt.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=a,this.isLuxonDuration=!0}static fromMillis(t,n){return lt.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Bn(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new lt({values:Kd(t,lt.normalizeUnit),loc:zt.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(ur(t))return lt.fromMillis(t);if(lt.isDuration(t))return t;if(typeof t=="object")return lt.fromObject(t);throw new Bn(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[a]=jM(t);return a?lt.fromObject(a,n):lt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[a]=qM(t);return a?lt.fromObject(a,n):lt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Bn("need to specify a reason the Duration is invalid");const a=t instanceof Ri?t:new Ri(t,n);if(Gt.throwOnInvalid)throw new MS(a);return new lt({invalid:a})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new Gg(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const a={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?En.create(this.loc,a).formatDurationFromString(this,t):n4}toHuman(t={}){if(!this.isValid)return n4;const n=ts.map(a=>{const r=this.values[a];return Ae(r)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:a.slice(0,-1)}).format(r)}).filter(a=>a);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=nh(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},fe.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?a4(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=lt.fromDurationLike(t),a={};for(const r of ts)(Ws(n.values,r)||Ws(this.values,r))&&(a[r]=n.get(r)+this.get(r));return fr(this,{values:a},!0)}minus(t){if(!this.isValid)return this;const n=lt.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const a of Object.keys(this.values))n[a]=F3(t(this.values[a],a));return fr(this,{values:n},!0)}get(t){return this[lt.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Kd(t,lt.normalizeUnit)};return fr(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:a,matrix:r}={}){const o={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:r,conversionAccuracy:a};return fr(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return r4(this.matrix,t),fr(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=tB(this.normalize().shiftToAll().toObject());return fr(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(o=>lt.normalizeUnit(o));const n={},a={},r=this.toObject();let s;for(const o of ts)if(t.indexOf(o)>=0){s=o;let l=0;for(const h in a)l+=this.matrix[h][o]*a[h],a[h]=0;ur(r[o])&&(l+=r[o]);const d=Math.trunc(l);n[o]=d,a[o]=(l*1e3-d*1e3)/1e3}else ur(r[o])&&(a[o]=r[o]);for(const o in a)a[o]!==0&&(n[s]+=o===s?a[o]:a[o]/this.matrix[s][o]);return r4(this.matrix,n),fr(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return fr(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(a,r){return a===void 0||a===0?r===void 0||r===0:a===r}for(const a of ts)if(!n(this.values[a],t.values[a]))return!1;return!0}}const Xs="Invalid Interval";function nB(e,t){return!e||!e.isValid?Yt.invalid("missing or invalid start"):!t||!t.isValid?Yt.invalid("missing or invalid end"):t<e?Yt.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Yt{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Bn("need to specify a reason the Interval is invalid");const a=t instanceof Ri?t:new Ri(t,n);if(Gt.throwOnInvalid)throw new SS(a);return new Yt({invalid:a})}static fromDateTimes(t,n){const a=Kl(t),r=Kl(n),s=nB(a,r);return s??new Yt({start:a,end:r})}static after(t,n){const a=lt.fromDurationLike(n),r=Kl(t);return Yt.fromDateTimes(r,r.plus(a))}static before(t,n){const a=lt.fromDurationLike(n),r=Kl(t);return Yt.fromDateTimes(r.minus(a),r)}static fromISO(t,n){const[a,r]=(t||"").split("/",2);if(a&&r){let s,o;try{s=fe.fromISO(a,n),o=s.isValid}catch{o=!1}let l,d;try{l=fe.fromISO(r,n),d=l.isValid}catch{d=!1}if(o&&d)return Yt.fromDateTimes(s,l);if(o){const h=lt.fromISO(r,n);if(h.isValid)return Yt.after(s,h)}else if(d){const h=lt.fromISO(a,n);if(h.isValid)return Yt.before(l,h)}}return Yt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const a=this.start.startOf(t,n);let r;return n!=null&&n.useLocaleWeeks?r=this.end.reconfigure({locale:a.locale}):r=this.end,r=r.startOf(t,n),Math.floor(r.diff(a,t).get(t))+(r.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Yt.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Kl).filter(o=>this.contains(o)).sort((o,l)=>o.toMillis()-l.toMillis()),a=[];let{s:r}=this,s=0;for(;r<this.e;){const o=n[s]||this.e,l=+o>+this.e?this.e:o;a.push(Yt.fromDateTimes(r,l)),r=l,s+=1}return a}splitBy(t){const n=lt.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:a}=this,r=1,s;const o=[];for(;a<this.e;){const l=this.start.plus(n.mapUnits(d=>d*r));s=+l>+this.e?this.e:l,o.push(Yt.fromDateTimes(a,s)),a=s,r+=1}return o}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,a=this.e<t.e?this.e:t.e;return n>=a?null:Yt.fromDateTimes(n,a)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,a=this.e>t.e?this.e:t.e;return Yt.fromDateTimes(n,a)}static merge(t){const[n,a]=t.sort((r,s)=>r.s-s.s).reduce(([r,s],o)=>s?s.overlaps(o)||s.abutsStart(o)?[r,s.union(o)]:[r.concat([s]),o]:[r,o],[[],null]);return a&&n.push(a),n}static xor(t){let n=null,a=0;const r=[],s=t.map(d=>[{time:d.s,type:"s"},{time:d.e,type:"e"}]),o=Array.prototype.concat(...s),l=o.sort((d,h)=>d.time-h.time);for(const d of l)a+=d.type==="s"?1:-1,a===1?n=d.time:(n&&+n!=+d.time&&r.push(Yt.fromDateTimes(n,d.time)),n=null);return Yt.merge(r)}difference(...t){return Yt.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Xs}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=Rd,n={}){return this.isValid?En.create(this.s.loc.clone(n),t).formatInterval(this):Xs}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Xs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Xs}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Xs}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Xs}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):lt.invalid(this.invalidReason)}mapEndpoints(t){return Yt.fromDateTimes(t(this.s),t(this.e))}}class Xd{static hasDST(t=Gt.defaultZone){const n=fe.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Ma.isValidZone(t)}static normalizeZone(t){return dr(t,Gt.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||zt.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||zt.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||zt.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:a=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||zt.create(n,a,s)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:a=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||zt.create(n,a,s)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:a=null,locObj:r=null}={}){return(r||zt.create(n,a,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:a=null,locObj:r=null}={}){return(r||zt.create(n,a,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return zt.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return zt.create(n,null,"gregory").eras(t)}static features(){return{relative:A3(),localeWeek:N3()}}}function s4(e,t){const n=r=>r.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),a=n(t)-n(e);return Math.floor(lt.fromMillis(a).as("days"))}function iB(e,t,n){const a=[["years",(d,h)=>h.year-d.year],["quarters",(d,h)=>h.quarter-d.quarter+(h.year-d.year)*4],["months",(d,h)=>h.month-d.month+(h.year-d.year)*12],["weeks",(d,h)=>{const f=s4(d,h);return(f-f%7)/7}],["days",s4]],r={},s=e;let o,l;for(const[d,h]of a)n.indexOf(d)>=0&&(o=d,r[d]=h(e,t),l=s.plus(r),l>t?(r[d]--,e=s.plus(r),e>t&&(l=e,r[d]--,e=s.plus(r))):e=l);return[e,r,l,o]}function aB(e,t,n,a){let[r,s,o,l]=iB(e,t,n);const d=t-r,h=n.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);h.length===0&&(o<t&&(o=r.plus({[l]:1})),o!==r&&(s[l]=(s[l]||0)+d/(o-r)));const f=lt.fromObject(s,a);return h.length>0?lt.fromMillis(d,a).shiftTo(...h).plus(f):f}const rB="missing Intl.DateTimeFormat.formatToParts support";function ut(e,t=n=>n){return{regex:e,deser:([n])=>t(GS(n))}}const o4="[  ]",l4=new RegExp(o4,"g");function sB(e){return e.replace(/\./g,"\\.?").replace(l4,o4)}function c4(e){return e.replace(/\./g,"").replace(l4," ").toLowerCase()}function Hi(e,t){return e===null?null:{regex:RegExp(e.map(sB).join("|")),deser:([n])=>e.findIndex(a=>c4(n)===c4(a))+t}}function d4(e,t){return{regex:e,deser:([,n,a])=>Gd(n,a),groups:t}}function Jd(e){return{regex:e,deser:([t])=>t}}function oB(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function lB(e,t){const n=Fi(t),a=Fi(t,"{2}"),r=Fi(t,"{3}"),s=Fi(t,"{4}"),o=Fi(t,"{6}"),l=Fi(t,"{1,2}"),d=Fi(t,"{1,3}"),h=Fi(t,"{1,6}"),f=Fi(t,"{1,9}"),m=Fi(t,"{2,4}"),g=Fi(t,"{4,6}"),y=k=>({regex:RegExp(oB(k.val)),deser:([x])=>x,literal:!0}),_=(k=>{if(e.literal)return y(k);switch(k.val){case"G":return Hi(t.eras("short"),0);case"GG":return Hi(t.eras("long"),0);case"y":return ut(h);case"yy":return ut(m,ih);case"yyyy":return ut(s);case"yyyyy":return ut(g);case"yyyyyy":return ut(o);case"M":return ut(l);case"MM":return ut(a);case"MMM":return Hi(t.months("short",!0),1);case"MMMM":return Hi(t.months("long",!0),1);case"L":return ut(l);case"LL":return ut(a);case"LLL":return Hi(t.months("short",!1),1);case"LLLL":return Hi(t.months("long",!1),1);case"d":return ut(l);case"dd":return ut(a);case"o":return ut(d);case"ooo":return ut(r);case"HH":return ut(a);case"H":return ut(l);case"hh":return ut(a);case"h":return ut(l);case"mm":return ut(a);case"m":return ut(l);case"q":return ut(l);case"qq":return ut(a);case"s":return ut(l);case"ss":return ut(a);case"S":return ut(d);case"SSS":return ut(r);case"u":return Jd(f);case"uu":return Jd(l);case"uuu":return ut(n);case"a":return Hi(t.meridiems(),0);case"kkkk":return ut(s);case"kk":return ut(m,ih);case"W":return ut(l);case"WW":return ut(a);case"E":case"c":return ut(n);case"EEE":return Hi(t.weekdays("short",!1),1);case"EEEE":return Hi(t.weekdays("long",!1),1);case"ccc":return Hi(t.weekdays("short",!0),1);case"cccc":return Hi(t.weekdays("long",!0),1);case"Z":case"ZZ":return d4(new RegExp(`([+-]${l.source})(?::(${a.source}))?`),2);case"ZZZ":return d4(new RegExp(`([+-]${l.source})(${a.source})?`),2);case"z":return Jd(/[a-z_+-/]{1,256}?/i);case" ":return Jd(/[^\S\n\r]/);default:return y(k)}})(e)||{invalidReason:rB};return _.token=e,_}const cB={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function dB(e,t,n){const{type:a,value:r}=e;if(a==="literal"){const d=/^\s+$/.test(r);return{literal:!d,val:d?" ":r}}const s=t[a];let o=a;a==="hour"&&(t.hour12!=null?o=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let l=cB[o];if(typeof l=="object"&&(l=l[s]),l)return{literal:!1,val:l}}function uB(e){return[`^${e.map(n=>n.regex).reduce((n,a)=>`${n}(${a.source})`,"")}$`,e]}function hB(e,t,n){const a=e.match(t);if(a){const r={};let s=1;for(const o in n)if(Ws(n,o)){const l=n[o],d=l.groups?l.groups+1:1;!l.literal&&l.token&&(r[l.token.val[0]]=l.deser(a.slice(s,s+d))),s+=d}return[a,r]}else return[a,{}]}function fB(e){const t=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,a;return Ae(e.z)||(n=Ma.create(e.z)),Ae(e.Z)||(n||(n=new Nn(e.Z)),a=e.Z),Ae(e.q)||(e.M=(e.q-1)*3+1),Ae(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Ae(e.u)||(e.S=th(e.u)),[Object.keys(e).reduce((s,o)=>{const l=t(o);return l&&(s[l]=e[o]),s},{}),n,a]}let oh=null;function pB(){return oh||(oh=fe.fromMillis(1555555555555)),oh}function mB(e,t){if(e.literal)return e;const n=En.macroTokenToFormatOpts(e.val),a=p4(n,t);return a==null||a.includes(void 0)?e:a}function u4(e,t){return Array.prototype.concat(...e.map(n=>mB(n,t)))}class h4{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=u4(En.parseFormat(n),t),this.units=this.tokens.map(a=>lB(a,t)),this.disqualifyingUnit=this.units.find(a=>a.invalidReason),!this.disqualifyingUnit){const[a,r]=uB(this.units);this.regex=RegExp(a,"i"),this.handlers=r}}explainFromTokens(t){if(this.isValid){const[n,a]=hB(t,this.regex,this.handlers),[r,s,o]=a?fB(a):[null,null,void 0];if(Ws(a,"a")&&Ws(a,"H"))throw new Hs("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:a,result:r,zone:s,specificOffset:o}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function f4(e,t,n){return new h4(e,n).explainFromTokens(t)}function gB(e,t,n){const{result:a,zone:r,specificOffset:s,invalidReason:o}=f4(e,t,n);return[a,r,s,o]}function p4(e,t){if(!e)return null;const a=En.create(t,e).dtFormatter(pB()),r=a.formatToParts(),s=a.resolvedOptions();return r.map(o=>dB(o,e,s))}const lh="Invalid DateTime",yB=864e13;function ql(e){return new Ri("unsupported zone",`the zone "${e.name}" is not supported`)}function ch(e){return e.weekData===null&&(e.weekData=Yd(e.c)),e.weekData}function dh(e){return e.localWeekData===null&&(e.localWeekData=Yd(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function ns(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new fe({...n,...t,old:n})}function m4(e,t,n){let a=e-t*60*1e3;const r=n.offset(a);if(t===r)return[a,t];a-=(r-t)*60*1e3;const s=n.offset(a);return r===s?[a,r]:[e-Math.min(r,s)*60*1e3,Math.max(r,s)]}function Qd(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function eu(e,t,n){return m4(qd(e),t,n)}function g4(e,t){const n=e.o,a=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,s={...e.c,year:a,month:r,day:Math.min(e.c.day,Ud(a,r))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=lt.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),l=qd(s);let[d,h]=m4(l,n,e.zone);return o!==0&&(d+=o,h=e.zone.offset(d)),{ts:d,o:h}}function Js(e,t,n,a,r,s){const{setZone:o,zone:l}=n;if(e&&Object.keys(e).length!==0||t){const d=t||l,h=fe.fromObject(e,{...n,zone:d,specificOffset:s});return o?h:h.setZone(l)}else return fe.invalid(new Ri("unparsable",`the input "${r}" can't be parsed as ${a}`))}function tu(e,t,n=!0){return e.isValid?En.create(zt.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function uh(e,t){const n=e.c.year>9999||e.c.year<0;let a="";return n&&e.c.year>=0&&(a+="+"),a+=tn(e.c.year,n?6:4),t?(a+="-",a+=tn(e.c.month),a+="-",a+=tn(e.c.day)):(a+=tn(e.c.month),a+=tn(e.c.day)),a}function y4(e,t,n,a,r,s){let o=tn(e.c.hour);return t?(o+=":",o+=tn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(o+=":")):o+=tn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(o+=tn(e.c.second),(e.c.millisecond!==0||!a)&&(o+=".",o+=tn(e.c.millisecond,3))),r&&(e.isOffsetFixed&&e.offset===0&&!s?o+="Z":e.o<0?(o+="-",o+=tn(Math.trunc(-e.o/60)),o+=":",o+=tn(Math.trunc(-e.o%60))):(o+="+",o+=tn(Math.trunc(e.o/60)),o+=":",o+=tn(Math.trunc(e.o%60)))),s&&(o+="["+e.zone.ianaName+"]"),o}const b4={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},bB={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},vB={ordinal:1,hour:0,minute:0,second:0,millisecond:0},v4=["year","month","day","hour","minute","second","millisecond"],_B=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],wB=["year","ordinal","hour","minute","second","millisecond"];function kB(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Gg(e);return t}function _4(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return kB(e)}}function CB(e){if(Gl===void 0&&(Gl=Gt.now()),e.type!=="iana")return e.offset(Gl);const t=e.name;let n=hh.get(t);return n===void 0&&(n=e.offset(Gl),hh.set(t,n)),n}function w4(e,t){const n=dr(t.zone,Gt.defaultZone);if(!n.isValid)return fe.invalid(ql(n));const a=zt.fromObject(t);let r,s;if(Ae(e.year))r=Gt.now();else{for(const d of v4)Ae(e[d])&&(e[d]=b4[d]);const o=T3(e)||I3(e);if(o)return fe.invalid(o);const l=CB(n);[r,s]=eu(e,l,n)}return new fe({ts:r,zone:n,loc:a,o:s})}function k4(e,t,n){const a=Ae(n.round)?!0:n.round,r=(o,l)=>(o=nh(o,a||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(o,l)),s=o=>n.calendary?t.hasSame(e,o)?0:t.startOf(o).diff(e.startOf(o),o).get(o):t.diff(e,o).get(o);if(n.unit)return r(s(n.unit),n.unit);for(const o of n.units){const l=s(o);if(Math.abs(l)>=1)return r(l,o)}return r(e>t?-0:0,n.units[n.units.length-1])}function C4(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let Gl;const hh=new Map;class fe{constructor(t){const n=t.zone||Gt.defaultZone;let a=t.invalid||(Number.isNaN(t.ts)?new Ri("invalid input"):null)||(n.isValid?null:ql(n));this.ts=Ae(t.ts)?Gt.now():t.ts;let r=null,s=null;if(!a)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[r,s]=[t.old.c,t.old.o];else{const l=ur(t.o)&&!t.old?t.o:n.offset(this.ts);r=Qd(this.ts,l),a=Number.isNaN(r.year)?new Ri("invalid input"):null,r=a?null:r,s=a?null:l}this._zone=n,this.loc=t.loc||zt.create(),this.invalid=a,this.weekData=null,this.localWeekData=null,this.c=r,this.o=s,this.isLuxonDateTime=!0}static now(){return new fe({})}static local(){const[t,n]=C4(arguments),[a,r,s,o,l,d,h]=n;return w4({year:a,month:r,day:s,hour:o,minute:l,second:d,millisecond:h},t)}static utc(){const[t,n]=C4(arguments),[a,r,s,o,l,d,h]=n;return t.zone=Nn.utcInstance,w4({year:a,month:r,day:s,hour:o,minute:l,second:d,millisecond:h},t)}static fromJSDate(t,n={}){const a=QS(t)?t.valueOf():NaN;if(Number.isNaN(a))return fe.invalid("invalid input");const r=dr(n.zone,Gt.defaultZone);return r.isValid?new fe({ts:a,zone:r,loc:zt.fromObject(n)}):fe.invalid(ql(r))}static fromMillis(t,n={}){if(ur(t))return t<-864e13||t>yB?fe.invalid("Timestamp out of range"):new fe({ts:t,zone:dr(n.zone,Gt.defaultZone),loc:zt.fromObject(n)});throw new Bn(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(ur(t))return new fe({ts:t*1e3,zone:dr(n.zone,Gt.defaultZone),loc:zt.fromObject(n)});throw new Bn("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const a=dr(n.zone,Gt.defaultZone);if(!a.isValid)return fe.invalid(ql(a));const r=zt.fromObject(n),s=Kd(t,_4),{minDaysInFirstWeek:o,startOfWeek:l}=$3(s,r),d=Gt.now(),h=Ae(n.specificOffset)?a.offset(d):n.specificOffset,f=!Ae(s.ordinal),m=!Ae(s.year),g=!Ae(s.month)||!Ae(s.day),y=m||g,v=s.weekYear||s.weekNumber;if((y||f)&&v)throw new Hs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(g&&f)throw new Hs("Can't mix ordinal dates with month/day");const _=v||s.weekday&&!y;let k,x,M=Qd(d,h);_?(k=_B,x=bB,M=Yd(M,o,l)):f?(k=wB,x=vB,M=Q0(M)):(k=v4,x=b4);let B=!1;for(const q of k){const ee=s[q];Ae(ee)?B?s[q]=x[q]:s[q]=M[q]:B=!0}const C=_?ZS(s,o,l):f?XS(s):T3(s),V=C||I3(s);if(V)return fe.invalid(V);const $=_?D3(s,o,l):f?V3(s):s,[L,T]=eu($,h,a),R=new fe({ts:L,zone:a,o:T,loc:r});return s.weekday&&y&&t.weekday!==R.weekday?fe.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${R.toISO()}`):R.isValid?R:fe.invalid(R.invalid)}static fromISO(t,n={}){const[a,r]=HM(t);return Js(a,r,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[a,r]=WM(t);return Js(a,r,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[a,r]=YM(t);return Js(a,r,n,"HTTP",n)}static fromFormat(t,n,a={}){if(Ae(t)||Ae(n))throw new Bn("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:s=null}=a,o=zt.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),[l,d,h,f]=gB(o,t,n);return f?fe.invalid(f):Js(l,d,a,`format ${n}`,t,h)}static fromString(t,n,a={}){return fe.fromFormat(t,n,a)}static fromSQL(t,n={}){const[a,r]=XM(t);return Js(a,r,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Bn("need to specify a reason the DateTime is invalid");const a=t instanceof Ri?t:new Ri(t,n);if(Gt.throwOnInvalid)throw new xS(a);return new fe({invalid:a})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const a=p4(t,zt.fromObject(n));return a?a.map(r=>r?r.val:null).join(""):null}static expandFormat(t,n={}){return u4(En.parseFormat(t),zt.fromObject(n)).map(r=>r.val).join("")}static resetCache(){Gl=void 0,hh.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ch(this).weekYear:NaN}get weekNumber(){return this.isValid?ch(this).weekNumber:NaN}get weekday(){return this.isValid?ch(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?dh(this).weekday:NaN}get localWeekNumber(){return this.isValid?dh(this).weekNumber:NaN}get localWeekYear(){return this.isValid?dh(this).weekYear:NaN}get ordinal(){return this.isValid?Q0(this.c).ordinal:NaN}get monthShort(){return this.isValid?Xd.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Xd.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Xd.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Xd.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,a=qd(this.c),r=this.zone.offset(a-t),s=this.zone.offset(a+t),o=this.zone.offset(a-r*n),l=this.zone.offset(a-s*n);if(o===l)return[this];const d=a-o*n,h=a-l*n,f=Qd(d,o),m=Qd(h,l);return f.hour===m.hour&&f.minute===m.minute&&f.second===m.second&&f.millisecond===m.millisecond?[ns(this,{ts:d}),ns(this,{ts:h})]:[this]}get isInLeapYear(){return Hl(this.year)}get daysInMonth(){return Ud(this.year,this.month)}get daysInYear(){return this.isValid?Ys(this.year):NaN}get weeksInWeekYear(){return this.isValid?Wl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Wl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:a,calendar:r}=En.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:a,outputCalendar:r}}toUTC(t=0,n={}){return this.setZone(Nn.instance(t),n)}toLocal(){return this.setZone(Gt.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:a=!1}={}){if(t=dr(t,Gt.defaultZone),t.equals(this.zone))return this;if(t.isValid){let r=this.ts;if(n||a){const s=t.offset(this.ts),o=this.toObject();[r]=eu(o,s,t)}return ns(this,{ts:r,zone:t})}else return fe.invalid(ql(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:a}={}){const r=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:a});return ns(this,{loc:r})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Kd(t,_4),{minDaysInFirstWeek:a,startOfWeek:r}=$3(n,this.loc),s=!Ae(n.weekYear)||!Ae(n.weekNumber)||!Ae(n.weekday),o=!Ae(n.ordinal),l=!Ae(n.year),d=!Ae(n.month)||!Ae(n.day),h=l||d,f=n.weekYear||n.weekNumber;if((h||o)&&f)throw new Hs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&o)throw new Hs("Can't mix ordinal dates with month/day");let m;s?m=D3({...Yd(this.c,a,r),...n},a,r):Ae(n.ordinal)?(m={...this.toObject(),...n},Ae(n.day)&&(m.day=Math.min(Ud(m.year,m.month),m.day))):m=V3({...Q0(this.c),...n});const[g,y]=eu(m,this.o,this.zone);return ns(this,{ts:g,o:y})}plus(t){if(!this.isValid)return this;const n=lt.fromDurationLike(t);return ns(this,g4(this,n))}minus(t){if(!this.isValid)return this;const n=lt.fromDurationLike(t).negate();return ns(this,g4(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const a={},r=lt.normalizeUnit(t);switch(r){case"years":a.month=1;case"quarters":case"months":a.day=1;case"weeks":case"days":a.hour=0;case"hours":a.minute=0;case"minutes":a.second=0;case"seconds":a.millisecond=0;break}if(r==="weeks")if(n){const s=this.loc.getStartOfWeek(),{weekday:o}=this;o<s&&(a.weekNumber=this.weekNumber-1),a.weekday=s}else a.weekday=1;if(r==="quarters"){const s=Math.ceil(this.month/3);a.month=(s-1)*3+1}return this.set(a)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?En.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):lh}toLocaleString(t=Rd,n={}){return this.isValid?En.create(this.loc.clone(n),t).formatDateTime(this):lh}toLocaleParts(t={}){return this.isValid?En.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:a=!1,includeOffset:r=!0,extendedZone:s=!1}={}){if(!this.isValid)return null;const o=t==="extended";let l=uh(this,o);return l+="T",l+=y4(this,o,n,a,r,s),l}toISODate({format:t="extended"}={}){return this.isValid?uh(this,t==="extended"):null}toISOWeekDate(){return tu(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:a=!0,includePrefix:r=!1,extendedZone:s=!1,format:o="extended"}={}){return this.isValid?(r?"T":"")+y4(this,o==="extended",n,t,a,s):null}toRFC2822(){return tu(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return tu(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?uh(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:a=!0}={}){let r="HH:mm:ss.SSS";return(n||t)&&(a&&(r+=" "),n?r+="z":t&&(r+="ZZ")),tu(this,r,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():lh}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",a={}){if(!this.isValid||!t.isValid)return lt.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...a},s=eM(n).map(lt.normalizeUnit),o=t.valueOf()>this.valueOf(),l=o?this:t,d=o?t:this,h=aB(l,d,s,r);return o?h.negate():h}diffNow(t="milliseconds",n={}){return this.diff(fe.now(),t,n)}until(t){return this.isValid?Yt.fromDateTimes(this,t):this}hasSame(t,n,a){if(!this.isValid)return!1;const r=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(n,a)<=r&&r<=s.endOf(n,a)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||fe.fromObject({},{zone:this.zone}),a=t.padding?this<n?-t.padding:t.padding:0;let r=["years","months","days","hours","minutes","seconds"],s=t.unit;return Array.isArray(t.unit)&&(r=t.unit,s=void 0),k4(n,this.plus(a),{...t,numeric:"always",units:r,unit:s})}toRelativeCalendar(t={}){return this.isValid?k4(t.base||fe.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(fe.isDateTime))throw new Bn("min requires all arguments be DateTimes");return z3(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(fe.isDateTime))throw new Bn("max requires all arguments be DateTimes");return z3(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,a={}){const{locale:r=null,numberingSystem:s=null}=a,o=zt.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});return f4(o,t,n)}static fromStringExplain(t,n,a={}){return fe.fromFormatExplain(t,n,a)}static buildFormatParser(t,n={}){const{locale:a=null,numberingSystem:r=null}=n,s=zt.fromOpts({locale:a,numberingSystem:r,defaultToEN:!0});return new h4(s,t)}static fromFormatParser(t,n,a={}){if(Ae(t)||Ae(n))throw new Bn("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:s=null}=a,o=zt.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});if(!o.equals(n.locale))throw new Bn(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);const{result:l,zone:d,specificOffset:h,invalidReason:f}=n.explainFromTokens(t);return f?fe.invalid(f):Js(l,d,a,`format ${n.format}`,t,h)}static get DATE_SHORT(){return Rd}static get DATE_MED(){return Kg}static get DATE_MED_WITH_WEEKDAY(){return BS}static get DATE_FULL(){return Zg}static get DATE_HUGE(){return Xg}static get TIME_SIMPLE(){return Jg}static get TIME_WITH_SECONDS(){return Qg}static get TIME_WITH_SHORT_OFFSET(){return e3}static get TIME_WITH_LONG_OFFSET(){return t3}static get TIME_24_SIMPLE(){return n3}static get TIME_24_WITH_SECONDS(){return i3}static get TIME_24_WITH_SHORT_OFFSET(){return a3}static get TIME_24_WITH_LONG_OFFSET(){return r3}static get DATETIME_SHORT(){return s3}static get DATETIME_SHORT_WITH_SECONDS(){return o3}static get DATETIME_MED(){return l3}static get DATETIME_MED_WITH_SECONDS(){return c3}static get DATETIME_MED_WITH_WEEKDAY(){return ES}static get DATETIME_FULL(){return d3}static get DATETIME_FULL_WITH_SECONDS(){return u3}static get DATETIME_HUGE(){return h3}static get DATETIME_HUGE_WITH_SECONDS(){return f3}}function Kl(e){if(fe.isDateTime(e))return e;if(e&&e.valueOf&&ur(e.valueOf()))return fe.fromJSDate(e);if(e&&typeof e=="object")return fe.fromObject(e);throw new Bn(`Unknown datetime argument: ${e}, of type ${typeof e}`)}/*!
18
+ `):e}function Tx(e,t){const{element:n,datasetIndex:a,index:r}=t,s=e.getDatasetMeta(a).controller,{label:o,value:l}=s.getLabelAndValue(r);return{chart:e,label:o,parsed:s.getParsed(r),raw:e.data.datasets[a].data[r],formattedValue:l,dataset:s.getDataset(),dataIndex:r,datasetIndex:a,element:n}}function Mg(e,t){const n=e.chart.ctx,{body:a,footer:r,title:s}=e,{boxWidth:o,boxHeight:l}=t,d=sn(t.bodyFont),h=sn(t.titleFont),f=sn(t.footerFont),m=s.length,g=r.length,y=a.length,v=Sn(t.padding);let _=v.height,k=0,x=a.reduce((C,V)=>C+V.before.length+V.lines.length+V.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,m&&(_+=m*h.lineHeight+(m-1)*t.titleSpacing+t.titleMarginBottom),x){const C=t.displayColors?Math.max(l,d.lineHeight):d.lineHeight;_+=y*C+(x-y)*d.lineHeight+(x-1)*t.bodySpacing}g&&(_+=t.footerMarginTop+g*f.lineHeight+(g-1)*t.footerSpacing);let M=0;const B=function(C){k=Math.max(k,n.measureText(C).width+M)};return n.save(),n.font=h.string,vt(e.title,B),n.font=d.string,vt(e.beforeBody.concat(e.afterBody),B),M=t.displayColors?o+2+t.boxPadding:0,vt(a,C=>{vt(C.before,B),vt(C.lines,B),vt(C.after,B)}),M=0,n.font=f.string,vt(e.footer,B),n.restore(),k+=v.width,{width:k,height:_}}function Ix(e,t){const{y:n,height:a}=t;return n<a/2?"top":n>e.height-a/2?"bottom":"center"}function Ax(e,t,n,a){const{x:r,width:s}=a,o=n.caretSize+n.caretPadding;if(e==="left"&&r+s+o>t.width||e==="right"&&r-s-o<0)return!0}function Nx(e,t,n,a){const{x:r,width:s}=n,{width:o,chartArea:{left:l,right:d}}=e;let h="center";return a==="center"?h=r<=(l+d)/2?"left":"right":r<=s/2?h="left":r>=o-s/2&&(h="right"),Ax(h,e,t,n)&&(h="center"),h}function Bg(e,t,n){const a=n.yAlign||t.yAlign||Ix(e,n);return{xAlign:n.xAlign||t.xAlign||Nx(e,t,n,a),yAlign:a}}function zx(e,t){let{x:n,width:a}=e;return t==="right"?n-=a:t==="center"&&(n-=a/2),n}function Lx(e,t,n){let{y:a,height:r}=e;return t==="top"?a+=n:t==="bottom"?a-=r+n:a-=r/2,a}function Eg(e,t,n,a){const{caretSize:r,caretPadding:s,cornerRadius:o}=e,{xAlign:l,yAlign:d}=n,h=r+s,{topLeft:f,topRight:m,bottomLeft:g,bottomRight:y}=jr(o);let v=zx(t,l);const _=Lx(t,d,h);return d==="center"?l==="left"?v+=h:l==="right"&&(v-=h):l==="left"?v-=Math.max(f,g)+r:l==="right"&&(v+=Math.max(m,y)+r),{x:pn(v,0,a.width-t.width),y:pn(_,0,a.height-t.height)}}function zd(e,t,n){const a=Sn(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-a.right:e.x+a.left}function Og(e){return ra([],Sa(e))}function Px(e,t,n){return rr(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Dg(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Vg={beforeTitle:va,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,a=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(a>0&&t.dataIndex<a)return n[t.dataIndex]}return""},afterTitle:va,beforeBody:va,beforeLabel:va,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Ze(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:va,afterBody:va,beforeFooter:va,footer:va,afterFooter:va};function Un(e,t,n,a){const r=e[t].call(n,a);return typeof r>"u"?Vg[t].call(n,a):r}class T0 extends xa{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 n=this.chart,a=this.options.setContext(this.getContext()),r=a.enabled&&n.options.animation&&a.animations,s=new _2(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=Px(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:a}=n,r=Un(a,"beforeTitle",this,t),s=Un(a,"title",this,t),o=Un(a,"afterTitle",this,t);let l=[];return l=ra(l,Sa(r)),l=ra(l,Sa(s)),l=ra(l,Sa(o)),l}getBeforeBody(t,n){return Og(Un(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:a}=n,r=[];return vt(t,s=>{const o={before:[],lines:[],after:[]},l=Dg(a,s);ra(o.before,Sa(Un(l,"beforeLabel",this,s))),ra(o.lines,Un(l,"label",this,s)),ra(o.after,Sa(Un(l,"afterLabel",this,s))),r.push(o)}),r}getAfterBody(t,n){return Og(Un(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:a}=n,r=Un(a,"beforeFooter",this,t),s=Un(a,"footer",this,t),o=Un(a,"afterFooter",this,t);let l=[];return l=ra(l,Sa(r)),l=ra(l,Sa(s)),l=ra(l,Sa(o)),l}_createItems(t){const n=this._active,a=this.chart.data,r=[],s=[],o=[];let l=[],d,h;for(d=0,h=n.length;d<h;++d)l.push(Tx(this.chart,n[d]));return t.filter&&(l=l.filter((f,m,g)=>t.filter(f,m,g,a))),t.itemSort&&(l=l.sort((f,m)=>t.itemSort(f,m,a))),vt(l,f=>{const m=Dg(t.callbacks,f);r.push(Un(m,"labelColor",this,f)),s.push(Un(m,"labelPointStyle",this,f)),o.push(Un(m,"labelTextColor",this,f))}),this.labelColors=r,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=l,l}update(t,n){const a=this.options.setContext(this.getContext()),r=this._active;let s,o=[];if(!r.length)this.opacity!==0&&(s={opacity:0});else{const l=Al[a.position].call(this,r,this._eventPosition);o=this._createItems(a),this.title=this.getTitle(o,a),this.beforeBody=this.getBeforeBody(o,a),this.body=this.getBody(o,a),this.afterBody=this.getAfterBody(o,a),this.footer=this.getFooter(o,a);const d=this._size=Mg(this,a),h=Object.assign({},l,d),f=Bg(this.chart,a,h),m=Eg(a,h,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,s={opacity:1,x:m.x,y:m.y,width:d.width,height:d.height,caretX:l.x,caretY:l.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&a.external&&a.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,a,r){const s=this.getCaretPosition(t,a,r);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,a){const{xAlign:r,yAlign:s}=this,{caretSize:o,cornerRadius:l}=a,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:m}=jr(l),{x:g,y}=t,{width:v,height:_}=n;let k,x,M,B,C,V;return s==="center"?(C=y+_/2,r==="left"?(k=g,x=k-o,B=C+o,V=C-o):(k=g+v,x=k+o,B=C-o,V=C+o),M=k):(r==="left"?x=g+Math.max(d,f)+o:r==="right"?x=g+v-Math.max(h,m)-o:x=this.caretX,s==="top"?(B=y,C=B-o,k=x-o,M=x+o):(B=y+_,C=B+o,k=x+o,M=x-o),V=B),{x1:k,x2:x,x3:M,y1:B,y2:C,y3:V}}drawTitle(t,n,a){const r=this.title,s=r.length;let o,l,d;if(s){const h=Ls(a.rtl,this.x,this.width);for(t.x=zd(this,a.titleAlign,a),n.textAlign=h.textAlign(a.titleAlign),n.textBaseline="middle",o=sn(a.titleFont),l=a.titleSpacing,n.fillStyle=a.titleColor,n.font=o.string,d=0;d<s;++d)n.fillText(r[d],h.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+l,d+1===s&&(t.y+=a.titleMarginBottom-l)}}_drawColorBox(t,n,a,r,s){const o=this.labelColors[a],l=this.labelPointStyles[a],{boxHeight:d,boxWidth:h}=s,f=sn(s.bodyFont),m=zd(this,"left",s),g=r.x(m),y=d<f.lineHeight?(f.lineHeight-d)/2:0,v=n.y+y;if(s.usePointStyle){const _={radius:Math.min(h,d)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},k=r.leftForLtr(g,h)+h/2,x=v+d/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,l0(t,_,k,x),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,l0(t,_,k,x)}else{t.lineWidth=et(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const _=r.leftForLtr(g,h),k=r.leftForLtr(r.xPlus(g,1),h-2),x=jr(o.borderRadius);Object.values(x).some(M=>M!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,Cl(t,{x:_,y:v,w:h,h:d,radius:x}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Cl(t,{x:k,y:v+1,w:h-2,h:d-2,radius:x}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(_,v,h,d),t.strokeRect(_,v,h,d),t.fillStyle=o.backgroundColor,t.fillRect(k,v+1,h-2,d-2))}t.fillStyle=this.labelTextColors[a]}drawBody(t,n,a){const{body:r}=this,{bodySpacing:s,bodyAlign:o,displayColors:l,boxHeight:d,boxWidth:h,boxPadding:f}=a,m=sn(a.bodyFont);let g=m.lineHeight,y=0;const v=Ls(a.rtl,this.x,this.width),_=function(T){n.fillText(T,v.x(t.x+y),t.y+g/2),t.y+=g+s},k=v.textAlign(o);let x,M,B,C,V,$,L;for(n.textAlign=o,n.textBaseline="middle",n.font=m.string,t.x=zd(this,k,a),n.fillStyle=a.bodyColor,vt(this.beforeBody,_),y=l&&k!=="right"?o==="center"?h/2+f:h+2+f:0,C=0,$=r.length;C<$;++C){for(x=r[C],M=this.labelTextColors[C],n.fillStyle=M,vt(x.before,_),B=x.lines,l&&B.length&&(this._drawColorBox(n,t,C,v,a),g=Math.max(m.lineHeight,d)),V=0,L=B.length;V<L;++V)_(B[V]),g=m.lineHeight;vt(x.after,_)}y=0,g=m.lineHeight,vt(this.afterBody,_),t.y-=s}drawFooter(t,n,a){const r=this.footer,s=r.length;let o,l;if(s){const d=Ls(a.rtl,this.x,this.width);for(t.x=zd(this,a.footerAlign,a),t.y+=a.footerMarginTop,n.textAlign=d.textAlign(a.footerAlign),n.textBaseline="middle",o=sn(a.footerFont),n.fillStyle=a.footerColor,n.font=o.string,l=0;l<s;++l)n.fillText(r[l],d.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a.footerSpacing}}drawBackground(t,n,a,r){const{xAlign:s,yAlign:o}=this,{x:l,y:d}=t,{width:h,height:f}=a,{topLeft:m,topRight:g,bottomLeft:y,bottomRight:v}=jr(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(l+m,d),o==="top"&&this.drawCaret(t,n,a,r),n.lineTo(l+h-g,d),n.quadraticCurveTo(l+h,d,l+h,d+g),o==="center"&&s==="right"&&this.drawCaret(t,n,a,r),n.lineTo(l+h,d+f-v),n.quadraticCurveTo(l+h,d+f,l+h-v,d+f),o==="bottom"&&this.drawCaret(t,n,a,r),n.lineTo(l+y,d+f),n.quadraticCurveTo(l,d+f,l,d+f-y),o==="center"&&s==="left"&&this.drawCaret(t,n,a,r),n.lineTo(l,d+m),n.quadraticCurveTo(l,d,l+m,d),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,a=this.$animations,r=a&&a.x,s=a&&a.y;if(r||s){const o=Al[t.position].call(this,this._active,this._eventPosition);if(!o)return;const l=this._size=Mg(this,t),d=Object.assign({},o,this._size),h=Bg(n,t,d),f=Eg(t,d,h,n);(r._to!==f.x||s._to!==f.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=l.width,this.height=l.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let a=this.opacity;if(!a)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},s={x:this.x,y:this.y};a=Math.abs(a)<.001?0:a;const o=Sn(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(t.save(),t.globalAlpha=a,this.drawBackground(s,t,r,n),u2(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),h2(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const a=this._active,r=t.map(({datasetIndex:l,index:d})=>{const h=this.chart.getDatasetMeta(l);if(!h)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:h.data[d],index:d}}),s=!ld(a,r),o=this._positionChanged(r,n);(s||o)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,a=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,s=this._active||[],o=this._getActiveElements(t,s,n,a),l=this._positionChanged(o,t),d=n||!ld(o,s)||l;return d&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),d}_getActiveElements(t,n,a,r){const s=this.options;if(t.type==="mouseout")return[];if(!r)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,s.mode,s,a);return s.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:a,caretY:r,options:s}=this,o=Al[s.position].call(this,t,n);return o!==!1&&(a!==o.x||r!==o.y)}}we(T0,"positioners",Al);var Fx={id:"tooltip",_element:T0,positioners:Al,afterInit(e,t,n){n&&(e.tooltip=new T0({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.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:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.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:Vg},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Rx=Object.freeze({__proto__:null,Colors:QC,Decimation:ix,Filler:Cx,Legend:Ox,SubTitle:$x,Title:Vx,Tooltip:Fx});const Hx=(e,t,n,a)=>(typeof t=="string"?(n=e.push(t)-1,a.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Wx(e,t,n,a){const r=e.indexOf(t);if(r===-1)return Hx(e,t,n,a);const s=e.lastIndexOf(t);return r!==s?n:r}const Yx=(e,t)=>e===null?null:pn(Math.round(e),0,t);function $g(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class I0 extends Zr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const a=this.getLabels();for(const{index:r,label:s}of n)a[r]===s&&a.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Ze(t))return null;const a=this.getLabels();return n=isFinite(n)&&a[n]===t?n:Wx(a,t,Re(n,t),this._addedLabels),Yx(n,a.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:a,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(a=0),n||(r=this.getLabels().length-1)),this.min=a,this.max=r}buildTicks(){const t=this.min,n=this.max,a=this.options.offset,r=[];let s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1),this._valueRange=Math.max(s.length-(a?0:1),1),this._startValue=this.min-(a?.5:0);for(let o=t;o<=n;o++)r.push({value:o});return r}getLabelForValue(t){return $g.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}we(I0,"id","category"),we(I0,"defaults",{ticks:{callback:$g}});function jx(e,t){const n=[],{bounds:r,step:s,min:o,max:l,precision:d,count:h,maxTicks:f,maxDigits:m,includeBounds:g}=e,y=s||1,v=f-1,{min:_,max:k}=t,x=!Ze(o),M=!Ze(l),B=!Ze(h),C=(k-_)/(m+1);let V=Nm((k-_)/v/y)*y,$,L,T,R;if(V<1e-14&&!x&&!M)return[{value:_},{value:k}];R=Math.ceil(k/V)-Math.floor(_/V),R>v&&(V=Nm(R*V/v/y)*y),Ze(d)||($=Math.pow(10,d),V=Math.ceil(V*$)/$),r==="ticks"?(L=Math.floor(_/V)*V,T=Math.ceil(k/V)*V):(L=_,T=k),x&&M&&s&&Pw((l-o)/s,V/1e3)?(R=Math.round(Math.min((l-o)/V,f)),V=(l-o)/R,L=o,T=l):B?(L=x?o:L,T=M?l:T,R=h-1,V=(T-L)/R):(R=(T-L)/V,bl(R,Math.round(R),V/1e3)?R=Math.round(R):R=Math.ceil(R));const q=Math.max(Lm(V),Lm(L));$=Math.pow(10,Ze(d)?q:d),L=Math.round(L*$)/$,T=Math.round(T*$)/$;let ee=0;for(x&&(g&&L!==o?(n.push({value:o}),L<o&&ee++,bl(Math.round((L+ee*V)*$)/$,o,Tg(o,C,e))&&ee++):L<o&&ee++);ee<R;++ee){const F=Math.round((L+ee*V)*$)/$;if(M&&F>l)break;n.push({value:F})}return M&&g&&T!==l?n.length&&bl(n[n.length-1].value,l,Tg(l,C,e))?n[n.length-1].value=l:n.push({value:l}):(!M||T===l)&&n.push({value:T}),n}function Tg(e,t,{horizontal:n,minRotation:a}){const r=zi(a),s=(n?Math.sin(r):Math.cos(r))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}class Ld extends Zr{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,n){return Ze(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:a}=this.getUserBounds();let{min:r,max:s}=this;const o=d=>r=n?r:d,l=d=>s=a?s:d;if(t){const d=na(r),h=na(s);d<0&&h<0?l(0):d>0&&h>0&&o(0)}if(r===s){let d=s===0?1:Math.abs(s*.05);l(s+d),t||o(r-d)}this.min=r,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:a}=t,r;return a?(r=Math.ceil(this.max/a)-Math.floor(this.min/a)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${a} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let a=this.getTickLimit();a=Math.max(2,a);const r={maxTicks:a,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=jx(r,s);return t.bounds==="ticks"&&zm(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,a=this.max;if(super.configure(),this.options.offset&&t.length){const r=(a-n)/Math.max(t.length-1,1)/2;n-=r,a+=r}this._startValue=n,this._endValue=a,this._valueRange=a-n}getLabelForValue(t){return wl(t,this.chart.options.locale,this.options.ticks.format)}}class A0 extends Ld{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=qt(t)?t:0,this.max=qt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,a=zi(this.options.ticks.minRotation),r=(t?Math.sin(a):Math.cos(a))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}we(A0,"id","linear"),we(A0,"defaults",{ticks:{callback:hd.formatters.numeric}});const Nl=e=>Math.floor(ar(e)),Xr=(e,t)=>Math.pow(10,Nl(e)+t);function Ig(e){return e/Math.pow(10,Nl(e))===1}function Ag(e,t,n){const a=Math.pow(10,n),r=Math.floor(e/a);return Math.ceil(t/a)-r}function Ux(e,t){const n=t-e;let a=Nl(n);for(;Ag(e,t,a)>10;)a++;for(;Ag(e,t,a)<10;)a--;return Math.min(a,Nl(e))}function qx(e,{min:t,max:n}){t=ni(e.min,t);const a=[],r=Nl(t);let s=Ux(t,n),o=s<0?Math.pow(10,Math.abs(s)):1;const l=Math.pow(10,s),d=r>s?Math.pow(10,r):0,h=Math.round((t-d)*o)/o,f=Math.floor((t-d)/l/10)*l*10;let m=Math.floor((h-f)/Math.pow(10,s)),g=ni(e.min,Math.round((d+f+m*Math.pow(10,s))*o)/o);for(;g<n;)a.push({value:g,major:Ig(g),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(s++,m=2,o=s>=0?1:o),g=Math.round((d+f+m*Math.pow(10,s))*o)/o;const y=ni(e.max,g);return a.push({value:y,major:Ig(y),significand:m}),a}class N0 extends Zr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const a=Ld.prototype.parse.apply(this,[t,n]);if(a===0){this._zero=!0;return}return qt(a)&&a>0?a:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=qt(t)?Math.max(0,t):null,this.max=qt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!qt(this._userMin)&&(this.min=t===Xr(this.min,0)?Xr(this.min,-1):Xr(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let a=this.min,r=this.max;const s=l=>a=t?a:l,o=l=>r=n?r:l;a===r&&(a<=0?(s(1),o(10)):(s(Xr(a,-1)),o(Xr(r,1)))),a<=0&&s(Xr(r,-1)),r<=0&&o(Xr(a,1)),this.min=a,this.max=r}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},a=qx(n,this);return t.bounds==="ticks"&&zm(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}getLabelForValue(t){return t===void 0?"0":wl(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ar(t),this._valueRange=ar(this.max)-ar(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ar(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}we(N0,"id","logarithmic"),we(N0,"defaults",{ticks:{callback:hd.formatters.logarithmic,major:{enabled:!0}}});function z0(e){const t=e.ticks;if(t.display&&e.display){const n=Sn(t.backdropPadding);return Re(t.font&&t.font.size,Ft.font.size)+n.height}return 0}function Gx(e,t,n){return n=Pt(n)?n:[n],{w:nk(e,t.string,n),h:n.length*t.lineHeight}}function Ng(e,t,n,a,r){return e===a||e===r?{start:t-n/2,end:t+n/2}:e<a||e>r?{start:t-n,end:t}:{start:t,end:t+n}}function Kx(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),a=[],r=[],s=e._pointLabels.length,o=e.options.pointLabels,l=o.centerPointLabels?At/s:0;for(let d=0;d<s;d++){const h=o.setContext(e.getPointLabelContext(d));r[d]=h.padding;const f=e.getPointPosition(d,e.drawingArea+r[d],l),m=sn(h.font),g=Gx(e.ctx,m,e._pointLabels[d]);a[d]=g;const y=ii(e.getIndexAngle(d)+l),v=Math.round(e0(y)),_=Ng(v,f.x,g.w,0,180),k=Ng(v,f.y,g.h,90,270);Zx(n,t,y,_,k)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=Qx(e,a,r)}function Zx(e,t,n,a,r){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let l=0,d=0;a.start<t.l?(l=(t.l-a.start)/s,e.l=Math.min(e.l,t.l-l)):a.end>t.r&&(l=(a.end-t.r)/s,e.r=Math.max(e.r,t.r+l)),r.start<t.t?(d=(t.t-r.start)/o,e.t=Math.min(e.t,t.t-d)):r.end>t.b&&(d=(r.end-t.b)/o,e.b=Math.max(e.b,t.b+d))}function Xx(e,t,n){const a=e.drawingArea,{extra:r,additionalAngle:s,padding:o,size:l}=n,d=e.getPointPosition(t,a+r+o,s),h=Math.round(e0(ii(d.angle+Zt))),f=nS(d.y,l.h,h),m=eS(h),g=tS(d.x,l.w,m);return{visible:!0,x:d.x,y:f,textAlign:m,left:g,top:f,right:g+l.w,bottom:f+l.h}}function Jx(e,t){if(!t)return!0;const{left:n,top:a,right:r,bottom:s}=e;return!(ka({x:n,y:a},t)||ka({x:n,y:s},t)||ka({x:r,y:a},t)||ka({x:r,y:s},t))}function Qx(e,t,n){const a=[],r=e._pointLabels.length,s=e.options,{centerPointLabels:o,display:l}=s.pointLabels,d={extra:z0(s)/2,additionalAngle:o?At/r:0};let h;for(let f=0;f<r;f++){d.padding=n[f],d.size=t[f];const m=Xx(e,f,d);a.push(m),l==="auto"&&(m.visible=Jx(m,h),m.visible&&(h=m))}return a}function eS(e){return e===0||e===180?"center":e<180?"left":"right"}function tS(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function nS(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function iS(e,t,n){const{left:a,top:r,right:s,bottom:o}=n,{backdropColor:l}=t;if(!Ze(l)){const d=jr(t.borderRadius),h=Sn(t.backdropPadding);e.fillStyle=l;const f=a-h.left,m=r-h.top,g=s-a+h.width,y=o-r+h.height;Object.values(d).some(v=>v!==0)?(e.beginPath(),Cl(e,{x:f,y:m,w:g,h:y,radius:d}),e.fill()):e.fillRect(f,m,g,y)}}function aS(e,t){const{ctx:n,options:{pointLabels:a}}=e;for(let r=t-1;r>=0;r--){const s=e._pointLabelItems[r];if(!s.visible)continue;const o=a.setContext(e.getPointLabelContext(r));iS(n,o,s);const l=sn(o.font),{x:d,y:h,textAlign:f}=s;Yr(n,e._pointLabels[r],d,h+l.lineHeight/2,l,{color:o.color,textAlign:f,textBaseline:"middle"})}}function zg(e,t,n,a){const{ctx:r}=e;if(n)r.arc(e.xCenter,e.yCenter,t,0,Nt);else{let s=e.getPointPosition(0,t);r.moveTo(s.x,s.y);for(let o=1;o<a;o++)s=e.getPointPosition(o,t),r.lineTo(s.x,s.y)}}function rS(e,t,n,a,r){const s=e.ctx,o=t.circular,{color:l,lineWidth:d}=t;!o&&!a||!l||!d||n<0||(s.save(),s.strokeStyle=l,s.lineWidth=d,s.setLineDash(r.dash||[]),s.lineDashOffset=r.dashOffset,s.beginPath(),zg(e,n,o,a),s.closePath(),s.stroke(),s.restore())}function sS(e,t,n){return rr(e,{label:n,index:t,type:"pointLabel"})}class zl extends Ld{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Sn(z0(this.options)/2),n=this.width=this.maxWidth-t.width,a=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+a/2+t.top),this.drawingArea=Math.floor(Math.min(n,a)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=qt(t)&&!isNaN(t)?t:0,this.max=qt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/z0(this.options))}generateTickLabels(t){Ld.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,a)=>{const r=Tt(this.options.pointLabels.callback,[n,a],this);return r||r===0?r:""}).filter((n,a)=>this.chart.getDataVisibility(a))}fit(){const t=this.options;t.display&&t.pointLabels.display?Kx(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,a,r){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((a-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,a,r))}getIndexAngle(t){const n=Nt/(this._pointLabels.length||1),a=this.options.startAngle||0;return ii(t*n+zi(a))}getDistanceFromCenterForValue(t){if(Ze(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(Ze(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const a=n[t];return sS(this.getContext(),t,a)}}getPointPosition(t,n,a=0){const r=this.getIndexAngle(t)-Zt+a;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:a,right:r,bottom:s}=this._pointLabelItems[t];return{left:n,top:a,right:r,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const a=this.ctx;a.save(),a.beginPath(),zg(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),a.closePath(),a.fillStyle=t,a.fill(),a.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:a,grid:r,border:s}=n,o=this._pointLabels.length;let l,d,h;if(n.pointLabels.display&&aS(this,o),r.display&&this.ticks.forEach((f,m)=>{if(m!==0||m===0&&this.min<0){d=this.getDistanceFromCenterForValue(f.value);const g=this.getContext(m),y=r.setContext(g),v=s.setContext(g);rS(this,y,d,o,v)}}),a.display){for(t.save(),l=o-1;l>=0;l--){const f=a.setContext(this.getPointLabelContext(l)),{color:m,lineWidth:g}=f;!g||!m||(t.lineWidth=g,t.strokeStyle=m,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,d=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),h=this.getPointPosition(l,d),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(h.x,h.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,a=n.ticks;if(!a.display)return;const r=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((l,d)=>{if(d===0&&this.min>=0&&!n.reverse)return;const h=a.setContext(this.getContext(d)),f=sn(h.font);if(s=this.getDistanceFromCenterForValue(this.ticks[d].value),h.showLabelBackdrop){t.font=f.string,o=t.measureText(l.label).width,t.fillStyle=h.backdropColor;const m=Sn(h.backdropPadding);t.fillRect(-o/2-m.left,-s-f.size/2-m.top,o+m.width,f.size+m.height)}Yr(t,l.label,0,-s,f,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})}),t.restore()}drawTitle(){}}we(zl,"id","radialLinear"),we(zl,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:hd.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),we(zl,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),we(zl,"descriptors",{angleLines:{_fallback:"grid"}});const Pd={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},qn=Object.keys(Pd);function Lg(e,t){return e-t}function Pg(e,t){if(Ze(t))return null;const n=e._adapter,{parser:a,round:r,isoWeekday:s}=e._parseOpts;let o=t;return typeof a=="function"&&(o=a(o)),qt(o)||(o=typeof a=="string"?n.parse(o,a):n.parse(o)),o===null?null:(r&&(o=r==="week"&&(As(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,r)),+o)}function Fg(e,t,n,a){const r=qn.length;for(let s=qn.indexOf(e);s<r-1;++s){const o=Pd[qn[s]],l=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(l*o.size))<=a)return qn[s]}return qn[r-1]}function oS(e,t,n,a,r){for(let s=qn.length-1;s>=qn.indexOf(n);s--){const o=qn[s];if(Pd[o].common&&e._adapter.diff(r,a,o)>=t-1)return o}return qn[n?qn.indexOf(n):0]}function lS(e){for(let t=qn.indexOf(e)+1,n=qn.length;t<n;++t)if(Pd[qn[t]].common)return qn[t]}function Rg(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:a,hi:r}=n0(n,t),s=n[a]>=t?n[a]:n[r];e[s]=!0}}function cS(e,t,n,a){const r=e._adapter,s=+r.startOf(t[0].value,a),o=t[t.length-1].value;let l,d;for(l=s;l<=o;l=+r.add(l,1,a))d=n[l],d>=0&&(t[d].major=!0);return t}function Hg(e,t,n){const a=[],r={},s=t.length;let o,l;for(o=0;o<s;++o)l=t[o],r[l]=o,a.push({value:l,major:!1});return s===0||!n?a:cS(e,a,r,n)}class Ll extends Zr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const a=t.time||(t.time={}),r=this._adapter=new V2._date(t.adapters.date);r.init(n),gl(a.displayFormats,r.formats()),this._parseOpts={parser:a.parser,round:a.round,isoWeekday:a.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Pg(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,a=t.time.unit||"day";let{min:r,max:s,minDefined:o,maxDefined:l}=this.getUserBounds();function d(h){!o&&!isNaN(h.min)&&(r=Math.min(r,h.min)),!l&&!isNaN(h.max)&&(s=Math.max(s,h.max))}(!o||!l)&&(d(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&d(this.getMinMax(!1))),r=qt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),a),s=qt(s)&&!isNaN(s)?s:+n.endOf(Date.now(),a)+1,this.min=Math.min(r,s-1),this.max=Math.max(r+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],a=t[t.length-1]),{min:n,max:a}}buildTicks(){const t=this.options,n=t.time,a=t.ticks,r=a.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const s=this.min,o=this.max,l=Ww(r,s,o);return this._unit=n.unit||(a.autoSkip?Fg(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):oS(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!a.major.enabled||this._unit==="year"?void 0:lS(this._unit),this.initOffsets(r),t.reverse&&l.reverse(),Hg(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,a=0,r,s;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?n=1-r:n=(this.getDecimalForValue(t[1])-r)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?a=s:a=(s-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=pn(n,0,o),a=pn(a,0,o),this._offsets={start:n,end:a,factor:1/(n+1+a)}}_generate(){const t=this._adapter,n=this.min,a=this.max,r=this.options,s=r.time,o=s.unit||Fg(s.minUnit,n,a,this._getLabelCapacity(n)),l=Re(r.ticks.stepSize,1),d=o==="week"?s.isoWeekday:!1,h=As(d)||d===!0,f={};let m=n,g,y;if(h&&(m=+t.startOf(m,"isoWeek",d)),m=+t.startOf(m,h?"day":o),t.diff(a,n,o)>1e5*l)throw new Error(n+" and "+a+" are too far apart with stepSize of "+l+" "+o);const v=r.ticks.source==="data"&&this.getDataTimestamps();for(g=m,y=0;g<a;g=+t.add(g,l,o),y++)Rg(f,g,v);return(g===a||r.bounds==="ticks"||y===1)&&Rg(f,g,v),Object.keys(f).sort(Lg).map(_=>+_)}getLabelForValue(t){const n=this._adapter,a=this.options.time;return a.tooltipFormat?n.format(t,a.tooltipFormat):n.format(t,a.displayFormats.datetime)}format(t,n){const r=this.options.time.displayFormats,s=this._unit,o=n||r[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,a,r){const s=this.options,o=s.ticks.callback;if(o)return Tt(o,[t,n,a],this);const l=s.time.displayFormats,d=this._unit,h=this._majorUnit,f=d&&l[d],m=h&&l[h],g=a[n],y=h&&m&&g&&g.major;return this._adapter.format(t,r||(y?m:f))}generateTickLabels(t){let n,a,r;for(n=0,a=t.length;n<a;++n)r=t[n],r.label=this._tickFormatFunction(r.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,a=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+a)*n.factor)}getValueForPixel(t){const n=this._offsets,a=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+a*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,a=this.ctx.measureText(t).width,r=zi(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(r),o=Math.sin(r),l=this._resolveTickFontOptions(0).size;return{w:a*s+l*o,h:a*o+l*s}}_getLabelCapacity(t){const n=this.options.time,a=n.displayFormats,r=a[n.unit]||a.millisecond,s=this._tickFormatFunction(t,0,Hg(this,[t],this._majorUnit),r),o=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],n,a;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,a=r.length;n<a;++n)t=t.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,a;if(t.length)return t;const r=this.getLabels();for(n=0,a=r.length;n<a;++n)t.push(Pg(this,r[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Hm(t.sort(Lg))}}we(Ll,"id","time"),we(Ll,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Fd(e,t,n){let a=0,r=e.length-1,s,o,l,d;n?(t>=e[a].pos&&t<=e[r].pos&&({lo:a,hi:r}=wa(e,"pos",t)),{pos:s,time:l}=e[a],{pos:o,time:d}=e[r]):(t>=e[a].time&&t<=e[r].time&&({lo:a,hi:r}=wa(e,"time",t)),{time:s,pos:l}=e[a],{time:o,pos:d}=e[r]);const h=o-s;return h?l+(d-l)*(t-s)/h:l}class L0 extends Ll{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Fd(n,this.min),this._tableRange=Fd(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:a}=this,r=[],s=[];let o,l,d,h,f;for(o=0,l=t.length;o<l;++o)h=t[o],h>=n&&h<=a&&r.push(h);if(r.length<2)return[{time:n,pos:0},{time:a,pos:1}];for(o=0,l=r.length;o<l;++o)f=r[o+1],d=r[o-1],h=r[o],Math.round((f+d)/2)!==h&&s.push({time:h,pos:o/(l-1)});return s}_generate(){const t=this.min,n=this.max;let a=super.getDataTimestamps();return(!a.includes(t)||!a.length)&&a.splice(0,0,t),(!a.includes(n)||a.length===1)&&a.push(n),a.sort((r,s)=>r-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),a=this.getLabelTimestamps();return n.length&&a.length?t=this.normalize(n.concat(a)):t=n.length?n:a,t=this._cache.all=t,t}getDecimalForValue(t){return(Fd(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,a=this.getDecimalForPixel(t)/n.factor-n.end;return Fd(this._table,a*this._tableRange+this._minPos,!0)}}we(L0,"id","timeseries"),we(L0,"defaults",Ll.defaults);var dS=Object.freeze({__proto__:null,CategoryScale:I0,LinearScale:A0,LogarithmicScale:N0,RadialLinearScale:zl,TimeScale:Ll,TimeSeriesScale:L0});const Jr=[y9,UC,Rx,dS],Wg={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},uS={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...Wg,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},hS=i.version[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function Rs(e){return i.isProxy(e)?i.toRaw(e):e}function fS(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return i.isProxy(t)?new Proxy(e,{}):e}function pS(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function Yg(e,t){e.labels=t}function jg(e,t,n){const a=[];e.datasets=t.map(r=>{const s=e.datasets.find(o=>o[n]===r[n]);return!s||!r.data||a.includes(s)?{...r}:(a.push(s),Object.assign(s,r),s)})}function mS(e,t){const n={labels:[],datasets:[]};return Yg(n,e.labels),jg(n,e.datasets,t),n}const gS=i.defineComponent({props:uS,setup(e,t){let{expose:n,slots:a}=t;const r=i.ref(null),s=i.shallowRef(null);n({chart:s});const o=()=>{if(!r.value)return;const{type:h,data:f,options:m,plugins:g,datasetIdKey:y}=e,v=mS(f,y),_=fS(v,f);s.value=new aa(r.value,{type:h,data:_,options:{...m},plugins:g})},l=()=>{const h=i.toRaw(s.value);h&&(e.destroyDelay>0?setTimeout(()=>{h.destroy(),s.value=null},e.destroyDelay):(h.destroy(),s.value=null))},d=h=>{h.update(e.updateMode)};return i.onMounted(o),i.onUnmounted(l),i.watch([()=>e.options,()=>e.data],(h,f)=>{let[m,g]=h,[y,v]=f;const _=i.toRaw(s.value);if(!_)return;let k=!1;if(m){const x=Rs(m),M=Rs(y);x&&x!==M&&(pS(_,x),k=!0)}if(g){const x=Rs(g.labels),M=Rs(v.labels),B=Rs(g.datasets),C=Rs(v.datasets);x!==M&&(Yg(_.config.data,x),k=!0),B&&B!==C&&(jg(_.config.data,B,e.datasetIdKey),k=!0)}k&&i.nextTick(()=>{d(_)})},{deep:!0}),()=>i.h("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:r},[i.h("p",{},[a.default?a.default():""])])}});function Pl(e,t){return aa.register(t),i.defineComponent({props:Wg,setup(n,a){let{expose:r}=a;const s=i.shallowRef(null),o=l=>{s.value=l==null?void 0:l.chart};return r({chart:s}),()=>i.h(gS,hS({ref:o},{type:e,...n}))}})}const Ug=Pl("bar",Ml),qg=Pl("doughnut",sr),yS=Pl("line",Bl),bS=Pl("pie",wd),vS=Pl("polarArea",Ps),ai={gp50:"#f3fcf8",gp100:"#e2f8ef",gp200:"#abedd3",gp300:"#6ddfb1",gp400:"#2db981",gp500:"#239f6d",gp600:"#1c7d56",gp700:"#136746",ta50:"#eefcfa",ta100:"#dcf9f6",ta200:"#a2f1e5",ta300:"#51e6d0",ta400:"#20c5ad",ta500:"#18aa94",ta600:"#138675",ta700:"#0f6b5d",ts50:"#f5fbff",ts100:"#e6f6fe",ts200:"#C2EDFF",ts300:"#7BD0F4",ts400:"#42AAD7",ts500:"#1F86B2",ts600:"#18698B",ts700:"#155875",bn50:"#f6f9fe",bn100:"#e6effe",bn200:"#b4cdf8",bn300:"#729ee9",bn400:"#467bd8",bn500:"#2f64c1",bn600:"#2051a7",bn700:"#19438a",in50:"#f5f6ff",in100:"#ebefff",in200:"#CED6FD",in300:"#9bacf8",in400:"#6a7cd7",in500:"#4b5caf",in600:"#374486",in700:"#2f396f",vr50:"#faf5ff",vr100:"#f7f0ff",vr200:"#E6D2F9",vr300:"#CEABED",vr400:"#a772d5",vr500:"#8955B9",vr600:"#6B3A98",vr700:"#5c3082",pp50:"#fff5fb",pp100:"#ffebf7",pp200:"#F9C8E2",pp300:"#EF8FC0",pp400:"#DA629F",pp500:"#BE377C",pp600:"#A12663",pp700:"#88255a",rc50:"#fef6f7",rc100:"#ffebed",rc200:"#FABDC5",rc300:"#F98B98",rc400:"#F3596C",rc500:"#E03E52",rc600:"#C92C3F",rc700:"#b22435",og50:"#fef7f6",og100:"#ffefeb",og200:"#FFD6CC",og300:"#FDAF9B",og400:"#FF8567",og500:"#F06442",og600:"#D64B29",og700:"#bc4224",al50:"#fefbf6",al100:"#fdf3e2",al200:"#ffe5b8",al300:"#fdd286",al400:"#f6bd5a",al500:"#eda831",al600:"#d89013",al700:"#c08011",n0:"#FFFFFF",n10:"#FAFCFE",n20:"#F4F8FB",n30:"#E7EDF3",n40:"#DFE5EC",n50:"#D6DCE3",n100:"#C3CCD5",n200:"#ACB8C3",n300:"#99A6B2",n400:"#8794A1",n500:"#647382",n600:"#52616F",n700:"#3B4754",n800:"#28333E",n900:"#1D262F",palete:'["Light Neutrals", "Light", #FFFFFF, #FAFCFE, #F4F8FB, #E7EDF3, #DFE5EC, "$n-0", "$n-10", "$n-20", "$n-30", "$n-40"], ["Mid Neutrals", "Gray", #D6DCE3, #C3CCD5, #ACB8C3, #99A6B2, #8794A1, "$n-50", "$n-100", "$n-200", "$n-300", "$n-400"], ["Dark Neutrals", "Dark", #647382, #52616F, #3B4754, #28333E, #1D262F, "$n-500", "$n-600", "$n-700", "$n-800", "$n-900"], ["Piccolo Green", "Green", #f3fcf8, #e2f8ef, #abedd3, #6ddfb1, #2db981, #239f6d, #1c7d56, #136746, "$gp-50", "$gp-100", "$gp-200", "$gp-300", "$gp-400", "$gp-500", "$gp-600", "$gp-700"], ["Aquaman Teal", "Teal", #eefcfa, #dcf9f6, #a2f1e5, #51e6d0, #20c5ad, #18aa94, #138675, #0f6b5d, "$ta-50", "$ta-100", "$ta-200", "$ta-300", "$ta-400", "$ta-500", "$ta-600", "$ta-700"], ["Sulivan Turquoise", "Turquoise", #f5fbff, #e6f6fe, #C2EDFF, #7BD0F4, #42AAD7, #1F86B2, #18698B, #155875, "$ts-50", "$ts-100", "$ts-200", "$ts-300", "$ts-400", "$ts-500", "$ts-600", "$ts-700"], ["Nocturne Blue", "Blue", #f6f9fe, #e6effe, #b4cdf8, #729ee9, #467bd8, #2f64c1, #2051a7, #19438a, "$bn-50", "$bn-100", "$bn-200", "$bn-300", "$bn-400", "$bn-500", "$bn-600", "$bn-700"], ["Nightwing Indigo", "Indigo", #f5f6ff, #ebefff, #CED6FD, #9bacf8, #6a7cd7, #4b5caf, #374486, #2f396f, "$in-50", "$in-100", "$in-200", "$in-300", "$in-400", "$in-500", "$in-600", "$in-700"], ["Raven Violet", "Violet", #faf5ff, #f7f0ff, #E6D2F9, #CEABED, #a772d5, #8955B9, #6B3A98, #5c3082, "$vr-50", "$vr-100", "$vr-200", "$vr-300", "$vr-400", "$vr-500", "$vr-600", "$vr-700"], ["Peppa Pink", "Pink", #fff5fb, #ffebf7, #F9C8E2, #EF8FC0, #DA629F, #BE377C, #A12663, #88255a, "$pp-50", "$pp-100", "$pp-200", "$pp-300", "$pp-400", "$pp-500", "$pp-600", "$pp-700"], ["Carmen Red", "Red", #fef6f7, #ffebed, #FABDC5, #F98B98, #F3596C, #E03E52, #C92C3F, #b22435, "$rc-50", "$rc-100", "$rc-200", "$rc-300", "$rc-400", "$rc-500", "$rc-600", "$rc-700"], ["Goku Orange", "Orange", #fef7f6, #ffefeb, #FFD6CC, #FDAF9B, #FF8567, #F06442, #D64B29, #bc4224, "$og-50", "$og-100", "$og-200", "$og-300", "$og-400", "$og-500", "$og-600", "$og-700"], ["Lisa Amber", "Amber", #fefbf6, #fdf3e2, #ffe5b8, #fdd286, #f6bd5a, #eda831, #d89013, #c08011, "$al-50", "$al-100", "$al-200", "$al-300", "$al-400", "$al-500", "$al-600", "$al-700"]',chartThemes:'["Blue Theme", "Blue", #467bd8, #42AAD7, #20c5ad, #19438a, #4b5caf, #6ddfb1, #FFD6CC, #ffefeb, #ffe5b8, #fdd286, "$bn-400", "$ts-400", "$ta-400", "$bn-700", "$in-500", "$gp-300", "$og-200", "$og-100", "$al-200", "$al-300"], ["Indigo Theme", "Indigo", #4b5caf, #CEABED, #FDAF9B, #ffebf7, #FFD6CC, #6a7cd7, #E7EDF3, #EF8FC0, #a772d5, #3B4754, "$in-500", "$pp-100", "$og-200", "$vr-300", "$in-400", "$og-300", "$n-30", "$n-700", "$vr-400", "$pp-300"]'},sa=e=>{let t=[],n={};const a=/(\[[^[\]]*\])/g,r=e.match(a);for(let s=0;s<r.length;s++){r[s]=r[s].replace("[",""),r[s]=r[s].replace("]","");let o=r[s].split(",");n.colorName=o[0].trim().replace(/"/g,""),n.variantName=o[1].trim().replace(/"/g,""),n.color400=o[6],n.colorShades=[],n.colorTokens=[],n.colorData=[];let l=!1;for(let d=2,h=2;d<o.length;d++,h++)o[d].includes("#")?(n.colorShades.push(o[d].trim()),n.colorData[h-2]={},n.colorData[h-2].shade=o[d].trim()):o[d].includes("$")&&(n.colorTokens.push(o[d].trim().replace(/"/g,"")),n.colorData[h-2].token=o[d].trim().replace(/"/g,"")),!l&&o[d+1].includes("$")&&(h=1,l=!0);t.push(n),n={}}return t};aa.register(...Jr);const _S={name:"CdsBarChart",components:{Bar:Ug},props:{data:{type:Array,required:!0},variant:{type:String,required:!0,default:"green",validator:e=>["green","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},labels:{type:Array,required:!0,default:()=>[]},barWidth:{type:Number,default:5},horizontalBar:{type:Boolean,default:!0}},data(){return{sassColorVariables:ai,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{responsive:!0,maintainAspectRatio:!1,categoryPercentage:null,indexAxis:this.horizontalBar?"y":"x",scales:this.horizontalBar?{x:{beginAtZero:!0}}:{y:{beginAtZero:!0,grace:"5%",ticks:{precision:0},categoryPercentage:.6,barPercentage:.8}},plugins:{tooltip:{callbacks:{beforeTitle:function(e){return`${e[0].dataset.name}`}}},legend:{display:!0,labels:{usePointStyle:!0,pointStyle:"rectRounded"}}}}}},watch:{labels:{handler(e){this.localLabels=e},immediate:!0},variant:{handler(e,t){e==="gray"||e==="dark"?this.deleteFirstTwoColors=!0:this.deleteFirstTwoColors=!1},immediate:!0},data:{handler(e){this.mergeChartDataNoSelect(e)},immediate:!0},barWidth:{handler(e){e>=.1&&e<=1?this.chartOptions.categoryPercentage=e:this.chartOptions.categoryPercentage=1},immediate:!0}},methods:{paleteBuilder:sa,palete(){this.palletColors=this.paleteBuilder(this.sassColorVariables.palete),this.removeFirstTwoElements()},removeFirstTwoElements(){for(let e=0;e<this.palletColors.length;e++){const t=this.palletColors[e];this.deleteFirstTwoColors===!1&&(t.colorShades.splice(0,2),t.colorTokens.splice(0,2),t.colorData.splice(0,2))}},addDataSetNames(){this.data.forEach(e=>{e.datasets.forEach(t=>{t.name=e.name})})},mergeChartDataNoSelect(e){const t={labels:this.localLabels,datasets:[]};this.addDataSetNames(),e.forEach(a=>{a.datasets.forEach(r=>{const s={label:r.label,data:r.data,name:r.name,borderRadius:6};t.datasets.push(s)})}),this.palete();const n=this.generateBackgroundColor();this.setColors(t.datasets,n),this.localChartData=t},generateBackgroundColor(){const e=this.variant.toLowerCase(),t=this.palletColors.find(n=>n.variantName.toLowerCase().includes(e));return t?t.colorShades:[]},setColors(e,t){const n={};this.chartOptions.plugins.legend.display=!0,e.forEach(a=>{const r=a.name;let s;e.length===1&&(s=2,n[r]=t[s],this.chartOptions.plugins.legend.display=!1),n[r]||(s=Object.keys(n).length%t.length,n[r]=t[s]),a.backgroundColor=n[r],a.borderRadius=6})}}},wS={class:"responsive-container"};function kS(e,t,n,a,r,s){const o=i.resolveComponent("Bar");return i.openBlock(),i.createElementBlock("span",null,[i.createElementVNode("div",wS,[i.createVNode(o,{is:"bar",data:r.localChartData,options:r.chartOptions},null,8,["data","options"])])])}const CS=ie(_S,[["render",kS],["__scopeId","data-v-353301a1"]]);class Qr extends Error{}class xS extends Qr{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class SS extends Qr{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class MS extends Qr{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Hs extends Qr{}class Gg extends Qr{constructor(t){super(`Invalid unit ${t}`)}}class Bn extends Qr{}class cr extends Qr{constructor(){super("Zone is an abstract class")}}const ke="numeric",Pi="short",ri="long",Rd={year:ke,month:ke,day:ke},Kg={year:ke,month:Pi,day:ke},BS={year:ke,month:Pi,day:ke,weekday:Pi},Zg={year:ke,month:ri,day:ke},Xg={year:ke,month:ri,day:ke,weekday:ri},Jg={hour:ke,minute:ke},Qg={hour:ke,minute:ke,second:ke},e3={hour:ke,minute:ke,second:ke,timeZoneName:Pi},t3={hour:ke,minute:ke,second:ke,timeZoneName:ri},n3={hour:ke,minute:ke,hourCycle:"h23"},i3={hour:ke,minute:ke,second:ke,hourCycle:"h23"},a3={hour:ke,minute:ke,second:ke,hourCycle:"h23",timeZoneName:Pi},r3={hour:ke,minute:ke,second:ke,hourCycle:"h23",timeZoneName:ri},s3={year:ke,month:ke,day:ke,hour:ke,minute:ke},o3={year:ke,month:ke,day:ke,hour:ke,minute:ke,second:ke},l3={year:ke,month:Pi,day:ke,hour:ke,minute:ke},c3={year:ke,month:Pi,day:ke,hour:ke,minute:ke,second:ke},ES={year:ke,month:Pi,day:ke,weekday:Pi,hour:ke,minute:ke},d3={year:ke,month:ri,day:ke,hour:ke,minute:ke,timeZoneName:Pi},u3={year:ke,month:ri,day:ke,hour:ke,minute:ke,second:ke,timeZoneName:Pi},h3={year:ke,month:ri,day:ke,weekday:ri,hour:ke,minute:ke,timeZoneName:ri},f3={year:ke,month:ri,day:ke,weekday:ri,hour:ke,minute:ke,second:ke,timeZoneName:ri};class Fl{get type(){throw new cr}get name(){throw new cr}get ianaName(){return this.name}get isUniversal(){throw new cr}offsetName(t,n){throw new cr}formatOffset(t,n){throw new cr}offset(t){throw new cr}equals(t){throw new cr}get isValid(){throw new cr}}let P0=null;class Hd extends Fl{static get instance(){return P0===null&&(P0=new Hd),P0}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:a}){return P3(t,n,a)}formatOffset(t,n){return Yl(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const F0=new Map;function OS(e){let t=F0.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),F0.set(e,t)),t}const DS={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function VS(e,t){const n=e.format(t).replace(/\u200E/g,""),a=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,s,o,l,d,h,f]=a;return[o,r,s,l,d,h,f]}function $S(e,t){const n=e.formatToParts(t),a=[];for(let r=0;r<n.length;r++){const{type:s,value:o}=n[r],l=DS[s];s==="era"?a[l]=o:Ae(l)||(a[l]=parseInt(o,10))}return a}const R0=new Map;class Ma extends Fl{static create(t){let n=R0.get(t);return n===void 0&&R0.set(t,n=new Ma(t)),n}static resetCache(){R0.clear(),F0.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Ma.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:a}){return P3(t,n,a,this.name)}formatOffset(t,n){return Yl(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const a=OS(this.name);let[r,s,o,l,d,h,f]=a.formatToParts?$S(a,n):VS(a,n);l==="BC"&&(r=-Math.abs(r)+1);const g=qd({year:r,month:s,day:o,hour:d===24?0:d,minute:h,second:f,millisecond:0});let y=+n;const v=y%1e3;return y-=v>=0?v:1e3+v,(g-y)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let p3={};function TS(e,t={}){const n=JSON.stringify([e,t]);let a=p3[n];return a||(a=new Intl.ListFormat(e,t),p3[n]=a),a}const H0=new Map;function W0(e,t={}){const n=JSON.stringify([e,t]);let a=H0.get(n);return a===void 0&&(a=new Intl.DateTimeFormat(e,t),H0.set(n,a)),a}const Y0=new Map;function IS(e,t={}){const n=JSON.stringify([e,t]);let a=Y0.get(n);return a===void 0&&(a=new Intl.NumberFormat(e,t),Y0.set(n,a)),a}const j0=new Map;function AS(e,t={}){const{base:n,...a}=t,r=JSON.stringify([e,a]);let s=j0.get(r);return s===void 0&&(s=new Intl.RelativeTimeFormat(e,t),j0.set(r,s)),s}let Rl=null;function NS(){return Rl||(Rl=new Intl.DateTimeFormat().resolvedOptions().locale,Rl)}const U0=new Map;function m3(e){let t=U0.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),U0.set(e,t)),t}const q0=new Map;function zS(e){let t=q0.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...g3,...t}),q0.set(e,t)}return t}function LS(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let a,r;try{a=W0(e).resolvedOptions(),r=e}catch{const d=e.substring(0,n);a=W0(d).resolvedOptions(),r=d}const{numberingSystem:s,calendar:o}=a;return[r,s,o]}}function PS(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function FS(e){const t=[];for(let n=1;n<=12;n++){const a=fe.utc(2009,n,1);t.push(e(a))}return t}function RS(e){const t=[];for(let n=1;n<=7;n++){const a=fe.utc(2016,11,13+n);t.push(e(a))}return t}function Wd(e,t,n,a){const r=e.listingMode();return r==="error"?null:r==="en"?n(t):a(t)}function HS(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||m3(e.locale).numberingSystem==="latn"}class WS{constructor(t,n,a){this.padTo=a.padTo||0,this.floor=a.floor||!1;const{padTo:r,floor:s,...o}=a;if(!n||Object.keys(o).length>0){const l={useGrouping:!1,...a};a.padTo>0&&(l.minimumIntegerDigits=a.padTo),this.inf=IS(t,l)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):nh(t,3);return tn(n,this.padTo)}}}class YS{constructor(t,n,a){this.opts=a,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const o=-1*(t.offset/60),l=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;t.offset!==0&&Ma.create(l).valid?(r=l,this.dt=t):(r="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,r=t.zone.name):(r="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const s={...this.opts};s.timeZone=s.timeZone||r,this.dtf=W0(n,s)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const a=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:a}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class jS{constructor(t,n,a){this.opts={style:"long",...a},!n&&A3()&&(this.rtf=AS(t,a))}format(t,n){return this.rtf?this.rtf.format(t,n):fM(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const g3={firstDay:1,minimalDays:4,weekend:[6,7]};let zt=class Xc{static fromOpts(t){return Xc.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,a,r,s=!1){const o=t||Gt.defaultLocale,l=o||(s?"en-US":NS()),d=n||Gt.defaultNumberingSystem,h=a||Gt.defaultOutputCalendar,f=eh(r)||Gt.defaultWeekSettings;return new Xc(l,d,h,f,o)}static resetCache(){Rl=null,H0.clear(),Y0.clear(),j0.clear(),U0.clear(),q0.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:a,weekSettings:r}={}){return Xc.create(t,n,a,r)}constructor(t,n,a,r,s){const[o,l,d]=LS(t);this.locale=o,this.numberingSystem=n||l||null,this.outputCalendar=a||d||null,this.weekSettings=r,this.intl=PS(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=HS(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:Xc.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,eh(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return Wd(this,t,H3,()=>{const a=n?{month:t,day:"numeric"}:{month:t},r=n?"format":"standalone";return this.monthsCache[r][t]||(this.monthsCache[r][t]=FS(s=>this.extract(s,a,"month"))),this.monthsCache[r][t]})}weekdays(t,n=!1){return Wd(this,t,j3,()=>{const a=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},r=n?"format":"standalone";return this.weekdaysCache[r][t]||(this.weekdaysCache[r][t]=RS(s=>this.extract(s,a,"weekday"))),this.weekdaysCache[r][t]})}meridiems(){return Wd(this,void 0,()=>U3,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[fe.utc(2016,11,13,9),fe.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Wd(this,t,q3,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[fe.utc(-40,1,1),fe.utc(2017,1,1)].map(a=>this.extract(a,n,"era"))),this.eraCache[t]})}extract(t,n,a){const r=this.dtFormatter(t,n),s=r.formatToParts(),o=s.find(l=>l.type.toLowerCase()===a);return o?o.value:null}numberFormatter(t={}){return new WS(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new YS(t,this.intl,n)}relFormatter(t={}){return new jS(this.intl,this.isEnglish(),t)}listFormatter(t={}){return TS(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||m3(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:N3()?zS(this.locale):g3}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},G0=null;class Nn extends Fl{static get utcInstance(){return G0===null&&(G0=new Nn(0)),G0}static instance(t){return t===0?Nn.utcInstance:new Nn(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Nn(Gd(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Yl(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Yl(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Yl(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class US extends Fl{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function dr(e,t){if(Ae(e)||e===null)return t;if(e instanceof Fl)return e;if(JS(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?Hd.instance:n==="utc"||n==="gmt"?Nn.utcInstance:Nn.parseSpecifier(n)||Ma.create(e)}else return ur(e)?Nn.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new US(e)}const K0={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},y3={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},qS=K0.hanidec.replace(/[\[|\]]/g,"").split("");function GS(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const a=e.charCodeAt(n);if(e[n].search(K0.hanidec)!==-1)t+=qS.indexOf(e[n]);else for(const r in y3){const[s,o]=y3[r];a>=s&&a<=o&&(t+=a-s)}}return parseInt(t,10)}else return t}const Z0=new Map;function KS(){Z0.clear()}function Fi({numberingSystem:e},t=""){const n=e||"latn";let a=Z0.get(n);a===void 0&&(a=new Map,Z0.set(n,a));let r=a.get(t);return r===void 0&&(r=new RegExp(`${K0[n]}${t}`),a.set(t,r)),r}let b3=()=>Date.now(),v3="system",_3=null,w3=null,k3=null,C3=60,x3,S3=null;class Gt{static get now(){return b3}static set now(t){b3=t}static set defaultZone(t){v3=t}static get defaultZone(){return dr(v3,Hd.instance)}static get defaultLocale(){return _3}static set defaultLocale(t){_3=t}static get defaultNumberingSystem(){return w3}static set defaultNumberingSystem(t){w3=t}static get defaultOutputCalendar(){return k3}static set defaultOutputCalendar(t){k3=t}static get defaultWeekSettings(){return S3}static set defaultWeekSettings(t){S3=eh(t)}static get twoDigitCutoffYear(){return C3}static set twoDigitCutoffYear(t){C3=t%100}static get throwOnInvalid(){return x3}static set throwOnInvalid(t){x3=t}static resetCaches(){zt.resetCache(),Ma.resetCache(),fe.resetCache(),KS()}}class Ri{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const M3=[0,31,59,90,120,151,181,212,243,273,304,334],B3=[0,31,60,91,121,152,182,213,244,274,305,335];function vi(e,t){return new Ri("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function X0(e,t,n){const a=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&a.setUTCFullYear(a.getUTCFullYear()-1900);const r=a.getUTCDay();return r===0?7:r}function E3(e,t,n){return n+(Hl(e)?B3:M3)[t-1]}function O3(e,t){const n=Hl(e)?B3:M3,a=n.findIndex(s=>s<t),r=t-n[a];return{month:a+1,day:r}}function J0(e,t){return(e-t+7)%7+1}function Yd(e,t=4,n=1){const{year:a,month:r,day:s}=e,o=E3(a,r,s),l=J0(X0(a,r,s),n);let d=Math.floor((o-l+14-t)/7),h;return d<1?(h=a-1,d=Wl(h,t,n)):d>Wl(a,t,n)?(h=a+1,d=1):h=a,{weekYear:h,weekNumber:d,weekday:l,...Zd(e)}}function D3(e,t=4,n=1){const{weekYear:a,weekNumber:r,weekday:s}=e,o=J0(X0(a,1,t),n),l=Ys(a);let d=r*7+s-o-7+t,h;d<1?(h=a-1,d+=Ys(h)):d>l?(h=a+1,d-=Ys(a)):h=a;const{month:f,day:m}=O3(h,d);return{year:h,month:f,day:m,...Zd(e)}}function Q0(e){const{year:t,month:n,day:a}=e,r=E3(t,n,a);return{year:t,ordinal:r,...Zd(e)}}function V3(e){const{year:t,ordinal:n}=e,{month:a,day:r}=O3(t,n);return{year:t,month:a,day:r,...Zd(e)}}function $3(e,t){if(!Ae(e.localWeekday)||!Ae(e.localWeekNumber)||!Ae(e.localWeekYear)){if(!Ae(e.weekday)||!Ae(e.weekNumber)||!Ae(e.weekYear))throw new Hs("Cannot mix locale-based week fields with ISO-based week fields");return Ae(e.localWeekday)||(e.weekday=e.localWeekday),Ae(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Ae(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function ZS(e,t=4,n=1){const a=jd(e.weekYear),r=_i(e.weekNumber,1,Wl(e.weekYear,t,n)),s=_i(e.weekday,1,7);return a?r?s?!1:vi("weekday",e.weekday):vi("week",e.weekNumber):vi("weekYear",e.weekYear)}function XS(e){const t=jd(e.year),n=_i(e.ordinal,1,Ys(e.year));return t?n?!1:vi("ordinal",e.ordinal):vi("year",e.year)}function T3(e){const t=jd(e.year),n=_i(e.month,1,12),a=_i(e.day,1,Ud(e.year,e.month));return t?n?a?!1:vi("day",e.day):vi("month",e.month):vi("year",e.year)}function I3(e){const{hour:t,minute:n,second:a,millisecond:r}=e,s=_i(t,0,23)||t===24&&n===0&&a===0&&r===0,o=_i(n,0,59),l=_i(a,0,59),d=_i(r,0,999);return s?o?l?d?!1:vi("millisecond",r):vi("second",a):vi("minute",n):vi("hour",t)}function Ae(e){return typeof e>"u"}function ur(e){return typeof e=="number"}function jd(e){return typeof e=="number"&&e%1===0}function JS(e){return typeof e=="string"}function QS(e){return Object.prototype.toString.call(e)==="[object Date]"}function A3(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function N3(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function eM(e){return Array.isArray(e)?e:[e]}function z3(e,t,n){if(e.length!==0)return e.reduce((a,r)=>{const s=[t(r),r];return a&&n(a[0],s[0])===a[0]?a:s},null)[1]}function tM(e,t){return t.reduce((n,a)=>(n[a]=e[a],n),{})}function Ws(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function eh(e){if(e==null)return null;if(typeof e!="object")throw new Bn("Week settings must be an object");if(!_i(e.firstDay,1,7)||!_i(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!_i(t,1,7)))throw new Bn("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function _i(e,t,n){return jd(e)&&e>=t&&e<=n}function nM(e,t){return e-t*Math.floor(e/t)}function tn(e,t=2){const n=e<0;let a;return n?a="-"+(""+-e).padStart(t,"0"):a=(""+e).padStart(t,"0"),a}function hr(e){if(!(Ae(e)||e===null||e===""))return parseInt(e,10)}function es(e){if(!(Ae(e)||e===null||e===""))return parseFloat(e)}function th(e){if(!(Ae(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function nh(e,t,n=!1){const a=10**t;return(n?Math.trunc:Math.round)(e*a)/a}function Hl(e){return e%4===0&&(e%100!==0||e%400===0)}function Ys(e){return Hl(e)?366:365}function Ud(e,t){const n=nM(t-1,12)+1,a=e+(t-n)/12;return n===2?Hl(a)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function qd(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function L3(e,t,n){return-J0(X0(e,1,t),n)+t-1}function Wl(e,t=4,n=1){const a=L3(e,t,n),r=L3(e+1,t,n);return(Ys(e)-a+r)/7}function ih(e){return e>99?e:e>Gt.twoDigitCutoffYear?1900+e:2e3+e}function P3(e,t,n,a=null){const r=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};a&&(s.timeZone=a);const o={timeZoneName:t,...s},l=new Intl.DateTimeFormat(n,o).formatToParts(r).find(d=>d.type.toLowerCase()==="timezonename");return l?l.value:null}function Gd(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const a=parseInt(t,10)||0,r=n<0||Object.is(n,-0)?-a:a;return n*60+r}function F3(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Bn(`Invalid unit value ${e}`);return t}function Kd(e,t){const n={};for(const a in e)if(Ws(e,a)){const r=e[a];if(r==null)continue;n[t(a)]=F3(r)}return n}function Yl(e,t){const n=Math.trunc(Math.abs(e/60)),a=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return`${r}${tn(n,2)}:${tn(a,2)}`;case"narrow":return`${r}${n}${a>0?`:${a}`:""}`;case"techie":return`${r}${tn(n,2)}${tn(a,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Zd(e){return tM(e,["hour","minute","second","millisecond"])}const iM=["January","February","March","April","May","June","July","August","September","October","November","December"],R3=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],aM=["J","F","M","A","M","J","J","A","S","O","N","D"];function H3(e){switch(e){case"narrow":return[...aM];case"short":return[...R3];case"long":return[...iM];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const W3=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Y3=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],rM=["M","T","W","T","F","S","S"];function j3(e){switch(e){case"narrow":return[...rM];case"short":return[...Y3];case"long":return[...W3];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const U3=["AM","PM"],sM=["Before Christ","Anno Domini"],oM=["BC","AD"],lM=["B","A"];function q3(e){switch(e){case"narrow":return[...lM];case"short":return[...oM];case"long":return[...sM];default:return null}}function cM(e){return U3[e.hour<12?0:1]}function dM(e,t){return j3(t)[e.weekday-1]}function uM(e,t){return H3(t)[e.month-1]}function hM(e,t){return q3(t)[e.year<0?0:1]}function fM(e,t,n="always",a=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&s){const m=e==="days";switch(t){case 1:return m?"tomorrow":`next ${r[e][0]}`;case-1:return m?"yesterday":`last ${r[e][0]}`;case 0:return m?"today":`this ${r[e][0]}`}}const o=Object.is(t,-0)||t<0,l=Math.abs(t),d=l===1,h=r[e],f=a?d?h[1]:h[2]||h[1]:d?r[e][0]:e;return o?`${l} ${f} ago`:`in ${l} ${f}`}function G3(e,t){let n="";for(const a of e)a.literal?n+=a.val:n+=t(a.val);return n}const pM={D:Rd,DD:Kg,DDD:Zg,DDDD:Xg,t:Jg,tt:Qg,ttt:e3,tttt:t3,T:n3,TT:i3,TTT:a3,TTTT:r3,f:s3,ff:l3,fff:d3,ffff:h3,F:o3,FF:c3,FFF:u3,FFFF:f3};class En{static create(t,n={}){return new En(t,n)}static parseFormat(t){let n=null,a="",r=!1;const s=[];for(let o=0;o<t.length;o++){const l=t.charAt(o);l==="'"?(a.length>0&&s.push({literal:r||/^\s+$/.test(a),val:a}),n=null,a="",r=!r):r||l===n?a+=l:(a.length>0&&s.push({literal:/^\s+$/.test(a),val:a}),a=l,n=l)}return a.length>0&&s.push({literal:r||/^\s+$/.test(a),val:a}),s}static macroTokenToFormatOpts(t){return pM[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return tn(t,n);const a={...this.opts};return n>0&&(a.padTo=n),this.loc.numberFormatter(a).format(t)}formatDateTimeFromString(t,n){const a=this.loc.listingMode()==="en",r=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(y,v)=>this.loc.extract(t,y,v),o=y=>t.isOffsetFixed&&t.offset===0&&y.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,y.format):"",l=()=>a?cM(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),d=(y,v)=>a?uM(t,y):s(v?{month:y}:{month:y,day:"numeric"},"month"),h=(y,v)=>a?dM(t,y):s(v?{weekday:y}:{weekday:y,month:"long",day:"numeric"},"weekday"),f=y=>{const v=En.macroTokenToFormatOpts(y);return v?this.formatWithSystemDefault(t,v):y},m=y=>a?hM(t,y):s({era:y},"era"),g=y=>{switch(y){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return l();case"d":return r?s({day:"numeric"},"day"):this.num(t.day);case"dd":return r?s({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return h("short",!0);case"cccc":return h("long",!0);case"ccccc":return h("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return h("short",!1);case"EEEE":return h("long",!1);case"EEEEE":return h("narrow",!1);case"L":return r?s({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return r?s({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return d("short",!0);case"LLLL":return d("long",!0);case"LLLLL":return d("narrow",!0);case"M":return r?s({month:"numeric"},"month"):this.num(t.month);case"MM":return r?s({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return d("short",!1);case"MMMM":return d("long",!1);case"MMMMM":return d("narrow",!1);case"y":return r?s({year:"numeric"},"year"):this.num(t.year);case"yy":return r?s({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return r?s({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return r?s({year:"numeric"},"year"):this.num(t.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return f(y)}};return G3(En.parseFormat(n),g)}formatDurationFromString(t,n){const a=d=>{switch(d[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=d=>h=>{const f=a(h);return f?this.num(d.get(f),h.length):h},s=En.parseFormat(n),o=s.reduce((d,{literal:h,val:f})=>h?d:d.concat(f),[]),l=t.shiftTo(...o.map(a).filter(d=>d));return G3(s,r(l))}}const K3=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function js(...e){const t=e.reduce((n,a)=>n+a.source,"");return RegExp(`^${t}$`)}function Us(...e){return t=>e.reduce(([n,a,r],s)=>{const[o,l,d]=s(t,r);return[{...n,...o},l||a,d]},[{},null,1]).slice(0,2)}function qs(e,...t){if(e==null)return[null,null];for(const[n,a]of t){const r=n.exec(e);if(r)return a(r)}return[null,null]}function Z3(...e){return(t,n)=>{const a={};let r;for(r=0;r<e.length;r++)a[e[r]]=hr(t[n+r]);return[a,null,n+r]}}const X3=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,mM=`(?:${X3.source}?(?:\\[(${K3.source})\\])?)?`,ah=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,J3=RegExp(`${ah.source}${mM}`),rh=RegExp(`(?:T${J3.source})?`),gM=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,yM=/(\d{4})-?W(\d\d)(?:-?(\d))?/,bM=/(\d{4})-?(\d{3})/,vM=Z3("weekYear","weekNumber","weekDay"),_M=Z3("year","ordinal"),wM=/(\d{4})-(\d\d)-(\d\d)/,Q3=RegExp(`${ah.source} ?(?:${X3.source}|(${K3.source}))?`),kM=RegExp(`(?: ${Q3.source})?`);function Gs(e,t,n){const a=e[t];return Ae(a)?n:hr(a)}function CM(e,t){return[{year:Gs(e,t),month:Gs(e,t+1,1),day:Gs(e,t+2,1)},null,t+3]}function Ks(e,t){return[{hours:Gs(e,t,0),minutes:Gs(e,t+1,0),seconds:Gs(e,t+2,0),milliseconds:th(e[t+3])},null,t+4]}function jl(e,t){const n=!e[t]&&!e[t+1],a=Gd(e[t+1],e[t+2]),r=n?null:Nn.instance(a);return[{},r,t+3]}function Ul(e,t){const n=e[t]?Ma.create(e[t]):null;return[{},n,t+1]}const xM=RegExp(`^T?${ah.source}$`),SM=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function MM(e){const[t,n,a,r,s,o,l,d,h]=e,f=t[0]==="-",m=d&&d[0]==="-",g=(y,v=!1)=>y!==void 0&&(v||y&&f)?-y:y;return[{years:g(es(n)),months:g(es(a)),weeks:g(es(r)),days:g(es(s)),hours:g(es(o)),minutes:g(es(l)),seconds:g(es(d),d==="-0"),milliseconds:g(th(h),m)}]}const BM={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function sh(e,t,n,a,r,s,o){const l={year:t.length===2?ih(hr(t)):hr(t),month:R3.indexOf(n)+1,day:hr(a),hour:hr(r),minute:hr(s)};return o&&(l.second=hr(o)),e&&(l.weekday=e.length>3?W3.indexOf(e)+1:Y3.indexOf(e)+1),l}const EM=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function OM(e){const[,t,n,a,r,s,o,l,d,h,f,m]=e,g=sh(t,r,a,n,s,o,l);let y;return d?y=BM[d]:h?y=0:y=Gd(f,m),[g,new Nn(y)]}function DM(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const VM=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,$M=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,TM=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function e4(e){const[,t,n,a,r,s,o,l]=e;return[sh(t,r,a,n,s,o,l),Nn.utcInstance]}function IM(e){const[,t,n,a,r,s,o,l]=e;return[sh(t,l,n,a,r,s,o),Nn.utcInstance]}const AM=js(gM,rh),NM=js(yM,rh),zM=js(bM,rh),LM=js(J3),t4=Us(CM,Ks,jl,Ul),PM=Us(vM,Ks,jl,Ul),FM=Us(_M,Ks,jl,Ul),RM=Us(Ks,jl,Ul);function HM(e){return qs(e,[AM,t4],[NM,PM],[zM,FM],[LM,RM])}function WM(e){return qs(DM(e),[EM,OM])}function YM(e){return qs(e,[VM,e4],[$M,e4],[TM,IM])}function jM(e){return qs(e,[SM,MM])}const UM=Us(Ks);function qM(e){return qs(e,[xM,UM])}const GM=js(wM,kM),KM=js(Q3),ZM=Us(Ks,jl,Ul);function XM(e){return qs(e,[GM,t4],[KM,ZM])}const n4="Invalid Duration",i4={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},JM={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...i4},wi=146097/400,Zs=146097/4800,QM={years:{quarters:4,months:12,weeks:wi/7,days:wi,hours:wi*24,minutes:wi*24*60,seconds:wi*24*60*60,milliseconds:wi*24*60*60*1e3},quarters:{months:3,weeks:wi/28,days:wi/4,hours:wi*24/4,minutes:wi*24*60/4,seconds:wi*24*60*60/4,milliseconds:wi*24*60*60*1e3/4},months:{weeks:Zs/7,days:Zs,hours:Zs*24,minutes:Zs*24*60,seconds:Zs*24*60*60,milliseconds:Zs*24*60*60*1e3},...i4},ts=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],eB=ts.slice(0).reverse();function fr(e,t,n=!1){const a={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new lt(a)}function a4(e,t){let n=t.milliseconds??0;for(const a of eB.slice(1))t[a]&&(n+=t[a]*e[a].milliseconds);return n}function r4(e,t){const n=a4(e,t)<0?-1:1;ts.reduceRight((a,r)=>{if(Ae(t[r]))return a;if(a){const s=t[a]*n,o=e[r][a],l=Math.floor(s/o);t[r]+=l*n,t[a]-=l*o*n}return r},null),ts.reduce((a,r)=>{if(Ae(t[r]))return a;if(a){const s=t[a]%1;t[a]-=s,t[r]+=s*e[a][r]}return r},null)}function tB(e){const t={};for(const[n,a]of Object.entries(e))a!==0&&(t[n]=a);return t}class lt{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let a=n?QM:JM;t.matrix&&(a=t.matrix),this.values=t.values,this.loc=t.loc||zt.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=a,this.isLuxonDuration=!0}static fromMillis(t,n){return lt.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Bn(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new lt({values:Kd(t,lt.normalizeUnit),loc:zt.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(ur(t))return lt.fromMillis(t);if(lt.isDuration(t))return t;if(typeof t=="object")return lt.fromObject(t);throw new Bn(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[a]=jM(t);return a?lt.fromObject(a,n):lt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[a]=qM(t);return a?lt.fromObject(a,n):lt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Bn("need to specify a reason the Duration is invalid");const a=t instanceof Ri?t:new Ri(t,n);if(Gt.throwOnInvalid)throw new MS(a);return new lt({invalid:a})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new Gg(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const a={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?En.create(this.loc,a).formatDurationFromString(this,t):n4}toHuman(t={}){if(!this.isValid)return n4;const n=ts.map(a=>{const r=this.values[a];return Ae(r)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:a.slice(0,-1)}).format(r)}).filter(a=>a);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=nh(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},fe.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?a4(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=lt.fromDurationLike(t),a={};for(const r of ts)(Ws(n.values,r)||Ws(this.values,r))&&(a[r]=n.get(r)+this.get(r));return fr(this,{values:a},!0)}minus(t){if(!this.isValid)return this;const n=lt.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const a of Object.keys(this.values))n[a]=F3(t(this.values[a],a));return fr(this,{values:n},!0)}get(t){return this[lt.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Kd(t,lt.normalizeUnit)};return fr(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:a,matrix:r}={}){const o={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:r,conversionAccuracy:a};return fr(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return r4(this.matrix,t),fr(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=tB(this.normalize().shiftToAll().toObject());return fr(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(o=>lt.normalizeUnit(o));const n={},a={},r=this.toObject();let s;for(const o of ts)if(t.indexOf(o)>=0){s=o;let l=0;for(const h in a)l+=this.matrix[h][o]*a[h],a[h]=0;ur(r[o])&&(l+=r[o]);const d=Math.trunc(l);n[o]=d,a[o]=(l*1e3-d*1e3)/1e3}else ur(r[o])&&(a[o]=r[o]);for(const o in a)a[o]!==0&&(n[s]+=o===s?a[o]:a[o]/this.matrix[s][o]);return r4(this.matrix,n),fr(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return fr(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(a,r){return a===void 0||a===0?r===void 0||r===0:a===r}for(const a of ts)if(!n(this.values[a],t.values[a]))return!1;return!0}}const Xs="Invalid Interval";function nB(e,t){return!e||!e.isValid?Yt.invalid("missing or invalid start"):!t||!t.isValid?Yt.invalid("missing or invalid end"):t<e?Yt.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Yt{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Bn("need to specify a reason the Interval is invalid");const a=t instanceof Ri?t:new Ri(t,n);if(Gt.throwOnInvalid)throw new SS(a);return new Yt({invalid:a})}static fromDateTimes(t,n){const a=Kl(t),r=Kl(n),s=nB(a,r);return s??new Yt({start:a,end:r})}static after(t,n){const a=lt.fromDurationLike(n),r=Kl(t);return Yt.fromDateTimes(r,r.plus(a))}static before(t,n){const a=lt.fromDurationLike(n),r=Kl(t);return Yt.fromDateTimes(r.minus(a),r)}static fromISO(t,n){const[a,r]=(t||"").split("/",2);if(a&&r){let s,o;try{s=fe.fromISO(a,n),o=s.isValid}catch{o=!1}let l,d;try{l=fe.fromISO(r,n),d=l.isValid}catch{d=!1}if(o&&d)return Yt.fromDateTimes(s,l);if(o){const h=lt.fromISO(r,n);if(h.isValid)return Yt.after(s,h)}else if(d){const h=lt.fromISO(a,n);if(h.isValid)return Yt.before(l,h)}}return Yt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const a=this.start.startOf(t,n);let r;return n!=null&&n.useLocaleWeeks?r=this.end.reconfigure({locale:a.locale}):r=this.end,r=r.startOf(t,n),Math.floor(r.diff(a,t).get(t))+(r.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Yt.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Kl).filter(o=>this.contains(o)).sort((o,l)=>o.toMillis()-l.toMillis()),a=[];let{s:r}=this,s=0;for(;r<this.e;){const o=n[s]||this.e,l=+o>+this.e?this.e:o;a.push(Yt.fromDateTimes(r,l)),r=l,s+=1}return a}splitBy(t){const n=lt.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:a}=this,r=1,s;const o=[];for(;a<this.e;){const l=this.start.plus(n.mapUnits(d=>d*r));s=+l>+this.e?this.e:l,o.push(Yt.fromDateTimes(a,s)),a=s,r+=1}return o}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,a=this.e<t.e?this.e:t.e;return n>=a?null:Yt.fromDateTimes(n,a)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,a=this.e>t.e?this.e:t.e;return Yt.fromDateTimes(n,a)}static merge(t){const[n,a]=t.sort((r,s)=>r.s-s.s).reduce(([r,s],o)=>s?s.overlaps(o)||s.abutsStart(o)?[r,s.union(o)]:[r.concat([s]),o]:[r,o],[[],null]);return a&&n.push(a),n}static xor(t){let n=null,a=0;const r=[],s=t.map(d=>[{time:d.s,type:"s"},{time:d.e,type:"e"}]),o=Array.prototype.concat(...s),l=o.sort((d,h)=>d.time-h.time);for(const d of l)a+=d.type==="s"?1:-1,a===1?n=d.time:(n&&+n!=+d.time&&r.push(Yt.fromDateTimes(n,d.time)),n=null);return Yt.merge(r)}difference(...t){return Yt.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Xs}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=Rd,n={}){return this.isValid?En.create(this.s.loc.clone(n),t).formatInterval(this):Xs}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Xs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Xs}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Xs}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Xs}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):lt.invalid(this.invalidReason)}mapEndpoints(t){return Yt.fromDateTimes(t(this.s),t(this.e))}}class Xd{static hasDST(t=Gt.defaultZone){const n=fe.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Ma.isValidZone(t)}static normalizeZone(t){return dr(t,Gt.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||zt.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||zt.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||zt.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:a=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||zt.create(n,a,s)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:a=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||zt.create(n,a,s)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:a=null,locObj:r=null}={}){return(r||zt.create(n,a,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:a=null,locObj:r=null}={}){return(r||zt.create(n,a,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return zt.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return zt.create(n,null,"gregory").eras(t)}static features(){return{relative:A3(),localeWeek:N3()}}}function s4(e,t){const n=r=>r.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),a=n(t)-n(e);return Math.floor(lt.fromMillis(a).as("days"))}function iB(e,t,n){const a=[["years",(d,h)=>h.year-d.year],["quarters",(d,h)=>h.quarter-d.quarter+(h.year-d.year)*4],["months",(d,h)=>h.month-d.month+(h.year-d.year)*12],["weeks",(d,h)=>{const f=s4(d,h);return(f-f%7)/7}],["days",s4]],r={},s=e;let o,l;for(const[d,h]of a)n.indexOf(d)>=0&&(o=d,r[d]=h(e,t),l=s.plus(r),l>t?(r[d]--,e=s.plus(r),e>t&&(l=e,r[d]--,e=s.plus(r))):e=l);return[e,r,l,o]}function aB(e,t,n,a){let[r,s,o,l]=iB(e,t,n);const d=t-r,h=n.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);h.length===0&&(o<t&&(o=r.plus({[l]:1})),o!==r&&(s[l]=(s[l]||0)+d/(o-r)));const f=lt.fromObject(s,a);return h.length>0?lt.fromMillis(d,a).shiftTo(...h).plus(f):f}const rB="missing Intl.DateTimeFormat.formatToParts support";function ut(e,t=n=>n){return{regex:e,deser:([n])=>t(GS(n))}}const o4="[  ]",l4=new RegExp(o4,"g");function sB(e){return e.replace(/\./g,"\\.?").replace(l4,o4)}function c4(e){return e.replace(/\./g,"").replace(l4," ").toLowerCase()}function Hi(e,t){return e===null?null:{regex:RegExp(e.map(sB).join("|")),deser:([n])=>e.findIndex(a=>c4(n)===c4(a))+t}}function d4(e,t){return{regex:e,deser:([,n,a])=>Gd(n,a),groups:t}}function Jd(e){return{regex:e,deser:([t])=>t}}function oB(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function lB(e,t){const n=Fi(t),a=Fi(t,"{2}"),r=Fi(t,"{3}"),s=Fi(t,"{4}"),o=Fi(t,"{6}"),l=Fi(t,"{1,2}"),d=Fi(t,"{1,3}"),h=Fi(t,"{1,6}"),f=Fi(t,"{1,9}"),m=Fi(t,"{2,4}"),g=Fi(t,"{4,6}"),y=k=>({regex:RegExp(oB(k.val)),deser:([x])=>x,literal:!0}),_=(k=>{if(e.literal)return y(k);switch(k.val){case"G":return Hi(t.eras("short"),0);case"GG":return Hi(t.eras("long"),0);case"y":return ut(h);case"yy":return ut(m,ih);case"yyyy":return ut(s);case"yyyyy":return ut(g);case"yyyyyy":return ut(o);case"M":return ut(l);case"MM":return ut(a);case"MMM":return Hi(t.months("short",!0),1);case"MMMM":return Hi(t.months("long",!0),1);case"L":return ut(l);case"LL":return ut(a);case"LLL":return Hi(t.months("short",!1),1);case"LLLL":return Hi(t.months("long",!1),1);case"d":return ut(l);case"dd":return ut(a);case"o":return ut(d);case"ooo":return ut(r);case"HH":return ut(a);case"H":return ut(l);case"hh":return ut(a);case"h":return ut(l);case"mm":return ut(a);case"m":return ut(l);case"q":return ut(l);case"qq":return ut(a);case"s":return ut(l);case"ss":return ut(a);case"S":return ut(d);case"SSS":return ut(r);case"u":return Jd(f);case"uu":return Jd(l);case"uuu":return ut(n);case"a":return Hi(t.meridiems(),0);case"kkkk":return ut(s);case"kk":return ut(m,ih);case"W":return ut(l);case"WW":return ut(a);case"E":case"c":return ut(n);case"EEE":return Hi(t.weekdays("short",!1),1);case"EEEE":return Hi(t.weekdays("long",!1),1);case"ccc":return Hi(t.weekdays("short",!0),1);case"cccc":return Hi(t.weekdays("long",!0),1);case"Z":case"ZZ":return d4(new RegExp(`([+-]${l.source})(?::(${a.source}))?`),2);case"ZZZ":return d4(new RegExp(`([+-]${l.source})(${a.source})?`),2);case"z":return Jd(/[a-z_+-/]{1,256}?/i);case" ":return Jd(/[^\S\n\r]/);default:return y(k)}})(e)||{invalidReason:rB};return _.token=e,_}const cB={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function dB(e,t,n){const{type:a,value:r}=e;if(a==="literal"){const d=/^\s+$/.test(r);return{literal:!d,val:d?" ":r}}const s=t[a];let o=a;a==="hour"&&(t.hour12!=null?o=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let l=cB[o];if(typeof l=="object"&&(l=l[s]),l)return{literal:!1,val:l}}function uB(e){return[`^${e.map(n=>n.regex).reduce((n,a)=>`${n}(${a.source})`,"")}$`,e]}function hB(e,t,n){const a=e.match(t);if(a){const r={};let s=1;for(const o in n)if(Ws(n,o)){const l=n[o],d=l.groups?l.groups+1:1;!l.literal&&l.token&&(r[l.token.val[0]]=l.deser(a.slice(s,s+d))),s+=d}return[a,r]}else return[a,{}]}function fB(e){const t=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,a;return Ae(e.z)||(n=Ma.create(e.z)),Ae(e.Z)||(n||(n=new Nn(e.Z)),a=e.Z),Ae(e.q)||(e.M=(e.q-1)*3+1),Ae(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Ae(e.u)||(e.S=th(e.u)),[Object.keys(e).reduce((s,o)=>{const l=t(o);return l&&(s[l]=e[o]),s},{}),n,a]}let oh=null;function pB(){return oh||(oh=fe.fromMillis(1555555555555)),oh}function mB(e,t){if(e.literal)return e;const n=En.macroTokenToFormatOpts(e.val),a=p4(n,t);return a==null||a.includes(void 0)?e:a}function u4(e,t){return Array.prototype.concat(...e.map(n=>mB(n,t)))}class h4{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=u4(En.parseFormat(n),t),this.units=this.tokens.map(a=>lB(a,t)),this.disqualifyingUnit=this.units.find(a=>a.invalidReason),!this.disqualifyingUnit){const[a,r]=uB(this.units);this.regex=RegExp(a,"i"),this.handlers=r}}explainFromTokens(t){if(this.isValid){const[n,a]=hB(t,this.regex,this.handlers),[r,s,o]=a?fB(a):[null,null,void 0];if(Ws(a,"a")&&Ws(a,"H"))throw new Hs("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:a,result:r,zone:s,specificOffset:o}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function f4(e,t,n){return new h4(e,n).explainFromTokens(t)}function gB(e,t,n){const{result:a,zone:r,specificOffset:s,invalidReason:o}=f4(e,t,n);return[a,r,s,o]}function p4(e,t){if(!e)return null;const a=En.create(t,e).dtFormatter(pB()),r=a.formatToParts(),s=a.resolvedOptions();return r.map(o=>dB(o,e,s))}const lh="Invalid DateTime",yB=864e13;function ql(e){return new Ri("unsupported zone",`the zone "${e.name}" is not supported`)}function ch(e){return e.weekData===null&&(e.weekData=Yd(e.c)),e.weekData}function dh(e){return e.localWeekData===null&&(e.localWeekData=Yd(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function ns(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new fe({...n,...t,old:n})}function m4(e,t,n){let a=e-t*60*1e3;const r=n.offset(a);if(t===r)return[a,t];a-=(r-t)*60*1e3;const s=n.offset(a);return r===s?[a,r]:[e-Math.min(r,s)*60*1e3,Math.max(r,s)]}function Qd(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function eu(e,t,n){return m4(qd(e),t,n)}function g4(e,t){const n=e.o,a=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,s={...e.c,year:a,month:r,day:Math.min(e.c.day,Ud(a,r))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=lt.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),l=qd(s);let[d,h]=m4(l,n,e.zone);return o!==0&&(d+=o,h=e.zone.offset(d)),{ts:d,o:h}}function Js(e,t,n,a,r,s){const{setZone:o,zone:l}=n;if(e&&Object.keys(e).length!==0||t){const d=t||l,h=fe.fromObject(e,{...n,zone:d,specificOffset:s});return o?h:h.setZone(l)}else return fe.invalid(new Ri("unparsable",`the input "${r}" can't be parsed as ${a}`))}function tu(e,t,n=!0){return e.isValid?En.create(zt.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function uh(e,t){const n=e.c.year>9999||e.c.year<0;let a="";return n&&e.c.year>=0&&(a+="+"),a+=tn(e.c.year,n?6:4),t?(a+="-",a+=tn(e.c.month),a+="-",a+=tn(e.c.day)):(a+=tn(e.c.month),a+=tn(e.c.day)),a}function y4(e,t,n,a,r,s){let o=tn(e.c.hour);return t?(o+=":",o+=tn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(o+=":")):o+=tn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(o+=tn(e.c.second),(e.c.millisecond!==0||!a)&&(o+=".",o+=tn(e.c.millisecond,3))),r&&(e.isOffsetFixed&&e.offset===0&&!s?o+="Z":e.o<0?(o+="-",o+=tn(Math.trunc(-e.o/60)),o+=":",o+=tn(Math.trunc(-e.o%60))):(o+="+",o+=tn(Math.trunc(e.o/60)),o+=":",o+=tn(Math.trunc(e.o%60)))),s&&(o+="["+e.zone.ianaName+"]"),o}const b4={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},bB={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},vB={ordinal:1,hour:0,minute:0,second:0,millisecond:0},v4=["year","month","day","hour","minute","second","millisecond"],_B=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],wB=["year","ordinal","hour","minute","second","millisecond"];function kB(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Gg(e);return t}function _4(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return kB(e)}}function CB(e){if(Gl===void 0&&(Gl=Gt.now()),e.type!=="iana")return e.offset(Gl);const t=e.name;let n=hh.get(t);return n===void 0&&(n=e.offset(Gl),hh.set(t,n)),n}function w4(e,t){const n=dr(t.zone,Gt.defaultZone);if(!n.isValid)return fe.invalid(ql(n));const a=zt.fromObject(t);let r,s;if(Ae(e.year))r=Gt.now();else{for(const d of v4)Ae(e[d])&&(e[d]=b4[d]);const o=T3(e)||I3(e);if(o)return fe.invalid(o);const l=CB(n);[r,s]=eu(e,l,n)}return new fe({ts:r,zone:n,loc:a,o:s})}function k4(e,t,n){const a=Ae(n.round)?!0:n.round,r=(o,l)=>(o=nh(o,a||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(o,l)),s=o=>n.calendary?t.hasSame(e,o)?0:t.startOf(o).diff(e.startOf(o),o).get(o):t.diff(e,o).get(o);if(n.unit)return r(s(n.unit),n.unit);for(const o of n.units){const l=s(o);if(Math.abs(l)>=1)return r(l,o)}return r(e>t?-0:0,n.units[n.units.length-1])}function C4(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let Gl;const hh=new Map;class fe{constructor(t){const n=t.zone||Gt.defaultZone;let a=t.invalid||(Number.isNaN(t.ts)?new Ri("invalid input"):null)||(n.isValid?null:ql(n));this.ts=Ae(t.ts)?Gt.now():t.ts;let r=null,s=null;if(!a)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[r,s]=[t.old.c,t.old.o];else{const l=ur(t.o)&&!t.old?t.o:n.offset(this.ts);r=Qd(this.ts,l),a=Number.isNaN(r.year)?new Ri("invalid input"):null,r=a?null:r,s=a?null:l}this._zone=n,this.loc=t.loc||zt.create(),this.invalid=a,this.weekData=null,this.localWeekData=null,this.c=r,this.o=s,this.isLuxonDateTime=!0}static now(){return new fe({})}static local(){const[t,n]=C4(arguments),[a,r,s,o,l,d,h]=n;return w4({year:a,month:r,day:s,hour:o,minute:l,second:d,millisecond:h},t)}static utc(){const[t,n]=C4(arguments),[a,r,s,o,l,d,h]=n;return t.zone=Nn.utcInstance,w4({year:a,month:r,day:s,hour:o,minute:l,second:d,millisecond:h},t)}static fromJSDate(t,n={}){const a=QS(t)?t.valueOf():NaN;if(Number.isNaN(a))return fe.invalid("invalid input");const r=dr(n.zone,Gt.defaultZone);return r.isValid?new fe({ts:a,zone:r,loc:zt.fromObject(n)}):fe.invalid(ql(r))}static fromMillis(t,n={}){if(ur(t))return t<-864e13||t>yB?fe.invalid("Timestamp out of range"):new fe({ts:t,zone:dr(n.zone,Gt.defaultZone),loc:zt.fromObject(n)});throw new Bn(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(ur(t))return new fe({ts:t*1e3,zone:dr(n.zone,Gt.defaultZone),loc:zt.fromObject(n)});throw new Bn("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const a=dr(n.zone,Gt.defaultZone);if(!a.isValid)return fe.invalid(ql(a));const r=zt.fromObject(n),s=Kd(t,_4),{minDaysInFirstWeek:o,startOfWeek:l}=$3(s,r),d=Gt.now(),h=Ae(n.specificOffset)?a.offset(d):n.specificOffset,f=!Ae(s.ordinal),m=!Ae(s.year),g=!Ae(s.month)||!Ae(s.day),y=m||g,v=s.weekYear||s.weekNumber;if((y||f)&&v)throw new Hs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(g&&f)throw new Hs("Can't mix ordinal dates with month/day");const _=v||s.weekday&&!y;let k,x,M=Qd(d,h);_?(k=_B,x=bB,M=Yd(M,o,l)):f?(k=wB,x=vB,M=Q0(M)):(k=v4,x=b4);let B=!1;for(const q of k){const ee=s[q];Ae(ee)?B?s[q]=x[q]:s[q]=M[q]:B=!0}const C=_?ZS(s,o,l):f?XS(s):T3(s),V=C||I3(s);if(V)return fe.invalid(V);const $=_?D3(s,o,l):f?V3(s):s,[L,T]=eu($,h,a),R=new fe({ts:L,zone:a,o:T,loc:r});return s.weekday&&y&&t.weekday!==R.weekday?fe.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${R.toISO()}`):R.isValid?R:fe.invalid(R.invalid)}static fromISO(t,n={}){const[a,r]=HM(t);return Js(a,r,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[a,r]=WM(t);return Js(a,r,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[a,r]=YM(t);return Js(a,r,n,"HTTP",n)}static fromFormat(t,n,a={}){if(Ae(t)||Ae(n))throw new Bn("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:s=null}=a,o=zt.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),[l,d,h,f]=gB(o,t,n);return f?fe.invalid(f):Js(l,d,a,`format ${n}`,t,h)}static fromString(t,n,a={}){return fe.fromFormat(t,n,a)}static fromSQL(t,n={}){const[a,r]=XM(t);return Js(a,r,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Bn("need to specify a reason the DateTime is invalid");const a=t instanceof Ri?t:new Ri(t,n);if(Gt.throwOnInvalid)throw new xS(a);return new fe({invalid:a})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const a=p4(t,zt.fromObject(n));return a?a.map(r=>r?r.val:null).join(""):null}static expandFormat(t,n={}){return u4(En.parseFormat(t),zt.fromObject(n)).map(r=>r.val).join("")}static resetCache(){Gl=void 0,hh.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ch(this).weekYear:NaN}get weekNumber(){return this.isValid?ch(this).weekNumber:NaN}get weekday(){return this.isValid?ch(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?dh(this).weekday:NaN}get localWeekNumber(){return this.isValid?dh(this).weekNumber:NaN}get localWeekYear(){return this.isValid?dh(this).weekYear:NaN}get ordinal(){return this.isValid?Q0(this.c).ordinal:NaN}get monthShort(){return this.isValid?Xd.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Xd.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Xd.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Xd.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,a=qd(this.c),r=this.zone.offset(a-t),s=this.zone.offset(a+t),o=this.zone.offset(a-r*n),l=this.zone.offset(a-s*n);if(o===l)return[this];const d=a-o*n,h=a-l*n,f=Qd(d,o),m=Qd(h,l);return f.hour===m.hour&&f.minute===m.minute&&f.second===m.second&&f.millisecond===m.millisecond?[ns(this,{ts:d}),ns(this,{ts:h})]:[this]}get isInLeapYear(){return Hl(this.year)}get daysInMonth(){return Ud(this.year,this.month)}get daysInYear(){return this.isValid?Ys(this.year):NaN}get weeksInWeekYear(){return this.isValid?Wl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Wl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:a,calendar:r}=En.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:a,outputCalendar:r}}toUTC(t=0,n={}){return this.setZone(Nn.instance(t),n)}toLocal(){return this.setZone(Gt.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:a=!1}={}){if(t=dr(t,Gt.defaultZone),t.equals(this.zone))return this;if(t.isValid){let r=this.ts;if(n||a){const s=t.offset(this.ts),o=this.toObject();[r]=eu(o,s,t)}return ns(this,{ts:r,zone:t})}else return fe.invalid(ql(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:a}={}){const r=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:a});return ns(this,{loc:r})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Kd(t,_4),{minDaysInFirstWeek:a,startOfWeek:r}=$3(n,this.loc),s=!Ae(n.weekYear)||!Ae(n.weekNumber)||!Ae(n.weekday),o=!Ae(n.ordinal),l=!Ae(n.year),d=!Ae(n.month)||!Ae(n.day),h=l||d,f=n.weekYear||n.weekNumber;if((h||o)&&f)throw new Hs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&o)throw new Hs("Can't mix ordinal dates with month/day");let m;s?m=D3({...Yd(this.c,a,r),...n},a,r):Ae(n.ordinal)?(m={...this.toObject(),...n},Ae(n.day)&&(m.day=Math.min(Ud(m.year,m.month),m.day))):m=V3({...Q0(this.c),...n});const[g,y]=eu(m,this.o,this.zone);return ns(this,{ts:g,o:y})}plus(t){if(!this.isValid)return this;const n=lt.fromDurationLike(t);return ns(this,g4(this,n))}minus(t){if(!this.isValid)return this;const n=lt.fromDurationLike(t).negate();return ns(this,g4(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const a={},r=lt.normalizeUnit(t);switch(r){case"years":a.month=1;case"quarters":case"months":a.day=1;case"weeks":case"days":a.hour=0;case"hours":a.minute=0;case"minutes":a.second=0;case"seconds":a.millisecond=0;break}if(r==="weeks")if(n){const s=this.loc.getStartOfWeek(),{weekday:o}=this;o<s&&(a.weekNumber=this.weekNumber-1),a.weekday=s}else a.weekday=1;if(r==="quarters"){const s=Math.ceil(this.month/3);a.month=(s-1)*3+1}return this.set(a)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?En.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):lh}toLocaleString(t=Rd,n={}){return this.isValid?En.create(this.loc.clone(n),t).formatDateTime(this):lh}toLocaleParts(t={}){return this.isValid?En.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:a=!1,includeOffset:r=!0,extendedZone:s=!1}={}){if(!this.isValid)return null;const o=t==="extended";let l=uh(this,o);return l+="T",l+=y4(this,o,n,a,r,s),l}toISODate({format:t="extended"}={}){return this.isValid?uh(this,t==="extended"):null}toISOWeekDate(){return tu(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:a=!0,includePrefix:r=!1,extendedZone:s=!1,format:o="extended"}={}){return this.isValid?(r?"T":"")+y4(this,o==="extended",n,t,a,s):null}toRFC2822(){return tu(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return tu(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?uh(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:a=!0}={}){let r="HH:mm:ss.SSS";return(n||t)&&(a&&(r+=" "),n?r+="z":t&&(r+="ZZ")),tu(this,r,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():lh}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",a={}){if(!this.isValid||!t.isValid)return lt.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...a},s=eM(n).map(lt.normalizeUnit),o=t.valueOf()>this.valueOf(),l=o?this:t,d=o?t:this,h=aB(l,d,s,r);return o?h.negate():h}diffNow(t="milliseconds",n={}){return this.diff(fe.now(),t,n)}until(t){return this.isValid?Yt.fromDateTimes(this,t):this}hasSame(t,n,a){if(!this.isValid)return!1;const r=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(n,a)<=r&&r<=s.endOf(n,a)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||fe.fromObject({},{zone:this.zone}),a=t.padding?this<n?-t.padding:t.padding:0;let r=["years","months","days","hours","minutes","seconds"],s=t.unit;return Array.isArray(t.unit)&&(r=t.unit,s=void 0),k4(n,this.plus(a),{...t,numeric:"always",units:r,unit:s})}toRelativeCalendar(t={}){return this.isValid?k4(t.base||fe.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(fe.isDateTime))throw new Bn("min requires all arguments be DateTimes");return z3(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(fe.isDateTime))throw new Bn("max requires all arguments be DateTimes");return z3(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,a={}){const{locale:r=null,numberingSystem:s=null}=a,o=zt.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});return f4(o,t,n)}static fromStringExplain(t,n,a={}){return fe.fromFormatExplain(t,n,a)}static buildFormatParser(t,n={}){const{locale:a=null,numberingSystem:r=null}=n,s=zt.fromOpts({locale:a,numberingSystem:r,defaultToEN:!0});return new h4(s,t)}static fromFormatParser(t,n,a={}){if(Ae(t)||Ae(n))throw new Bn("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:s=null}=a,o=zt.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});if(!o.equals(n.locale))throw new Bn(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);const{result:l,zone:d,specificOffset:h,invalidReason:f}=n.explainFromTokens(t);return f?fe.invalid(f):Js(l,d,a,`format ${n.format}`,t,h)}static get DATE_SHORT(){return Rd}static get DATE_MED(){return Kg}static get DATE_MED_WITH_WEEKDAY(){return BS}static get DATE_FULL(){return Zg}static get DATE_HUGE(){return Xg}static get TIME_SIMPLE(){return Jg}static get TIME_WITH_SECONDS(){return Qg}static get TIME_WITH_SHORT_OFFSET(){return e3}static get TIME_WITH_LONG_OFFSET(){return t3}static get TIME_24_SIMPLE(){return n3}static get TIME_24_WITH_SECONDS(){return i3}static get TIME_24_WITH_SHORT_OFFSET(){return a3}static get TIME_24_WITH_LONG_OFFSET(){return r3}static get DATETIME_SHORT(){return s3}static get DATETIME_SHORT_WITH_SECONDS(){return o3}static get DATETIME_MED(){return l3}static get DATETIME_MED_WITH_SECONDS(){return c3}static get DATETIME_MED_WITH_WEEKDAY(){return ES}static get DATETIME_FULL(){return d3}static get DATETIME_FULL_WITH_SECONDS(){return u3}static get DATETIME_HUGE(){return h3}static get DATETIME_HUGE_WITH_SECONDS(){return f3}}function Kl(e){if(fe.isDateTime(e))return e;if(e&&e.valueOf&&ur(e.valueOf()))return fe.fromJSDate(e);if(e&&typeof e=="object")return fe.fromObject(e);throw new Bn(`Unknown datetime argument: ${e}, of type ${typeof e}`)}/*!
19
19
  * chartjs-adapter-luxon v1.3.1
20
20
  * https://www.chartjs.org
21
21
  * (c) 2023 chartjs-adapter-luxon Contributors
22
22
  * Released under the MIT license
23
- */const xB={datetime:fe.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:fe.TIME_WITH_SECONDS,minute:fe.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};V2._date.override({_id:"luxon",_create:function(e){return fe.fromMillis(e,this.options)},init(e){this.options.locale||(this.options.locale=e.locale)},formats:function(){return xB},parse:function(e,t){const n=this.options,a=typeof e;return e===null||a==="undefined"?null:(a==="number"?e=this._create(e):a==="string"?typeof t=="string"?e=fe.fromFormat(e,t,n):e=fe.fromISO(e,n):e instanceof Date?e=fe.fromJSDate(e,n):a==="object"&&!(e instanceof fe)&&(e=fe.fromObject(e,n)),e.isValid?e.valueOf():null)},format:function(e,t){const n=this._create(e);return typeof t=="string"?n.toFormat(t):n.toLocaleString(t)},add:function(e,t,n){const a={};return a[n]=t,this._create(e).plus(a).valueOf()},diff:function(e,t,n){return this._create(e).diff(this._create(t)).as(n).valueOf()},startOf:function(e,t,n){if(t==="isoWeek"){n=Math.trunc(Math.min(Math.max(0,n),6));const a=this._create(e);return a.minus({days:(a.weekday-n+7)%7}).startOf("day").valueOf()}return t?this._create(e).startOf(t).valueOf():e},endOf:function(e,t){return this._create(e).endOf(t).valueOf()}}),aa.register(...Jr);const SB={name:"CdsLineChart",components:{Line:yS},props:{data:{type:Object,required:!0,default:()=>({datasets:[{label:"",data:[]}]})},xAxisRange:{type:Array,default:()=>[0,100]},yAxisRange:{type:Array,default:()=>[0,100]},variant:{type:String,required:!0,default:"green",validator:e=>["green","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},theme:{type:String,required:!1,default:"",validator:e=>["green","teal","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},labels:{type:Array,required:!0,default:()=>[]},showLabelName:{type:Boolean,required:!0,default:!0},fill:{type:Boolean,default:!1},isDashed:{type:Boolean,default:!1},borderDash:{type:Array,default:()=>[]},smoothing:{type:Number,default:.3},scales:{type:Object,default:()=>({})},animation:{type:Object,default:()=>({})},plugins:{type:Object,default:()=>({})}},data(){return{sassColorVariables:ai,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{interaction:{intersect:!1},scales:{x:{suggestedMin:this.xAxisRange[0],suggestedMax:this.xAxisRange[1],display:!0,title:{display:!0}},y:{suggestedMin:this.yAxisRange[0],suggestedMax:this.yAxisRange[1],display:!0,title:{display:!0}},...this.scales},tension:this.smoothing,responsive:!0,maintainAspectRatio:!1,pieceLabel:{mode:"percentage",precision:1},plugins:{tooltip:{callbacks:{beforeTitle:function(e){return`${e[0].dataset.name}`}}},legend:{display:!0,labels:{usePointStyle:!0,pointStyle:"rectRounded"}},...this.plugins},fill:this.fill,animation:{...this.animation}}}},watch:{labels:{handler(e){this.localLabels=e},immediate:!0},variant:{handler(e){e==="gray"||e==="dark"?this.deleteFirstTwoColors=!0:this.deleteFirstTwoColors=!1},immediate:!0},data:{handler(e){this.mergeChartDataNoSelect(e)},immediate:!0},isDashed:{handler(e){e===!0&&this.checkDashed()},immediate:!0}},mounted(){this.chartOptions={...this.chartOptions,...this.scales}},methods:{paleteBuilder:sa,palete(){this.theme.length?this.palletColors=this.paleteBuilder(this.sassColorVariables.chartThemes):(this.palletColors=this.paleteBuilder(this.sassColorVariables.palete),this.removeFirstTwoElements())},removeFirstTwoElements(){for(let e=0;e<this.palletColors.length;e++){const t=this.palletColors[e];this.deleteFirstTwoColors===!1&&(t.colorShades.splice(0,2),t.colorTokens.splice(0,2),t.colorData.splice(0,2))}},addDataSetNames(){this.data.forEach(e=>{e.datasets.forEach(t=>{t.name=e.name})})},mergeChartDataNoSelect(e){const t={labels:this.localLabels,datasets:[]};this.addDataSetNames(),e.forEach(a=>{a.datasets.forEach(r=>{const s={label:this.showLabelName?r.name:r.label,data:r.data,name:r.name,borderRadius:6};t.datasets.push(s)})}),this.palete();const n=this.generateBackgroundColor();this.setColors(t.datasets,n),this.localChartData=t},generateBackgroundColor(){let e=this.variant.toLowerCase();this.theme.length&&(e=this.theme.toLowerCase());const t=this.palletColors.find(n=>n.variantName.toLowerCase()===e);return t?this.fill?t.colorShades.map(a=>a+"80"):t.colorShades:[]},setColors(e,t){const n={};e.forEach((a,r)=>{const s=a.name;n[s]||(n[s]=t.slice()),a.data.length>0&&(a.backgroundColor=n[s][r%n[s].length],a.borderColor=n[s][r%n[s].length]),a.borderRadius=6})},checkDashed(){this.chartOptions.borderDash=[this.borderDash[0],this.borderDash[1]]}}},MB={class:"responsive-container"};function BB(e,t,n,a,r,s){const o=i.resolveComponent("Line");return i.openBlock(),i.createElementBlock("span",null,[i.createElementVNode("div",MB,[i.createVNode(o,{data:r.localChartData,options:r.chartOptions},null,8,["data","options"])])])}const EB=ie(SB,[["render",BB],["__scopeId","data-v-5d7c29c7"]]);aa.register(...Jr);const OB={name:"CdsPieChart",components:{Pie:bS},props:{data:{type:Object,required:!0,default:()=>({datasets:[{label:"",data:[]}]})},variant:{type:String,required:!0,default:"green",validator:e=>["green","teal","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},labels:{type:Array,required:!0,default:()=>[]},colors:{type:Array,default:()=>[],validator:e=>{const t=["green","teal","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"];return e.every(n=>t.includes(n))}}},data(){return{sassColorVariables:ai,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{responsive:!0,maintainAspectRatio:!1,pieceLabel:{mode:"percentage",precision:1},plugins:{tooltip:{callbacks:{beforeTitle:function(e){return`${e[0].dataset.name}`}}},legend:{display:!0,labels:{usePointStyle:!0,pointStyle:"rectRounded"}}}}}},computed:{isColorsSet(){return this.colors&&this.colors.length>0},computedBackgroundColors(){return this.colors.map(e=>{const t=this.palletColors.find(n=>n.variantName.toLowerCase().includes(e));if(t)return t.color400})}},watch:{labels:{handler(e){this.localLabels=e},immediate:!0},variant:{handler(e){e==="gray"||e==="dark"?this.deleteFirstTwoColors=!0:this.deleteFirstTwoColors=!1},immediate:!0},data:{handler(e){this.mergeChartDataNoSelect(e)},immediate:!0}},methods:{paleteBuilder:sa,palete(){this.palletColors=this.paleteBuilder(this.sassColorVariables.palete),this.removeFirstTwoElements()},removeFirstTwoElements(){for(let e=0;e<this.palletColors.length;e++){const t=this.palletColors[e];this.deleteFirstTwoColors===!1&&(t.colorShades.splice(0,2),t.colorTokens.splice(0,2),t.colorData.splice(0,2))}},addDataSetNames(){this.data.forEach(e=>{e.datasets.forEach(t=>{t.name=e.name})})},mergeChartDataNoSelect(e){const t={labels:this.localLabels,datasets:[]};this.addDataSetNames(),e.forEach(a=>{a.datasets.forEach(r=>{const s={label:r.label,data:r.data,name:r.name,borderRadius:6};t.datasets.push(s)})}),this.palete();const n=this.isColorsSet?this.computedBackgroundColors:this.generateBackgroundColor();this.setColors(t.datasets,n),this.localChartData=t},generateBackgroundColor(){const e=this.variant.toLowerCase(),t=this.palletColors.find(n=>n.variantName.toLowerCase().includes(e));return t?t.colorShades:[]},setColors(e,t){const n={};e.forEach(a=>{const r=a.name;n[r]||(n[r]=t.slice()),a.backgroundColor=n[r].splice(0,a.data.length),a.borderRadius=6})}}},DB={class:"responsive-container"};function VB(e,t,n,a,r,s){const o=i.resolveComponent("Pie");return i.openBlock(),i.createElementBlock("span",null,[i.createElementVNode("div",DB,[i.createVNode(o,{data:r.localChartData,options:r.chartOptions},null,8,["data","options"])])])}const $B=ie(OB,[["render",VB],["__scopeId","data-v-c20c6cdd"]]);aa.register(...Jr);const TB={name:"CdsPolarAreaChart",components:{PolarArea:vS},props:{data:{type:Object,required:!0,default:()=>({datasets:[{label:"",data:[]}]})},variant:{type:String,required:!0,default:"green",validator:e=>["green","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},labels:{type:Array,required:!0,default:()=>[]},isVisiblePointNames:{type:Boolean,default:!1}},data(){return{sassColorVariables:ai,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{responsive:!0,scales:{r:{pointLabels:{display:this.isVisiblePointNames,centerPointLabels:!0,font:{size:12}}}},maintainAspectRatio:!1,pieceLabel:{mode:"percentage",precision:1},plugins:{tooltip:{callbacks:{beforeTitle:function(e){return`${e[0].dataset.name}`}}},legend:{display:!0,labels:{usePointStyle:!0,pointStyle:"rectRounded"}}}}}},watch:{labels:{handler(e){this.localLabels=e},immediate:!0},variant:{handler(e){e==="gray"||e==="dark"?this.deleteFirstTwoColors=!0:this.deleteFirstTwoColors=!1},immediate:!0},data:{handler(e){this.mergeChartDataNoSelect(e)},immediate:!0}},methods:{paleteBuilder:sa,palete(){this.palletColors=this.paleteBuilder(this.sassColorVariables.palete),this.removeFirstTwoElements()},removeFirstTwoElements(){for(let e=0;e<this.palletColors.length;e++){const t=this.palletColors[e];this.deleteFirstTwoColors===!1&&(t.colorShades.splice(0,2),t.colorTokens.splice(0,2),t.colorData.splice(0,2))}},addDataSetNames(){this.data.forEach(e=>{e.datasets.forEach(t=>{t.name=e.name})})},mergeChartDataNoSelect(e){const t={labels:this.localLabels,datasets:[]};this.addDataSetNames(),e.forEach(a=>{a.datasets.forEach(r=>{const s={label:this.showLabelName?r.name:r.label,data:r.data,name:r.name,borderRadius:6};t.datasets.push(s)})}),this.palete();const n=this.generateBackgroundColor();this.setColors(t.datasets,n),this.localChartData=t},generateBackgroundColor(){const e=this.variant.toLowerCase(),t=this.palletColors.find(n=>n.variantName.toLowerCase().includes(e));return t?t.colorShades:[]},setColors(e,t){const n={};e.forEach(a=>{const r=a.name;n[r]||(n[r]=t.slice()),a.backgroundColor=n[r].splice(0,a.data.length),a.borderRadius=6})}}},IB={class:"responsive-container"};function AB(e,t,n,a,r,s){const o=i.resolveComponent("PolarArea");return i.openBlock(),i.createElementBlock("span",null,[i.createElementVNode("div",IB,[i.createVNode(o,{data:r.localChartData,options:r.chartOptions},null,8,["data","options"])])])}const NB=ie(TB,[["render",AB],["__scopeId","data-v-3da7f9a7"]]);aa.register(...Jr);const zB={name:"CdsStackedBarChart",components:{Bar:Ug},props:{data:{type:Object,required:!0,default:()=>({datasets:[{label:"",data:[]}]})},variant:{type:String,required:!0,default:"green",validator:e=>["green","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},theme:{type:String,required:!1,default:"",validator:e=>["green","teal","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},labels:{type:Array,required:!0,default:()=>[]},barWidth:{type:Number,default:1}},data(){return{sassColorVariables:ai,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{scales:{x:{stacked:!0,grid:{color:"transparent"}},y:{stacked:!0,grid:{color:"#DFE5EC"}}},responsive:!0,maintainAspectRatio:!1,categoryPercentage:null,plugins:{tooltip:{callbacks:{beforeTitle:function(e){return`${e[0].dataset.name}`}}},legend:{display:!0,labels:{usePointStyle:!0,pointStyle:"rectRounded",padding:50}}}},plugins:[{id:"custom_legend_margin",beforeInit:function(e){const t=e.legend.fit;e.legend.fit=function(){t.call(this),this.height+=12}}}]}},watch:{labels:{handler(e){this.localLabels=e},immediate:!0},variant:{handler(e){e==="gray"||e==="dark"?this.deleteFirstTwoColors=!0:this.deleteFirstTwoColors=!1},immediate:!0},data:{handler(e){this.mergeChartDataNoSelect(e)},immediate:!0},barWidth:{handler(e){e>=.1&&e<=1?this.chartOptions.categoryPercentage=e:this.chartOptions.categoryPercentage=1},immediate:!0}},methods:{paleteBuilder:sa,palete(){this.theme.length?this.palletColors=this.paleteBuilder(this.sassColorVariables.chartThemes):(this.palletColors=this.paleteBuilder(this.sassColorVariables.palete),this.removeFirstTwoElements())},removeFirstTwoElements(){for(let e=0;e<this.palletColors.length;e++){const t=this.palletColors[e];this.deleteFirstTwoColors===!1&&(t.colorShades.splice(0,2),t.colorTokens.splice(0,2),t.colorData.splice(0,2))}},addDataSetNames(){this.data.forEach(e=>{e.datasets.forEach(t=>{t.name=e.name})})},mergeChartDataNoSelect(e){const t={labels:this.localLabels,datasets:[]};this.addDataSetNames(),e.forEach(a=>{a.datasets.forEach(r=>{const s={label:r.label,data:r.data,name:r.name,borderRadius:6};t.datasets.push(s)})}),this.palete();const n=this.generateBackgroundColor();this.setColors(t.datasets,n),this.localChartData=t},getPalete(e=this.variant){const t=e.toLowerCase(),n=this.palletColors.find(a=>a.variantName.toLowerCase().includes(t));if(n)return n.colorShades},generateBackgroundColor(){let e=this.variant.toLowerCase();this.theme.length&&(e=this.theme.toLowerCase());const t=this.palletColors.find(n=>n.variantName.toLowerCase()===e);return t?this.fill?t.colorShades.map(a=>a+"80"):t.colorShades:[]},setMultiColors(e){const t={};let n=0;this.chartOptions.plugins.legend.display=!0,e.forEach((a,r)=>{const s=a.name;let o=1;r%5===0&&(n=0),o+=n,n++,t[s]=this.getPalete(a.variant)[o],a.backgroundColor=t[s],a.borderRadius=6})},setColors(e,t){const n={};this.chartOptions.plugins.legend.display=!0,e.forEach(a=>{const r=a.name;let s;e.length===1&&(s=2,n[r]=t[s],this.chartOptions.plugins.legend.display=!1),n[r]||(s=Object.keys(n).length%t.length,n[r]=t[s]),a.backgroundColor=n[r],a.borderRadius=6})}}},LB={class:"responsive-container"};function PB(e,t,n,a,r,s){const o=i.resolveComponent("Bar");return i.openBlock(),i.createElementBlock("span",null,[i.createElementVNode("div",LB,[i.createVNode(o,{is:"bar",data:r.localChartData,options:r.chartOptions,plugins:r.plugins},null,8,["data","options","plugins"])])])}const FB=ie(zB,[["render",PB],["__scopeId","data-v-832c260b"]]),fh={name:"CdsSpacer",props:{padding:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},paddingTop:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},paddingRight:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},paddingBottom:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},paddingLeft:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},margin:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},marginTop:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},marginRight:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},marginBottom:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},marginLeft:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12}},computed:{paddingTopResolver(){let e=this.paddingTop>12?12:+this.paddingTop;return e=this.padding?this.basePropertyResolver(this.padding):e,`${e*4}px`},paddingRightResolver(){let e=this.paddingRight>12?12:+this.paddingRight;return e=this.padding?this.basePropertyResolver(this.padding):e,`${e*4}px`},paddingBottomResolver(){let e=this.paddingBottom>12?12:+this.paddingBottom;return e=this.padding?this.basePropertyResolver(this.padding):e,`${e*4}px`},paddingLeftResolver(){let e=this.paddingLeft>12?12:+this.paddingLeft;return e=this.padding?this.basePropertyResolver(this.padding):e,`${e*4}px`},marginTopResolver(){let e=this.marginTop>12?12:+this.marginTop;return e=this.margin?this.basePropertyResolver(this.margin):e,`${e*4}px`},marginRightResolver(){let e=this.marginRight>12?12:+this.marginRight;return e=this.margin?this.basePropertyResolver(this.margin):e,`${e*4}px`},marginBottomResolver(){let e=this.marginBottom>12?12:+this.marginBottom;return e=this.margin?this.basePropertyResolver(this.margin):e,`${e*4}px`},marginLeftResolver(){let e=this.marginLeft>12?12:+this.marginLeft;return e=this.margin?this.basePropertyResolver(this.margin):e,`${e*4}px`}},methods:{basePropertyResolver(e){return e>=0&&e<=12?e:e<0?0:12}}},x4=()=>{i.useCssVars(e=>({"7a081d6e":e.marginBottomResolver,"70710db6":e.marginLeftResolver,"2636554a":e.marginRightResolver,"2d33a4fa":e.marginTopResolver,"93427b50":e.paddingBottomResolver,"207941f4":e.paddingLeftResolver,"3884b34a":e.paddingRightResolver,"37fee258":e.paddingTopResolver}))},S4=fh.setup;fh.setup=S4?(e,t)=>(x4(),S4(e,t)):x4;const RB={class:"spacer"};function HB(e,t,n,a,r,s){return i.openBlock(),i.createElementBlock("div",RB,[i.renderSlot(e.$slots,"default",{},void 0,!0)])}const nu=ie(fh,[["render",HB],["__scopeId","data-v-209b589c"]]);function M4(e,t=24){let n=e/8,a=n%4;return`${n>t?t:n-a+4}px`}const ph={name:"CdsBox",components:{CdsSpacer:nu,CdsClickable:Ni},props:{elevated:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},verticalFluid:{type:Boolean,default:!1},padding:{type:[Number,String],default:4,validator:e=>e<=12},clickable:{type:Boolean,default:!1},variant:{type:String,default:"gray"},light:{type:Boolean,default:!1},overflowVisible:{type:Boolean,default:!1}},data(){return{width:0}},computed:{widthResolver(){return this.fluid?"100%":"fit-content"},heightResolver(){return this.verticalFluid?"100%":"fit-content"},borderRadiusResolver(){return this.rounder(this.width,12)},overflowResolver(){return this.overflowVisible?"visible":"hidden"},computedClass(){return this.elevated?"box--elevated":this.light?`box--${this.variant}--light`:`box--${this.variant}`}},mounted(){this.width=this.$refs["cds-box"].getBoundingClientRect().width},methods:{rounder:M4,handleClick(){this.clickable&&this.$emit("boxClick",!0)}}},B4=()=>{i.useCssVars(e=>({c346f61e:e.widthResolver,28724430:e.heightResolver,"027b7d42":e.borderRadiusResolver,"2d3309fa":e.overflowResolver}))},E4=ph.setup;ph.setup=E4?(e,t)=>(B4(),E4(e,t)):B4;function WB(e,t,n,a,r,s){const o=i.resolveComponent("CdsSpacer"),l=i.resolveComponent("CdsClickable");return i.openBlock(),i.createElementBlock("div",{ref:"cds-box",class:i.normalizeClass(s.computedClass)},[i.createVNode(l,{class:"box__container",clickable:n.clickable,fluid:n.fluid,onClick:s.handleClick},{default:i.withCtx(()=>[i.createVNode(o,{"padding-top":n.padding,"padding-right":n.padding,"padding-bottom":n.padding,"padding-left":n.padding},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["padding-top","padding-right","padding-bottom","padding-left"])]),_:3},8,["clickable","fluid","onClick"])],2)}const Zl=ie(ph,[["render",WB],["__scopeId","data-v-399209eb"]]),YB={key:0},jB={class:"bottom-sheet__header"},UB={class:"bottom-sheet__title"},qB={class:"bottom-sheet__content"},GB=ie(Object.assign({name:"CdsBottomSheet"},{__name:"BottomSheet",props:i.mergeModels({title:{type:String,default:"Onde encontrar o meu CNS"},noCloseOnBackdrop:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:i.mergeModels(["update:model-value","close"],["update:modelValue"]),setup(e,{emit:t}){const n=i.useModel(e,"modelValue"),a=e,r=t,s=i.ref(!0),o=i.ref(null);i.watch(n,(f,m)=>{f!==m&&(f||d(),h(f))});function l(f){a.noCloseOnBackdrop||o.value&&!o.value.contains(f.target)&&d()}function d(){s.value=!1,setTimeout(()=>{s.value=!0,n.value=!1,r("close",!0)},300)}function h(f){document.body.style.overflow=f?"hidden":"auto"}return(f,m)=>(i.openBlock(),i.createElementBlock("div",null,[n.value?(i.openBlock(),i.createElementBlock("div",YB,[i.createElementVNode("div",{class:i.normalizeClass(s.value?"backdrop__show":"backdrop__hide"),onClick:l},[i.createElementVNode("div",{ref_key:"bottomSheetRef",ref:o,class:i.normalizeClass(s.value?"bottom-sheet__show":"bottom-sheet__hide")},[m[0]||(m[0]=i.createElementVNode("div",{class:"bottom-sheet__header-border"},[i.createElementVNode("div",{class:"bottom-sheet__header-border-line"})],-1)),i.createElementVNode("div",jB,[i.createElementVNode("div",UB,i.toDisplayString(e.title),1),i.createElementVNode("div",{class:"bottom-sheet__close-icon",onClick:d},[i.createVNode(_e,{name:"x-outline",height:"20",width:"20",color:"#29333D"})])]),i.createElementVNode("div",qB,[i.renderSlot(f.$slots,"default",{},void 0,!0)])],2)],2)])):i.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-3ce487af"]]);var iu={exports:{}};iu.exports,function(e,t){var n=9007199254740991,a="[object Arguments]",r="[object Function]",s="[object GeneratorFunction]",o="[object Map]",l="[object Object]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",m="[object DataView]",g=/[\\^$.*+?()[\]{}|]/g,y=/^\[object .+?Constructor\]$/,v=typeof bn=="object"&&bn&&bn.Object===Object&&bn,_=typeof self=="object"&&self&&self.Object===Object&&self,k=v||_||Function("return this")(),x=t&&!t.nodeType&&t,M=x&&!0&&e&&!e.nodeType&&e,B=M&&M.exports===x;function C(he,ze){return he==null?void 0:he[ze]}function V(he){var ze=!1;if(he!=null&&typeof he.toString!="function")try{ze=!!(he+"")}catch{}return ze}function $(he,ze){return function(qe){return he(ze(qe))}}var L=Function.prototype,T=Object.prototype,R=k["__core-js_shared__"],q=function(){var he=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return he?"Symbol(src)_1."+he:""}(),ee=L.toString,F=T.hasOwnProperty,Z=T.toString,ae=RegExp("^"+ee.call(F).replace(g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=B?k.Buffer:void 0,me=T.propertyIsEnumerable,be=j?j.isBuffer:void 0,U=$(Object.keys,Object),ye=je(k,"DataView"),Y=je(k,"Map"),Q=je(k,"Promise"),ue=je(k,"Set"),ce=je(k,"WeakMap"),ve=!me.call({valueOf:1},"valueOf"),ge=Me(ye),Ve=Me(Y),tt=Me(Q),Ne=Me(ue),ct=Me(ce);function mt(he){return Z.call(he)}function dt(he){if(!Mt(he)||le(he))return!1;var ze=St(he)||V(he)?ae:y;return ze.test(Me(he))}function je(he,ze){var qe=C(he,ze);return dt(qe)?qe:void 0}var Xe=mt;(ye&&Xe(new ye(new ArrayBuffer(1)))!=m||Y&&Xe(new Y)!=o||Q&&Xe(Q.resolve())!=d||ue&&Xe(new ue)!=h||ce&&Xe(new ce)!=f)&&(Xe=function(he){var ze=Z.call(he),qe=ze==l?he.constructor:void 0,an=qe?Me(qe):void 0;if(an)switch(an){case ge:return m;case Ve:return o;case tt:return d;case Ne:return h;case ct:return f}return ze});function le(he){return!!q&&q in he}function xe(he){var ze=he&&he.constructor,qe=typeof ze=="function"&&ze.prototype||T;return he===qe}function Me(he){if(he!=null){try{return ee.call(he)}catch{}try{return he+""}catch{}}return""}function Ue(he){return gt(he)&&F.call(he,"callee")&&(!me.call(he,"callee")||Z.call(he)==a)}var ht=Array.isArray;function Rt(he){return he!=null&&Ot(he.length)&&!St(he)}function gt(he){return nn(he)&&Rt(he)}var nt=be||Dt;function It(he){if(Rt(he)&&(ht(he)||typeof he=="string"||typeof he.splice=="function"||nt(he)||Ue(he)))return!he.length;var ze=Xe(he);if(ze==o||ze==h)return!he.size;if(ve||xe(he))return!U(he).length;for(var qe in he)if(F.call(he,qe))return!1;return!0}function St(he){var ze=Mt(he)?Z.call(he):"";return ze==r||ze==s}function Ot(he){return typeof he=="number"&&he>-1&&he%1==0&&he<=n}function Mt(he){var ze=typeof he;return!!he&&(ze=="object"||ze=="function")}function nn(he){return!!he&&typeof he=="object"}function Dt(){return!1}e.exports=It}(iu,iu.exports);var KB=iu.exports;const on=O1(KB),ZB={name:"CdsBreadcrumb",components:{CdsIcon:_e,CdsSpacer:nu,CdsClickable:Ni},props:{items:{type:Array,default:()=>[],required:!0}},methods:{resolveRoute({route:e,path:t}){const n=on(e)?t:e;return n instanceof String?{path:n}:n},routerPushTo(e){return this.resolveRoute(e)?this.resolveRoute(e).path:null}}},XB={class:"breadcrumb"};function JB(e,t,n,a,r,s){const o=i.resolveComponent("CdsIcon"),l=i.resolveComponent("CdsSpacer"),d=i.resolveComponent("router-link"),h=i.resolveComponent("CdsClickable");return i.openBlock(),i.createElementBlock("nav",null,[i.createElementVNode("ul",XB,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.items,(f,m)=>(i.openBlock(),i.createElementBlock("li",{key:`${m}-${f.name}-item`,role:"presentation"},[m===0?(i.openBlock(),i.createBlock(h,{key:0,clickable:""},{default:i.withCtx(()=>[i.createVNode(d,{to:s.routerPushTo(f),class:"breadcrumb__link"},{default:i.withCtx(()=>[n.items.length<=2?(i.openBlock(),i.createBlock(o,{key:0,height:"16",width:"16",name:"arrow-left-outline"})):(i.openBlock(),i.createBlock(o,{key:1,height:"15",width:"15",name:"home-outline"})),i.createVNode(l,{"margin-left":"2"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(f.label),1)]),_:2},1024)]),_:2},1032,["to"])]),_:2},1024)):(i.openBlock(),i.createBlock(l,{key:1,class:"breadcrumb__item","margin-right":"1","margin-left":"1"},{default:i.withCtx(()=>[i.createVNode(o,{height:"16",width:"16",name:"caret-right-outline",class:"breadcrumb__separator"}),i.createVNode(d,{to:s.routerPushTo(f),class:"breadcrumb__link"},{default:i.withCtx(()=>[i.createVNode(h,{clickable:m!==n.items.length-1},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(f.label),1)]),_:2},1032,["clickable"])]),_:2},1032,["to"])]),_:2},1024))]))),128))])])}const QB=ie(ZB,[["render",JB],["__scopeId","data-v-e3e7ef85"]]),eE=["src","alt"],Xl=ie(Object.assign({name:"CdsImage"},{__name:"Image",props:{src:{type:String,required:!0},fallbackSrc:{type:String,default:"https://sysfront.nyc3.cdn.digitaloceanspaces.com/cuida/images/imagePlaceholder.png"},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:"auto"},alt:{type:String,default:"Imagem"},opacity:{type:[Number,String],default:1},dimmed:{type:Boolean,default:!1},blackAndWhite:{type:Boolean,default:!1},roundedCorners:{type:Boolean,default:!1},round:{type:Boolean,default:!1}},setup(e){i.useCssVars(h=>({"18bf7baf":s.value,"6e90c576":o.value,"295a3b44":a.value,"7d256ef4":e.opacity,"247a0c15":r.value}));const t=e,n=i.ref(t.src),a=i.computed(()=>t.round?d(t.width):t.height?d(t.height):"auto"),r=i.computed(()=>t.width?d(t.width):"auto"),s=i.computed(()=>t.round?"50%":t.roundedCorners?M4(t.width):"0px"),o=i.computed(()=>t.blackAndWhite?"grayscale(100%)":t.dimmed?"grayscale(35%)":"grayscale(0%)");i.watch(()=>t.src,h=>{n.value=h});function l(){n.value=t.fallbackSrc}function d(h){return Number.isNaN(Number(h))?h:`${h}px`}return(h,f)=>(i.openBlock(),i.createElementBlock("img",i.mergeProps(h.$attrs,{src:n.value,alt:e.alt,class:"cds-image",onError:l}),null,16,eE))}}),[["__scopeId","data-v-442e5dfe"]]),tE={class:"card__extra-container"},nE={class:"card__extra"},iE={key:0},aE={key:1,class:"card__image"},rE={key:2,class:"card__icon"},sE={class:"card__spacer"},oE={key:0,class:"card__header"},lE={key:1},cE={class:"card__header"},dE={key:2,class:"card__body"},uE={key:3},hE={class:"card__body"},fE={key:4,class:"card__footer"},pE=ie(Object.assign({name:"CdsCard"},{__name:"Card",props:{title:{type:String,default:""},content:{type:String,default:""},imageSrc:{type:String,default:""},imageAlt:{type:String,default:"imagem do card"},imageWidth:{type:[String,Number],default:300},imageHeight:{type:[String,Number],default:180},bodyWidth:{type:[String,Number],default:300},horizontal:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1}},emits:["cardClick"],setup(e,{emit:t}){i.useCssVars(d=>({"2f77ab4b":s.value,"0a0863a3":r.value}));const n=e,a=t,r=i.computed(()=>n.fluid?"100%":n.horizontal?"fit-content":`${n.imageWidth}px`),s=i.computed(()=>`${n.bodyWidth}px`),o=i.computed(()=>n.fluid&&!n.horizontal?"100%":n.imageWidth);function l(){n.clickable&&a("cardClick",!0)}return(d,h)=>(i.openBlock(),i.createBlock(Zl,{padding:"0",clickable:e.clickable,fluid:e.fluid,onBoxClick:l},{default:i.withCtx(()=>[i.createElementVNode("div",tE,[i.createElementVNode("div",nE,[i.renderSlot(d.$slots,"extra",{},void 0,!0)])]),i.createElementVNode("div",{class:i.normalizeClass({"card--horizontal":e.horizontal})},[i.unref(ei)(d.$slots,"image")?(i.openBlock(),i.createElementBlock("div",iE,[i.renderSlot(d.$slots,"image",{},void 0,!0)])):e.imageSrc?(i.openBlock(),i.createElementBlock("div",aE,[i.createVNode(Xl,{src:e.imageSrc,width:o.value,height:e.imageHeight,alt:e.imageAlt},null,8,["src","width","height","alt"])])):i.unref(ei)(d.$slots,"icon")?(i.openBlock(),i.createElementBlock("div",rE,[i.renderSlot(d.$slots,"icon",{},void 0,!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",sE,[i.unref(ei)(d.$slots,"header")?(i.openBlock(),i.createElementBlock("div",oE,[i.renderSlot(d.$slots,"header",{},void 0,!0)])):(i.openBlock(),i.createElementBlock("div",lE,[i.createElementVNode("p",cE,i.toDisplayString(e.title),1)])),i.unref(ei)(d.$slots,"body")?(i.openBlock(),i.createElementBlock("div",dE,[i.renderSlot(d.$slots,"body",{},void 0,!0)])):(i.openBlock(),i.createElementBlock("div",uE,[i.createElementVNode("p",hE,i.toDisplayString(e.content),1)])),i.unref(ei)(d.$slots,"footer")?(i.openBlock(),i.createElementBlock("div",fE,[i.renderSlot(d.$slots,"footer",{},void 0,!0)])):i.createCommentVNode("",!0)])],2)]),_:3},8,["clickable","fluid"]))}}),[["__scopeId","data-v-44d16200"]]),mE={name:"CdsCalloutCard",components:{CdsButton:fn},props:{title:{type:String,default:"Título do AlertCard",required:!0},text:{type:String,default:"Subtítulo do AlertCard"},image:{type:String,default:"",required:!0},imageDescription:{type:String,default:"Imagem de CalloutCard"},actionButtonVariant:{type:String,default:"green"},actionButtonText:{type:String,default:"Ok"},actionButtonSecondary:{type:Boolean,default:!1},actionButtonDisabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},methods:{resolveClass(e){return this.compact?`${e}--compact`:e}}},gE={id:"callout-card"},yE={class:"image__container"},bE=["src","alt"],vE={class:"content__title"},_E={class:"content__text"};function wE(e,t,n,a,r,s){const o=i.resolveComponent("CdsButton");return i.openBlock(),i.createElementBlock("span",gE,[i.createElementVNode("div",{class:i.normalizeClass(s.resolveClass("callout-card__container"))},[i.createElementVNode("div",yE,[i.createElementVNode("img",{class:i.normalizeClass(s.resolveClass("image__content")),src:n.image,alt:n.imageDescription},null,10,bE)]),i.createElementVNode("div",{class:i.normalizeClass(s.resolveClass("content__container"))},[i.createElementVNode("div",{class:i.normalizeClass(s.resolveClass("content"))},[i.createElementVNode("p",vE,i.toDisplayString(n.title),1),i.createElementVNode("span",_E,[i.renderSlot(e.$slots,"text",{},()=>[i.createTextVNode(i.toDisplayString(n.text),1)])])],2),i.createElementVNode("div",null,[i.renderSlot(e.$slots,"action",{},()=>[i.createVNode(o,{id:"content-button",variant:n.actionButtonVariant,text:n.actionButtonText,secondary:n.actionButtonSecondary,disabled:n.actionButtonDisabled,onClick:t[0]||(t[0]=l=>e.$emit("action-button-click",!0))},null,8,["variant","text","secondary","disabled"])])])],2)],2)])}const kE=ie(mE,[["render",wE]]);var O4={exports:{}};(function(e){e.exports=function(t){var n={};function a(r){if(n[r])return n[r].exports;var s=n[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=t,a.c=n,a.d=function(r,s,o){a.o(r,s)||Object.defineProperty(r,s,{enumerable:!0,get:o})},a.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},a.t=function(r,s){if(s&1&&(r=a(r)),s&8||s&4&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),s&2&&typeof r!="string")for(var l in r)a.d(o,l,(function(d){return r[d]}).bind(null,l));return o},a.n=function(r){var s=r&&r.__esModule?function(){return r.default}:function(){return r};return a.d(s,"a",s),s},a.o=function(r,s){return Object.prototype.hasOwnProperty.call(r,s)},a.p="",a(a.s="fae3")}({"01f9":function(t,n,a){var r=a("2d00"),s=a("5ca1"),o=a("2aba"),l=a("32e9"),d=a("84f2"),h=a("41a0"),f=a("7f20"),m=a("38fd"),g=a("2b4c")("iterator"),y=!([].keys&&"next"in[].keys()),v="@@iterator",_="keys",k="values",x=function(){return this};t.exports=function(M,B,C,V,$,L,T){h(C,B,V);var R=function(Q){if(!y&&Q in Z)return Z[Q];switch(Q){case _:return function(){return new C(this,Q)};case k:return function(){return new C(this,Q)}}return function(){return new C(this,Q)}},q=B+" Iterator",ee=$==k,F=!1,Z=M.prototype,ae=Z[g]||Z[v]||$&&Z[$],j=ae||R($),me=$?ee?R("entries"):j:void 0,be=B=="Array"&&Z.entries||ae,U,ye,Y;if(be&&(Y=m(be.call(new M)),Y!==Object.prototype&&Y.next&&(f(Y,q,!0),!r&&typeof Y[g]!="function"&&l(Y,g,x))),ee&&ae&&ae.name!==k&&(F=!0,j=function(){return ae.call(this)}),(!r||T)&&(y||F||!Z[g])&&l(Z,g,j),d[B]=j,d[q]=x,$)if(U={values:ee?j:R(k),keys:L?j:R(_),entries:me},T)for(ye in U)ye in Z||o(Z,ye,U[ye]);else s(s.P+s.F*(y||F),B,U);return U}},"0d58":function(t,n,a){var r=a("ce10"),s=a("e11e");t.exports=Object.keys||function(l){return r(l,s)}},1495:function(t,n,a){var r=a("86cc"),s=a("cb7c"),o=a("0d58");t.exports=a("9e1e")?Object.defineProperties:function(d,h){s(d);for(var f=o(h),m=f.length,g=0,y;m>g;)r.f(d,y=f[g++],h[y]);return d}},"230e":function(t,n,a){var r=a("d3f4"),s=a("7726").document,o=r(s)&&r(s.createElement);t.exports=function(l){return o?s.createElement(l):{}}},"2aba":function(t,n,a){var r=a("7726"),s=a("32e9"),o=a("69a8"),l=a("ca5a")("src"),d=a("fa5b"),h="toString",f=(""+d).split(h);a("8378").inspectSource=function(m){return d.call(m)},(t.exports=function(m,g,y,v){var _=typeof y=="function";_&&(o(y,"name")||s(y,"name",g)),m[g]!==y&&(_&&(o(y,l)||s(y,l,m[g]?""+m[g]:f.join(String(g)))),m===r?m[g]=y:v?m[g]?m[g]=y:s(m,g,y):(delete m[g],s(m,g,y)))})(Function.prototype,h,function(){return typeof this=="function"&&this[l]||d.call(this)})},"2aeb":function(t,n,a){var r=a("cb7c"),s=a("1495"),o=a("e11e"),l=a("613b")("IE_PROTO"),d=function(){},h="prototype",f=function(){var m=a("230e")("iframe"),g=o.length,y="<",v=">",_;for(m.style.display="none",a("fab2").appendChild(m),m.src="javascript:",_=m.contentWindow.document,_.open(),_.write(y+"script"+v+"document.F=Object"+y+"/script"+v),_.close(),f=_.F;g--;)delete f[h][o[g]];return f()};t.exports=Object.create||function(g,y){var v;return g!==null?(d[h]=r(g),v=new d,d[h]=null,v[l]=g):v=f(),y===void 0?v:s(v,y)}},"2b4c":function(t,n,a){var r=a("5537")("wks"),s=a("ca5a"),o=a("7726").Symbol,l=typeof o=="function",d=t.exports=function(h){return r[h]||(r[h]=l&&o[h]||(l?o:s)("Symbol."+h))};d.store=r},"2d00":function(t,n){t.exports=!1},"2d95":function(t,n){var a={}.toString;t.exports=function(r){return a.call(r).slice(8,-1)}},"32e9":function(t,n,a){var r=a("86cc"),s=a("4630");t.exports=a("9e1e")?function(o,l,d){return r.f(o,l,s(1,d))}:function(o,l,d){return o[l]=d,o}},"38fd":function(t,n,a){var r=a("69a8"),s=a("4bf8"),o=a("613b")("IE_PROTO"),l=Object.prototype;t.exports=Object.getPrototypeOf||function(d){return d=s(d),r(d,o)?d[o]:typeof d.constructor=="function"&&d instanceof d.constructor?d.constructor.prototype:d instanceof Object?l:null}},"41a0":function(t,n,a){var r=a("2aeb"),s=a("4630"),o=a("7f20"),l={};a("32e9")(l,a("2b4c")("iterator"),function(){return this}),t.exports=function(d,h,f){d.prototype=r(l,{next:s(1,f)}),o(d,h+" Iterator")}},4588:function(t,n){var a=Math.ceil,r=Math.floor;t.exports=function(s){return isNaN(s=+s)?0:(s>0?r:a)(s)}},4630:function(t,n){t.exports=function(a,r){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:r}}},"4bf8":function(t,n,a){var r=a("be13");t.exports=function(s){return Object(r(s))}},5537:function(t,n,a){var r=a("8378"),s=a("7726"),o="__core-js_shared__",l=s[o]||(s[o]={});(t.exports=function(d,h){return l[d]||(l[d]=h!==void 0?h:{})})("versions",[]).push({version:r.version,mode:a("2d00")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(t,n,a){var r=a("7726"),s=a("8378"),o=a("32e9"),l=a("2aba"),d=a("9b43"),h="prototype",f=function(m,g,y){var v=m&f.F,_=m&f.G,k=m&f.S,x=m&f.P,M=m&f.B,B=_?r:k?r[g]||(r[g]={}):(r[g]||{})[h],C=_?s:s[g]||(s[g]={}),V=C[h]||(C[h]={}),$,L,T,R;_&&(y=g);for($ in y)L=!v&&B&&B[$]!==void 0,T=(L?B:y)[$],R=M&&L?d(T,r):x&&typeof T=="function"?d(Function.call,T):T,B&&l(B,$,T,m&f.U),C[$]!=T&&o(C,$,R),x&&V[$]!=T&&(V[$]=T)};r.core=s,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},"613b":function(t,n,a){var r=a("5537")("keys"),s=a("ca5a");t.exports=function(o){return r[o]||(r[o]=s(o))}},"626a":function(t,n,a){var r=a("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return r(s)=="String"?s.split(""):Object(s)}},6821:function(t,n,a){var r=a("626a"),s=a("be13");t.exports=function(o){return r(s(o))}},"69a8":function(t,n){var a={}.hasOwnProperty;t.exports=function(r,s){return a.call(r,s)}},"6a99":function(t,n,a){var r=a("d3f4");t.exports=function(s,o){if(!r(s))return s;var l,d;if(o&&typeof(l=s.toString)=="function"&&!r(d=l.call(s))||typeof(l=s.valueOf)=="function"&&!r(d=l.call(s))||!o&&typeof(l=s.toString)=="function"&&!r(d=l.call(s)))return d;throw TypeError("Can't convert object to primitive value")}},7726:function(t,n){var a=t.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=a)},"77f1":function(t,n,a){var r=a("4588"),s=Math.max,o=Math.min;t.exports=function(l,d){return l=r(l),l<0?s(l+d,0):o(l,d)}},"79e5":function(t,n){t.exports=function(a){try{return!!a()}catch{return!0}}},"7f20":function(t,n,a){var r=a("86cc").f,s=a("69a8"),o=a("2b4c")("toStringTag");t.exports=function(l,d,h){l&&!s(l=h?l:l.prototype,o)&&r(l,o,{configurable:!0,value:d})}},"7f7f":function(t,n,a){var r=a("86cc").f,s=Function.prototype,o=/^\s*function ([^ (]*)/,l="name";l in s||a("9e1e")&&r(s,l,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch{return""}}})},8378:function(t,n){var a=t.exports={version:"2.6.12"};typeof __e=="number"&&(__e=a)},"84f2":function(t,n){t.exports={}},"86cc":function(t,n,a){var r=a("cb7c"),s=a("c69a"),o=a("6a99"),l=Object.defineProperty;n.f=a("9e1e")?Object.defineProperty:function(h,f,m){if(r(h),f=o(f,!0),r(m),s)try{return l(h,f,m)}catch{}if("get"in m||"set"in m)throw TypeError("Accessors not supported!");return"value"in m&&(h[f]=m.value),h}},"9b43":function(t,n,a){var r=a("d8e8");t.exports=function(s,o,l){if(r(s),o===void 0)return s;switch(l){case 1:return function(d){return s.call(o,d)};case 2:return function(d,h){return s.call(o,d,h)};case 3:return function(d,h,f){return s.call(o,d,h,f)}}return function(){return s.apply(o,arguments)}}},"9c6c":function(t,n,a){var r=a("2b4c")("unscopables"),s=Array.prototype;s[r]==null&&a("32e9")(s,r,{}),t.exports=function(o){s[r][o]=!0}},"9def":function(t,n,a){var r=a("4588"),s=Math.min;t.exports=function(o){return o>0?s(r(o),9007199254740991):0}},"9e1e":function(t,n,a){t.exports=!a("79e5")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},ac6a:function(t,n,a){for(var r=a("cadf"),s=a("0d58"),o=a("2aba"),l=a("7726"),d=a("32e9"),h=a("84f2"),f=a("2b4c"),m=f("iterator"),g=f("toStringTag"),y=h.Array,v={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},_=s(v),k=0;k<_.length;k++){var x=_[k],M=v[x],B=l[x],C=B&&B.prototype,V;if(C&&(C[m]||d(C,m,y),C[g]||d(C,g,x),h[x]=y,M))for(V in r)C[V]||o(C,V,r[V],!0)}},be13:function(t,n){t.exports=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a}},c366:function(t,n,a){var r=a("6821"),s=a("9def"),o=a("77f1");t.exports=function(l){return function(d,h,f){var m=r(d),g=s(m.length),y=o(f,g),v;if(l&&h!=h){for(;g>y;)if(v=m[y++],v!=v)return!0}else for(;g>y;y++)if((l||y in m)&&m[y]===h)return l||y||0;return!l&&-1}}},c69a:function(t,n,a){t.exports=!a("9e1e")&&!a("79e5")(function(){return Object.defineProperty(a("230e")("div"),"a",{get:function(){return 7}}).a!=7})},ca5a:function(t,n){var a=0,r=Math.random();t.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++a+r).toString(36))}},cadf:function(t,n,a){var r=a("9c6c"),s=a("d53b"),o=a("84f2"),l=a("6821");t.exports=a("01f9")(Array,"Array",function(d,h){this._t=l(d),this._i=0,this._k=h},function(){var d=this._t,h=this._k,f=this._i++;return!d||f>=d.length?(this._t=void 0,s(1)):h=="keys"?s(0,f):h=="values"?s(0,d[f]):s(0,[f,d[f]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,n,a){var r=a("d3f4");t.exports=function(s){if(!r(s))throw TypeError(s+" is not an object!");return s}},ce10:function(t,n,a){var r=a("69a8"),s=a("6821"),o=a("c366")(!1),l=a("613b")("IE_PROTO");t.exports=function(d,h){var f=s(d),m=0,g=[],y;for(y in f)y!=l&&r(f,y)&&g.push(y);for(;h.length>m;)r(f,y=h[m++])&&(~o(g,y)||g.push(y));return g}},d3f4:function(t,n){t.exports=function(a){return typeof a=="object"?a!==null:typeof a=="function"}},d53b:function(t,n){t.exports=function(a,r){return{value:r,done:!!a}}},d8e8:function(t,n){t.exports=function(a){if(typeof a!="function")throw TypeError(a+" is not a function!");return a}},e11e:function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f6fd:function(t,n){(function(a){var r="currentScript",s=a.getElementsByTagName("script");r in a||Object.defineProperty(a,r,{get:function(){try{throw new Error}catch(d){var o,l=(/.*at [^\(]*\((.*):.+:.+\)$/ig.exec(d.stack)||[!1])[1];for(o in s)if(s[o].src==l||s[o].readyState=="interactive")return s[o];return null}}})})(document)},fa5b:function(t,n,a){t.exports=a("5537")("native-function-to-string",Function.toString)},fab2:function(t,n,a){var r=a("7726").document;t.exports=r&&r.documentElement},fae3:function(t,n,a){if(a.r(n),a.d(n,"longClickDirective",function(){return o}),typeof window<"u"){a("f6fd");var r;(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(a.p=r[1])}a("ac6a"),a("7f7f");var s=function(l){var d=l.delay,h=d===void 0?400:d,f=l.interval,m=f===void 0?50:f;return{beforeMount:function(y,v,_,k){if(typeof v.value!="function"){var x=_.context.name,M="[longclick:] provided expression '".concat(v.expression,"' is not a function, but has to be");x&&(M+="Found in component '".concat(x,"' ")),console.warn(M)}var B=null,C=null,V=function(R){v.value(R)},$=function(R){R.type==="click"&&R.button!==0||B===null&&(B=setTimeout(function(){m&&m>0&&(C=setInterval(function(){V(R)},m)),V(R)},h))},L=function(){B!==null&&(clearTimeout(B),B=null),C&&(clearInterval(C),C=null)};["mousedown","touchstart"].forEach(function(T){y.addEventListener(T,$,{passive:!0})}),["click","mouseout","touchend","touchcancel"].forEach(function(T){y.addEventListener(T,L,{passive:!0})})},created:function(){},mounted:function(){},beforeUpdate:function(){},updated:function(){},beforeUnmount:function(){},unmounted:function(){}}},o=s}})})(O4);var mh=O4.exports;const is=e=>{if(typeof window>"u")switch(e){case"smartphone":case"tablet":return!1;case"hd-screen":return!0;case"fhd-screen":case"uhd-screen":return!1;default:throw new Error(`Valor inválido: '${e}'. Os valores aceitos são: 'smartphone', 'tablet', 'hd-screen', 'fhd-screen', 'uhd-screen'.`)}switch(e){case"smartphone":return window.outerWidth<500&&window.outerWidth<window.outerHeight;case"tablet":return window.outerWidth>=500&&window.outerWidth<900&&window.outerWidth<window.outerHeight;case"hd-screen":return window.outerWidth>=900&&window.outerWidth<1600&&window.outerWidth>window.outerHeight;case"fhd-screen":return window.outerWidth>=1600&&window.outerWidth<2e3&&window.outerWidth>window.outerHeight;case"uhd-screen":return window.outerWidth>=2e3&&window.outerWidth>window.outerHeight;default:throw new Error(`Valor inválido: '${e}'. Os valores aceitos são: 'smartphone', 'tablet', 'hd-screen', 'fhd-screen', 'uhd-screen'.`)}};function au(){return{isMobile:i.computed(()=>is("smartphone")||is("tablet"))}}const CE={class:"carousel-container"},xE=["onClick"],SE=ie(Object.assign({name:"CdsCarousel"},{__name:"Carousel",props:{items:{type:Array,default:()=>[]},snapTo:{type:String,default:"start",validator:e=>["start","center","end"].includes(e)},gap:{type:Number,default:0},showArrows:{type:Boolean,default:!1},darkArrows:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1}},emits:["item-click"],setup(e,{emit:t}){i.useCssVars(M=>({ae95ac62:m.value,"6df5b3f1":f.value}));const n=e,a=t,{isMobile:r}=au(),s=mh.longClickDirective({delay:1e3,interval:100}),o=i.ref(null);let l=!1,d,h;const f=i.computed(()=>n.snapTo),m=i.computed(()=>`${n.gap*4}px`);function g(M){r.value||(l=!0,d=(M.pageX||M.touches[0].pageX)-o.value.offsetLeft,h=o.value.scrollLeft,M.preventDefault(),o.value.style.scrollSnapType="none")}function y(M){if(!l)return;const C=((M.pageX||M.touches[0].pageX)-o.value.offsetLeft-d)*1.5;o.value.scrollLeft=h-C}function v(){l=!1,o.value.style.scrollSnapType="x mandatory",o.value.style.scrollBehavior="smooth",setTimeout(()=>{o.value.style.scrollBehavior="auto"},300)}function _(){const M=o.value,B=M.querySelector(".carousel__item").offsetWidth+n.gap*4;M.scrollBy({left:B,behavior:"smooth"})}function k(){const M=o.value,B=M.querySelector(".carousel__item").offsetWidth+n.gap*4;M.scrollBy({left:-B,behavior:"smooth"})}function x(M){n.clickable&&a("item-click",M)}return(M,B)=>(i.openBlock(),i.createElementBlock("div",CE,[e.showArrows?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["carousel__arrow carousel__arrow--left",{"carousel__arrow--dark":e.darkArrows}]),onClick:k},[i.createVNode(_e,{name:"arrow-left-outline",width:"20",height:"20"})],2)):i.createCommentVNode("",!0),i.withDirectives((i.openBlock(),i.createElementBlock("div",{ref_key:"carousel",ref:o,class:"carousel",onMousedown:g,onMousemove:y,onMouseup:v,onMouseleave:v,onTouchmove:y,onTouchend:v},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.items,(C,V)=>(i.openBlock(),i.createElementBlock("div",{key:C,class:"carousel__item",onClick:$=>x(C)},[i.renderSlot(M.$slots,"default",{item:C,index:V},void 0,!0)],8,xE))),128))],32)),[[i.unref(s),g]]),e.showArrows?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["carousel__arrow carousel__arrow--right",{"carousel__arrow--dark":e.darkArrows}]),onClick:_},[i.createVNode(_e,{name:"arrow-right-outline",width:"20",height:"20"})],2)):i.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5167f04f"]]),ME={name:"CdsCarouselController",props:{propertyName:{type:String,required:!0},perPage:{type:Number,required:!0},total:{type:Number,required:!0},simple:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1}},data(){return{currentNumberOfItemsMin:1,currentNumberOfItemsMax:this.perPage}},computed:{numberOfPages(){return Math.ceil(this.total/this.perPage)},disabledForward(){return this.currentNumberOfItemsMax>=this.total||this.simple&&this.currentNumberOfItemsMin>=this.numberOfPages},disabledBack(){return this.currentNumberOfItemsMin===1}},methods:{handleClickBack(){if(!this.disabledBack){if(this.simple&&this.currentNumberOfItemsMin>1){this.currentNumberOfItemsMin-=1,this.$emit("click-back",{min:this.currentNumberOfItemsMin-1,max:this.currentNumberOfItemsMax+1});return}else if(this.simple&&this.currentNumberOfItemsMin===1)return;this.currentNumberOfItemsMin-this.perPage<=0?(this.currentNumberOfItemsMin=1,this.currentNumberOfItemsMax=this.perPage,this.$emit("click-back",{min:this.currentNumberOfItemsMin-1,max:this.currentNumberOfItemsMax+1})):(this.currentNumberOfItemsMax-=this.currentNumberOfItemsMax-this.currentNumberOfItemsMin+1,this.currentNumberOfItemsMin-=this.perPage,this.$emit("click-back",{min:this.currentNumberOfItemsMin-1,max:this.currentNumberOfItemsMax}))}},handleClickForward(){if(!this.disabledForward){if(this.simple&&this.currentNumberOfItemsMin<this.numberOfPages){this.currentNumberOfItemsMin+=1,this.$emit("click-forward",{min:this.currentNumberOfItemsMin-1,max:this.currentNumberOfItemsMax+1});return}else if(this.simple&&this.currentNumberOfItemsMin===this.numberOfPages)return;this.currentNumberOfItemsMax+this.perPage>this.total?(this.currentNumberOfItemsMin=this.currentNumberOfItemsMax+1,this.currentNumberOfItemsMax=this.total,this.$emit("click-forward",{min:this.currentNumberOfItemsMin-1,max:this.currentNumberOfItemsMax+1})):(this.currentNumberOfItemsMin=this.currentNumberOfItemsMax+1,this.currentNumberOfItemsMax+=this.perPage,this.$emit("click-forward",{min:this.currentNumberOfItemsMin-1,max:this.currentNumberOfItemsMax+1}))}}}},BE={key:0,class:"carousel-controller__text"},EE={key:1,class:"carousel-controller__text"},OE={class:"carousel-controller__property"};function DE(e,t,n,a,r,s){return i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",{class:i.normalizeClass(["carousel-controller",{"carousel-controller--fluid":n.fluid}])},[i.createElementVNode("span",{class:i.normalizeClass({"carousel-controller__previous-button--disabled":s.disabledBack,"carousel-controller__previous-button":!s.disabledBack}),onClick:t[0]||(t[0]=(...o)=>s.handleClickBack&&s.handleClickBack(...o))},null,2),i.createElementVNode("div",null,[n.simple?(i.openBlock(),i.createElementBlock("span",EE,i.toDisplayString(r.currentNumberOfItemsMin)+" de "+i.toDisplayString(s.numberOfPages),1)):(i.openBlock(),i.createElementBlock("span",BE,i.toDisplayString(r.currentNumberOfItemsMin)+"-"+i.toDisplayString(r.currentNumberOfItemsMax)+" de "+i.toDisplayString(n.total),1)),i.createElementVNode("span",OE,i.toDisplayString(n.propertyName),1)]),i.createElementVNode("span",{class:i.normalizeClass({"carousel-controller__next-button--disabled":s.disabledForward,"carousel-controller__next-button":!s.disabledForward}),onClick:t[1]||(t[1]=(...o)=>s.handleClickForward&&s.handleClickForward(...o))},null,2)],2)])}const VE=ie(ME,[["render",DE],["__scopeId","data-v-9de64062"]]);function gh(e,t){return`${e}--${t}`}const $E={name:"CdsCheckbox",props:{modelValue:{type:Boolean,default:!1,required:!0},label:{type:String,default:"checkbox content"},variant:{type:String,default:"green"},indeterminate:{type:Boolean,default:!1},prominent:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data(){return{isChecked:this.modelValue,isIndeterminate:this.indeterminate}},computed:{resolveCheckboxClass(){const e=this.disabled?"cds-checkbox__input--disabled":"",t=gh("cds-checkbox__input",this.variant);let n=this.isChecked?"cds-checkbox__input--checked":"cds-checkbox__input--unchecked";return n=this.isIndeterminate?"cds-checkbox__input--indeterminate":n,`${t} ${n} ${e}`}},watch:{modelValue:{handler(e,t){e!==t&&(this.isChecked=this.modelValue)},immediate:!0},indeterminate:{handler(e,t){e!==t&&(this.isIndeterminate=this.indeterminate)},immediate:!0}},methods:{toggleValue(){this.disabled||(this.isChecked=this.isIndeterminate?!1:!this.isChecked,this.isIndeterminate=!1,this.$emit("update:modelValue",this.isChecked),this.$emit("update:indeterminate",!1))}}},TE={class:"cds-checkbox__container"},IE={class:"cds-checkbox__input"},AE=["id","value","name","disabled"],NE=["for"],zE=["for"];function LE(e,t,n,a,r,s){return i.openBlock(),i.createElementBlock("div",TE,[i.createElementVNode("div",IE,[i.createElementVNode("input",{id:e.$attrs.id||"cds-checkbox-option-input",value:n.modelValue,type:"checkbox",name:e.$attrs.name||"cds-checkbox-option",disabled:n.disabled},null,8,AE),i.createElementVNode("label",{for:e.$attrs.id||"cds-checkbox-option-input",class:i.normalizeClass(s.resolveCheckboxClass),onClick:t[0]||(t[0]=(...o)=>s.toggleValue&&s.toggleValue(...o))},null,10,NE)]),i.createElementVNode("label",{class:i.normalizeClass(["cds-checkbox__label",{"cds-checkbox__label--disabled":n.disabled,"cds-checkbox__label--prominent":n.prominent&&n.modelValue}]),for:e.$attrs.id||"cds-checkbox-option-input",onClick:t[1]||(t[1]=(...o)=>s.toggleValue&&s.toggleValue(...o))},i.toDisplayString(n.label),11,zE)])}const Qs=ie($E,[["render",LE],["__scopeId","data-v-3b24b6ce"]]),ru=[{name:"turquoise",hex:"#3CACDD",lighterHex:"#C2EDFF",lightestHex:"#f5fbff"},{name:"teal",hex:"#3CACDD",lighterHex:"#C2EDFF",lightestHex:"#eefcfa"},{name:"green",hex:"#2AC092",lighterHex:"#ABEDD9",lightestHex:"#f3fcf8"},{name:"blue",hex:"#377EE1",lighterHex:"#B6D1F7",lightestHex:"#f6f9fe"},{name:"indigo",hex:"#6174D1",lighterHex:"#CED6FD",lightestHex:"#f5f6ff"},{name:"violet",hex:"#A169D3",lighterHex:"#E6D2F9",lightestHex:"#faf5ff"},{name:"pink",hex:"#DD5A9C",lighterHex:"#F9C8E2",lightestHex:"#fff5fb"},{name:"red",hex:"#F95367",lighterHex:"#FBD0D6",lightestHex:"#fef6f7"},{name:"orange",hex:"#FF8567",lighterHex:"#FFD6CC",lightestHex:"#fef7f6"},{name:"amber",hex:"#FFB952",lighterHex:"#FFE2B8",lightestHex:"#fefbf6"},{name:"gray",hex:"#9AA8B6",lighterHex:"#ABB8C4",lightestHex:"#D6DCE3"},{name:"dark",hex:"#3B4754",lighterHex:"#647382",lightestHex:"#99A6B2"},{name:"white",hex:"#FFFFFF",lighterHex:"#FAFCFE",lightestHex:"#F4F8FB"}],Ba=ru.map(e=>e.name),Jl=e=>{const t=ru.filter(n=>n.name===e)[0];return t?t.hex:""},PE=e=>{const t=ru.filter(n=>n.name===e)[0];return t?t.lightestHex:""},D4=e=>Ba.includes(e),FE={class:"checkbox__container"},RE={class:"checkbox__label"},HE={key:0,class:"checkbox__required"},WE=["onClick"],YE={key:0,class:"checkbox__error-message"},jE=ie(Object.assign({name:"CdsCheckboxGroup"},{__name:"CheckboxGroup",props:{modelValue:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},label:{type:String,default:"Label"},required:{type:Boolean,default:!1},variant:{type:String,default:"green",validator:D4},disabled:{type:Boolean,default:!1},state:{type:String,default:"default"},errorMessage:{type:String,default:"Valor inválido"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=i.ref([]),s=i.ref(0),o=i.computed(()=>n.state==="invalid");i.watch(r,()=>s.value+=1),i.onMounted(()=>{r.value=n.modelValue});function l(h){if(n.disabled)return"checkbox__item--disabled";const f=o.value?"checkbox__item--error":gh("checkbox__item",n.variant);return r.value.includes(h)?`checkbox__item--selected ${f}`:`checkbox__item ${o.value?f:""}`}function d(h){if(!n.disabled){if(r.value.includes(h)){r.value=r.value.filter(f=>f!==h),a("update:modelValue",r.value);return}r.value.push(h),a("update:modelValue",r.value)}}return(h,f)=>(i.openBlock(),i.createElementBlock("div",FE,[i.createElementVNode("label",RE,[i.createTextVNode(i.toDisplayString(e.label)+" ",1),e.required?(i.openBlock(),i.createElementBlock("span",HE," * ")):i.createCommentVNode("",!0)]),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,m=>(i.openBlock(),i.createElementBlock("div",{key:m.value,class:i.normalizeClass(l(m.value)),onClick:g=>d(m.value)},[i.createVNode(Qs,{id:m.value,"model-value":r.value.includes(m.value),label:m.label,disabled:e.disabled,variant:e.variant},null,8,["id","model-value","label","disabled","variant"])],10,WE))),128)),o.value&&!e.disabled?(i.openBlock(),i.createElementBlock("div",YE,i.toDisplayString(e.errorMessage),1)):i.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-66e127c2"]]);function pr(e){const t=i.useSlots();return Object.keys(t).some(n=>n===e)}const UE={key:0,class:"chip__content--icon"},qE={ref:"slot-content"},GE=ie(Object.assign({name:"CdsChip"},{__name:"Chip",props:i.mergeModels({variant:{type:String,default:"gray"},size:{type:String,default:"md"},persistantActionIcon:{type:Boolean,default:!1},iconLeft:{type:Boolean,default:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){i.useCssVars(k=>({de9e7aaa:m.value.width,"6b9898e2":m.value.height,"5d97dcdc":y.value}));const t=i.useModel(e,"modelValue"),n=e,a=i.useTemplateRef("slot-content"),r=i.ref(Ba),s=i.ref(V_),o=i.ref(t.value),l=i.ref(""),d=i.ref(!0),h=i.ref("0px"),f=i.computed(()=>{let k="";return o.value||(k+=" chip--not-selected"),r.value.indexOf(n.variant)>-1&&(k+=` chip--${n.variant}`),s.value.indexOf(n.size)>-1&&(k+=` chip--${n.size}`),k}),m=i.computed(()=>{switch(n.size){case"sm":return{height:14,width:14};case"lg":return{height:20,width:20};default:return{height:18,width:18}}}),g=i.computed(()=>{if(!n.persistantActionIcon)return d.value?{paddingRight:m.value.width/2+2+"px",paddingLeft:m.value.width/2+2+"px"}:{}}),y=i.computed(()=>n.iconLeft?"row":"row-reverse");i.watch(()=>t,k=>{o.value=k.value}),i.watch(()=>o.value,k=>{k?l.value=_():l.value+=" chip--not-selected",setTimeout(()=>{d.value=!k},300),t.value=k}),i.onMounted(()=>{l.value=f.value,setTimeout(()=>{var k;h.value=(((k=a.value)==null?void 0:k.offsetWidth)||0)+4+m.value.width+"px"},100)});function v(){o.value=!o.value}function _(){let k=new RegExp("chip--not-selected","g");return l.value.replace(k,"")}return(k,x)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["chip__container",l.value]),"data-testid":"chip-container",onClick:v},[i.createElementVNode("div",{class:i.normalizeClass(`chip__content--${e.size}`)},[i.createElementVNode("div",{class:"chip__content-container",style:i.normalizeStyle({maxWidth:h.value,...g.value})},[i.createVNode(i.Transition,{name:"fade"},{default:i.withCtx(()=>[o.value||n.persistantActionIcon?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.unref(pr)("icon")?(i.openBlock(),i.createElementBlock("div",UE,[i.renderSlot(k.$slots,"icon")])):(i.openBlock(),i.createBlock(_e,{key:1,name:"check-outline",height:m.value.height,width:m.value.width},null,8,["height","width"]))],64)):i.createCommentVNode("",!0)]),_:3}),i.createElementVNode("div",qE,[i.renderSlot(k.$slots,"default")],512)],4)],2)],2))}}),[["__scopeId","data-v-10a8a450"]]),KE={name:"CdsCollapsibleContainer",props:{modelValue:{type:Boolean,default:!1,required:!0},title:{type:String,default:"Visualizar mais"}},data(){return{internalValue:this.modelValue}},watch:{internalValue(e){this.$emit("update:modelValue",e)},modelValue(e){this.internalValue=e}},methods:{triggerExpanded(){this.internalValue=!this.internalValue}}},ZE={id:"collapsible-container"},XE={class:"collapsible-container__title"},JE={key:0,class:"collapsible-container__content","data-testid":"collapsible-content"};function QE(e,t,n,a,r,s){return i.openBlock(),i.createElementBlock("span",ZE,[i.createElementVNode("div",{class:"collapsible-container__item",onClick:t[0]||(t[0]=(...o)=>s.triggerExpanded&&s.triggerExpanded(...o))},[i.createElementVNode("span",{class:i.normalizeClass(r.internalValue?"collapsible-container__chevron--opened":"collapsible-container__chevron--closed")},null,2),i.renderSlot(e.$slots,"title",{},()=>[i.createElementVNode("span",XE,i.toDisplayString(n.title),1)])]),r.internalValue?(i.openBlock(),i.createElementBlock("div",JE,[i.renderSlot(e.$slots,"default")])):i.createCommentVNode("",!0)])}const eO=ie(KE,[["render",QE]]),su=e=>{var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},tO=.2126,nO=.7152,iO=.0722,aO=2.4,rO={POOR:3,GOOD:4.5,VERYGOOD:7,SUPER:12},V4=(e,t,n="GOOD")=>{let a=su(e),r=su(t);var s=$4(...a),o=$4(...r),l=Math.max(s,o),d=Math.min(s,o);return(l+.05)/(d+.05)>=rO[n]};function $4(e,t,n){var a=[e,t,n].map(r=>(r/=255,r<=.03928?r/12.92:Math.pow((r+.055)/1.055,aO)));return a[0]*tO+a[1]*nO+a[2]*iO}const yh={name:"CdsColorPicker",components:{CdsPopover:dl,CdsIcon:_e},props:{modelValue:{type:String,required:!0},label:{type:String,default:"Label"},inline:{type:Boolean,default:!1},popoverHeight:{type:Number,default:190},swatch:{type:Array,default:()=>[]}},data(){return{selectedColor:this.modelValue,sassColorVariables:ai,showPopover:!1}},computed:{iconColorResolver(){return this.ContrastChecker(this.selectedColor,"#FFFFFF","POOR")?"swatch__icon--white":"swatch__icon--black"},palete(){return this.paleteBuilder(this.sassColorVariables.palete)}},watch:{modelValue:{handler(e,t){e!==t&&(this.selectedColor=e)},immediate:!0}},methods:{paleteBuilder:sa,ContrastChecker:V4,SwatchSelection(e){let t="";this.selectedColor=this.sassColorVariables[e.replace(/-|\$/gi,"")],this.palete.forEach(n=>{n.colorTokens.find(a=>a===e)&&(t=n.variantName.toLowerCase())}),this.$emit("update:modelValue",this.selectedColor),this.$emit("variant-chosen",t)},isCurrentColorSelected(e){return this.selectedColor===this.sassColorVariables[e.replace(/-|\$/gi,"")]}}},T4=()=>{i.useCssVars(e=>({"21450dca":e.selectedColor}))},I4=yh.setup;yh.setup=I4?(e,t)=>(T4(),I4(e,t)):T4;const sO={key:0},oO={class:"color-picker__label"},lO=["onClick"],cO={key:1},dO=["onClick"];function uO(e,t,n,a,r,s){const o=i.resolveComponent("CdsIcon"),l=i.resolveComponent("CdsPopover");return n.inline?(i.openBlock(),i.createElementBlock("div",sO,[i.createElementVNode("div",oO,i.toDisplayString(n.label),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.swatch,(d,h)=>(i.openBlock(),i.createElementBlock("div",{key:h,class:"color-picker__container"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d,(f,m)=>(i.openBlock(),i.createElementBlock("div",{key:m},[i.createElementVNode("div",{class:i.normalizeClass(`color-picker__swatch--${f.replace("$","")}`),onClick:g=>s.SwatchSelection(f)},[s.isCurrentColorSelected(f)?(i.openBlock(),i.createBlock(o,{key:0,height:"22",width:"22",name:"check-outline",class:i.normalizeClass(["swatch__icon",s.iconColorResolver])},null,8,["class"])):i.createCommentVNode("",!0)],10,lO)]))),128))]))),128))])):(i.openBlock(),i.createElementBlock("div",cO,[i.createElementVNode("div",{id:"color-picker",class:"color-picker__trigger",onClick:t[0]||(t[0]=i.withModifiers(d=>r.showPopover=!r.showPopover,["stop"]))},t[2]||(t[2]=[i.createElementVNode("div",{class:"color-picker__preview"},null,-1)])),i.createVNode(l,{modelValue:r.showPopover,"onUpdate:modelValue":t[1]||(t[1]=d=>r.showPopover=d),"right-aligned":!1,"target-id":"color-picker",height:n.popoverHeight,"fit-content-width":""},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.swatch,(d,h)=>(i.openBlock(),i.createElementBlock("div",{key:h,class:"popover__container"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d,(f,m)=>(i.openBlock(),i.createElementBlock("div",{key:m},[i.createElementVNode("div",{class:i.normalizeClass(`color-picker__swatch--${f.replace("$","")}`),onClick:g=>s.SwatchSelection(f)},[s.isCurrentColorSelected(f)?(i.openBlock(),i.createBlock(o,{key:0,height:"22",width:"22",name:"check-outline",class:i.normalizeClass(["swatch__icon",s.iconColorResolver])},null,8,["class"])):i.createCommentVNode("",!0)],10,dO)]))),128))]))),128))]),_:1},8,["modelValue","height"])]))}const hO=ie(yh,[["render",uO],["__scopeId","data-v-81dc5169"]]),fO={name:"CdsDashboardCard",props:{title:{type:String,default:"",required:!1},description:{type:String,default:"",required:!1},showAction:{type:Boolean,default:!1,required:!1},action:{type:String,default:"Action",required:!1},fluid:{type:Boolean,default:!1}}},pO={class:"dashboard-card"},mO={class:"dashboard-card__header"},gO={key:0,class:"dashboard-card__title"},yO={key:1,class:"dashboard-card__title"},bO={key:0,class:"dashboard-card__description"},vO={key:1,class:"dashboard-card__description"},_O={key:0};function wO(e,t,n,a,r,s){return i.openBlock(),i.createElementBlock("div",pO,[i.createElementVNode("div",null,[i.createElementVNode("div",mO,[n.title.length>0?(i.openBlock(),i.createElementBlock("p",gO,i.toDisplayString(n.title),1)):(i.openBlock(),i.createElementBlock("p",yO,[i.renderSlot(e.$slots,"title-slot",{},void 0,!0)])),i.createElementVNode("div",null,[i.renderSlot(e.$slots,"status-slot",{},void 0,!0)])]),n.description.length>0?(i.openBlock(),i.createElementBlock("p",bO,i.toDisplayString(n.description),1)):(i.openBlock(),i.createElementBlock("p",vO,[i.renderSlot(e.$slots,"description-slot",{},void 0,!0)]))]),i.createElementVNode("div",{class:"dashboard-card__action",onClick:t[0]||(t[0]=o=>e.$emit("action-button-click"))},[i.renderSlot(e.$slots,"action-slot",{},()=>[n.showAction?(i.openBlock(),i.createElementBlock("div",_O,i.toDisplayString(n.action),1)):i.createCommentVNode("",!0)],!0)])])}const kO=ie(fO,[["render",wO],["__scopeId","data-v-6c2edd42"]]);var ou={exports:{}};/**
23
+ */const xB={datetime:fe.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:fe.TIME_WITH_SECONDS,minute:fe.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};V2._date.override({_id:"luxon",_create:function(e){return fe.fromMillis(e,this.options)},init(e){this.options.locale||(this.options.locale=e.locale)},formats:function(){return xB},parse:function(e,t){const n=this.options,a=typeof e;return e===null||a==="undefined"?null:(a==="number"?e=this._create(e):a==="string"?typeof t=="string"?e=fe.fromFormat(e,t,n):e=fe.fromISO(e,n):e instanceof Date?e=fe.fromJSDate(e,n):a==="object"&&!(e instanceof fe)&&(e=fe.fromObject(e,n)),e.isValid?e.valueOf():null)},format:function(e,t){const n=this._create(e);return typeof t=="string"?n.toFormat(t):n.toLocaleString(t)},add:function(e,t,n){const a={};return a[n]=t,this._create(e).plus(a).valueOf()},diff:function(e,t,n){return this._create(e).diff(this._create(t)).as(n).valueOf()},startOf:function(e,t,n){if(t==="isoWeek"){n=Math.trunc(Math.min(Math.max(0,n),6));const a=this._create(e);return a.minus({days:(a.weekday-n+7)%7}).startOf("day").valueOf()}return t?this._create(e).startOf(t).valueOf():e},endOf:function(e,t){return this._create(e).endOf(t).valueOf()}}),aa.register(...Jr);const SB={name:"CdsLineChart",components:{Line:yS},props:{data:{type:Object,required:!0,default:()=>({datasets:[{label:"",data:[]}]})},xAxisRange:{type:Array,default:()=>[0,100]},yAxisRange:{type:Array,default:()=>[0,100]},variant:{type:String,required:!0,default:"green",validator:e=>["green","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},theme:{type:String,required:!1,default:"",validator:e=>["green","teal","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},labels:{type:Array,required:!0,default:()=>[]},showLabelName:{type:Boolean,required:!0,default:!0},fill:{type:Boolean,default:!1},isDashed:{type:Boolean,default:!1},borderDash:{type:Array,default:()=>[]},smoothing:{type:Number,default:.3},scales:{type:Object,default:()=>({})},animation:{type:Object,default:()=>({})},plugins:{type:Object,default:()=>({})}},data(){return{sassColorVariables:ai,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{interaction:{intersect:!1},scales:{x:{suggestedMin:this.xAxisRange[0],suggestedMax:this.xAxisRange[1],display:!0,title:{display:!0}},y:{suggestedMin:this.yAxisRange[0],suggestedMax:this.yAxisRange[1],beginAtZero:!0,grace:"10%",ticks:{precision:0},display:!0,title:{display:!0}},...this.scales},tension:this.smoothing,responsive:!0,maintainAspectRatio:!1,pieceLabel:{mode:"percentage",precision:1},plugins:{tooltip:{callbacks:{beforeTitle:function(e){return`${e[0].dataset.name}`}}},legend:{display:!0,labels:{usePointStyle:!0,pointStyle:"rectRounded"}},...this.plugins},fill:this.fill,animation:{...this.animation}}}},watch:{labels:{handler(e){this.localLabels=e},immediate:!0},variant:{handler(e){e==="gray"||e==="dark"?this.deleteFirstTwoColors=!0:this.deleteFirstTwoColors=!1},immediate:!0},data:{handler(e){this.mergeChartDataNoSelect(e)},immediate:!0},isDashed:{handler(e){e===!0&&this.checkDashed()},immediate:!0}},mounted(){this.chartOptions={...this.chartOptions,...this.scales}},methods:{paleteBuilder:sa,palete(){this.theme.length?this.palletColors=this.paleteBuilder(this.sassColorVariables.chartThemes):(this.palletColors=this.paleteBuilder(this.sassColorVariables.palete),this.removeFirstTwoElements())},removeFirstTwoElements(){for(let e=0;e<this.palletColors.length;e++){const t=this.palletColors[e];this.deleteFirstTwoColors===!1&&(t.colorShades.splice(0,2),t.colorTokens.splice(0,2),t.colorData.splice(0,2))}},addDataSetNames(){this.data.forEach(e=>{e.datasets.forEach(t=>{t.name=e.name})})},mergeChartDataNoSelect(e){const t={labels:this.localLabels,datasets:[]};this.addDataSetNames(),e.forEach(a=>{a.datasets.forEach(r=>{const s={label:this.showLabelName?r.name:r.label,data:r.data,name:r.name,borderRadius:6};t.datasets.push(s)})}),this.palete();const n=this.generateBackgroundColor();this.setColors(t.datasets,n),this.localChartData=t},generateBackgroundColor(){let e=this.variant.toLowerCase();this.theme.length&&(e=this.theme.toLowerCase());const t=this.palletColors.find(n=>n.variantName.toLowerCase()===e);return t?this.fill?t.colorShades.map(a=>a+"80"):t.colorShades:[]},setColors(e,t){const n={};e.forEach((a,r)=>{const s=a.name;n[s]||(n[s]=t.slice()),a.data.length>0&&(a.backgroundColor=n[s][r%n[s].length],a.borderColor=n[s][r%n[s].length]),a.borderRadius=6})},checkDashed(){this.chartOptions.borderDash=[this.borderDash[0],this.borderDash[1]]}}},MB={class:"responsive-container"};function BB(e,t,n,a,r,s){const o=i.resolveComponent("Line");return i.openBlock(),i.createElementBlock("span",null,[i.createElementVNode("div",MB,[i.createVNode(o,{data:r.localChartData,options:r.chartOptions},null,8,["data","options"])])])}const EB=ie(SB,[["render",BB],["__scopeId","data-v-c5a0eb61"]]);aa.register(...Jr);const OB={name:"CdsPieChart",components:{Pie:bS},props:{data:{type:Object,required:!0,default:()=>({datasets:[{label:"",data:[]}]})},variant:{type:String,required:!0,default:"green",validator:e=>["green","teal","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},labels:{type:Array,required:!0,default:()=>[]},colors:{type:Array,default:()=>[],validator:e=>{const t=["green","teal","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"];return e.every(n=>t.includes(n))}}},data(){return{sassColorVariables:ai,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{responsive:!0,maintainAspectRatio:!1,pieceLabel:{mode:"percentage",precision:1},plugins:{tooltip:{callbacks:{beforeTitle:function(e){return`${e[0].dataset.name}`}}},legend:{display:!0,labels:{usePointStyle:!0,pointStyle:"rectRounded"}}}}}},computed:{isColorsSet(){return this.colors&&this.colors.length>0},computedBackgroundColors(){return this.colors.map(e=>{const t=this.palletColors.find(n=>n.variantName.toLowerCase().includes(e));if(t)return t.color400})}},watch:{labels:{handler(e){this.localLabels=e},immediate:!0},variant:{handler(e){e==="gray"||e==="dark"?this.deleteFirstTwoColors=!0:this.deleteFirstTwoColors=!1},immediate:!0},data:{handler(e){this.mergeChartDataNoSelect(e)},immediate:!0}},methods:{paleteBuilder:sa,palete(){this.palletColors=this.paleteBuilder(this.sassColorVariables.palete),this.removeFirstTwoElements()},removeFirstTwoElements(){for(let e=0;e<this.palletColors.length;e++){const t=this.palletColors[e];this.deleteFirstTwoColors===!1&&(t.colorShades.splice(0,2),t.colorTokens.splice(0,2),t.colorData.splice(0,2))}},addDataSetNames(){this.data.forEach(e=>{e.datasets.forEach(t=>{t.name=e.name})})},mergeChartDataNoSelect(e){const t={labels:this.localLabels,datasets:[]};this.addDataSetNames(),e.forEach(a=>{a.datasets.forEach(r=>{const s={label:r.label,data:r.data,name:r.name,borderRadius:6};t.datasets.push(s)})}),this.palete();const n=this.isColorsSet?this.computedBackgroundColors:this.generateBackgroundColor();this.setColors(t.datasets,n),this.localChartData=t},generateBackgroundColor(){const e=this.variant.toLowerCase(),t=this.palletColors.find(n=>n.variantName.toLowerCase().includes(e));return t?t.colorShades:[]},setColors(e,t){const n={};e.forEach(a=>{const r=a.name;n[r]||(n[r]=t.slice()),a.backgroundColor=n[r].splice(0,a.data.length),a.borderRadius=6})}}},DB={class:"responsive-container"};function VB(e,t,n,a,r,s){const o=i.resolveComponent("Pie");return i.openBlock(),i.createElementBlock("span",null,[i.createElementVNode("div",DB,[i.createVNode(o,{data:r.localChartData,options:r.chartOptions},null,8,["data","options"])])])}const $B=ie(OB,[["render",VB],["__scopeId","data-v-c20c6cdd"]]);aa.register(...Jr);const TB={name:"CdsPolarAreaChart",components:{PolarArea:vS},props:{data:{type:Object,required:!0,default:()=>({datasets:[{label:"",data:[]}]})},variant:{type:String,required:!0,default:"green",validator:e=>["green","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},labels:{type:Array,required:!0,default:()=>[]},isVisiblePointNames:{type:Boolean,default:!1}},data(){return{sassColorVariables:ai,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{responsive:!0,scales:{r:{pointLabels:{display:this.isVisiblePointNames,centerPointLabels:!0,font:{size:12}}}},maintainAspectRatio:!1,pieceLabel:{mode:"percentage",precision:1},plugins:{tooltip:{callbacks:{beforeTitle:function(e){return`${e[0].dataset.name}`}}},legend:{display:!0,labels:{usePointStyle:!0,pointStyle:"rectRounded"}}}}}},watch:{labels:{handler(e){this.localLabels=e},immediate:!0},variant:{handler(e){e==="gray"||e==="dark"?this.deleteFirstTwoColors=!0:this.deleteFirstTwoColors=!1},immediate:!0},data:{handler(e){this.mergeChartDataNoSelect(e)},immediate:!0}},methods:{paleteBuilder:sa,palete(){this.palletColors=this.paleteBuilder(this.sassColorVariables.palete),this.removeFirstTwoElements()},removeFirstTwoElements(){for(let e=0;e<this.palletColors.length;e++){const t=this.palletColors[e];this.deleteFirstTwoColors===!1&&(t.colorShades.splice(0,2),t.colorTokens.splice(0,2),t.colorData.splice(0,2))}},addDataSetNames(){this.data.forEach(e=>{e.datasets.forEach(t=>{t.name=e.name})})},mergeChartDataNoSelect(e){const t={labels:this.localLabels,datasets:[]};this.addDataSetNames(),e.forEach(a=>{a.datasets.forEach(r=>{const s={label:this.showLabelName?r.name:r.label,data:r.data,name:r.name,borderRadius:6};t.datasets.push(s)})}),this.palete();const n=this.generateBackgroundColor();this.setColors(t.datasets,n),this.localChartData=t},generateBackgroundColor(){const e=this.variant.toLowerCase(),t=this.palletColors.find(n=>n.variantName.toLowerCase().includes(e));return t?t.colorShades:[]},setColors(e,t){const n={};e.forEach(a=>{const r=a.name;n[r]||(n[r]=t.slice()),a.backgroundColor=n[r].splice(0,a.data.length),a.borderRadius=6})}}},IB={class:"responsive-container"};function AB(e,t,n,a,r,s){const o=i.resolveComponent("PolarArea");return i.openBlock(),i.createElementBlock("span",null,[i.createElementVNode("div",IB,[i.createVNode(o,{data:r.localChartData,options:r.chartOptions},null,8,["data","options"])])])}const NB=ie(TB,[["render",AB],["__scopeId","data-v-3da7f9a7"]]);aa.register(...Jr);const zB={name:"CdsStackedBarChart",components:{Bar:Ug},props:{data:{type:Object,required:!0,default:()=>({datasets:[{label:"",data:[]}]})},variant:{type:String,required:!0,default:"green",validator:e=>["green","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},theme:{type:String,required:!1,default:"",validator:e=>["green","teal","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(e)},labels:{type:Array,required:!0,default:()=>[]},barWidth:{type:Number,default:1}},data(){return{sassColorVariables:ai,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{scales:{x:{stacked:!0,grid:{color:"transparent"}},y:{stacked:!0,beginAtZero:!0,grace:"10%",ticks:{precision:0},grid:{color:"#DFE5EC"}}},responsive:!0,maintainAspectRatio:!1,categoryPercentage:null,plugins:{tooltip:{callbacks:{beforeTitle:function(e){return`${e[0].dataset.name}`}}},legend:{display:!0,labels:{usePointStyle:!0,pointStyle:"rectRounded",padding:50}}}},plugins:[{id:"custom_legend_margin",beforeInit:function(e){const t=e.legend.fit;e.legend.fit=function(){t.call(this),this.height+=12}}}]}},watch:{labels:{handler(e){this.localLabels=e},immediate:!0},variant:{handler(e){e==="gray"||e==="dark"?this.deleteFirstTwoColors=!0:this.deleteFirstTwoColors=!1},immediate:!0},data:{handler(e){this.mergeChartDataNoSelect(e)},immediate:!0},barWidth:{handler(e){e>=.1&&e<=1?this.chartOptions.categoryPercentage=e:this.chartOptions.categoryPercentage=1},immediate:!0}},methods:{paleteBuilder:sa,palete(){this.theme.length?this.palletColors=this.paleteBuilder(this.sassColorVariables.chartThemes):(this.palletColors=this.paleteBuilder(this.sassColorVariables.palete),this.removeFirstTwoElements())},removeFirstTwoElements(){for(let e=0;e<this.palletColors.length;e++){const t=this.palletColors[e];this.deleteFirstTwoColors===!1&&(t.colorShades.splice(0,2),t.colorTokens.splice(0,2),t.colorData.splice(0,2))}},addDataSetNames(){this.data.forEach(e=>{e.datasets.forEach(t=>{t.name=e.name})})},mergeChartDataNoSelect(e){const t={labels:this.localLabels,datasets:[]};this.addDataSetNames(),e.forEach(a=>{a.datasets.forEach(r=>{const s={label:r.label,data:r.data,name:r.name,borderRadius:6};t.datasets.push(s)})}),this.palete();const n=this.generateBackgroundColor();this.setColors(t.datasets,n),this.localChartData=t},getPalete(e=this.variant){const t=e.toLowerCase(),n=this.palletColors.find(a=>a.variantName.toLowerCase().includes(t));if(n)return n.colorShades},generateBackgroundColor(){let e=this.variant.toLowerCase();this.theme.length&&(e=this.theme.toLowerCase());const t=this.palletColors.find(n=>n.variantName.toLowerCase()===e);return t?this.fill?t.colorShades.map(a=>a+"80"):t.colorShades:[]},setMultiColors(e){const t={};let n=0;this.chartOptions.plugins.legend.display=!0,e.forEach((a,r)=>{const s=a.name;let o=1;r%5===0&&(n=0),o+=n,n++,t[s]=this.getPalete(a.variant)[o],a.backgroundColor=t[s],a.borderRadius=6})},setColors(e,t){const n={};this.chartOptions.plugins.legend.display=!0,e.forEach(a=>{const r=a.name;let s;e.length===1&&(s=2,n[r]=t[s],this.chartOptions.plugins.legend.display=!1),n[r]||(s=Object.keys(n).length%t.length,n[r]=t[s]),a.backgroundColor=n[r],a.borderRadius=6})}}},LB={class:"responsive-container"};function PB(e,t,n,a,r,s){const o=i.resolveComponent("Bar");return i.openBlock(),i.createElementBlock("span",null,[i.createElementVNode("div",LB,[i.createVNode(o,{is:"bar",data:r.localChartData,options:r.chartOptions,plugins:r.plugins},null,8,["data","options","plugins"])])])}const FB=ie(zB,[["render",PB],["__scopeId","data-v-ff9713f4"]]),fh={name:"CdsSpacer",props:{padding:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},paddingTop:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},paddingRight:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},paddingBottom:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},paddingLeft:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},margin:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},marginTop:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},marginRight:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},marginBottom:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12},marginLeft:{type:[Number,String],default:0,validator:e=>e>=0&&e<=12}},computed:{paddingTopResolver(){let e=this.paddingTop>12?12:+this.paddingTop;return e=this.padding?this.basePropertyResolver(this.padding):e,`${e*4}px`},paddingRightResolver(){let e=this.paddingRight>12?12:+this.paddingRight;return e=this.padding?this.basePropertyResolver(this.padding):e,`${e*4}px`},paddingBottomResolver(){let e=this.paddingBottom>12?12:+this.paddingBottom;return e=this.padding?this.basePropertyResolver(this.padding):e,`${e*4}px`},paddingLeftResolver(){let e=this.paddingLeft>12?12:+this.paddingLeft;return e=this.padding?this.basePropertyResolver(this.padding):e,`${e*4}px`},marginTopResolver(){let e=this.marginTop>12?12:+this.marginTop;return e=this.margin?this.basePropertyResolver(this.margin):e,`${e*4}px`},marginRightResolver(){let e=this.marginRight>12?12:+this.marginRight;return e=this.margin?this.basePropertyResolver(this.margin):e,`${e*4}px`},marginBottomResolver(){let e=this.marginBottom>12?12:+this.marginBottom;return e=this.margin?this.basePropertyResolver(this.margin):e,`${e*4}px`},marginLeftResolver(){let e=this.marginLeft>12?12:+this.marginLeft;return e=this.margin?this.basePropertyResolver(this.margin):e,`${e*4}px`}},methods:{basePropertyResolver(e){return e>=0&&e<=12?e:e<0?0:12}}},x4=()=>{i.useCssVars(e=>({"7a081d6e":e.marginBottomResolver,"70710db6":e.marginLeftResolver,"2636554a":e.marginRightResolver,"2d33a4fa":e.marginTopResolver,"93427b50":e.paddingBottomResolver,"207941f4":e.paddingLeftResolver,"3884b34a":e.paddingRightResolver,"37fee258":e.paddingTopResolver}))},S4=fh.setup;fh.setup=S4?(e,t)=>(x4(),S4(e,t)):x4;const RB={class:"spacer"};function HB(e,t,n,a,r,s){return i.openBlock(),i.createElementBlock("div",RB,[i.renderSlot(e.$slots,"default",{},void 0,!0)])}const nu=ie(fh,[["render",HB],["__scopeId","data-v-209b589c"]]);function M4(e,t=24){let n=e/8,a=n%4;return`${n>t?t:n-a+4}px`}const ph={name:"CdsBox",components:{CdsSpacer:nu,CdsClickable:Ni},props:{elevated:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},verticalFluid:{type:Boolean,default:!1},padding:{type:[Number,String],default:4,validator:e=>e<=12},clickable:{type:Boolean,default:!1},variant:{type:String,default:"gray"},light:{type:Boolean,default:!1},overflowVisible:{type:Boolean,default:!1}},data(){return{width:0}},computed:{widthResolver(){return this.fluid?"100%":"fit-content"},heightResolver(){return this.verticalFluid?"100%":"fit-content"},borderRadiusResolver(){return this.rounder(this.width,12)},overflowResolver(){return this.overflowVisible?"visible":"hidden"},computedClass(){return this.elevated?"box--elevated":this.light?`box--${this.variant}--light`:`box--${this.variant}`}},mounted(){this.width=this.$refs["cds-box"].getBoundingClientRect().width},methods:{rounder:M4,handleClick(){this.clickable&&this.$emit("boxClick",!0)}}},B4=()=>{i.useCssVars(e=>({c346f61e:e.widthResolver,28724430:e.heightResolver,"027b7d42":e.borderRadiusResolver,"2d3309fa":e.overflowResolver}))},E4=ph.setup;ph.setup=E4?(e,t)=>(B4(),E4(e,t)):B4;function WB(e,t,n,a,r,s){const o=i.resolveComponent("CdsSpacer"),l=i.resolveComponent("CdsClickable");return i.openBlock(),i.createElementBlock("div",{ref:"cds-box",class:i.normalizeClass(s.computedClass)},[i.createVNode(l,{class:"box__container",clickable:n.clickable,fluid:n.fluid,onClick:s.handleClick},{default:i.withCtx(()=>[i.createVNode(o,{"padding-top":n.padding,"padding-right":n.padding,"padding-bottom":n.padding,"padding-left":n.padding},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["padding-top","padding-right","padding-bottom","padding-left"])]),_:3},8,["clickable","fluid","onClick"])],2)}const Zl=ie(ph,[["render",WB],["__scopeId","data-v-399209eb"]]),YB={key:0},jB={class:"bottom-sheet__header"},UB={class:"bottom-sheet__title"},qB={class:"bottom-sheet__content"},GB=ie(Object.assign({name:"CdsBottomSheet"},{__name:"BottomSheet",props:i.mergeModels({title:{type:String,default:"Onde encontrar o meu CNS"},noCloseOnBackdrop:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:i.mergeModels(["update:model-value","close"],["update:modelValue"]),setup(e,{emit:t}){const n=i.useModel(e,"modelValue"),a=e,r=t,s=i.ref(!0),o=i.ref(null);i.watch(n,(f,m)=>{f!==m&&(f||d(),h(f))});function l(f){a.noCloseOnBackdrop||o.value&&!o.value.contains(f.target)&&d()}function d(){s.value=!1,setTimeout(()=>{s.value=!0,n.value=!1,r("close",!0)},300)}function h(f){document.body.style.overflow=f?"hidden":"auto"}return(f,m)=>(i.openBlock(),i.createElementBlock("div",null,[n.value?(i.openBlock(),i.createElementBlock("div",YB,[i.createElementVNode("div",{class:i.normalizeClass(s.value?"backdrop__show":"backdrop__hide"),onClick:l},[i.createElementVNode("div",{ref_key:"bottomSheetRef",ref:o,class:i.normalizeClass(s.value?"bottom-sheet__show":"bottom-sheet__hide")},[m[0]||(m[0]=i.createElementVNode("div",{class:"bottom-sheet__header-border"},[i.createElementVNode("div",{class:"bottom-sheet__header-border-line"})],-1)),i.createElementVNode("div",jB,[i.createElementVNode("div",UB,i.toDisplayString(e.title),1),i.createElementVNode("div",{class:"bottom-sheet__close-icon",onClick:d},[i.createVNode(_e,{name:"x-outline",height:"20",width:"20",color:"#29333D"})])]),i.createElementVNode("div",qB,[i.renderSlot(f.$slots,"default",{},void 0,!0)])],2)],2)])):i.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-3ce487af"]]);var iu={exports:{}};iu.exports,function(e,t){var n=9007199254740991,a="[object Arguments]",r="[object Function]",s="[object GeneratorFunction]",o="[object Map]",l="[object Object]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",m="[object DataView]",g=/[\\^$.*+?()[\]{}|]/g,y=/^\[object .+?Constructor\]$/,v=typeof bn=="object"&&bn&&bn.Object===Object&&bn,_=typeof self=="object"&&self&&self.Object===Object&&self,k=v||_||Function("return this")(),x=t&&!t.nodeType&&t,M=x&&!0&&e&&!e.nodeType&&e,B=M&&M.exports===x;function C(he,ze){return he==null?void 0:he[ze]}function V(he){var ze=!1;if(he!=null&&typeof he.toString!="function")try{ze=!!(he+"")}catch{}return ze}function $(he,ze){return function(qe){return he(ze(qe))}}var L=Function.prototype,T=Object.prototype,R=k["__core-js_shared__"],q=function(){var he=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return he?"Symbol(src)_1."+he:""}(),ee=L.toString,F=T.hasOwnProperty,Z=T.toString,ae=RegExp("^"+ee.call(F).replace(g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=B?k.Buffer:void 0,me=T.propertyIsEnumerable,be=j?j.isBuffer:void 0,U=$(Object.keys,Object),ye=je(k,"DataView"),Y=je(k,"Map"),Q=je(k,"Promise"),ue=je(k,"Set"),ce=je(k,"WeakMap"),ve=!me.call({valueOf:1},"valueOf"),ge=Me(ye),Ve=Me(Y),tt=Me(Q),Ne=Me(ue),ct=Me(ce);function mt(he){return Z.call(he)}function dt(he){if(!Mt(he)||le(he))return!1;var ze=St(he)||V(he)?ae:y;return ze.test(Me(he))}function je(he,ze){var qe=C(he,ze);return dt(qe)?qe:void 0}var Xe=mt;(ye&&Xe(new ye(new ArrayBuffer(1)))!=m||Y&&Xe(new Y)!=o||Q&&Xe(Q.resolve())!=d||ue&&Xe(new ue)!=h||ce&&Xe(new ce)!=f)&&(Xe=function(he){var ze=Z.call(he),qe=ze==l?he.constructor:void 0,an=qe?Me(qe):void 0;if(an)switch(an){case ge:return m;case Ve:return o;case tt:return d;case Ne:return h;case ct:return f}return ze});function le(he){return!!q&&q in he}function xe(he){var ze=he&&he.constructor,qe=typeof ze=="function"&&ze.prototype||T;return he===qe}function Me(he){if(he!=null){try{return ee.call(he)}catch{}try{return he+""}catch{}}return""}function Ue(he){return gt(he)&&F.call(he,"callee")&&(!me.call(he,"callee")||Z.call(he)==a)}var ht=Array.isArray;function Rt(he){return he!=null&&Ot(he.length)&&!St(he)}function gt(he){return nn(he)&&Rt(he)}var nt=be||Dt;function It(he){if(Rt(he)&&(ht(he)||typeof he=="string"||typeof he.splice=="function"||nt(he)||Ue(he)))return!he.length;var ze=Xe(he);if(ze==o||ze==h)return!he.size;if(ve||xe(he))return!U(he).length;for(var qe in he)if(F.call(he,qe))return!1;return!0}function St(he){var ze=Mt(he)?Z.call(he):"";return ze==r||ze==s}function Ot(he){return typeof he=="number"&&he>-1&&he%1==0&&he<=n}function Mt(he){var ze=typeof he;return!!he&&(ze=="object"||ze=="function")}function nn(he){return!!he&&typeof he=="object"}function Dt(){return!1}e.exports=It}(iu,iu.exports);var KB=iu.exports;const on=O1(KB),ZB={name:"CdsBreadcrumb",components:{CdsIcon:_e,CdsSpacer:nu,CdsClickable:Ni},props:{items:{type:Array,default:()=>[],required:!0}},methods:{resolveRoute({route:e,path:t}){const n=on(e)?t:e;return n instanceof String?{path:n}:n},routerPushTo(e){return this.resolveRoute(e)?this.resolveRoute(e).path:null}}},XB={class:"breadcrumb"};function JB(e,t,n,a,r,s){const o=i.resolveComponent("CdsIcon"),l=i.resolveComponent("CdsSpacer"),d=i.resolveComponent("router-link"),h=i.resolveComponent("CdsClickable");return i.openBlock(),i.createElementBlock("nav",null,[i.createElementVNode("ul",XB,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.items,(f,m)=>(i.openBlock(),i.createElementBlock("li",{key:`${m}-${f.name}-item`,role:"presentation"},[m===0?(i.openBlock(),i.createBlock(h,{key:0,clickable:""},{default:i.withCtx(()=>[i.createVNode(d,{to:s.routerPushTo(f),class:"breadcrumb__link"},{default:i.withCtx(()=>[n.items.length<=2?(i.openBlock(),i.createBlock(o,{key:0,height:"16",width:"16",name:"arrow-left-outline"})):(i.openBlock(),i.createBlock(o,{key:1,height:"15",width:"15",name:"home-outline"})),i.createVNode(l,{"margin-left":"2"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(f.label),1)]),_:2},1024)]),_:2},1032,["to"])]),_:2},1024)):(i.openBlock(),i.createBlock(l,{key:1,class:"breadcrumb__item","margin-right":"1","margin-left":"1"},{default:i.withCtx(()=>[i.createVNode(o,{height:"16",width:"16",name:"caret-right-outline",class:"breadcrumb__separator"}),i.createVNode(d,{to:s.routerPushTo(f),class:"breadcrumb__link"},{default:i.withCtx(()=>[i.createVNode(h,{clickable:m!==n.items.length-1},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(f.label),1)]),_:2},1032,["clickable"])]),_:2},1032,["to"])]),_:2},1024))]))),128))])])}const QB=ie(ZB,[["render",JB],["__scopeId","data-v-e3e7ef85"]]),eE=["src","alt"],Xl=ie(Object.assign({name:"CdsImage"},{__name:"Image",props:{src:{type:String,required:!0},fallbackSrc:{type:String,default:"https://sysfront.nyc3.cdn.digitaloceanspaces.com/cuida/images/imagePlaceholder.png"},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:"auto"},alt:{type:String,default:"Imagem"},opacity:{type:[Number,String],default:1},dimmed:{type:Boolean,default:!1},blackAndWhite:{type:Boolean,default:!1},roundedCorners:{type:Boolean,default:!1},round:{type:Boolean,default:!1}},setup(e){i.useCssVars(h=>({"18bf7baf":s.value,"6e90c576":o.value,"295a3b44":a.value,"7d256ef4":e.opacity,"247a0c15":r.value}));const t=e,n=i.ref(t.src),a=i.computed(()=>t.round?d(t.width):t.height?d(t.height):"auto"),r=i.computed(()=>t.width?d(t.width):"auto"),s=i.computed(()=>t.round?"50%":t.roundedCorners?M4(t.width):"0px"),o=i.computed(()=>t.blackAndWhite?"grayscale(100%)":t.dimmed?"grayscale(35%)":"grayscale(0%)");i.watch(()=>t.src,h=>{n.value=h});function l(){n.value=t.fallbackSrc}function d(h){return Number.isNaN(Number(h))?h:`${h}px`}return(h,f)=>(i.openBlock(),i.createElementBlock("img",i.mergeProps(h.$attrs,{src:n.value,alt:e.alt,class:"cds-image",onError:l}),null,16,eE))}}),[["__scopeId","data-v-442e5dfe"]]),tE={class:"card__extra-container"},nE={class:"card__extra"},iE={key:0},aE={key:1,class:"card__image"},rE={key:2,class:"card__icon"},sE={class:"card__spacer"},oE={key:0,class:"card__header"},lE={key:1},cE={class:"card__header"},dE={key:2,class:"card__body"},uE={key:3},hE={class:"card__body"},fE={key:4,class:"card__footer"},pE=ie(Object.assign({name:"CdsCard"},{__name:"Card",props:{title:{type:String,default:""},content:{type:String,default:""},imageSrc:{type:String,default:""},imageAlt:{type:String,default:"imagem do card"},imageWidth:{type:[String,Number],default:300},imageHeight:{type:[String,Number],default:180},bodyWidth:{type:[String,Number],default:300},horizontal:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1}},emits:["cardClick"],setup(e,{emit:t}){i.useCssVars(d=>({"2f77ab4b":s.value,"0a0863a3":r.value}));const n=e,a=t,r=i.computed(()=>n.fluid?"100%":n.horizontal?"fit-content":`${n.imageWidth}px`),s=i.computed(()=>`${n.bodyWidth}px`),o=i.computed(()=>n.fluid&&!n.horizontal?"100%":n.imageWidth);function l(){n.clickable&&a("cardClick",!0)}return(d,h)=>(i.openBlock(),i.createBlock(Zl,{padding:"0",clickable:e.clickable,fluid:e.fluid,onBoxClick:l},{default:i.withCtx(()=>[i.createElementVNode("div",tE,[i.createElementVNode("div",nE,[i.renderSlot(d.$slots,"extra",{},void 0,!0)])]),i.createElementVNode("div",{class:i.normalizeClass({"card--horizontal":e.horizontal})},[i.unref(ei)(d.$slots,"image")?(i.openBlock(),i.createElementBlock("div",iE,[i.renderSlot(d.$slots,"image",{},void 0,!0)])):e.imageSrc?(i.openBlock(),i.createElementBlock("div",aE,[i.createVNode(Xl,{src:e.imageSrc,width:o.value,height:e.imageHeight,alt:e.imageAlt},null,8,["src","width","height","alt"])])):i.unref(ei)(d.$slots,"icon")?(i.openBlock(),i.createElementBlock("div",rE,[i.renderSlot(d.$slots,"icon",{},void 0,!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",sE,[i.unref(ei)(d.$slots,"header")?(i.openBlock(),i.createElementBlock("div",oE,[i.renderSlot(d.$slots,"header",{},void 0,!0)])):(i.openBlock(),i.createElementBlock("div",lE,[i.createElementVNode("p",cE,i.toDisplayString(e.title),1)])),i.unref(ei)(d.$slots,"body")?(i.openBlock(),i.createElementBlock("div",dE,[i.renderSlot(d.$slots,"body",{},void 0,!0)])):(i.openBlock(),i.createElementBlock("div",uE,[i.createElementVNode("p",hE,i.toDisplayString(e.content),1)])),i.unref(ei)(d.$slots,"footer")?(i.openBlock(),i.createElementBlock("div",fE,[i.renderSlot(d.$slots,"footer",{},void 0,!0)])):i.createCommentVNode("",!0)])],2)]),_:3},8,["clickable","fluid"]))}}),[["__scopeId","data-v-44d16200"]]),mE={name:"CdsCalloutCard",components:{CdsButton:fn},props:{title:{type:String,default:"Título do AlertCard",required:!0},text:{type:String,default:"Subtítulo do AlertCard"},image:{type:String,default:"",required:!0},imageDescription:{type:String,default:"Imagem de CalloutCard"},actionButtonVariant:{type:String,default:"green"},actionButtonText:{type:String,default:"Ok"},actionButtonSecondary:{type:Boolean,default:!1},actionButtonDisabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},methods:{resolveClass(e){return this.compact?`${e}--compact`:e}}},gE={id:"callout-card"},yE={class:"image__container"},bE=["src","alt"],vE={class:"content__title"},_E={class:"content__text"};function wE(e,t,n,a,r,s){const o=i.resolveComponent("CdsButton");return i.openBlock(),i.createElementBlock("span",gE,[i.createElementVNode("div",{class:i.normalizeClass(s.resolveClass("callout-card__container"))},[i.createElementVNode("div",yE,[i.createElementVNode("img",{class:i.normalizeClass(s.resolveClass("image__content")),src:n.image,alt:n.imageDescription},null,10,bE)]),i.createElementVNode("div",{class:i.normalizeClass(s.resolveClass("content__container"))},[i.createElementVNode("div",{class:i.normalizeClass(s.resolveClass("content"))},[i.createElementVNode("p",vE,i.toDisplayString(n.title),1),i.createElementVNode("span",_E,[i.renderSlot(e.$slots,"text",{},()=>[i.createTextVNode(i.toDisplayString(n.text),1)])])],2),i.createElementVNode("div",null,[i.renderSlot(e.$slots,"action",{},()=>[i.createVNode(o,{id:"content-button",variant:n.actionButtonVariant,text:n.actionButtonText,secondary:n.actionButtonSecondary,disabled:n.actionButtonDisabled,onClick:t[0]||(t[0]=l=>e.$emit("action-button-click",!0))},null,8,["variant","text","secondary","disabled"])])])],2)],2)])}const kE=ie(mE,[["render",wE]]);var O4={exports:{}};(function(e){e.exports=function(t){var n={};function a(r){if(n[r])return n[r].exports;var s=n[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=t,a.c=n,a.d=function(r,s,o){a.o(r,s)||Object.defineProperty(r,s,{enumerable:!0,get:o})},a.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},a.t=function(r,s){if(s&1&&(r=a(r)),s&8||s&4&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),s&2&&typeof r!="string")for(var l in r)a.d(o,l,(function(d){return r[d]}).bind(null,l));return o},a.n=function(r){var s=r&&r.__esModule?function(){return r.default}:function(){return r};return a.d(s,"a",s),s},a.o=function(r,s){return Object.prototype.hasOwnProperty.call(r,s)},a.p="",a(a.s="fae3")}({"01f9":function(t,n,a){var r=a("2d00"),s=a("5ca1"),o=a("2aba"),l=a("32e9"),d=a("84f2"),h=a("41a0"),f=a("7f20"),m=a("38fd"),g=a("2b4c")("iterator"),y=!([].keys&&"next"in[].keys()),v="@@iterator",_="keys",k="values",x=function(){return this};t.exports=function(M,B,C,V,$,L,T){h(C,B,V);var R=function(Q){if(!y&&Q in Z)return Z[Q];switch(Q){case _:return function(){return new C(this,Q)};case k:return function(){return new C(this,Q)}}return function(){return new C(this,Q)}},q=B+" Iterator",ee=$==k,F=!1,Z=M.prototype,ae=Z[g]||Z[v]||$&&Z[$],j=ae||R($),me=$?ee?R("entries"):j:void 0,be=B=="Array"&&Z.entries||ae,U,ye,Y;if(be&&(Y=m(be.call(new M)),Y!==Object.prototype&&Y.next&&(f(Y,q,!0),!r&&typeof Y[g]!="function"&&l(Y,g,x))),ee&&ae&&ae.name!==k&&(F=!0,j=function(){return ae.call(this)}),(!r||T)&&(y||F||!Z[g])&&l(Z,g,j),d[B]=j,d[q]=x,$)if(U={values:ee?j:R(k),keys:L?j:R(_),entries:me},T)for(ye in U)ye in Z||o(Z,ye,U[ye]);else s(s.P+s.F*(y||F),B,U);return U}},"0d58":function(t,n,a){var r=a("ce10"),s=a("e11e");t.exports=Object.keys||function(l){return r(l,s)}},1495:function(t,n,a){var r=a("86cc"),s=a("cb7c"),o=a("0d58");t.exports=a("9e1e")?Object.defineProperties:function(d,h){s(d);for(var f=o(h),m=f.length,g=0,y;m>g;)r.f(d,y=f[g++],h[y]);return d}},"230e":function(t,n,a){var r=a("d3f4"),s=a("7726").document,o=r(s)&&r(s.createElement);t.exports=function(l){return o?s.createElement(l):{}}},"2aba":function(t,n,a){var r=a("7726"),s=a("32e9"),o=a("69a8"),l=a("ca5a")("src"),d=a("fa5b"),h="toString",f=(""+d).split(h);a("8378").inspectSource=function(m){return d.call(m)},(t.exports=function(m,g,y,v){var _=typeof y=="function";_&&(o(y,"name")||s(y,"name",g)),m[g]!==y&&(_&&(o(y,l)||s(y,l,m[g]?""+m[g]:f.join(String(g)))),m===r?m[g]=y:v?m[g]?m[g]=y:s(m,g,y):(delete m[g],s(m,g,y)))})(Function.prototype,h,function(){return typeof this=="function"&&this[l]||d.call(this)})},"2aeb":function(t,n,a){var r=a("cb7c"),s=a("1495"),o=a("e11e"),l=a("613b")("IE_PROTO"),d=function(){},h="prototype",f=function(){var m=a("230e")("iframe"),g=o.length,y="<",v=">",_;for(m.style.display="none",a("fab2").appendChild(m),m.src="javascript:",_=m.contentWindow.document,_.open(),_.write(y+"script"+v+"document.F=Object"+y+"/script"+v),_.close(),f=_.F;g--;)delete f[h][o[g]];return f()};t.exports=Object.create||function(g,y){var v;return g!==null?(d[h]=r(g),v=new d,d[h]=null,v[l]=g):v=f(),y===void 0?v:s(v,y)}},"2b4c":function(t,n,a){var r=a("5537")("wks"),s=a("ca5a"),o=a("7726").Symbol,l=typeof o=="function",d=t.exports=function(h){return r[h]||(r[h]=l&&o[h]||(l?o:s)("Symbol."+h))};d.store=r},"2d00":function(t,n){t.exports=!1},"2d95":function(t,n){var a={}.toString;t.exports=function(r){return a.call(r).slice(8,-1)}},"32e9":function(t,n,a){var r=a("86cc"),s=a("4630");t.exports=a("9e1e")?function(o,l,d){return r.f(o,l,s(1,d))}:function(o,l,d){return o[l]=d,o}},"38fd":function(t,n,a){var r=a("69a8"),s=a("4bf8"),o=a("613b")("IE_PROTO"),l=Object.prototype;t.exports=Object.getPrototypeOf||function(d){return d=s(d),r(d,o)?d[o]:typeof d.constructor=="function"&&d instanceof d.constructor?d.constructor.prototype:d instanceof Object?l:null}},"41a0":function(t,n,a){var r=a("2aeb"),s=a("4630"),o=a("7f20"),l={};a("32e9")(l,a("2b4c")("iterator"),function(){return this}),t.exports=function(d,h,f){d.prototype=r(l,{next:s(1,f)}),o(d,h+" Iterator")}},4588:function(t,n){var a=Math.ceil,r=Math.floor;t.exports=function(s){return isNaN(s=+s)?0:(s>0?r:a)(s)}},4630:function(t,n){t.exports=function(a,r){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:r}}},"4bf8":function(t,n,a){var r=a("be13");t.exports=function(s){return Object(r(s))}},5537:function(t,n,a){var r=a("8378"),s=a("7726"),o="__core-js_shared__",l=s[o]||(s[o]={});(t.exports=function(d,h){return l[d]||(l[d]=h!==void 0?h:{})})("versions",[]).push({version:r.version,mode:a("2d00")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(t,n,a){var r=a("7726"),s=a("8378"),o=a("32e9"),l=a("2aba"),d=a("9b43"),h="prototype",f=function(m,g,y){var v=m&f.F,_=m&f.G,k=m&f.S,x=m&f.P,M=m&f.B,B=_?r:k?r[g]||(r[g]={}):(r[g]||{})[h],C=_?s:s[g]||(s[g]={}),V=C[h]||(C[h]={}),$,L,T,R;_&&(y=g);for($ in y)L=!v&&B&&B[$]!==void 0,T=(L?B:y)[$],R=M&&L?d(T,r):x&&typeof T=="function"?d(Function.call,T):T,B&&l(B,$,T,m&f.U),C[$]!=T&&o(C,$,R),x&&V[$]!=T&&(V[$]=T)};r.core=s,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},"613b":function(t,n,a){var r=a("5537")("keys"),s=a("ca5a");t.exports=function(o){return r[o]||(r[o]=s(o))}},"626a":function(t,n,a){var r=a("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return r(s)=="String"?s.split(""):Object(s)}},6821:function(t,n,a){var r=a("626a"),s=a("be13");t.exports=function(o){return r(s(o))}},"69a8":function(t,n){var a={}.hasOwnProperty;t.exports=function(r,s){return a.call(r,s)}},"6a99":function(t,n,a){var r=a("d3f4");t.exports=function(s,o){if(!r(s))return s;var l,d;if(o&&typeof(l=s.toString)=="function"&&!r(d=l.call(s))||typeof(l=s.valueOf)=="function"&&!r(d=l.call(s))||!o&&typeof(l=s.toString)=="function"&&!r(d=l.call(s)))return d;throw TypeError("Can't convert object to primitive value")}},7726:function(t,n){var a=t.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=a)},"77f1":function(t,n,a){var r=a("4588"),s=Math.max,o=Math.min;t.exports=function(l,d){return l=r(l),l<0?s(l+d,0):o(l,d)}},"79e5":function(t,n){t.exports=function(a){try{return!!a()}catch{return!0}}},"7f20":function(t,n,a){var r=a("86cc").f,s=a("69a8"),o=a("2b4c")("toStringTag");t.exports=function(l,d,h){l&&!s(l=h?l:l.prototype,o)&&r(l,o,{configurable:!0,value:d})}},"7f7f":function(t,n,a){var r=a("86cc").f,s=Function.prototype,o=/^\s*function ([^ (]*)/,l="name";l in s||a("9e1e")&&r(s,l,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch{return""}}})},8378:function(t,n){var a=t.exports={version:"2.6.12"};typeof __e=="number"&&(__e=a)},"84f2":function(t,n){t.exports={}},"86cc":function(t,n,a){var r=a("cb7c"),s=a("c69a"),o=a("6a99"),l=Object.defineProperty;n.f=a("9e1e")?Object.defineProperty:function(h,f,m){if(r(h),f=o(f,!0),r(m),s)try{return l(h,f,m)}catch{}if("get"in m||"set"in m)throw TypeError("Accessors not supported!");return"value"in m&&(h[f]=m.value),h}},"9b43":function(t,n,a){var r=a("d8e8");t.exports=function(s,o,l){if(r(s),o===void 0)return s;switch(l){case 1:return function(d){return s.call(o,d)};case 2:return function(d,h){return s.call(o,d,h)};case 3:return function(d,h,f){return s.call(o,d,h,f)}}return function(){return s.apply(o,arguments)}}},"9c6c":function(t,n,a){var r=a("2b4c")("unscopables"),s=Array.prototype;s[r]==null&&a("32e9")(s,r,{}),t.exports=function(o){s[r][o]=!0}},"9def":function(t,n,a){var r=a("4588"),s=Math.min;t.exports=function(o){return o>0?s(r(o),9007199254740991):0}},"9e1e":function(t,n,a){t.exports=!a("79e5")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},ac6a:function(t,n,a){for(var r=a("cadf"),s=a("0d58"),o=a("2aba"),l=a("7726"),d=a("32e9"),h=a("84f2"),f=a("2b4c"),m=f("iterator"),g=f("toStringTag"),y=h.Array,v={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},_=s(v),k=0;k<_.length;k++){var x=_[k],M=v[x],B=l[x],C=B&&B.prototype,V;if(C&&(C[m]||d(C,m,y),C[g]||d(C,g,x),h[x]=y,M))for(V in r)C[V]||o(C,V,r[V],!0)}},be13:function(t,n){t.exports=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a}},c366:function(t,n,a){var r=a("6821"),s=a("9def"),o=a("77f1");t.exports=function(l){return function(d,h,f){var m=r(d),g=s(m.length),y=o(f,g),v;if(l&&h!=h){for(;g>y;)if(v=m[y++],v!=v)return!0}else for(;g>y;y++)if((l||y in m)&&m[y]===h)return l||y||0;return!l&&-1}}},c69a:function(t,n,a){t.exports=!a("9e1e")&&!a("79e5")(function(){return Object.defineProperty(a("230e")("div"),"a",{get:function(){return 7}}).a!=7})},ca5a:function(t,n){var a=0,r=Math.random();t.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++a+r).toString(36))}},cadf:function(t,n,a){var r=a("9c6c"),s=a("d53b"),o=a("84f2"),l=a("6821");t.exports=a("01f9")(Array,"Array",function(d,h){this._t=l(d),this._i=0,this._k=h},function(){var d=this._t,h=this._k,f=this._i++;return!d||f>=d.length?(this._t=void 0,s(1)):h=="keys"?s(0,f):h=="values"?s(0,d[f]):s(0,[f,d[f]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,n,a){var r=a("d3f4");t.exports=function(s){if(!r(s))throw TypeError(s+" is not an object!");return s}},ce10:function(t,n,a){var r=a("69a8"),s=a("6821"),o=a("c366")(!1),l=a("613b")("IE_PROTO");t.exports=function(d,h){var f=s(d),m=0,g=[],y;for(y in f)y!=l&&r(f,y)&&g.push(y);for(;h.length>m;)r(f,y=h[m++])&&(~o(g,y)||g.push(y));return g}},d3f4:function(t,n){t.exports=function(a){return typeof a=="object"?a!==null:typeof a=="function"}},d53b:function(t,n){t.exports=function(a,r){return{value:r,done:!!a}}},d8e8:function(t,n){t.exports=function(a){if(typeof a!="function")throw TypeError(a+" is not a function!");return a}},e11e:function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f6fd:function(t,n){(function(a){var r="currentScript",s=a.getElementsByTagName("script");r in a||Object.defineProperty(a,r,{get:function(){try{throw new Error}catch(d){var o,l=(/.*at [^\(]*\((.*):.+:.+\)$/ig.exec(d.stack)||[!1])[1];for(o in s)if(s[o].src==l||s[o].readyState=="interactive")return s[o];return null}}})})(document)},fa5b:function(t,n,a){t.exports=a("5537")("native-function-to-string",Function.toString)},fab2:function(t,n,a){var r=a("7726").document;t.exports=r&&r.documentElement},fae3:function(t,n,a){if(a.r(n),a.d(n,"longClickDirective",function(){return o}),typeof window<"u"){a("f6fd");var r;(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(a.p=r[1])}a("ac6a"),a("7f7f");var s=function(l){var d=l.delay,h=d===void 0?400:d,f=l.interval,m=f===void 0?50:f;return{beforeMount:function(y,v,_,k){if(typeof v.value!="function"){var x=_.context.name,M="[longclick:] provided expression '".concat(v.expression,"' is not a function, but has to be");x&&(M+="Found in component '".concat(x,"' ")),console.warn(M)}var B=null,C=null,V=function(R){v.value(R)},$=function(R){R.type==="click"&&R.button!==0||B===null&&(B=setTimeout(function(){m&&m>0&&(C=setInterval(function(){V(R)},m)),V(R)},h))},L=function(){B!==null&&(clearTimeout(B),B=null),C&&(clearInterval(C),C=null)};["mousedown","touchstart"].forEach(function(T){y.addEventListener(T,$,{passive:!0})}),["click","mouseout","touchend","touchcancel"].forEach(function(T){y.addEventListener(T,L,{passive:!0})})},created:function(){},mounted:function(){},beforeUpdate:function(){},updated:function(){},beforeUnmount:function(){},unmounted:function(){}}},o=s}})})(O4);var mh=O4.exports;const is=e=>{if(typeof window>"u")switch(e){case"smartphone":case"tablet":return!1;case"hd-screen":return!0;case"fhd-screen":case"uhd-screen":return!1;default:throw new Error(`Valor inválido: '${e}'. Os valores aceitos são: 'smartphone', 'tablet', 'hd-screen', 'fhd-screen', 'uhd-screen'.`)}switch(e){case"smartphone":return window.outerWidth<500&&window.outerWidth<window.outerHeight;case"tablet":return window.outerWidth>=500&&window.outerWidth<900&&window.outerWidth<window.outerHeight;case"hd-screen":return window.outerWidth>=900&&window.outerWidth<1600&&window.outerWidth>window.outerHeight;case"fhd-screen":return window.outerWidth>=1600&&window.outerWidth<2e3&&window.outerWidth>window.outerHeight;case"uhd-screen":return window.outerWidth>=2e3&&window.outerWidth>window.outerHeight;default:throw new Error(`Valor inválido: '${e}'. Os valores aceitos são: 'smartphone', 'tablet', 'hd-screen', 'fhd-screen', 'uhd-screen'.`)}};function au(){return{isMobile:i.computed(()=>is("smartphone")||is("tablet"))}}const CE={class:"carousel-container"},xE=["onClick"],SE=ie(Object.assign({name:"CdsCarousel"},{__name:"Carousel",props:{items:{type:Array,default:()=>[]},snapTo:{type:String,default:"start",validator:e=>["start","center","end"].includes(e)},gap:{type:Number,default:0},showArrows:{type:Boolean,default:!1},darkArrows:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1}},emits:["item-click"],setup(e,{emit:t}){i.useCssVars(M=>({ae95ac62:m.value,"6df5b3f1":f.value}));const n=e,a=t,{isMobile:r}=au(),s=mh.longClickDirective({delay:1e3,interval:100}),o=i.ref(null);let l=!1,d,h;const f=i.computed(()=>n.snapTo),m=i.computed(()=>`${n.gap*4}px`);function g(M){r.value||(l=!0,d=(M.pageX||M.touches[0].pageX)-o.value.offsetLeft,h=o.value.scrollLeft,M.preventDefault(),o.value.style.scrollSnapType="none")}function y(M){if(!l)return;const C=((M.pageX||M.touches[0].pageX)-o.value.offsetLeft-d)*1.5;o.value.scrollLeft=h-C}function v(){l=!1,o.value.style.scrollSnapType="x mandatory",o.value.style.scrollBehavior="smooth",setTimeout(()=>{o.value.style.scrollBehavior="auto"},300)}function _(){const M=o.value,B=M.querySelector(".carousel__item").offsetWidth+n.gap*4;M.scrollBy({left:B,behavior:"smooth"})}function k(){const M=o.value,B=M.querySelector(".carousel__item").offsetWidth+n.gap*4;M.scrollBy({left:-B,behavior:"smooth"})}function x(M){n.clickable&&a("item-click",M)}return(M,B)=>(i.openBlock(),i.createElementBlock("div",CE,[e.showArrows?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["carousel__arrow carousel__arrow--left",{"carousel__arrow--dark":e.darkArrows}]),onClick:k},[i.createVNode(_e,{name:"arrow-left-outline",width:"20",height:"20"})],2)):i.createCommentVNode("",!0),i.withDirectives((i.openBlock(),i.createElementBlock("div",{ref_key:"carousel",ref:o,class:"carousel",onMousedown:g,onMousemove:y,onMouseup:v,onMouseleave:v,onTouchmove:y,onTouchend:v},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.items,(C,V)=>(i.openBlock(),i.createElementBlock("div",{key:C,class:"carousel__item",onClick:$=>x(C)},[i.renderSlot(M.$slots,"default",{item:C,index:V},void 0,!0)],8,xE))),128))],32)),[[i.unref(s),g]]),e.showArrows?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["carousel__arrow carousel__arrow--right",{"carousel__arrow--dark":e.darkArrows}]),onClick:_},[i.createVNode(_e,{name:"arrow-right-outline",width:"20",height:"20"})],2)):i.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5167f04f"]]),ME={name:"CdsCarouselController",props:{propertyName:{type:String,required:!0},perPage:{type:Number,required:!0},total:{type:Number,required:!0},simple:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1}},data(){return{currentNumberOfItemsMin:1,currentNumberOfItemsMax:this.perPage}},computed:{numberOfPages(){return Math.ceil(this.total/this.perPage)},disabledForward(){return this.currentNumberOfItemsMax>=this.total||this.simple&&this.currentNumberOfItemsMin>=this.numberOfPages},disabledBack(){return this.currentNumberOfItemsMin===1}},methods:{handleClickBack(){if(!this.disabledBack){if(this.simple&&this.currentNumberOfItemsMin>1){this.currentNumberOfItemsMin-=1,this.$emit("click-back",{min:this.currentNumberOfItemsMin-1,max:this.currentNumberOfItemsMax+1});return}else if(this.simple&&this.currentNumberOfItemsMin===1)return;this.currentNumberOfItemsMin-this.perPage<=0?(this.currentNumberOfItemsMin=1,this.currentNumberOfItemsMax=this.perPage,this.$emit("click-back",{min:this.currentNumberOfItemsMin-1,max:this.currentNumberOfItemsMax+1})):(this.currentNumberOfItemsMax-=this.currentNumberOfItemsMax-this.currentNumberOfItemsMin+1,this.currentNumberOfItemsMin-=this.perPage,this.$emit("click-back",{min:this.currentNumberOfItemsMin-1,max:this.currentNumberOfItemsMax}))}},handleClickForward(){if(!this.disabledForward){if(this.simple&&this.currentNumberOfItemsMin<this.numberOfPages){this.currentNumberOfItemsMin+=1,this.$emit("click-forward",{min:this.currentNumberOfItemsMin-1,max:this.currentNumberOfItemsMax+1});return}else if(this.simple&&this.currentNumberOfItemsMin===this.numberOfPages)return;this.currentNumberOfItemsMax+this.perPage>this.total?(this.currentNumberOfItemsMin=this.currentNumberOfItemsMax+1,this.currentNumberOfItemsMax=this.total,this.$emit("click-forward",{min:this.currentNumberOfItemsMin-1,max:this.currentNumberOfItemsMax+1})):(this.currentNumberOfItemsMin=this.currentNumberOfItemsMax+1,this.currentNumberOfItemsMax+=this.perPage,this.$emit("click-forward",{min:this.currentNumberOfItemsMin-1,max:this.currentNumberOfItemsMax+1}))}}}},BE={key:0,class:"carousel-controller__text"},EE={key:1,class:"carousel-controller__text"},OE={class:"carousel-controller__property"};function DE(e,t,n,a,r,s){return i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",{class:i.normalizeClass(["carousel-controller",{"carousel-controller--fluid":n.fluid}])},[i.createElementVNode("span",{class:i.normalizeClass({"carousel-controller__previous-button--disabled":s.disabledBack,"carousel-controller__previous-button":!s.disabledBack}),onClick:t[0]||(t[0]=(...o)=>s.handleClickBack&&s.handleClickBack(...o))},null,2),i.createElementVNode("div",null,[n.simple?(i.openBlock(),i.createElementBlock("span",EE,i.toDisplayString(r.currentNumberOfItemsMin)+" de "+i.toDisplayString(s.numberOfPages),1)):(i.openBlock(),i.createElementBlock("span",BE,i.toDisplayString(r.currentNumberOfItemsMin)+"-"+i.toDisplayString(r.currentNumberOfItemsMax)+" de "+i.toDisplayString(n.total),1)),i.createElementVNode("span",OE,i.toDisplayString(n.propertyName),1)]),i.createElementVNode("span",{class:i.normalizeClass({"carousel-controller__next-button--disabled":s.disabledForward,"carousel-controller__next-button":!s.disabledForward}),onClick:t[1]||(t[1]=(...o)=>s.handleClickForward&&s.handleClickForward(...o))},null,2)],2)])}const VE=ie(ME,[["render",DE],["__scopeId","data-v-9de64062"]]);function gh(e,t){return`${e}--${t}`}const $E={name:"CdsCheckbox",props:{modelValue:{type:Boolean,default:!1,required:!0},label:{type:String,default:"checkbox content"},variant:{type:String,default:"green"},indeterminate:{type:Boolean,default:!1},prominent:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data(){return{isChecked:this.modelValue,isIndeterminate:this.indeterminate}},computed:{resolveCheckboxClass(){const e=this.disabled?"cds-checkbox__input--disabled":"",t=gh("cds-checkbox__input",this.variant);let n=this.isChecked?"cds-checkbox__input--checked":"cds-checkbox__input--unchecked";return n=this.isIndeterminate?"cds-checkbox__input--indeterminate":n,`${t} ${n} ${e}`}},watch:{modelValue:{handler(e,t){e!==t&&(this.isChecked=this.modelValue)},immediate:!0},indeterminate:{handler(e,t){e!==t&&(this.isIndeterminate=this.indeterminate)},immediate:!0}},methods:{toggleValue(){this.disabled||(this.isChecked=this.isIndeterminate?!1:!this.isChecked,this.isIndeterminate=!1,this.$emit("update:modelValue",this.isChecked),this.$emit("update:indeterminate",!1))}}},TE={class:"cds-checkbox__container"},IE={class:"cds-checkbox__input"},AE=["id","value","name","disabled"],NE=["for"],zE=["for"];function LE(e,t,n,a,r,s){return i.openBlock(),i.createElementBlock("div",TE,[i.createElementVNode("div",IE,[i.createElementVNode("input",{id:e.$attrs.id||"cds-checkbox-option-input",value:n.modelValue,type:"checkbox",name:e.$attrs.name||"cds-checkbox-option",disabled:n.disabled},null,8,AE),i.createElementVNode("label",{for:e.$attrs.id||"cds-checkbox-option-input",class:i.normalizeClass(s.resolveCheckboxClass),onClick:t[0]||(t[0]=(...o)=>s.toggleValue&&s.toggleValue(...o))},null,10,NE)]),i.createElementVNode("label",{class:i.normalizeClass(["cds-checkbox__label",{"cds-checkbox__label--disabled":n.disabled,"cds-checkbox__label--prominent":n.prominent&&n.modelValue}]),for:e.$attrs.id||"cds-checkbox-option-input",onClick:t[1]||(t[1]=(...o)=>s.toggleValue&&s.toggleValue(...o))},i.toDisplayString(n.label),11,zE)])}const Qs=ie($E,[["render",LE],["__scopeId","data-v-3b24b6ce"]]),ru=[{name:"turquoise",hex:"#3CACDD",lighterHex:"#C2EDFF",lightestHex:"#f5fbff"},{name:"teal",hex:"#3CACDD",lighterHex:"#C2EDFF",lightestHex:"#eefcfa"},{name:"green",hex:"#2AC092",lighterHex:"#ABEDD9",lightestHex:"#f3fcf8"},{name:"blue",hex:"#377EE1",lighterHex:"#B6D1F7",lightestHex:"#f6f9fe"},{name:"indigo",hex:"#6174D1",lighterHex:"#CED6FD",lightestHex:"#f5f6ff"},{name:"violet",hex:"#A169D3",lighterHex:"#E6D2F9",lightestHex:"#faf5ff"},{name:"pink",hex:"#DD5A9C",lighterHex:"#F9C8E2",lightestHex:"#fff5fb"},{name:"red",hex:"#F95367",lighterHex:"#FBD0D6",lightestHex:"#fef6f7"},{name:"orange",hex:"#FF8567",lighterHex:"#FFD6CC",lightestHex:"#fef7f6"},{name:"amber",hex:"#FFB952",lighterHex:"#FFE2B8",lightestHex:"#fefbf6"},{name:"gray",hex:"#9AA8B6",lighterHex:"#ABB8C4",lightestHex:"#D6DCE3"},{name:"dark",hex:"#3B4754",lighterHex:"#647382",lightestHex:"#99A6B2"},{name:"white",hex:"#FFFFFF",lighterHex:"#FAFCFE",lightestHex:"#F4F8FB"}],Ba=ru.map(e=>e.name),Jl=e=>{const t=ru.filter(n=>n.name===e)[0];return t?t.hex:""},PE=e=>{const t=ru.filter(n=>n.name===e)[0];return t?t.lightestHex:""},D4=e=>Ba.includes(e),FE={class:"checkbox__container"},RE={class:"checkbox__label"},HE={key:0,class:"checkbox__required"},WE=["onClick"],YE={key:0,class:"checkbox__error-message"},jE=ie(Object.assign({name:"CdsCheckboxGroup"},{__name:"CheckboxGroup",props:{modelValue:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},label:{type:String,default:"Label"},required:{type:Boolean,default:!1},variant:{type:String,default:"green",validator:D4},disabled:{type:Boolean,default:!1},state:{type:String,default:"default"},errorMessage:{type:String,default:"Valor inválido"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=i.ref([]),s=i.ref(0),o=i.computed(()=>n.state==="invalid");i.watch(r,()=>s.value+=1),i.onMounted(()=>{r.value=n.modelValue});function l(h){if(n.disabled)return"checkbox__item--disabled";const f=o.value?"checkbox__item--error":gh("checkbox__item",n.variant);return r.value.includes(h)?`checkbox__item--selected ${f}`:`checkbox__item ${o.value?f:""}`}function d(h){if(!n.disabled){if(r.value.includes(h)){r.value=r.value.filter(f=>f!==h),a("update:modelValue",r.value);return}r.value.push(h),a("update:modelValue",r.value)}}return(h,f)=>(i.openBlock(),i.createElementBlock("div",FE,[i.createElementVNode("label",RE,[i.createTextVNode(i.toDisplayString(e.label)+" ",1),e.required?(i.openBlock(),i.createElementBlock("span",HE," * ")):i.createCommentVNode("",!0)]),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,m=>(i.openBlock(),i.createElementBlock("div",{key:m.value,class:i.normalizeClass(l(m.value)),onClick:g=>d(m.value)},[i.createVNode(Qs,{id:m.value,"model-value":r.value.includes(m.value),label:m.label,disabled:e.disabled,variant:e.variant},null,8,["id","model-value","label","disabled","variant"])],10,WE))),128)),o.value&&!e.disabled?(i.openBlock(),i.createElementBlock("div",YE,i.toDisplayString(e.errorMessage),1)):i.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-66e127c2"]]);function pr(e){const t=i.useSlots();return Object.keys(t).some(n=>n===e)}const UE={key:0,class:"chip__content--icon"},qE={ref:"slot-content"},GE=ie(Object.assign({name:"CdsChip"},{__name:"Chip",props:i.mergeModels({variant:{type:String,default:"gray"},size:{type:String,default:"md"},persistantActionIcon:{type:Boolean,default:!1},iconLeft:{type:Boolean,default:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){i.useCssVars(k=>({de9e7aaa:m.value.width,"6b9898e2":m.value.height,"5d97dcdc":y.value}));const t=i.useModel(e,"modelValue"),n=e,a=i.useTemplateRef("slot-content"),r=i.ref(Ba),s=i.ref(V_),o=i.ref(t.value),l=i.ref(""),d=i.ref(!0),h=i.ref("0px"),f=i.computed(()=>{let k="";return o.value||(k+=" chip--not-selected"),r.value.indexOf(n.variant)>-1&&(k+=` chip--${n.variant}`),s.value.indexOf(n.size)>-1&&(k+=` chip--${n.size}`),k}),m=i.computed(()=>{switch(n.size){case"sm":return{height:14,width:14};case"lg":return{height:20,width:20};default:return{height:18,width:18}}}),g=i.computed(()=>{if(!n.persistantActionIcon)return d.value?{paddingRight:m.value.width/2+2+"px",paddingLeft:m.value.width/2+2+"px"}:{}}),y=i.computed(()=>n.iconLeft?"row":"row-reverse");i.watch(()=>t,k=>{o.value=k.value}),i.watch(()=>o.value,k=>{k?l.value=_():l.value+=" chip--not-selected",setTimeout(()=>{d.value=!k},300),t.value=k}),i.onMounted(()=>{l.value=f.value,setTimeout(()=>{var k;h.value=(((k=a.value)==null?void 0:k.offsetWidth)||0)+4+m.value.width+"px"},100)});function v(){o.value=!o.value}function _(){let k=new RegExp("chip--not-selected","g");return l.value.replace(k,"")}return(k,x)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["chip__container",l.value]),"data-testid":"chip-container",onClick:v},[i.createElementVNode("div",{class:i.normalizeClass(`chip__content--${e.size}`)},[i.createElementVNode("div",{class:"chip__content-container",style:i.normalizeStyle({maxWidth:h.value,...g.value})},[i.createVNode(i.Transition,{name:"fade"},{default:i.withCtx(()=>[o.value||n.persistantActionIcon?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.unref(pr)("icon")?(i.openBlock(),i.createElementBlock("div",UE,[i.renderSlot(k.$slots,"icon")])):(i.openBlock(),i.createBlock(_e,{key:1,name:"check-outline",height:m.value.height,width:m.value.width},null,8,["height","width"]))],64)):i.createCommentVNode("",!0)]),_:3}),i.createElementVNode("div",qE,[i.renderSlot(k.$slots,"default")],512)],4)],2)],2))}}),[["__scopeId","data-v-10a8a450"]]),KE={name:"CdsCollapsibleContainer",props:{modelValue:{type:Boolean,default:!1,required:!0},title:{type:String,default:"Visualizar mais"}},data(){return{internalValue:this.modelValue}},watch:{internalValue(e){this.$emit("update:modelValue",e)},modelValue(e){this.internalValue=e}},methods:{triggerExpanded(){this.internalValue=!this.internalValue}}},ZE={id:"collapsible-container"},XE={class:"collapsible-container__title"},JE={key:0,class:"collapsible-container__content","data-testid":"collapsible-content"};function QE(e,t,n,a,r,s){return i.openBlock(),i.createElementBlock("span",ZE,[i.createElementVNode("div",{class:"collapsible-container__item",onClick:t[0]||(t[0]=(...o)=>s.triggerExpanded&&s.triggerExpanded(...o))},[i.createElementVNode("span",{class:i.normalizeClass(r.internalValue?"collapsible-container__chevron--opened":"collapsible-container__chevron--closed")},null,2),i.renderSlot(e.$slots,"title",{},()=>[i.createElementVNode("span",XE,i.toDisplayString(n.title),1)])]),r.internalValue?(i.openBlock(),i.createElementBlock("div",JE,[i.renderSlot(e.$slots,"default")])):i.createCommentVNode("",!0)])}const eO=ie(KE,[["render",QE]]),su=e=>{var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},tO=.2126,nO=.7152,iO=.0722,aO=2.4,rO={POOR:3,GOOD:4.5,VERYGOOD:7,SUPER:12},V4=(e,t,n="GOOD")=>{let a=su(e),r=su(t);var s=$4(...a),o=$4(...r),l=Math.max(s,o),d=Math.min(s,o);return(l+.05)/(d+.05)>=rO[n]};function $4(e,t,n){var a=[e,t,n].map(r=>(r/=255,r<=.03928?r/12.92:Math.pow((r+.055)/1.055,aO)));return a[0]*tO+a[1]*nO+a[2]*iO}const yh={name:"CdsColorPicker",components:{CdsPopover:dl,CdsIcon:_e},props:{modelValue:{type:String,required:!0},label:{type:String,default:"Label"},inline:{type:Boolean,default:!1},popoverHeight:{type:Number,default:190},swatch:{type:Array,default:()=>[]}},data(){return{selectedColor:this.modelValue,sassColorVariables:ai,showPopover:!1}},computed:{iconColorResolver(){return this.ContrastChecker(this.selectedColor,"#FFFFFF","POOR")?"swatch__icon--white":"swatch__icon--black"},palete(){return this.paleteBuilder(this.sassColorVariables.palete)}},watch:{modelValue:{handler(e,t){e!==t&&(this.selectedColor=e)},immediate:!0}},methods:{paleteBuilder:sa,ContrastChecker:V4,SwatchSelection(e){let t="";this.selectedColor=this.sassColorVariables[e.replace(/-|\$/gi,"")],this.palete.forEach(n=>{n.colorTokens.find(a=>a===e)&&(t=n.variantName.toLowerCase())}),this.$emit("update:modelValue",this.selectedColor),this.$emit("variant-chosen",t)},isCurrentColorSelected(e){return this.selectedColor===this.sassColorVariables[e.replace(/-|\$/gi,"")]}}},T4=()=>{i.useCssVars(e=>({"21450dca":e.selectedColor}))},I4=yh.setup;yh.setup=I4?(e,t)=>(T4(),I4(e,t)):T4;const sO={key:0},oO={class:"color-picker__label"},lO=["onClick"],cO={key:1},dO=["onClick"];function uO(e,t,n,a,r,s){const o=i.resolveComponent("CdsIcon"),l=i.resolveComponent("CdsPopover");return n.inline?(i.openBlock(),i.createElementBlock("div",sO,[i.createElementVNode("div",oO,i.toDisplayString(n.label),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.swatch,(d,h)=>(i.openBlock(),i.createElementBlock("div",{key:h,class:"color-picker__container"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d,(f,m)=>(i.openBlock(),i.createElementBlock("div",{key:m},[i.createElementVNode("div",{class:i.normalizeClass(`color-picker__swatch--${f.replace("$","")}`),onClick:g=>s.SwatchSelection(f)},[s.isCurrentColorSelected(f)?(i.openBlock(),i.createBlock(o,{key:0,height:"22",width:"22",name:"check-outline",class:i.normalizeClass(["swatch__icon",s.iconColorResolver])},null,8,["class"])):i.createCommentVNode("",!0)],10,lO)]))),128))]))),128))])):(i.openBlock(),i.createElementBlock("div",cO,[i.createElementVNode("div",{id:"color-picker",class:"color-picker__trigger",onClick:t[0]||(t[0]=i.withModifiers(d=>r.showPopover=!r.showPopover,["stop"]))},t[2]||(t[2]=[i.createElementVNode("div",{class:"color-picker__preview"},null,-1)])),i.createVNode(l,{modelValue:r.showPopover,"onUpdate:modelValue":t[1]||(t[1]=d=>r.showPopover=d),"right-aligned":!1,"target-id":"color-picker",height:n.popoverHeight,"fit-content-width":""},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.swatch,(d,h)=>(i.openBlock(),i.createElementBlock("div",{key:h,class:"popover__container"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d,(f,m)=>(i.openBlock(),i.createElementBlock("div",{key:m},[i.createElementVNode("div",{class:i.normalizeClass(`color-picker__swatch--${f.replace("$","")}`),onClick:g=>s.SwatchSelection(f)},[s.isCurrentColorSelected(f)?(i.openBlock(),i.createBlock(o,{key:0,height:"22",width:"22",name:"check-outline",class:i.normalizeClass(["swatch__icon",s.iconColorResolver])},null,8,["class"])):i.createCommentVNode("",!0)],10,dO)]))),128))]))),128))]),_:1},8,["modelValue","height"])]))}const hO=ie(yh,[["render",uO],["__scopeId","data-v-81dc5169"]]),fO={name:"CdsDashboardCard",props:{title:{type:String,default:"",required:!1},description:{type:String,default:"",required:!1},showAction:{type:Boolean,default:!1,required:!1},action:{type:String,default:"Action",required:!1},fluid:{type:Boolean,default:!1}}},pO={class:"dashboard-card"},mO={class:"dashboard-card__header"},gO={key:0,class:"dashboard-card__title"},yO={key:1,class:"dashboard-card__title"},bO={key:0,class:"dashboard-card__description"},vO={key:1,class:"dashboard-card__description"},_O={key:0};function wO(e,t,n,a,r,s){return i.openBlock(),i.createElementBlock("div",pO,[i.createElementVNode("div",null,[i.createElementVNode("div",mO,[n.title.length>0?(i.openBlock(),i.createElementBlock("p",gO,i.toDisplayString(n.title),1)):(i.openBlock(),i.createElementBlock("p",yO,[i.renderSlot(e.$slots,"title-slot",{},void 0,!0)])),i.createElementVNode("div",null,[i.renderSlot(e.$slots,"status-slot",{},void 0,!0)])]),n.description.length>0?(i.openBlock(),i.createElementBlock("p",bO,i.toDisplayString(n.description),1)):(i.openBlock(),i.createElementBlock("p",vO,[i.renderSlot(e.$slots,"description-slot",{},void 0,!0)]))]),i.createElementVNode("div",{class:"dashboard-card__action",onClick:t[0]||(t[0]=o=>e.$emit("action-button-click"))},[i.renderSlot(e.$slots,"action-slot",{},()=>[n.showAction?(i.openBlock(),i.createElementBlock("div",_O,i.toDisplayString(n.action),1)):i.createCommentVNode("",!0)],!0)])])}const kO=ie(fO,[["render",wO],["__scopeId","data-v-6c2edd42"]]);var ou={exports:{}};/**
24
24
  * @license
25
25
  * Lodash <https://lodash.com/>
26
26
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>